]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agoMerge pull request #32613 from arthurzam/bash-v256
Luca Boccassi [Wed, 1 May 2024 18:27:32 +0000 (20:27 +0200)] 
Merge pull request #32613 from arthurzam/bash-v256

More shell-completions work

4 months agoshell-completion: add bash completion for systemd-vmspawn 32613/head
Arthur Zamarin [Wed, 1 May 2024 16:17:40 +0000 (19:17 +0300)] 
shell-completion: add bash completion for systemd-vmspawn

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agoshell-completion: add missing args to zsh resolvectl
Arthur Zamarin [Sat, 27 Apr 2024 19:26:12 +0000 (22:26 +0300)] 
shell-completion: add missing args to zsh resolvectl

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agoshell-completion: add missing args to bash resolvectl
Arthur Zamarin [Sat, 27 Apr 2024 19:00:18 +0000 (22:00 +0300)] 
shell-completion: add missing args to bash resolvectl

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agoshell-completion: add missing args to bash systemd-analyze
Arthur Zamarin [Sat, 27 Apr 2024 17:54:40 +0000 (20:54 +0300)] 
shell-completion: add missing args to bash systemd-analyze

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
4 months agoreboot-util: Add some basic validation on reboot arguments
Daan De Meyer [Wed, 1 May 2024 08:28:34 +0000 (10:28 +0200)] 
reboot-util: Add some basic validation on reboot arguments

Let's only accept valid ASCII and put a size limit on reboot arguments.

4 months agoMerge pull request #32611 from DaanDeMeyer/qdisc
Yu Watanabe [Wed, 1 May 2024 15:51:31 +0000 (00:51 +0900)] 
Merge pull request #32611 from DaanDeMeyer/qdisc

network/tc: Avoid concurrent set modification in tclass_drop()/qdisc_drop()

4 months agonetwork/tc: Avoid concurrent set modification in tclass_drop()/qdisc_drop() 32611/head
Daan De Meyer [Wed, 1 May 2024 12:41:41 +0000 (14:41 +0200)] 
network/tc: Avoid concurrent set modification in tclass_drop()/qdisc_drop()

With the current algorithm, we can end up removing entries from the
qdisc/tclass sets while having multiple open iterators over the sets at
various positions which leads to assertion failures in the hashmap logic
as it's only safe to remove the "current" entry.

To avoid the problem, let's split up marking and dropping of tclasses
and qdiscs. First, we recursively iterate tclasses/qdiscs and mark all
that need to be removed. Next, we iterate once over tclasses and qdiscs
and remove all marked entries.

Fixes 632d321050f58fe1b5bed7cfe769d212377c0301

4 months agotest-network: Make source directory optional
Daan De Meyer [Wed, 1 May 2024 14:11:56 +0000 (16:11 +0200)] 
test-network: Make source directory optional

4 months agotest: Follow symlinks when copying with rsync
Daan De Meyer [Wed, 1 May 2024 14:10:48 +0000 (16:10 +0200)] 
test: Follow symlinks when copying with rsync

We have e.g. 25-default.link in test-network/ which becomes a broken
symlink when installed so let's not copy the symlinks but follow them
instead so they don't become broken.

4 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Wed, 1 May 2024 09:42:34 +0000 (09:42 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/c15070885a82a2c93db8a765d332c38c50dde8b3...52bab0caa5249d6acd8bcd5bc7a68e69ac9319f9)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agobuild(deps): bump redhat-plumbers-in-action/gather-pull-request-metadata
dependabot[bot] [Wed, 1 May 2024 09:42:34 +0000 (09:42 +0000)] 
build(deps): bump redhat-plumbers-in-action/gather-pull-request-metadata

Bumps [redhat-plumbers-in-action/gather-pull-request-metadata](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata/compare/69c703f376018c1a41c8ccce21dc2e16a79f3324...17821d3bc27c1efed339595898c2e622accc5a1b)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/gather-pull-request-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoMerge pull request #32610 from YHNdnzj/install-have-modification
Luca Boccassi [Wed, 1 May 2024 12:58:43 +0000 (14:58 +0200)] 
Merge pull request #32610 from YHNdnzj/install-have-modification

core/dbus-manager: mark unit file state as outdated only if some changes succeeded

4 months agocore/dbus-manager: mark unit file state as outdated only if 32610/head
Mike Yuan [Wed, 1 May 2024 09:30:35 +0000 (17:30 +0800)] 
core/dbus-manager: mark unit file state as outdated only if
some changes succeeded

Follow-up for a82b8b3dc80619c3275ad8180069289b411206d0

We don't need to invalidate the unit file state
if all operations failed.

Also, emit UnitFilesChanged signal as long as
some operations succeeded.

4 months agobuild(deps): bump pkg/arch from `6a2bc57` to `dd7aff4`
dependabot[bot] [Wed, 1 May 2024 09:22:36 +0000 (09:22 +0000)] 
build(deps): bump pkg/arch from `6a2bc57` to `dd7aff4`

Bumps pkg/arch from `6a2bc57` to `dd7aff4`.

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoshared/install: use FOREACH_ARRAY for install_changes_have_modification
Mike Yuan [Wed, 1 May 2024 09:30:21 +0000 (17:30 +0800)] 
shared/install: use FOREACH_ARRAY for install_changes_have_modification

4 months agoshared/install: reduce variable scope
Mike Yuan [Wed, 1 May 2024 09:35:04 +0000 (17:35 +0800)] 
shared/install: reduce variable scope

4 months agosystemctl: fix log message when glob patterns passed to disable command and friends
Yu Watanabe [Wed, 1 May 2024 06:14:37 +0000 (15:14 +0900)] 
systemctl: fix log message when glob patterns passed to disable command and friends

Fixes #32599.

4 months agosystemctl: Implement --wait for kill command
Daan De Meyer [Tue, 30 Apr 2024 20:03:00 +0000 (22:03 +0200)] 
systemctl: Implement --wait for kill command

TEST-26-SYSTEMCTL is racy as we call systemctl is-active immediately
after systemctl kill. Let's implement --wait for systemctl kill and
use it in TEST-26-SYSTEMCTL to avoid the race.

4 months agoMerge pull request #32540 from DaanDeMeyer/mkosi
Daan De Meyer [Wed, 1 May 2024 07:04:49 +0000 (09:04 +0200)] 
Merge pull request #32540 from DaanDeMeyer/mkosi

mkosi: Enable more integration tests

4 months agocore/exec-credential: update comment
Yu Watanabe [Wed, 1 May 2024 06:57:55 +0000 (15:57 +0900)] 
core/exec-credential: update comment

4 months agoman/run0: fix typo (missing "by")
Mike Yuan [Wed, 1 May 2024 06:43:32 +0000 (14:43 +0800)] 
man/run0: fix typo (missing "by")

4 months agocore: Fix file descriptor leak
Daan De Meyer [Wed, 1 May 2024 01:14:45 +0000 (03:14 +0200)] 
core: Fix file descriptor leak

4 months agopo: Translated using Weblate (Slovenian)
Martin Srebotnjak [Tue, 30 Apr 2024 20:36:08 +0000 (22:36 +0200)] 
po: Translated using Weblate (Slovenian)

Currently translated at 14.8% (35 of 235 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main

4 months agotest: Add disabled mkosi tests to meson.build 32540/head
Daan De Meyer [Mon, 29 Apr 2024 12:29:21 +0000 (14:29 +0200)] 
test: Add disabled mkosi tests to meson.build

Makes it easier to track which ones still need to be fixed.

4 months agotest: Enable more mkosi integration tests
Richard Maw [Thu, 18 Apr 2024 14:31:56 +0000 (15:31 +0100)] 
test: Enable more mkosi integration tests

4 months agotest: Bump mkosi integration test timeout to 1800 seconds
Daan De Meyer [Mon, 29 Apr 2024 14:01:57 +0000 (16:01 +0200)] 
test: Bump mkosi integration test timeout to 1800 seconds

Same timeout as the bash framework.

4 months agotest: Make journal storage configurable per test and make persistent for TEST-09...
Daan De Meyer [Tue, 30 Apr 2024 17:06:00 +0000 (19:06 +0200)] 
test: Make journal storage configurable per test and make persistent for TEST-09-JOURNAL

Also fix a bug in the logic since it's 'volatile' and not 'runtime'.

4 months agotest: Drop /usr overlay workaround
Daan De Meyer [Tue, 30 Apr 2024 14:12:35 +0000 (16:12 +0200)] 
test: Drop /usr overlay workaround

/usr is not erofs anymore in the mkosi images so let's drop the
workaround where we mount a writable tmpfs on top of /usr.

4 months agoRevert "TEST-25-IMPORT: Skip if importctl not installed"
Daan De Meyer [Tue, 30 Apr 2024 14:14:54 +0000 (16:14 +0200)] 
Revert "TEST-25-IMPORT: Skip if importctl not installed"

This reverts commit dcb17e3295dfce1a9a9f4fb648c4750c05d3c46d.

importctl is now correctly installed on opensuse, so no need for
this workaround anymore.

4 months agoTEST-71-HOSTNAME: Ignore error from reset-failed
Daan De Meyer [Tue, 30 Apr 2024 12:47:48 +0000 (14:47 +0200)] 
TEST-71-HOSTNAME: Ignore error from reset-failed

On OpenSUSE the systemd-hostnamed does not fail and is unloaded which
causes reset-failed to fail. So let's ignore any errors from reset-failed
to make the test more robust.

4 months agoTEST-46-HOMED: Check for sshd pam snippet in /usr/lib/pam.d as well
Daan De Meyer [Tue, 30 Apr 2024 12:01:53 +0000 (14:01 +0200)] 
TEST-46-HOMED: Check for sshd pam snippet in /usr/lib/pam.d as well

opensuse ships pam snippets in /usr/lib/pam.d.

4 months agoTEST-82-SOFTREBOOT: Exit with exit status 123
Daan De Meyer [Mon, 29 Apr 2024 14:28:21 +0000 (16:28 +0200)] 
TEST-82-SOFTREBOOT: Exit with exit status 123

Required to make mkosi consider the test successful.

4 months agoTEST-35-LOGIN: Exclude manager entry in testcase_sanity_check()
Daan De Meyer [Mon, 29 Apr 2024 14:06:54 +0000 (16:06 +0200)] 
TEST-35-LOGIN: Exclude manager entry in testcase_sanity_check()

Otherwise we try to kill the wrong session.

4 months agoTEST-18-FAILUREACTION: Exit with 123 on success
Daan De Meyer [Mon, 29 Apr 2024 13:57:49 +0000 (15:57 +0200)] 
TEST-18-FAILUREACTION: Exit with 123 on success

mkosi expects the virtual machine/container to exit with exit status
123 on success so let's make sure that's the case.

4 months agoTEST-09-REBOOT: Make journalctl grep pattern more specific
Daan De Meyer [Mon, 29 Apr 2024 12:28:32 +0000 (14:28 +0200)] 
TEST-09-REBOOT: Make journalctl grep pattern more specific

We might be rotating because we reached limits, which is perfectly
fine, so don't fail if that happens.

4 months agoTEST-13-NSPAWN: Skip on virtiofs
Daan De Meyer [Mon, 29 Apr 2024 11:22:13 +0000 (13:22 +0200)] 
TEST-13-NSPAWN: Skip on virtiofs

The rootfs only has 64K UIDs available when booting with virtiofs,
whereas the nspawn tests want to use user namespace which require
more than 64K UIDs.

4 months agoTEST-13-NSPAWN: move disk images to /var/tmp
Richard Maw [Tue, 13 Feb 2024 12:48:26 +0000 (12:48 +0000)] 
TEST-13-NSPAWN: move disk images to /var/tmp

/tmp may not be large enough to contain disk images
and will result in strange errors when it runs out of space.

4 months agotree-wise: several cleanups for logging
Yu Watanabe [Tue, 30 Apr 2024 13:54:12 +0000 (22:54 +0900)] 
tree-wise: several cleanups for logging

- drop unnecessary SYNTHETIC_ERRNO() when the logger does not propagate
  error code,
- drop unnecessary '%m' in error message when the error code is
  specified with SYNTHETIC_ERRNO(),
- add missing full stop at the end of log message,
- use RET_GATHER(),
- add missing ", ignoring.",
- upeercase the first letter, etc., etc...

4 months agoTEST-13-NSPAWN: move container template to /usr/share
Richard Maw [Tue, 13 Feb 2024 12:50:58 +0000 (12:50 +0000)] 
TEST-13-NSPAWN: move container template to /usr/share

Having directories in / causes problems for make-root-on-boot images

4 months agoTEST-04-JOURNAL: Make LogFilterPatterns= tests more robust
Daan De Meyer [Sun, 28 Apr 2024 20:52:59 +0000 (22:52 +0200)] 
TEST-04-JOURNAL: Make LogFilterPatterns= tests more robust

Let's use oneshot services as we don't need long running services
for the tests we're doing. Let's also increase the sleeps a little
as the current values weren't sufficient when running the test locally
on my machine with mkosi.

4 months agoTEST-83-BTRFS: Skip if root filesystem is not btrfs
Daan De Meyer [Sun, 28 Apr 2024 18:58:01 +0000 (20:58 +0200)] 
TEST-83-BTRFS: Skip if root filesystem is not btrfs

4 months agoTEST-35-LOGIN: Handle multiple lock messages per sleep
Richard Maw [Sat, 17 Feb 2024 21:42:45 +0000 (21:42 +0000)] 
TEST-35-LOGIN: Handle multiple lock messages per sleep

If 3 lock messages get sent when going to sleep
then we can falsely assume we have woken up if we only assume we have at least two
so checking we have more than we did before sleeping addresses that issue.

4 months agomkosi: Fix %__check_files eval in opensuse build script
Daan De Meyer [Tue, 30 Apr 2024 14:09:49 +0000 (16:09 +0200)] 
mkosi: Fix %__check_files eval in opensuse build script

Make sure the correct buildroot gets expanded instead of the default
opensuse build root location.

We also remove debug files from the unpackaged files list as they're
handled separately by rpm.

4 months agobuild-path: fix SIGSEGV on RISC-V and MIPS
Luca Boccassi [Sat, 27 Apr 2024 14:25:09 +0000 (15:25 +0100)] 
build-path: fix SIGSEGV on RISC-V and MIPS

On RISC-V and MIPS DT_STRTAB is an offset, not a full address.

Follow-up for 91d149cfb45fc2fad7ce18fb651297ee50ecc1f8

4 months agocatalog: update Polish translation
Piotr Drąg [Tue, 30 Apr 2024 12:54:22 +0000 (14:54 +0200)] 
catalog: update Polish translation

Includes changes up to 844863c61e7b501097da84a1e4d1e4a6aa6d9f0d

4 months agonetwork-generator: add missing return on error after the logging refactor
Antonio Alvarez Feijoo [Tue, 30 Apr 2024 12:35:01 +0000 (14:35 +0200)] 
network-generator: add missing return on error after the logging refactor

Fixes 3cb618084a1bd5c7cb42822b4ce3dbd048e6bd24

4 months agomkosi: Install more locales on CentOS/Fedora
Daan De Meyer [Tue, 30 Apr 2024 11:38:31 +0000 (13:38 +0200)] 
mkosi: Install more locales on CentOS/Fedora

Required for TEST-73-LOCALE.

4 months agomkosi: Install tpm2-tools in system image
Daan De Meyer [Mon, 29 Apr 2024 14:27:31 +0000 (16:27 +0200)] 
mkosi: Install tpm2-tools in system image

Required for TEST-70-TPM2.

4 months agomkosi: Override /sbin/init in minimal-base
Daan De Meyer [Mon, 29 Apr 2024 11:40:43 +0000 (13:40 +0200)] 
mkosi: Override /sbin/init in minimal-base

Required for TEST-13-NSPAWN.

4 months agomkosi: Use systemd.crash_action=poweroff in integration tests
Daan De Meyer [Mon, 29 Apr 2024 08:47:25 +0000 (10:47 +0200)] 
mkosi: Use systemd.crash_action=poweroff in integration tests

Some integration tests expect to be able to reboot so switch to using
the new systemd.crash_action=poweroff instead.

4 months agomkosi: Add curl package for journal tests
Richard Maw [Thu, 18 Apr 2024 08:05:01 +0000 (09:05 +0100)] 
mkosi: Add curl package for journal tests

4 months agomkosi: Mask systemd-networkd-wait-online when --runtime-network=none
Daan De Meyer [Sun, 28 Apr 2024 20:51:41 +0000 (22:51 +0200)] 
mkosi: Mask systemd-networkd-wait-online when --runtime-network=none

Otherwise it will wait forever waiting for an interface to appear.
See https://github.com/systemd/systemd/issues/29388.

4 months agomkosi: Disable --runtime-scratch=no for tests
Daan De Meyer [Sun, 28 Apr 2024 18:46:14 +0000 (20:46 +0200)] 
mkosi: Disable --runtime-scratch=no for tests

Breaks TEST-83-BTRFS if enabled.

4 months agomkosi: Install locales on debian/ubuntu
Daan De Meyer [Sun, 28 Apr 2024 18:28:59 +0000 (20:28 +0200)] 
mkosi: Install locales on debian/ubuntu

Required for TEST-73-LOCALE.

4 months agomkosi: Make sure our extra kernel command line overrides the config one
Daan De Meyer [Sun, 28 Apr 2024 17:28:37 +0000 (19:28 +0200)] 
mkosi: Make sure our extra kernel command line overrides the config one

4 months agomkosi: Simply remove all the debian patches instead of mounting over them
Daan De Meyer [Sun, 28 Apr 2024 17:11:50 +0000 (19:11 +0200)] 
mkosi: Simply remove all the debian patches instead of mounting over them

The build sources are ephemeral anyways, so we can just remove the patches
instead of hiding them.

4 months agomkosi: Use symlinks instead of bind mounts for Arch
Daan De Meyer [Sun, 28 Apr 2024 17:09:44 +0000 (19:09 +0200)] 
mkosi: Use symlinks instead of bind mounts for Arch

With bind mounts, the directories we bind mount to get recorded as
the meson source and build directories. This means meson will complain
if we later try to run meson install -C /work/build in the virtual
machine or container. If we use symlinks, the directories we symlink to
will be recorded as the meson source and build directories, which means
meson install -C /work/build will work when executed after booting the
VM or container.

I tried to do the same for debian as well but the debian package tooling
changes directory into the build directory and then does meson setup ..
which is completely broken when switching to a symlink.

4 months agomkosi: Install minimal-base to /usr/share/testsuite-13-container-template
Daan De Meyer [Sun, 28 Apr 2024 15:18:32 +0000 (17:18 +0200)] 
mkosi: Install minimal-base to /usr/share/testsuite-13-container-template

Required for TEST-13-NSPAWN.

4 months agomkosi: Remove more files from Arch minimal image
Daan De Meyer [Sun, 28 Apr 2024 15:10:56 +0000 (17:10 +0200)] 
mkosi: Remove more files from Arch minimal image

4 months agoMerge pull request #32523 from cgzones/inaccessible_label
Luca Boccassi [Tue, 30 Apr 2024 14:20:49 +0000 (16:20 +0200)] 
Merge pull request #32523 from cgzones/inaccessible_label

shared: create inaccessible files with correct security label

4 months agopo: add a false positive to POTFILES.skip
Piotr Drąg [Tue, 30 Apr 2024 12:36:16 +0000 (14:36 +0200)] 
po: add a false positive to POTFILES.skip

Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect this file as containing translations. Avoid this
behavior by putting the file in POTFILES.skip.

4 months agodocs: autopkgtest: refresh the docs with up-to-date information
Skia [Tue, 30 Apr 2024 13:46:11 +0000 (16:46 +0300)] 
docs: autopkgtest: refresh the docs with up-to-date information

@iainlane doesn't work on Ubuntu infrastructure anymore, and `bionic` is still ESM, but not really supported anymore either.
`noble`, which is the latest Ubuntu, probably is better for testing `systemd` in 2024, and pinging `qa-help` on IRC is the current official way to contact the team behind Ubuntu's infrastructure.

4 months agotest: exclude gperf files from captured coverage
Frantisek Sumsal [Tue, 30 Apr 2024 11:13:50 +0000 (13:13 +0200)] 
test: exclude gperf files from captured coverage

Recent lcov started complaining loudly about unknown lines in gperf
files:

...
Found gcov version: 13.2.1
Using intermediate gcov format
Recording 'internal' directories:
...
Finished processing 1634 GCNO files
Apply filtering..
Message summary:
  1 error message:
    range: 1
  28 warning messages:
    gcov: 27
    usage: 1
geninfo: ERROR: (range) unknown line '33' in /build/src/home/homed-gperf.gperf: there are only 22 lines in the file.
  Use 'geninfo --filter range' to remove out-of-range lines.
        (use "geninfo --ignore-errors range ..." to bypass this error)

Since we drop the coverage of built files from the final report anyway,
let's do it also when capturing both initial and real coverage to avoid
this error.

4 months agotest: Don't persist journal in mkosi image if we're not debugging tests
Daan De Meyer [Tue, 30 Apr 2024 12:29:14 +0000 (14:29 +0200)] 
test: Don't persist journal in mkosi image if we're not debugging tests

If we're not debugging tests, there's no point in persisting the journal,
so let's use the volatile journal storage mode in that case to avoid doing
unnecessary work.

We don't disable journal storage alltogether since various tests check
that stuff is written to the journal.

4 months agojournal: Add journal.storage credential
Daan De Meyer [Tue, 30 Apr 2024 10:26:27 +0000 (12:26 +0200)] 
journal: Add journal.storage credential

In mkosi CI, we want persistent journals when running interactively
and runtime journals when running in CI, so let's add a credential
that allows us to configure which one to use.

4 months agobuild(deps): bump pkg/debian from `640ff73` to `9a5adf2`
dependabot[bot] [Tue, 30 Apr 2024 09:24:18 +0000 (09:24 +0000)] 
build(deps): bump pkg/debian from `640ff73` to `9a5adf2`

Bumps pkg/debian from `640ff73` to `9a5adf2`.

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoMerge pull request #32575 from DaanDeMeyer/fix
Daan De Meyer [Tue, 30 Apr 2024 10:08:42 +0000 (12:08 +0200)] 
Merge pull request #32575 from DaanDeMeyer/fix

Various mkosi fixes

4 months agomkosi: Make sure we create an image without /var/log/journal 32575/head
Daan De Meyer [Tue, 30 Apr 2024 09:41:02 +0000 (11:41 +0200)] 
mkosi: Make sure we create an image without /var/log/journal

This allows journald to create the directory itself with the right
chattr settings on first boot.

4 months agomkosi: Simplify rpm build scripts
Daan De Meyer [Tue, 30 Apr 2024 09:39:36 +0000 (11:39 +0200)] 
mkosi: Simplify rpm build scripts

4 months agoMerge pull request #32567 from DaanDeMeyer/profile
Daan De Meyer [Tue, 30 Apr 2024 09:34:35 +0000 (11:34 +0200)] 
Merge pull request #32567 from DaanDeMeyer/profile

mkosi: Introduce particle profile

4 months agotest-journal-flush: use archived journal if possible
Yu Watanabe [Tue, 30 Apr 2024 05:20:11 +0000 (14:20 +0900)] 
test-journal-flush: use archived journal if possible

Workaround for #32436.

The test may fail if the journal is vacuumed or rotated during the test is running.
Let's use the newest archive file for safety.

4 months agomkosi: Introduce particle profile 32567/head
Daan De Meyer [Mon, 29 Apr 2024 20:13:11 +0000 (22:13 +0200)] 
mkosi: Introduce particle profile

Unfortunately the current mkosi partitioning setup is a bit too
avant-garde for the integration tests. Both in that distributions
aren't ready for it yet (some more than others), and that software
which we depend on in the integration tests isn't ready for it yet
(e.g. libselinux does not read its configuration from /usr).

Let's switch back to a more boring partioning setup by default but
keep the fancy stuff around as a mkosi profile. This means that it
can still be used for manually testing stuff by running
"mkosi --profile particle -f qemu".

4 months agoTEST-81-GENERATORS: Use SYSTEMD_PROC_CMDLINE more
Daan De Meyer [Tue, 30 Apr 2024 06:43:16 +0000 (08:43 +0200)] 
TEST-81-GENERATORS: Use SYSTEMD_PROC_CMDLINE more

Makes the test more robust as the command line the image is booted
won't influence the test result.

4 months agomeson: bump libbpf dependency to 1.4.0 when using gcc
Luca Boccassi [Mon, 29 Apr 2024 19:25:34 +0000 (20:25 +0100)] 
meson: bump libbpf dependency to 1.4.0 when using gcc

bpf_core_type_id_kernel() needs libbpf 1.4.0 when building with gcc
rather than clang, so bump the dependency accordingly.

More precisely, the following change is needed:

https://github.com/libbpf/libbpf/commit/b19fdbf1be21a28f88740375a575ebd9dfbea68f

Related to: https://github.com/systemd/systemd/issues/31869

Follow-up for 8aee931e7ae1adb01eeac0e1e4c0aef6ed3969ec

4 months agomachine: Add PIDFDs= fallback
Daan De Meyer [Mon, 29 Apr 2024 17:44:12 +0000 (19:44 +0200)] 
machine: Add PIDFDs= fallback

In some environments, systemd-machined might not be restarted on
downgrade. For safety, let's add the usual PIDFDs= fallback here
as well.

4 months agoresolved: always progress DS queries
Ronan Pigott [Mon, 29 Apr 2024 09:17:23 +0000 (02:17 -0700)] 
resolved: always progress DS queries

If we request a DS and the resolver offers an unsigned SOA, a new
auxiliary transaction for the DS will be rejected as a loop, and we
might not make any progress toward finding the DS we need. Let's ensure
that we at least always check the parent in this case.

Fixes: 47690634f157 ("resolved: don't request the SOA for every dns label")
4 months agomeson: copy prefix mapping CFLAGS when building BPF objects
Luca Boccassi [Sat, 27 Apr 2024 16:55:27 +0000 (17:55 +0100)] 
meson: copy prefix mapping CFLAGS when building BPF objects

Otherwise the filenames will contain variable paths and break reproducibility

4 months agoshared: create inaccessible files with correct security label 32523/head
Christian Göttsche [Sat, 27 Apr 2024 19:23:11 +0000 (21:23 +0200)] 
shared: create inaccessible files with correct security label

4 months agobasic: add open_mkdir_at_full()
Christian Göttsche [Sat, 27 Apr 2024 19:22:33 +0000 (21:22 +0200)] 
basic: add open_mkdir_at_full()

Add helper for open_mkdir_at() which accepts xopen flags, e.g. to pass
XO_LABEL to create the target with the correct security context.

4 months agobasic: add mknodat_label()
Christian Göttsche [Sat, 27 Apr 2024 19:22:02 +0000 (21:22 +0200)] 
basic: add mknodat_label()

Add helper for mknodat(2) which creates the destination with the correct
security label.

4 months agomeson: define 's390' for 's390x' when building BPF objects
Luca Boccassi [Sat, 27 Apr 2024 17:06:42 +0000 (18:06 +0100)] 
meson: define 's390' for 's390x' when building BPF objects

The kernel headers match on __s390__ so the build fails

../src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.c:159:6: error: Must specify a BPF target arch via __TARGET_ARCH_xxx
void BPF_KPROBE(userns_restrict_free_user_ns, struct work_struct *work) {
     ^
/usr/include/bpf/bpf_tracing.h:817:20: note: expanded from macro 'BPF_KPROBE'
        return ____##name(___bpf_kprobe_args(args));                        \
                          ^
/usr/include/bpf/bpf_tracing.h:797:41: note: expanded from macro '___bpf_kprobe_args'
                                        ^
/usr/include/bpf/bpf_helpers.h:195:29: note: expanded from macro '___bpf_apply'
                            ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/include/bpf/bpf_tracing.h:789:72: note: expanded from macro '___bpf_kprobe_args1'
                                                                       ^
/usr/include/bpf/bpf_tracing.h:563:29: note: expanded from macro 'PT_REGS_PARM1'
                            ^
<scratch space>:125:6: note: expanded from here
 GCC error "Must specify a BPF target arch via __TARGET_ARCH_xxx"

4 months agoMerge pull request #32547 from YHNdnzj/minor-cleanup
Mike Yuan [Mon, 29 Apr 2024 13:08:06 +0000 (21:08 +0800)] 
Merge pull request #32547 from YHNdnzj/minor-cleanup

Some cleanups prompted during review

4 months agoboot: fix argument name mismatch in two functions
Antonio Alvarez Feijoo [Mon, 29 Apr 2024 10:22:49 +0000 (12:22 +0200)] 
boot: fix argument name mismatch in two functions

4 months agocore: Add systemd.crash_action= kernel command line argument
Daan De Meyer [Mon, 29 Apr 2024 06:46:58 +0000 (08:46 +0200)] 
core: Add systemd.crash_action= kernel command line argument

Required for integration tests to power off on PID 1 crashes. We
deprecate systemd.crash_reboot and related options by removing them
from the documentation but still parsing them.

4 months agojournalctl: also check arg_file_stdin with other journal location
Mike Yuan [Mon, 29 Apr 2024 08:47:11 +0000 (16:47 +0800)] 
journalctl: also check arg_file_stdin with other journal location
options

Prompted by #32491

4 months agodocs/DEBUGGING.md: use an underscore in the kernel command line option
nl6720 [Mon, 29 Apr 2024 11:39:14 +0000 (14:39 +0300)] 
docs/DEBUGGING.md: use an underscore in the kernel command line option

systemd-debug-generator(8) lists it as `systemd.debug_shell`.

According to 1d84ad944520fc3e062ef518c4db4e1d3a1866af, kernel command
line options should use an underscore instead of a dash.

4 months agocore: Pass NULL error in dump_impl()
Daan De Meyer [Sun, 28 Apr 2024 17:42:51 +0000 (19:42 +0200)] 
core: Pass NULL error in dump_impl()

If mac_selinux_access_check() or bus_verify_bypass_dump_ratelimit_async()
fail, we goto "ratelimited" where we set a custom D-BUS error. In
"ratelimited", we call sd_bus_error_setf() which eventually hits an
assert_return(!bus_error_is_dirty()). Avoid hitting this assertion by
passing NULL as the error to mac_selinux_access_check() and
bus_verify_bypass_dump_ratelimit_async() since we will override the error
immediately anyway if either fails.

We modify both functions as well to allow passing a NULL error and fix
the argument name as well while we're at it.

4 months agoMerge pull request #32556 from YHNdnzj/development-freeze
Frantisek Sumsal [Mon, 29 Apr 2024 11:46:41 +0000 (13:46 +0200)] 
Merge pull request #32556 from YHNdnzj/development-freeze

development-freeze: suppress warning for some labels

4 months agobuild(deps): bump pkg/debian from `4b1f868` to `640ff73`
dependabot[bot] [Mon, 29 Apr 2024 10:00:20 +0000 (10:00 +0000)] 
build(deps): bump pkg/debian from `4b1f868` to `640ff73`

Bumps pkg/debian from `4b1f868` to `640ff73`.

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months agodevelopment-freeze: suppress warning for some labels 32556/head
Mike Yuan [Mon, 29 Apr 2024 10:59:02 +0000 (18:59 +0800)] 
development-freeze: suppress warning for some labels

4 months agolabeler: add l10n 🌍
Mike Yuan [Mon, 29 Apr 2024 10:56:54 +0000 (18:56 +0800)] 
labeler: add l10n 🌍

4 months agopam: Setup logging to syslog
Daan De Meyer [Sun, 28 Apr 2024 19:27:23 +0000 (21:27 +0200)] 
pam: Setup logging to syslog

We already log to syslog using pam_syslog() for logs generated directly
within our pam plugins. However, any logs generated by our generic logging
macros that are invoked within a pam plugin will log to the console. Let's
make sure our generic logging macros are set up to log to syslog as well.

4 months agopo: Translated using Weblate (French)
Pierre GRASSER [Mon, 29 Apr 2024 08:36:18 +0000 (10:36 +0200)] 
po: Translated using Weblate (French)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Pierre GRASSER <pierre.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main

4 months agoNEWS: fix minimum dracut version required for systemd v256
Antonio Alvarez Feijoo [Mon, 29 Apr 2024 06:55:36 +0000 (08:55 +0200)] 
NEWS: fix minimum dracut version required for systemd v256

Follow-up for d4e9be97a3

4 months agofs-util: modernize touch_file a bit 32547/head
Mike Yuan [Mon, 29 Apr 2024 08:23:00 +0000 (16:23 +0800)] 
fs-util: modernize touch_file a bit

4 months agofs-util: try AT_EMPTY_PATH first for futimens_opath
Mike Yuan [Mon, 29 Apr 2024 08:22:37 +0000 (16:22 +0800)] 
fs-util: try AT_EMPTY_PATH first for futimens_opath

4 months agoefivars: drop unneeded UTIME_NOW
Mike Yuan [Mon, 29 Apr 2024 07:45:14 +0000 (15:45 +0800)] 
efivars: drop unneeded UTIME_NOW

futimens(2) defaults to current time if 'times' is NULL.

4 months agopam_systemd_loadkey: add missing PAM_EXTERN
Mike Yuan [Mon, 29 Apr 2024 07:46:32 +0000 (15:46 +0800)] 
pam_systemd_loadkey: add missing PAM_EXTERN

4 months agomkosi: Ignore version from versioned dependencies in .SRCINFO
Daan De Meyer [Sun, 28 Apr 2024 13:21:15 +0000 (15:21 +0200)] 
mkosi: Ignore version from versioned dependencies in .SRCINFO

Dependencies in .SRCINFO can be versioned. Let's make sure we ignore
any specified versions when grepping it for dependencies. Also update
the arch submodule to the latest to make sure the change works.