]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 months agoudev-builtin-blkid: skip GPT dissection unless we actually have partition support 36968/head
Lennart Poettering [Fri, 14 Mar 2025 15:13:48 +0000 (16:13 +0100)] 
udev-builtin-blkid: skip GPT dissection unless we actually have partition support

7 months agoudev-builtin-blkid: look for ESP/XBOOTLDR only in initrd; afterwards just look at /
Lennart Poettering [Thu, 13 Mar 2025 21:03:04 +0000 (22:03 +0100)] 
udev-builtin-blkid: look for ESP/XBOOTLDR only in initrd; afterwards just look at /

So far the gpt-auto symlinks would point to:

   1. the disk the ESP/XBOOTLDR is located on
   2. or to a loopback device whose filename field is set to "rootdisk"
      or "rootdisk.raw"

This makes sense in the initrd. But once we transition to the host this
is quite confusing, since the symlinks might point to a different place
than what we actually ended up transitioning too: the actual backing
device of the root file system might be different from what gpt-auto
found.

Let's clean this up: let's avoid any ambiguities here: let's extend the
rules above with one more rule:

   3. if we left the initrd, we'll make gpt-auto point to the selected
      root file system, if it otherwise would have been a candidate.

Or in other words, the ID_PART_GPT_AUTO_ROOT_DISK=1 udev property now
always makes sense: in the initrd it points to the future root disk, and
on the host to the actual root disk.

Fixes: #34319
7 months agotest: wait for the device node symlink being created
Yu Watanabe [Thu, 3 Apr 2025 03:04:11 +0000 (12:04 +0900)] 
test: wait for the device node symlink being created

Follow-up for 6e003d18bbf5e9f55c08b25d80b138b3a98d5f26.

Hopefully fixes the following failure:
```
[   50.650939] TEST-87-AUX-UTILS-VM.sh[3637]: + mkdir -p /tmp/validatefs-test.mount/somewhere/else
[   50.652499] TEST-87-AUX-UTILS-VM.sh[3637]: + mount /dev/disk/by-label/qnurx /tmp/validatefs-test.mount/somewhere/else
[   50.660885] /dev/disk/by-label/qnurx: Can't lookup blockdev
[   50.654964] TEST-87-AUX-UTILS-VM.sh[3731]: mount: /tmp/validatefs-test.mount/somewhere/else: special device /dev/disk/by-label/qnurx does not exist.
```

7 months agotest: Use test.service template for all integration tests (#36979)
Yu Watanabe [Thu, 3 Apr 2025 03:11:49 +0000 (12:11 +0900)] 
test: Use test.service template for all integration tests (#36979)

Instead of having some tests have their own unit, let's make
test.service.in generic enough so that it works for all integration
tests.

7 months agotest: set timeout for udevadm settle/wait/lock
Yu Watanabe [Wed, 2 Apr 2025 16:48:19 +0000 (01:48 +0900)] 
test: set timeout for udevadm settle/wait/lock

Otherwise, if a test in a spurious state, it consumes quite long time.
Let's fail earlier in such case.

This also drops an unnecessary calls of 'udevadm settle' in
testcase_nvme_basic() of TEST-64-UDEV-STORAGE.

7 months agoTwo trivial cleanups (#36980)
Yu Watanabe [Wed, 2 Apr 2025 23:56:46 +0000 (08:56 +0900)] 
Two trivial cleanups (#36980)

7 months agotest logind restart
Matteo Croce [Wed, 2 Apr 2025 19:18:45 +0000 (21:18 +0200)] 
test logind restart

Add a simple check which ensures that a user service survives
a logind restart.

7 months agodissect-image: after probing file systems, we still have the chance to not use a...
Lennart Poettering [Fri, 14 Mar 2025 10:45:20 +0000 (11:45 +0100)] 
dissect-image: after probing file systems, we still have the chance to not use a partition

Just because we found something we should still allow it to not be used,
hence include UNUSED in the found flags.

7 months agohwdb/keyboard: Map FN key on TUXEDO NB02 devices
Werner Sembach [Wed, 2 Apr 2025 16:47:12 +0000 (18:47 +0200)] 
hwdb/keyboard: Map FN key on TUXEDO NB02 devices

Map the FN key of TUXEDO NB02 devices that produces a scancode unrecognized by
the Linux kernel.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
7 months agotree-wide: replace unsigned int -> unsigned, long int -> long 36980/head
Yu Watanabe [Wed, 2 Apr 2025 20:48:59 +0000 (05:48 +0900)] 
tree-wide: replace unsigned int -> unsigned, long int -> long

7 months agomemfd-util: make memfd_add/get_seals() static
Yu Watanabe [Wed, 2 Apr 2025 20:36:25 +0000 (05:36 +0900)] 
memfd-util: make memfd_add/get_seals() static

7 months agotest: Use test.service template for all integration tests 36979/head
Daan De Meyer [Wed, 2 Apr 2025 19:58:59 +0000 (21:58 +0200)] 
test: Use test.service template for all integration tests

Instead of having some tests have their own unit, let's make
test.service.in generic enough so that it works for all integration
tests.

7 months agorules: split out gpt-root rules from 99-systemd.rules
Lennart Poettering [Wed, 5 Mar 2025 15:24:32 +0000 (16:24 +0100)] 
rules: split out gpt-root rules from 99-systemd.rules

All other rules in 99-systemd.rules are pretty much concerned about
SYSTEMD_READY=1 and tagging devices the service manager shall track. But
the gpt-root symlink is different, and it makes sense independently of
the service manager. Hence give it a separate file.

This introduces indentation for inner sections skipped via GOTO=. The
rules parser supports that. In order to make this more readable, let's
maybe make use of this.

7 months agojournald: two minor tweaks (#36966)
Yu Watanabe [Wed, 2 Apr 2025 19:31:55 +0000 (04:31 +0900)] 
journald: two minor tweaks (#36966)

7 months agojournald: split out varlink code into .c/.h file and add varlink documentation to...
Yu Watanabe [Wed, 2 Apr 2025 19:31:15 +0000 (04:31 +0900)] 
journald: split out varlink code into .c/.h file and add varlink documentation to it (#36965)

No real code changes.

7 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
z z [Wed, 2 Apr 2025 18:31:03 +0000 (18:31 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 99.2% (255 of 257 strings)

Co-authored-by: z z <3397542367@qq.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main

7 months agosd_journal_get_cursor() tweaks (#36964)
Yu Watanabe [Wed, 2 Apr 2025 19:11:35 +0000 (04:11 +0900)] 
sd_journal_get_cursor() tweaks (#36964)

7 months agoprioq: minor tweaks (#36963)
Yu Watanabe [Wed, 2 Apr 2025 19:10:10 +0000 (04:10 +0900)] 
prioq: minor tweaks (#36963)

7 months agosd-event: don't consider no pending IO event a programming error in sd_event_source_g...
Lennart Poettering [Tue, 25 Mar 2025 20:43:15 +0000 (16:43 -0400)] 
sd-event: don't consider no pending IO event a programming error in sd_event_source_get_io_revents()

7 months agovarlink: add common helper that refuse method calls from unpriv clients
Lennart Poettering [Wed, 26 Mar 2025 16:34:34 +0000 (12:34 -0400)] 
varlink: add common helper that refuse method calls from unpriv clients

7 months agoSeveral cleanups for rc-local-generator (#36953)
Yu Watanabe [Wed, 2 Apr 2025 19:05:45 +0000 (04:05 +0900)] 
Several cleanups for rc-local-generator (#36953)

7 months agotest: Unset JOURNAL_STREAM for integration test units
Daan De Meyer [Wed, 2 Apr 2025 18:43:41 +0000 (20:43 +0200)] 
test: Unset JOURNAL_STREAM for integration test units

We use StandardOutput=journal+console for integration test units
to make sure the output from the test ends up on both the serial
console and in the journal. Unfortunately this only works for
messages written to stdout/stderr of the test service. All journal
messages logged by systemd tools will only end up in the journal and
not on the serial console. This makes test failures harder to debug
than needed because developers have to fetch the journal to figure
out the actual error that was logged by any systemd tool that failed
when invoked from the integration test script.

To fix this, let's unset $JOURNAL_STREAM for the integration test
units. This forces all output to go through stdout, which will make
journald forward it to the console and save it in the journal.

7 months agologind: utmp fix (#36958)
Yu Watanabe [Wed, 2 Apr 2025 17:41:26 +0000 (02:41 +0900)] 
logind: utmp fix (#36958)

Fixes: #36930
7 months agoudevdm: use PidRef at one more place (#36959)
Yu Watanabe [Wed, 2 Apr 2025 17:26:42 +0000 (02:26 +0900)] 
udevdm: use PidRef at one more place (#36959)

7 months agotree-wide: pass -EBADF to device_monitor_new_full()
Yu Watanabe [Wed, 2 Apr 2025 14:34:29 +0000 (23:34 +0900)] 
tree-wide: pass -EBADF to device_monitor_new_full()

Prompted by https://github.com/systemd/systemd/pull/36922#discussion_r2024940885.

7 months agoudev: use notify socket to send message from worker processes to manager process...
Yu Watanabe [Wed, 2 Apr 2025 17:09:36 +0000 (02:09 +0900)] 
udev: use notify socket to send message from worker processes to manager process (#36922)

This replaces home-grown notification method from worker processes to
manager process with sd-notify. Then, we can reuse many library
functions commonly used by many components.
Hopefully, this does not change any effective functionalities.

7 months agosome selinux modernizations (#36955)
Yu Watanabe [Wed, 2 Apr 2025 16:30:03 +0000 (01:30 +0900)] 
some selinux modernizations (#36955)

7 months agoudev: introduce rm_rf_safep() and modernize udev_watch_restore() (#36923)
Yu Watanabe [Wed, 2 Apr 2025 16:28:34 +0000 (01:28 +0900)] 
udev: introduce rm_rf_safep() and modernize udev_watch_restore() (#36923)

7 months agotest: converted unittest in src/test/test-mkdir.c to use new ASSERT_OK() macros and...
victor-ok [Tue, 1 Apr 2025 23:13:46 +0000 (00:13 +0100)] 
test: converted unittest in src/test/test-mkdir.c to use new ASSERT_OK() macros and friends

7 months agojournald: do not schedule idle timer if our event loop is dying 36966/head
Lennart Poettering [Tue, 25 Mar 2025 20:45:16 +0000 (16:45 -0400)] 
journald: do not schedule idle timer if our event loop is dying

7 months agojournald: rename stdout_stream_destroy() → stdout_stream_terminate()
Lennart Poettering [Tue, 25 Mar 2025 20:44:30 +0000 (16:44 -0400)] 
journald: rename stdout_stream_destroy() → stdout_stream_terminate()

7 months agojournald: document Varlink interface 36965/head
Lennart Poettering [Tue, 25 Mar 2025 16:07:36 +0000 (12:07 -0400)] 
journald: document Varlink interface

7 months agojournald: split out varlink code into a separate .c file
Lennart Poettering [Tue, 25 Mar 2025 15:57:44 +0000 (11:57 -0400)] 
journald: split out varlink code into a separate .c file

No actual code changes just splitting out code.

7 months agosd-journal: document relevant sd_journal_get_cursor() error codes 36964/head
Lennart Poettering [Mon, 24 Mar 2025 10:54:00 +0000 (06:54 -0400)] 
sd-journal: document relevant sd_journal_get_cursor() error codes

7 months agosd-journal: make return parameter to sd_journal_get_cursor() optional
Lennart Poettering [Mon, 24 Mar 2025 10:54:30 +0000 (06:54 -0400)] 
sd-journal: make return parameter to sd_journal_get_cursor() optional

7 months agoprioq: add some minor overflow checking assert()s 36963/head
Lennart Poettering [Wed, 26 Mar 2025 15:19:05 +0000 (11:19 -0400)] 
prioq: add some minor overflow checking assert()s

7 months agoprioq: invalidate index pointers on removal
Lennart Poettering [Wed, 26 Mar 2025 15:18:40 +0000 (11:18 -0400)] 
prioq: invalidate index pointers on removal

7 months agomeson: rename RC_LOCAL_PATH -> SYSTEM_SYSVRCLOCAL_PATH 36953/head
Yu Watanabe [Wed, 2 Apr 2025 13:10:29 +0000 (22:10 +0900)] 
meson: rename RC_LOCAL_PATH -> SYSTEM_SYSVRCLOCAL_PATH

No functional change, but just for emphasizing that this is for
SysV compatibility.

7 months agomeson: disable rc-local-generator when an empty string is specified to rc-local=...
Yu Watanabe [Wed, 2 Apr 2025 13:09:12 +0000 (22:09 +0900)] 
meson: disable rc-local-generator when an empty string is specified to rc-local= meson option

In such case, the generator is meaningless. Let's kill it.

7 months agocore: delegate mountns implicitly when any of pidns/cgns/netns is in use, clean up...
Yu Watanabe [Wed, 2 Apr 2025 15:15:33 +0000 (00:15 +0900)] 
core: delegate mountns implicitly when any of pidns/cgns/netns is in use, clean up private cgroupfs mount (#36892)

Fixes #36952

7 months agologind: save logind session information to disk once we acquired it via utmp 36958/head
Lennart Poettering [Wed, 2 Apr 2025 14:46:25 +0000 (16:46 +0200)] 
logind: save logind session information to disk once we acquired it via utmp

Fixes: #36930
7 months agologind: split utmp related code into logind-utmp.[ch]
Lennart Poettering [Wed, 2 Apr 2025 14:42:40 +0000 (16:42 +0200)] 
logind: split utmp related code into logind-utmp.[ch]

No real changes, just moving of code around.

7 months agoudevadm-lock: use PidRef 36959/head
Yu Watanabe [Wed, 2 Apr 2025 14:16:05 +0000 (23:16 +0900)] 
udevadm-lock: use PidRef

7 months agoprocess-util: make wait_for_terminate() as trivial wrapper of its PidRef version
Yu Watanabe [Wed, 2 Apr 2025 15:08:07 +0000 (00:08 +0900)] 
process-util: make wait_for_terminate() as trivial wrapper of its PidRef version

7 months agoprocess-util: add pidref-based version of wait_for_terminate_and_check()
Lennart Poettering [Sun, 23 Mar 2025 22:35:36 +0000 (18:35 -0400)] 
process-util: add pidref-based version of wait_for_terminate_and_check()

7 months agoudev-manager: use PidRef for managing worker processes 36922/head
Yu Watanabe [Mon, 31 Mar 2025 20:05:40 +0000 (05:05 +0900)] 
udev-manager: use PidRef for managing worker processes

7 months agoudev: use sd_notify to communicate between worker and manager processes
Yu Watanabe [Thu, 20 Mar 2025 08:50:05 +0000 (17:50 +0900)] 
udev: use sd_notify to communicate between worker and manager processes

Let's replace home-grown notification from worker to manager process
with sd_notify.

7 months agoudev: split out error code assignment and move them to udev-error.c
Yu Watanabe [Thu, 20 Mar 2025 08:28:28 +0000 (17:28 +0900)] 
udev: split out error code assignment and move them to udev-error.c

No functional change, just refactoring and preparation for later change.

7 months agoudev-manager: broadcast event in event_requeue() on failure
Yu Watanabe [Thu, 20 Mar 2025 09:14:29 +0000 (18:14 +0900)] 
udev-manager: broadcast event in event_requeue() on failure

Also, send the actual error code rather than ETIMEDOUT.

7 months agoudev-manager: do not free device monitor when asked to terminate
Yu Watanabe [Thu, 20 Mar 2025 08:22:13 +0000 (17:22 +0900)] 
udev-manager: do not free device monitor when asked to terminate

Otherwise, if a worker process exited abnormally, the manager cannot
broadcast the kernel event assigned to the worker.

7 months agoudev-watch: modernize udev_watch_restore() 36923/head
Yu Watanabe [Mon, 24 Mar 2025 12:05:44 +0000 (21:05 +0900)] 
udev-watch: modernize udev_watch_restore()

7 months agorm-rf: introduce rm_rf_safe() and rm_rf_safep()
Yu Watanabe [Mon, 24 Mar 2025 11:54:12 +0000 (20:54 +0900)] 
rm-rf: introduce rm_rf_safe() and rm_rf_safep()

7 months agoselinux-setup: modernizations 36955/head
Lennart Poettering [Wed, 2 Apr 2025 13:33:28 +0000 (15:33 +0200)] 
selinux-setup: modernizations

Adjustments to match our current coding style, in particular ensures we
always print log messages for unexpected errors.

This changes our code assume mac_selinux_get_create_label_from_exe()
returns a valid label on success. I checked libselinux, this is
guaranteed, and is otherwise relied on in our tree, hence don't do the
pointless check here.

7 months agoselinux-util: rename return parameter to ret_xyz
Lennart Poettering [Wed, 2 Apr 2025 13:32:15 +0000 (15:32 +0200)] 
selinux-util: rename return parameter to ret_xyz

mac_selinux_get_create_label_from_exe() didn't get this right. Clean
this up, and stick to a uniform name for all three related functions.

7 months agotest: skip TEST-06-SELINUX if not on fedora/centos
Luca Boccassi [Wed, 2 Apr 2025 01:02:17 +0000 (02:02 +0100)] 
test: skip TEST-06-SELINUX if not on fedora/centos

The test skips at runtime on the same condition, but that's already too late
as it often gets stuck on boot in Debian/Ubuntu. Check in the meson
condition directly so that it's not even started.

7 months agohostnamed: fix incorrect usage of device_dmi (#36948)
herbrechtsmeier [Wed, 2 Apr 2025 12:41:44 +0000 (14:41 +0200)] 
hostnamed: fix incorrect usage of device_dmi (#36948)

Fix incorrect usage of device_dmi in context_acquire_device_tree().

Follow-up for 3e91aed6c4e53824adddb5b8ad124ffecb0e0673.

7 months agomkosi: Make sure we set DEB_BUILD_PROFILES when cleaning up with dpkg
Daan De Meyer [Wed, 2 Apr 2025 11:07:36 +0000 (13:07 +0200)] 
mkosi: Make sure we set DEB_BUILD_PROFILES when cleaning up with dpkg

Otherwise we might miss some files that are gated behind one of the
selected profiles.

7 months agodocs/user_record: Put timeZone and resourceLimits in their own paragraph
Andreas Schneider [Wed, 2 Apr 2025 11:33:37 +0000 (13:33 +0200)] 
docs/user_record: Put timeZone and resourceLimits in their own paragraph

7 months agoman/pstore.conf: pstore.conf template is not always installed in /etc
Zbigniew Jędrzejewski-Szmek [Wed, 2 Apr 2025 09:43:04 +0000 (11:43 +0200)] 
man/pstore.conf: pstore.conf template is not always installed in /etc

"Inspired" by 798faa6fefab5f5479455ee241672659cb30f18c ;)

7 months agomkosi: Various improvements and fixes (#36931)
Daan De Meyer [Wed, 2 Apr 2025 11:02:10 +0000 (13:02 +0200)] 
mkosi: Various improvements and fixes (#36931)

7 months agobuild(deps): bump ninja from 1.11.1.2 to 1.11.1.4 in /.github/workflows
dependabot[bot] [Tue, 1 Apr 2025 16:41:06 +0000 (16:41 +0000)] 
build(deps): bump ninja from 1.11.1.2 to 1.11.1.4 in /.github/workflows

Bumps [ninja](https://github.com/scikit-build/ninja-python-distributions) from 1.11.1.2 to 1.11.1.4.
- [Release notes](https://github.com/scikit-build/ninja-python-distributions/releases)
- [Changelog](https://github.com/scikit-build/ninja-python-distributions/blob/master/HISTORY.rst)
- [Commits](https://github.com/scikit-build/ninja-python-distributions/compare/1.11.1.2...1.11.1.4)

---
updated-dependencies:
- dependency-name: ninja
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
7 months agoman: coredump.conf template is not always installed in /etc
wtmpx [Wed, 2 Apr 2025 07:18:52 +0000 (09:18 +0200)] 
man: coredump.conf template is not always installed in /etc

The default installation path can be configured with the -Dconfigfiledir= option

7 months agoTweak log messages around efivarsfs and hibernation (#36921)
Zbigniew Jędrzejewski-Szmek [Wed, 2 Apr 2025 09:30:26 +0000 (11:30 +0200)] 
Tweak log messages around efivarsfs and hibernation (#36921)

7 months agomkosi: Stop passing package environment variables to tools image 36931/head
Daan De Meyer [Tue, 1 Apr 2025 12:57:22 +0000 (14:57 +0200)] 
mkosi: Stop passing package environment variables to tools image

The tools image is not guaranteed to be the same distribution as the
target distribution and so might have different package environment
variables than the main image yet we currently unconditionally use the
same package environment variables for both of them.

Let's fix this by not passing the package environment variables to the
tools image and subimages anymore, and instead having the main, tools and
build images separately include a config file with the required environment
variables.

7 months agomkosi: Use mkosi.tools.conf for tools tree configuration
Daan De Meyer [Tue, 1 Apr 2025 11:25:47 +0000 (13:25 +0200)] 
mkosi: Use mkosi.tools.conf for tools tree configuration

This allows us to use the regular settings instead of having to bother
with ToolsTreeXXX variants. It'll also allow us to share configuration
between the regular images and the tools tree image, which we'll make
use of in the next commit.

7 months agobuild(deps): bump redhat-plumbers-in-action/download-artifact
dependabot[bot] [Tue, 1 Apr 2025 09:28:20 +0000 (09:28 +0000)] 
build(deps): bump redhat-plumbers-in-action/download-artifact

Bumps [redhat-plumbers-in-action/download-artifact](https://github.com/redhat-plumbers-in-action/download-artifact) from 1.1.1 to 1.1.5.
- [Release notes](https://github.com/redhat-plumbers-in-action/download-artifact/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/download-artifact/compare/463ae626ac2dd333491c7beccaa24c12c5c259b8...103e5f882470b59e9d71c80ecb2d0a0b91a7c43b)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/download-artifact
  dependency-version: 1.1.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
7 months agobuild(deps): bump super-linter/super-linter from 7.2.1 to 7.3.0
dependabot[bot] [Tue, 1 Apr 2025 09:28:18 +0000 (09:28 +0000)] 
build(deps): bump super-linter/super-linter from 7.2.1 to 7.3.0

Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.2.1 to 7.3.0.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d...4e8a7c2bf106c4c766c816b35ec612638dc9b6b2)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
7 months agoudev-spawn: voidify pidref_kill_and_sigcont()
Yu Watanabe [Wed, 2 Apr 2025 04:20:40 +0000 (13:20 +0900)] 
udev-spawn: voidify pidref_kill_and_sigcont()

Follow-up for cdd2dd2d58f34d32ee3957aa05860a513909d400.
Fixes CID#1596076.

7 months agotest: drop unnecessary '>= 0' in ASSERT_OK()
Yu Watanabe [Wed, 2 Apr 2025 04:23:47 +0000 (13:23 +0900)] 
test: drop unnecessary '>= 0' in ASSERT_OK()

Follow-up for 2351bc991e3a4f1fbdaa2d53900980b6703babbd.
Fixes CID#1596075.

7 months agomkosi: Drop number prefixes from configuration files
Daan De Meyer [Tue, 1 Apr 2025 11:23:02 +0000 (13:23 +0200)] 
mkosi: Drop number prefixes from configuration files

We already removed these in some places, let's migrate the others as
well. There's no ordering required at all between these configuration
files so let's not bother with any numbered prefixes.

7 months agomkosi: Drop orphan_file workaround
Daan De Meyer [Tue, 1 Apr 2025 11:22:29 +0000 (13:22 +0200)] 
mkosi: Drop orphan_file workaround

mkosi now handles this workaround itself internally.

7 months agomkosi: Update to latest
Daan De Meyer [Tue, 1 Apr 2025 11:22:09 +0000 (13:22 +0200)] 
mkosi: Update to latest

7 months agounit: don't bother determining unit install state for transient or perpetual units...
Yu Watanabe [Tue, 1 Apr 2025 18:15:02 +0000 (03:15 +0900)] 
unit: don't bother determining unit install state for transient or perpetual units (#36504)

7 months agobuild(deps): bump meson from 1.6.0 to 1.6.1 in /.github/workflows
dependabot[bot] [Tue, 1 Apr 2025 09:57:05 +0000 (09:57 +0000)] 
build(deps): bump meson from 1.6.0 to 1.6.1 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
7 months agomeson: Set PYTHONDONTWRITEBYTECODE=1 in test environment
Daan De Meyer [Tue, 1 Apr 2025 14:11:14 +0000 (16:11 +0200)] 
meson: Set PYTHONDONTWRITEBYTECODE=1 in test environment

Let's not pollute the source tree with __pycache__ files.

7 months agouser-runtime-dir: correct quota size calculation (#36884)
Yu Watanabe [Tue, 1 Apr 2025 15:59:09 +0000 (00:59 +0900)] 
user-runtime-dir: correct quota size calculation (#36884)

7 months agounit: return a better error state for unit_get_unit_file_preset() if we have no fragm... 36504/head
Lennart Poettering [Wed, 26 Feb 2025 16:59:42 +0000 (17:59 +0100)] 
unit: return a better error state for unit_get_unit_file_preset() if we have no fragment path

We'd previously return what was already set. Let's instead return a
clear ENOEXEC in this case, to make clear what is going on: preset logic
doesn't apply to units which lag a fragment path.

7 months agounit: initialize unit_file_preset field to valid value
Lennart Poettering [Wed, 26 Feb 2025 16:57:19 +0000 (17:57 +0100)] 
unit: initialize unit_file_preset field to valid value

"-1" is not a valid enum value. Use a better one. All code using this
considers negative values error codes anyway, hence the old code was
just a weird way to write -EPERM. Let's clean this up.

7 months agounit: don't bother determining unit install state for transient or perpetual units
Lennart Poettering [Mon, 24 Feb 2025 22:35:57 +0000 (23:35 +0100)] 
unit: don't bother determining unit install state for transient or perpetual units

I noticed that we keep querying the preset database for transient units,
which makes little sense, since transient units are well, transient, and
hence not suject to enablement/disablement. Hence, let's shortcut things
and simply not check the preset database for them.

While we are at it, shortcut unit file state checks for transient units,
too.  We know they are transient already, we can return that directly,
no need to go to disk.

Finally, treat perpetual units like transient units for the the preset
case: also bypass the preset database. (But keep checking for the unit
file state for them, since it *is* relevant to know whether they were
generated or not.)

7 months agonotify-recv: several follow-ups for notify_socket_prepare()
Yu Watanabe [Tue, 1 Apr 2025 10:15:59 +0000 (19:15 +0900)] 
notify-recv: several follow-ups for notify_socket_prepare()

Follow-ups for 2351bc991e3a4f1fbdaa2d53900980b6703babbd.
Addresses post-merge review:
https://github.com/systemd/systemd/pull/36911#pullrequestreview-2732136658

7 months agotest: fix usage of --hostnqn= (#36927)
Luca Boccassi [Tue, 1 Apr 2025 13:04:23 +0000 (14:04 +0100)] 
test: fix usage of --hostnqn= (#36927)

Fixes #36908.

7 months agotest and manpages follow-ups (#36924)
Luca Boccassi [Tue, 1 Apr 2025 12:52:14 +0000 (13:52 +0100)] 
test and manpages follow-ups (#36924)

7 months agoTEST-46-HOMED: conditionally skip usrquota tests 36884/head
Zbigniew Jędrzejewski-Szmek [Mon, 31 Mar 2025 20:50:38 +0000 (22:50 +0200)] 
TEST-46-HOMED: conditionally skip usrquota tests

The tests were failing, because the quota was not enforced.
It seems that we simply don't have privileges to set or display the quota.
The test is running priviled, so this is probably some SELinux:
TEST-46-HOMED.sh[117]: + /usr/lib/systemd/tests/unit-tests/manual/test-display-quota tmpfsquota /dev/shm /tmp
TEST-46-HOMED.sh[1103]: Lacking privileges to query UID quota on /dev/shm: Operation not permitted
TEST-46-HOMED.sh[1103]: Lacking privileges to query UID quota on /tmp: Operation not permitted

If we cannot display the quota, ignore the test results.
In a local run under mkosi, quota is shown and the tests pass. So this is something
about how the testing-farm:fedora-rawhide-x86_64 is configured.

7 months agoTEST-46-HOMED: check for support on /dev/shm and /tmp separately
Zbigniew Jędrzejewski-Szmek [Sat, 29 Mar 2025 08:24:34 +0000 (09:24 +0100)] 
TEST-46-HOMED: check for support on /dev/shm and /tmp separately

The test fails in CI. My guess was this is because the enablement of quota on
/tmp and /dev/shm is independent. The former fs is mounted by systemd in the
host, while the latter is mounted in the initrd, so we can end up with quota
support on one but not the other, which is the situation I had on my laptop.
This wasn't actually the source of the problems in CI, but it's a reasonable
change to make anyway.

While at it, test both mountpoints separately.

7 months agotest-display-quota: add a little helper binary to show quota on tmpfs
Zbigniew Jędrzejewski-Szmek [Fri, 28 Mar 2025 17:45:23 +0000 (18:45 +0100)] 
test-display-quota: add a little helper binary to show quota on tmpfs

quota from quota project fails:
$ quota
quota: Cannot stat() mounted device tmpfs: No such file or directory
quota: Cannot stat() mounted device tmpfs: No such file or directory

Having this helper helped me understand what is going on with the quotas when
the tests failed. I think it'd be useful to keep it around for now, even though
it is not actually connected in the tests.

7 months agotest: replace deprecated --hostid= with --hostnqn= 36927/head
Yu Watanabe [Tue, 1 Apr 2025 10:00:50 +0000 (19:00 +0900)] 
test: replace deprecated --hostid= with --hostnqn=

Fixes #36908.

7 months agoman: add missing conditional 36924/head
Luca Boccassi [Tue, 1 Apr 2025 09:40:45 +0000 (10:40 +0100)] 
man: add missing conditional

Follow-up for d95818f5221d9b9b19648cffa0cb2407f023b27e

man: run 'update-man-rules' again

7 months agotest: use 'exit 0' instead of 'return' in test scripts
Luca Boccassi [Tue, 1 Apr 2025 08:55:52 +0000 (09:55 +0100)] 
test: use 'exit 0' instead of 'return' in test scripts

14385s [   66.896852] TEST-87-AUX-UTILS-VM.sh[3744]: + test -x /usr/lib/systemd/systemd-validatefs
14385s [   66.898544] TEST-87-AUX-UTILS-VM.sh[3744]: + echo 'no systemd-validatefs'
14385s [   66.899115] TEST-87-AUX-UTILS-VM.sh[3744]: no systemd-validatefs
14385s [   66.899699] TEST-87-AUX-UTILS-VM.sh[3744]: + return
14385s [   66.900189] TEST-87-AUX-UTILS-VM.sh[3744]: .//usr/lib/systemd/tests/testdata/units/TEST-87-AUX-UTILS-VM.validatefs.sh: line 13: return: can only `return' from a function or sourced script

Follow-up for 6e003d18bbf5e9f55c08b25d80b138b3a98d5f26

7 months agoRevert "test: call nvme-cli with --hostnqn= instead of the deprecated --hostid="
Yu Watanabe [Tue, 1 Apr 2025 09:58:43 +0000 (18:58 +0900)] 
Revert "test: call nvme-cli with --hostnqn= instead of the deprecated --hostid="

This reverts commit b8942f4ae2d121603544b8527a7faf7fc458562c.

As commented https://github.com/systemd/systemd/issues/36908#issuecomment-2768507373,
the usage of --hostnqn= is different from --hostid=.

7 months agoshared/mount-setup: use '' to signify empty option string 36921/head
Zbigniew Jędrzejewski-Szmek [Tue, 1 Apr 2025 09:08:33 +0000 (11:08 +0200)] 
shared/mount-setup: use '' to signify empty option string

We said:
systemd[1]: Mounting efivarfs to /sys/firmware/efi/efivars of type efivarfs with options n/a.
I think '' is clearer.

7 months agohibernate-resume: restore full message if resume fails
Zbigniew Jędrzejewski-Szmek [Tue, 1 Apr 2025 08:49:12 +0000 (10:49 +0200)] 
hibernate-resume: restore full message if resume fails

We had a INFO message before 760e99bb52dd132aeab14802c9ed2889471e9cdf. Logging
at INFO level made sense back when we didn't have the EFI variable and people
would set resume= on the kernel command line. Nowadays, if we have the
hibernation info, then we expect it to be accurate. Log at WARN level if we
have the EFI variable and the resume fails for any reason, and at INFO
otherwise.

OTOH, we already print errors immediately when that happens, and if the resume
failed in the kernel, the kernel should log on its own. So just use WARN, not
ERR.

7 months agoudev-spawn: manage spawned processes by PidRef
Yu Watanabe [Tue, 1 Apr 2025 06:54:24 +0000 (15:54 +0900)] 
udev-spawn: manage spawned processes by PidRef

7 months agoudev: trivial cleanups (#36916)
Yu Watanabe [Tue, 1 Apr 2025 09:24:34 +0000 (18:24 +0900)] 
udev: trivial cleanups (#36916)

7 months agointroduce notify_socket_prepare() and use it where applicable (#36911)
Yu Watanabe [Tue, 1 Apr 2025 09:20:47 +0000 (18:20 +0900)] 
introduce notify_socket_prepare() and use it where applicable (#36911)

This introduces notify_socket_prepare(), which creates an autobind
notify socket and IO event source for the socket. Then, use it where we
send notification messages from worker processes to their manager
process.

7 months agoman: run 'update-man-rules' again
Lennart Poettering [Tue, 1 Apr 2025 07:26:10 +0000 (09:26 +0200)] 
man: run 'update-man-rules' again

7 months agoudev: update log messages 36916/head
Yu Watanabe [Tue, 1 Apr 2025 06:39:37 +0000 (15:39 +0900)] 
udev: update log messages

7 months agoudev: disable timer event source for cleaning up idle workers when no worker exists
Yu Watanabe [Tue, 1 Apr 2025 06:36:45 +0000 (15:36 +0900)] 
udev: disable timer event source for cleaning up idle workers when no worker exists

No functional change, as the timer event does nothing when there are no
workers.

7 months agotest: call nvme-cli with --hostnqn= instead of the deprecated --hostid=
Luca Boccassi [Mon, 31 Mar 2025 22:05:04 +0000 (23:05 +0100)] 
test: call nvme-cli with --hostnqn= instead of the deprecated --hostid=

Fixes https://github.com/systemd/systemd/issues/36908

7 months agoTEST-46-HOMED: write zeros instead of random bytes
Zbigniew Jędrzejewski-Szmek [Fri, 28 Mar 2025 17:00:38 +0000 (18:00 +0100)] 
TEST-46-HOMED: write zeros instead of random bytes

This should be faster, and equivalent for the purposes of quota calculation.

7 months agouser-runtime-dir: correct quota size calculation
Mike Yuan [Mon, 3 Feb 2025 15:18:14 +0000 (16:18 +0100)] 
user-runtime-dir: correct quota size calculation

Follow-up for b1c95fb2e9d11fc190017dec3d64f468f9d378bc

Fixes #36245