summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #23104 from mrc0mmand/resolved-testsYu Watanabe2022-07-0412-7/+551
|\ | | | | Introduce systemd-resolved test suite
| * test: Introduce systemd-resolved test suiteFrantisek Sumsal2022-07-0411-0/+545
| | | | | | | | Resolves: #19599
| * test: resize the terminal automagically with INTERACTIVE_DEBUG=yesFrantisek Sumsal2022-07-041-7/+5
| |
| * test: install /usr/libexec/vi as wellFrantisek Sumsal2022-07-041-0/+1
| | | | | | | | | | since `/bin/vi` (at least on Fedora) is a shell wrapper which runs either `/bin/vim` or `/usr/libexec/vi` based on availability.
* | meson: Assign tests a suite based on their directoryDaan De Meyer2022-07-041-1/+6
| | | | | | | | | | | | This can be used to run only a subset of tests, e.g. "meson test -C build --suite journal" to run only the journal unit tests.
* | Merge pull request #23886 from keszybz/https-links-kernelYu Watanabe2022-07-0319-48/+43
|\ \ | | | | | | tree-wide: use html links for kernel docs
| * | man/network: fix wording and syntaxZbigniew Jędrzejewski-Szmek2022-07-021-5/+5
| | | | | | | | | | | | | | | Follow-up for 0bcc6557fbba32ebcdf323e76688ced50e3c8d8e. Docbook doesn't know <variable>.
| * | tree-wide: use html links for kernel docsZbigniew Jędrzejewski-Szmek2022-07-0219-43/+38
| | | | | | | | | | | | Instead of using "*.txt" as reference name, use the actual destination title.
* | | Merge pull request #23088 from yuwata/udev-event-blockerZbigniew Jędrzejewski-Szmek2022-07-024-76/+59
|\ \ \ | | | | | | | | udev: cleanups for event blocker
| * | | udev: also make uevent blocked by events for the same device nodeYu Watanabe2022-05-041-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if the device node is the same, devnum (thus, device ID) and syspath may be different. If a 'remove' and 'add' events for the same device node but with different devnum and syspath are queued, previously, we might process them in parallel. And, udev_watch_end() for the 'remove' event and udev_watch_begin() for the 'add' event may interfere each other.
| * | | udev: make newer event also blocked by DEVPATH_OLDYu Watanabe2022-05-044-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a device has DEVPATH_OLD is blocked by a previous event whose devpath is equivalent to the DEVPATH_OLD. This extends the condtion. 1. an event has DEVPATH_OLD is blocked by a previous event whose devpath is a parent of, child of, or equivalent to the DEVPATH_OLD. 2. an event is blocked by a previous event whose DEVPATH_OLD is a parent of, child of, or equivalent to the devpath of the new event. I am not sure such check is really necessary. But, the cost of the check is expected to be extremely small, as device renaming does not occur so frequently. Hence, it should not introduce any significant performance regression.
| * | | udev: use device ID to find blockersYu Watanabe2022-05-041-57/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two devices have the same devnum and subsystem (more specifically, if the device is block or not), or have the same ifindex, then IDs of these devices are equivalent. Hence, the previous conditions are covered by comparing device IDs. Of course, events with a same ID should be already blocked by the devpath check. So, this should not change anything. However, udevd saves many kinds of data under /run/udev named with the device ID. If multiple workers processes events for the same device ID, then the database may become corrupted. Let's explicitly check the device IDs for safety and simplicity.
* | | | Merge pull request #23865 from keszybz/drop-memcpy-callZbigniew Jędrzejewski-Szmek2022-07-024-5/+5
|\ \ \ \ | | | | | | | | | | sd-id128: avoid an unnecessary function call in inline helper
| * | | | homework: silence gcc warningZbigniew Jędrzejewski-Szmek2022-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc was warning that found_fs_uuid was used unitialized. The issue stemmed from the call to open(), where gcc seemingly didn't know that errno must be negative. When that is set, we can drop some unnecessary initializations without warnings.
| * | | | sd-journal: silence bogus gcc warningZbigniew Jędrzejewski-Szmek2022-07-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In function 'sd_id128_equal', inlined from 'journal_file_verify' at ../src/libsystemd/sd-journal/journal-verify.c:1047:29: ../src/systemd/sd-id128.h:119:43: error: 'entry_boot_id.qwords[0]' may be used uninitialized [-Werror=maybe-uninitialized] 119 | return a.qwords[0] == b.qwords[0] && a.qwords[1] == b.qwords[1]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/libsystemd/sd-journal/journal-verify.c: In function 'journal_file_verify': ../src/libsystemd/sd-journal/journal-verify.c:823:20: note: 'entry_boot_id.qwords[0]' was declared here 823 | sd_id128_t entry_boot_id; | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors entry_boot_id is only used when entry_monotonic_set has been set, and that's only done in one place where entry_boot_id is also initalized.
| * | | | sd-id128: avoid an unnecessary function call in inline helperZbigniew Jędrzejewski-Szmek2022-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When optimizing, the compiler will most likely replace the call to memcmp(), but at -O0, the code that is emitted builds the call preamble and does the call. Let's use the same pattern as with sd_id128_is_null() and sd_id128_is_allf() and avoid the call.
* | | | | test: copy libgcc_s.so.1 to TPM2 test image on Debian-like systemsNick Rosbrook2022-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Ubuntu, cryptsetup does not link against libgcc_s.so.1 which leads to the following test failure in TEST-70-TPM2: systemd[1]: Starting testsuite-70.service... systemd[329]: testsuite-70.service: Executing: /usr/lib/systemd/tests/testdata/units/testsuite-70.sh testsuite-70.sh[329]: + export SYSTEMD_LOG_LEVEL=debug testsuite-70.sh[329]: + SYSTEMD_LOG_LEVEL=debug testsuite-70.sh[329]: + img=/var/tmp/test.img testsuite-70.sh[329]: + dd if=/dev/zero of=/var/tmp/test.img bs=1024k count=20 status=none testsuite-70.sh[329]: + echo -n passphrase testsuite-70.sh[329]: + cryptsetup luksFormat -q --use-urandom /var/tmp/test.img /tmp/passphrase testsuite-70.sh[333]: libgcc_s.so.1 must be installed for pthread_exit to work testsuite-70.sh[329]: /usr/lib/systemd/tests/testdata/units/testsuite-70.sh: line 12: 333 Aborted (core dumped) cryptsetup luksFormat -q --use-urandom $img /tmp/passphrase To fix this, manually install libgcc_s.so.1 to the test image if running on Debian-like systems.
* | | | | Merge pull request #23835 from yuwata/nspawn-private-users-identityZbigniew Jędrzejewski-Szmek2022-07-022-3/+12
|\ \ \ \ \ | | | | | | | | | | | | nspawn: follow-ups for --private-users=identity
| * | | | | nspawn: support PrivateUsers=identityYu Watanabe2022-06-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up for 33eac552ab22af58b303342b1fa912900fa42820. Fixes #23825.
| * | | | | nspawn: update help message for user namespacingYu Watanabe2022-06-271-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Follow-up for 33eac552ab22af58b303342b1fa912900fa42820.
* | | | | | debug-generator: shorten code a bitYu Watanabe2022-07-021-6/+0
| | | | | |
* | | | | | Merge pull request #23883 from yuwata/pid1-do-not-filter-out-systemd-unitYu Watanabe2022-07-022-7/+4
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | core: do not filter out systemd.unit= from kernel command line
| * | | | | test: add a simple test for daemon-reexecFrantisek Sumsal2022-07-021-0/+4
| | | | | |
| * | | | | core: do not filter out systemd.unit= and run-level specifier from kernel ↵Yu Watanabe2022-07-021-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command line Fixes a bug introduced by 846f1da465beda990c1c01346311393f485df467. The commit 846f1da465beda990c1c01346311393f485df467 made systemd.unit= filtered out from the command line. That causes debug-generator does not work as expected on daemon-reexecute, and we cannot call `systemctl daemon-reexecute` in our test suite running on nspawn. Fixes issue reported in https://github.com/systemd/systemd/pull/23851#issuecomment-1170992052.
* | | | | | unit: prioritize module devicesYu Watanabe2022-07-011-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, prioritize tty and network devices. Follow-up for 2336bde96420475ccb054326f27290fa0228f27d Fixes #23850.
* | | | | build(deps): bump meson from 0.62.0 to 0.62.2 in /.github/workflowsdependabot[bot]2022-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [meson](https://github.com/mesonbuild/meson) from 0.62.0 to 0.62.2. - [Release notes](https://github.com/mesonbuild/meson/releases) - [Commits](https://github.com/mesonbuild/meson/compare/0.62.0...0.62.2) --- updated-dependencies: - dependency-name: meson dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | | build(deps): bump github/codeql-action from 2.1.6 to 2.1.15dependabot[bot]2022-07-011-3/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.6 to 2.1.15. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/28eead240834b314f7def40f6fcba65d100d99b1...3f62b754e23e0dd60f91b744033e1dc1654c0ec6) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | journalctl: fix to show user sliceYu Watanabe2022-07-011-1/+1
| | | | | | | | | | | | | | | | Fixes #23867.
* | | | units: add IgnoreOnIsolate=yes to systemd-journald tooZbigniew Jędrzejewski-Szmek2022-07-013-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already had it on the socket units, so it's possible that systemd-journald.service would be stopped and then restarted when trafic hits the sockets when something logs. Let's not try to stop it. It is supposed to run until the end and be eventually killed in the final killing spree. This might (or not) help with #23287.
* | | | Merge pull request #23868 from keszybz/lib-resplit-2Yu Watanabe2022-07-0158-560/+860
|\ \ \ \ | | | | | | | | | | Export sd-netlink and clean up exported interfaces a bit
| * | | | docs/ARCHITECTURE: mention src/fundamental/ and add more detailsZbigniew Jędrzejewski-Szmek2022-06-301-16/+46
| | | | |
| * | | | basic/socket-util: rename fd_inc_rcvbuf → fd_increase_rxbufZbigniew Jędrzejewski-Szmek2022-06-305-8/+8
| | | | | | | | | | | | | | | | | | | | See previous commit for justification.
| * | | | sd-netlink: rename sd_netlink_inc_rcvbuf → sd_netlink_increase_rxbufZbigniew Jędrzejewski-Szmek2022-06-305-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have RxBufferSize= and TxBufferSize= in .link files. Let's use the same abbreviation here. OTOH, "inc" could be short for "increment" or "increase", let's avoid that.
| * | | | sd-bus: indentationZbigniew Jędrzejewski-Szmek2022-06-301-8/+8
| | | | |
| * | | | sd-bus: use assert_return() in public function sd_bus_message_dumpZbigniew Jędrzejewski-Szmek2022-06-303-5/+8
| | | | | | | | | | | | | | | | | | | | Also, document that NULL is allowed.
| * | | | sd-event: let sd_event_source_set_enabled accept NULLZbigniew Jędrzejewski-Szmek2022-06-304-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same story as before: disabling a non-existent event source shouldn't need to be guarded by an if. I retained the wrapper so that that we don't have to say SD_EVENT_OFF in the many places where this is called.
| * | | | sd-event: allow sd_event_source_is_enabled() to return false for NULLZbigniew Jędrzejewski-Szmek2022-06-306-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a natural use case, and instead of defining a wrapper to do this for us, let's just make this part of the API. Calling with NULL was not allowed, so this is not a breaking change to the interface. (After sd_event_source_is_enabled was originally added, we introduced sd_event_source_disable_unref() and other similar functions which accept NULL. So not accepting NULL here is likely to confuse people. Let's just make the API usable with minimal fuss.)
| * | | | sd-netlink: allow sd_netlink_message_read() to be used for union typesZbigniew Jędrzejewski-Szmek2022-06-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, sd_netlink_message_read() expected to fill a buffer completely, and would return -EIO if the attribute being read was shorter than the buffer. This means that the function can be used to "peek" into attributes (by specifying a short buffer to just read part of the attribute), but cannot be used to read something into a union without knowing beforehand which specific field in the union is being filled. That latter operation seems more useful (messages are short, so we don't really need to do partial reads), so let's allow reads that don't fill the output buffer completely.
| * | | | man: document sd_bus_message_read_strv_extend()Zbigniew Jędrzejewski-Szmek2022-06-302-5/+19
| | | | |
| * | | | sd-bus: export sd_bus_message_read_strv_extend()Zbigniew Jędrzejewski-Szmek2022-06-305-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | The same story as before: it's a useful helper, other uses of the library are likely to find it useful.
| * | | | man: document sd_id128_string_equal()Zbigniew Jędrzejewski-Szmek2022-06-302-0/+12
| | | | |
| * | | | man: rework the text in sd-id128Zbigniew Jędrzejewski-Szmek2022-06-301-45/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In places the text was overly formal, e.g. "an 128-bit ID" was repeated, even though it is clear from the context that we're talking about this type of ID. OTOH, in other places the text was informal, e.g. "You can use …". Also, "you may use f() to frob" → "f() frobs". The text without all the flourishes is easier to read. sd_id128_in_set_sentinel() was described only in passing when taking about sd_id128_in_set(), now it gets is own brief paragraph. The synopsis was missing.
| * | | | sd-id128: rename and export sd_id128_string_equal()Zbigniew Jędrzejewski-Szmek2022-06-308-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We find this function useful in our code, so no reason not to export it. I changed the order of last two words in the name to match the arguments. (With "equal_string" I expected sd_id128_t first, string second, but in actual use, the second argument is usually a long constant so it's nice to keep this order of arguments.)
| * | | | man: document sd_bus_error_setfv()Zbigniew Jędrzejewski-Szmek2022-06-302-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | The description for sd_bus_error_set_errnof/sd_bus_error_set_errnofv are adjusted to use the same pattern.
| * | | | meson: update man-generation rules for sd_hwdb_new_from_pathZbigniew Jędrzejewski-Szmek2022-06-301-1/+4
| | | | | | | | | | | | | | | | | | | | Forgotten in 60f0ba75569312825ff14680d05a4b4f95842951.
| * | | | sd-bus: export sd_bus_error_setfv()Zbigniew Jędrzejewski-Szmek2022-06-306-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usual: if we find that function useful, other users of the library will too. In particular, the v-variants are necessary to build pass-thru wrappers.
| * | | | sd-bus: drop unused prototypeZbigniew Jędrzejewski-Szmek2022-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Function was exported in 07a0d22f9ec5a0cac2385b73dc08b12a811cead8, but apparently we forgot to remove the old declaration.
| * | | | libsystemd: drop unexported sd-utf8Zbigniew Jędrzejewski-Szmek2022-06-303-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It had two symbols which were not actually exported because they were not listed in libsystemd.sym. They were also entirely unused in our codebase. I don't think it makes much sense to export just those two functions, and it doesn't make to build a string processing library in systemd either. History of the file shows that it was created in faaa5728d956b7f0d24f27f3341d0b9fff30af00 'utf8: export utf8 validation functions as part of sd-bus' and hasn't gone even one non-trivial change since then ;)
| * | | | libsystemd: export sd-netlinkZbigniew Jędrzejewski-Szmek2022-06-3012-297/+485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was added originally in 65f568bbeb9b8c70200e44c19a797df3a0bfd485. The API is has stabilized pretty much, and generally follows the usual style for libsystemd. We've held it as a public-but-private library for almost 10 years, let's export it. sd_netlink_sendv() and sd_nfnl_nft_*() are excluded. libsystemd.so seems to grow by 12k.
| * | | | test-lib*-sym: print symbols names in addition to addressesZbigniew Jędrzejewski-Szmek2022-06-301-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to see what the test is doing. I converted the code to use f-strings. They are already used in other scripts necessary for build, so IIUC this is OK.