Commit Graph
80447 Commits
Author SHA1 Message Date
Daan De Meyer aa299a99f1 mkosi: Various improvements and fixes (#36931) 2025-04-02 13:02:10 +02:00
dependabot[bot] 2987ab5bf0 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>
2025-04-02 11:52:29 +02:00
wtmpx 798faa6fef man: coredump.conf template is not always installed in /etc
The default installation path can be configured with the -Dconfigfiledir= option
2025-04-02 11:39:46 +02:00
Zbigniew Jędrzejewski-Szmek 5b7c1f34e1 Tweak log messages around efivarsfs and hibernation (#36921) 2025-04-02 11:30:26 +02:00
Daan De Meyer ce68d4349e 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.
2025-04-02 10:34:03 +02:00
Daan De Meyer 9ead378ba0 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.
2025-04-02 10:34:01 +02:00
dependabot[bot] 66644c37e0 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>
2025-04-02 16:42:26 +09:00
dependabot[bot] 9595d276d6 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>
2025-04-02 16:41:50 +09:00
Yu Watanabe 624e14d271 udev-spawn: voidify pidref_kill_and_sigcont()
Follow-up for cdd2dd2d58.
Fixes CID#1596076.
2025-04-02 16:31:54 +09:00
Yu Watanabe 9686e94d9a test: drop unnecessary '>= 0' in ASSERT_OK()
Follow-up for 2351bc991e.
Fixes CID#1596075.
2025-04-02 16:31:22 +09:00
Daan De Meyer 1852c92592 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.
2025-04-01 21:38:49 +02:00
Daan De Meyer ac6f490032 mkosi: Drop orphan_file workaround
mkosi now handles this workaround itself internally.
2025-04-01 21:38:49 +02:00
Daan De Meyer 75930315f6 mkosi: Update to latest 2025-04-01 21:38:46 +02:00
Yu Watanabe a68457e0f3 unit: don't bother determining unit install state for transient or perpetual units (#36504) 2025-04-02 03:15:02 +09:00
dependabot[bot] 25ef5d4979 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>
2025-04-01 18:34:53 +02:00
Daan De Meyer 51b74abb48 meson: Set PYTHONDONTWRITEBYTECODE=1 in test environment
Let's not pollute the source tree with __pycache__ files.
2025-04-01 18:34:00 +02:00
Yu Watanabe 34ae6b682b user-runtime-dir: correct quota size calculation (#36884) 2025-04-02 00:59:09 +09:00
Lennart Poettering cb16d39163 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.
2025-04-01 16:47:41 +02:00
Lennart Poettering 7cb7f8b8e4 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.
2025-04-01 16:44:21 +02:00
Lennart Poettering e735bc49ac 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.)
2025-04-01 16:44:20 +02:00
Yu Watanabe c5855d9640 notify-recv: several follow-ups for notify_socket_prepare()
Follow-ups for 2351bc991e.
Addresses post-merge review:
https://github.com/systemd/systemd/pull/36911#pullrequestreview-2732136658
2025-04-01 22:22:10 +09:00
Luca Boccassi 79bc7625f6 test: fix usage of --hostnqn= (#36927)
Fixes #36908.
2025-04-01 14:04:23 +01:00
Luca Boccassi a20c2d6589 test and manpages follow-ups (#36924) 2025-04-01 13:52:14 +01:00
Zbigniew Jędrzejewski-Szmek f77a8edfef 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.
2025-04-01 14:16:40 +02:00
Zbigniew Jędrzejewski-Szmek cb86668f2c 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.
2025-04-01 14:16:40 +02:00
Zbigniew Jędrzejewski-Szmek cb6b161162 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.
2025-04-01 14:16:40 +02:00
Yu Watanabe c70a113a6c test: replace deprecated --hostid= with --hostnqn=
Fixes #36908.
2025-04-01 19:01:45 +09:00
Luca Boccassi b73a042ab0 man: add missing conditional
Follow-up for d95818f522

man: run 'update-man-rules' again
2025-04-01 10:59:27 +01:00
Luca Boccassi 4b85218629 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 6e003d18bb
2025-04-01 10:59:27 +01:00
Yu Watanabe 699c377d0d Revert "test: call nvme-cli with --hostnqn= instead of the deprecated --hostid="
This reverts commit b8942f4ae2.

As commented https://github.com/systemd/systemd/issues/36908#issuecomment-2768507373,
the usage of --hostnqn= is different from --hostid=.
2025-04-01 18:58:43 +09:00
Zbigniew Jędrzejewski-Szmek 0a5b70f3b1 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.
2025-04-01 11:28:00 +02:00
Zbigniew Jędrzejewski-Szmek 61b76b3a1a hibernate-resume: restore full message if resume fails
We had a INFO message before 760e99bb52. 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.
2025-04-01 11:25:32 +02:00
Yu Watanabe cdd2dd2d58 udev-spawn: manage spawned processes by PidRef 2025-04-01 18:25:29 +09:00
Yu Watanabe b15c676b6e udev: trivial cleanups (#36916) 2025-04-01 18:24:34 +09:00
Yu Watanabe 5f8e8186e0 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.
2025-04-01 18:20:47 +09:00
Lennart Poettering 1e79a29233 man: run 'update-man-rules' again 2025-04-01 09:26:27 +02:00
Yu Watanabe 6941bf6b77 udev: update log messages 2025-04-01 15:55:52 +09:00
Yu Watanabe cff85857c7 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.
2025-04-01 15:55:52 +09:00
Luca Boccassi b8942f4ae2 test: call nvme-cli with --hostnqn= instead of the deprecated --hostid=
Fixes https://github.com/systemd/systemd/issues/36908
2025-04-01 11:36:58 +09:00
Zbigniew Jędrzejewski-Szmek 5399910671 TEST-46-HOMED: write zeros instead of random bytes
This should be faster, and equivalent for the purposes of quota calculation.
2025-03-31 22:46:04 +02:00
Mike Yuan 6790db81d6 user-runtime-dir: correct quota size calculation
Follow-up for b1c95fb2e9

Fixes #36245
2025-03-31 22:46:04 +02:00
Yu Watanabe 451277707d validatefs: several follow-ups (#36910) 2025-04-01 05:35:21 +09:00
Yu Watanabe 759eab02da udev: trivial cleanups (#36912) 2025-04-01 05:34:32 +09:00
Yu Watanabe 4c42fc6aa8 sysupdated: use notify_socket_prepare()
This also make it use autobind notify socket.
2025-04-01 03:58:38 +09:00
Yu Watanabe 0ffddd23f4 sysupdate-transfer: use notify_socket_prepare() 2025-04-01 03:58:38 +09:00
Yu Watanabe 66936ba5fa sysupdate-transfer: fix potential memleak 2025-04-01 03:58:38 +09:00
Yu Watanabe 6228924d6e notify: use notify_socket_prepare() 2025-04-01 03:58:38 +09:00
Yu Watanabe adfd9fe14c import: use notify_socket_prepare()
This also make it use autobind notify socket.
2025-04-01 03:58:38 +09:00
Yu Watanabe 0f627f9b35 homed: use notify_socket_prepare()
This also make it use autobind notify socket.
2025-04-01 03:58:34 +09:00
Yu Watanabe 2f973db276 udev-manager: coding style cleanups 2025-04-01 03:34:41 +09:00