]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
15 months agomkosi: update opensuse commit reference 33636/head
Daan De Meyer [Wed, 10 Jul 2024 12:20:34 +0000 (14:20 +0200)] 
mkosi: update opensuse commit reference

*   8c025c3bdf Accepting request 1184267 from Base:System
|\
| * 735f8c4ba4 - Import commit 5a8eadd0c021758337a020c423f25a353bdb9b3c (merge of v255.8)   For a complete list of changes, visit:   https://github.com/openSUSE/systemd/compare/603cd1d4d81147d4f2eccd5e352064a4215119b4...5a8eadd0c021758337a020c423f25a353bdb9b3c - Drop 5003-Revert-run-pass-the-pty-slave-fd-to-transient-servic.patch as v255.8   contains the workaround (commit 639c922ede9485) for the broken commit   28459ba1f4df.
* | 37853fecc3 Accepting request 1183029 from Base:System
|/
638de11012 - Don't automatically clean unmodified config files up (bsc#1226415)
369c023c24 reorder one more time...
ffa9f0ac80 reorder the runtime deps of the testsuite package so the format_spec_file thingy stop screwing up the spec file...
12c1190a79 fix rev 1529: the devel packages are really needed by the testsuite script to install the dlopened libs into the image
ca8e7f54ce - systemd.spec: move a misplaced %endif in the testsuite sub-package.
b7944f5b14 - Merge systemd-coredump back into the main package (bsc#1091684)
3fa0dea84a - Don't pull the devel packages in when installing the testsuite package.

15 months agotools/update-distro-hash: Fix path
Daan De Meyer [Wed, 10 Jul 2024 12:34:32 +0000 (14:34 +0200)] 
tools/update-distro-hash: Fix path

15 months agoTEST-06-SELINUX: Various fixes
Daan De Meyer [Tue, 9 Jul 2024 10:26:11 +0000 (12:26 +0200)] 
TEST-06-SELINUX: Various fixes

- Stop installing the policy in the initramfs as it's not really
supported anyway (https://github.com/fedora-selinux/selinux-policy/issues/2221)
- Stop relabeling on first boot and prefer to do it at image build time
- Disable mkosi relabeling by default but enable it in CI
- Build image as root in CI so the SELinux relabeling works properly

15 months agomkosi: Don't fail if /var/log/journal does not exist
Daan De Meyer [Fri, 5 Jul 2024 09:24:27 +0000 (11:24 +0200)] 
mkosi: Don't fail if /var/log/journal does not exist

15 months agotest: Switch to ncat instead of nc
Daan De Meyer [Fri, 5 Jul 2024 08:27:56 +0000 (10:27 +0200)] 
test: Switch to ncat instead of nc

ncat is available in CentOS Stream 9 without having to enable EPEL.

15 months agoTEST-55-OOMD: Switch to stress-ng
Daan De Meyer [Fri, 5 Jul 2024 07:58:17 +0000 (09:58 +0200)] 
TEST-55-OOMD: Switch to stress-ng

stress-ng is available in OpenSUSE and in CentOS Stream without needing
EPEL so let's switch to it instead of stress.

15 months agomkosi: Update to latest
Daan De Meyer [Wed, 10 Jul 2024 14:52:54 +0000 (16:52 +0200)] 
mkosi: Update to latest

15 months agoman: some fixes
Lennart Poettering [Fri, 5 Jul 2024 16:52:07 +0000 (18:52 +0200)] 
man: some fixes

Addons are called addons, say so. And some other fixes.

15 months agomkosi: Check for configured build directory if WIPE=1
Daan De Meyer [Tue, 9 Jul 2024 18:02:47 +0000 (20:02 +0200)] 
mkosi: Check for configured build directory if WIPE=1

Otherwise trying to use --wipe might fail if the build directory
has not been configured but is not empty either.

15 months agoman: fix typo in unit options section
Kuntal Majumder [Tue, 9 Jul 2024 17:11:52 +0000 (19:11 +0200)] 
man: fix typo in unit options section

Fixes #32918

15 months agotest: install split-out sshd-session binary if present
Luca Boccassi [Tue, 9 Jul 2024 17:42:06 +0000 (18:42 +0100)] 
test: install split-out sshd-session binary if present

Archlinux split out one ssh binary, install it in the legacy test
setup if present for the tests that need ssh

15 months agofsck: do not pull down mount units on soft-reboot
Luca Boccassi [Mon, 8 Jul 2024 15:23:06 +0000 (16:23 +0100)] 
fsck: do not pull down mount units on soft-reboot

Otherwise they will pull down the disk too, which we don't want on soft-reboot

15 months agologind-dbus: set gc_mode to USER_GC_BY_PIN when disable linger
Tom Yan [Mon, 8 Jul 2024 14:10:43 +0000 (22:10 +0800)] 
logind-dbus: set gc_mode to USER_GC_BY_PIN when disable linger

The mode switch from any to pin is currently done in create_session().
However, if no (pinning) session is created before (or after) linger
is disabled, the user will not be gc'd after that. Therefore, also
perform the mode switch when linger is being disabled.

15 months agoAdd or fix mount matrix for multiple handhelds. (#33586)
Derek J. Clark [Tue, 9 Jul 2024 09:57:04 +0000 (02:57 -0700)] 
Add or fix mount matrix for multiple handhelds. (#33586)

- Breaks AYANEO AIR family into different entries as not all are mounted the same.
- Corrects AYANEO AIR mount matrix.
- Adds mount matrices for AYANEO device families: 2021, AYANEO 2, AYANEO GEEK, and AYANEO FLIP
- Adds mount matrix for GPD WinMax2
- Adds mount matrix for OrangePi NEO

16 months agoman: fix typo in the alias symlink name
ZHANG Yuntian [Fri, 5 Jul 2024 09:04:44 +0000 (17:04 +0800)] 
man: fix typo in the alias symlink name

Symlink created by Alias will use the value as the file name.

16 months agoAdd MSI Claw AT Keyboard Scancodes.
Derek J. Clark [Wed, 3 Jul 2024 04:27:13 +0000 (21:27 -0700)] 
Add MSI Claw AT Keyboard Scancodes.

16 months agomkosi: Fix git commit
Daan De Meyer [Tue, 9 Jul 2024 06:07:53 +0000 (08:07 +0200)] 
mkosi: Fix git commit

In https://github.com/systemd/systemd/pull/33659 the commit was
updated to point to my fork without changing it back after the mkosi
PR was merged so let's change it back to point to the official
repository.

16 months agomkosi: Adapt configuration to take into account configuration rework
Daan De Meyer [Mon, 8 Jul 2024 10:59:52 +0000 (12:59 +0200)] 
mkosi: Adapt configuration to take into account configuration rework

In https://github.com/systemd/mkosi/pull/2847, the '@' specifier is
removed, CLI arguments take priority over configuration files again
and the "main" image is defined at the top level instead of in
mkosi.images/. Additionally, not every setting from the top level
configuration is inherited by the images in mkosi.images/ anymore,
only settings which make sense to be inherited are inherited.

This commit gets rid of all the usages of '@', moves the "main" image
configuration from mkosi.images/system to the top level and gets rid
of various hacks we had in place to deal with quirks of the old
configuration parsing logic.

We also remove usages of Images= and --append as these options are
removed by the mentioned PR.

16 months agomkosi: policykit-1 was renamed to polkitd
Luca Boccassi [Mon, 8 Jul 2024 15:44:01 +0000 (16:44 +0100)] 
mkosi: policykit-1 was renamed to polkitd

16 months agoMerge pull request #33627 from YHNdnzj/systemctl-triggering-warning
Mike Yuan [Mon, 8 Jul 2024 12:01:17 +0000 (14:01 +0200)] 
Merge pull request #33627 from YHNdnzj/systemctl-triggering-warning

systemctl: some fixes for active triggering unit warning

16 months agovmspawn: define default machines for mips targets
Henry Chen [Fri, 5 Jul 2024 03:19:35 +0000 (11:19 +0800)] 
vmspawn: define default machines for mips targets

All mips variants of qemu-system default to malta.

Signed-off-by: Henry Chen <henry.chen@oss.cipunited.com>
Signed-off-by: Henry Chen <chenx97@aosc.io>
16 months agoMerge pull request #33640 from DaanDeMeyer/ext4-split
Daan De Meyer [Mon, 8 Jul 2024 10:56:09 +0000 (12:56 +0200)] 
Merge pull request #33640 from DaanDeMeyer/ext4-split

mkosi: Use the "default" root filesystem for each distribution

16 months agoMerge pull request #33599 from keszybz/link-executor-statically
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2024 10:46:41 +0000 (12:46 +0200)] 
Merge pull request #33599 from keszybz/link-executor-statically

Link executor statically

16 months agoUpdate 60-sensor.hwdb
csp5me [Mon, 8 Jul 2024 08:28:54 +0000 (15:28 +0700)] 
Update 60-sensor.hwdb

This update has been tested on the 2023 Chuwi Freebook N100. The hwdb entry has been verified using these commands:
cat /sys/`udevadm info -q path -n /dev/iio:device0`/../modalias
acpi:MDA6655:MDA6655:

cat /sys/class/dmi/id/modalias
dmi:bvnAmericanMegatrendsInternational,LLC.:bvrDNN20AV1.03:bd12/29/2023:br1.3:efr0.7:svnCHUWIInnovationAndTechnology(ShenZhen)co.,Ltd:pnFreeBook:pvrDefaultstring:rvnDefaultstring:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct10:cvrDefaultstring:skuDefaultstring:

The correct offset orientation has been tested with:
monitor-sensor
    Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal)
=== No ambient light sensor
=== No proximity sensor

16 months agopath: drop IN_ATTRIB from parent directory watches
Ronan Pigott [Mon, 1 Jul 2024 21:07:28 +0000 (14:07 -0700)] 
path: drop IN_ATTRIB from parent directory watches

When watching a given pathspec, systemd unconditionally installs
IN_ATTRIB watches to track the link count of the resolved file. This
way, we are notified if the watched path disappears, even if the
resolved file inode is not removed.

Similarly, systemd installs inotify watches on each parent directory, to
be notified when the specified path appears. However, for these watches
IN_ATTRIB is an unnecessary addition to the mask. In inotify, IN_ATTRIB
on a directory is emitted whenever the attributes of any child changes,
which, for many paths, has the potential to cause a high number of
spurious wakeups in systemd. Let's remove IN_ATTRIB from the mask when
installing watches on the parent directories of the specified path.

16 months agofirstboot: Make the option list fit 80 columns
Fabian Vogt [Tue, 2 Jul 2024 14:15:50 +0000 (16:15 +0200)] 
firstboot: Make the option list fit 80 columns

22 characters in three colums + overhead slightly exceeds the available
width on terminals with 80 columns, causing each row to wrap to two lines.
Reduce the item width to 20 to fit even the list of ~600 timezones.

16 months agostub: Add support for .ucode EFI addons
Tobias Fleig [Wed, 3 Jul 2024 12:13:29 +0000 (05:13 -0700)] 
stub: Add support for .ucode EFI addons

This extends #31872 to also load microcode from addon files.

16 months agomkosi: Use the "default" root filesystem for each distribution 33640/head
Daan De Meyer [Fri, 5 Jul 2024 07:35:43 +0000 (09:35 +0200)] 
mkosi: Use the "default" root filesystem for each distribution

Let's not insist on btrfs everywhere. 93440db8b5eae1244aaf5fecfa68050a8b26f3e3
switched us back to btrfs as we wanted to rely on the fact it records
timestamps properly. Since we now prefer to do incremental builds on the host
with "mkosi -t none" we don't mind anymore that timestamps are not recorded
properly so we're not forced to use btrfs anymore.

This also increases test coverage as we'll now test with different root
filesystems.

16 months ago70-mouse.hwdb: Added Glorious Model O DPI
Riku [Sat, 6 Jul 2024 16:29:31 +0000 (19:29 +0300)] 
70-mouse.hwdb: Added Glorious Model O DPI

This rule might also apply to the regular Model O (no minus), which has the same specifications.

16 months agoRemove extra period at the end of systemd-bsod's unit description. (#33632)
fwfy [Sat, 6 Jul 2024 09:17:20 +0000 (05:17 -0400)] 
Remove extra period at the end of systemd-bsod's unit description. (#33632)

* Remove extra period at end of unit description.

Having an extra period at the end of this unit description makes log entries pertaining to it appear weirdly, as it seems the default expectation is that there is not to be a period at the end of a unit description.

e.g.: `systemd[1]: Started Displays emergency message in full screen..`

16 months agotest: Set priority for TEST-73-LOCALE
Daan De Meyer [Fri, 5 Jul 2024 20:31:55 +0000 (22:31 +0200)] 
test: Set priority for TEST-73-LOCALE

I don't know why yet, but TEST-73-LOCALE can take more than 10
minutes. Until we figure out why, let's give it a higher priority
so it doesn't bottleneck the test run.

16 months agoMerge pull request #33644 from DaanDeMeyer/selinux
Daan De Meyer [Fri, 5 Jul 2024 18:21:39 +0000 (20:21 +0200)] 
Merge pull request #33644 from DaanDeMeyer/selinux

TEST-06-SELINUX: Two fixes

16 months agoTEST-06-SELINUX: Disable RuntimeBuildSources= 33644/head
Daan De Meyer [Fri, 5 Jul 2024 17:20:42 +0000 (19:20 +0200)] 
TEST-06-SELINUX: Disable RuntimeBuildSources=

Otherwise fixfiles will try to relabel it which could potentially
lead to disaster. We also change the recommendation in HACKING.md
to set the default so that TEST-06-SELINUX can override it.

16 months agomkosi: Make .autorelabel file empty
Daan De Meyer [Fri, 5 Jul 2024 17:16:31 +0000 (19:16 +0200)] 
mkosi: Make .autorelabel file empty

The contents of this file are passed as arguments to fixfiles so
let's remove the comment as otherwise fixfiles just crashes.

16 months agomkosi: use apt pinning for locally built debian/ubuntu packages
Luca Boccassi [Fri, 5 Jul 2024 15:36:45 +0000 (16:36 +0100)] 
mkosi: use apt pinning for locally built debian/ubuntu packages

This ensures that even in case the distro repository has newer
versions, the locally built packages are preferred and installed,
even to the point of downgrading already installed ones.
This is needed especially for future stable branches, when the
distros will have a newer version.

16 months agomkosi: Update to latest
Daan De Meyer [Fri, 5 Jul 2024 10:00:53 +0000 (12:00 +0200)] 
mkosi: Update to latest

16 months agotest: Add missing --no-rebuild to doc
Daan De Meyer [Fri, 5 Jul 2024 14:06:34 +0000 (16:06 +0200)] 
test: Add missing --no-rebuild to doc

Otherwise meson will try to rebuild all targets.

16 months agohwdb: Added StarLabs StarLite position sensor mapping
GwynBleidD [Thu, 27 Jun 2024 20:52:57 +0000 (22:52 +0200)] 
hwdb: Added StarLabs StarLite position sensor mapping

Default mapping for position sensor in StarLabs StarLite does
not match screen orientation. Added fixed mapping matrix.

16 months agoFix key toggle touchpad button for multilaser ul154 (#33630)
Edson Juliano Drosdeck [Thu, 4 Jul 2024 22:38:38 +0000 (19:38 -0300)] 
Fix key toggle touchpad button for multilaser ul154 (#33630)

16 months agoMerge pull request #33629 from YHNdnzj/labeler-no-stable
Luca Boccassi [Thu, 4 Jul 2024 19:01:40 +0000 (21:01 +0200)] 
Merge pull request #33629 from YHNdnzj/labeler-no-stable

labeler: some cleanups

16 months agoworkflows/labeler: do not set labels on stable backport PRs 33629/head
Mike Yuan [Thu, 4 Jul 2024 18:55:53 +0000 (20:55 +0200)] 
workflows/labeler: do not set labels on stable backport PRs

16 months agolabeler: match all mkosi files
Mike Yuan [Thu, 4 Jul 2024 18:55:42 +0000 (20:55 +0200)] 
labeler: match all mkosi files

16 months agolabeler: remove matches for dropped files (Makefile)
Mike Yuan [Thu, 4 Jul 2024 18:54:19 +0000 (20:54 +0200)] 
labeler: remove matches for dropped files (Makefile)

16 months agosystemctl: do not try to acquire triggering units for template units 33627/head
Mike Yuan [Sun, 30 Jun 2024 11:12:45 +0000 (13:12 +0200)] 
systemctl: do not try to acquire triggering units for template units

16 months agosystemctl: skip triggering unit warning if unit vanished
Mike Yuan [Thu, 29 Feb 2024 15:45:54 +0000 (23:45 +0800)] 
systemctl: skip triggering unit warning if unit vanished

16 months agoman/systemctl: --no-reload is honored by mask/unmask/preset too
Mike Yuan [Fri, 28 Jun 2024 13:56:44 +0000 (15:56 +0200)] 
man/systemctl: --no-reload is honored by mask/unmask/preset too

16 months agohwdb: add more AV controllers
Davide Cavalca [Thu, 4 Jul 2024 14:30:57 +0000 (07:30 -0700)] 
hwdb: add more AV controllers

16 months agostub: mem fixes in devicetree addon handling (#33624)
tfg13 [Thu, 4 Jul 2024 18:08:55 +0000 (19:08 +0100)] 
stub: mem fixes in devicetree addon handling (#33624)

* stub: mem fixes in devicetree addon handling

Two bugs here: The elements are of size `DevicetreeAddon`, not `size_t`,
and `[]` binds stronger than `*`. This means the first element is ok,
but the second corrupts the stack.

Found this while refactoring #32463

16 months agovmm: make sure we can handle smbios objects without variable part
Lennart Poettering [Thu, 4 Jul 2024 12:34:35 +0000 (14:34 +0200)] 
vmm: make sure we can handle smbios objects without variable part

An smbios object with no variable part is a special case, it's just
suffixed with two NUL btes. handle that properly.

This is inspired by a similar fix from https://github.com/systemd/systemd/pull/29726

16 months agomeson: Fix various versions
Daan De Meyer [Thu, 4 Jul 2024 12:44:21 +0000 (14:44 +0200)] 
meson: Fix various versions

Follow up for 8b3b01c4b7e0fde39b4be354990ee68f5e612c52

We switch to PROJECT_VERSION instead of PROJECT_VERSION_FULL where
we report our version and which is likely being parsed to avoid
breaking compat. If we didn't, the output would change from systemd
255 to systemd 255.1 which could break various tools.

16 months agoREADME: update requirements for signed dm-verity
Luca Boccassi [Thu, 4 Jul 2024 15:58:46 +0000 (16:58 +0100)] 
README: update requirements for signed dm-verity

The newest kconfig enabling DB-verified dm-verity images is queued
for 6.11:

https://patchwork.kernel.org/project/dm-devel/patch/20240617220037.594792-1-luca.boccassi@gmail.com/

16 months agosysusers: handle NSS errors gracefully
Luca Boccassi [Thu, 4 Jul 2024 09:23:04 +0000 (10:23 +0100)] 
sysusers: handle NSS errors gracefully

If the io.systemd.DynamicUser or io.systemd.Machine files exist,
but nothing is listening on them, the nss-systemd module returns
ECONNREFUSED and systemd-sysusers fails to creat the user/group.

This is problematic when ran by packaging scripts, as the package
assumes that after this has run, the user/group exist and can
be used. adduser does not fail in the same situation.

Change sysusers to print a loud warning but otherwise continue
when NSS returns an error.

16 months agoMerge pull request #33589 from poettering/file-hiearchy-no-version
Lennart Poettering [Thu, 4 Jul 2024 14:43:31 +0000 (16:43 +0200)] 
Merge pull request #33589 from poettering/file-hiearchy-no-version

man: drop version info from file hiearchy man page

16 months agoman: fully adopt ~/.local/state/ 33589/head
Lennart Poettering [Wed, 3 Jul 2024 08:18:37 +0000 (10:18 +0200)] 
man: fully adopt ~/.local/state/

The XDG base dir spec adopted ~/.local/state/ as a thing a while back,
and we updated our docs in b4d6bc63e602048188896110a585aa7de1c70c9b, but
forgot to to update the table at the bottom to fully reflect the update.
Fix that.

16 months agoman: mention that distinction between /usr/lib/ and /usr/share/ is really about share...
Lennart Poettering [Wed, 3 Jul 2024 08:10:07 +0000 (10:10 +0200)] 
man: mention that distinction between /usr/lib/ and /usr/share/ is really about shared *ownership*

16 months agoman: drop version info from file hiearchy man page
Lennart Poettering [Wed, 3 Jul 2024 07:56:51 +0000 (09:56 +0200)] 
man: drop version info from file hiearchy man page

This file doesn't document features of systemd, but is more a of a
general description that generalizes/modernizes FHS. As such, the items
listed in it weren't "added" in systemd versions, they simply reflect
general concepts independent of any specific systemd version. hence
let's drop this misleading and confusing version info.

Or in other words, the man page currently claims under "/usr/": "Added
in version 215." – Which of course is rubbish, the directory existed
since time began.

This also rebreaks all paragaphs this touches.

No content changes.

16 months agoMerge pull request #33567 from poettering/boot-fixlets
Luca Boccassi [Thu, 4 Jul 2024 11:00:56 +0000 (13:00 +0200)] 
Merge pull request #33567 from poettering/boot-fixlets

sd-boot,sd-stub: a variety of smaller fixes

16 months agoos-util: avoid matching on the wrong extension-release file
Luca Boccassi [Wed, 3 Jul 2024 20:27:28 +0000 (21:27 +0100)] 
os-util: avoid matching on the wrong extension-release file

The previous commit tries to extract a substring from the
extension-release suffix, but that is not right, it's only the
images that need to be versioned and extracted, use the extension-release
suffix as-is. Otherwise if it happens to contain a prefix that
matches the wrong image, it will be taken into account.

Follow-up for 37543971aff79f3a37646ffc2bb5845c9394797b

16 months agomkosi: Build a disk image by default again
Daan De Meyer [Thu, 4 Jul 2024 10:13:31 +0000 (12:13 +0200)] 
mkosi: Build a disk image by default again

Now that we have a way to rebuild and reinstall systemd without
having to rebuild the image, let's default to building a disk image
again.

16 months agosrc/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build
Chen Qi [Thu, 4 Jul 2024 06:18:41 +0000 (23:18 -0700)] 
src/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build

The GIT_VERSION is changed to use VERSION_TAG, but in case of cross build
for src/boot/efi, it's not set, causing build error because the compiler cannot
know it's a macro thus treating it as some variable and error out.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
16 months agomeson: Deal with potential stable versions
Daan De Meyer [Thu, 4 Jul 2024 09:12:35 +0000 (11:12 +0200)] 
meson: Deal with potential stable versions

The meson.version file might contain e.g. 256.2~devel in a stable
branch so let's make sure we deal with that.

16 months agoload-fragment: allow MountImages= with paths starting with /dev
Topi Miettinen [Wed, 26 Jun 2024 19:06:41 +0000 (22:06 +0300)] 
load-fragment: allow MountImages= with paths starting with /dev

For MountImages=, if the source is a block device, it will most likely reside
in /dev. It should be also possible to mount a static device file system in
place of (or part of) /dev. So let's allow paths starting with /dev as an
exception for MountImages=.

16 months agotest: skip TEST-69-SHUTDOWN on Debian
Luca Boccassi [Thu, 4 Jul 2024 00:01:08 +0000 (01:01 +0100)] 
test: skip TEST-69-SHUTDOWN on Debian

There is a regression in the login package, skip the test until
it is fixed. https://bugs.debian.org/1075733

16 months agozsh: add run0 completions
Ronan Pigott [Wed, 3 Jul 2024 19:33:08 +0000 (12:33 -0700)] 
zsh: add run0 completions

16 months agoMerge pull request #33608 from DaanDeMeyer/hacking
Luca Boccassi [Wed, 3 Jul 2024 23:19:58 +0000 (01:19 +0200)] 
Merge pull request #33608 from DaanDeMeyer/hacking

docs: Update HACKING

16 months agodocs: Update HACKING 33608/head
Daan De Meyer [Wed, 3 Jul 2024 20:59:40 +0000 (22:59 +0200)] 
docs: Update HACKING

Let's mention the new way to install the latest changes without
rebuilding the image. Let's also remove the duplicate info about
distribution packages that is already mentioned in its own section.

16 months agomkosi: Install zypper in opensuse images
Daan De Meyer [Wed, 3 Jul 2024 20:48:37 +0000 (22:48 +0200)] 
mkosi: Install zypper in opensuse images

16 months agomkosi: Fix sync script git command
Daan De Meyer [Wed, 3 Jul 2024 20:18:07 +0000 (22:18 +0200)] 
mkosi: Fix sync script git command

Let's make sure we actually operate on the packaging git repo.

16 months agoREADME: add missing CONFIG_MEMCG kernel config option for oomd
James Hilliard [Wed, 3 Jul 2024 19:00:04 +0000 (13:00 -0600)] 
README: add missing CONFIG_MEMCG kernel config option for oomd

We need to enable this otherwise systemd-oomd.service fails to start.

Fixes:
ConditionControlGroupController=memory was not met

16 months agomkosi: update arch commit reference
Daan De Meyer [Wed, 3 Jul 2024 06:23:29 +0000 (08:23 +0200)] 
mkosi: update arch commit reference

d74b24c7c6 meson options: vcs-tag=false
7424fedef0 upgpkg: 256.1-1: new upstream release
6016864c99 upgpkg: 256-3: rebuild to fix man pages...
6f6d48b221 upgpkg: 256-2: update shells
b9ce44e766 drop systemd-stable repository, build from main one
baf4803252 upgpkg: 256-1: new upstream release
1d75e7ddaa add an install hint on NEWS
6f17a23127 Ups, inverted...
d76029f7cc update meson options
6e7929dd98 upgpkg: 256rc4-1: new upstream pre-release - testing only!
7b70e7b0e7 upgpkg: 256rc3-2: fast-forward to current git main, non-official testing
a438b879e2 upgpkg: 256rc3-1: new upstream pre-release, non-official testing
ff30a600c9 upgpkg: 256rc2-1: new upstream pre-release, non-official testing

16 months agomkosi: Clean up old packages from the build directory
Daan De Meyer [Wed, 3 Jul 2024 18:20:31 +0000 (20:20 +0200)] 
mkosi: Clean up old packages from the build directory

16 months agomkosi: remove conflicting deb packages from builddir
Luca Boccassi [Wed, 3 Jul 2024 18:15:03 +0000 (19:15 +0100)] 
mkosi: remove conflicting deb packages from builddir

These are not actually needed or installed, so delete them from the
build directory, so that inside an image one can do:

apt install --reinstall /work/build/*.deb

Follow-up for 690a85b1d4e794af62bca6d1ea530ffc530ee58c

16 months agoload-fragment: Remove faulty assertion
Daan De Meyer [Wed, 3 Jul 2024 17:33:01 +0000 (19:33 +0200)] 
load-fragment: Remove faulty assertion

Followup for 453cb5d01e587ff6d9fa426397c0d1b858f8f832

Fixes the following assertion:

"""
x86 130 ~/systemd ❯❯❯ meson compile -C build
ninja: Entering directory `/home/tfleig/systemd/build'
[2/5] Generating export-dbus-interfaces with a custom command
FAILED: interfaces
/home/tfleig/systemd/tools/dbus_exporter.py interfaces /home/tfleig/systemd/build/systemd /home/tfleig/systemd/build/systemd-homed /home/tfleig/systemd/build/systemd-hostnamed /home/tfleig/systemd/build/systemd-importd /home/tfleig/systemd/build/systemd-localed /home/tfleig/systemd/build/systemd-logind /home/tfleig/systemd/build/systemd-machined /home/tfleig/systemd/build/systemd-networkd /home/tfleig/systemd/build/systemd-oomd /home/tfleig/systemd/build/systemd-portabled /home/tfleig/systemd/build/systemd-resolved /home/tfleig/systemd/build/systemd-timedated
Assertion '__unique_prefix__expr_91' failed at src/core/load-fragment.c:3912, function config_parse_tasks_max(). Aborting.
Traceback (most recent call last):
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 45, in <module>
    main()
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 42, in main
    extract_interfaces_xml(args.output, exe)
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 9, in extract_interfaces_xml
    proc = run(
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[PosixPath('/home/tfleig/systemd/build/systemd'), '--bus-introspect', 'list']' died with <Signals.SIGABRT: 6>.
[4/5] Generating man/systemd.index.xml with a custom command
ninja: build stopped: subcommand failed.
"""

16 months agomeson: add option to build systemd-executor "statically" 33599/head
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2024 15:05:31 +0000 (17:05 +0200)] 
meson: add option to build systemd-executor "statically"

The new link-executor-shared option is similar to the existing
link-udev-shared: when set to false, we link to the static versions of our
internal libraries.

The resulting exuctor binary is fairly large, about as large as libsystemd-core
(14 MB without lto, 8 with lto).

This is intended as a workaround for the fuckup with the pinned executor
binary:
when an upgrade is performed, the package manager will install new version of
the libraries and new version of the code, and some time later reexecute the
managers. This creates a window when the pinned executor binary will fail to
execute. There are two factors which make the issue easier to hit:

- when the distribution uses a finely-grained shared-lib-tag. E.g. Fedora
  uses version-release as the tag, which means that the issue occurs on
  every package upgrade. This is the right thing to do, because the
  ABI of our internal libraries is not stable at all, so replacing the
  library from a different version in place creates a window where our
  programs may crash or misbehave.

- when the distribution doesn't immediately reexec all the managers after
  upgrade. In early versions of systemd, we used to hammer the machine during
  upgrade, doing daemon-reexecs repeatedly. This works, but is ugly and
  wasteful. Doing the reexecs while the upgrade is in progres also creates a
  window where a mix of old and new configs or both is loaded. Users are
  particularly annoyed by those reloads if there is some issue in the
  configuration causing us to emit warnings on every reexec. Doing the
  reexecs once after the new configuration and libraries have been put
  in place is nicer.

The pinning of the executor binary breaks upgrades and in particular
it penalizes the distributions which make use of the features which
were previously added to avoid bugs and inefficiency during upgrades.

When the executor is linked statically, there is a smaller chance that it'll
fail to load libraries. The issue can still occur because other libraries, not
our own, are linked dynamically.

16 months agomeson: build libsystemd-core via an intermediate static library
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2024 15:03:26 +0000 (17:03 +0200)] 
meson: build libsystemd-core via an intermediate static library

By itself, this is not useful. I'm making this a separate commit to
make debugging easier. It turns out that meson does static libraries
using references, so the "static library" a tiny stub stub that refers
to the object files on disk and this has negligible cost:
$ ls -lhd build/src/core/libsystemd-core-257.{a,so}
-rw-r--r-- 1 zbyszek zbyszek  36K Jul  3 16:54 build/src/core/libsystemd-core-257.a
-rwxr-xr-x 1 zbyszek zbyszek 6.1M Jul  3 16:54 build/src/core/libsystemd-core-257.so

16 months agomeson: rename libbasic to libbasic_static
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2024 14:51:05 +0000 (16:51 +0200)] 
meson: rename libbasic to libbasic_static

Our variables for internal libraries are named 'libfoo' for the shared lib
variant, and 'libfoo_static' for the static lib variant. The only exception was
libbasic, because we didn't have a shared variant for it. But let's rename it
for consitency. This makes the build config easier to understand.

16 months agoukify: bring order of EFI sections in man + --help into same order as spec 33567/head
Lennart Poettering [Wed, 3 Jul 2024 14:21:34 +0000 (16:21 +0200)] 
ukify: bring order of EFI sections in man + --help into same order as spec

Previously, the order was quite chaotic, even sometimes interleaved with
entirely unrelated switches. Let's clean this up and use the same order
as in the spec.

This doesn't change anything real, but I think it's a worthy clean-up in
particular as this order is documented as the PCR measurement order of
these sections, hence there's actually a bit of relevance to always
communicate the same order everywhere.

16 months agoboot: don't set OsIndications field if already set correctly
Lennart Poettering [Wed, 3 Jul 2024 13:36:28 +0000 (15:36 +0200)] 
boot: don't set OsIndications field if already set correctly

16 months agoboot: cover for hardware keys on phones/tablets
Brenton Simpson [Wed, 3 Jul 2024 13:40:26 +0000 (15:40 +0200)] 
boot: cover for hardware keys on phones/tablets

The patch is originally from Brenton Simpson, I (Lennart) just added some
comments and rebased it.

I didn't test this, but the patch looks so obviously right to me, that
I think we should just merge it, instead of delaying this further. In
the worst case noone notices, in the best case this makes sd-boot work
reasonably nicely on devices that only have a hadware power key + volume
rocker.

Fixes: #30598
Replaces: #31135

16 months agoukify: suffix switches that take parameters with = in log output
Lennart Poettering [Tue, 2 Jul 2024 10:35:57 +0000 (12:35 +0200)] 
ukify: suffix switches that take parameters with = in log output

16 months agomeasure: drop incomplete support for PCRs != 11
Lennart Poettering [Tue, 2 Jul 2024 07:14:38 +0000 (09:14 +0200)] 
measure: drop incomplete support for PCRs != 11

At this point we have a clearer model:

* systemd-measure should be used for measuring UKIs on vendor build
  systems, i.e. only cover stuff predictable by the OS vendor, and
  identical on all systems. And that is pretty much only PCR 11.

* systemd-pcrlock should cover the other PCRs, which carry inherently
  local information, and can only be predicted locally and not already
  on vendor build systems.

Because of that, let's not bother with any PCRs except for 11 in
systemd-measure. This was added at a time where systemd-pcrlock didn't
exist yet, and hence it wasn't clear how this will play out in the end.

16 months agoboot: compare auto- prefix case-insensitively
Lennart Poettering [Tue, 2 Jul 2024 14:00:30 +0000 (16:00 +0200)] 
boot: compare auto- prefix case-insensitively

16 months agoboot: split out inner part of config_load_type2_entries()
Lennart Poettering [Fri, 28 Jun 2024 17:56:55 +0000 (19:56 +0200)] 
boot: split out inner part of config_load_type2_entries()

Let's simplify the code a bit, and parse Type 2 entries in a function of
its own, separate from the directory enumeration.

This closely follows a similar split we did a long time ago for Type 1.

This is just refactoring, no real code change.

16 months agoboot: indent error code path, but leave main code path unindented
Lennart Poettering [Fri, 28 Jun 2024 17:47:46 +0000 (19:47 +0200)] 
boot: indent error code path, but leave main code path unindented

16 months agoefi: don't non-chalantly drop const from memory buffer
Lennart Poettering [Mon, 1 Jul 2024 15:39:49 +0000 (17:39 +0200)] 
efi: don't non-chalantly drop const from memory buffer

16 months agoefi: drop "ret_" prefix from "ret_sections[]" parameter
Lennart Poettering [Mon, 1 Jul 2024 15:01:26 +0000 (17:01 +0200)] 
efi: drop "ret_" prefix from "ret_sections[]" parameter

While we write data to this parameter, it's not really a return
parameter, we after all do not fully set it, we just fill in some
fields. Hence it must be initialized beforehand.

According to our coding style only parameters that are purely used for
returning something should be named "ret_xyz", hence this one should not
be.

(We'll later rely on the current behaviour that it leaves array entries
for which we find no sections untouched, hence leave behaviour as is,
just rename the parameters to something more appropriate).

(Since we are dropping the "ret_" prefix of "ret_sections", let's rename
the old "section" parameter at the same time to "section_names", to make
clearer what it is about).

16 months agoefi: fix mangle_stub_cmdline() for empty strings
Lennart Poettering [Tue, 2 Jul 2024 14:01:28 +0000 (16:01 +0200)] 
efi: fix mangle_stub_cmdline() for empty strings

16 months agoefi: add limit on how large files can be we load into memory at once
Lennart Poettering [Fri, 28 Jun 2024 17:43:31 +0000 (19:43 +0200)] 
efi: add limit on how large files can be we load into memory at once

16 months agorepart: Allow overriding fstype per partition designator
Daan De Meyer [Tue, 2 Jul 2024 16:34:39 +0000 (18:34 +0200)] 
repart: Allow overriding fstype per partition designator

$SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to
override the fstype only for a specific designator, so let's support
that as well.

16 months agomkosi: Copy packages to the build directory as well
Daan De Meyer [Wed, 3 Jul 2024 12:28:21 +0000 (14:28 +0200)] 
mkosi: Copy packages to the build directory as well

With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.

16 months agomkosi: Make sure we don't hide errors from git merge-base
Daan De Meyer [Wed, 3 Jul 2024 11:19:34 +0000 (13:19 +0200)] 
mkosi: Make sure we don't hide errors from git merge-base

Currently if git merge-base fails we'll hide the error and exit with
exit status 0. Let's make we only exit early if git merge-base exits
with 1 which indicates the current commit is not on the target branch.
Any other error is considered fatal.

16 months agohwdb: Add some HP IR cameras
Anton Golubev [Wed, 3 Jul 2024 07:42:24 +0000 (10:42 +0300)] 
hwdb: Add some HP IR cameras

Two very similar devices, with two functions - a regular camera and IR.
The peculiarity of their infrared camera is that it uses a color image
format (YUYV), although it is essentially black and white.

The IR camera interface differs from the regular camera interface by name:

"HP Wide Vision FHD Camera: HP W" for the regular camera and
"HP Wide Vision FHD Camera: HP I" for an infrared camera

Therefore, glob *I is used to separate the IR camera

16 months agoMerge pull request #33575 from YHNdnzj/soft-reboot-system-manager-only
Luca Boccassi [Wed, 3 Jul 2024 11:40:06 +0000 (13:40 +0200)] 
Merge pull request #33575 from YHNdnzj/soft-reboot-system-manager-only

core/dbus-manager: several cleanups, refuse SoftReboot() for user manager

16 months agoupdate TODO
Lennart Poettering [Wed, 3 Jul 2024 08:55:13 +0000 (10:55 +0200)] 
update TODO

16 months agomkosi: update fedora commit reference
Daan De Meyer [Wed, 3 Jul 2024 06:21:31 +0000 (08:21 +0200)] 
mkosi: update fedora commit reference

f9fe17dbde Use vmlinux.h from kernel-devel
9cbad936a6 Pull in openssl-devel-engine
8ae009f929 Only add Requires on python3-zstd on Fedora
750e910c7c Drop BuildRequires on python3-zstd

16 months agocore/main: add an assertion to ensure user managers won't initiate destructive/system... 33575/head
Mike Yuan [Tue, 2 Jul 2024 16:14:33 +0000 (18:14 +0200)] 
core/main: add an assertion to ensure user managers won't initiate destructive/system-wide operation

16 months agocore/manager: invoke special targets on signal only for system manager
Mike Yuan [Tue, 2 Jul 2024 16:30:44 +0000 (18:30 +0200)] 
core/manager: invoke special targets on signal only for system manager

16 months agocore/dbus-manager: refuse SoftReboot() for user managers
Mike Yuan [Tue, 2 Jul 2024 16:08:06 +0000 (18:08 +0200)] 
core/dbus-manager: refuse SoftReboot() for user managers

Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...

16 months agocore/dbus-manager: check for runtime scope first for system-wide operations
Mike Yuan [Tue, 2 Jul 2024 17:28:30 +0000 (19:28 +0200)] 
core/dbus-manager: check for runtime scope first for system-wide operations

It's pointless to do selinux or /run/ space checks
for user managers.

16 months agocore/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriate
Mike Yuan [Tue, 2 Jul 2024 16:03:21 +0000 (18:03 +0200)] 
core/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriate

Also, there can only be one system manager.