]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
22 months agotest-network: extend timeout for DHCP lease to be expired
Yu Watanabe [Sun, 10 Jul 2022 21:54:40 +0000 (23:54 +0200)] 
test-network: extend timeout for DHCP lease to be expired

Fixes #23964.

22 months agotree-wide: trivial tweaks
Lennart Poettering [Mon, 11 Jul 2022 13:10:38 +0000 (15:10 +0200)] 
tree-wide: trivial tweaks

22 months agoupdate TODO
Lennart Poettering [Fri, 8 Jul 2022 16:05:12 +0000 (18:05 +0200)] 
update TODO

22 months agomkosi: update to latest main
Luca Boccassi [Mon, 11 Jul 2022 10:08:14 +0000 (11:08 +0100)] 
mkosi: update to latest main

Fix build failure on SUSE Tumbleweed due to config changes

22 months agoMerge pull request #23962 from keszybz/taint-flag-support-ended
Luca Boccassi [Sun, 10 Jul 2022 21:42:56 +0000 (22:42 +0100)] 
Merge pull request #23962 from keszybz/taint-flag-support-ended

Taint flag "support-ended"

22 months agomanager: add taint flag "support-ended" 23962/head
Zbigniew Jędrzejewski-Szmek [Sat, 9 Jul 2022 16:00:33 +0000 (18:00 +0200)] 
manager: add taint flag "support-ended"

In the welcome line, use NAME= as the fallback for PRETTY_NAME=.
PRETTY_NAME= doesn't have to be set, but NAME= should.

Example output:
---
Welcome to Fedora Linux 37 (Rawhide Prerelease)!

[  !!  ] This OS version (Fedora Linux 37 (Rawhide Prerelease)) is past its end-of-support date (1999-01-01)
Queued start job for default target graphical.target.
[  OK  ] Created slice system-getty.slice.
---

22 months agoman: update the description of taint flags
Zbigniew Jędrzejewski-Szmek [Sat, 9 Jul 2022 15:42:07 +0000 (17:42 +0200)] 
man: update the description of taint flags

We had a description in README, and an outdated list in the man page.
I think we should keep a reference-style list in the man page. The description
in README is more free-form.

22 months agoman: redefine SUPPORT_END= to mean one day earlier
Zbigniew Jędrzejewski-Szmek [Sat, 9 Jul 2022 15:50:36 +0000 (17:50 +0200)] 
man: redefine SUPPORT_END= to mean one day earlier

I thought it would be nice to specify the last day of support, because I
thought it'd seem more natural. But in practice this doesn't work well, because
such a truncated timestamp is usually taken to mean midnight that starts the
given date. I.e. 2011-12-13 is a shorthand for 2011-12-13 00:00:00 and not
2011-12-13 23:59:59.999999999999. Let's instead specify that the given date is
the first unsupported day, which is meaningful for humans, and let the computer
treat it as midnight, which gives consistent interpratation.

22 months agoresolve: introduce FORMAT_DNS_RCODE() macro
Yu Watanabe [Sat, 9 Jul 2022 06:56:50 +0000 (15:56 +0900)] 
resolve: introduce FORMAT_DNS_RCODE() macro

Fixes #23958.

22 months agoMerge pull request #23959 from yuwata/test-network
Frantisek Sumsal [Sat, 9 Jul 2022 08:21:32 +0000 (08:21 +0000)] 
Merge pull request #23959 from yuwata/test-network

test-network: several performance improvements

22 months agotest-network: use wait_operstate() at one more place 23959/head
Yu Watanabe [Sat, 9 Jul 2022 03:20:11 +0000 (12:20 +0900)] 
test-network: use wait_operstate() at one more place

22 months agotest-network: suppress periodic output in wait_operstate()
Yu Watanabe [Sat, 9 Jul 2022 03:19:52 +0000 (12:19 +0900)] 
test-network: suppress periodic output in wait_operstate()

22 months agotest-network: disable debugging logs from networkctl, resolvectl, and so on
Yu Watanabe [Sat, 9 Jul 2022 02:59:38 +0000 (11:59 +0900)] 
test-network: disable debugging logs from networkctl, resolvectl, and so on

22 months agotest-network: merge two DHCPv6 client tests
Yu Watanabe [Sat, 9 Jul 2022 01:13:33 +0000 (10:13 +0900)] 
test-network: merge two DHCPv6 client tests

22 months agotest-network: replace sleep with wait_address() and wait_address_dropped()
Yu Watanabe [Sat, 9 Jul 2022 01:07:17 +0000 (10:07 +0900)] 
test-network: replace sleep with wait_address() and wait_address_dropped()

22 months agotest-network: merge two more tests with test_dhcp_client_ipv4_only
Yu Watanabe [Sat, 9 Jul 2022 01:01:51 +0000 (10:01 +0900)] 
test-network: merge two more tests with test_dhcp_client_ipv4_only

22 months agotest-network: merge tests for UseDNS=
Yu Watanabe [Sat, 9 Jul 2022 00:49:20 +0000 (09:49 +0900)] 
test-network: merge tests for UseDNS=

22 months agotest-network: merge two IPv4LL tests
Yu Watanabe [Fri, 8 Jul 2022 23:58:48 +0000 (08:58 +0900)] 
test-network: merge two IPv4LL tests

22 months agotest-network: drop test_dhcp_client_ipv4_ipv6
Yu Watanabe [Fri, 8 Jul 2022 23:10:08 +0000 (08:10 +0900)] 
test-network: drop test_dhcp_client_ipv4_ipv6

As the test is covered by test_dhcp_client_reuse_address_as_static.

22 months agosd-dhcp-client: fix log message
Yu Watanabe [Fri, 8 Jul 2022 22:52:11 +0000 (07:52 +0900)] 
sd-dhcp-client: fix log message

22 months agotest-network: check DHCPv4 address in more detail
Yu Watanabe [Fri, 8 Jul 2022 22:40:06 +0000 (07:40 +0900)] 
test-network: check DHCPv4 address in more detail

Also, this drops redundant address check through networkctl.

22 months agotest-network: drop 25-dhcp-v4-server-veth-peer.network
Yu Watanabe [Fri, 8 Jul 2022 22:15:37 +0000 (07:15 +0900)] 
test-network: drop 25-dhcp-v4-server-veth-peer.network

22 months agotest-network: drop meaningless test
Yu Watanabe [Fri, 8 Jul 2022 22:03:31 +0000 (07:03 +0900)] 
test-network: drop meaningless test

On DHCPv6 lease renew, the kernel do not drop static routes, and hence
we do not try to reassign them. Hence, the test is mostly meaningless.

22 months agotest-network: introduce read_dnsmasq_log_file() helper function
Yu Watanabe [Fri, 8 Jul 2022 21:34:20 +0000 (06:34 +0900)] 
test-network: introduce read_dnsmasq_log_file() helper function

This reduces the number of times that the log file is read.
Also, dropped unnecessary dump of the log file.

22 months agotest-network: shorten sleep time a bit
Yu Watanabe [Fri, 8 Jul 2022 21:22:39 +0000 (06:22 +0900)] 
test-network: shorten sleep time a bit

Network interfaces will be ready after lease is acquired.
Hence, it is not necessary to wait more than lease time.

22 months agotest-network: introduce read_link_state_file() helper function
Yu Watanabe [Fri, 8 Jul 2022 21:17:46 +0000 (06:17 +0900)] 
test-network: introduce read_link_state_file() helper function

22 months agonetwork: drop redundant warning
Yu Watanabe [Fri, 10 Jun 2022 00:12:55 +0000 (09:12 +0900)] 
network: drop redundant warning

If file is world readable, then `read_full_file_full()` will warn
about that.

22 months agoMerge pull request #23940 from yuwata/core-extract-first-word
Luca Boccassi [Sat, 9 Jul 2022 00:09:06 +0000 (01:09 +0100)] 
Merge pull request #23940 from yuwata/core-extract-first-word

core: fix error value in log_syntax()

22 months agoMerge pull request #23731 from bluca/bootctl_image
Luca Boccassi [Fri, 8 Jul 2022 20:59:16 +0000 (21:59 +0100)] 
Merge pull request #23731 from bluca/bootctl_image

bootctl: add --root and --image

22 months agoMerge pull request #23954 from yuwata/resolve-overflow
Evgeny Vereshchagin [Fri, 8 Jul 2022 20:39:31 +0000 (23:39 +0300)] 
Merge pull request #23954 from yuwata/resolve-overflow

resolve: fix heap-buffer-overflow

22 months agocore/cgroup: drop unnecessary else 23940/head
Yu Watanabe [Thu, 7 Jul 2022 21:22:59 +0000 (06:22 +0900)] 
core/cgroup: drop unnecessary else

22 months agocore: shorten code a bit
Yu Watanabe [Thu, 7 Jul 2022 21:20:03 +0000 (06:20 +0900)] 
core: shorten code a bit

22 months agocore/load-fragment: fix error value in log_syntax()
Yu Watanabe [Thu, 7 Jul 2022 21:10:36 +0000 (06:10 +0900)] 
core/load-fragment: fix error value in log_syntax()

`extract_first_word()` may return positive value on success.

22 months agotest: start test user session before idle action setting is changed
Yu Watanabe [Fri, 8 Jul 2022 11:22:40 +0000 (20:22 +0900)] 
test: start test user session before idle action setting is changed

Otherwise, idle action may be triggered before starting the test user
session.

This also introduce create_session() and cleanup_session() helper
functions.

Fixes #23952.

22 months agoUpdate TODO 23731/head
Luca Boccassi [Sun, 12 Jun 2022 23:22:46 +0000 (00:22 +0100)] 
Update TODO

22 months agobootctl: add --install-source=auto|image|host
Luca Boccassi [Sun, 12 Jun 2022 23:21:41 +0000 (00:21 +0100)] 
bootctl: add --install-source=auto|image|host

When using --root=/--image= the binaries to install/update will be
picked from the directory/image. Add an option to let the caller
choose.
By default (auto) the image is tried first, and if nothing is found
then the host. The other options allow to strictly try the image
or host and ignore the other.

22 months agobootctl: add --root and --image
Luca Boccassi [Sun, 12 Jun 2022 23:01:02 +0000 (00:01 +0100)] 
bootctl: add --root and --image

Operate on image/directory, and also take files to install from it

22 months agomac: rework labelling code to be simpler, and less racy
Lennart Poettering [Fri, 8 Jul 2022 08:05:57 +0000 (10:05 +0200)] 
mac: rework labelling code to be simpler, and less racy

This merges the various labelling calls into a single label_fix_full(),
which can operate on paths, on inode fds, and in a dirfd/fname style
(i.e. like openat()). It also systematically separates the path to look
up in the db from the path we actually use to reference the inode to
relabel.

This then ports tmpfiles over to labelling by fd. This should make the
code a bit less racy, as we'll try hard to always operate on the very
same inode, pinning it via an fd.

User-visibly the behaviour should not change.

22 months agotmpfiles: take error code from "errno" earlier
Lennart Poettering [Fri, 8 Jul 2022 08:00:20 +0000 (10:00 +0200)] 
tmpfiles: take error code from "errno" earlier

This uses RET_NERRNO to more quickly pull the error code we see into
"r" out of "errno".

This does not change anything really. The only reason to do this is
because it is harder to break this accidentally. The thing is that
"errno" is easily set as side-effect of arbitrary functions. Thus, if we
rely on it being set for long code paths, we need to make carefully sure
that no code in between calls any function that might corrupt it as
side-effect. As far as I can see we did get this right. Nonetheless, I
think we should just store the value in "r" instead, to make it easier
to maintain this in the long run, if more code is inserted one day, who
knows.

22 months agoMerge pull request #23946 from poettering/tmpfiles-extrat-dir-fn
Lennart Poettering [Fri, 8 Jul 2022 14:10:42 +0000 (16:10 +0200)] 
Merge pull request #23946 from poettering/tmpfiles-extrat-dir-fn

tmpfiles: port from basename()/dirname() → path_extract_direcory()/path_extract_filename()

22 months agomkdir-label: don't use mkdirat_errno_wrapper() without reason
Lennart Poettering [Thu, 7 Jul 2022 21:22:04 +0000 (23:22 +0200)] 
mkdir-label: don't use mkdirat_errno_wrapper() without reason

mkdirat_errno_wrapper(x,y,z) is identical to RET_NERRNO(mkdirat(x, y,
z)). Let's always use the latter when we can, because easier to read,
shorter.

The only reason to have mkdirat_errno_wrapper() at all is so that we can
pass a function pointer to it around. Otherwise, let's not use it.

22 months agotime-util: fix buffer-over-run
Yu Watanabe [Thu, 7 Jul 2022 09:27:02 +0000 (18:27 +0900)] 
time-util: fix buffer-over-run

Fixes #23928.

22 months agosmack: catch more types of 'not supported' errors
Lennart Poettering [Thu, 7 Jul 2022 22:08:22 +0000 (00:08 +0200)] 
smack: catch more types of 'not supported' errors

22 months agotmpfiles: shorten code a bit
Lennart Poettering [Fri, 8 Jul 2022 08:05:39 +0000 (10:05 +0200)] 
tmpfiles: shorten code a bit

22 months agoresolve: fix possible integer overflow 23954/head
Yu Watanabe [Fri, 8 Jul 2022 13:13:24 +0000 (22:13 +0900)] 
resolve: fix possible integer overflow

22 months agotest-network: merge DHCP client tests to improve performance
Yu Watanabe [Fri, 8 Jul 2022 07:32:38 +0000 (16:32 +0900)] 
test-network: merge DHCP client tests to improve performance

22 months agoresolve: fix heap-buffer-overflow reported by ASAN with strict_string_checks=1
Yu Watanabe [Fri, 8 Jul 2022 13:00:58 +0000 (22:00 +0900)] 
resolve: fix heap-buffer-overflow reported by ASAN with strict_string_checks=1

Fixes #23942.

22 months agoMerge pull request #23943 from poettering/tmpfiles-errno-fix
Zbigniew Jędrzejewski-Szmek [Fri, 8 Jul 2022 12:50:18 +0000 (14:50 +0200)] 
Merge pull request #23943 from poettering/tmpfiles-errno-fix

two errno variable fixes

22 months agotmpfiles: port from dirname/basename to path_extract_directory/filename() 23946/head
Lennart Poettering [Thu, 7 Jul 2022 22:15:09 +0000 (00:15 +0200)] 
tmpfiles: port from dirname/basename to path_extract_directory/filename()

let's use our better, newer internal APIs for these purposes. This gets us
two things: safer handling when the root dir is specified, and better
handling of paths with trailing slashes, as we can refuse them whenever
a directory is not acceptable.

22 months agopath-util: NULL strings are definitely not valid paths
Lennart Poettering [Thu, 7 Jul 2022 21:19:12 +0000 (23:19 +0200)] 
path-util: NULL strings are definitely not valid paths

Let's make this functions that check validity of paths a bit more
friendly towards one specific kind of invalid path: a NULL pointer.

This follows similar logic in path_is_valid(), path_is_normalized() and
so on.

22 months agoupdate TODO
Lennart Poettering [Thu, 7 Jul 2022 21:18:38 +0000 (23:18 +0200)] 
update TODO

22 months agotmpfiles: correct error variable to use 23943/head
Lennart Poettering [Fri, 8 Jul 2022 07:59:57 +0000 (09:59 +0200)] 
tmpfiles: correct error variable to use

22 months agonamespace: fix propagated error number
Lennart Poettering [Thu, 7 Jul 2022 21:20:31 +0000 (23:20 +0200)] 
namespace: fix propagated error number

22 months agoMerge pull request #23941 from yuwata/test-60-improve-performance
Frantisek Sumsal [Fri, 8 Jul 2022 07:24:52 +0000 (07:24 +0000)] 
Merge pull request #23941 from yuwata/test-60-improve-performance

test: performance improvement for TEST-60

22 months agotest: use timeout command to improve performance 23941/head
Yu Watanabe [Thu, 7 Jul 2022 22:00:42 +0000 (07:00 +0900)] 
test: use timeout command to improve performance

c.f. #23723.

22 months agotest: remove /failed and /testok before running test script
Yu Watanabe [Thu, 7 Jul 2022 22:00:02 +0000 (07:00 +0900)] 
test: remove /failed and /testok before running test script

22 months agoMerge pull request #23937 from mrc0mmand/test-tweaks
Yu Watanabe [Thu, 7 Jul 2022 21:25:57 +0000 (06:25 +0900)] 
Merge pull request #23937 from mrc0mmand/test-tweaks

Several ASan-related test suite tweaks

22 months agoMerge pull request #23939 from mrc0mmand/TEST-70-fix-cleanup
Yu Watanabe [Thu, 7 Jul 2022 20:44:12 +0000 (05:44 +0900)] 
Merge pull request #23939 from mrc0mmand/TEST-70-fix-cleanup

Fix cleanup in TEST-70-TPM2

22 months agotest: use PBKDF2 with capped iterations instead of Argon2 23937/head
Frantisek Sumsal [Thu, 7 Jul 2022 15:16:31 +0000 (17:16 +0200)] 
test: use PBKDF2 with capped iterations instead of Argon2

to reduce the amount of resources the test needs (similarly to TEST-24
where we do the same thing).

22 months agotest: make TEST-64 a bit more ASan friendly
Frantisek Sumsal [Thu, 7 Jul 2022 14:56:42 +0000 (16:56 +0200)] 
test: make TEST-64 a bit more ASan friendly

Reduce the number of iterations in some of the test cases, since they
generate a huge amount of uevents and basically DoS udev (which can't
keep up while being slowed down by ASan). To avoid this, let's reduce
the number of iterations and bump the timeout when running under ASan,
since we're not interested in performance in such cases.

22 months agotest: avoid overriding an already existing EXIT handler 23939/head
Frantisek Sumsal [Thu, 7 Jul 2022 18:02:06 +0000 (20:02 +0200)] 
test: avoid overriding an already existing EXIT handler

TEST-70 specified its own EXIT handler, which replaced the
`cleanup_loopdev` handler, so the loop device was always hanging around
once this test was run. Let's use the new `add_at_exit_handler()` stuff
to mitigate this.

22 months agotest: allow multiple handlers for the EXIT signal
Frantisek Sumsal [Thu, 7 Jul 2022 18:00:46 +0000 (20:00 +0200)] 
test: allow multiple handlers for the EXIT signal

Bash allows only one handler per signal, so let's overcome this
limitation by having one dedicated EXIT signal which runs all registered
handlers from all over the place.

22 months agotest: bump the data partition size if we don't strip binaries
Frantisek Sumsal [Thu, 7 Jul 2022 12:13:32 +0000 (14:13 +0200)] 
test: bump the data partition size if we don't strip binaries

so we can run TEST-24 under sanitizers as well.

Also, when at it, use the 'named-fields' sfdisk format to make the code
a bit more descriptive without needing a manual.

22 months agotest: create an ASan wrapper for `getent` and `su`
Frantisek Sumsal [Thu, 7 Jul 2022 12:12:38 +0000 (14:12 +0200)] 
test: create an ASan wrapper for `getent` and `su`

since they "suffer" from the same issue as `login` and other binaries
that load PAM stuff

22 months agoMerge pull request #23931 from yuwata/systemctl-color-log
Frantisek Sumsal [Thu, 7 Jul 2022 13:15:59 +0000 (13:15 +0000)] 
Merge pull request #23931 from yuwata/systemctl-color-log

systemctl: colorize logs

22 months agotest: several cleanups for TEST-35-LOGIN
Yu Watanabe [Thu, 7 Jul 2022 01:10:05 +0000 (10:10 +0900)] 
test: several cleanups for TEST-35-LOGIN

- use test_append_files() to install additional commands
- drop use of expect
- include assert.sh and use assertions at several places
- use timeout command at several places
- always use logind-test-user
- etc

22 months agoresolvectl man page: Word correction
Frank Dana [Thu, 7 Jul 2022 10:56:04 +0000 (06:56 -0400)] 
resolvectl man page: Word correction

22 months agoMerge pull request #23932 from medhefgo/boot-misc
Yu Watanabe [Thu, 7 Jul 2022 10:59:05 +0000 (19:59 +0900)] 
Merge pull request #23932 from medhefgo/boot-misc

boot: Miscellaneous cleanups

22 months agoboot: Use UEFI protocol struct names 23932/head
Jan Janssen [Thu, 7 Jul 2022 08:24:14 +0000 (10:24 +0200)] 
boot: Use UEFI protocol struct names

These are somewhat pointless gnu-efi typedefs. Using the names from the
UEFI spec makes things clearer.

The one exception left is EFI_FILE as we use it a lot and
EFI_FILE_PROTOCOL is quite a handful.

22 months agoboot: Use typedef for PE structs
Jan Janssen [Thu, 7 Jul 2022 08:16:26 +0000 (10:16 +0200)] 
boot: Use typedef for PE structs

22 months agoboot: Constify PE sections type
Jan Janssen [Mon, 20 Jun 2022 11:43:47 +0000 (13:43 +0200)] 
boot: Constify PE sections type

22 months agoboot: Use void for base pointer
Jan Janssen [Mon, 20 Jun 2022 11:10:41 +0000 (13:10 +0200)] 
boot: Use void for base pointer

22 months agoboot: Use open_volume when creating cpio
Jan Janssen [Tue, 5 Jul 2022 08:28:30 +0000 (10:28 +0200)] 
boot: Use open_volume when creating cpio

22 months agosystemctl: drop color settings in log message 23931/head
Yu Watanabe [Thu, 7 Jul 2022 07:31:58 +0000 (16:31 +0900)] 
systemctl: drop color settings in log message

`log_warning()` colorize the message gracefully.

22 months agosystemctl: enable colorized logging by default
Yu Watanabe [Thu, 7 Jul 2022 07:38:54 +0000 (16:38 +0900)] 
systemctl: enable colorized logging by default

22 months agoMerge pull request #23569 from msekletar/pam-systemd-no-user-systemd
Yu Watanabe [Thu, 7 Jul 2022 01:33:21 +0000 (10:33 +0900)] 
Merge pull request #23569 from msekletar/pam-systemd-no-user-systemd

Don't spawn systemd --user instance for background (i.e. cron) sessions

22 months agoNEWS: mention change in default behavior of background sessions 23569/head
Michal Sekletar [Mon, 30 May 2022 13:13:13 +0000 (15:13 +0200)] 
NEWS: mention change in default behavior of background sessions

22 months agotests: add test for handling of background sessions
Michal Sekletar [Tue, 21 Jun 2022 16:41:46 +0000 (18:41 +0200)] 
tests: add test for handling of background sessions

22 months agologind: don't start user@UID.service instance for background sessions
Michal Sekletar [Fri, 27 May 2022 19:11:37 +0000 (21:11 +0200)] 
logind: don't start user@UID.service instance for background sessions

We have had background session class for a long time (since commit
e2acb67baa), but so far the only difference in handling of background
sessions was logging, i.e. we log some messages with LOG_DEBUG for such
sessions.

Previously there were complains [1] about excessive logging for each
time cron session is started. We used to advise user to enable lingering
for users if they want to avoid these log messages. However, on servers
with a lot of users the extra processes that result from lingering just
adds too much overhead. Hence I think that our current handling of
background sessions is not ideal and we should make better use of this
attribute.

This commit introduces a change in default behavior of logind. Logind is
now not going to start user instance of systemd when background session
is created and that should address excessive logging problem for cron
where background class is used by default. When the same user actually
logs in normally then user instance will be started as previously.

Also note that PAM_TTY variable is now always set to some value for PAM
sessions started via PAMName= option. Otherwise we would categorize such
sessions as "background" and user manager won't be started.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1825942

22 months agotest: fix typo
Yu Watanabe [Thu, 7 Jul 2022 00:33:11 +0000 (09:33 +0900)] 
test: fix typo

22 months agoTODO: fix typo
Yu Watanabe [Thu, 7 Jul 2022 00:31:43 +0000 (09:31 +0900)] 
TODO: fix typo

22 months agoMerge pull request #23396 from msekletar/fix-idle-action-lock
Yu Watanabe [Wed, 6 Jul 2022 22:42:51 +0000 (07:42 +0900)] 
Merge pull request #23396 from msekletar/fix-idle-action-lock

logind: remember our idle state and use it to detect idle level transitions

22 months agoos-release: define SUPPORT_END=
Zbigniew Jędrzejewski-Szmek [Wed, 6 Jul 2022 15:19:27 +0000 (17:19 +0200)] 
os-release: define SUPPORT_END=

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.

22 months agoMerge pull request #23918 from yuwata/dissect
Luca Boccassi [Wed, 6 Jul 2022 20:31:04 +0000 (21:31 +0100)] 
Merge pull request #23918 from yuwata/dissect

Revert "dissect: ID from os-release should be non-empty, not just non-NULL"

22 months agofundamental: adjust #if conditional for _fallthrough_ for clang
Thomas Haller [Wed, 6 Jul 2022 12:50:50 +0000 (14:50 +0200)] 
fundamental: adjust #if conditional for _fallthrough_ for clang

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')
22 months agoMerge pull request #15205 from jlebon/pr/preset-all-firstboot
Zbigniew Jędrzejewski-Szmek [Wed, 6 Jul 2022 17:11:01 +0000 (19:11 +0200)] 
Merge pull request #15205 from jlebon/pr/preset-all-firstboot

manager: optionally, do a full preset on first boot

22 months agomkosi: Update to latest release
Daan De Meyer [Wed, 6 Jul 2022 11:08:13 +0000 (13:08 +0200)] 
mkosi: Update to latest release

This fixes the mkosi github action to unbreak the mkosi CI

22 months agoman: "enabled commands are started at boot" is rubbish
Lennart Poettering [Wed, 6 Jul 2022 11:14:20 +0000 (13:14 +0200)] 
man: "enabled commands are started at boot" is rubbish

it's enabled units, and they might be started by various forms of
activation, not just "at boot".

Fix that.

22 months agoupdate TODO
Lennart Poettering [Wed, 6 Jul 2022 11:13:03 +0000 (13:13 +0200)] 
update TODO

22 months agodissect: refuse empty release ID 23918/head
Yu Watanabe [Wed, 6 Jul 2022 10:16:24 +0000 (19:16 +0900)] 
dissect: refuse empty release ID

22 months agoRevert "dissect: ID from os-release should be non-empty, not just non-NULL"
Yu Watanabe [Wed, 6 Jul 2022 05:38:23 +0000 (14:38 +0900)] 
Revert "dissect: ID from os-release should be non-empty, not just non-NULL"

This reverts commit a2cf73f0b602a93a32107cfc066a5e307263c577.

This is not necessary after 78ab2b5064a0f87579ce5430f9cb83bba0db069a.

Addresses https://github.com/systemd/systemd/pull/23454#discussion_r913611798.

22 months agoMerge pull request #23916 from keszybz/assorted-patches
Yu Watanabe [Wed, 6 Jul 2022 05:15:50 +0000 (14:15 +0900)] 
Merge pull request #23916 from keszybz/assorted-patches

Assorted patches

22 months agojson: actually use numeric C locale we just allocated
Lennart Poettering [Tue, 5 Jul 2022 14:27:09 +0000 (16:27 +0200)] 
json: actually use numeric C locale we just allocated

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?)

22 months agojournal: Make sd_journal_previous/next() return 0 at HEAD/TAIL
Daan De Meyer [Tue, 5 Jul 2022 13:22:01 +0000 (15:22 +0200)] 
journal: Make sd_journal_previous/next() return 0 at HEAD/TAIL

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

22 months agodocs: normalize uppercasing of titles of network doc
Lennart Poettering [Tue, 5 Jul 2022 12:14:23 +0000 (14:14 +0200)] 
docs: normalize uppercasing of titles of network doc

22 months agotree-wide: drop duplicated semicolons 23916/head
Zbigniew Jędrzejewski-Szmek [Tue, 5 Jul 2022 19:48:55 +0000 (21:48 +0200)] 
tree-wide: drop duplicated semicolons

22 months agoman: fix link to glob(3)
Zbigniew Jędrzejewski-Szmek [Mon, 4 Jul 2022 17:59:06 +0000 (19:59 +0200)] 
man: fix link to glob(3)

22 months agofuzz: rename samples to avoid long test names
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 15:43:29 +0000 (17:43 +0200)] 
fuzz: rename samples to avoid long test names

22 months agoMerge pull request #23855 from keszybz/drop-list-is-empty
Lennart Poettering [Tue, 5 Jul 2022 15:29:53 +0000 (17:29 +0200)] 
Merge pull request #23855 from keszybz/drop-list-is-empty

basic/list: drop LIST_IS_EMPTY

22 months agofirstboot: Don't skip passwd/shadow logic if only one of the files exists
Daan De Meyer [Tue, 5 Jul 2022 12:53:45 +0000 (14:53 +0200)] 
firstboot: Don't skip passwd/shadow logic if only one of the files exists

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.