]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 weeks agonetwork/ndisc: add basic support for Redirect message
Yu Watanabe [Fri, 23 Feb 2024 03:03:26 +0000 (12:03 +0900)] 
network/ndisc: add basic support for Redirect message

Closes #31438.

6 weeks agosd-ndisc: add basic support of Redirect message
Yu Watanabe [Thu, 22 Feb 2024 03:31:49 +0000 (12:31 +0900)] 
sd-ndisc: add basic support of Redirect message

This makes sd-ndisc support Redirect message defined in RFC 4861.

6 weeks agonetwork/ndisc: remember the latest RA from the default router
Yu Watanabe [Fri, 23 Feb 2024 02:42:33 +0000 (11:42 +0900)] 
network/ndisc: remember the latest RA from the default router

The remembered RA will be used later. Preparation for later commits.

6 weeks agoMerge pull request #31373 from yuwata/network-neighbor-advertisement
Yu Watanabe [Thu, 4 Apr 2024 20:54:12 +0000 (05:54 +0900)] 
Merge pull request #31373 from yuwata/network-neighbor-advertisement

network: add basic support of neighbor advertisement

6 weeks agoudevadm-test: also show security labels if specified
Yu Watanabe [Wed, 3 Apr 2024 20:06:39 +0000 (05:06 +0900)] 
udevadm-test: also show security labels if specified

Follow-up for 03b6879f4d45c49264708aef872fd05af30ddcf0.

6 weeks agobacklight: fix detection of multiple graphic cards
Yu Watanabe [Wed, 3 Apr 2024 20:45:11 +0000 (05:45 +0900)] 
backlight: fix detection of multiple graphic cards

Follow-up for e0504dd011189d97a1ea813aabfe1e696742bcf5.

Hopefully, devices in PCI subsystem have some properties, thus have
their udev database file. But, that may not be true. Here, we only read
sysattrs of enumerated devices, hence it is not necessary to check if
the device is initialized or not.

6 weeks agoudev: do not update sysattr and sysctl value on testing
Yu Watanabe [Wed, 3 Apr 2024 19:58:25 +0000 (04:58 +0900)] 
udev: do not update sysattr and sysctl value on testing

Follow-up for 089bef66316e5bdc91b9984148e5a6455449c1da.

6 weeks agoMerge pull request #32102 from YHNdnzj/efi-var-consistent
Luca Boccassi [Thu, 4 Apr 2024 20:21:10 +0000 (21:21 +0100)] 
Merge pull request #32102 from YHNdnzj/efi-var-consistent

Trivial follow-up for hibernate-resume

6 weeks agoman/kernel-command-line: document resume_offset= too 32102/head
Mike Yuan [Thu, 4 Apr 2024 19:02:00 +0000 (03:02 +0800)] 
man/kernel-command-line: document resume_offset= too

6 weeks agohibernate-util: say "HibernateLocation EFI variable" consistently
Mike Yuan [Thu, 4 Apr 2024 18:59:59 +0000 (02:59 +0800)] 
hibernate-util: say "HibernateLocation EFI variable" consistently

6 weeks agoudevadm-test: insert missing line break
Yu Watanabe [Thu, 4 Apr 2024 17:03:27 +0000 (02:03 +0900)] 
udevadm-test: insert missing line break

Addresses post-merge comment:
https://github.com/systemd/systemd/commit/03b6879f4d45c49264708aef872fd05af30ddcf0#r140587790

6 weeks agoTEST-50: add tests for riscv{32,64}
Zbigniew Jędrzejewski-Szmek [Thu, 4 Apr 2024 11:25:41 +0000 (13:25 +0200)] 
TEST-50: add tests for riscv{32,64}

Requested for the testing of F40 riscv bringup. Numbers copied from
https://uapi-group.org/specifications/specs/discoverable_partitions_specification/.

It'd be nice to do the same in TEST-58, but the code there is rather involved
and I don't have a system to test on. We can probably try that later on when F40
is available.

6 weeks agoFixed resolution for pen and touchpad
mkubiak [Thu, 4 Apr 2024 12:25:15 +0000 (14:25 +0200)] 
Fixed resolution for pen and touchpad

6 weeks agonetowrk/ndisc: drop NDisc configurations when received NA without Router flag 31373/head
Yu Watanabe [Wed, 14 Feb 2024 12:32:56 +0000 (21:32 +0900)] 
netowrk/ndisc: drop NDisc configurations when received NA without Router flag

Closes #28421.

6 weeks agotest-ndisc: add basic tests for Neighbor Advertisement handling
Yu Watanabe [Wed, 14 Feb 2024 12:17:00 +0000 (21:17 +0900)] 
test-ndisc: add basic tests for Neighbor Advertisement handling

6 weeks agosd-ndisc: add basic support of Neighbor Advertisement message
Yu Watanabe [Wed, 14 Feb 2024 11:39:50 +0000 (20:39 +0900)] 
sd-ndisc: add basic support of Neighbor Advertisement message

This adds basic support of receiving and parsing Neighbor Advertisement
message defined in RFC 4861.

6 weeks agocryptsetup-tokens: fix argument order mismatch in function
Antonio Alvarez Feijoo [Thu, 4 Apr 2024 15:44:52 +0000 (17:44 +0200)] 
cryptsetup-tokens: fix argument order mismatch in function

The order of the arguments of the function `acquire_luks2_key()` in
`luks2-tpm2.h` is wrong, `pcrlock_path` and `pin` are swapped.

Fixes 404aea7815595c1324947ed7f2a7502b17d3cc01

6 weeks agoMerge pull request #32097 from keszybz/sd-notify-cleanups
Luca Boccassi [Thu, 4 Apr 2024 16:44:12 +0000 (17:44 +0100)] 
Merge pull request #32097 from keszybz/sd-notify-cleanups

Small cleanups to sd_notify docs

6 weeks agoMerge pull request #32033 from DaanDeMeyer/unit-creds
Daan De Meyer [Thu, 4 Apr 2024 16:27:20 +0000 (18:27 +0200)] 
Merge pull request #32033 from DaanDeMeyer/unit-creds

debug-generator: Add unit and drop-in credentials

6 weeks agowatchdog: clarify that we set the *watchdog* timeout
Lennart Poettering [Thu, 4 Apr 2024 07:59:00 +0000 (09:59 +0200)] 
watchdog: clarify that we set the *watchdog* timeout

This makes sure we mention the word "watchdog" in every log message
related to the watchdog.

Also, this uses the expression "hardware timeout" when referring to the
primary timeout of the watchdog, as opposed to the "pretimeout".

(Not ideal wording I know, but it's preexisting to some point, I just
continued it. I think it's OK though, in particular to underline the
difference to the software watchdog logic we implement via WATCHDOG= in
sd_notify().)

Fixes: #31662
6 weeks agodebug-generator: Add unit and drop-in credentials 32033/head
Daan De Meyer [Sun, 31 Mar 2024 20:18:19 +0000 (22:18 +0200)] 
debug-generator: Add unit and drop-in credentials

These allow adding extra units and drop-ins via credentials.

6 weeks agonetwork-generator: Add logging
Daan De Meyer [Tue, 2 Apr 2024 20:52:02 +0000 (22:52 +0200)] 
network-generator: Add logging

We stick to debug logging because in some cases network-generator
will fall back to trying another parsing function if one fails, so
if we return an error it's not necessarily a failure.

6 weeks agoman: align strings in sd_notify() examples 32097/head
Zbigniew Jędrzejewski-Szmek [Thu, 4 Apr 2024 10:17:43 +0000 (12:17 +0200)] 
man: align strings in sd_notify() examples

I think this way it's easier to see that they are part of the same argument.

6 weeks agoman/notify-selfcontained-example: check argument first
Zbigniew Jędrzejewski-Szmek [Thu, 4 Apr 2024 08:57:30 +0000 (10:57 +0200)] 
man/notify-selfcontained-example: check argument first

This is just good style. In this particular case, if the argument is incorrect and
the function is not tested with $NOTIFY_SOCKET set, the user could not get the
proper error until running for real.

Also, remove mention of systemd. The protocol is fully generic on purpose.

6 weeks agoman: regenerate rules
Zbigniew Jędrzejewski-Szmek [Thu, 4 Apr 2024 10:12:25 +0000 (12:12 +0200)] 
man: regenerate rules

Fixup for dfad86b83807fa8696ca94982a5ba591b6d86a80.

6 weeks agoman: update fedora example to F40
Zbigniew Jędrzejewski-Szmek [Thu, 4 Apr 2024 07:28:55 +0000 (09:28 +0200)] 
man: update fedora example to F40

F40 will be out soon, so we can update the man page already. The example should
already work.

The cloud link was dropped in fd571c9df0ba86636401582c4ea0a8cb608e1216, so
drop the unused variable too.

6 weeks agocore/exec-invoke: replace basename() with path_extract_filename() (#32076)
Julius Alexandre [Wed, 3 Apr 2024 21:44:51 +0000 (21:44 +0000)] 
core/exec-invoke: replace basename() with path_extract_filename() (#32076)

6 weeks agovmspawn: fix error code
Yu Watanabe [Wed, 3 Apr 2024 18:20:28 +0000 (03:20 +0900)] 
vmspawn: fix error code

6 weeks agomkosi: More package updates
Daan De Meyer [Wed, 3 Apr 2024 18:48:05 +0000 (20:48 +0200)] 
mkosi: More package updates

- Install individual asan libraries instead of gcc
- Drop duplicate qrencode package from arch config
- Install dbus-user-session which provides default-dbus-session-bus
- Explicitly install dbus-broker on Arch Linux

6 weeks agosysupdate: use log_syntax() when logging about a configuration file
Lennart Poettering [Wed, 3 Apr 2024 16:48:40 +0000 (18:48 +0200)] 
sysupdate: use log_syntax() when logging about a configuration file

All code around this does this too, hence do it here as well.

Also fix plural verb form.

Follow-up for: #32018

6 weeks agoman/example: also build example code with C90
Yu Watanabe [Wed, 3 Apr 2024 17:25:57 +0000 (02:25 +0900)] 
man/example: also build example code with C90

Unfortunately, sd-bus-vtable.h, sd-journal.h, and sd-id128.h
have variadic macro and inline initialization of sub-object, these are
not supported in C90. So, we need to silence some errors.

6 weeks agomkosi: Install selinux tools in main image instead of initramfs
Daan De Meyer [Wed, 3 Apr 2024 17:44:26 +0000 (19:44 +0200)] 
mkosi: Install selinux tools in main image instead of initramfs

Also install setools-console and policycoreutils instead of setools
which pulls in the kitchen sink. Also install selinux-policy-targeted
to make sure the right policy is installed.

6 weeks agomkosi: Install git-core where possible
Daan De Meyer [Wed, 3 Apr 2024 17:38:16 +0000 (19:38 +0200)] 
mkosi: Install git-core where possible

This avoids pulling in the perl kitchen sink.

6 weeks agoRevert "kernel-install: Add kernel version to title (#31581)"
Lennart Poettering [Wed, 3 Apr 2024 16:00:04 +0000 (18:00 +0200)] 
Revert "kernel-install: Add kernel version to title (#31581)"

This reverts commit 85b774de49caff8be819f021740dd680ba76ab77.

6 weeks agoMerge pull request #32072 from YHNdnzj/no-ellipsize
Yu Watanabe [Wed, 3 Apr 2024 17:44:59 +0000 (02:44 +0900)] 
Merge pull request #32072 from YHNdnzj/no-ellipsize

core/manager: use cellescape and don't be too aggressive

6 weeks agoresolved: return ExpectedMore error if we require "more" varlink flag on method call
Lennart Poettering [Wed, 3 Apr 2024 14:46:09 +0000 (16:46 +0200)] 
resolved: return ExpectedMore error if we require "more" varlink flag on method call

Fixes: #32066
6 weeks agoMerge pull request #32043 from YHNdnzj/resume-clear-efi
Yu Watanabe [Wed, 3 Apr 2024 17:43:00 +0000 (02:43 +0900)] 
Merge pull request #32043 from YHNdnzj/resume-clear-efi

units: introduce systemd-hibernate-clear.service that clears stale HibernateLocation EFI variable

6 weeks agofuzz: check that ND options are parsed sucessfully
Evgeny Vereshchagin [Wed, 3 Apr 2024 13:55:31 +0000 (13:55 +0000)] 
fuzz: check that ND options are parsed sucessfully

At that point the options have been parsed, sent and received again so
`ndisc_parse_options` should never fail there (unless ndisc_send corrupts
them somehow).

It's a follow-up to https://github.com/systemd/systemd/pull/31807

6 weeks agoman/examples: set _GNU_SOURCE in source, rather than by compile option
Yu Watanabe [Wed, 3 Apr 2024 16:29:41 +0000 (01:29 +0900)] 
man/examples: set _GNU_SOURCE in source, rather than by compile option

Addresses https://github.com/systemd/systemd/pull/32057#issuecomment-2034408569.

6 weeks agossh-generator: create privsep dir via tmpfiles.d/ if we are told to
Lennart Poettering [Fri, 1 Mar 2024 10:25:52 +0000 (11:25 +0100)] 
ssh-generator: create privsep dir via tmpfiles.d/ if we are told to

To make it easy to have a workable ssh-generator on various distros,
let's optionally generate the ssh privsep dir via tmpfiles.d/ drop-in.

This enables the concept with a path of /run/sshd/ as default. This is
the path Debian/Ubuntu uses, and means that we just work on those
distros. Debian/Ubuntu is the only distro (apparently?) that puts the
privsep dir under /run/, hence always needs the dir to be created
manually. Other distros don't need it that much, because they place the
dir in /usr/ (fedora, best choice!) or /var/ (others, not ideal, because
still mutable).

Also adds a longer explanation about this in NEWS, in the hope that
distro maintaines read that and maybe start cleaning this up.

Alternative to: #31543

6 weeks agocore/manager: use cellescape and don't be too aggressive 32072/head
Mike Yuan [Wed, 3 Apr 2024 14:54:48 +0000 (22:54 +0800)] 
core/manager: use cellescape and don't be too aggressive

Addresses https://github.com/systemd/systemd/pull/32068#issuecomment-2034799862

6 weeks agostring-util: add missing assertion in cellescape
Mike Yuan [Wed, 3 Apr 2024 15:00:55 +0000 (23:00 +0800)] 
string-util: add missing assertion in cellescape

6 weeks agoMerge pull request #32065 from bluca/dlopen_debug
Luca Boccassi [Wed, 3 Apr 2024 15:36:35 +0000 (16:36 +0100)] 
Merge pull request #32065 from bluca/dlopen_debug

dlopen: fix bpf symbol loading check and log at debug level when loading a library

6 weeks agoMerge pull request #32019 from bluca/gcrypt_dlopen
Luca Boccassi [Wed, 3 Apr 2024 15:10:00 +0000 (16:10 +0100)] 
Merge pull request #32019 from bluca/gcrypt_dlopen

gcrypt: dlopenify for libsystemd

6 weeks agonotify-example: also send STOPPING=1 at exit
Lennart Poettering [Wed, 3 Apr 2024 13:54:49 +0000 (15:54 +0200)] 
notify-example: also send STOPPING=1 at exit

I think the example should reflect the full set of lifecycle messages,
including STOPPING=1, which tells the service manager that the service
is already terminating. This is useful for reporting this information
back to the user and to suppress repeated shutdown requests.

It's not as important as the READY=1 and RELOADING=1 messages, since we
actively wait for those from the service message if the right Type= is
set. But it's still very valuable information, easy to do, and completes
the state engine.

6 weeks agoman/kernel-command-line: be clear that resumeflags= is about timeout opts only 32043/head
Mike Yuan [Tue, 2 Apr 2024 21:38:51 +0000 (05:38 +0800)] 
man/kernel-command-line: be clear that resumeflags= is about timeout opts only

6 weeks agounits: introduce systemd-hibernate-clear.service that clears
Mike Yuan [Sun, 31 Mar 2024 12:52:39 +0000 (20:52 +0800)] 
units: introduce systemd-hibernate-clear.service that clears
stale HibernateLocation EFI variable

Currently, if the HibernateLocation EFI variable exists,
but we failed to resume from it, the boot carries on
without clearing the stale variable. Therefore, the subsequent
boots would still be waiting for the device timeout,
unless the variable is purged manually.

There's no point to keep trying to resume after a successful
switch-root, because the hibernation image state
would have been invalidated by then. OTOH, we don't
want to clear the variable prematurely either,
i.e. in initrd, since if the resume device is the same
as root one, the boot won't succeed and the user might
be able to try resuming again. So, let's introduce a
unit that only runs after switch-root and clears the var.

Fixes #32021

6 weeks agohibernate-resume: introduce --clear for clearing hibernate storage var
Mike Yuan [Sun, 31 Mar 2024 12:30:50 +0000 (20:30 +0800)] 
hibernate-resume: introduce --clear for clearing hibernate storage var

6 weeks agohibernate-resume: add options handling
Mike Yuan [Sun, 31 Mar 2024 11:47:34 +0000 (19:47 +0800)] 
hibernate-resume: add options handling

6 weeks agohibernate-resume-config: expose get_efi_hibernate_location
Mike Yuan [Wed, 3 Apr 2024 01:42:59 +0000 (09:42 +0800)] 
hibernate-resume-config: expose get_efi_hibernate_location

6 weeks agohibernate-resume: EINVAL -> ENOTBLK where appropriate
Mike Yuan [Tue, 2 Apr 2024 16:51:37 +0000 (00:51 +0800)] 
hibernate-resume: EINVAL -> ENOTBLK where appropriate

6 weeks agohibernate-util: make clear_efi_hibernate_location_and_warn return 1 if
Mike Yuan [Sun, 31 Mar 2024 12:17:14 +0000 (20:17 +0800)] 
hibernate-util: make clear_efi_hibernate_location_and_warn return 1 if
actually cleared the variable

6 weeks agodlopen: log debug message when a library is dlopened 32065/head
Luca Boccassi [Wed, 3 Apr 2024 11:07:43 +0000 (12:07 +0100)] 
dlopen: log debug message when a library is dlopened

Useful to track what is being used and when

6 weeks agobpf: actually check for errors when loading symbols
Luca Boccassi [Wed, 3 Apr 2024 11:10:10 +0000 (12:10 +0100)] 
bpf: actually check for errors when loading symbols

Also restructure ifdef to avoid confusing vscode

Follow-up for 87e462f71361a47b154865dc14032a27580dd4cb

7 weeks agoMerge pull request #32057 from yuwata/man-example
Luca Boccassi [Wed, 3 Apr 2024 12:30:43 +0000 (13:30 +0100)] 
Merge pull request #32057 from yuwata/man-example

man: add simple build test for example code

7 weeks ago99-systemd.rules: rework SYSTEMD_READY logic for device mapper
Martin Wilck [Wed, 6 Mar 2024 10:39:00 +0000 (11:39 +0100)] 
99-systemd.rules: rework SYSTEMD_READY logic for device mapper

Device mapper devices are set up in multiple steps. The first step, which
generates the initial "add" event, only creates an empty container, which is
useless for higher layers. SYSTEMD_READY should be set to 0 on this event to
avoid premature device activation.

The event that matters is the "activation" event: the first "change" event on
which DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 is not set. When this event arrives,
the device is ready for being scanned by blkid and similar tools, and for being
activated by systemd.

Intermittent events with DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 should be ignored
as far as systemd or higher-level block layers are concerned. Previous device
properties and symlinks should be preserved: the device shouldn't be scanned or
activated, but shouldn't be deactivated, either.  In particular, SYSTEM_READY
shouldn't be set to 0 if it wasn't set before, because that might cause mounted
file systems to be unmounted. Such intermittent events may occur any time,
before or after the "activation" event.

DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 can have multiple reasons. One possible reason
is that the device is suspended. There are other reasons that depend on the
device-mapper subsystem (LVM, multipath, dm-crypt, etc.).

The current systemd rule set

1) sets SYSTEMD_READY=0 if DM_UDEV_DISABLE_OTHER_RULES_FLAG is set in "add"
events;
2) imports SYSTEMD_READY from the udev db if DM_SUSPENDED is set, and jumps to systemd_end;
3) sets SYSTEMD_READY=1, otherwise.

This logic has several flaws:

* 1) can cause file systems to be unmounted if an coldplug event arrives while
a file system is suspended. This rule shouldn't be applied for coldplug events
or in general, "synthetic" add events;
* 2) evaluates DM_SUSPENDED=1, which is a device-mapper internal property.
It's wrong to infer that a device is accessible if DM_SUSPENDED=0.
The jump to systemd_end may cause properties and/or symlinks to be lost;
* 3) is superfluous, because SYSTEMD_READY=1 is equivalent with SYSTEMD_READY
being unset, and can create the wrong impression that the device was explicitly
activated.

This patch fixes the logic as follows:

- apply 1) only if DM_NAME is empty, which is only the case for the first
"genuine add" event;
- change 2) to use DM_UDEV_DISABLE_OTHER_RULES_FLAG instead of DM_SUSPENDED,
and remove the GOTO directive;
- remove 3).

Fixes: b7cf1b6 ("udev: use SYSTEMD_READY to mask uninitialized DM devices")
Fixes: 35a6750 ("rules: set SYSTEMD_READY=0 on DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 only with ADD event (#2747)")
Signed-off-by: Martin Wilck <mwilck@suse.com>
7 weeks agogcrypt: dlopenify for libsystemd 32019/head
Luca Boccassi [Fri, 29 Mar 2024 23:36:51 +0000 (23:36 +0000)] 
gcrypt: dlopenify for libsystemd

gcrypt is used only for journal sealing operations in libsystemd, so it
can be made into a dlopen dependency that is used only on demand. This
allows to reduce the footprint of libsystemd in the most common cases.

Keep systemd-pull and systemd-resolved with normal linking, as they are
executables, and usually built with OpenSSL support anyway.

7 weeks agoman/meson: add simple build test for example code 32057/head
Yu Watanabe [Tue, 2 Apr 2024 18:42:55 +0000 (03:42 +0900)] 
man/meson: add simple build test for example code

7 weeks agosd-bus-vtable: add dummy macro to support compile without GNU extension
Yu Watanabe [Wed, 3 Apr 2024 02:52:23 +0000 (11:52 +0900)] 
sd-bus-vtable: add dummy macro to support compile without GNU extension

If SD_BUS_METHOD_WITH_ARGS() is set with SD_BUS_NO_ARGS and/or SD_BUS_NO_RESULT,
then it introduces
_SD_VARARGS_FOREACH_EVEN(_SD_ECHO, NULL)
    -> _SD_VARARGS_FOREACH_SEQ(_01, …, _50, NULL)
Hence, the variadic argument `...` in _SD_VARARGS_FOREACH_SEQ() has no
argument, but it is not allowed if built without GNU extension, e.g. -std=c11.

Let's introduce one more unused dummy argument to support such situation.

7 weeks agoman/examples: fix sd- header path
Yu Watanabe [Tue, 2 Apr 2024 19:22:36 +0000 (04:22 +0900)] 
man/examples: fix sd- header path

7 weeks agoman/examples: use strerror() instead of %m
Yu Watanabe [Tue, 2 Apr 2024 18:40:05 +0000 (03:40 +0900)] 
man/examples: use strerror() instead of %m

7 weeks agoman/example: fix build failure of hwdb-usb-device.c
Yu Watanabe [Tue, 2 Apr 2024 17:21:19 +0000 (02:21 +0900)] 
man/example: fix build failure of hwdb-usb-device.c

STRLEN() and xsprintf() is our internal macros.

7 weeks agoMerge pull request #32060 from YHNdnzj/timespec-minor-cleanup
Yu Watanabe [Wed, 3 Apr 2024 04:48:56 +0000 (13:48 +0900)] 
Merge pull request #32060 from YHNdnzj/timespec-minor-cleanup

Minor cleanup for timespec/efivars

7 weeks agoefivars: minor modernization for efi_set_variable 32060/head
Mike Yuan [Sun, 31 Mar 2024 12:14:16 +0000 (20:14 +0800)] 
efivars: minor modernization for efi_set_variable

7 weeks agosignal-util: make struct timespec const
Mike Yuan [Tue, 2 Apr 2024 16:49:38 +0000 (00:49 +0800)] 
signal-util: make struct timespec const

7 weeks agotime-util: drop unneeded 'struct'
Mike Yuan [Tue, 2 Apr 2024 16:40:38 +0000 (00:40 +0800)] 
time-util: drop unneeded 'struct'

7 weeks agogit-contrib: use 'git shortlog' command
Yu Watanabe [Tue, 2 Apr 2024 16:41:07 +0000 (01:41 +0900)] 
git-contrib: use 'git shortlog' command

Also, this drops Weblate (again) and dependabot from the contributers list.

Moreover, this makes the contributers sorted by git command, rather
than sort command. Then, the authors are sorted by their first name, e.g.
- before
Xiaotian Wu, Yuri Chornoivan, Yu Watanabe, Zbigniew Jędrzejewski-Szmek,
- after
Xiaotian Wu, Yu Watanabe, Yuri Chornoivan, Zbigniew Jędrzejewski-Szmek,

Suggested-by: Matteo Croce <teknoraver@meta.com>
7 weeks agoMerge pull request #32059 from bluca/doc
Yu Watanabe [Wed, 3 Apr 2024 00:15:15 +0000 (09:15 +0900)] 
Merge pull request #32059 from bluca/doc

Docs and TODO fixes

7 weeks agotest: Always exit with 77 if we skip a test
Daan De Meyer [Tue, 2 Apr 2024 18:37:30 +0000 (20:37 +0200)] 
test: Always exit with 77 if we skip a test

Prep work for running the integration tests with meson, which requires
tests to exit with 77 to indicate they are skipped.

Note this only deals with the easy cases where there's only tests. The
hard ones where there's subtests of which only some are skipped are left
for another PR.

7 weeks agodocs: notify example was moved to sd_notify manpage 32059/head
Luca Boccassi [Tue, 2 Apr 2024 21:24:20 +0000 (22:24 +0100)] 
docs: notify example was moved to sd_notify manpage

Reference in the portability doc was forgot

Follow-up for 383917ac67570e2dccd558bcde3910a686b9f077

7 weeks agoTODO: drop line about bzip2/gzip
Luca Boccassi [Tue, 2 Apr 2024 21:22:29 +0000 (22:22 +0100)] 
TODO: drop line about bzip2/gzip

These are only used in the importd binary, which is a leaf optional
binary that also depends on libcurl, so it's not worth the
additional complications

7 weeks agoMerge pull request #32055 from mrc0mmand/pre-rc-coccinelle
Luca Boccassi [Tue, 2 Apr 2024 20:58:39 +0000 (21:58 +0100)] 
Merge pull request #32055 from mrc0mmand/pre-rc-coccinelle

Coccinelle-suggested tweaks, pre-rc edition

7 weeks agoMerge pull request #32052 from mrc0mmand/even-more-test-tweaks
Luca Boccassi [Tue, 2 Apr 2024 20:49:05 +0000 (21:49 +0100)] 
Merge pull request #32052 from mrc0mmand/even-more-test-tweaks

A couple of assorted tweaks

7 weeks agoresolve: avoid reusing 'r' for encoded packet size
Luca Boccassi [Tue, 2 Apr 2024 19:27:41 +0000 (20:27 +0100)] 
resolve: avoid reusing 'r' for encoded packet size

This is a footgun, as using r between the encoded length being
taken and it being used risks it being overwritten accidentally

7 weeks agotest: don't hide exit code of the systemd-run process 32052/head
Frantisek Sumsal [Tue, 2 Apr 2024 16:32:22 +0000 (18:32 +0200)] 
test: don't hide exit code of the systemd-run process

7 weeks agocore: correctly deserialize credentials with empty payload
Frantisek Sumsal [Tue, 2 Apr 2024 16:31:03 +0000 (18:31 +0200)] 
core: correctly deserialize credentials with empty payload

For example with SetCredential=mycred: the data payload is empty, but it
is still a valid credential.

This reorders the arguments when serializing credentials, so the
possibly empty argument is not at the end of the serialized string. This
way we can still easily use the extract_many_words() machinery, and with
the use of EXTRACT_DONT_COALESCE_SEPARATORS properly deserialize even an
empty credential. This changes LoadCredentials= as well just to keep the
code for (de)serializing both directives in sync.

7 weeks agotest: check if sd-executor doesn't complain during (de)serializing
Frantisek Sumsal [Thu, 28 Mar 2024 14:20:22 +0000 (15:20 +0100)] 
test: check if sd-executor doesn't complain during (de)serializing

This was usually caught by "accident" by other tests that parse output
of commands executed by sd-executor, so let's have an explicit check for
this.

7 weeks agotest: bump the container boot timeout when running w/o acceleration
Frantisek Sumsal [Thu, 28 Mar 2024 14:15:06 +0000 (15:15 +0100)] 
test: bump the container boot timeout when running w/o acceleration

With plain QEMU on a saturated AWS region we might just barely miss the
timeout window, causing unexpected test fails:

[  688.681324] systemd-nspawn[1332]: [  OK  ] Finished systemd-user-sessions.service.
[  689.451267] systemd-nspawn[1332]: [  OK  ] Started console-getty.service.
[  689.572874] systemd-nspawn[1332]: [  OK  ] Reached target getty.target.
[  693.634609] testsuite-74.sh[1223]: + at_exit
[  693.634609] testsuite-74.sh[1223]: + rm -fv -- /tmp/test-dump /tmp/test-usr-dump /tmp/make-dump
[  693.838395] testsuite-74.sh[1502]: removed '/tmp/test-dump'
[  693.838395] testsuite-74.sh[1502]: removed '/tmp/test-usr-dump'
[  693.838395] testsuite-74.sh[1502]: removed '/tmp/make-dump'
[  693.951114] testsuite-74.sh[670]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-74.coredump.sh failed'
[  693.951114] testsuite-74.sh[670]: Subtest /usr/lib/systemd/tests/testdata/units/testsuite-74.coredump.sh failed
[  693.951114] testsuite-74.sh[670]: + return 1
[  694.659094] systemd[1]: testsuite-74.service: Main process exited, code=exited, status=1/FAILURE
[  694.719563] systemd[1]: testsuite-74.service: Failed with result 'exit-code'.
[  694.882069] systemd[1]: Failed to start testsuite-74.service.
[  695.574445] systemd[1]: Reached target testsuite.target.
[  696.174844] systemd[1]: Starting end.service...
[  699.509408] systemd-nspawn[1332]:
[  699.509408] systemd-nspawn[1332]: CentOS Stream 9
[  699.509408] systemd-nspawn[1332]: Kernel 5.14.0-432.el9.x86_64 on an x86_64 (pts/0)
[  699.509408] systemd-nspawn[1332]:

Also, move the rest of container the setup for the user xattrs test into
the condition, since doing it without the actual test is pretty
pointless.

7 weeks agoci: fix commit SHA for stefanbuck/github-issue-parser
Frantisek Sumsal [Tue, 2 Apr 2024 14:18:54 +0000 (16:18 +0200)] 
ci: fix commit SHA for stefanbuck/github-issue-parser

The SHA for this action was updated by Dependabot in #25900 to a commit
which later disappeared from the repo. Since then Dependabot kept
(silently) failing to bump the SHA further:

updater | 2024/03/31 21:22:13 ERROR <job_807574419> Error processing stefanbuck/github-issue-parser (Dependabot::SharedHelpers::HelperSubprocessFailed)
updater | 2024/03/31 21:22:13 ERROR <job_807574419> error: no such commit c1a559d78bfb8dd05216dab9ffd2b91082ff5324

See: https://github.com/systemd/systemd/pull/25900#issuecomment-2028912672

Let's bump the SHA manually to v3.1.0 to get Dependabot back on the track.

Co-authored-by: Evgeny Vereshchagin <evvers@ya.ru>
7 weeks agoMerge pull request #32030 from bluca/dlopen_document
Luca Boccassi [Tue, 2 Apr 2024 16:18:02 +0000 (17:18 +0100)] 
Merge pull request #32030 from bluca/dlopen_document

man: document that using sd_journal APIs might cause dlopen to happen and add self-contained notify protocol example

7 weeks agotest: use free() instead of mfree() 32055/head
Frantisek Sumsal [Tue, 2 Apr 2024 16:08:50 +0000 (18:08 +0200)] 
test: use free() instead of mfree()

Since we don't use the returned value anyway.

7 weeks agosysext: use mfree() in one more place
Frantisek Sumsal [Tue, 2 Apr 2024 16:08:30 +0000 (18:08 +0200)] 
sysext: use mfree() in one more place

7 weeks agoSimplify a couple of conditions
Frantisek Sumsal [Tue, 2 Apr 2024 16:07:50 +0000 (18:07 +0200)] 
Simplify a couple of conditions

7 weeks agoUse IN_SET() more
Frantisek Sumsal [Tue, 2 Apr 2024 16:06:24 +0000 (18:06 +0200)] 
Use IN_SET() more

7 weeks agoMerge pull request #32004 from YHNdnzj/umount-new-cycle
Luca Boccassi [Tue, 2 Apr 2024 14:52:46 +0000 (15:52 +0100)] 
Merge pull request #32004 from YHNdnzj/umount-new-cycle

core/mount: if mount is gone eventually, consider it success

7 weeks agoman: add self-contained example of notify protocol 32030/head
Luca Boccassi [Sun, 31 Mar 2024 22:18:09 +0000 (23:18 +0100)] 
man: add self-contained example of notify protocol

We are saying in public that the protocl is stable and can be easily
reimplemented, so provide an example doing so in the documentation,
license as MIT-0 so that it can be copied and pasted at will.

7 weeks agoman: document that using sd_journal APIs might cause dlopen to happen
Luca Boccassi [Sun, 31 Mar 2024 13:22:54 +0000 (14:22 +0100)] 
man: document that using sd_journal APIs might cause dlopen to happen

7 weeks agoMerge pull request #32042 from YHNdnzj/implicit-mounts-for
Luca Boccassi [Tue, 2 Apr 2024 12:24:56 +0000 (13:24 +0100)] 
Merge pull request #32042 from YHNdnzj/implicit-mounts-for

units: remove one implicit RequiresMountsFor=

7 weeks agodebug-generator: Drop unnecessary include
Daan De Meyer [Sun, 31 Mar 2024 19:34:57 +0000 (21:34 +0200)] 
debug-generator: Drop unnecessary include

7 weeks agodebug-generator: Use arg_dest instead of argument
Daan De Meyer [Sun, 31 Mar 2024 19:34:46 +0000 (21:34 +0200)] 
debug-generator: Use arg_dest instead of argument

7 weeks agobuild(deps): bump systemd/mkosi
dependabot[bot] [Mon, 1 Apr 2024 09:12:59 +0000 (09:12 +0000)] 
build(deps): bump systemd/mkosi

Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 31af101620fc2996517d87e86da310f7ba553d58 to 4dfdf98ed2877a1e40f37234e0b8fbba0fec3584.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/31af101620fc2996517d87e86da310f7ba553d58...4dfdf98ed2877a1e40f37234e0b8fbba0fec3584)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
7 weeks agomkosi: Use '-' instead of '.' to separate upstream version and debian revision
Daan De Meyer [Tue, 2 Apr 2024 09:19:22 +0000 (11:19 +0200)] 
mkosi: Use '-' instead of '.' to separate upstream version and debian revision

The debian revision starts after the '-' character, so make sure the
timestamp we append is treated as the revision instead of being a part
of the upstream version.

7 weeks agobuild(deps): bump pkg/debian from `44fe1d4` to `e780b50`
dependabot[bot] [Mon, 1 Apr 2024 09:33:13 +0000 (09:33 +0000)] 
build(deps): bump pkg/debian from `44fe1d4` to `e780b50`

Bumps pkg/debian from `44fe1d4` to `e780b50`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
7 weeks agocore/mount: if mount is gone eventually, consider it success 32004/head
Mike Yuan [Thu, 28 Mar 2024 16:43:25 +0000 (00:43 +0800)] 
core/mount: if mount is gone eventually, consider it success

Currently, if unmount initiated by us fails, we record
that in result. Later, if we tried again and succeeded,
or someone else successfully unmounted it, the unit
state is still considered failed. Let's be more tolerant
instead, and forget about previous failure.

Alternative to #32002

7 weeks agocore/mount: if unmount retries exceeded max, record as failure
Mike Yuan [Thu, 28 Mar 2024 16:51:27 +0000 (00:51 +0800)] 
core/mount: if unmount retries exceeded max, record as failure

7 weeks agoman/tmpfiles.d: drop doubled space
Mike Yuan [Tue, 2 Apr 2024 09:11:47 +0000 (17:11 +0800)] 
man/tmpfiles.d: drop doubled space

7 weeks agodoc(tmpfiles.d): remove deprecated `F` type
Eisuke Kawashima [Mon, 1 Apr 2024 17:35:04 +0000 (02:35 +0900)] 
doc(tmpfiles.d): remove deprecated `F` type

close #32044

7 weeks agounits: remove implicit RequiresMountsFor= 32042/head
Mike Yuan [Mon, 1 Apr 2024 11:44:51 +0000 (19:44 +0800)] 
units: remove implicit RequiresMountsFor=

7 weeks agocore/unit: use FOREACH_ARRAY at one more place
Mike Yuan [Mon, 1 Apr 2024 11:42:02 +0000 (19:42 +0800)] 
core/unit: use FOREACH_ARRAY at one more place

7 weeks agocore/service: ensure we don't restart on SERVICE_SKIP_CONDITION
Mike Yuan [Sat, 30 Mar 2024 13:16:49 +0000 (21:16 +0800)] 
core/service: ensure we don't restart on SERVICE_SKIP_CONDITION

service_shall_restart() always returns false if result
is SERVICE_SKIP_CONDITION, so drop unreachable code.