Yu Watanabe
0f2373f214
Several cleanups for rc-local-generator ( #36953 )
2025-04-03 04:05:45 +09:00
Yu Watanabe
2e338f3ac1
logind: utmp fix ( #36958 )
...
Fixes : #36930
2025-04-03 02:41:26 +09:00
Yu Watanabe
8ebc5cf91d
udevdm: use PidRef at one more place ( #36959 )
2025-04-03 02:26:42 +09:00
Yu Watanabe
fd386a6a9d
tree-wide: pass -EBADF to device_monitor_new_full()
...
Prompted by https://github.com/systemd/systemd/pull/36922#discussion_r2024940885 .
2025-04-03 02:14:52 +09:00
Yu Watanabe
5833a3340c
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.
2025-04-03 02:09:36 +09:00
Yu Watanabe
abaa8bc7ca
some selinux modernizations ( #36955 )
2025-04-03 01:30:03 +09:00
Yu Watanabe
d4a6d44210
udev: introduce rm_rf_safep() and modernize udev_watch_restore() ( #36923 )
2025-04-03 01:28:34 +09:00
victor-ok
3365c40640
test: converted unittest in src/test/test-mkdir.c to use new ASSERT_OK() macros and friends
2025-04-03 01:21:18 +09:00
Yu Watanabe
011360eed3
meson: rename RC_LOCAL_PATH -> SYSTEM_SYSVRCLOCAL_PATH
...
No functional change, but just for emphasizing that this is for
SysV compatibility.
2025-04-03 00:19:49 +09:00
Yu Watanabe
74f25ea7a9
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.
2025-04-03 00:18:48 +09:00
Yu Watanabe
b0c9ba4eb1
core: delegate mountns implicitly when any of pidns/cgns/netns is in use, clean up private cgroupfs mount ( #36892 )
...
Fixes #36952
2025-04-03 00:15:33 +09:00
Lennart Poettering
5af674214a
logind: save logind session information to disk once we acquired it via utmp
...
Fixes : #36930
2025-04-02 17:12:42 +02:00
Lennart Poettering
700f37c367
logind: split utmp related code into logind-utmp.[ch]
...
No real changes, just moving of code around.
2025-04-02 17:12:42 +02:00
Yu Watanabe
7207bb0269
udevadm-lock: use PidRef
2025-04-03 00:11:27 +09:00
Yu Watanabe
147f1d7b26
process-util: make wait_for_terminate() as trivial wrapper of its PidRef version
2025-04-03 00:11:27 +09:00
Lennart Poettering
4ecc87bf1c
process-util: add pidref-based version of wait_for_terminate_and_check()
2025-04-03 00:11:27 +09:00
Yu Watanabe
4df96908d1
udev-manager: use PidRef for managing worker processes
2025-04-02 23:30:40 +09:00
Yu Watanabe
0ba9d06963
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.
2025-04-02 23:27:15 +09:00
Yu Watanabe
aac642ddc1
udev: split out error code assignment and move them to udev-error.c
...
No functional change, just refactoring and preparation for later change.
2025-04-02 23:24:35 +09:00
Yu Watanabe
4090767a22
udev-manager: broadcast event in event_requeue() on failure
...
Also, send the actual error code rather than ETIMEDOUT.
2025-04-02 23:24:35 +09:00
Yu Watanabe
32333754ae
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.
2025-04-02 23:24:35 +09:00
Yu Watanabe
f35bd6ec49
udev-watch: modernize udev_watch_restore()
2025-04-02 23:18:43 +09:00
Yu Watanabe
1b84efa4cd
rm-rf: introduce rm_rf_safe() and rm_rf_safep()
2025-04-02 23:18:43 +09:00
Lennart Poettering
ec88828430
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.
2025-04-02 16:09:20 +02:00
Lennart Poettering
ab4a5982c1
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.
2025-04-02 16:09:20 +02:00
Luca Boccassi
f5c626df2c
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.
2025-04-02 15:04:20 +01:00
herbrechtsmeier
c0b3b3af3e
hostnamed: fix incorrect usage of device_dmi ( #36948 )
...
Fix incorrect usage of device_dmi in context_acquire_device_tree().
Follow-up for 3e91aed6c4 .
2025-04-02 21:41:44 +09:00
Daan De Meyer
01d1952994
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.
2025-04-02 14:25:27 +02:00
Andreas Schneider
fd784642a2
docs/user_record: Put timeZone and resourceLimits in their own paragraph
2025-04-02 20:33:37 +09:00
Zbigniew Jędrzejewski-Szmek
ab8b6634fd
man/pstore.conf: pstore.conf template is not always installed in /etc
...
"Inspired" by 798faa6fef ;)
2025-04-02 20:32:17 +09:00
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