summaryrefslogtreecommitdiffstats
path: root/src/run (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-07-07os-release: define SUPPORT_END=Zbigniew Jędrzejewski-Szmek1-0/+10
Fixes #21764. I think is very simple, but flexible. The date may be set early, for distros that have a fixed schedule, but it doesn't have to. So for example Debian could push out an update that sets a few months before the release goes EOL. And various tools, in particular graphical desktops, can start nagging people to upgrade a few weeks before the date. As discussed in the bug, we don't need granularity higher than a day. And this means that we can use a simple human- and machine-readable format. I was considering other names, e.g. something with "EOL", but I think that "SUPPORT_END" is better because it doesn't imply that the machine will somehow stop working. This is supposed to be an advisory, nothing more.
2022-07-06fundamental: adjust #if conditional for _fallthrough_ for clangThomas Haller1-1/+1
NetworkManager takes systemd sources. It gets compiler warnings related to _fallthrough_. They probably can also affect systemd itself. A) on RHEL-7, gcc 4.8.5-44.el7 we get: ../src/libnm-systemd-shared/src/fundamental/macro-fundamental.h:45:22: error: "__clang__" is not defined [-Werror=undef] #if __GNUC__ >= 7 || __clang__ ^ Presumably gcc older than 7 is supported, so fix this. B) on Ubuntu 18.04, clang 1:6.0-41~exp5~ubuntu1 we get: ../src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c:746:17: error: declaration does not declare anything [-Werror,-Wmissing-declarations] _fallthrough_; ^ ../src/libnm-systemd-shared/src/fundamental/macro-fundamental.h:46:25: note: expanded from macro '_fallthrough_' # define _fallthrough_ __attribute__((__fallthrough__)) ^ Granted, README comments that clang >= 10 is required. However, parts of systemd build just fine with older clang. It seems unnecessary to break this and the fix helps NetworkManager. Fixes: c0f5d58c9ab7 ('meson: Document why -Wimplicit-fallthrough is not used with clang')
2022-07-06mkosi: Update to latest releaseDaan De Meyer1-1/+1
This fixes the mkosi github action to unbreak the mkosi CI
2022-07-06man: "enabled commands are started at boot" is rubbishLennart Poettering1-20/+22
it's enabled units, and they might be started by various forms of activation, not just "at boot". Fix that.
2022-07-06update TODOLennart Poettering1-0/+3
2022-07-06dissect: refuse empty release IDYu Watanabe1-0/+2
2022-07-06Revert "dissect: ID from os-release should be non-empty, not just non-NULL"Yu Watanabe1-1/+1
This reverts commit a2cf73f0b602a93a32107cfc066a5e307263c577. This is not necessary after 78ab2b5064a0f87579ce5430f9cb83bba0db069a. Addresses https://github.com/systemd/systemd/pull/23454#discussion_r913611798.
2022-07-05json: actually use numeric C locale we just allocatedLennart Poettering1-1/+3
This fixes formatting of JSON real values, and uses C locale for them. It's kinda interesting that this wasn't noticed before: the C locale object we allocated was not used, hence doing the dance had zero effect. This makes "test-varlink" pass again on systems with non-C locale. (My guess: noone noticed this because "long double" was used before by the JSON code and that had no locale supporting printer or so?)
2022-07-05journal: Make sd_journal_previous/next() return 0 at HEAD/TAILDaan De Meyer2-4/+8
Currently, both these functions don't return 0 if we're at HEAD/TAIL and move in the corresponding direction. Let's fix that. Replaces #23480
2022-07-05docs: normalize uppercasing of titles of network docLennart Poettering2-23/+17
2022-07-05tree-wide: drop duplicated semicolonsZbigniew Jędrzejewski-Szmek6-6/+6
2022-07-05man: fix link to glob(3)Zbigniew Jędrzejewski-Szmek1-3/+3
2022-07-05fuzz: rename samples to avoid long test namesZbigniew Jędrzejewski-Szmek14-0/+0
2022-07-05firstboot: Don't skip passwd/shadow logic if only one of the files existsDaan De Meyer1-4/+2
If one of the files exists but not the other one, we want to make sure we create the other file to make sure the passwd database is in a valid state.
2022-07-05machine: switch to BusLocator-oriented helpersQuentin Deslandes2-24/+7
Replace existing sd_bus_x calls with counterparts from bus-locator.h.
2022-07-05user: delegate cpu controller, assign weights to user slicesZbigniew Jędrzejewski-Szmek5-1/+12
So far we didn't enable the cpu controller because of overhead of the accounting. If I'm reading things correctly, delegation was enabled for a while for the units with user and pam context set, i.e. for user@.service too. a931ad47a8623163a29d898224d8a8c1177ffdaf added the explicit Delegate=yes|no switch, but it was initially set to 'yes'. acc8059129b38d60c1b923670863137f8ec8f91a disabled delegation for user@.service with the justication that CPU accounting is expensive, but half a year later a88c5b8ac4df713d9831d0073a07fac82e884fb3 changed DefaultCPUAccounting=yes for kernels >=4.15 with the justification that CPU accounting is inexpensive there. In my (very noncomprehensive) testing, I don't see a measurable overhead if the cpu controller is enabled for user slices. I tried some repeated compilations, and there is was no statistical difference, but the noise level was fairly high. Maybe better benchmarking would reveal a difference. The goal of this change is very simple: currently all of the user session, including services like the display server and pipewire are under user@.service. This means that when e.g. a compilation job is started in the session's app.slice, the processes in session.slice compete for CPU and can be starved. In particular, audio starts to stutter, etc. With CPU controller enabled, I can start start 'ninja -C build -j40' in a tab and this doesn't have any noticable effect on audio. I don't think the particular values matter too much: the CPU controller is work-convserving, and presumably the session slice would never need more than e.g. one 1 full CPU, i.e. half or a quarter of available CPU resources on even the smallest of today's machines. app.slice and session.slice are assigned equal weights, background.slice is assigned a smaller fraction. CPUWeight=100 is the default, but I wrote it explicitly to make it easier for users to see how the split is done. So effectively this should result in session.slice getting as much power as it needs. If if turns out that this does have a noticable overhead, we could make it opt-in. But I think that the benefit to usability is important enough to enable it by default. W/o something like this the session is not really usable with background tasks.
2022-07-05tree-wide: add global ascii_isdigit() + ascii_isalpha()Lennart Poettering25-89/+68
We now have a local implementation in string-util-fundamental.c, but it's useful at a lot of other places, hence let's give it a more expressive name and share it across the tree. Follow-up for: 8d9156660d6958c8d63b1d44692968f1b5d33920
2022-07-05sd-id128: don't allow chars > f in valid id128 valuesLennart Poettering1-4/+4
2022-07-05update TODOLennart Poettering1-0/+33
2022-07-05docs: move some stuff into "Networking" sectionLennart Poettering2-2/+2
The "Networking" section has a lonely single document listed right now, even though the "Concepts" section has two more network related docs. Move them over, let's end this loneliness.
2022-07-05tree-wide: Remove the repeated ';' from code (#23901)Li kunyu3-3/+3
2022-07-04tree-wide: link to docs.kernel.org for kernel documentationnl672040-78/+78
https://www.kernel.org/ links to https://docs.kernel.org/ for the documentation. See https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=ebc1c372850f249dd143c6d942e66c88ec610520 These URLs are shorter and nicer looking.
2022-07-04meson: Assign tests a suite based on their directoryDaan De Meyer1-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.
2022-07-04tests: verify that Lock D-Bus signal is sent when IdleAction=lockMichal Sekletar2-0/+91
2022-07-04test: Introduce systemd-resolved test suiteFrantisek Sumsal11-0/+545
Resolves: #19599
2022-07-04test: resize the terminal automagically with INTERACTIVE_DEBUG=yesFrantisek Sumsal1-7/+5
2022-07-04test: install /usr/libexec/vi as wellFrantisek Sumsal1-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.
2022-07-02test: copy libgcc_s.so.1 to TPM2 test image on Debian-like systemsNick Rosbrook1-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.
2022-07-02man/network: fix wording and syntaxZbigniew Jędrzejewski-Szmek1-5/+5
Follow-up for 0bcc6557fbba32ebcdf323e76688ced50e3c8d8e. Docbook doesn't know <variable>.
2022-07-02test-list: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek1-163/+163
With this commit, lists are generally either names with plural (items), or in a way that indicates a multi-item container (queue, *_list, or similar).
2022-07-02systemctl: rename field for clarityZbigniew Jędrzejewski-Szmek1-7/+7
2022-07-02udev: rename fieldZbigniew Jędrzejewski-Szmek1-6/+4
When we start, the contents of the variable match the name. But then in the loop, the variable doesn't point at the old head any more. So let's rename it to something with a plural.
2022-07-02sd-event: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek1-6/+6
2022-07-02sd-event: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek1-7/+7
2022-07-02sd-event: align tableZbigniew Jędrzejewski-Szmek1-11/+11
2022-07-02resolved: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek4-10/+10
2022-07-02basic/list: drop LIST_IS_EMPTYZbigniew Jędrzejewski-Szmek14-29/+23
This was a trivial wrapper that didn't provide any added value. With more complicated structures like strvs, hashmaps, sets, and arrays, it is possible to have an empty container. But in case of a list, the list is empty only when the head is missing. Also, we generally want the positive condition, so we replace many if (!LIST_IS_EMPTY(x)) with just if (x).
2022-07-02homework: silence gcc warningZbigniew Jędrzejewski-Szmek1-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.
2022-07-02debug-generator: shorten code a bitYu Watanabe1-6/+0
2022-07-02tree-wide: use html links for kernel docsZbigniew Jędrzejewski-Szmek19-43/+38
Instead of using "*.txt" as reference name, use the actual destination title.
2022-07-01test: add a simple test for daemon-reexecFrantisek Sumsal1-0/+4
2022-07-01core: do not filter out systemd.unit= and run-level specifier from kernel ↵Yu Watanabe1-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.
2022-07-01unit: prioritize module devicesYu Watanabe1-1/+1
Also, prioritize tty and network devices. Follow-up for 2336bde96420475ccb054326f27290fa0228f27d Fixes #23850.
2022-07-01sd-journal: silence bogus gcc warningZbigniew Jędrzejewski-Szmek2-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.
2022-07-01build(deps): bump meson from 0.62.0 to 0.62.2 in /.github/workflowsdependabot[bot]1-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>
2022-07-01build(deps): bump github/codeql-action from 2.1.6 to 2.1.15dependabot[bot]1-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>
2022-07-01journalctl: fix to show user sliceYu Watanabe1-1/+1
Fixes #23867.
2022-07-01units: add IgnoreOnIsolate=yes to systemd-journald tooZbigniew Jędrzejewski-Szmek3-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.
2022-06-30logind: log wall messages to the journalZbigniew Jędrzejewski-Szmek3-14/+35
Currently kde installs a fake utmp session to listen for this. This provides an alternative mechanism as discussed in #23574. Example with 'shutdown 6 -r' and shutdown -c': PRIORITY=6 SYSLOG_FACILITY=4 SYSLOG_IDENTIFIER=systemd-logind ... CODE_FILE=src/login/logind-utmp.c CODE_LINE=90 CODE_FUNC=warn_wall MESSAGE_ID=9e7066279dc8403da79ce4b1a69064b2 OPERATOR=root MESSAGE=The system will reboot at Thu 2022-06-30 12:16:43 CEST! ACTION=reboot PRIORITY=5 SYSLOG_FACILITY=4 SYSLOG_IDENTIFIER=systemd-logind ... OPERATOR=root CODE_FILE=src/login/logind-dbus.c CODE_LINE=2407 CODE_FUNC=method_cancel_scheduled_shutdown MESSAGE=System shutdown has been cancelled MESSAGE_ID=249f6fb9e6e2428c96f3f0875681ffa3 ACTION=reboot
2022-06-30logind: remember our idle state and use it to detect idle level transitionsMichal Sekletar2-4/+20
Fixes #16391