Compare commits

..

497 commits

Author SHA1 Message Date
Hans de Goede
f353d244fd Add 2 patches for automatic aarch64 DTB selection change 2026-01-12 16:22:10 +01:00
Zbigniew Jędrzejewski-Szmek
399885597c Revert "Disable sysinit-path for upstream builds"
This reverts commit 56377438ba. Dropping
of the option currently doesn't disable anything, it just moves the
file. I don't think we gain anything by moving the file and actually
this causes problems [1], so let's just return to status quo ante.

[1] file /etc/init.d conflicts between attempted installs of systemd-259.999+69+g6ceb76bfc-2548.1.x86_64 and chkconfig-1.33-3.fc44.x86_64

[skip changelog]
2025-12-20 20:09:31 +01:00
Daan De Meyer
67538c79f2 Make dbus and systemd-pam recommended dependencies
Neither dbus nor pam are required in the initrd so
let's make both recommended dependencies instead
of required dependencies so that we can build
initrds without either of them getting pulled in.
2025-12-19 16:40:55 +01:00
Daan De Meyer
c052029197 Drop libcap-devel BuildRequires
Not required anymore since v259.
2025-12-19 16:17:01 +01:00
Daan De Meyer
cac8dde28a test: Allow passing in extra tests to skip via TEST_SKIP
[skip changelog]
2025-12-19 11:22:34 +00:00
Luca Boccassi
56377438ba Disable sysinit-path for upstream builds
[skip changelog]
2025-12-19 11:45:00 +01:00
Daan De Meyer
0c8ea706f9 Fix links to patches
These patches were modified downstream yet the links
were never updated

[skip changelog]
2025-12-19 10:43:34 +00:00
Zbigniew Jędrzejewski-Szmek
4f5b5a9615 Version 259
- Some bugfixes since -rc3, in particular in the area of
  image creation and loading of libraries
2025-12-18 10:34:39 +01:00
Zbigniew Jędrzejewski-Szmek
bf8019c840 Version 259~rc3
Various fixes for various issues reported with -rc2.
2025-12-10 23:06:32 +01:00
Daan De Meyer
ef777d6572 Check if --max-lines is supported by meson 2025-11-28 14:55:02 +01:00
Daan De Meyer
b562e38e22 Fix use of removed $LOCAL_CONF variable
Follow up for f8932309d9

[skip changelog]
2025-11-28 11:52:44 +00:00
Zbigniew Jędrzejewski-Szmek
0289127dae Patch machined to continue after selinux denial 2025-11-26 22:35:50 +01:00
Zbigniew Jędrzejewski-Szmek
7e409130ee Version 259~rc2
This has a bunch of fixes for various issues reported with -rc1,
in particular varlink socket communication.
2025-11-26 15:47:05 +01:00
Zbigniew Jędrzejewski-Szmek
33b38cdbc7 Suppress errors from tar
Without this, 'spectool -g …' will print to the console.

[skip changelog]
2025-11-26 15:29:29 +01:00
David Tardon
ddb6474e94 Drop provides for removed sysvinit tools
... (rhbz#2413557)
2025-11-21 15:07:07 +01:00
Daan De Meyer
9ac8c36307 Set meson auto features to auto when building for upstream
We don't want new options to be forcefully enabled if we don't have
the dependencies available.
2025-11-20 14:24:55 +00:00
Daan De Meyer
12f95f807f Wrap %autosetup in %_build_in_place check
The shell expansion we use to determine the top-level directory will
get expanded even if we don't execute %prep, so add a %_build_in_place
check to make sure we don't try to search for the top-level directory
if --build-in-place is set.
2025-11-20 14:59:09 +01:00
Daan De Meyer
f9916b6fd1 Revert "Use %autosetup -C"
This effectively reverts commit b17d9c3474.
2025-11-20 14:58:53 +01:00
Zbigniew Jędrzejewski-Szmek
044cff4700 Allow empower group
This will need to be patched into setup.
2025-11-17 21:21:03 +01:00
Zbigniew Jędrzejewski-Szmek
a0acca210d Version 259~rc1
- See https://raw.githubusercontent.com/systemd/systemd/v259-rc1/NEWS.
  Too many changes to list or discuss here.
2025-11-17 20:57:35 +01:00
Daan De Meyer
e455d82fd8 Add various extra explicit Requires
Upstream is moving towards making a lot more libraries dlopen() style
dependencies. Let's make sure to add these as Requires to corresponding
packages so they still get pulled in.
2025-11-17 19:32:55 +00:00
Zbigniew Jędrzejewski-Szmek
1a7506a105 Version 258.2
- A bunch of fixes in many components.
- Stop creating user namespace for system services (rhbz#2391343)
- Systemd trigger scriptlets are updated
2025-11-07 14:13:36 +01:00
Zbigniew Jędrzejewski-Szmek
256463d690 Restore runlevelX.target units
... (rhbz#2411195)
2025-11-05 17:55:32 +01:00
Zbigniew Jędrzejewski-Szmek
b17d9c3474 Use %autosetup -C
This is supported since rpm 4.20 but not advertised much.
2025-11-04 16:18:12 +01:00
Daan De Meyer
fe18084a05 Remove hack to stop systemd-networkd-resolve-hook.socket
This didn't end up working, so drop the hack as we have a better
fix coming up in https://github.com/systemd/systemd/pull/39415.
2025-11-03 22:01:55 +00:00
Zbigniew Jędrzejewski-Szmek
8e2833a5b6 Automatically figure out the name of the top-level tar dir 2025-11-03 12:13:23 +01:00
Daan De Meyer
dffbf2beba Make sure fallback source is listed first
2ace9416e8 broke packit as the fallback
url wasn't listed first anymore. Make sure the fallback URL is listed
first again as clearly documented just above the conditionals.
2025-11-03 11:18:11 +01:00
Zbigniew Jędrzejewski-Szmek
1d3b892105 Enable sysupdate and sysupdated
The files will land in the -udev subpackage.
2025-10-31 13:11:29 +00:00
Daan De Meyer
ea1d871ecd Add missing networkd socket units
systemd-networkd-resolve-hook.socket will be introduced by
https://github.com/systemd/systemd/pull/39293 but we need the spec
to handle the socket for the upgrade/downgrade test to pass so adding
it early behind the upstream bcond.
2025-10-29 10:32:12 +01:00
Daan De Meyer
b76b5da2e6 Merge #214 Drop backwards compat logic from integration tests script 2025-10-25 07:33:02 +00:00
Zbigniew Jędrzejewski-Szmek
7208fa2b1b Require systemd-rpm-macros for build
We use our own macros. They get pulled into the buildroot in Fedora
builds, but we shouldn't rely on this. In OBS builds, they are not
pulled in and the build fails.
2025-10-23 20:40:58 +02:00
Daan De Meyer
f8932309d9 Drop backwards compat logic from integration tests script 2025-10-22 14:04:23 +02:00
Lukáš Zaoral
2e1a6c7474
Require python3-zstandard in ELN
Related: https://issues.redhat.com/browse/RHEL-103523
2025-10-20 16:00:31 +02:00
Zbigniew Jędrzejewski-Szmek
79c9db1bc8 Require systemd-libs and systemd-shared to be in the same version
... (rhbz#2404143)
2025-10-15 13:54:29 +02:00
Zbigniew Jędrzejewski-Szmek
db38445a7e Drop two patches with workaround (selinux, kernel) 2025-10-13 17:15:42 +02:00
Zbigniew Jędrzejewski-Szmek
593a204189 Version 258.1
- This is the first (large) batch of fixes after v258:
  - fixes for boot loader and early boot code
  - fixes for systemd itself, systemd-udevd, systemd-logind,
    systemd-machined, and library code
  - unprivileged operation in systemd-machined is disabled for now
  - lots of documentation and shell-completion fixes
  - includes an hwdb update
2025-10-13 17:09:52 +02:00
Zbigniew Jędrzejewski-Szmek
a3e9e27982 Change '%{systemd}' to systemd in Conflicts/Provides/Requires/Recommends
We were using both styles… Having a macro creates some mental overhead
for little gain. Switch to the fixed string everywhere.

[skip changelog]
2025-09-27 14:41:06 +03:00
Zbigniew Jędrzejewski-Szmek
88877a4184 Require systemd-networkd and systemd-udev to be in the same version
... (rhbz#2397579)

In https://bugzilla.redhat.com/show_bug.cgi?id=2397579 users are doing
a partial upgrade (seemingly) and that fails because of a file conflict.
Add Conflicts to prevent such partial upgrades.
2025-09-27 14:40:45 +03:00
Zbigniew Jędrzejewski-Szmek
8a446daec7 Version 258 💝
- See https://raw.githubusercontent.com/systemd/systemd/v258/NEWS for
  the final list of changes.
2025-09-17 16:03:20 +02:00
Andreas Schneider
cceac93491 Pre-create /etc/userdb directory
An admin can create users in this directory instead of /etc/passwd. As
the .user file can contain hashed password, only root should be able to
read the files.
2025-09-12 10:36:06 +02:00
Zbigniew Jędrzejewski-Szmek
b442086d5f Version 258~rc4 2025-09-05 15:14:21 +02:00
Zbigniew Jędrzejewski-Szmek
327e54e421 Add to patch to create userdb root directory with correct label
The upstream PR was closed with the intent to force the SELinux
policy to be updated instead. While we're waiting for that to happen,
include the patch here.
2025-09-04 13:56:28 +02:00
Zbigniew Jędrzejewski-Szmek
2289d65726 Fix unit name in scriptlet
[80/89] Installing systemd-udev-0:258~rc3-1.fc44.x86_64
>>> Running %post scriptlet: systemd-udev-0:258~rc3-1.fc44.x86_64
>>> Finished %post scriptlet: systemd-udev-0:258~rc3-1.fc44.x86_64
>>> Scriptlet output:
>>> Failed to preset unit: Unit system-systemdx2dcryptsetup.slice does not exist
2025-09-03 08:02:02 +02:00
Zbigniew Jędrzejewski-Szmek
5acde9f1fd Add workaround patch to hopefully pass podman CI tests 2025-08-26 15:15:17 +02:00
Zbigniew Jędrzejewski-Szmek
1f5ed0da1f Version 258~rc3
- A large number of fixes in various components
- Hardware database and syscall numbers are updated
2025-08-20 17:01:17 +02:00
Luca Boccassi
50936458a7 obs: move recipe files in place
The RPM recipe files for SUSE and Fedora conflict and cannot be
both unpacked at the same time (e.g.: triggers.systemd, systemd.spec,
etc). The tarballs creation are unconditional. This means the same
project build cannot build for both Fedora and SUSE.

All other distros can co-habitate in the same project, so that a single
repository checkout, single trigger, single everything is used.

By storing the RPM recipe files in a separate directory it means they
don't conflict anymore, and they are moved in place in the right recipe
at the right time.

This allows building fedora/suse/centos/debian/ubuntu/arch from a
single project.

[skip changelog]
2025-08-08 01:59:50 +01:00
Luca Boccassi
1bdb4efe40 obs: switch to xz for compression
[skip changelog]
2025-08-08 01:59:25 +01:00
Zbigniew Jędrzejewski-Szmek
be7a4d0863 Version 258~rc2 2025-08-06 08:56:51 +02:00
Luca Boccassi
2ace9416e8 obs: also use version with tilde for Source0
[skip changelog]
2025-07-25 18:05:35 +02:00
Zbigniew Jędrzejewski-Szmek
8d1645af75 Use again %{version} when building in OBS
%{version_no_tilde} no work.

[skip changelog]
2025-07-25 14:08:23 +02:00
Zbigniew Jędrzejewski-Szmek
98cc5fd91a Version 258~rc1
- See https://raw.githubusercontent.com/systemd/systemd/v258-rc1/NEWS.
  Too many changes to list or discuss here.
2025-07-23 23:13:29 +02:00
Zbigniew Jędrzejewski-Szmek
ed7d2f1132 Add "test" that LTO effectively removes unused code from shared lib 2025-07-08 12:50:10 +02:00
Zbigniew Jędrzejewski-Szmek
40b38a04d2 Build docs on 64-bit architectures only
In the light of the recent discussion about dropping i686 packages, let's stop
building our docs there. This reduces the amount of tools needed in the mock
root.

Unfortunately we need to move the man page out of the noarch ukify subpackage,
because it needs to be the same on all architectures where it is built.
2025-07-05 17:29:21 +02:00
Zbigniew Jędrzejewski-Szmek
5d30fd3b26 Version 257.7
- Fixes for systemd itself, systemd-repart, systemd-resolved,
  systemd-vmspawn, systemd-networkd, resolvectl, bootctl, the shared
  library code, man pages, shell completions, and tests.
- Hardware database is updated.
2025-06-26 14:17:05 +02:00
Zbigniew Jędrzejewski-Szmek
7de88c66bd Do not mark symlinks as %ghost
When testing build reproducibility, we got the following result:

+ rpmdiff cache/rpms/systemd-257.6-1.fc43/systemd-257.6-1.fc43.x86_64.rpm \
          cache/build/systemd-257.6-1.fc43/rebuild/systemd-257.6-1.fc43.x86_64.rpm
......V..F. /etc/xdg/systemd/user

This is because we'd apply %ghost to a symlink to a directory, if the directory
stat reported 0 blocks. It seems that this depends on the filesystem type or
something and didn't pop up in previous rebuilds.

The first chunk is a noop to increase clarity.

The resulting difference from this patch in the file list:
$ diff -u systemd-257.6-build/systemd-257.6/.file-list-main{.0,}
-%config(noreplace) %ghost /etc/xdg/systemd/user
+%config(noreplace) /etc/xdg/systemd/user
2025-06-05 08:35:15 +02:00
Matteo Croce
92c16c1dab Let systemd-{sysusers,shared} conflict with older systemd
When downgrading to package versions before 257.3-6 we have this error:

Error: Transaction test error:
  file /usr/bin/systemd-sysusers from install of systemd-257-9.el10.x86_64 conflicts
  with file from package systemd-sysusers-258~devel-20250416115850.el10.x86_64

Add Conflicts on systemd-sysusers subpackage to allow downgrades
across version 257.3-6.
2025-06-04 17:14:41 +02:00
Zbigniew Jędrzejewski-Szmek
ed6b885327 Version 257.6
- Fix for local information disclosure in systemd-coredump (CVE-2025-4598)
- Fixes for systemd itself, run0, systemd-networkd, "secure" pager,
  man pages, shell completions, sd-boot, sd-varlink
- Hardware database update
2025-05-29 19:03:59 +02:00
David Tardon
5a53eac13c Package pcrlock files together with systemd-pcrlock
... (rhbz#2366948)
2025-05-20 14:58:07 +02:00
Zbigniew Jędrzejewski-Szmek
2192e86112 Move mount.ddi symlinks to -container subpackage
Those symlinks point to systemd-dissect, so with just the main subpackage installed,
the symlink was dangling.
2025-05-08 14:14:40 +02:00
LuK1337
451184cbea
Revert "Disable freezing of user sessions"
This breaks suspend on my machine as of Linux 6.14, furthermore both
linked issues in rhbz#2321268 are closed and fixed in Linux upstream.

This reverts commit 6162965002.
2025-05-02 10:18:04 +02:00
LuK1337
f6af46db12
Backport adb/fastboot udev rules (BZ#2356537) 2025-04-18 00:39:10 +02:00
Zbigniew Jędrzejewski-Szmek
f6b814cc0f Backport CI fix 2025-04-10 15:52:59 +02:00
Zbigniew Jędrzejewski-Szmek
d304477023 Version 257.5
- A lot of small fixes in various components
2025-04-09 22:35:03 +02:00
Daan De Meyer
6646d13aca fmf: Run tests from systemd-tests rpm if possible
Running from the source tarball implies running with unpatched tests,
whereas the same files from the systemd-tests package (which now contains
the mkosi and integration test files) will be patched.

[skip changelog]
2025-04-09 09:43:41 +02:00
Daan De Meyer
08ce156d74 fmf: Run mkosi genkey before mkosi summary
Otherwise mkosi summary might fail because the key/cert don't exist
yet.

[skip changelog]
2025-04-03 16:32:38 +02:00
Daan De Meyer
1126a7c6b8 Download commit archives via full sha instead of short one
Both work and if we do full sha we can retrieve the full sha from the
source filename in the source rpm later on which is useful for various
use cases.

[skip changelog]
2025-04-03 15:23:17 +02:00
Daan De Meyer
cc473d807f fmf: Check out mkosi to some directory in /var/tmp
Using the source tree of the spec can still lead to conflicts if a
mkosi/ directory exists there (which is the case in the hyperscale
systemd spec repo), so let's check out mkosi in /var/tmp to ensure
we don't conflict.
2025-04-03 13:05:38 +02:00
Daan De Meyer
b17e5d64a1 Don't try to modify mkosi.repart config if mkosi conf is in subdir
[skip changelog]
2025-04-03 09:58:17 +02:00
Daan De Meyer
e2b2ea3776 fmf: Use mkosi/mkosi.local.conf if the mkosi/ directory exists
https://github.com/systemd/systemd/pull/36954 will move all the mkosi
configuration in the systemd repository into a mkosi/ subdirectory. This
means we have to put mkosi.local.conf in that subdirectory as well, so check
if the mkosi/ directory exists and put mkosi.local.conf in there if it exists.

The mkosi/ directory will conflict with our checkout of mkosi so we move that
checkout one level up. Additionally, we can't use .. anymore as the package
directory as that only works when mkosi.local.conf is in the top level directory
of the repository so we use an absolute path instead.
2025-04-03 09:39:29 +02:00
Daan De Meyer
617952132d Run integration testsuite standalone if available
[skip changelog]
2025-03-27 21:48:29 +01:00
Daan De Meyer
13d523f84d Relax dependencies from noarch packages on archful packages for OBS builds
In OBS, noarch packages are shared between all architectures and
independent architectures can be rebuilt automatically without all
the other architectures getting rebuilt. This can result in the noarch
packages being newer than the archful packages for some architectures,
which means our current strict deps from the noarch packages on the
archful packages can't be satisfied.

To address this problem, let's relax the dependencies from the noarch
packages on the archful packages for OBS builds. Let's only do this for
OBS builds because this isn't an issue on Fedora as it's impossible to
build a package for only some of the architectures.
2025-03-25 12:35:43 +00:00
Daan De Meyer
59378485be Remove purge-nobody-user script
The corresponding change proposal is from 2018. Enough time has passed
since then that we don't need to carry this around anymore
2025-03-23 11:00:27 +01:00
Zbigniew Jędrzejewski-Szmek
d1380dc114 Add more services to %post for udev and networkd
Noticed in https://bugzilla.redhat.com/show_bug.cgi?id=2348669#c25.

Most of those units listed don't have an [Install] section, and of those that
have, almost all were disabled by default. This might be something to fix, e.g.
we might want to enable systemd-udev-load-credentials.service, this is
something to consider. But it's clearer if we list all the units that those
packages ship. In priciple somebody might ship a preset to enable them.
Anyway, the impact of this change is much smaller than might seem at first.
But systemd-network-generator.service has an [Install] section and is preset
to true, so not listing it in the scriptlets was a visible bug.

There's the additional caveat that systemd-network-generator.service is coowned
by two packages. The current system does not have a way of handling this
properly, because unit enablement is tied to the package install state. Let's
just call the scriptlet for this unit twice for now. I think that's not going
to cause any real problem.
2025-03-23 10:59:08 +01:00
Zbigniew Jędrzejewski-Szmek
6f0d03443d Fix paths for /usr/sbin/nologin and related progs
I noticed that systemd-sysusers creates accounts with /usr/bin/nologin.
On merged systems is fine, but would not work for systems where
/usr/sbin is still a separate directory and /usr/bin/nologin does not
exist. This problem occurs because the meson configuration script discovers
the location using $PATH, which on recent builds results in /usr/bin always.
Just specify all the paths so that we don't depend on the presence and
order of paths in $PATH.
2025-03-23 10:59:08 +01:00
Daan De Meyer
df9a74d530 Make the source tarball glob in the test script more generic
If we download the main branch from github by defining %branch, the
source tarball will be named main.tar.gz, so let's make the tarball
pattern more generic to match.
2025-03-21 21:40:07 +01:00
Daan De Meyer
2ecfbec1a4 Support specifying extra mkosi repositories to the test script 2025-03-21 15:59:32 +01:00
Daan De Meyer
f5b47b1302 Use old setup sysusers files on Fedora < 43 2025-03-21 14:38:40 +01:00
Daan De Meyer
2da5793357 Merge #196 Migrate fmf metadata and test script from the upstream repository 2025-03-21 13:32:58 +00:00
Daan De Meyer
3e9051124e Migrate fmf metadata and test script from the upstream repository
Primarily, this allows us to get rid of dist-git-source which makes
the fmf stuff reusable for CentOS Stream in gitlab which we'd like to
make use of in the systemd backport in the Hyperscale SIG.

Also in general making the integration touch points with Fedora CI
and the other systems as small as possible seems like a good thing.
2025-03-21 13:29:53 +01:00
Yaakov Selkowitz
e346d9f33e Limit sdubby dependency to Fedora
dnf repoclosure raises an error even when a boolean dependency is
missing.  While technically a bug in dnf, since these dependencies
are already conditional, simply adjusting the condition is simplest.

https://github.com/rpm-software-management/dnf-plugins-core/issues/549
2025-03-20 19:15:52 -04:00
Daan De Meyer
d366b59657 Fix test_sysusers_defined check
https://src.fedoraproject.org/rpms/setup/c/7ced36d60b67c9e74f7951123225200597e3d2fa?branch=rawhide
merged the two setup sysusers files into one and changed the name, so
let's adapt the test_sysusers_defined check for those changes.
2025-03-20 10:57:58 +01:00
Daan De Meyer
38b41a729e Clean up debuginfo files as well in %clean
When using --build-in-place + debuginfo these get written to the
source directory so let's make sure we clean them up as well.
2025-03-07 12:37:44 +01:00
Daan De Meyer
7bc5883654 Fix missing question mark 2025-03-07 12:37:17 +01:00
Zbigniew Jędrzejewski-Szmek
d22561d59e Also drop auxiliary files related to sysusers compat
And in non-Fedora builds, undo the neutering of sysusers macros.
Downstreams like CentosStream did not go through the same changes
as Fedora but they may use packages built from the rawhide branch.
2025-03-07 11:25:27 +01:00
Zbigniew Jędrzejewski-Szmek
e825459f2d Change python-zstd depenedency to python-zstandard
There is no BuildRequires dependency. I think we don't have any tests
which would require this.
2025-03-07 11:17:57 +01:00
Zbigniew Jędrzejewski-Szmek
0a3907745e Version 257.4
- Fixes for systemd itself, systemd-dissect, systemd-sbsign,
  systemd-networkd, systemd-repart, systemd-tmpfiles, systemd-id128,
  systemd-resolved, ukify, internal shared library, fido2 code,
  virtualization detection, shell completions, documentation.
- Adds new DNSSEC anchor key for systemd-resolved.
2025-03-07 09:33:55 +01:00
Zbigniew Jędrzejewski-Szmek
1bdfa29ce2 Neuter sysusers macros
https://pagure.io/packaging-committee/pull-request/1436 was merged,
packaging guidelines describe the new method as the default option for f42+.
2025-03-06 09:30:31 +01:00
Zbigniew Jędrzejewski-Szmek
4ab2a9e539 Drop old self-Obsoletes and provides
We had a bunch of Obsolets on self. This is useful when a subpackage
is split out to make it optional, and we want to install both the
original subpackage and the subpackage on ugprades. If both new
subpackages have Obsoletes on the old name, dnf will install both. But
we don't need to keep this infinitely, it's mostly useful for the
duration of a single stable release.

Apparatenly, those Obsoletes cause problems with downgrades.

The most recently added case is for the split of systemd-sysusers. But
we have an alternative mechanism in place: systemd Requires
/usr/bin/systemd-sysusers, and this path is provided by systemd-sysusers
and systemd-standalone-sysusers, with a bias towards systemd-sysusers.
So we should be able to drop the self-Obsoletes without a change in
functionality.

Also, drop some old Provides where 'dnf repoquery' indicates it is not
used by anything. Actually, only 'timedatex'. All the other ones are
used by one spec or another.
2025-03-05 18:28:57 +01:00
Daan De Meyer
ec182495e7 Drop libbpf versioned dependency version to 1.4.7
We don't need 1.5.0 to avoid the libbpf crash, the latest libbpf 1.4
patch release (1.4.7) also has the necessary fixes, so relax the
requirement a little to allow builds on Fedora 41 to succeed.
2025-03-05 12:31:55 +01:00
Zbigniew Jędrzejewski-Szmek
1f8d2b0ebd Make self-obsoletes for the sysusers split conditional
In CI builds we have %version that it smaller than 257.3-4 when the split
happened, and this causes problems when the packages are installed:

Failed to resolve the transaction:
Problem: package
         systemd-sysusers-257-1.20250225060108317145.pr36507.1659.g4635c37946.fc43.x86_64
           from @commandline
         obsoletes
         systemd < 257.3-4 provided by
         systemd-257-1.20250225060108317145.pr36507.1659.g4635c37946.fc43.x86_64
           from @commandline
  - conflicting requests

I'm not sure if we even need the self-Obsoletes. We have a Requires and
Recommends in the main systemd package that will cause on of the providers of
/usr/bin/systemd-sysusers to be installed, and the non-standalone version is
preferred. But it's possible that if recommends are disabled, the
non-standalone package could be installed for some reason. So let's keep the
self-Obsoletes for now.

Another caveat is that it's not clear if v-string comparisons require %[] as a
wrapper. Some chat in #fedora-devel suggested that that's the case, but things
seem to work without it.
2025-03-04 17:37:56 +01:00
Daan De Meyer
0d95af264f Include epoch in versioned libbpf dependency
"""
$ rpmdev-vercmp '2:1.4.6-1.fc42' '1.5.0'
2:1.4.6-1.fc42 > 1.5.0
$ rpmdev-vercmp '2:1.4.6-1.fc42' '2:1.5.0'
2:1.4.6-1.fc42 < 2:1.5.0
"""
2025-03-04 13:02:20 +01:00
Daan De Meyer
8230f501b6 Make sure we pull in libbpf >= 1.5.0 if libbpf is installed
libbpf 1.4.0 + systemd 257 + a newer kernel results in segmentation
faults in libbpf 1.4.0, so let's explicitly pull in libbpf 1.5.0 or
newer to avoid this issue.

Fixes https://pagure.io/centos-sig-hyperscale/package-bugs/issue/22
2025-03-03 21:46:20 +01:00
Daan De Meyer
9b6884d2e1 Stop using version_no_tilde for github archives
None of the systemd git tags have tildes in them, so there's no need
to use version_no_tilde for these.

This is another change to make packit work as the archive it sets up
for us based on the systemd upstream packit config file does have a
tilde in its name which then makes %prep fail as we transform the tilde
to a hyphen and then fail to find the systemd source directory.

"""
+ /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/systemd-258~devel.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd systemd-258-devel
/var/tmp/rpm-tmp.gw7KSw: line 42: cd: systemd-258-devel: No such file or directory
"""
2025-02-25 17:25:34 +01:00
Daan De Meyer
5671cf6132 List the fallback Source0 first
packit will only rewrite the first Source0 that it finds, so we
list the Source0 that gets used if neither %branch nor %commit are
defined first.
2025-02-25 13:55:19 +01:00
Daan De Meyer
6c7c4a510d Do not use dynamic spec generation for non-upstream builds
This reverts commit ac9c438e27.
2025-02-19 10:46:38 +01:00
Zbigniew Jędrzejewski-Szmek
6201755b36 Allow co-installation of systemd-sysusers-standalone and systemd
Previously, /usr/bin/systemd-sysusers was provided by both systemd and
systemd-standalone-sysusers, creating a file conflict, and the packages
declared Conflicts. This changed when systemd-sysusers was split out to a
separate subpackage. So we don't need the Conflicts and can allow a "cross
installation" of systemd-sysusers-standalone and and the other "normal"
systemd subpackages.

This should solve https://bugzilla.redhat.com/show_bug.cgi?id=2344322 without
requiring changes in the container definitions. (Though those changes probably
should be made anyway. If we end up installing systemd, we probably want to use
shared systemd-sysusers, to avoid wasting space.)
2025-02-16 14:30:07 +01:00
Zbigniew Jędrzejewski-Szmek
eba1721678 Split out -sysusers and -shared
... (rhbz#2344322)

rpm-libs has Requires:/usr/bin/systemd-sysusers.

We split split out /usr/bin/systemd-sysusers (the normal version) to a
subpackage, and the shared library
/usr/lib64/systemd/libsystemd-shared-257.2-14.fc42.so to a second subpackage.
(In preparation for maybe making further splits later.)
systemd-sysusers+libsystemd-shared.so is 4.8MB, but libsystemd-shared.so also
pulls in a bunch of libraries. We'll find out what the actual change in
installation footprint (compared to systemd-standalone-sysusers) really is when
we build some images with the new split.
2025-02-14 22:56:30 +01:00
Zbigniew Jędrzejewski-Szmek
ac9c438e27 Use dynamic spec generation for triggers
This way we don't need a separate Source.
2025-02-14 19:04:13 +01:00
Zbigniew Jędrzejewski-Szmek
3671a5cc79 Move more auxiliary files into subpackages
Follow-up for rhbz#2345551.

Also split up some nested patterns into separate lines for readability.
2025-02-14 13:54:12 +01:00
Zbigniew Jędrzejewski-Szmek
5c40e08728 Remove patch that is already upstream
[skip changelog]
2025-02-13 21:10:02 +01:00
Zbigniew Jędrzejewski-Szmek
49ec9f3286 Move some files into subpackages
- systemd-ac-power is moved to systemd-udev
- portablectl and importctl are moved to systemd-container (rhbz#2345551)

ac-power clearly is only useful for real hardware. portablectl
and importctl are niche tools that don't need to be in the main package
(even though they could theoretically be used not for containers).
2025-02-13 20:57:17 +01:00
Zbigniew Jędrzejewski-Szmek
2c0b984bf4 Version 257.3
- updates to systemd, systemctl, systemd-udev, systemd-sbsign,
  systemd-machined, systemd-resolved, systemd-firstboot,
  systemd-sysupdate, systemd-repart, systemd-vmspawn,
  systemd-networkd, systemd-update-utmp, systemd-tmpfiles,
  systemd-logind, bootctl, varlink, ukify, homectl, userdbctl,
  UKI support, sd-stub, log messages, man pages
- the hwdb is updated from mainline at 2025-02-07
- resolves rhbz#2345544
2025-02-13 20:40:55 +01:00
Björn Esser
d66f997915
Add explicit BR: libxcrypt-devel
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2025-02-01 19:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
1ffa7bf7c7 Make Georgian mapping patch downstream-only
[skip changelog]
2025-01-28 10:08:50 +01:00
Adam Williamson
de4ae54a34 Backport PR #36194 to add Georgian mapping to kbd-model-map
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-01-27 13:49:04 -08:00
Zbigniew Jędrzejewski-Szmek
cc9bce7893 Drop override of $PATH in the user manager
We had the override so that the user would have /usr/bin:/usr/sbin, which root
had /usr/sbin:/usr/bin. Now that /usr/sbin and /usr/bin are merged, we don't
want this. This should fix the issue reported in
https://discussion.fedoraproject.org/t/f40-change-proposal-unify-usr-bin-and-usr-sbin-system-wide/99853/25.
2025-01-21 21:57:39 +01:00
Zbigniew Jędrzejewski-Szmek
d0973df863 Backport patch to emit audit events from systemd-sysusers
A second patch is backported to avoid conflict and also because it seems
reasoanble to backport.
2025-01-17 14:10:24 +01:00
Zbigniew Jędrzejewski-Szmek
e54ec2f978 Trim changelog entries that are not relevant to users 2025-01-17 14:04:00 +01:00
Daan De Meyer
c7fecc18eb Skip test_sysusers_defined on upstream builds 2025-01-16 22:14:36 +01:00
Daan De Meyer
f257050ddd Add a .editorconfig file 2025-01-16 12:29:21 +01:00
Daan De Meyer
aa5546e9ed Add a few mkosi artifact directories to .gitignore 2025-01-16 12:29:01 +01:00
Luca Boccassi
01e5bc1c93 Set SBAT in sd-boot when building on OBS
We are doing self-signing, so don't tag the EFI binaries as if
they were Fedora's, since they are not. Set upstream-specific
tags, that are the same for all distros built on OBS..

[skip changelog]
2025-01-15 12:49:59 +01:00
Daan De Meyer
a7eec4d33d Run upstream integration test suite with Fedora CI
Let's add a tmt plan to read the upstream fmf metadata which contains
a single test to run the upstream integration tests.

To make this work, we also add a downstream patch with some fmf test
script fixes that landed after 257.2 was released.

We request virtualization support so we can run qemu based integration
tests in qemu with KVM.
2025-01-15 10:38:03 +01:00
Zbigniew Jędrzejewski-Szmek
fd36e4c562 Rebuilt for the bin-sbin merge (2nd attempt)
This time in the side tag.

[skip changelog]
2025-01-12 18:23:30 +01:00
Zbigniew Jędrzejewski-Szmek
cddeca136f Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 16:24:13 +01:00
Luca Boccassi
20cc578e59 Enable signing systemd-boot on OBS builds
On OBS the https://github.com/openSUSE/pesign-obs-integration
package is the way to get binaries signed. Build depend on it,
and call its hook.

Also rename and change the description and provides of the package,
given it is signed.

[skip changelog]
2025-01-11 12:03:28 +01:00
Zbigniew Jędrzejewski-Szmek
b1bd57ecce Revert use of PrivateTmp=disconnected
... (rhbz#2334015, https://github.com/coreos/fedora-coreos-tracker/issues/1857)
2025-01-10 17:05:52 +01:00
Zbigniew Jędrzejewski-Szmek
30f50b1870 Drop patch numbers
In the past, we used patch numbers to skip some patches in upstream CI
builds. The upstream bcond is now used for this instead, so we can
drop the numbering to make it easier to add an remove patches.

[skip changelog]
2025-01-10 17:03:09 +01:00
Daan De Meyer
1814bfe794 remove STI test
The test fails because of the same reason as the installability test,
it tries to install every subpackage which fails because the standalone
subpackages conflict with all the other packages.

Given there's no owner for the test, nobody looks at or seems interested
in the results, STI itself will likely be deprecated soon
(https://fedoraproject.org/wiki/Changes/DeprecateSTI) and systemd's
upstream integration tests will soon support checking for AVC denials
(https://github.com/systemd/systemd/pull/35921), let's remove the STI test.
2025-01-08 15:50:45 +01:00
Zbigniew Jędrzejewski-Szmek
3a9c32b8a9 Version 257.2
- Fixes for assertion crashes and memory access issues in pid1 and
  systemd-machined, and other fixes for systemd-repart, systemd-resolved,
  systemd-stdio-bridge, systemctl, journalctl, sd-device, hibernation,
  and the hardware database.
2025-01-08 13:14:30 +01:00
Luca Boccassi
4df2711a9f Add bcond for OBS-specific quirks
The version substitution system is not able to fully subst
the current Version field due to the inline use of macros, so you end up with like:
  257-123-gabcd257.1
instead of:
  257-123-gabcd

I.e., the hard-coded 257.1 gets appended to the OBS-specified version.

If it was simply hardcoded as 257.1 it would work, but the inline
macros throw it off.

[skip changelog]
2025-01-08 13:14:30 +01:00
Luca Boccassi
e570cd53df spec: drop trailing whitespace
[skip changelog]
2025-01-08 13:14:30 +01:00
Yu Watanabe
c7379c9460 Replace 'udevadm hwdb' with systemd-hwdb
systemd-hwdb was added in v219 (released in 2015) and
'udevadm hwdb' was deprecated in v253.
2025-01-08 04:31:21 +09:00
Zbigniew Jędrzejewski-Szmek
3386f5d704 Rename source .abignore file
OBS does not support files with names starting with a dot.
https://fedoraproject.org/wiki/How_to_filter_libabigail_reports does
not make it really clear if the file can renamed. (The first part of
the paragraph implies a positive answer, the second is unclear.)
Let's see how this goes.
2025-01-07 19:25:06 +01:00
Miro Hrončok
fd860fd12d Drop a build dependency on a linter package: pytest-flakes
See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters

Also, the package is orphaned.
2025-01-07 15:05:25 +00:00
Daan De Meyer
133ae30e33 Drop patches based on %upstream macro instead of patch number
Let's use the %upstream macro to gate patches which are backports of
upstream instead of relying on patch numbers. We'll build with %upstream
defined in packit so that patches which should not be applied on upstream
builds are skipped.
2025-01-06 14:37:23 +01:00
Daan De Meyer
e157552c6c Always build in release mode
Building with %upstream doesn't necessarily imply we want a developer
build, so let's always build in release mode. If needed
%meson_extra_configure_options can be used to override this and build
in developer mode after all.
2025-01-06 14:35:05 +01:00
Daan De Meyer
fc47a92e4a Re-enable upstream behaviour of systemd-tmpfiles --purge
From the 257 release notes:

* The --purge switch of systemd-tmpfiles (which was added in v256) has
  been reworked: it will now only apply to tmpfiles.d/ lines marked
  with the new "$" flag. This is an incompatible change, and means any
  tmpfiles.d/ files which shall be used together with --purge need to
  be updated accordingly. This change has been made to make it harder
  to accidentally delete too many files when using --purge incorrectly.

The feature is now sufficiently hard to misuse that we can drop the patch.
2024-12-20 13:11:51 +01:00
Zbigniew Jędrzejewski-Szmek
62abb21906 Version 257.1
- A bunch of post-release fixes, incl. for systemd-resolved, tpm2
  support, systemd-networkd, systemd-logind, journalct.
- Should fix rhbz#2325780.
2024-12-20 12:52:28 +01:00
Yu Watanabe
35e6814ef4 Add patch for test-time-util 2024-12-16 04:16:57 +09:00
Yu Watanabe
bd8339bf00 sysusers: support new ! line flag for creating fully locked accounts
For https://github.com/systemd/systemd/pull/34876.
Follow-ups for e42eed4afd.
2024-12-16 03:40:18 +09:00
Zbigniew Jędrzejewski-Szmek
c2f5f4a68a Version 257
- A bunch of small fixes in various components: systemd itself, systemd-cryptenroll,
  sd-varlink, sd-boot, documentation, tests
- Includes an update of the hardware database
2024-12-10 21:23:13 +01:00
Zbigniew Jędrzejewski-Szmek
31aaef8e17 Enable slow tests during build
The build is slow anyway, so the difference shouldn't matter. But more
tests is better. The build logs show that slow tests were disabled.

Inspired by https://github.com/systemd/systemd/issues/34471.
2024-12-05 12:50:39 +01:00
Zbigniew Jędrzejewski-Szmek
433efb38f4 Only apply the new Recommends in fedora
Our mkosi.conf.d/10-centos-fedora/mkosi.prepare script tries to install
the soft dependencies too.

The build fails in centos 9 and 10:
Error: Unable to find a match: qemu-device-display-virtio-gpu
                               qemu-device-display-virtio-vga

[skip changelog]
2024-12-04 11:38:32 +01:00
Zbigniew Jędrzejewski-Szmek
8dc31eaf04 Recommend qemu-kvm-core instead of qemu-kvm
... (rhbz#2329979)
2024-12-03 14:12:49 +01:00
Yu Watanabe
53cfdea02a Update tmpfiles --destroy-data patch
This adds one more --destroy-data switch to make the test pass.
2024-11-30 00:00:22 +09:00
Zbigniew Jędrzejewski-Szmek
04f0a692da Version 257~rc3
- A bunch of small fixes here and there: virtualization detection, udev,
  systemd-networked, pid1.
- Includes a hardware database update.
2024-11-28 00:17:19 +01:00
Zbigniew Jędrzejewski-Szmek
243a055429 Make systemd-network-generator co-owned by -udev and -networkd
... (rhbz#2328723)

The files systemd-networkd-generator generates are read by udev (.link files)
and by networkd (.netdev, .netdev files). We can't move it to systemd-networkd
subpackage only, because that would potentially break the corner case of people
having systemd-udev installed and using the generator, but not systemd-networkd.
And there is no dependency from systemd-networkd to systemd-udev. I think this
is correct, because networkd can be used in containers without udev. But the
generator is not useful without either of those two daemons, so let's move
it to make the core package a bit lighter.
2024-11-26 11:08:20 +01:00
Zbigniew Jędrzejewski-Szmek
37c10f5b03 Pull in qemu from systemd-container
Based on https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/issues/27.
2024-11-19 13:16:16 +01:00
Zbigniew Jędrzejewski-Szmek
7bd1d09f7f Change sysusers u! lines to u because we don't have support in rpm 2024-11-15 22:05:21 +01:00
Zbigniew Jędrzejewski-Szmek
943bd94cf6 Version 257~rc2
- Changes in systemd-measure, systemd-networkd, documentation,
  systemd-sysupdated, systemd-sbsign, systemd-boot, systemd-stub,
  systemd-nspawn, run0, ukify
- Hardware database update
2024-11-15 21:42:10 +01:00
Zbigniew Jędrzejewski-Szmek
6162965002 Disable freezing of user sessions
... (rhbz#2321268)
2024-11-15 21:38:07 +01:00
Zbigniew Jędrzejewski-Szmek
0c236cedb9 Upload sources
[skip changelog]
2024-11-07 17:14:33 +01:00
Zbigniew Jędrzejewski-Szmek
ea947ce068 Version 257~rc1 2024-11-07 16:16:32 +01:00
Daan De Meyer
834ba50e79 Use %posttrans instead of %postun to restart services
Anything we put in a %postun script needs two releases of the rpm
before it is invoked. The reason for using %postun to restart services
is because it runs after the old version has been removed so we can be
sure all remaining dropins and such files from the old version have been
removed. %posttrans gives us the same guarantee but the %posttrans of the
new version will run on install and upgrade which means the changes will
be applied immediately instead of having to release twice before the changes
take effect.

We define the systemd_posttrans_with_restart macro in the spec because we
can't use the upstream one as we ship it ourselves.
2024-11-07 11:53:26 +01:00
Yaakov Selkowitz
8dafa3810b Disable OpenSSL v3 ENGINE on RHEL
RHEL 10+ does not provide <openssl/engine.h> and defines OPENSSL_NO_ENGINE.

https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine
2024-11-07 10:49:46 +00:00
Zbigniew Jędrzejewski-Szmek
8f44e8097d Add forgotten patch
[skip changelog]
2024-11-07 11:45:37 +01:00
Daan De Meyer
86ca699d18 Backport user manager reexec changes
This drastically simplifier reexecs of user managers by using
systemctl reload to do a user manager reexec. This means we don't
need systemd-run, a pam session or systemd-stdio-bridge anymore to
do a user manager reexec and all job tracking is handled by pid 1
instead of bash.
2024-11-05 13:16:26 +00:00
David Tardon
009c64d6a2 Use %systemd_preun in systemd-resolved
With that, systemd-resolved.service is not only disabled but also
stopped on package uninstall.

... (rhbz#2305391)
2024-11-05 13:15:41 +00:00
Yu Watanabe
e42eed4afd test_sysusers_defined: support new ! line flag for creating fully locked accounts
For https://github.com/systemd/systemd/pull/34876.
2024-10-24 18:11:08 +09:00
Zbigniew Jędrzejewski-Szmek
2c6a4e2f90 Version 256.7
- Various small fixes in many components
- Documentation updates
2024-10-11 18:32:58 +02:00
Zbigniew Jędrzejewski-Szmek
bedc0270e7 Move yum/dnf protection removal config file under /usr
https://github.com/uapi-group/specifications/issues/76

Actually, add a new file under /usr, but keep the old file in /etc
because it's still needed for dnf. The new file in the new location
is useful because it means that we get the correct behaviour even when
/etc is emptied (on systems with new dnf version).

dnf5 reads the new location:
https://github.com/rpm-software-management/dnf5/issues/1107
https://github.com/rpm-software-management/dnf5/pull/1110
2024-09-24 16:35:29 +02:00
Zbigniew Jędrzejewski-Szmek
5a82129a41 Reword some descriptions
Also reflow %descriptions to 80 columns.

[skip changelog]
2024-09-20 17:45:09 +02:00
Matteo Croce
ce99022f7b Version 256.6
Bump version and remove already present ukify patch
2024-09-12 02:00:30 +02:00
Daan De Meyer
a67221c3f0 Always build ukify package
Even on non-uefi architectures, ukify can be used to build UKIs for
UEFI images. For example, mkosi can use it to build UKIs on s390x.
To enable this use case, let's always build ukify, but with a conditional
dependency on systemd-boot only on arches that support UEFI.
2024-08-29 12:58:16 +03:00
Daan De Meyer
abb115a905 Do not use patch to modify systemd-user pam config file
We still want the Fedora systemd-user pam config when building with
--noprep so let's install the pam config file using a regular source
instead of patching the one provided by systemd.
2024-08-28 11:38:58 +02:00
Daan De Meyer
196ec98228 Drop %upstream conditionalization for patches
rpm will imply --noprep when using --build-in-place in rpm 4.20 and
we're switching the mkosi rpm builds to use --noprep as well on older
rpm versions. This means we don't need to gate out patch applications
anymore with the %upstream macro.
2024-08-28 10:22:26 +02:00
Daan De Meyer
28076e6232 Only make python3-pillow Recommends on Fedora
python3-pillow is not available in CentOS Stream 9/10 so let's not
mark it as Recommends.
2024-08-27 15:04:08 +02:00
Davide Cavalca
a9807c4486 Do not require grubby on CentOS Stream 9
This is a fixup for 12d1f05029.
2024-08-24 08:29:51 -07:00
Zbigniew Jędrzejewski-Szmek
d38cacfd3a Version 256.5
- Includes the patches for the kernel change with kernel threads in
  leaf cgroups (https://github.com/systemd/systemd/pull/33885)
- Various smaller fixes
2024-08-20 19:18:05 +02:00
Zbigniew Jędrzejewski-Szmek
38291e13c1 Disable integration of userdb in sshd 2024-08-20 18:42:34 +02:00
Daan De Meyer
53118d2112 Backport patch to only read /proc/cmdline when not in container 2024-07-29 19:01:26 +02:00
Daan De Meyer
903e8e0f88 Backport upstream patch to try more initrd variants in 90-loaderentry.install
This makes sure that 90-loaderentry.install plays nicely with the
dracut kernel-install plugin that is shipped in Fedora and CentOS
Stream.
2024-07-29 17:59:27 +02:00
Zbigniew Jędrzejewski-Szmek
b29a66006c Version 256.4
- Hardware db update
- Minor fixes for systemd-udevd and varlink protocol
2024-07-25 12:50:06 +02:00
Daan De Meyer
1cdae03391 Update tmpfiles --destroy-data patch
Let's make sure we patch the integration test for systemd-tmpfiles
--purge as well so it doesn't fail.
2024-07-23 13:22:01 +02:00
Zbigniew Jędrzejewski-Szmek
4fd4ef72a6 Upload sources
[skip changelog]
2024-07-23 10:58:29 +02:00
Zbigniew Jędrzejewski-Szmek
3c3772150d Version 256.3
- A bunch of fixes for systemd (pid1)
- Various upgrades related to running tests in mkosi
2024-07-23 10:25:28 +02:00
Daan De Meyer
00babccdea Simplify BFQ scheduler enablement
This doesn't need to be a patch, let's instead install it as part of
%install to simplify things a little.
2024-07-20 17:08:03 +02:00
Fedora Release Engineering
ef8ddb130b Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 06:58:47 +00:00
Zbigniew Jędrzejewski-Szmek
5b4a5461d6 Fix changelog
rpmautospec doesn't like the merge: "unresolvable merge".
To avoid the issue, re-add the changelog file. Also, let's drop the
stuff that is only specific to EPEL, since this branch is primarily
for rawhide.
2024-07-19 16:57:23 +02:00
Daan De Meyer
a8c5c736f6 Only apply shorter shutdown timer changes on Fedora
We had a *lot* of breakage caused by this change internally so let's
make the spec a little more conservative by only applying the shorter
shutdown timer for Fedora builds.
2024-07-19 14:53:40 +00:00
Zbigniew Jędrzejewski-Szmek
f4e284cd7a Merge #150 Deal with systemd-timesyncd backport in EPEL 2024-07-19 14:52:52 +00:00
Daan De Meyer
12d1f05029 Don't claim /sbin/installkernel if building for CentOS Stream 9
CentOS Stream 9 has older grubby that still claims /sbin/installkernel
for itself so let's not install the symlink in that case.
2024-07-19 16:33:08 +02:00
Daan De Meyer
9378a0733a Deal with systemd-timesyncd backport in EPEL 2024-07-19 13:26:50 +02:00
Zbigniew Jędrzejewski-Szmek
79828f2753 spec: use "positive" conditions in conditionals
I think it's easier to read this way.

[skip changelog]
2024-07-18 10:12:15 +02:00
Daan De Meyer
c5d3af1638 Add build dependency on rsync on CentOS Stream 9
meson on CentOS Stream 9 is too old to properly handle symlinks
when installing test data so the systemd meson build script uses
rsync instead. Let's add the requisite build requires to make that
work.
2024-07-18 08:00:02 +00:00
Zbigniew Jędrzejewski-Szmek
8d080fb5cb Backport udma buffer access patch
... (rhbz#2298422)
2024-07-17 11:49:37 +02:00
Daan De Meyer
6084453807 Add support for building from a specific branch
For our nightly systemd build for the CentOS Hyperscale build it
would be very useful to download sources straight from git main on
github so let's allow defining the "branch" macro to do just that.
2024-07-16 19:24:32 +02:00
Daan De Meyer
cb9d631ca0 Update PR patch metadata
The PR was recently rebased so let's include the newest patch metadata
in the repo.
2024-07-16 18:17:54 +02:00
Zbigniew Jędrzejewski-Szmek
3889da947e In standalone subpackages, suggest coreutils-single
In a minimal installation, we pull in coreutils via dependencies.
coreutils-single is much smaller, so bias the resolved towards that.

$ sudo dnf5 install --releasever=rawhide --installroot=/var/tmp/inst1 --use-host-config \
  /var/lib/mock/fedora-rawhide-x86_64/result/systemd-standalone-{repart,shutdown,sysusers,tmpfiles}-256.2-5*rpm
After this operation 57 MiB will be used (install 57 MiB, remove 0 B).

$ sudo dnf5 install --releasever=rawhide --installroot=/var/tmp/inst1 --use-host-config \
  /var/lib/mock/fedora-rawhide-x86_64/result/systemd-standalone-{repart,shutdown,sysusers,tmpfiles}-256.2-6*rpm
After this operation 41 MiB will be used (install 41 MiB, remove 0 B).
2024-07-15 13:36:06 +02:00
Zbigniew Jędrzejewski-Szmek
b7800e3e66 Drop versions from Conflicts for standalone packages
Because the conflicts are in one direction, dnf may try to install older
systemd/systemd-duev and newer systemd-standalone-*. This is not what we want:

$ sudo dnf5 install systemd-standalone-repart
Updating and loading repositories:
Repositories loaded.
Package                             Arch    Version       Repository          Size
Downgrading:
 systemd                            x86_64  255.4-1.fc40  fedora          14.6 MiB
   replacing systemd                x86_64  256.2-1.fc40  @commandline    16.8 MiB
 systemd-container                  x86_64  255.4-1.fc40  fedora           1.4 MiB
   replacing systemd-container      x86_64  256.2-1.fc40  @commandline     1.5 MiB
 systemd-devel                      x86_64  255.4-1.fc40  fedora         550.3 KiB
   replacing systemd-devel          x86_64  256.2-1.fc40  @commandline   556.1 KiB
 systemd-libs                       x86_64  255.4-1.fc40  fedora           1.9 MiB
   replacing systemd-libs           x86_64  256.2-1.fc40  @commandline     2.0 MiB
 systemd-networkd                   x86_64  255.4-1.fc40  fedora           2.0 MiB
   replacing systemd-networkd       x86_64  256.2-1.fc40  @commandline     2.1 MiB
 systemd-oomd-defaults              noarch  255.4-1.fc40  fedora         187.0   B
   replacing systemd-oomd-defaults  noarch  256.2-1.fc40  @commandline   187.0   B
 systemd-pam                        x86_64  255.4-1.fc40  fedora           1.0 MiB
   replacing systemd-pam            x86_64  256.2-1.fc40  @commandline     1.1 MiB
 systemd-resolved                   x86_64  255.4-1.fc40  fedora         629.9 KiB
   replacing systemd-resolved       x86_64  256.2-1.fc40  @commandline   667.1 KiB
 systemd-rpm-macros                 noarch  255.4-1.fc40  fedora           9.5 KiB
   replacing systemd-rpm-macros     noarch  256.2-1.fc40  @commandline     9.3 KiB
 systemd-tests                      x86_64  255.4-1.fc40  fedora          16.5 MiB
   replacing systemd-tests          x86_64  256.2-1.fc40  @commandline    20.0 MiB
 systemd-udev                       x86_64  255.4-1.fc40  fedora          11.5 MiB
   replacing systemd-udev           x86_64  256.2-1.fc40  @commandline    11.7 MiB
 systemd-ukify                      noarch  255.4-1.fc40  fedora          69.9 KiB
   replacing systemd-ukify          noarch  256.2-1.fc40  @commandline    73.3 KiB
Installing:
 systemd-standalone-repart          x86_64  255.8-1.fc40  updates        986.6 KiB

Transaction Summary:
 Installing:        1 packages
 Replacing:        12 packages
 Downgrading:      12 packages

Also, declare the Conflicts on both sides, so that the issue is resolved
immediately. Otherwise, it could still occur when an older version of the
non-standalone packages are available (or installed).
2024-07-15 13:34:36 +02:00
Zbigniew Jędrzejewski-Szmek
a3524fc837 Use a more precise Recommends for libkxbcommon
The old one was the first one added, and referred to the package.
The later ones refer to the soname. Let's convert that one to that
too.
2024-07-14 11:28:29 +02:00
Daan De Meyer
980ede8c0f Drop machined revert
The selinux-policy was fixed (https://bugzilla.redhat.com/show_bug.cgi?id=2279923)
so let's drop the revert. The minimum version for the selinux-policy
Conflicts is updated to make sure it is installed.
2024-07-11 13:05:04 +02:00
Zbigniew Jędrzejewski-Szmek
d569018a92 Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-09 12:40:39 +02:00
Zbigniew Jędrzejewski-Szmek
8881fa94ee Version 256.2
- A bunch of various small fixes
2024-07-08 19:27:29 +02:00
Zbigniew Jędrzejewski-Szmek
1cc4f83002 Link systemd-executor statically 2024-07-08 15:21:08 +02:00
Yaakov Selkowitz
0319e62d9c Update dracut workaround
Fedora 40 and RHEL 10 both now have dracut 101.
2024-07-05 18:56:02 -04:00
Yaakov Selkowitz
c96f54de22 Fix ELN build
ELN, following rawhide, now also splits out the openssl-devel-engine
headers in preparation for their eventual removal.
2024-07-05 18:00:39 -04:00
Daan De Meyer
3f68c5d802 Only exclude dracut conflicts on non-fedora on upstream builds
For the CentOS Stream Hyperscale SIG we backport a newer version of
dracut and still want the Conflicts to apply so let's conditionalize
the check on the %upstream macro since we only need it for upstream
builds anyway.
2024-07-05 15:26:40 +02:00
Daan De Meyer
7db154308b Conditionalize dracut Conflicts more
Make sure on centos stream 10 we also conflict with dracut 060-2
and that on centos stream 9 so that the spec can still be used to
build systemd rpms for centos stream 9 upstream in systemd CI that
can be installed on centos stream 9.

(dracut is pulled in as a required dependency of kernel-core so we
can't just not install it on centos stream 9 unfortunately).
2024-07-05 11:09:10 +02:00
Daan De Meyer
f9fe17dbde Use vmlinux.h from kernel-devel
Let's make sure we use the vmlinux.h from kernel-devel or none at
all. This makes sure the systemd BPF programs are built against a
known version of vmlinux.h and we don't depend on /sys being available
to generate vmlinux.h ourselves.

Use rpmdev-vercmp to select vmlinux.h from the latest kernel.
2024-07-02 19:41:34 +02:00
Zbigniew Jędrzejewski-Szmek
9cbad936a6 Pull in openssl-devel-engine 2024-07-02 13:40:53 +02:00
Daan De Meyer
8ae009f929 Only add Requires on python3-zstd on Fedora
python3-zstd is not packaged on for CentOS Stream.
2024-07-01 15:18:47 +02:00
Daan De Meyer
750e910c7c Drop BuildRequires on python3-zstd
python3-zstd is only required by ukify and ukify already has a Requires
dependency on python3-zstd so let's drop the BuildRequires.
2024-07-01 15:18:07 +02:00
Zbigniew Jędrzejewski-Szmek
8153d9b0f9 Revert "Remove tmpfiles snippet for /home and /srv"
This reverts commit a76669ee22.

People create /usr-only images by making an installation and only picking
up /usr from it. In that case, the snippet is needed to re-recreate /home
on the rootfs.
2024-06-25 10:29:02 +02:00
Zbigniew Jędrzejewski-Szmek
a76669ee22 Remove tmpfiles snippet for /home and /srv 2024-06-18 21:18:10 +02:00
Zbigniew Jędrzejewski-Szmek
b3e1d52cb4 Soft-disable tmpfiles --purge until a good use case comes up 2024-06-18 21:18:10 +02:00
Zbigniew Jędrzejewski-Szmek
4a29ab3f3b Version 256.1 2024-06-18 21:03:17 +02:00
U2FsdGVkX1
ebf352d292 disable auto-features when bootstrapping 2024-06-15 22:56:39 -04:00
Zbigniew Jędrzejewski-Szmek
1ae0516ae7 Version 256
- Only minor changes since -rc4.
- Hardward db is updated.
2024-06-12 00:08:45 +02:00
Zbigniew Jędrzejewski-Szmek
b32641170e Restore patch to drop varlink method call
It still seems to fail in the CI. Maybe the selinux policy does not
work as expected.
2024-06-07 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
421f0041b3 Version 256~rc4 2024-06-06 22:04:51 +02:00
Zbigniew Jędrzejewski-Szmek
65d9b49791 Fix typo
[skip changelog]
2024-06-06 21:55:27 +02:00
Zbigniew Jędrzejewski-Szmek
c56891fb68 Drop sysusers.d/basic.conf
- We rely on setup to provide all necessary groups.
2024-06-06 21:55:27 +02:00
Zbigniew Jędrzejewski-Szmek
69472997b9 Renumber sources and make order more consistent
[skip changelog]
2024-06-06 21:55:27 +02:00
Adam Williamson
1f94b56cee Partially backport PR #33016 to fix crashes in KDE 6.3.0 2024-06-02 10:07:04 -07:00
Zbigniew Jędrzejewski-Szmek
74810c5bc4 Fix release field
[skip changelog]
2024-05-29 14:54:54 +02:00
Zbigniew Jędrzejewski-Szmek
a94605b586 Add patch to work-around libbpf bug
... (rhbz#2280935)
2024-05-29 14:24:15 +02:00
Zbigniew Jędrzejewski-Szmek
c72623872a Version 256~rc3
The revert patch Patch0001 could be droppped, since the policy has
been updated, but let's do that later separately.
2024-05-23 10:11:57 +02:00
Zbigniew Jędrzejewski-Szmek
f706e12e05 Upload sources
[skip changelog]
2024-05-15 13:57:29 +02:00
Zbigniew Jędrzejewski-Szmek
b64db84892 Version 256~rc2
- Various small changes all over
- A fix for rhbz#2273069
2024-05-15 11:07:54 +02:00
Zbigniew Jędrzejewski-Szmek
8fe1f037d2 Restore compatibility with F40
In systemd upstream CI, we only have the rawhide branch, because we import
dist-git via git submodule. But we want to build systemd on F40 too from this
branch, so conditionally ressurect the patch to make that work. This partially
reverts 69d6e44695.

[skip changelog]
2024-05-14 20:55:59 +02:00
Zbigniew Jędrzejewski-Szmek
f2d12ae6d1 Make %release_override overridable from outside 2024-05-13 13:26:25 +02:00
Zbigniew Jędrzejewski-Szmek
491a9ed5d1 Override release tag
I think this is a bug in rpmautospec. The release tag is always generated
as "1". Before this is investigated and fixed, just set it manually.

[skip changelog]
2024-05-11 14:08:39 +02:00
Zbigniew Jędrzejewski-Szmek
a2d3bbf3d2 Temporarily drop call to varlink method to avoid SELinux denial
There were a bunch of other commits incl. bugfixes that mean that it'd
make sense to update to the latest snapshot, but I chose not to do that to
avoid introducing new issues. We'll get -rc2 soon enough anyway.
2024-05-11 13:32:56 +02:00
Zbigniew Jędrzejewski-Szmek
f872d00c6a Version 256-rc1^20240509git
- There were some fixes merged upstream, so let's try again before
  v256-rc2 is released.
2024-05-09 12:20:52 +02:00
Jan Macku
b9ec39c0ef spec: systemd-ukify should depend on systemd-boot
`systemd-ukify` requires `/usr/lib/systemd/boot/efi/{addonx64,linuxx64}.efi.stub` to work properly, e.g.

```
Traceback (most recent call last):
  File "/usr/bin/ukify", line 1660, in <module>
    main()
  File "/usr/bin/ukify", line 1648, in main
    check_inputs(opts)
  File "/usr/bin/ukify", line 390, in check_inputs
    value.open().close()
  File "/usr/lib64/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/lib64/python3.9/pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/systemd/boot/efi/addonx64.efi.stub'
```

`/usr/lib/systemd/boot/efi/{addonx64,linuxx64}.efi.stub` are now contained in `systemd-boot-unsigned` sub-package so adding a dependency on it seems like the easiest solution.

Originally reported by: Vitaly Kuznetsov <vkuznets@redhat.com> in https://issues.redhat.com/browse/RHEL-33990

Signed-off-by: Jan Macku <jamacku@redhat.com>
2024-05-02 08:54:12 +02:00
Zbigniew Jędrzejewski-Szmek
580f7f149a Override release tag
I think this is a bug in rpmautospec. The release tag is always generated
as "1". Before this is investigated and fixed, just set it manually.

[skip changelog]
2024-04-27 21:28:18 +02:00
Zbigniew Jędrzejewski-Szmek
c6f7df8b6c Add additional daemon-reexec for upgrades from old systemd versions
https://github.com/systemd/systemd/issues/32508#issuecomment-2079991745

> The new systemd package does the reexec in %postun, but the old one does it in
> %post. So if we install the new one, we don't do any reexec (since %postun
> doesn't run in this case), but once we remove the old one we also don't do any
> reexec, because in this case there's no reexec in %postun:

> # dnf upgrade --rpmverbosity=debug ./*.rpm |& tee log.txt
> ...
> : %postun(systemd-255.5-1.fc41.x86_64): scriptlet start
> D: %postun(systemd-255.5-1.fc41.x86_64): execv(/bin/sh) pid 2649
> D: Plugin: calling hook scriptlet_fork_post in selinux plugin
> D: setexecfilecon: (/bin/sh, rpm_script_t)
> + '[' 1 -eq 1 ']'
> + '[' -w /var ']'
> + journalctl --update-catalog
> + systemd-tmpfiles --create
2024-04-27 20:52:59 +02:00
Zbigniew Jędrzejewski-Szmek
529e5aa70e Drop trigger scriptlets for upgrades from systemd < 247 2024-04-27 20:52:42 +02:00
Zbigniew Jędrzejewski-Szmek
9ebc196a77 Add Recommends for dlopen libraries
They were already in place, but disabled using %{with upstream}. So it's
enough to drop this conditionalization.
2024-04-27 20:47:38 +02:00
Zbigniew Jędrzejewski-Szmek
c29942f58b Version 256~rc1
- See https://raw.githubusercontent.com/systemd/systemd/v256-rc1/NEWS.
  Too many changes to list or discuss here.
2024-04-26 09:04:32 +02:00
Zbigniew Jędrzejewski-Szmek
4e7c10c3a5 Reexec systemd in %postun (https://github.com/systemd/systemd/issues/5096)
- The workaround dbus issues in upgrades from systemd-239 is dropped
2024-04-24 17:29:40 +02:00
Zbigniew Jędrzejewski-Szmek
69d6e44695 Drop workaround to run generators without sandboxing
... (requirement on dracut >= 60 is added)
2024-04-24 16:45:03 +02:00
Zbigniew Jędrzejewski-Szmek
041d0e2394 Version 255.5
- Many different small fixes: systemd itself, systemd-networkd,
  systemd-journal-remote, compilation fixes for newer kernels and
  clang, systemd-homed, systemd-resolved, ukify, systemd-tmpfiles,
  various other.
2024-04-24 16:43:34 +02:00
Zbigniew Jędrzejewski-Szmek
cffa0853c9 Move systemctl symlinks to /usr/bin too
[skip changelog]
2024-04-18 16:00:40 +02:00
Zbigniew Jędrzejewski-Szmek
a37923658f Prepare for bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

Skip symlinks if they'd point to themselves,
rely on filesystem to create symlinks for us.
2024-04-10 22:08:06 +02:00
Zbigniew Jędrzejewski-Szmek
3f8c38e5d6 Drop perl from BR
It was removed upstream in 711169905e75617eabf3934273aa37dac02c6458,
except for one call in test/test-functions, but we don't run those
during package build.

[skip changelog]
2024-04-08 13:54:32 +02:00
Zbigniew Jędrzejewski-Szmek
5a7cc0a327 Fix build with newer kernel headers
[skip changelog]
2024-04-07 10:57:49 +02:00
Zbigniew Jędrzejewski-Szmek
976e1b0a68 spec: add %bcond to build without documentation
Building of the man pages takes quite a while. We can skip this step
in integration mkosi tests, we don't care about documentation there.
2024-03-27 11:40:36 +01:00
Zbigniew Jędrzejewski-Szmek
3a8ac5baa8 spec: sort and deduplicate gid configuration
[skip changelog]
2024-03-27 11:39:37 +01:00
Zbigniew Jędrzejewski-Szmek
f1d38667ef Revert "Adjust release tag for riscv64"
This reverts commit b6f8f82d8b.

It was a misunderstanding, it wasn't supposed to go in.
2024-03-22 13:10:38 +01:00
David Abdurachmanov
ac2364bc4b Enable bootloader stack for riscv64 2024-03-22 13:03:35 +01:00
Zbigniew Jędrzejewski-Szmek
b6f8f82d8b Adjust release tag for riscv64
If it is specified externally, we hounour that. Otherwise, default
to "1.0.riscv64" on riscv.
2024-03-22 13:02:00 +01:00
Zbigniew Jędrzejewski-Szmek
58b044d8e9 Adjust indentation
[skip changelog]
2024-03-22 13:02:00 +01:00
Zbigniew Jędrzejewski-Szmek
e3e9477031 BR: valgrind is not available on riscv64
[skip changelog]
2024-03-22 13:02:00 +01:00
Zbigniew Jędrzejewski-Szmek
ec5f3a94bc BR: add versioned dependency on binutils for ukify tests
[skip changelog]
2024-03-22 13:02:00 +01:00
David Tardon
2e32a339a1 Make Requires(*) on systemd versioned
Most systemd tools run from scriptlets need libsystemd-shared-X.so (from
systemd package), which contains version and release in it's name.
Therefore, the same version of systemd package must be already installed
when they run.

Resolves: #2282821
2024-03-20 11:01:27 +01:00
Zbigniew Jędrzejewski-Szmek
95a3861e92 Add R:systemd-udev to systemd-networkd subpackage
... (rhbz#2173425)
2024-03-20 09:57:27 +01:00
Daan De Meyer
ae8a47e92e Add psutil dependency to systemd-tests
Required by systemd-networkd-tests.py
2024-03-18 14:25:44 +01:00
Daan De Meyer
2822a03dde Build in developer mode when building for upstream 2024-03-07 12:18:11 +00:00
Zbigniew Jędrzejewski-Szmek
e8d02128c9 Version 255.4 2024-03-01 16:38:06 +01:00
Daan De Meyer
dc3dcc0114 Allow setting extra configure options using %meson_extra_configure_options
Will be used when building upstream to enable developer mode or sanitizers
for example.
2024-02-21 15:42:47 +01:00
Daan De Meyer
104532bab2 Apply pam patch when building for upstream
It applies without conflicts and ensures coverage of a pretty important
patch so let's apply it when building for upstream.
2024-02-21 15:42:00 +01:00
Daan De Meyer
0a51fe1e6b Use %version_override/%release_override to specify version/release by users
When backporting the latest changes to CentOS Hyperscale reviewers
were confused by using %version and %release to define "Version" and
"Release" which are supposed to specify the values for %version and
%release. Let's use different macros to make it more clear that these
are supposed to be set by users building the rpm and add a comment
to explain why we do this.
2024-02-21 12:02:00 +01:00
Zbigniew Jędrzejewski-Szmek
7740aea610 Let libkmod be a dlopen'ed dependency 2024-02-20 11:11:20 +01:00
Daan De Meyer
3520bb5c92 Allow overriding the version and release using macros
Let's allow overriding the version and release by specifying the
corresponding macros on the rpmbuild command line. This allows us
to specify a custom version and release when doing upstream builds.
2024-02-17 22:08:38 +01:00
Daan De Meyer
74b3ef386f Stop passing %{release} to meson when building in upstream mode
When building in upstream mode, the release doesn't really have any
meaning so let's stop passing it as part of the version-tag and
shared-library-tag arguments.

This also makes it possible to make the release a timestamp so that
each package built from upstream is guaranteed to be newer. If we
pass the release to meson via version-tag and shared-library-tag and
the release changes every build, we end up having constant rebuilds
of various targets in meson that depend on the version.
2024-02-17 22:08:35 +01:00
Daan De Meyer
4c5b844e62 Don't pass b_lto to meson
Let's depend on %lto_cflags doing the right thing instead of manually
passing the b_lto option to meson.
2024-02-17 17:58:18 +01:00
Daan De Meyer
3f65739521 Update usage of meson-vcs-tag.sh to account for upstream changes
The second argument now specifies the version tag version so let's
adapt. Because the script now supports running without any arguments
at all, let's just do that.

The output now also doesn't use any hyphens anymore so we get rid
of the sed transformation as well;
2024-02-15 20:23:48 +01:00
Daan De Meyer
a95f14a72e Replace inplace macro with upstream macro
Currently, the inplace macro only influences whether we use
tools/meson-vcs-tag.sh to figure out the version instead of using
the predefined one. But doing an inplace build shouldn't really
affect the version, since it's possible to do an inplace builds that's
not a git main upstream build, so the two concepts are disjoint.

Instead, let's replace the "inplace" macro with an "upstream" macro
to indicate that we're building from systemd git upstream. Aside from
influencing the version, this also disables various patches and adds
a libarchive dependency that was added upstream recently but isn't in
an official release yet.
2024-02-11 20:31:41 +01:00
Daan De Meyer
a9172a2e9c Remove reconfiguration logic
meson handles this internally since 1.3 so we don't need this logic
anymore.
2024-02-11 20:31:41 +01:00
Daan De Meyer
b375f983d9 Stop depending on filelists
There's a bug in dnf5 where it always downloads filelists metadata
even for file dependencies that are in the "allowed" paths, such as
/usr/bin/getfacl. Let's use the package names for now to avoid
downloading the filelists metadata unnecessarily.

See https://bugzilla.redhat.com/show_bug.cgi?id=2263771
2024-02-11 20:31:28 +01:00
Zbigniew Jędrzejewski-Szmek
92ef780f99 Conflicts/Provides with systemd-standalone-repart are moved udev subpackage
/usr/bin/systemd-repart is in systemd-udev, so this Conflicts/Provides
combo was misplaced. (For the Conflicts, this is actually not a real
issue, because systemd-udev Requires systemd, so transitively, the
conflicting packages could not be installed. But for Provides, the
issue is real, because systemd by itself does _not_ provide the
binary.)

This was noticed by rpmdeplint CI job:
Undeclared file conflicts:
systemd-standalone-repart-255.3-1.fc40.x86_64 provides /usr/bin/systemd-repart which is also provided by systemd-udev-255.2-2.fc40.x86_64
2024-01-29 11:23:07 +01:00
Zbigniew Jędrzejewski-Szmek
6f32627f61 Version 255.3
- A bunch of various fixes for memory and behaviour, in many different
  components (bootctl, systemd, udev, systemd-networkd, systemd-homed,
  systemd-logind, systemd-resolve, systemd-repart, systemd-analyze,
  systemd-dissect, systemd-boot, pam modules, systemd-storagetm,
  systemd-journal-remote, kernel-install)
- Improved detection of virtualization (Google Compute Engine, Apple Virt)
- Updates for shell completions and docs
- An update for hardware database
2024-01-25 16:49:50 +01:00
Zbigniew Jędrzejewski-Szmek
7ec963cfce Add temporary patch to adjust uid range classification
... (rhbz#2251843)
2024-01-23 18:31:57 +01:00
Zbigniew Jędrzejewski-Szmek
cb344fd09f Upload sources
[skip changelog]
2024-01-09 16:21:46 +01:00
Zbigniew Jędrzejewski-Szmek
047337bfbc Version 255.2
- Fixes missing DNSSEC validity check in SOA DNS packets (CVE-2023-7008)
- systemd-resolved and systemd-networkd are restarted after an upgrade.
2024-01-09 15:52:01 +01:00
Zbigniew Jędrzejewski-Szmek
cd0e291d13 Add missing %postun scriptlets for systemd-{resolved,networkd}
... (rhbz#2255718)

I'm not sure what happened here. But I think both services should be
fine with a restart and there is no reason not to do this.
2024-01-09 10:12:34 +01:00
Zbigniew Jędrzejewski-Szmek
3211e4adfc Version 255.1 2023-12-16 11:07:35 +01:00
Zbigniew Jędrzejewski-Szmek
4c7acded2a Do not remove modified config files
Our config files in /etc/ were marked as %config(noreplace). This means that the
would not be replaced on upgraded if local modifications have been made. But
when we moved them to /usr/lib, they would be be renamed to .rpmsave, if they
had local modifications. This is not what I expected, but what rpm apparently
does. So we need to add them as %ghost to prevent the removal. This is probably
for the better anyway.
2023-12-13 13:02:45 +01:00
Zbigniew Jędrzejewski-Szmek
3a8edc7540 Fix previous commit
[skip changelog]
2023-12-11 22:51:48 +01:00
Zbigniew Jędrzejewski-Szmek
1d61a36c4c Add comment
[skip changelog]
2023-12-09 14:36:49 +01:00
Zbigniew Jędrzejewski-Szmek
245a2587e0 Add /etc/ssh/sshd_config.d to the file list
This is a bit of a mess: sshd can only load configuration from
/etc/ssh/sshd_config.d, and that directory is declared as non-world-readable.
This is in violation of the packaging guidelines which say that packaged files
must be world-readable, and also makes very little sense, since those files
are part of the package payload.

If we create the directory with different permissions, and list it in %files,
installation will fail. If we don't list it in %files, and the user doesn't have
openssh-server installed, they will have an unowned directory. Another option
would be to depend on owner of this directory, i.e. openssh-server, but we don't
want to have that dependency. So let's copy the %files line from openssh-server
and figure out what to do if it changes in openssh-server again.
2023-12-08 18:17:39 +01:00
Zbigniew Jędrzejewski-Szmek
29eb35530b Move config files to /usr/lib/systemd
... (e.g. /etc/systemd/system.conf → /usr/lib/systemd/systemd.conf).
Both config file locations were already supported, and the files
installed in /etc/ were "empty" (i.e. they had only comments and section
headers). The move does not change the configuration, but just makes
/etc more empty by default. See
6495361c7d for more
discussion and details.
2023-12-08 13:25:18 +01:00
Zbigniew Jędrzejewski-Szmek
40811593d0 Move systemd-bsod is to udev subpackage 2023-12-08 13:24:58 +01:00
Zbigniew Jędrzejewski-Szmek
81bbc12743 Version 255
- Just a few bugfixes since 255-rc4: seccomp filters, logging,
  documentation, systemd-repart
- Includes a hardware database update.
2023-12-06 22:19:12 +01:00
Yu Watanabe
3bab7a695c Drop deprecated split-usr option
[skip changelog]
2023-12-06 00:36:37 +09:00
Yu Watanabe
e36c897dbd Replace deprecated boolean value with enabled/disabled
[skip changelog]
2023-12-06 00:36:26 +09:00
Zbigniew Jędrzejewski-Szmek
a3dfa110ec split-files: fix check for empty package
[skip changelog]
2023-12-02 10:56:51 +01:00
Zbigniew Jędrzejewski-Szmek
f37ad39430 Upload sources
[skip changelog]
2023-12-02 10:28:45 +01:00
Zbigniew Jędrzejewski-Szmek
268ca6a059 Version 255~rc4 2023-12-02 09:56:40 +01:00
Zbigniew Jędrzejewski-Szmek
453bbcb423 split-files: also handle conditional packages
This is a bit annoying, but meh.

[skip changelog]
2023-12-02 09:50:58 +01:00
Zbigniew Jędrzejewski-Szmek
0e8fc18fbd split-files: fail early if we split-files produces an empty output
We would fail later anyway, because rpm refuses %files with an empty filelist
file. But this is much later, after %check, so let's fail already in %install.

[skip changelog]
2023-12-02 09:50:58 +01:00
Zbigniew Jędrzejewski-Szmek
0708112d48 split-files: use a dictionary instead of many little variables
Just refactoring, to make it easier to act on the list of outputs.

[skip changelog]
2023-12-02 09:50:58 +01:00
Zbigniew Jędrzejewski-Szmek
b8d3767687 split-files: move static filelist config into split-files.py
The idea was that it's nicer to keep that config in .spec where it's subject
to syntax highlighting. split-files.py was supposed to a stand-alone program.
But in practice this split is confusing, because file rules are listed in two
places and we need to modify split-files.py quite often. This will be easier if
everything is in one file.

[skip changelog]
2023-12-02 09:50:58 +01:00
Adam Williamson
f41ff634cb Backport PRs #30170 and #30266 to fix BPF denials (RHBZ #2250930) 2023-12-01 09:10:38 -08:00
Adam Williamson
8ff2a6f2d9 Backport #30197 to fix vconsole startup (RHBZ #2251394) 2023-11-29 10:42:54 -08:00
Peter Robinson
f216cc8c79 de-dupe LICENSE.LGPL2.1 in licenses
The LICENSE.LGPL2.1 file is installed into the same systemd license
directory for both the base systemd and -libs. Because the base
systemd requires the -libs sub package it's a duplicate and will
always be there, it shouldn't cause an issue but it seems in some
cases the duplication into the same directory causes issues with
ostree so remove it from the base systemd package as it will always
be there due to the hard dep on the -libs subpackage.
2023-11-23 20:19:16 +00:00
Zbigniew Jędrzejewski-Szmek
f071684b2e Version 255~rc3 2023-11-23 00:53:04 +01:00
Zbigniew Jędrzejewski-Szmek
f93a1346f0 Add systemd-networkd-defaults subpackage 2023-11-23 00:53:04 +01:00
Zbigniew Jędrzejewski-Szmek
92eed01493 Version 255~rc2
- See See https://raw.githubusercontent.com/systemd/systemd/v255-rc2/NEWS
2023-11-15 18:26:36 +01:00
Zbigniew Jędrzejewski-Szmek
82517d01b5 rpminspect: disable udev rules check
https://github.com/rpminspect/rpminspect/issues/1294#issuecomment-1808737198

[skip changelog]
2023-11-14 22:57:07 +01:00
Zbigniew Jędrzejewski-Szmek
fdfc8c33c8 Fix dracut version
[skip changelog]
2023-11-08 17:02:18 +01:00
Zbigniew Jędrzejewski-Szmek
10915ad981 Add Conflicts with older dracut which doesn't have required patches 2023-11-08 16:20:57 +01:00
Zbigniew Jędrzejewski-Szmek
1c98102f5d Also build systemd-vmspawn 2023-11-07 22:22:58 +01:00
Zbigniew Jędrzejewski-Szmek
5cae6af05f Move oomd to systemd-udev
It is really only useful on "full" machines, either VMs or bare metal,
so it should be in systemd-udev.
2023-11-07 22:22:58 +01:00
Zbigniew Jędrzejewski-Szmek
e8cc280d45 Version 255~rc1
- See https://raw.githubusercontent.com/systemd/systemd/v255-rc1/NEWS
- All the files and services related to pcrs are moved to -udev subpackage.
  This includes the new systemd-pcrlock binary.
2023-11-07 17:24:24 +01:00
Zbigniew Jędrzejewski-Szmek
a9b4725785 Pull in more patches for keyboard layout matching 2023-09-27 18:02:52 +02:00
Zbigniew Jędrzejewski-Szmek
99506ee643 Version 254.5
- Resolves rhbz#29216.
2023-09-27 17:23:35 +02:00
Zbigniew Jędrzejewski-Szmek
bb2f5f0fab Pull in patches to add PollLimit setting 2023-09-27 17:23:35 +02:00
Zbigniew Jędrzejewski-Szmek
9a522c2a5a Change versioned Conflicts to rich Requires
... (rhbz#2240828)

We currently have grubby-8.40-72.fc39 and sdubby-1.0-3.fc39.
systemd had 'Conflicts: grubby < 8.40-72', which is satisfied by grubby.
But sdubby has 'Provides: grubby' (with no version), which prevented
installation:

$ sudo rpm -i ./sdubby-1.0-3.fc39.noarch.rpm
error: Failed dependencies:
	grubby < 8.40-72 conflicts with (installed) systemd-udev-254.2-7.fc39.x86_64

The rpm docs don't actually say what the meaning of the 'if' is:
is it only satisfied by actual package names, or also by Provides. But
experiments suggest that Provides are not used. The rich dependency seems
to avoid the issue.
2023-09-27 17:22:47 +02:00
Adam Williamson
18e1ed3201 Backport PR #29215 to improve keyboard layout matching
This lays the ground for simplifying anaconda's keyboard layout
handling while improving results from where they are currently.
2023-09-19 14:57:30 -07:00
Zbigniew Jędrzejewski-Szmek
592d710bfd zuul: adjust config
Though apparently this will not work without further work in other
places, see https://pagure.io/fedora-project-config/issue/292.

[skip changelog]
2023-09-19 09:27:54 +02:00
Zbigniew Jędrzejewski-Szmek
bd2499ee33 rpminspect: add duplicate dependency to appease rpmispect
[skip changelog]
2023-09-19 09:27:54 +02:00
Zbigniew Jędrzejewski-Szmek
5dfe4c64c5 rpminspect: suppress complain about inet_aton in /usr/bin/networkctl
[skip changelog]
2023-09-19 09:27:54 +02:00
Zbigniew Jędrzejewski-Szmek
3f41433302 rpminspect: rename config file for rpminspect
According to https://fedoraproject.org/wiki/How_to_filter_libabigail_reports
and https://github.com/rpminspect/rpminspect/issues/739#issuecomment-1125258249,
the name must be just the extension.

[skip changelog]
2023-09-19 09:27:44 +02:00
Zbigniew Jędrzejewski-Szmek
360975c08b Fix creation of installkernel symlink 2023-09-18 21:52:54 +02:00
Zbigniew Jędrzejewski-Szmek
f66faf9fa1 Provide /usr/sbin/installkernel
... (rhbz#2239008).
2023-09-15 12:02:40 +02:00
Zbigniew Jędrzejewski-Szmek
32656b2b87 Move file manipulation to %build
Without this, in-place builds are broken: they don't execute %prep, so
%install fails.

[skip changelog]
2023-09-11 17:16:16 +02:00
Zbigniew Jędrzejewski-Szmek
6674346bfd Revert "Disable systemd-boot-update.service in presets"
This reverts commit 8eea43e714.

Fedora already ships 'disable systemd-boot-update.service' in
/usr/lib/systemd/system-preset/90-default.preset, so we don't need
this.

[skip changelog]
2023-09-11 17:15:44 +02:00
Zbigniew Jędrzejewski-Szmek
8365e8181d README.build-in-place: fix example command
[skip changelog]
2023-09-11 16:58:03 +02:00
Zbigniew Jędrzejewski-Szmek
14701a7bc8 Make inter-subpackage dependencies archful
Prompted by the discussion in
https://github.com/rpminspect/rpminspect/issues/1231.
2023-09-07 12:17:02 +02:00
Zbigniew Jędrzejewski-Szmek
c95e750cfb Version 254.2
- A bunch of fixes in various areas: manager, coredump, sysupdate,
  hibernation, journal.
- Should fix rhbz#2234653.
2023-09-07 09:49:11 +02:00
Zbigniew Jędrzejewski-Szmek
11c465372a Actually reload user managers and backport unit reload macros
The macro expansions would only work when compiled with a recent version of
systemd. We don't want to create a dependency loop like this, let's just expand
the string manually.

Also backport the patch adding %systemd_postun_with_reload and
%systemd_user_postun_with_reload so a FPC documentation change can be filed.
2023-09-06 13:52:04 +02:00
Daan De Meyer
c4232bef96 ukify: Drop obsolete dependency on objcopy 2023-09-02 18:12:59 +02:00
Daan De Meyer
46dc8f5060 Add missing ukify dependency on python-cryptography 2023-09-02 18:11:39 +02:00
Yu Watanabe
45fc64ccd0 spec: also explicitly enable/disable ukify support
For upstream packit builds with https://github.com/systemd/systemd/pull/24175.
2023-08-20 10:20:41 +09:00
Yu Watanabe
49575fa6ed spec: explicitly enable/disable xen support
For upstream packit builds with https://github.com/systemd/systemd/pull/24175.
2023-08-13 19:52:21 +09:00
Zbigniew Jędrzejewski-Szmek
f5162af2a6 rpminspect: adjust disablement for badfuncs
We had something, but apparently it stopped working.
Let's try with a new format:
https://github.com/rpminspect/rpminspect/issues/1229#issuecomment-1673327657

[skip changelog]
2023-08-10 16:57:19 +02:00
Zbigniew Jędrzejewski-Szmek
3c4a463e49 Upload sources
[skip changelog]
2023-08-09 17:35:10 +02:00
Zbigniew Jędrzejewski-Szmek
453f57749f Version 254.1
... (rhbz#2228089, possibly partial fix for rhbz#2229524)
2023-08-09 16:13:46 +02:00
Zbigniew Jędrzejewski-Szmek
c4c8de9e3e Do daemon-reexec of user managers after package upgrade 2023-08-09 16:06:22 +02:00
Daan De Meyer
993f682ecc Revert "Supress errors on selinux systems"
The selinux policy was modified in
https://github.com/fedora-selinux/selinux-policy/pull/944
to allow the reload to happen, so let's revert the silencing of
the logging.

This reverts commit 1d712f8acf.
2023-08-07 12:51:12 +00:00
Daan De Meyer
2b6870dbdc Add a custom %clean implementation
Let's make sure we clean up after ourselves. We have to remove
the generated timeout user config file, the file list files and the
generated .lang file.
2023-08-03 23:13:40 +02:00
Daan De Meyer
6775af66c5 Update libbpf soname
The libbpf package now ships the libbpf.so.1 soname, so update our
spec to match that.
2023-08-03 23:13:03 +02:00
Zbigniew Jędrzejewski-Szmek
d9fe7ec043 Version 254
... (just a bunch of bugfixes, mostly for unusual architectures, since rc3)
- rhbz#2226908
- See https://raw.githubusercontent.com/systemd/systemd/v254-rc1/NEWS
  for the full changeset.
2023-07-28 13:25:06 +02:00
Zbigniew Jędrzejewski-Szmek
1edbd67466 Version 254~rc3
- A bunch of fixes, e.g. rhbz#2223795. Also a bunch of reverts of
  commits which were found to cause problems.
2023-07-24 15:14:33 +02:00
Fedora Release Engineering
8e1134ffe7 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 03:05:22 +00:00
Zbigniew Jędrzejewski-Szmek
219083fc04 Fix scriptlets for various services and remote-cryptsetup.target
... (rhbz#2217997)

systemd-homed.service and systemd-portabled.service are in
systemd-udev but the scriptlet was attached to main subpackage, so it
wouldn't work because the unit file wasn't installed yet when it was
invoked. systemd-pstore.service and remote-cryptsetup.target were
forgotten, so they wouldn't get enabled on installation.
2023-07-17 14:46:28 +02:00
Stewart Smith
5c840a72b5 Convert existing bcond_with[out] to plain bcond 2023-07-16 16:12:46 -07:00
Stewart Smith
379f9bfba1 Move gnutls, zlib, bzip2, lz4, xz, and zstd to bconds 2023-07-16 16:10:41 -07:00
Zbigniew Jędrzejewski-Szmek
c50dc7ccda Version 254~rc2
- Various bug fixes, in particular kernel-install should again
  work without /proc.
2023-07-15 15:40:24 +02:00
Zbigniew Jędrzejewski-Szmek
d80a45533d Version 254~rc1
- Way too many changes to list. See
  https://raw.githubusercontent.com/systemd/systemd/v254-rc1/NEWS
- Fix regression in socket activation of services (rhbz#2213660).
2023-07-13 12:09:53 +02:00
Yaakov Selkowitz
9c05b44a4b Use rpm sysuser provide generation on RHEL >= 10
ELN, and as a result the future RHEL 10, also just got the new rpm
version with these files.
2023-06-26 10:39:41 -04:00
Panu Matilainen
dce828f167 Use rpm's sysuser provide generation on Fedora >= 39
Rpm >= 4.19 has native sysusers integration and generates similar
user() and group() provides but encodes additional information into
them, information that is required for the rpm integration to work.

Besides additional data, one noteworthy difference in the rpm generated
provides is there are no provides generated for m(ember) directives.
This is because users and groups possibly created by that directive are
a too implicit for dependency resolution and install ordering purposes
in the case where the user/group is actually owned by some other package.
2023-06-22 08:16:26 -06:00
Anita Zhang
d64ddbaa83 fix typos in standalone package provides 2023-06-21 15:59:17 +01:00
Yaakov Selkowitz
5982ae9504 Avoid pillow and pyflakes in RHEL builds
These test dependencies are unwanted in RHEL.
2023-06-05 12:49:57 -04:00
Yaakov Selkowitz
4980b39c44 Avoid qrencode dependency in RHEL builds
Based on c9s:

c7784e6584
2023-06-05 12:46:26 -04:00
Alessandro Astone
aedd5488be Increase vm.max_map_count
https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
2023-06-02 18:51:48 +02:00
Zbigniew Jędrzejewski-Szmek
21df2af848 Version 253.5 2023-06-01 16:46:08 +02:00
Zbigniew Jędrzejewski-Szmek
3d02d53d87 Version 253.4 2023-05-11 22:54:39 +02:00
Michael Catanzaro
806c95e1c7 Raise ManagedOOMMemoryPressureLimit from 50% to 80%
Admittedly I don't know what I'm doing here, but this should make
systemd-oomd kill things less often, which seems like the direction we
want to move towards, so let's try it.

https://pagure.io/fedora-workstation/issue/358
2023-05-11 18:46:17 +00:00
Zbigniew Jędrzejewski-Szmek
5448e2ee0e Add forgotten Provides and Conflicts for standalones 2023-05-09 14:59:07 +02:00
Zbigniew Jędrzejewski-Szmek
7e62bd0762 sysusers.generate-pre.sh: properly escape quotes in description strings
... (rhbz#2104141)

In the first version, I wanted to use POSIX quotes with $''. But that required
'printf %q', which brings in a dependency on coreutils.

Following mcr0mmand's suggestion, ${foo@Q} is used instead, which should work
equivalently, and does not require anything new.

Tested with 'sysusers.generate-pre.sh /usr/lib/sysusers.d/*conf'. The output is
the same before and after, apart from the dovecot user with a quote.
2023-04-26 13:27:07 +02:00
Zbigniew Jędrzejewski-Szmek
ef79df9490 sysusers.generate-pre.sh: fix indentation in generated scripts
We need to use a mix of spaces and tabs: the tabs are removed because of -EOF,
and then the spaces indent the output. Jesus.
2023-04-26 13:23:03 +02:00
Zbigniew Jędrzejewski-Szmek
1fa99260fc pytest-flakes is required for test_ukify.py
[skip changelog]
2023-04-22 12:37:06 +02:00
Zbigniew Jędrzejewski-Szmek
7f6f230506 Version 253.2 2023-03-29 22:23:51 +02:00
Zbigniew Jędrzejewski-Szmek
1320fc3009 oomd: stop monitoring user-*.slice slices
... (rhbz#2177722)

Oomd was killing a login session (user-*.slice/session-*.scope).

Quoting https://bugzilla.redhat.com/show_bug.cgi?id=2177722#c21:

> In F37 and prior the config was killing based on swap and pressure
> on user-*.slice/user@.service. In 7665e1796f
> it was changed to pressure only on system.slice and all slices under
> user.slice. The relevant point here is that this change now includes
> user-*.slice/session-*.scope which is the critical session bits
> you're seeing killed here.
>
> That session scope should be omitted. The config that I intended
> with the initial PR was for all slices under
> user.slice/user-*.slice/user@.service to be monitored, not for all
> slices under user.slice.

With the file removed:

$ oomctl | rg Path | sort
  Path: /system.slice
  Path: /user.slice/user-1000.slice/user@1000.service/app.slice
  Path: /user.slice/user-1000.slice/user@1000.service/session.slice
2023-03-29 18:17:29 +02:00
Zbigniew Jędrzejewski-Szmek
1a6178ce6e Move /usr/lib/systemd/boot/ to systemd-boot-unsigned subpackage 2023-03-09 09:05:16 +01:00
Zbigniew Jędrzejewski-Szmek
01af054efc Prepare to replace use of gnu-efi with the internal support
See https://github.com/systemd/systemd/pull/26641.
This will allow upstream pull request (and the main branch after the pull
request has been merged) to be built with the new code. This doesn't do
anything for official rpm builds until the new code is part of the sources.

[skip changelog]
2023-03-05 14:12:08 +01:00
Zbigniew Jędrzejewski-Szmek
9a0266ff7b Include two more patches that didn't make it into the stable tag
[skip changelog]
2023-03-03 20:14:38 +01:00
Zbigniew Jędrzejewski-Szmek
5227302c98 Really fix build with gnu-efi-3.0.11-13
It turns out that the patch applied cleanly when backported to
v253-stable, but did not work.

[skip changelog]
2023-03-03 20:11:48 +01:00
Zbigniew Jędrzejewski-Szmek
ddd4dcd1fe Fix build with gnu-efi-3.0.11-13 2023-03-03 18:56:53 +01:00
Zbigniew Jędrzejewski-Szmek
68db5d4680 Version 253.1
- Fixes rhbz#2148464
2023-03-03 18:28:25 +01:00
Zbigniew Jędrzejewski-Szmek
7a81930dd2 Move man pages for sd-boot into systemd-boot-unsigned 2023-03-01 14:09:03 +01:00
Zbigniew Jędrzejewski-Szmek
55ee787b77 Set TimeoutStopFailureMode=abort for services
... (see https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer)
2023-02-22 16:03:38 +01:00
Dusty Mabe
6770ee3c6d remove group write permission from 98-default-mac-none.link
The 99-default.link has 644 perms so let's do the same for
98-default-mac-none.link. This was tripping up a test in the
Fedora CoreOS test framework [1].

https://github.com/coreos/fedora-coreos-tracker/issues/1427
2023-02-21 14:51:35 +00:00
Dusty Mabe
cfc2c60978 fix comment instructions for 98-default-mac-none.link
Fixup for aff1671.
2023-02-21 14:51:35 +00:00
Zbigniew Jędrzejewski-Szmek
0104b2cfb3 Backport patch for container compatibility
... (rhbz#2165004)
2023-02-21 11:14:00 +01:00
Zbigniew Jędrzejewski-Szmek
4bdd16eba5 Add workaround patch for dracut generator issue
... (rhbz#2164404)
2023-02-21 11:06:27 +01:00
Zbigniew Jędrzejewski-Szmek
296e35b054 Version 253
... (mostly some documentation fixes since -rc3).
2023-02-20 21:07:32 +01:00
Zbigniew Jędrzejewski-Szmek
4f23aac033 Version 253-rc3
- A bunch of bugfixes for regressions, some documentation and bug fixes too.
- Really fix rhbz#2165692 (previous build carried an unapplied patch).
2023-02-10 18:57:22 +01:00
Zbigniew Jędrzejewski-Szmek
b642986a84 Revert patch switch causes problems for 'systemctl isolate'
... (rhbz#2165692)
2023-02-09 22:55:13 +01:00
Zbigniew Jędrzejewski-Szmek
8eea43e714 Disable systemd-boot-update.service in presets 2023-02-08 16:39:45 +01:00
Zbigniew Jędrzejewski-Szmek
0dfb1a37e1 Use proper capitalization in license string
[skip changelog]
2023-02-08 12:38:11 +01:00
Zbigniew Jędrzejewski-Szmek
eb6fe37e3c Update License to SPDX 2023-02-08 12:31:21 +01:00
Thomas Haller
aff167152e add "98-default-mac-none.link" to keep default MAC address of bridge/bond/team
https://bugzilla.redhat.com/show_bug.cgi?id=2107754
https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/FZGH473ZUGPXK2E3GOEQ5TBLJ62FYJBC/
2023-02-06 15:30:29 +01:00
Michael Catanzaro
ba02e90496 Shorten shutdown timeout to 45 s 2023-02-02 20:46:37 +01:00
Zbigniew Jędrzejewski-Szmek
708a09cead Version 253~rc2
- Sysusers fixup (rhbz#2156900) + other small changes
2023-02-02 20:40:31 +01:00
Zbigniew Jędrzejewski-Szmek
ba48b51817 BuildRequire pytest
This is needed to run ukify tests. They were skipped because pytest
was not available.

[skip changelog]
2023-02-02 20:34:01 +01:00
Yaakov Selkowitz
3c935dd203 Build with xen only on Fedora 2023-02-01 20:14:52 -05:00
Zbigniew Jędrzejewski-Szmek
189f5d16f4 Add a new provides with just the version
[skip changelog]
2023-01-27 16:08:56 +01:00
Zbigniew Jędrzejewski-Szmek
efa3d301b9 Reenable systemd-journald-audit.socket after upgrades
... (rhbz#2164594)

The socket exists and is enabled in the initrd. After switch-root, the system
goes into an infinite loop trying to stop the socket while incoming audit
messages trigger start jobs for the socket. This is a bug in the transaction
logic, that'll need to be fixed separately.

We need to preset the socket after the upgrade so that it remains enabled
by default. This should fix the boot issue, though it's not a complete fix,
because we actually want to allow people to disable the socket.

On initial install, the socket is covered by preset-all and gets enabled.
2023-01-26 11:28:32 +01:00
Zbigniew Jędrzejewski-Szmek
58eb55671d Add Requires on Python modules to systemd-ukify and Recommends for libp11-kit 2023-01-25 15:10:41 +01:00
Zbigniew Jędrzejewski-Szmek
903ce887fd Version 253~rc1
- See https://raw.githubusercontent.com/systemd/systemd/v253-rc1/NEWS
- New subpackages: systemd-repart-standalone, systemd-shutdown-standalone,
  and systemd-ukify.
2023-01-25 00:16:28 +01:00
Zbigniew Jędrzejewski-Szmek
a142c87042 Backport patches to fix issues gcc-13 and -D_FORTIFY_SOURCE=3
gcc has a new warning which caught a bug of int/enum mismatches.
And we would crash on some architectures when built with -D_FORTIFY_SOURCE=3
because of our malloc_usable_size() use.

This should resolve the build failure in F38 mass build.
2023-01-22 22:41:22 +01:00
Fedora Release Engineering
17d16267e2 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 04:33:41 +00:00
Daan De Meyer
67561d75bf Add python3 to BuildRequires
Let's make it explicit that python3 is required during the build
process.
2023-01-05 13:52:34 +01:00
Zbigniew Jędrzejewski-Szmek
befb0e11dd Version 252.4
- Fixes a few different issues (systemd-timesyncd connectivity problems, broken
  emoji output on the console, crashes in pid1 unit dependency logic)
- CVE-2022-4415: systemd: coredump not respecting fs.suid_dumpable kernel
  setting
2022-12-20 19:27:52 +01:00
Zbigniew Jędrzejewski-Szmek
732bdcb223 boot: add Provides:systemd-boot(isa)
As requested in https://github.com/rhinstaller/anaconda/pull/4368#discussion_r1043839809,
so that it's easier to depend on the appropriate package. Once we have the
signed version built, this provides might be dropped. But let's add it at least
for now so that there's a stable name to depend on.

While at it, let's drop ? from %{_isa}. Systemd is always archful.
2022-12-17 18:34:31 +01:00
Zbigniew Jędrzejewski-Szmek
1d366e53d8 Stop trying to use removed source file
[skip changelog]
2022-12-15 12:48:00 +01:00
Zbigniew Jędrzejewski-Szmek
2a3fc2e21f Use upstream pam systemd-auth file with a patch, add pam_keyinit
This file changes rarely, but it does every one in a while. And since we have an
independent copy, we forget to adjust it. We have had already two bugs because
of this. I submitted a PR upstream to include pam_namespace (because that makes
sense for all distros), so the diff between upstream and us now is just the
inclusion of system-auth (which is not upstreamable).

Effectively, the only difference right now is that 'pam_keyinit force revoke'
is included. It was added upstream with the comment:

   We want that systemd --user gets its own keyring as usual, even if the
   barebones PAM snippet we ship upstream is used. If we don't do this we get
   the basic keyring systemd --system sets up for us.
2022-12-14 22:35:52 +01:00
Zbigniew Jędrzejewski-Szmek
ef4c00c6a4 Version 252.3
... (rhbz#2136916, rhbz#2083900)
2022-12-08 23:10:51 +01:00
Zbigniew Jędrzejewski-Szmek
778f8ef8a5 Do not create boot subpackage on non-efi arches
This fixes build.
[skip changelog]
2022-12-03 09:47:34 +01:00
Zbigniew Jędrzejewski-Szmek
54a3b6f942 Split out systemd-boot-unsigned package 2022-12-02 19:08:56 +01:00
Zbigniew Jędrzejewski-Szmek
da37ad3139 Version 252.2
- Latest batch of bugfixes (rhbz#2137631)
2022-11-24 17:48:41 +01:00
Martin Osvald
83301531c0 Support user:group notation by sysusers.generate-pre.sh script
#Type Name       ID                  GECOS              Home directory Shell
u     user_name  uid:gid             "User Description" /home/dir      /path/to/shell

According to: https://www.freedesktop.org/software/systemd/man/sysusers.d.html
2022-11-24 13:35:27 +01:00
Zbigniew Jędrzejewski-Szmek
b3fa8789f9 BR: xen-devel
This improves support for XEN.

[skip changelog]
2022-11-21 11:46:31 +01:00
Zbigniew Jędrzejewski-Szmek
c6d202c6ac Version 252.1
... (just some small fixes).
2022-11-08 20:27:13 +01:00
Zbigniew Jędrzejewski-Szmek
eeb9a47dfb Version 252
No big changes from -rc3. A bunch of bugfixes.
2022-10-31 22:27:33 +01:00
Zbigniew Jędrzejewski-Szmek
9acedf97ae Version 252-rc3 (#2135778) 2022-10-25 09:00:02 +02:00
Zbigniew Jędrzejewski-Szmek
6594cdc49b Version 252-rc2 (#2134741, #2133792) 2022-10-18 14:48:29 +02:00
Zbigniew Jędrzejewski-Szmek
bab6dfc23a Fix upgrade detection in %posttrans scriptlet (rhbz#2115094)
4047e4fb7b got things very wrong.
The trick with "[ $1 -eq 1 ]" doesn't work for transaction triggers
because the argument is not provided by rpm. We need to use a state
file to propagate the information from %post to %posttrans.
2022-10-14 16:18:53 +02:00
Zbigniew Jędrzejewski-Szmek
3c5b26ff79 Fix indentation in %sysusers_create_compat macro (rhbz#2132835)
Automatic unindentation after <<-EOF only works with tabs. Jesus.
2022-10-09 15:20:41 +02:00
Zbigniew Jędrzejewski-Szmek
b2ad8fb38b Correctly move systemd-measure to systemd-udev subpackage
I had a local modification that didn't make it into commit.
2022-10-09 15:20:41 +02:00
Zbigniew Jędrzejewski-Szmek
0b51ecfabd Version 252-rc1
... (for details see https://raw.githubusercontent.com/systemd/systemd/v252-rc1/NEWS)

systemd-pcrphase and systemd-measure and initrd-* units are moved to systemd-udev.
systemd-udev should be part of the initrd, and those tools don't make much sense
in systems without hardware (i.e. containers). (systemd-measure could possibly be
useful, but we can always move it back if there's a good reason.)
2022-10-07 18:39:55 +02:00
Zbigniew Jędrzejewski-Szmek
58777c7cac Fix permissions on %ghost files (rhbz#2122889) 2022-10-01 19:35:11 +02:00
Zbigniew Jędrzejewski-Szmek
1ffb1df909 Version 251.5 (rhbz#2129343, rhbz#2121106, rhbz#2130188) 2022-10-01 19:27:15 +02:00
Yu Watanabe
38161d034a Replace patch for test-mountpoint-util
Imported from https://github.com/systemd/systemd/pull/24639.
2022-09-30 19:01:28 +02:00
Yu Watanabe
0455d50768 patch: fix regression in bfq patch
This fixes a bug introduced by d906ff0238.

Fixes RHBZ#2130188.
2022-09-30 19:01:28 +02:00
Luca BRUNO
f27d461663 sysusers/generate: bridge 'm' entries to usermod
This tweaks the sysusers.d handling logic so that 'm' entries are
now translated to a series of groupadd + useradd + usermod call.
The last usermod call is the notable change, effectively affecting
the list of secondary groups now.
2022-09-30 15:31:34 +00:00
Anita Zhang
7665e1796f Update systemd-oomd defaults to friendlier values
- Remove swap policy. Default amount of swap (8GB?) is a lot lower than
  what we use internally with the swap policy. Which frequently leads to
  GNOME getting killed
  (e.g. https://bugzilla.redhat.com/show_bug.cgi?id=1941170, and other
  BZs not linked here). Internally we use 0.5x-1x size of physical memory
  for swap via swapfiles (this will be documented in systemd upstream).
  In simple cases of using more memory than is available (but without
  memory pressure), the Kernel OOM killer can handle killing the
  offending process.

- Expand the memory pressure policy to system.slice, user-.slice, and
  all user owned slices. Support for ManagedOOM*= on user services was
  added in https://github.com/systemd/systemd/pull/20690 which allows
  us to be more fine grained on the pressure monitoring at the user
  level. In addition to the system.slice and user-.slice PSI monitoring
  this should result in a better systemd-oomd experience for desktop
  systems.
2022-09-30 14:49:03 +00:00
Zbigniew Jędrzejewski-Szmek
aac22baa3b Make systemd-devel conditionally pull in systemd-rpm-macros
If people BR:systemd-devel, they should get the macros too. It's a
tiny package, and we shouldn't require people to BR two things.

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/A5BGKRZVFDOBNMCBUPUCKLKHWEW5V2JE/
2022-09-29 10:22:45 +02:00
Neal Gompa
95413629b4 Manually bump release and add changelog for previous commit
C.f. https://pagure.io/fedora-infra/rpmautospec/pull-request/267

[skip changelog]
2022-08-19 15:49:11 -04:00
Neal Gompa
f5157f6a05 Set compile-time fallback hostname to "localhost"
This ensures that we have a universal unbranded fallback hostname.
The branded fallback hostname will be set in os-release(5) instead.

Reference: https://fedoraproject.org/wiki/Changes/FallbackHostname
2022-08-19 19:41:09 +00:00
Kalev Lember
76ce06c4a6 Manually bump release and add changelog for previous commit
C.f. https://pagure.io/fedora-infra/rpmautospec/pull-request/267

[skip changelog]
2022-08-19 14:44:43 +02:00
Kalev Lember
1e997acc65 Avoid requiring systemd-pam from -devel subpackage
Instead, add systemd-pam to pungi-fedora's multilib whitelist:
https://pagure.io/pungi-fedora/pull-request/1113

This should help with flatpak runtime packaging so that we can avoid
having to ship systemd-pam in the flatpak container.
2022-08-18 18:45:42 +02:00
Zbigniew Jędrzejewski-Szmek
cbb106a7a6 Fix formatting and number in changelog
https://pagure.io/releng/issue/10952: rpmdev-bumpspec apparently does
not like the way the Release field was conditionalized.
But since the switch to rpmautospec this isn't important, since the
v-r string will be generated by rpmautospec. I went over the changelog
and manually inserted tags for the old builds.

Unfortunately there's another issue, rpmautospec cannot deal with
%include: https://pagure.io/fedora-infra/rpmautospec/pull-request/267
Numbers for the latest builds are adjusted to match what koji lists.
2022-08-10 14:44:03 +02:00
Zbigniew Jędrzejewski-Szmek
aeb2225403 Manually bump release version for rpmautospec
C.f. https://pagure.io/releng/issue/10952.

[skip changelog]
2022-08-09 16:31:12 +02:00
Luca BRUNO
d00b46ea87 Align sysusers-generated shell value with upstream systemd default 2022-08-09 13:02:59 +02:00
Zbigniew Jędrzejewski-Szmek
89715a5ded Backport patches and do a full preset on first boot
... (#2114065,
https://fedoraproject.org/wiki/Changes/Preset_All_Systemd_Units_on_First_Boot)
2022-08-09 13:02:59 +02:00
Zbigniew Jędrzejewski-Szmek
fa3038d631 Version 251.4
... (fixes rhbz#2112551)
- A bunch of fixes to documentation, crashes in systemd-resolved,
  systemd-networkd, systemd itself, and other smaller fixes.
2022-08-08 13:10:27 +02:00
Zbigniew Jędrzejewski-Szmek
99fbfcd5a2 Convert to rpmautospec 2022-08-08 13:10:06 +02:00
Fedora Release Engineering
31a512dde1 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 09:59:57 +00:00
Zbigniew Jędrzejewski-Szmek
8ed6e37eb4 Version 251.3 2022-07-14 09:48:35 +02:00
Zbigniew Jędrzejewski-Szmek
9e8220ffd3 Drop forgotten "temporary" workaround for #1663040 2022-07-13 15:06:22 +02:00
Daan De Meyer
901acf5a2a Move networkd sysusers snippet to networkd rpm
Now that the tmpfiles snippet is a separate file shipped as part
of the networkd package, we can ship the sysusers snippet as a part
of the networkd package as well.
2022-07-07 12:07:01 +02:00
Daan De Meyer
77e121360a Move networkd man pages to networkd package 2022-07-06 20:50:31 +02:00
Zbigniew Jędrzejewski-Szmek
27c0d43eff Drop Obsoletes for systemd-standalone-{tmpfiles,sysusers}
It turns out that with the Obsoletes, dnf will just install the normal
systemd package if systemd-standalone-* is requested. The commit message
for b36512ad8f which added this says I tested
with local package builds (where it works), but not when going through the
full repo with all packages.

I'm adding the Provides instead, so that it's possible to request on or
the other more easily.
2022-07-03 21:31:40 +02:00
Zbigniew Jędrzejewski-Szmek
ee5cf7fbad Drop forward-secure-sealing code from sd-journal and tools
I asked on fedora-devel@, and the lone reply was from Matthew Miller
who tried it once when it was introduced and hasn't used it since.
Dropping this removes the last dependency on libgcrypt and libgpg-error
in libsystemd, significantly reducing our installation footprint.

Right now libmicrohttpd is still linked to libgcrypt, so
libsystemd-journal-remote subpackage will pull libgcrypt in.
2022-06-29 17:17:14 +02:00
Zbigniew Jędrzejewski-Szmek
fae302cf1d Revert "Add workaround for audit breakage"
This reverts commit a4d136e22a.

audit-3.0.8 is out, so this should be fixed now.
2022-06-29 08:37:59 +02:00
Zbigniew Jędrzejewski-Szmek
6af49ef1a1 Add patch to fix build on i686 2022-06-03 10:15:05 +02:00
Zbigniew Jędrzejewski-Szmek
81108b2d49 Version 251.2 2022-06-02 20:30:56 +02:00
David Auer
ccbadf1a74 Fix formatting of README.build-in-place 2022-05-30 16:53:38 +02:00
Zbigniew Jędrzejewski-Szmek
b45625adb1 Revert "Drop old work-around patch"
This reverts commit 9a48377e0a.

Apparently the patch is still needed, without it we get issues in CI
packit builds.
2022-05-25 21:48:16 +02:00
Zbigniew Jędrzejewski-Szmek
6ac7409b1e Bump release 2022-05-25 15:38:21 +02:00
Zbigniew Jędrzejewski-Szmek
9a48377e0a Drop old work-around patch
This was reported to be an issue on older kernels, so let's hope
it is resolved now.
2022-05-25 14:48:33 +02:00
Zbigniew Jędrzejewski-Szmek
7776269804 Reintroduce the tag for shared libraries 2022-05-25 14:45:31 +02:00
Zbigniew Jędrzejewski-Szmek
ee6588e902 Drop "v" from the version tag, add tilde back
When -Dversion-tag was initially added in edaa157918,
I used "v" without any comment. But upstream does not use "v", so we have
versions which don't compare directly:

$ build/systemctl --version|head -n1
systemd 251 (251-66-g7e46a5c+)
$ systemctl --version|head -n1
systemd 251 (v251-1.fc37)

And in 3c4f9413a7, when -Dshared-lib-tag= was
introduced, %{version} was replaced by %{version_no_tilde}, again without any
specific comment. For the shared-lib-tag, it makes sense to use _no_tilde,
because it's enough to have non-conflicting file names, and we don't compare
the tags. I guess I wanted both uses to be consistent. But if we substitute
the tilde, we can't do proper comparisons.

I noticed the following issue: with sd-boot installed from git and a
package, upgrades wouldn't work:

Comparing versions: "systemd-boot v251-1.fc37" < "systemd-boot 251-rc1-390-g3603f15
Skipping "/boot/efi/EFI/systemd/systemd-bootx64.efi", since newer boot loader version in place already.

The two changes should make those comparisons work properly in most
cases.
2022-05-25 14:32:47 +02:00
Zbigniew Jędrzejewski-Szmek
a65bd010dd Supress errors from useradd/groupadd 2022-05-25 14:18:25 +02:00
Zbigniew Jędrzejewski-Szmek
b68903c0ee Upload sources
(no changelog)
2022-05-24 23:51:05 +02:00
Zbigniew Jędrzejewski-Szmek
25bb51fde1 Version 251.1 2022-05-24 23:38:53 +02:00
Zbigniew Jędrzejewski-Szmek
3b52a12c30 Version 251 2022-05-21 18:27:30 +02:00
Zbigniew Jędrzejewski-Szmek
98759ccb29 Skip workaround patch in packit builds 2022-05-19 12:39:10 +02:00
Zbigniew Jędrzejewski-Szmek
3a876074d2 Run sysusers and friends also if systemd is not running
I tested this with 'sudo dnf --installroot=…', with both
systemd+system-udev installed in one transaction, and in two separate
transactions. Users are created as expected in both cases.
2022-05-16 22:11:21 +02:00
Zbigniew Jędrzejewski-Szmek
4cd7098f04 Version 251-rc3 2022-05-16 19:05:09 +02:00
Adam Williamson
7d3e9ecfd7 Backport #23352 to fix RHBZ #2083374 2022-05-11 14:17:03 -07:00
Zbigniew Jędrzejewski-Szmek
95c9cf61af Remove bfq patch in packit builds 2022-05-06 20:48:00 +02:00
Zbigniew Jędrzejewski-Szmek
04e285047a Version 251-rc2 2022-05-05 19:40:03 +02:00
David Tardon
acb90c49c4 sync our systemd-user PAM config. with upstream
This incorporates changes from the following commits:
bd685faa1a
71889176e4
2022-04-20 13:10:24 +02:00
Zbigniew Jędrzejewski-Szmek
d3aa9f1d33 Two patches to maybe help with the compose
This is really a stab in the dark.
2022-04-12 22:07:51 +02:00
Zbigniew Jędrzejewski-Szmek
4047e4fb7b Do not touch /etc/resolv.conf on upgrades 2022-04-12 10:28:28 +02:00
Frantisek Sumsal
b022402aba Do not require bpftool for i386 builds 2022-04-12 10:28:26 +02:00
Zbigniew Jędrzejewski-Szmek
16421fb073 Temporarily revert libsystemd-core and private shared suffix 2022-04-04 11:44:26 +02:00
Zbigniew Jędrzejewski-Szmek
3c4f9413a7 Version 251-rc1 2022-03-29 22:41:15 +02:00
Zbigniew Jędrzejewski-Szmek
98684a818d Fix the wrong file assignment done in previous version 2022-03-18 13:37:38 +01:00
Zbigniew Jędrzejewski-Szmek
5cd5963410 Update to version 250.4
250.3 does not build because of the rebased bfq patch.
2022-03-17 22:02:39 +01:00
Zbigniew Jędrzejewski-Szmek
0078f9a102 Really move libcryptsetup plugins to -udev 2022-03-17 21:37:30 +01:00
David Tardon
4a979feb16 Move systemd-cryptenroll to systemd-udev 2022-03-17 17:35:55 +00:00
Michael Catanzaro
28acb3f912 Disable default DNS over TLS (#1889901) 2022-03-14 09:48:35 -05:00
Zbigniew Jędrzejewski-Szmek
d906ff0238 Rebase the bfq patch 2022-03-04 17:33:36 +01:00
Zbigniew Jędrzejewski-Szmek
5e7fc47a08 Avoid trying to create the symlink if there's a dangling symlink already
'test -e' says 'no' for dangling symlinks.

Let's also ignore the error if this fails. We shouldn't fail the
transaction.
2022-02-24 20:27:09 +01:00
Zbigniew Jędrzejewski-Szmek
a4d136e22a Add workaround for audit breakage 2022-02-24 08:56:56 +01:00
Zbigniew Jędrzejewski-Szmek
c971c5b980 Drop some unnecessary requirements 2022-02-24 08:45:02 +01:00
Zbigniew Jędrzejewski-Szmek
8c4c6daba9 Specify owner of utmp/wtmp/btmp/lastlog as root in the rpm listing
The analysis in 1ba983e0be was wrong.
Both systemd-journal and utmp need to be created. For some reason rpm
reports only the first group which is not available. It was
complaining about systemd-journal, and when that was "fixed", it
started complaining about utmp. Let's apply the same logic here.
Non-root users of files owned by utmp group should only matter after a
reboot, and tmpfiles will adjust the ownership.

Running transaction
  Running scriptlet: filesystem-3.16-2.fc36.x86_64                        1/1
  Preparing        :                                                      1/1
  Installing       : libgcc-12.0.1-0.8.fc37.x86_64                       1/76
  Running scriptlet: libgcc-12.0.1-0.8.fc37.x86_64                       1/76
  Installing       : fedora-release-identity-basic-37-0.2.noarch         2/76
  Installing       : tzdata-2021e-4.fc36.noarch                          3/76
  Installing       : pcre2-syntax-10.39-1.fc36.1.noarch                  4/76
  Installing       : ncurses-base-6.2-9.20210508.fc36.noarch             5/76
  Installing       : fedora-gpg-keys-37-0.1.noarch                       6/76
  Installing       : fedora-release-37-0.2.noarch                        7/76
  Installing       : fedora-release-common-37-0.2.noarch                 8/76
  Installing       : fedora-repos-rawhide-37-0.1.noarch                  9/76
  Installing       : fedora-repos-37-0.1.noarch                         10/76
  Installing       : setup-2.13.9.1-3.fc36.noarch                       11/76
  Running scriptlet: setup-2.13.9.1-3.fc36.noarch                       11/76
  Installing       : filesystem-3.16-2.fc36.x86_64                      12/76
  Installing       : basesystem-11-13.fc36.noarch                       13/76
  Installing       : glibc-minimal-langpack-2.35-2.fc37.x86_64          14/76
  Installing       : glibc-common-2.35-2.fc37.x86_64                    15/76
  Running scriptlet: glibc-2.35-2.fc37.x86_64                           16/76
  Installing       : glibc-2.35-2.fc37.x86_64                           16/76
  Running scriptlet: glibc-2.35-2.fc37.x86_64                           16/76
  Installing       : ncurses-libs-6.2-9.20210508.fc36.x86_64            17/76
  Installing       : bash-5.1.16-2.fc36.x86_64                          18/76
  Running scriptlet: bash-5.1.16-2.fc36.x86_64                          18/76
  Installing       : libuuid-2.38-0.2.fc36.x86_64                       19/76
  Installing       : libcap-2.48-4.fc36.x86_64                          20/76
  Installing       : libattr-2.5.1-4.fc36.x86_64                        21/76
  Installing       : libacl-2.3.1-3.fc36.x86_64                         22/76
  Installing       : libzstd-1.5.2-1.fc36.x86_64                        23/76
  Installing       : xz-libs-5.2.5-8.fc36.x86_64                        24/76
  Installing       : zlib-1.2.11-31.fc36.x86_64                         25/76
  Installing       : bzip2-libs-1.0.8-11.fc36.x86_64                    26/76
  Installing       : libcap-ng-0.8.2-9.fc36.x86_64                      27/76
  Installing       : audit-libs-3.0.7-1.fc36.x86_64                     28/76
  Installing       : libsepol-3.3-3.fc36.x86_64                         29/76
  Installing       : libxcrypt-4.4.28-1.fc37.x86_64                     30/76
  Installing       : lz4-libs-1.9.3-4.fc36.x86_64                       31/76
  Installing       : pcre2-10.39-1.fc36.1.x86_64                        32/76
  Installing       : libselinux-3.3-4.fc36.x86_64                       33/76
  Installing       : libsemanage-3.3-3.fc37.x86_64                      34/76
  Installing       : shadow-utils-2:4.11.1-2.fc37.x86_64                35/76
  Installing       : sed-4.8-10.fc36.x86_64                             36/76
  Installing       : dbus-common-1:1.13.20-3.fc36.noarch                37/76
  Running scriptlet: dbus-common-1:1.13.20-3.fc36.noarch                37/76
  Installing       : alternatives-1.19-2.fc36.x86_64                    38/76
  Installing       : expat-2.4.6-1.fc37.x86_64                          39/76
  Installing       : gmp-1:6.2.1-2.fc36.x86_64                          40/76
  Installing       : json-c-0.15-3.fc36.x86_64                          41/76
  Installing       : libargon2-20171227-8.fc36.x86_64                   42/76
  Installing       : libeconf-0.4.0-3.fc36.x86_64                       43/76
  Installing       : pam-libs-1.5.2-11.fc37.x86_64                      44/76
  Installing       : libffi-3.4.2-8.fc36.x86_64                         45/76
  Installing       : p11-kit-0.24.1-2.fc36.x86_64                       46/76
  Installing       : libgpg-error-1.44-1.fc36.x86_64                    47/76
  Installing       : libgcrypt-1.10.0-1.fc36.x86_64                     48/76
  Installing       : systemd-libs-250.3-4.fc37.x86_64                   49/76
  Running scriptlet: dbus-broker-29-5.fc36.x86_64                       50/76
useradd warning: dbus's uid 81 outside of the SYS_UID_MIN 201 and SYS_UID_MAX 999 range.

  Installing       : dbus-broker-29-5.fc36.x86_64                       50/76
  Running scriptlet: dbus-broker-29-5.fc36.x86_64                       50/76
  Installing       : dbus-1:1.13.20-3.fc36.x86_64                       51/76
  Installing       : libseccomp-2.5.3-2.fc36.x86_64                     52/76
  Installing       : libsmartcols-2.38-0.2.fc36.x86_64                  53/76
  Installing       : libtasn1-4.18.0-2.fc36.x86_64                      54/76
  Installing       : p11-kit-trust-0.24.1-2.fc36.x86_64                 55/76
  Running scriptlet: p11-kit-trust-0.24.1-2.fc36.x86_64                 55/76
  Installing       : libunistring-1.0-1.fc36.x86_64                     56/76
  Installing       : libidn2-2.3.2-4.fc36.x86_64                        57/76
  Installing       : pcre-8.45-1.fc36.1.x86_64                          58/76
  Installing       : grep-3.7-2.fc36.x86_64                             59/76
  Installing       : crypto-policies-20220203-2.git112f859.fc36.noarch  60/76
  Running scriptlet: crypto-policies-20220203-2.git112f859.fc36.noarch  60/76
  Installing       : coreutils-common-9.0-3.fc36.x86_64                 61/76
  Installing       : openssl-libs-1:3.0.0-1.fc36.x86_64                 62/76
  Installing       : coreutils-9.0-3.fc36.x86_64                        63/76
  Running scriptlet: ca-certificates-2021.2.52-3.fc36.noarch            64/76
  Installing       : ca-certificates-2021.2.52-3.fc36.noarch            64/76
  Running scriptlet: ca-certificates-2021.2.52-3.fc36.noarch            64/76
  Installing       : libblkid-2.38-0.2.fc36.x86_64                      65/76
  Running scriptlet: libblkid-2.38-0.2.fc36.x86_64                      65/76
  Installing       : libmount-2.38-0.2.fc36.x86_64                      66/76
  Installing       : util-linux-core-2.38-0.2.fc36.x86_64               67/76
  Running scriptlet: util-linux-core-2.38-0.2.fc36.x86_64               67/76
  Installing       : libfdisk-2.38-0.2.fc36.x86_64                      68/76
  Installing       : kmod-libs-29-7.fc36.x86_64                         69/76
  Installing       : cryptsetup-libs-2.4.3-2.fc36.x86_64                70/76
  Installing       : device-mapper-libs-1.02.175-7.fc36.x86_64          71/76
  Installing       : device-mapper-1.02.175-7.fc36.x86_64               72/76
  Installing       : systemd-pam-250.3-4.fc37.x86_64                    73/76
  Installing       : systemd-resolved-250.3-4.fc37.x86_64               74/76
  Running scriptlet: systemd-resolved-250.3-4.fc37.x86_64               74/76
  Installing       : systemd-networkd-250.3-4.fc37.x86_64               75/76
  Running scriptlet: systemd-networkd-250.3-4.fc37.x86_64               75/76
  Installing       : systemd-250.3-4.fc37.x86_64                        76/76
warning: group utmp does not exist - using root
warning: group utmp does not exist - using root
warning: group utmp does not exist - using root
warning: group utmp does not exist - using root

  Running scriptlet: systemd-250.3-4.fc37.x86_64                        76/76
Creating group 'utmp' with GID 22.
Creating group 'input' with GID 104.
Creating group 'kvm' with GID 36.
Creating group 'render' with GID 105.
Creating group 'sgx' with GID 106.
Creating group 'systemd-journal' with GID 190.
Creating group 'systemd-network' with GID 192.
Creating user 'systemd-network' (systemd Network Management) with UID 192 and GID 192.
Creating group 'systemd-oom' with GID 999.
Creating user 'systemd-oom' (systemd Userspace OOM Killer) with UID 999 and GID 999.
Creating group 'systemd-resolve' with GID 193.
Creating user 'systemd-resolve' (systemd Resolver) with UID 193 and GID 193.

  Running scriptlet: filesystem-3.16-2.fc36.x86_64                      76/76
  Running scriptlet: ca-certificates-2021.2.52-3.fc36.noarch            76/76
  Running scriptlet: systemd-resolved-250.3-4.fc37.x86_64               76/76
'/etc/resolv.conf' -> '../run/systemd/resolve/stub-resolv.conf'

  Running scriptlet: systemd-250.3-4.fc37.x86_64                        76/76
2022-02-24 00:11:19 +01:00
Zbigniew Jędrzejewski-Szmek
4cc75bbba5 Move part of %post scriptlet for resolved to %posttrans (rhbz#2018913) 2022-02-23 23:52:08 +01:00
Zbigniew Jędrzejewski-Szmek
996c95efaf Bump release 2022-02-16 22:42:27 +01:00
Zbigniew Jędrzejewski-Szmek
4c2d7265ec Add patch for new kernel headers
It's already included in systemd-stable, but v250.4 hasn't been tagged
yet.
2022-02-16 22:33:01 +01:00
Zbigniew Jędrzejewski-Szmek
e48b9066b7 Drop unused dependencies for scriptlets 2022-02-16 22:33:01 +01:00
Zbigniew Jędrzejewski-Szmek
1ba983e0be Specify owner of /var/log/journal as root in the rpm listing
$ rpm -qlv systemd |grep -v 'root     root'
-rw-rw-r--    1 root     utmp         0 Jan 22 03:38 /run/utmp
-rw-rw----    1 root     utmp         0 Jan 22 03:38 /var/log/btmp
-rw-rw-r--    1 root     utmp         0 Jan 22 03:38 /var/log/lastlog
-rw-rw-r--    1 root     utmp         0 Jan 22 03:38 /var/log/wtmp
drwxr-sr-x    2 root     systemd-     0 Jan 22 03:38 /var/log/journal

During installation rpm would log an error that systemd-journal group
is unknown. We create all our users by calling sysusers in the %post
scriptlet, but that is too late. To avoid the warning we could either
add a %pre scriptlet, but that'd require adding a dependency on
shadow-utils for groupadd, since we can't use our own tools before we
are installed. Let's instead create the directory owned by root.root,
and change the group afterwards. The group ownership is for file
ownership, and in the worst case (we don't assign the group or set
mode +s), unprivileged users will not be able to read the logs.

We also use 'utmp' group, but that is provided by setup.rpm and is not
an issue.

https://bugzilla.redhat.com/show_bug.cgi?id=2018913#c24
2022-02-16 22:33:01 +01:00
Zbigniew Jędrzejewski-Szmek
cac0b2a5a7 Drop scriptlet for handling nobody user upgrades from Fedora <28
For https://fedoraproject.org/wiki/Changes/RenameNobodyUser a scriptlet
was introduced with prevents nss-systemd from synthesizing entries for nobody.
Let's remove the scriptlet: very few people upgrade from such old systems,
and even if they do, having a duplicate entry for nobody is annoying
but hardly a big problem.

(The other side of this, support in nss-systemd remains in place.)

This allows deps on the tools used in the scriptlet to be dropped from -libs.

While at it, also drop noop ldconfig scriptlets.
2022-02-16 22:32:56 +01:00
Zbigniew Jędrzejewski-Szmek
2731a22179 Bias the resolver towards libcurl-minimal 2022-02-10 18:14:26 +01:00
Zbigniew Jędrzejewski-Szmek
b54029abba Drop 20-grubby.install plugin for kernel-install 2022-02-10 18:02:31 +01:00
Zbigniew Jędrzejewski-Szmek
f42ae67ed3 Add pam_namespace to systemd-user pam config 2022-02-10 17:42:47 +01:00
Zbigniew Jędrzejewski-Szmek
3ce3375cc6 Remove duplicated pam systemd-user file 2022-02-10 17:37:56 +01:00
Fedora Release Engineering
c763537617 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 02:12:42 +00:00
Zbigniew Jędrzejewski-Szmek
238e8e0e64 Fix creation of /var/log/lastlog
I have no idea how I managed to screw that up yesterday…
2022-01-19 08:31:33 +01:00
Zbigniew Jędrzejewski-Szmek
f97cf5817a Take ownership of /var/log/lastlog
https://pagure.io/setup/pull-request/30 and
https://src.fedoraproject.org/rpms/util-linux/pull-request/10 are the
opposite steps for setup and util-linux.
2022-01-18 16:22:31 +01:00
Zbigniew Jędrzejewski-Szmek
3fe8cebea3 Version 250.3 2022-01-18 12:56:37 +01:00
Zbigniew Jędrzejewski-Szmek
d1787ccd07 Version 250.2 2022-01-10 22:04:43 +01:00
Zbigniew Jędrzejewski-Szmek
c1e2f480f7 Disable bpf filters on s390x 2022-01-04 18:27:08 +01:00
Zbigniew Jędrzejewski-Szmek
206f30e9fd Version 250.1 2022-01-04 18:27:08 +01:00
Zbigniew Jędrzejewski-Szmek
620e0cff6b Install only license files relevant to the effective license
We installed all the license files for the licenses used in the sources
(as %doc), but that doesn't seem useful.
2022-01-04 18:27:08 +01:00
Zbigniew Jędrzejewski-Szmek
60d0bbefe2 Disable bpf filters on arm64 2021-12-30 21:42:10 +01:00
Zbigniew Jędrzejewski-Szmek
114f45fe1f Skip bpf filtering on arm32 and ppc64el 2021-12-28 16:10:15 +01:00
Zbigniew Jędrzejewski-Szmek
7993a98ea4 Enable bpf-framework 2021-12-25 15:31:58 +01:00
Zbigniew Jędrzejewski-Szmek
3c872dc5d9 Fix warning about systemd-boot-update.service not existing on arm32 2021-12-25 11:02:05 +01:00
Zbigniew Jędrzejewski-Szmek
2edf38c273 Version 250 2021-12-23 21:15:44 +01:00
Zbigniew Jędrzejewski-Szmek
34a8fa5907 Switch unit status name format to 'combined' 2021-12-23 13:45:31 +01:00
Zbigniew Jędrzejewski-Szmek
b1af825426 Version 250-rc3 2021-12-20 19:48:35 +01:00
Zbigniew Jędrzejewski-Szmek
7f4e198603 Create /etc/resolv.conf symlink if nothing is present yet 2021-12-18 17:40:12 +01:00
Zbigniew Jędrzejewski-Szmek
184bb74091 Move libcryptsetup-token plugins to -udev 2021-12-14 19:09:00 +01:00
Zbigniew Jędrzejewski-Szmek
711d924ba3 Move systemd-boot-update.service to -udev subpackage
It will not be enabled on upgrades, but I think this is OK. sd-boot
is not very widely used anyway.
2021-12-12 13:01:40 +01:00
Pavel Březina
0898a89444 spec: remove nsswitch.conf scriptlet
Related to: https://fedoraproject.org/wiki/Changes/Make_Authselect_Mandatory

Both systemd and resolved nss modules are now enabled by default in
authselect. Users are now expected to use authselect to configure
the system and packages should no longer support non-authselect
configurations.

Resolves: rhbz#2023743
2021-12-10 17:09:21 +01:00
Zbigniew Jędrzejewski-Szmek
b24b99d669 Add Recommends for dlopened libs and move files into subpackages 2021-12-09 23:23:39 +01:00
Zbigniew Jędrzejewski-Szmek
1634b1b16a Revert "spec: remove nsswitch.conf scriptlet"
This reverts commit 2afe364ac4.

Unfortunately the build failed on dependencies:
DEBUG util.py:444:  Error:
DEBUG util.py:444:   Problem: package authselect-libs-1.3.0-1.fc36.x86_64 conflicts with glibc < 2.34.9000-27 provided by glibc-2.34.9000-26.fc36.x86_64
DEBUG util.py:444:    - package util-linux-2.37.2-1.fc36.x86_64 requires /etc/pam.d/system-auth, but none of the providers can be installed
DEBUG util.py:444:    - package gawk-5.1.1-1.fc36.x86_64 requires libm.so.6()(64bit), but none of the providers can be installed
DEBUG util.py:444:    - package gawk-5.1.1-1.fc36.x86_64 requires libm.so.6(GLIBC_2.2.5)(64bit), but none of the providers can be installed
DEBUG util.py:444:    - package gawk-5.1.1-1.fc36.x86_64 requires libm.so.6(GLIBC_2.29)(64bit), but none of the providers can be installed
DEBUG util.py:444:    - package gawk-5.1.1-1.fc36.x86_64 requires rtld(GNU_HASH), but none of the providers can be installed
DEBUG util.py:444:    - package gawk-5.1.1-1.fc36.x86_64 requires libc.so.6(GLIBC_2.34)(64bit), but none of the providers can be installed
DEBUG util.py:444:    - conflicting requests

I need to build the package again in rawhide, so this needs to be reverted
for now.
2021-12-09 18:49:59 +01:00
Pavel Březina
2afe364ac4 spec: remove nsswitch.conf scriptlet
Related to: https://fedoraproject.org/wiki/Changes/Make_Authselect_Mandatory

Both systemd and resolved nss modules are now enabled by default in
authselect. Users are now expected to use authselect to configure
the system and packages should no longer support non-authselect
configurations.

Resolves: rhbz#2023743
2021-12-09 18:27:16 +01:00
Zbigniew Jędrzejewski-Szmek
11bf124056 Fix memleak 2021-12-09 16:02:25 +01:00
Zbigniew Jędrzejewski-Szmek
ce4156b3dd Version 250-rc1
The crypto backend is switched to openssl.
gcrypt is still used for FSS in libsystemd.so.
2021-12-09 16:02:25 +01:00
Zbigniew Jędrzejewski-Szmek
e19aaa4604 Drop comments about already-merged pull request 2021-12-03 15:48:22 +01:00
Ludwig Nussel
6ffa8d89d6 Fix video link 2021-12-02 16:28:17 +00:00
Zbigniew Jędrzejewski-Szmek
d1ad6b189d %ghost /var/lib/{machines,portables} 2021-11-24 10:00:32 +01:00
Davide Cavalca
b7c95ddd9e Disable legacy iptables support 2021-11-19 08:29:38 -08:00
Luca BRUNO
21ca64d8e0
sysusers/provides: parse and output static IDs
This adds support for parsing static UIDs and GIDs from sysusers.d
fragments, and automatically forwarding them to the generated
'Provides' entries.
It will allow inspecting users/groups with static IDs directly
from package metadata:
```
$ rpm --query --provides --package gdm-41.0-3.fc36.x86_64.rpm
[...]
group(gdm) = 42
user(gdm) = 42
```
2021-11-16 16:36:58 +00:00
Zbigniew Jędrzejewski-Szmek
2d54326a8c Bump release
Oh, no autorelease here!
2021-11-15 14:09:32 +01:00
Zbigniew Jędrzejewski-Szmek
1d712f8acf Supress errors on selinux systems
See https://bugzilla.redhat.com/show_bug.cgi?id=2023332.
https://bugzilla.redhat.com/show_bug.cgi?id=2023332 is also related.
2021-11-15 13:47:07 +01:00
Zbigniew Jędrzejewski-Szmek
87e1ce3317 Version 249.7 2021-11-14 16:12:23 +01:00
Petr Menšík
27cc5e08c2 Switch to NM resolver on systemd-resolved uninstall
If /etc/resolv.conf pointed to systemd-resolved stub configuration, it
is obvious it would stop working. Compensate it by deleting the link, it
would be created again on installation. Try to pass ownership to NM,
which also provides similar file. Keep it missing otherwise, might be
created by unknown tool on reboot.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2021-11-14 09:38:52 +00:00
Kir Kolyshkin
9309bd3038 Fix scope activation from a user instance
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-11-11 15:36:06 -08:00
Zbigniew Jędrzejewski-Szmek
89ea50d07a Fix helper to restart user units with older systemd 2021-11-08 10:27:00 +01:00
Zbigniew Jędrzejewski-Szmek
ebeb76453a Version 249.6 2021-11-04 14:33:29 +01:00
Adam Williamson
6a6e2b723e Backport PR #133 to fix boot 2021-10-29 14:25:29 -07:00
Zbigniew Jędrzejewski-Szmek
837a32b7cd Version 249.5 2021-10-13 09:13:06 +02:00
Zbigniew Jędrzejewski-Szmek
013143c94e Wrap package descriptions at 80 columns 2021-09-29 17:19:21 +02:00
Zbigniew Jędrzejewski-Szmek
9802d8ce77 Fix build with the latest kernels 2021-09-15 16:59:31 +02:00
Sahana Prasad
46a408102a Rebuilt with OpenSSL 3.0.0 2021-09-14 19:16:25 +02:00
48 changed files with 5191 additions and 4284 deletions

11
.editorconfig Normal file
View file

@ -0,0 +1,11 @@
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{yml,yaml}]
indent_size = 2

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

4
.gitignore vendored
View file

@ -7,3 +7,7 @@
/systemd-*.tar.xz
/systemd-*.tar.gz
/*.rpm
/mkosi.output/
/mkosi.cache/
/mkosi.builddir/
/mkosi.local.conf

View file

@ -1,5 +1,7 @@
- project:
vars:
install_repo_exclude:
- systemd-standalone-repart
- systemd-standalone-shutdown
- systemd-standalone-sysusers
- systemd-standalone-tmpfiles
- systemd-standalone-sysuser

View file

@ -0,0 +1,88 @@
From 61750e265ce3f7783a8dba831e91140f84ad89f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 5 Nov 2025 17:52:16 +0100
Subject: [PATCH 1/3] Revert "units: drop runlevel[0-6].target"
This partially reverts commit e58ba80a40fb6e96543d56774a5bc5aa9cdadbf3.
The unit are still needed for compat.
---
units/meson.build | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/units/meson.build b/units/meson.build
index 2e04c4aa2b..46eaac4073 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
+with_runlevels = conf.get('HAVE_SYSV_COMPAT') == 1
+
units = [
{ 'file' : 'basic.target' },
{ 'file' : 'blockdev@.target' },
@@ -49,7 +51,7 @@ units = [
},
{
'file' : 'graphical.target',
- 'symlinks' : ['default.target'],
+ 'symlinks' : ['default.target'] + (with_runlevels ? ['runlevel5.target'] : []),
},
{ 'file' : 'halt.target' },
{
@@ -142,7 +144,10 @@ units = [
'conditions' : ['ENABLE_MACHINED'],
},
{ 'file' : 'modprobe@.service' },
- { 'file' : 'multi-user.target' },
+ {
+ 'file' : 'multi-user.target',
+ 'symlinks' : with_runlevels ? ['runlevel2.target', 'runlevel3.target', 'runlevel4.target'] : [],
+ },
{
'file' : 'systemd-mute-console.socket',
'symlinks' : ['sockets.target.wants/']
@@ -155,7 +160,10 @@ units = [
{ 'file' : 'nss-lookup.target' },
{ 'file' : 'nss-user-lookup.target' },
{ 'file' : 'paths.target' },
- { 'file' : 'poweroff.target' },
+ {
+ 'file' : 'poweroff.target',
+ 'symlinks' : with_runlevels ? ['runlevel0.target'] : [],
+ },
{ 'file' : 'printer.target' },
{
'file' : 'proc-sys-fs-binfmt_misc.automount',
@@ -180,7 +188,7 @@ units = [
},
{
'file' : 'reboot.target',
- 'symlinks' : ['ctrl-alt-del.target'],
+ 'symlinks' : ['ctrl-alt-del.target'] + (with_runlevels ? ['runlevel6.target'] : []),
},
{
'file' : 'remote-cryptsetup.target',
@@ -200,7 +208,10 @@ units = [
'symlinks' : ['initrd-root-device.target.wants/'],
},
{ 'file' : 'rescue.service.in' },
- { 'file' : 'rescue.target' },
+ {
+ 'file' : 'rescue.target',
+ 'symlinks' : with_runlevels ? ['runlevel1.target'] : [],
+ },
{ 'file' : 'rpcbind.target' },
{ 'file' : 'serial-getty@.service.in' },
{ 'file' : 'shutdown.target' },
@@ -1001,4 +1012,10 @@ else
dbussessionservicedir / 'org.freedesktop.systemd1.service'))
endif
+if conf.get('HAVE_SYSV_COMPAT') == 1
+ foreach i : [1, 2, 3, 4, 5]
+ install_emptydir(systemunitdir / 'runlevel@0@.target.wants'.format(i))
+ endforeach
+endif
+
subdir('user')

View file

@ -1,247 +0,0 @@
From aa56d0bbcef9c2f32845203b50df92492717fea6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 7 Jul 2021 14:02:36 +0200
Subject: [PATCH 1/6] rpm: don't specify the full path for systemctl and other
commands
We can make things a bit simpler and more readable by not specifying the path.
Since we didn't specify the full path for all commands (including those invoked
recursively by anythign we invoke), this didn't really privide any security or
robustness benefits. I guess that full paths were used because this style of
rpm packagnig was popular in the past, with macros used for everything
possible, with special macros for common commands like %{__ln} and %{__mkdir}.
---
src/rpm/macros.systemd.in | 24 ++++++++++++------------
src/rpm/triggers.systemd.in | 18 +++++++++---------
src/rpm/triggers.systemd.sh.in | 18 +++++++++---------
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in
index 3a0169a85f..3129ab2d61 100644
--- a/src/rpm/macros.systemd.in
+++ b/src/rpm/macros.systemd.in
@@ -46,9 +46,9 @@ OrderWithRequires(postun): systemd \
%systemd_post() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_post}} \
-if [ $1 -eq 1 ] && [ -x %{_bindir}/systemctl ]; then \
+if [ $1 -eq 1 ] && command -v systemctl >/dev/null; then \
# Initial installation \
- %{_bindir}/systemctl --no-reload preset %{?*} || : \
+ systemctl --no-reload preset %{?*} || : \
fi \
%{nil}
@@ -56,21 +56,21 @@ fi \
%systemd_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_preun}} \
-if [ $1 -eq 0 ] && [ -x %{_bindir}/systemctl ]; then \
+if [ $1 -eq 0 ] && command -v systemctl >/dev/null; then \
# Package removal, not upgrade \
if [ -d /run/systemd/system ]; then \
- %{_bindir}/systemctl --no-reload disable --now %{?*} || : \
+ systemctl --no-reload disable --now %{?*} || : \
else \
- %{_bindir}/systemctl --no-reload disable %{?*} || : \
+ systemctl --no-reload disable %{?*} || : \
fi \
fi \
%{nil}
%systemd_user_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_preun}} \
-if [ $1 -eq 0 ] && [ -x %{_bindir}/systemctl ]; then \
+if [ $1 -eq 0 ] && command -v systemctl >/dev/null; then \
# Package removal, not upgrade \
- %{_bindir}/systemctl --global disable %{?*} || : \
+ systemctl --global disable %{?*} || : \
fi \
%{nil}
@@ -84,10 +84,10 @@ fi \
%systemd_postun_with_restart() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun_with_restart}} \
-if [ $1 -ge 1 ] && [ -x %{_bindir}/systemctl ]; then \
+if [ $1 -ge 1 ] && command -v systemctl >/dev/null; then \
# Package upgrade, not uninstall \
for unit in %{?*}; do \
- %{_bindir}/systemctl set-property $unit Markers=+needs-restart || : \
+ systemctl set-property $unit Markers=+needs-restart || : \
done \
fi \
%{nil}
@@ -105,17 +105,17 @@ fi \
# Deprecated. Use %tmpfiles_create_package instead
%tmpfiles_create() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# tmpfiles_create}} \
-[ -x %{_bindir}/systemd-tmpfiles ] && %{_bindir}/systemd-tmpfiles --create %{?*} || : \
+command -v systemd-tmpfiles >/dev/null && systemd-tmpfiles --create %{?*} || : \
%{nil}
# Deprecated. Use %sysusers_create_package instead
%sysusers_create() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \
-[ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers %{?*} || : \
+command -v systemd-sysusers >/dev/null && systemd-sysusers %{?*} || : \
%{nil}
%sysusers_create_inline() \
-[ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \
+command -v systemd-sysusers >/dev/null && systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \
%{?*} \
SYSTEMD_INLINE_EOF\
%{nil}
diff --git a/src/rpm/triggers.systemd.in b/src/rpm/triggers.systemd.in
index c10112fe54..483207e58c 100644
--- a/src/rpm/triggers.systemd.in
+++ b/src/rpm/triggers.systemd.in
@@ -16,14 +16,14 @@
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemctl", "daemon-reload"))
+ assert(posix.execp("systemctl", "daemon-reload"))
elseif pid > 0 then
posix.wait(pid)
end
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemctl", "reload-or-restart", "--marked"))
+ assert(posix.execp("systemctl", "reload-or-restart", "--marked"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -38,7 +38,7 @@ end
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemctl", "daemon-reload"))
+ assert(posix.execp("systemctl", "daemon-reload"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -49,7 +49,7 @@ end
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemctl", "reload-or-restart", "--marked"))
+ assert(posix.execp("systemctl", "reload-or-restart", "--marked"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -61,7 +61,7 @@ end
-- will run before the tmpfiles file trigger.
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemd-sysusers"))
+ assert(posix.execp("systemd-sysusers"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -71,7 +71,7 @@ end
-- installed or updated in {{UDEV_HWDB_DIR}}.
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemd-hwdb", "update"))
+ assert(posix.execp("systemd-hwdb", "update"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -81,7 +81,7 @@ end
-- have been installed or updated in {{SYSTEMD_CATALOG_DIR}}.
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/journalctl", "--update-catalog"))
+ assert(posix.execp("journalctl", "--update-catalog"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -105,7 +105,7 @@ end
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/systemd-tmpfiles", "--create"))
+ assert(posix.execp("systemd-tmpfiles", "--create"))
elseif pid > 0 then
posix.wait(pid)
end
@@ -117,7 +117,7 @@ end
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
- assert(posix.exec("%{_bindir}/udevadm", "control", "--reload"))
+ assert(posix.execp("udevadm", "control", "--reload"))
elseif pid > 0 then
posix.wait(pid)
end
diff --git a/src/rpm/triggers.systemd.sh.in b/src/rpm/triggers.systemd.sh.in
index e746c316d3..f8c4514313 100644
--- a/src/rpm/triggers.systemd.sh.in
+++ b/src/rpm/triggers.systemd.sh.in
@@ -15,8 +15,8 @@
# installed, because other cases are covered by the *un scriptlets,
# so sometimes we will reload needlessly.
if test -d "/run/systemd/system"; then
- %{_bindir}/systemctl daemon-reload || :
- %{_bindir}/systemctl reload-or-restart --marked || :
+ systemctl daemon-reload || :
+ systemctl reload-or-restart --marked || :
fi
%transfiletriggerpostun -P 1000100 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
@@ -26,30 +26,30 @@ fi
# have been installed, but before %postun scripts in packages get
# executed.
if test -d "/run/systemd/system"; then
- %{_bindir}/systemctl daemon-reload || :
+ systemctl daemon-reload || :
fi
%transfiletriggerpostun -P 10000 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
# We restart remaining services that should be restarted here.
if test -d "/run/systemd/system"; then
- %{_bindir}/systemctl reload-or-restart --marked || :
+ systemctl reload-or-restart --marked || :
fi
%transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}}
# This script will process files installed in {{SYSUSERS_DIR}} to create
# specified users automatically. The priority is set such that it
# will run before the tmpfiles file trigger.
-%{_bindir}/systemd-sysusers || :
+systemd-sysusers || :
%transfiletriggerin -P 1000700 udev -- {{UDEV_HWDB_DIR}}
# This script will automatically invoke hwdb update if files have been
# installed or updated in {{UDEV_HWDB_DIR}}.
-%{_bindir}/systemd-hwdb update || :
+systemd-hwdb update || :
%transfiletriggerin -P 1000700 -- {{SYSTEMD_CATALOG_DIR}}
# This script will automatically invoke journal catalog update if files
# have been installed or updated in {{SYSTEMD_CATALOG_DIR}}.
-%{_bindir}/journalctl --update-catalog || :
+journalctl --update-catalog || :
%transfiletriggerin -P 1000700 -- {{BINFMT_DIR}}
# This script will automatically apply binfmt rules if files have been
@@ -65,14 +65,14 @@ fi
# tmpfiles automatically. The priority is set such that it will run
# after the sysusers file trigger, but before any other triggers.
if test -d "/run/systemd/system"; then
- %{_bindir}/systemd-tmpfiles --create || :
+ systemd-tmpfiles --create || :
fi
%transfiletriggerin -P 1000600 udev -- {{UDEV_RULES_DIR}}
# This script will automatically update udev with new rules if files
# have been installed or updated in {{UDEV_RULES_DIR}}.
if test -e /run/udev/control; then
- %{_bindir}/udevadm control --reload || :
+ udevadm control --reload || :
fi
%transfiletriggerin -P 1000500 -- {{SYSCTL_DIR}}

View file

@ -0,0 +1,32 @@
From 8d6d86d1d7e45eeae921e88adde55d6524027c96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 26 Nov 2025 22:29:53 +0100
Subject: [PATCH 3/3] machined: continue without resolve.hook socket
---
src/machine/machined-varlink.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/machine/machined-varlink.c b/src/machine/machined-varlink.c
index f83cbb8562..0b30cd0531 100644
--- a/src/machine/machined-varlink.c
+++ b/src/machine/machined-varlink.c
@@ -894,9 +894,15 @@ static int manager_varlink_init_resolve_hook(Manager *m) {
r = sd_varlink_server_listen_address(s, VARLINK_PATH_MACHINED_RESOLVE_HOOK,
0666 | SD_VARLINK_SERVER_MODE_MKDIR_0755);
- if (r < 0)
- return log_error_errno(r, "Failed to bind to varlink socket %s: %m",
- VARLINK_PATH_MACHINED_RESOLVE_HOOK);
+ if (r < 0) {
+ bool ignore = ERRNO_IS_NEG_PRIVILEGE(r);
+ log_full_errno(ignore ? LOG_WARNING : LOG_ERR,
+ r,
+ "Failed to bind to varlink socket %s%s: %m",
+ VARLINK_PATH_MACHINED_RESOLVE_HOOK,
+ ignore ? ", ignoring" : "");
+ return ignore ? 0 : r;
+ }
r = sd_varlink_server_attach_event(s, m->event, SD_EVENT_PRIORITY_NORMAL);
if (r < 0)

View file

@ -1,332 +0,0 @@
From bbfbe1c31046d53640ebb4ef4e4820614fd0864e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 22 Jul 2021 11:22:33 +0200
Subject: [PATCH 2/6] rpm: use a helper script to actually invoke systemctl
commands
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Instead of embedding the commands to invoke directly in the macros,
let's use a helper script as indirection. This has a couple of advantages:
- the macro language is awkward, we need to suffix most commands by "|| :"
and "\", which is easy to get wrong. In the new scheme, the macro becomes
a single simple command.
- in the script we can use normal syntax highlighting, shellcheck, etc.
- it's also easier to test the invoked commands by invoking the helper
manually.
- most importantly, the logic is contained in the helper, i.e. we can
update systemd rpm and everything uses the new helper. Before, we would
have to rebuild all packages to update the macro definition.
This raises the question whether it makes sense to use the lua scriptlets when
the real work is done in a bash script. I think it's OK: we still have the
efficient lua scripts that do the short scripts, and we use a single shared
implementation in bash to do the more complex stuff.
The meson version is raised to 0.47 because that's needed for install_mode.
We were planning to raise the required version anyway…
---
README | 2 +-
meson.build | 3 +-
src/rpm/macros.systemd.in | 30 ++++++++--------
src/rpm/meson.build | 13 ++++---
src/rpm/systemd-update-helper.in | 60 ++++++++++++++++++++++++++++++++
src/rpm/triggers.systemd.in | 43 ++++++++---------------
src/rpm/triggers.systemd.sh.in | 13 ++-----
7 files changed, 105 insertions(+), 59 deletions(-)
create mode 100755 src/rpm/systemd-update-helper.in
diff --git a/README b/README
index 9e5bcab830..2b759e7f5a 100644
--- a/README
+++ b/README
@@ -195,7 +195,7 @@ REQUIREMENTS:
python-jinja2
python-lxml (optional, required to build the indices)
python >= 3.5
- meson >= 0.46 (>= 0.49 is required to build position-independent executables)
+ meson >= 0.47 (>= 0.49 is required to build position-independent executables)
ninja
gcc, awk, sed, grep, and similar tools
clang >= 10.0, llvm >= 10.0 (optional, required to build BPF programs
diff --git a/meson.build b/meson.build
index ece21fbd10..5962371e49 100644
--- a/meson.build
+++ b/meson.build
@@ -10,7 +10,7 @@ project('systemd', 'c',
'localstatedir=/var',
'warning_level=2',
],
- meson_version : '>= 0.46',
+ meson_version : '>= 0.47',
)
libsystemd_version = '0.32.0'
@@ -253,6 +253,7 @@ conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', join_paths(rootlib
conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge'))
conf.set_quoted('SYSTEMD_TEST_DATA', join_paths(testsdir, 'testdata'))
conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
+conf.set_quoted('SYSTEMD_UPDATE_HELPER_PATH', join_paths(rootlibexecdir, 'systemd-update-helper'))
conf.set_quoted('SYSTEMD_USERWORK_PATH', join_paths(rootlibexecdir, 'systemd-userwork'))
conf.set_quoted('SYSTEMD_VERITYSETUP_PATH', join_paths(rootlibexecdir, 'systemd-veritysetup'))
conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'system'))
diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in
index 3129ab2d61..bbdf036da7 100644
--- a/src/rpm/macros.systemd.in
+++ b/src/rpm/macros.systemd.in
@@ -46,31 +46,33 @@ OrderWithRequires(postun): systemd \
%systemd_post() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_post}} \
-if [ $1 -eq 1 ] && command -v systemctl >/dev/null; then \
+if [ $1 -eq 1 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
# Initial installation \
- systemctl --no-reload preset %{?*} || : \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} install-system-units %{?*} || : \
fi \
%{nil}
-%systemd_user_post() %{expand:%systemd_post \\--global %%{?*}}
+%systemd_user_post() \
+%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_post}} \
+if [ $1 -eq 1 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
+ # Initial installation \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} install-user-units %{?*} || : \
+fi \
+%{nil}
%systemd_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_preun}} \
-if [ $1 -eq 0 ] && command -v systemctl >/dev/null; then \
+if [ $1 -eq 0 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
# Package removal, not upgrade \
- if [ -d /run/systemd/system ]; then \
- systemctl --no-reload disable --now %{?*} || : \
- else \
- systemctl --no-reload disable %{?*} || : \
- fi \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} remove-system-units %{?*} || : \
fi \
%{nil}
%systemd_user_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_preun}} \
-if [ $1 -eq 0 ] && command -v systemctl >/dev/null; then \
+if [ $1 -eq 0 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
# Package removal, not upgrade \
- systemctl --global disable %{?*} || : \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} remove-user-units %{?*} || : \
fi \
%{nil}
@@ -84,11 +86,9 @@ fi \
%systemd_postun_with_restart() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun_with_restart}} \
-if [ $1 -ge 1 ] && command -v systemctl >/dev/null; then \
+if [ $1 -ge 1 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
# Package upgrade, not uninstall \
- for unit in %{?*}; do \
- systemctl set-property $unit Markers=+needs-restart || : \
- done \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} mark-restart-system-units %{?*} || : \
fi \
%{nil}
diff --git a/src/rpm/meson.build b/src/rpm/meson.build
index fc72fee73c..2ad3308cc1 100644
--- a/src/rpm/meson.build
+++ b/src/rpm/meson.build
@@ -1,9 +1,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
in_files = [
- ['macros.systemd', rpmmacrosdir != 'no'],
- ['triggers.systemd', false],
- ['triggers.systemd.sh', false]]
+ ['macros.systemd', rpmmacrosdir != 'no', rpmmacrosdir],
+
+ # we conditionalize on rpmmacrosdir, but install into rootlibexecdir
+ ['systemd-update-helper', rpmmacrosdir != 'no', rootlibexecdir, 'rwxr-xr-x'],
+
+ ['triggers.systemd', false],
+ ['triggers.systemd.sh', false]]
# The last two don't get installed anywhere, one of them needs to included in
# the rpm spec file definition instead.
@@ -17,6 +21,7 @@ foreach tuple : in_files
command : [meson_render_jinja2, config_h, '@INPUT@'],
capture : true,
install : tuple[1],
- install_dir : rpmmacrosdir,
+ install_dir : tuple.length() > 2 ? tuple[2] : '',
+ install_mode : tuple.length() > 3 ? tuple[3] : false,
build_by_default : true)
endforeach
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
new file mode 100755
index 0000000000..9fa49fa131
--- /dev/null
+++ b/src/rpm/systemd-update-helper.in
@@ -0,0 +1,60 @@
+#!/bin/bash
+set -eu
+set -o pipefail
+
+command="${1:?}"
+shift
+
+command -v systemctl >/dev/null || exit 0
+
+case "$command" in
+ install-system-units)
+ systemctl --no-reload preset "$@"
+ ;;
+
+ install-user-units)
+ systemctl --no-reload preset --global "$@"
+ ;;
+
+ remove-system-units)
+ if [ -d /run/systemd/system ]; then
+ systemctl --no-reload disable --now "$@"
+ else
+ systemctl --no-reload disable "$@"
+ fi
+ ;;
+
+ remove-user-units)
+ systemctl --global disable "$@"
+ ;;
+
+ mark-restart-system-units)
+ [ -d /run/systemd/system ] || exit 0
+
+ for unit in "$@"; do
+ systemctl set-property "$unit" Markers=+needs-restart || :
+ done
+ ;;
+
+ system-reload-restart|system-reload|system-restart)
+ if [ -n "$*" ]; then
+ echo "Unexpected arguments for '$command': $*"
+ exit 2
+ fi
+
+ [ -d /run/systemd/system ] || exit 0
+
+ if [[ "$command" =~ reload ]]; then
+ systemctl daemon-reload
+ fi
+
+ if [[ "$command" =~ restart ]]; then
+ systemctl reload-or-restart --marked
+ fi
+ ;;
+
+ *)
+ echo "Unknown verb '$command'"
+ exit 3
+ ;;
+esac
diff --git a/src/rpm/triggers.systemd.in b/src/rpm/triggers.systemd.in
index 483207e58c..f56c80c7ca 100644
--- a/src/rpm/triggers.systemd.in
+++ b/src/rpm/triggers.systemd.in
@@ -13,20 +13,11 @@
-- upgraded. We care about the case where a package is initially
-- installed, because other cases are covered by the *un scriptlets,
-- so sometimes we will reload needlessly.
-if posix.access("/run/systemd/system") then
- pid = posix.fork()
- if pid == 0 then
- assert(posix.execp("systemctl", "daemon-reload"))
- elseif pid > 0 then
- posix.wait(pid)
- end
-
- pid = posix.fork()
- if pid == 0 then
- assert(posix.execp("systemctl", "reload-or-restart", "--marked"))
- elseif pid > 0 then
- posix.wait(pid)
- end
+pid = posix.fork()
+if pid == 0 then
+ assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "system-reload-restart"))
+elseif pid > 0 then
+ posix.wait(pid)
end
%transfiletriggerpostun -P 1000100 -p <lua> -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
@@ -35,24 +26,20 @@ end
-- On upgrade, we need to run daemon-reload after any new unit files
-- have been installed, but before %postun scripts in packages get
-- executed.
-if posix.access("/run/systemd/system") then
- pid = posix.fork()
- if pid == 0 then
- assert(posix.execp("systemctl", "daemon-reload"))
- elseif pid > 0 then
- posix.wait(pid)
- end
+pid = posix.fork()
+if pid == 0 then
+ assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "system-reload"))
+elseif pid > 0 then
+ posix.wait(pid)
end
%transfiletriggerpostun -P 10000 -p <lua> -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
-- We restart remaining services that should be restarted here.
-if posix.access("/run/systemd/system") then
- pid = posix.fork()
- if pid == 0 then
- assert(posix.execp("systemctl", "reload-or-restart", "--marked"))
- elseif pid > 0 then
- posix.wait(pid)
- end
+pid = posix.fork()
+if pid == 0 then
+ assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "system-restart"))
+elseif pid > 0 then
+ posix.wait(pid)
end
%transfiletriggerin -P 100700 -p <lua> -- {{SYSUSERS_DIR}}
diff --git a/src/rpm/triggers.systemd.sh.in b/src/rpm/triggers.systemd.sh.in
index f8c4514313..3b35a4b5c6 100644
--- a/src/rpm/triggers.systemd.sh.in
+++ b/src/rpm/triggers.systemd.sh.in
@@ -14,10 +14,7 @@
# upgraded. We care about the case where a package is initially
# installed, because other cases are covered by the *un scriptlets,
# so sometimes we will reload needlessly.
-if test -d "/run/systemd/system"; then
- systemctl daemon-reload || :
- systemctl reload-or-restart --marked || :
-fi
+{{SYSTEMD_UPDATE_HELPER_PATH}} system-reload-restart || :
%transfiletriggerpostun -P 1000100 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
# On removal, we need to run daemon-reload after any units have been
@@ -25,15 +22,11 @@ fi
# On upgrade, we need to run daemon-reload after any new unit files
# have been installed, but before %postun scripts in packages get
# executed.
-if test -d "/run/systemd/system"; then
- systemctl daemon-reload || :
-fi
+{{SYSTEMD_UPDATE_HELPER_PATH}} system-reload || :
%transfiletriggerpostun -P 10000 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
# We restart remaining services that should be restarted here.
-if test -d "/run/systemd/system"; then
- systemctl reload-or-restart --marked || :
-fi
+{{SYSTEMD_UPDATE_HELPER_PATH}} system-restart || :
%transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}}
# This script will process files installed in {{SYSUSERS_DIR}} to create

View file

@ -1,30 +0,0 @@
From bc587d08416e3517b82b764798866154caa11085 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 22 Jul 2021 11:28:36 +0200
Subject: [PATCH 3/6] rpm: call +needs-restart in parallel
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Some rpms install a bunch of units… It seems nicer to invoke them all in
parallel. In particular, timeouts in systemctl also run in parallel, so if
there's some communication mishap, we will wait less.
---
src/rpm/systemd-update-helper.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index 9fa49fa131..f3c75b75fa 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -32,8 +32,9 @@ case "$command" in
[ -d /run/systemd/system ] || exit 0
for unit in "$@"; do
- systemctl set-property "$unit" Markers=+needs-restart || :
+ systemctl set-property "$unit" Markers=+needs-restart &
done
+ wait
;;
system-reload-restart|system-reload|system-restart)

View file

@ -0,0 +1,112 @@
From 75890d949f92c412c0936b8536b2e0dc8f7dfb40 Mon Sep 17 00:00:00 2001
From: Nick Rosbrook <enr0n@ubuntu.com>
Date: Fri, 19 Dec 2025 11:01:49 -0500
Subject: [PATCH] ukify: omit .osrel section when --os-release= is empty
The primary motivation for this is to allow users of ukify to build
UKI-like objects, without having them later be detected as a UKI by
tools like kernel-install and bootctl.
The common code used by these tools to determine if a PE binary is a UKI
checks that both .osrel and .linux sections are present. Hence, adding
a mechansim to skip .osrel provides a way to avoid being labeled a UKI.
---
man/ukify.xml | 5 ++++-
src/ukify/test/test_ukify.py | 15 +++++++++++----
src/ukify/ukify.py | 10 +++++++++-
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/man/ukify.xml b/man/ukify.xml
index 829761642d..7462c5c92f 100644
--- a/man/ukify.xml
+++ b/man/ukify.xml
@@ -365,7 +365,10 @@
<listitem><para>The os-release description (the <literal>.osrel</literal> section). The argument
may be a literal string, or <literal>@</literal> followed by a path name. If not specified, the
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> file
- will be picked up from the host system.</para>
+ will be picked up from the host system. If explicitly set to an empty string, the ".osrel" section
+ is omitted from the UKI (this is not recommended in most cases, and causes the resulting artifact
+ to not be recognized as a UKI by other tools like <command>kernel-install</command>
+ and <command>bootctl</command>).</para>
<xi:include href="version-info.xml" xpointer="v253"/></listitem>
</varlistentry>
diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py
index f75ef0c891..224a38569f 100755
--- a/src/ukify/test/test_ukify.py
+++ b/src/ukify/test/test_ukify.py
@@ -641,7 +641,7 @@ def test_efi_signing_pesign(kernel_initrd, tmp_path):
shutil.rmtree(tmp_path)
-def test_inspect(kernel_initrd, tmp_path, capsys):
+def test_inspect(kernel_initrd, tmp_path, capsys, osrel=True):
if kernel_initrd is None:
pytest.skip('linux+initrd not found')
if not shutil.which('sbsign'):
@@ -653,7 +653,7 @@ def test_inspect(kernel_initrd, tmp_path, capsys):
output = f'{tmp_path}/signed2.efi'
uname_arg='1.2.3'
- osrel_arg='Linux'
+ osrel_arg='Linux' if osrel else ''
cmdline_arg='ARG1 ARG2 ARG3'
args = [
@@ -680,8 +680,12 @@ def test_inspect(kernel_initrd, tmp_path, capsys):
text = capsys.readouterr().out
- expected_osrel = f'.osrel:\n size: {len(osrel_arg)}'
- assert expected_osrel in text
+ if osrel:
+ expected_osrel = f'.osrel:\n size: {len(osrel_arg)}'
+ assert expected_osrel in text
+ else:
+ assert '.osrel:' not in text
+
expected_cmdline = f'.cmdline:\n size: {len(cmdline_arg)}'
assert expected_cmdline in text
expected_uname = f'.uname:\n size: {len(uname_arg)}'
@@ -694,6 +698,9 @@ def test_inspect(kernel_initrd, tmp_path, capsys):
shutil.rmtree(tmp_path)
+def test_inspect_no_osrel(kernel_initrd, tmp_path, capsys):
+ test_inspect(kernel_initrd, tmp_path, capsys, osrel=False)
+
@pytest.mark.skipif(not slow_tests, reason='slow')
def test_pcr_signing(kernel_initrd, tmp_path):
if kernel_initrd is None:
diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py
index c98f8e2a5d..b7542c7eca 100755
--- a/src/ukify/ukify.py
+++ b/src/ukify/ukify.py
@@ -1477,6 +1477,9 @@ def make_uki(opts: UkifyConfig) -> None:
'.profile',
}
+ if not opts.os_release:
+ to_import.remove('.osrel')
+
for profile in opts.join_profiles:
pe = pefile.PE(profile, fast_load=True)
prev_len = len(uki.sections)
@@ -2412,7 +2415,12 @@ def finalize_options(opts: argparse.Namespace) -> None:
opts.os_release = resolve_at_path(opts.os_release)
- if not opts.os_release and opts.linux:
+ if opts.os_release == '':
+ # If --os-release= with an empty string was passed, treat that as
+ # explicitly disabling the .osrel section, and do not fallback to the
+ # system's os-release files.
+ pass
+ elif opts.os_release is None and opts.linux:
p = Path('/etc/os-release')
if not p.exists():
p = Path('/usr/lib/os-release')
--
2.52.0

View file

@ -1,254 +0,0 @@
From eb458aa5f37496059540e1db47f8b4f1c69ef206 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 7 Jul 2021 14:37:57 +0200
Subject: [PATCH 4/6] rpm: restart user services at the end of the transaction
This closes an important gap: so far we would reexecute the system manager and
restart system services that were configured to do so, but we wouldn't do the
same for user managers or user services.
The scheme used for user managers is very similar to the system one, except
that there can be multiple user managers running, so we query the system
manager to get a list of them, and then tell each one to do the equivalent
operations: daemon-reload, disable --now, set-property Markers=+needs-restart,
reload-or-restart --marked.
The total time that can be spend on this is bounded: we execute the commands in
parallel over user managers and units, and additionally set SYSTEMD_BUS_TIMEOUT
to a lower value (15 s by default). User managers should not have too many
units running, and they should be able to do all those operations very
quickly (<< 1s). The final restart operation may take longer, but it's done
asynchronously, so we only wait for the queuing to happen.
The advantage of doing this synchronously is that we can wait for each step to
happen, and for example daemon-reloads can finish before we execute the service
restarts, etc. We can also order various steps wrt. to the phases in the rpm
transaction.
When this was initially proposed, we discussed a more relaxed scheme with bus
property notifications. Such an approach would be more complex because a bunch
of infrastructure would have to be added to system manager to propagate
appropriate notifications to the user managers, and then the user managers
would have to wait for them. Instead, now there is no new code in the managers,
all new functionality is contained in src/rpm/. The ability to call 'systemctl
--user user@' makes this approach very easy. Also, it would be very hard to
order the user manager steps and the rpm transaction steps.
Note: 'systemctl --user disable' is only called for a user managers that are
running. I don't see a nice way around this, and it shouldn't matter too much:
we'll just leave a dangling symlink in the case where the user enabled the
service manually.
A follow-up for https://bugzilla.redhat.com/show_bug.cgi?id=1792468 and
fa97d2fcf64e0558054bee673f734f523373b146.
---
meson.build | 1 +
meson_options.txt | 2 ++
src/rpm/macros.systemd.in | 6 +++-
src/rpm/systemd-update-helper.in | 47 ++++++++++++++++++++++++++++++++
src/rpm/triggers.systemd.in | 28 ++++++++++++++++++-
src/rpm/triggers.systemd.sh.in | 13 ++++++++-
6 files changed, 94 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 5962371e49..e185c27750 100644
--- a/meson.build
+++ b/meson.build
@@ -270,6 +270,7 @@ conf.set_quoted('TMPFILES_DIR', tmpfilesdir)
conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
conf.set_quoted('UDEV_HWDB_DIR', udevhwdbdir)
conf.set_quoted('UDEV_RULES_DIR', udevrulesdir)
+conf.set_quoted('UPDATE_HELPER_USER_TIMEOUT', get_option('update-helper-user-timeout'))
conf.set_quoted('USER_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'user'))
conf.set_quoted('USER_DATA_UNIT_DIR', userunitdir)
conf.set_quoted('USER_ENV_GENERATOR_DIR', userenvgeneratordir)
diff --git a/meson_options.txt b/meson_options.txt
index 2f0f4e7b8f..43b815e433 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -182,6 +182,8 @@ option('xinitrcdir', type : 'string', value : '',
description : 'directory for xinitrc files')
option('rpmmacrosdir', type : 'string', value : 'lib/rpm/macros.d',
description : 'directory for rpm macros ["no" disables]')
+option('update-helper-user-timeout', type : 'string', value : '15s',
+ description : 'how long to wait for user manager operations')
option('pamlibdir', type : 'string',
description : 'directory for PAM modules')
option('pamconfdir', type : 'string',
diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in
index bbdf036da7..caa2e45595 100644
--- a/src/rpm/macros.systemd.in
+++ b/src/rpm/macros.systemd.in
@@ -93,7 +93,11 @@ fi \
%{nil}
%systemd_user_postun_with_restart() \
-%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun_with_restart}} \
+%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_postun_with_restart}} \
+if [ $1 -ge 1 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
+ # Package upgrade, not uninstall \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} mark-restart-user-units %{?*} || : \
+fi \
%{nil}
%udev_hwdb_update() %{nil}
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index f3c75b75fa..f3466ab3c0 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -26,6 +26,15 @@ case "$command" in
remove-user-units)
systemctl --global disable "$@"
+
+ [ -d /run/systemd/system ] || exit 0
+
+ users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
+ for user in $users; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" disable --now "$@" &
+ done
+ wait
;;
mark-restart-system-units)
@@ -37,6 +46,17 @@ case "$command" in
wait
;;
+ mark-restart-user-units)
+ [ -d /run/systemd/system ] || exit 0
+
+ users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
+ for user in $users; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+ done
+ wait
+ ;;
+
system-reload-restart|system-reload|system-restart)
if [ -n "$*" ]; then
echo "Unexpected arguments for '$command': $*"
@@ -54,6 +74,33 @@ case "$command" in
fi
;;
+ user-reload-restart|user-reload|user-restart)
+ if [ -n "$*" ]; then
+ echo "Unexpected arguments for '$command': $*"
+ exit 2
+ fi
+
+ [ -d /run/systemd/system ] || exit 0
+
+ users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
+
+ if [[ "$command" =~ reload ]]; then
+ for user in $users; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" daemon-reload &
+ done
+ wait
+ fi
+
+ if [[ "$command" =~ restart ]]; then
+ for user in $users; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" reload-or-restart --marked &
+ done
+ wait
+ fi
+ ;;
+
*)
echo "Unknown verb '$command'"
exit 3
diff --git a/src/rpm/triggers.systemd.in b/src/rpm/triggers.systemd.in
index f56c80c7ca..4755cdafe8 100644
--- a/src/rpm/triggers.systemd.in
+++ b/src/rpm/triggers.systemd.in
@@ -20,6 +20,14 @@ elseif pid > 0 then
posix.wait(pid)
end
+%transfiletriggerin -P 900899 -p <lua> -- {{USER_DATA_UNIT_DIR}} /etc/systemd/user
+pid = posix.fork()
+if pid == 0 then
+ assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "user-reload-restart"))
+elseif pid > 0 then
+ posix.wait(pid)
+end
+
%transfiletriggerpostun -P 1000100 -p <lua> -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
-- On removal, we need to run daemon-reload after any units have been
-- removed.
@@ -33,8 +41,17 @@ elseif pid > 0 then
posix.wait(pid)
end
+%transfiletriggerpostun -P 1000100 -p <lua> -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
+-- Execute daemon-reload in user managers.
+pid = posix.fork()
+if pid == 0 then
+ assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "user-reload"))
+elseif pid > 0 then
+ posix.wait(pid)
+end
+
%transfiletriggerpostun -P 10000 -p <lua> -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
--- We restart remaining services that should be restarted here.
+-- We restart remaining system services that should be restarted here.
pid = posix.fork()
if pid == 0 then
assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "system-restart"))
@@ -42,6 +59,15 @@ elseif pid > 0 then
posix.wait(pid)
end
+%transfiletriggerpostun -P 9999 -p <lua> -- {{USER_DATA_UNIT_DIR}} /etc/systemd/user
+-- We restart remaining user services that should be restarted here.
+pid = posix.fork()
+if pid == 0 then
+ assert(posix.exec("{{SYSTEMD_UPDATE_HELPER_PATH}}", "user-restart"))
+elseif pid > 0 then
+ posix.wait(pid)
+end
+
%transfiletriggerin -P 100700 -p <lua> -- {{SYSUSERS_DIR}}
-- This script will process files installed in {{SYSUSERS_DIR}} to create
-- specified users automatically. The priority is set such that it
diff --git a/src/rpm/triggers.systemd.sh.in b/src/rpm/triggers.systemd.sh.in
index 3b35a4b5c6..8c301f5ed9 100644
--- a/src/rpm/triggers.systemd.sh.in
+++ b/src/rpm/triggers.systemd.sh.in
@@ -16,6 +16,9 @@
# so sometimes we will reload needlessly.
{{SYSTEMD_UPDATE_HELPER_PATH}} system-reload-restart || :
+%transfiletriggerin -P 900899 -- {{USER_DATA_UNIT_DIR}} /etc/systemd/user
+{{SYSTEMD_UPDATE_HELPER_PATH}} user-reload-restart || :
+
%transfiletriggerpostun -P 1000100 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
# On removal, we need to run daemon-reload after any units have been
# removed.
@@ -24,10 +27,18 @@
# executed.
{{SYSTEMD_UPDATE_HELPER_PATH}} system-reload || :
+%transfiletriggerpostun -P 1000099 -- {{USER_DATA_UNIT_DIR}} /etc/systemd/user
+# Execute daemon-reload in user managers.
+{{SYSTEMD_UPDATE_HELPER_PATH}} user-reload || :
+
%transfiletriggerpostun -P 10000 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system
-# We restart remaining services that should be restarted here.
+# We restart remaining system services that should be restarted here.
{{SYSTEMD_UPDATE_HELPER_PATH}} system-restart || :
+%transfiletriggerpostun -P 9999 -- {{USER_DATA_UNIT_DIR}} /etc/systemd/user
+# We restart remaining user services that should be restarted here.
+{{SYSTEMD_UPDATE_HELPER_PATH}} user-restart || :
+
%transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}}
# This script will process files installed in {{SYSUSERS_DIR}} to create
# specified users automatically. The priority is set such that it

View file

@ -0,0 +1,51 @@
From e57e599e6b11039ab6484e5622b3deae20bfd678 Mon Sep 17 00:00:00 2001
From: Hans de Goede <johannes.goede@oss.qualcomm.com>
Date: Mon, 12 Jan 2026 14:56:36 +0100
Subject: [PATCH] stub: Fix NULL pointer deref when there are no initrds
When n_all_initrds == 0, then all_initrds is unmodified from its initial
value of:
_cleanup_free_ struct iovec *all_initrds = NULL;
and in the else block of the "if (n_all_initrds > 1)" the NULL is
dereferenced:
final_initrd = all_initrds[0];
Leading to the stub crashing due to a NULL pointer deref.
Fix this by initializing final_initrd to all 0s and only
running the else block if (n_all_initrds == 1).
---
src/boot/stub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/boot/stub.c b/src/boot/stub.c
index 06ecbc7d18..65950262c6 100644
--- a/src/boot/stub.c
+++ b/src/boot/stub.c
@@ -1302,9 +1302,9 @@ static EFI_STATUS run(EFI_HANDLE image) {
/* Combine the initrds into one */
_cleanup_pages_ Pages initrd_pages = {};
- struct iovec final_initrd;
+ struct iovec final_initrd = {};
if (n_all_initrds > 1) {
- /* There will always be a base initrd, if this counter is higher, we need to combine them */
+ /* If there is more then 1 initrd we need to combine them */
err = combine_initrds(all_initrds, n_all_initrds, &initrd_pages, &final_initrd.iov_len);
if (err != EFI_SUCCESS)
return err;
@@ -1313,7 +1313,7 @@ static EFI_STATUS run(EFI_HANDLE image) {
/* Given these might be large let's free them explicitly before we pass control to Linux */
initrds_free(&initrds);
- } else
+ } else if (n_all_initrds == 1)
final_initrd = all_initrds[0];
struct iovec kernel = IOVEC_MAKE(
--
2.52.0

View file

@ -1,42 +0,0 @@
From 50336a7d0c584c1731c656e991a317029ed45f84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 23 Jul 2021 15:35:23 +0200
Subject: [PATCH 5/6] update-helper: also add "user-reexec" verb
This is not called from the systemd.triggers or systemd.macros files. Instead,
it would be called from the scriptlets in systemd rpm package itself, at the
place where we call systemctl daemon-reexec.
See https://github.com/systemd/systemd/pull/20289#issuecomment-885622200 .
---
src/rpm/systemd-update-helper.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index f3466ab3c0..0c6675a9db 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -74,7 +74,7 @@ case "$command" in
fi
;;
- user-reload-restart|user-reload|user-restart)
+ user-reload-restart|user-reload|user-restart|user-reexec)
if [ -n "$*" ]; then
echo "Unexpected arguments for '$command': $*"
exit 2
@@ -84,6 +84,14 @@ case "$command" in
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
+ if [[ "$command" =~ reexec ]]; then
+ for user in $users; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" daemon-reexec &
+ done
+ wait
+ fi
+
if [[ "$command" =~ reload ]]; then
for user in $users; do
SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \

View file

@ -1,30 +0,0 @@
From 107f3e397937eb6a45054e22bd79c142fae19cd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 4 Nov 2021 09:49:18 +0100
Subject: [PATCH 6/6] update-helper: add missing loop over user units
Noticed by Luca.
shellcheck doens't catch this, and somehow it was missed in review
and testing ;(
---
src/rpm/systemd-update-helper.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index 0c6675a9db..47d6663e07 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -51,8 +51,10 @@ case "$command" in
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
for user in $users; do
- SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
- systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+ for unit in "$@"; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+ done
done
wait
;;

3
10-map-count.conf Normal file
View file

@ -0,0 +1,3 @@
# Increase the number of virtual memory areas that one process may request
# https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
vm.max_map_count=1048576

View file

@ -0,0 +1,3 @@
[Slice]
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=80%

View file

@ -1,2 +0,0 @@
[Slice]
ManagedOOMSwap=kill

View file

@ -1,3 +0,0 @@
[Service]
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=50%

14
10-timeout-abort.conf Normal file
View file

@ -0,0 +1,14 @@
# This file is part of the systemd package.
# See https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer.
#
# To facilitate debugging when a service fails to stop cleanly,
# TimeoutStopFailureMode=abort is set to "crash" services that fail to stop in
# the time allotted. This will cause the service to be terminated with SIGABRT
# and a coredump to be generated.
#
# To undo this configuration change, create a mask file:
# sudo mkdir -p /etc/systemd/system/service.d
# sudo ln -sv /dev/null /etc/systemd/system/service.d/10-timeout-abort.conf
[Service]
TimeoutStopFailureMode=abort

View file

@ -1,51 +0,0 @@
#!/bin/bash
if [[ ! -x /sbin/new-kernel-pkg ]]; then
exit 0
fi
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
KERNEL_DIR="${KERNEL_IMAGE%/*}"
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
case "$COMMAND" in
add)
if [[ "${KERNEL_DIR}" != "/boot" ]]; then
for i in \
"$KERNEL_IMAGE" \
"$KERNEL_DIR"/System.map \
"$KERNEL_DIR"/config \
"$KERNEL_DIR"/zImage.stub \
"$KERNEL_DIR"/dtb \
; do
[[ -e "$i" ]] || continue
cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
command -v restorecon &>/dev/null && \
restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}"
done
# hmac is .vmlinuz-<version>.hmac so needs a special treatment
i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
if [[ -e "$i" ]]; then
cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
command -v restorecon &>/dev/null && \
restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
fi
fi
/sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
/sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
/sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
;;
remove)
/sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
;;
*)
;;
esac
# skip other installation plugins, if we can't find a boot loader spec conforming setup
if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
exit 77
fi

30
26494.patch Normal file
View file

@ -0,0 +1,30 @@
From 6b25470ee28843a49c50442e9d8a98edc842ceca Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Mon, 20 Feb 2023 12:00:30 +0900
Subject: [PATCH] core/manager: run generators directly when we are in initrd
Some initrd system write files at ourside of /run, /etc, or other
allowed places. This is a kind of workaround, but in most cases, such
sandboxing is not necessary as the filesystem is on ramfs when we are in
initrd.
Fixes #26488.
---
src/core/manager.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 7b394794b0d4..306477c6e6c2 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -3822,8 +3822,8 @@ static int manager_run_generators(Manager *m) {
/* If we are the system manager, we fork and invoke the generators in a sanitized mount namespace. If
* we are the user manager, let's just execute the generators directly. We might not have the
* necessary privileges, and the system manager has already mounted /tmp/ and everything else for us.
- */
- if (MANAGER_IS_USER(m)) {
+ * If we are in initrd, let's also execute the generators directly, as we are in ramfs. */
+ if (MANAGER_IS_USER(m) || in_initrd()) {
r = manager_execute_generators(m, paths, /* remount_ro= */ false);
goto finish;
}

56
30846.patch Normal file
View file

@ -0,0 +1,56 @@
From 07bedc8f93277f705622625f440a1f56ccff1cd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 9 Jan 2024 11:28:04 +0100
Subject: [PATCH] journal: again create user journals for users with high uids
This effectively reverts a change in 115d5145a257c1a27330acf9f063b5f4d910ca4d
'journald: move uid_for_system_journal() to uid-alloc-range.h', which slipped
in an additional check of uid_is_container(uid). The problem is that that change
is not backwards-compatible at all and very hard for users to handle.
There is no common agreement on mappings of high-range uids. Systemd declares
ownership of a large range for container uids in https://systemd.io/UIDS-GIDS/,
but this is only a recent change and various sites allocated those ranges
in a different way, in particular FreeIPA uses (used?) uids from this range
for human users. On big sites with lots of users changing uids is obviously a
hard problem. We generally assume that uids cannot be "freed" and/or changed
and/or reused safely, so we shouldn't demand the same from others.
This is somewhat similar to the situation with SYSTEM_ALLOC_UID_MIN /
SYSTEM_UID_MAX, which we tried to define to a fixed value in our code, causing
huge problems for existing systems with were created with a different
definition and couldn't be easily updated. For that case, we added a
configuration time switch and we now parse /etc/login.defs to actually use the
value that is appropriate for the local system.
Unfortunately, login.defs doesn't have a concept of container allocation ranges
(and we don't have code to parse and use those nonexistent names either), so we
can't tell users to adjust logind.defs to work around the changed definition.
login.defs has SUB_UID_{MIN,MAX}, but those aren't really the same thing,
because they are used to define where the add allocations for subuids, which is
generally a much smaller range. Maybe we should talk with other folks about
the appropriate allocation ranges and define some new settings in login.defs.
But this would require discussion and coordination with other projects first.
Actualy, it seems that this change was needed at all. The code in the container
does not log to the outside journal. It talks to its own journald, which does
journal splitting using its internal logic based on shifted uids. So let's
revert the change to fix user systems.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2251843.
---
src/basic/uid-classification.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/basic/uid-classification.c b/src/basic/uid-classification.c
index 203ce2c68a..2eb384395d 100644
--- a/src/basic/uid-classification.c
+++ b/src/basic/uid-classification.c
@@ -129,5 +129,6 @@ bool uid_for_system_journal(uid_t uid) {
/* Returns true if the specified UID shall get its data stored in the system journal. */
- return uid_is_system(uid) || uid_is_dynamic(uid) || uid_is_greeter(uid) || uid == UID_NOBODY || uid_is_container(uid) || uid_is_foreign(uid);
+ return uid_is_system(uid) || uid_is_dynamic(uid) || uid_is_greeter(uid) || uid == UID_NOBODY || uid_is_foreign(uid);
+
}

42
38769.patch Normal file
View file

@ -0,0 +1,42 @@
From 00d70f36a0866660693347009446b7f872a05bf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Sat, 30 Aug 2025 13:55:56 +0200
Subject: [PATCH] core: create userdb root directory with correct label
Set up the /run/systemd/userdb directory with the default SELinux context
on creation.
With version 257.7-1 on Debian the directory was automatically created with the
correct label. Starting with version 258 (only tested with 258~rc3-1) it no
longer is. Regression introduced in 736349958efe34089131ca88950e2e5bb391d36a.
[zjs: edited the patch to apply comments from review and update the description.]
---
src/core/varlink.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/core/varlink.c b/src/core/varlink.c
index 99f12c59e5..71a8ffd0e5 100644
--- a/src/core/varlink.c
+++ b/src/core/varlink.c
@@ -5,6 +5,7 @@
#include "constants.h"
#include "errno-util.h"
#include "manager.h"
+#include "mkdir-label.h"
#include "path-util.h"
#include "pidref.h"
#include "string-util.h"
@@ -441,7 +442,11 @@ static int manager_varlink_init_system(Manager *m) {
if (!fresh && varlink_server_contains_socket(m->varlink_server, address))
continue;
- r = sd_varlink_server_listen_address(m->varlink_server, address, 0666 | SD_VARLINK_SERVER_MODE_MKDIR_0755);
+ r = mkdir_parents_label(address, 0755);
+ if (r < 0)
+ log_warning_errno(r, "Failed to create parent directory of '%s', ignoring: %m", address);
+
+ r = sd_varlink_server_listen_address(m->varlink_server, address, 0666);
if (r < 0)
return log_error_errno(r, "Failed to bind to varlink socket '%s': %m", address);
}

5
60-block-scheduler.rules Normal file
View file

@ -0,0 +1,5 @@
# do not edit this file, it will be overwritten on update
ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \
KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
ATTR{queue/scheduler}="bfq"

20
98-default-mac-none.link Normal file
View file

@ -0,0 +1,20 @@
# SPDX-License-Identifier: MIT-0
#
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
# To make local modifications, one of the following methods may be used:
# 1. add a drop-in file that extends this file by creating the
# /etc/systemd/network/98-default-mac-none.link.d/ directory and creating a
# new .conf file there.
# 2. copy this file into /etc/systemd/network or one of the other paths checked
# by systemd-udevd and edit it there.
# This file should not be edited in place, because it'll be overwritten on upgrades.
[Match]
Kind=bridge bond team
[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=none

View file

@ -1,14 +0,0 @@
== Building systemd rpms for local development using rpmbuild --build-in-place ==
This approach is based on https://github.com/filbranden/git-rpmbuild
and filbranden's talk during ASG2019 [https://www.youtube.com/watch?v=fVM1kJrymRM].
```
git clone https://github.com/systemd/systemd
fedpkg clone systemd fedora-systemd
cd systemd
rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with inplace ../systemd.spec
sudo dnf upgrade --setopt install_weak_deps=False rpms/*/*.rpm
```
`--without lto` and `--without tests` may be useful to speed up the build.

14
README.build-in-place.md Normal file
View file

@ -0,0 +1,14 @@
# Building systemd rpms for local development using rpmbuild --build-in-place
This approach is based on filbranden's [git-rpmbuild](https://github.com/filbranden/git-rpmbuild)
and his [talk during ASG2019](https://www.youtube.com/watch?v=fVM1kJrymRM).
```
git clone https://github.com/systemd/systemd
fedpkg clone systemd fedora-systemd
cd systemd
rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with upstream ../fedora-systemd/systemd.spec
sudo dnf upgrade --setopt install_weak_deps=False rpms/*/*.rpm
```
`--without lto` and `--without tests` may be useful to speed up the build.

3221
changelog Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,129 +0,0 @@
From f58b96d3e8d1cb0dd3666bc74fa673918b586612 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 14 Sep 2020 17:58:03 +0200
Subject: [PATCH] test-mountpointutil-util: do not assert in test_mnt_id()
https://bugzilla.redhat.com/show_bug.cgi?id=1803070
I *think* this a kernel bug: the mnt_id as listed in /proc/self/mountinfo is different
than the one we get from /proc/self/fdinfo/. This only matters when both statx and
name_to_handle_at are unavailable and we hit the fallback path that goes through fdinfo:
(gdb) !uname -r
5.6.19-200.fc31.ppc64le
(gdb) !cat /proc/self/mountinfo
697 664 253:0 /var/lib/mock/fedora-31-ppc64le/root / rw,relatime shared:298 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
698 697 253:0 /var/cache/mock/fedora-31-ppc64le/yum_cache /var/cache/yum rw,relatime shared:299 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
699 697 253:0 /var/cache/mock/fedora-31-ppc64le/dnf_cache /var/cache/dnf rw,relatime shared:300 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
700 697 0:32 /mock-selinux-plugin.7me9bfpi /proc/filesystems rw,nosuid,nodev shared:301 master:18 - tmpfs tmpfs rw,seclabel <==========================================================
701 697 0:41 / /sys ro,nosuid,nodev,noexec,relatime shared:302 - sysfs sysfs ro,seclabel
702 701 0:21 / /sys/fs/selinux ro,nosuid,nodev,noexec,relatime shared:306 master:8 - selinuxfs selinuxfs rw
703 697 0:42 / /dev rw,nosuid shared:303 - tmpfs tmpfs rw,seclabel,mode=755
704 703 0:43 / /dev/shm rw,nosuid,nodev shared:304 - tmpfs tmpfs rw,seclabel
705 703 0:45 / /dev/pts rw,nosuid,noexec,relatime shared:307 - devpts devpts rw,seclabel,gid=5,mode=620,ptmxmode=666
706 703 0:6 /btrfs-control /dev/btrfs-control rw,nosuid shared:308 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
707 703 0:6 /loop-control /dev/loop-control rw,nosuid shared:309 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
708 703 0:6 /loop0 /dev/loop0 rw,nosuid shared:310 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
709 703 0:6 /loop1 /dev/loop1 rw,nosuid shared:311 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
710 703 0:6 /loop10 /dev/loop10 rw,nosuid shared:312 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
711 703 0:6 /loop11 /dev/loop11 rw,nosuid shared:313 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
712 703 0:6 /loop2 /dev/loop2 rw,nosuid shared:314 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
713 703 0:6 /loop3 /dev/loop3 rw,nosuid shared:315 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
714 703 0:6 /loop4 /dev/loop4 rw,nosuid shared:316 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
715 703 0:6 /loop5 /dev/loop5 rw,nosuid shared:317 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
716 703 0:6 /loop6 /dev/loop6 rw,nosuid shared:318 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
717 703 0:6 /loop7 /dev/loop7 rw,nosuid shared:319 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
718 703 0:6 /loop8 /dev/loop8 rw,nosuid shared:320 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
719 703 0:6 /loop9 /dev/loop9 rw,nosuid shared:321 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
720 697 0:44 / /run rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
721 720 0:25 /systemd/nspawn/propagate/9cc8a155d0244558b273f773d2b92142 /run/systemd/nspawn/incoming ro master:12 - tmpfs tmpfs rw,seclabel,mode=755
722 697 0:32 /mock-resolv.dvml91hp /etc/resolv.conf rw,nosuid,nodev shared:322 master:18 - tmpfs tmpfs rw,seclabel
725 697 0:47 / /proc rw,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
603 725 0:47 /sys /proc/sys ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
604 725 0:44 /systemd/inaccessible/reg /proc/kallsyms ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
605 725 0:44 /systemd/inaccessible/reg /proc/kcore ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
606 725 0:44 /systemd/inaccessible/reg /proc/keys ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
607 725 0:44 /systemd/inaccessible/reg /proc/sysrq-trigger ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
608 725 0:44 /systemd/inaccessible/reg /proc/timer_list ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
609 725 0:47 /bus /proc/bus ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
610 725 0:47 /fs /proc/fs ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
611 725 0:47 /irq /proc/irq ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
612 725 0:47 /scsi /proc/scsi ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
613 703 0:46 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:324 - mqueue mqueue rw,seclabel
614 701 0:26 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:325 - cgroup2 cgroup rw,seclabel,nsdelegate
615 603 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
616 725 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
617 725 0:44 /.#proc-kmsg5b7a8bcfe6717139//deleted /proc/kmsg rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
The test process does
name_to_handle_at("/proc/filesystems") which returns -EOPNOTSUPP, and then
openat(AT_FDCWD, "/proc/filesystems") which returns 4, and then
read(open("/proc/self/fdinfo/4", ...)) which gives
"pos:\t0\nflags:\t012100000\nmnt_id:\t725\n"
and the "725" is clearly inconsistent with "700" in /proc/self/mountinfo.
We could either drop the fallback path (and fail name_to_handle_at() is not
avaliable) or ignore the error in the test. Not sure what is better. I think
this issue only occurs sometimes and with older kernels, so probably continuing
with the current flaky implementation is better than ripping out the fallback.
Another strace:
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/sys is 603", iov_len=27}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/sys is 603
) = 28
name_to_handle_at(AT_FDCWD, "/", {handle_bytes=128 => 12, handle_type=129, f_handle=0x52748401000000008b93e20d}, [697], 0) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of / is 697", iov_len=19}, {iov_base="\n", iov_len=1}], 2mnt ids of / is 697
) = 20
name_to_handle_at(AT_FDCWD, "/proc/kcore", {handle_bytes=128 => 12, handle_type=1, f_handle=0x92ddcfcd2e802d0100000000}, [605], 0) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/kcore is 605", iov_len=29}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/kcore is 605
) = 30
name_to_handle_at(AT_FDCWD, "/dev", {handle_bytes=128 => 12, handle_type=1, f_handle=0x8ae269160c802d0100000000}, [703], 0) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of /dev is 703", iov_len=22}, {iov_base="\n", iov_len=1}], 2mnt ids of /dev is 703
) = 23
name_to_handle_at(AT_FDCWD, "/proc/filesystems", {handle_bytes=128}, 0x7fffe36ddb84, 0) = -1 EOPNOTSUPP (Operation not supported)
openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 4</proc/filesystems>
openat(AT_FDCWD, "/proc/self/fdinfo/4", O_RDONLY|O_CLOEXEC) = 5</proc/20/fdinfo/4>
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
read(5</proc/20/fdinfo/4>, "pos:\t0\nflags:\t012100000\nmnt_id:\t725\n", 2048) = 36
read(5</proc/20/fdinfo/4>, "", 1024) = 0
close(5</proc/20/fdinfo/4>) = 0
close(4</proc/filesystems>) = 0
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/filesystems are 700, 725", iov_len=41}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/filesystems are 700, 725
) = 42
writev(2</dev/pts/0>, [{iov_base="the other path for mnt id 725 is /proc", iov_len=38}, {iov_base="\n", iov_len=1}], 2the other path for mnt id 725 is /proc
) = 39
writev(2</dev/pts/0>, [{iov_base="Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.", iov_len=108}, {iov_base="\n", iov_len=1}], 2Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.
) = 109
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 20
gettid() = 20
tgkill(20, 20, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=20, si_uid=0} ---
+++ killed by SIGABRT (core dumped) +++
---
src/test/test-mountpoint-util.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c
index 30b00ae4d8b..ffe5144b04a 100644
--- a/src/test/test-mountpoint-util.c
+++ b/src/test/test-mountpoint-util.c
@@ -89,8 +89,12 @@ static void test_mnt_id(void) {
/* The ids don't match? If so, then there are two mounts on the same path, let's check if
* that's really the case */
char *t = hashmap_get(h, INT_TO_PTR(mnt_id2));
- log_debug("the other path for mnt id %i is %s\n", mnt_id2, t);
- assert_se(path_equal(p, t));
+ log_debug("Path for mnt id %i from /proc/self/mountinfo is %s\n", mnt_id2, t);
+
+ if (!path_equal(p, t))
+ /* Apparent kernel bug in /proc/self/fdinfo */
+ log_warning("Bad mount id given for %s: %d, should be %d",
+ p, mnt_id2, mnt_id);
}
}

3
libabigail.abignore Normal file
View file

@ -0,0 +1,3 @@
[suppress_file]
# Those shared objects are private to systemd
file_name_regexp=libsystemd-(shared|core)-.*.so

View file

@ -1,3 +0,0 @@
[suppress_file]
# This shared object is private to systemd
file_name_regexp=libsystemd-shared-.*.so

View file

@ -2,9 +2,9 @@
#
# Turn a sysusers.d file into macros specified by
# https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation
#
# After https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers,
# those macros are not needed anymore.
%sysusers_requires_compat Requires(pre): shadow-utils
%sysusers_create_compat() \
%(%{_rpmconfigdir}/sysusers.generate-pre.sh %{?*}) \
%{nil}
%sysusers_requires_compat %nil
%sysusers_create_compat() %nil

10
macros.sysusers.compat Normal file
View file

@ -0,0 +1,10 @@
# RPM macros for packages creating system accounts
#
# Turn a sysusers.d file into macros specified by
# https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation
%sysusers_requires_compat Requires(pre): shadow-utils
%sysusers_create_compat() \
%(%{_rpmconfigdir}/sysusers.generate-pre.sh %{?*}) \
%{nil}

127
plans/run-integration-tests.sh Executable file
View file

@ -0,0 +1,127 @@
#!/bin/bash
set -eux
set -o pipefail
# Switch SELinux to permissive if possible, since the tests don't set proper contexts
setenforce 0 || true
echo "CPU and Memory information:"
lscpu
lsmem
echo "Clock source: $(cat /sys/devices/system/clocksource/clocksource0/current_clocksource)"
# Bump inotify limits if we can so nspawn containers don't run out of inotify file descriptors.
sysctl fs.inotify.max_user_watches=65536 || true
sysctl fs.inotify.max_user_instances=1024 || true
if [[ -n "${KOJI_TASK_ID:-}" ]]; then
koji download-task --noprogress --arch="noarch,$(rpm --eval '%{_arch}')" "$KOJI_TASK_ID"
elif [[ -n "${CBS_TASK_ID:-}" ]]; then
cbs download-task --noprogress --arch="noarch,$(rpm --eval '%{_arch}')" "$CBS_TASK_ID"
elif [[ -n "${PACKIT_SRPM_URL:-}" ]]; then
COPR_BUILD_ID="$(basename "$(dirname "$PACKIT_SRPM_URL")")"
COPR_CHROOT="$(basename "$(dirname "$(dirname "$PACKIT_BUILD_LOG_URL")")")"
copr download-build --rpms --chroot "$COPR_CHROOT" "$COPR_BUILD_ID"
mv "$COPR_CHROOT"/* .
else
echo "Not running within packit and no CBS/koji task ID provided"
exit 1
fi
PACKAGEDIR="$PWD"
# This will match both the regular and the debuginfo rpm so make sure we select only the
# non-debuginfo rpm.
RPMS=(systemd-tests-*.rpm)
rpm2cpio "${RPMS[0]}" | cpio --make-directories --extract
pushd usr/lib/systemd/tests
mkosi_hash="$(grep "MinimumVersion=commit:" mkosi/mkosi.conf | sed "s|MinimumVersion=commit:||g")"
# Now prepare mkosi at the same version required by the systemd repo.
git clone https://github.com/systemd/mkosi /var/tmp/systemd-integration-tests-mkosi
git -C /var/tmp/systemd-integration-tests-mkosi checkout "$mkosi_hash"
export PATH="/var/tmp/systemd-integration-tests-mkosi/bin:$PATH"
# shellcheck source=/dev/null
. /etc/os-release || . /usr/lib/os-release
tee mkosi/mkosi.local.conf <<EOF
[Distribution]
Distribution=${MKOSI_DISTRIBUTION:-$ID}
Release=${MKOSI_RELEASE:-${VERSION_ID:-rawhide}}
[Content]
PackageDirectories=$PACKAGEDIR
SELinuxRelabel=yes
[Build]
ToolsTreeDistribution=${MKOSI_DISTRIBUTION:-$ID}
ToolsTreeRelease=${MKOSI_RELEASE:-${VERSION_ID:-rawhide}}
ToolsTreePackageDirectories=$PACKAGEDIR
Environment=NO_BUILD=1
WithTests=yes
EOF
if [[ -n "${MKOSI_REPOSITORIES:-}" ]]; then
tee --append mkosi/mkosi.local.conf <<EOF
[Distribution]
Repositories=$MKOSI_REPOSITORIES
[Build]
ToolsTreeRepositories=$MKOSI_REPOSITORIES
EOF
fi
if [[ -n "${TEST_SELINUX_CHECK_AVCS:-}" ]]; then
tee --append mkosi/mkosi.local.conf <<EOF
[Runtime]
KernelCommandLineExtra=systemd.setenv=TEST_SELINUX_CHECK_AVCS=$TEST_SELINUX_CHECK_AVCS
EOF
fi
# If we don't have KVM, skip running in qemu, as it's too slow. But try to load the module first.
modprobe kvm || true
if [[ ! -e /dev/kvm ]]; then
export TEST_NO_QEMU=1
fi
NPROC="$(nproc)"
if [[ "$NPROC" -ge 10 ]]; then
export TEST_JOURNAL_USE_TMP=1
NPROC="$((NPROC / 3))"
else
NPROC="$((NPROC - 1))"
fi
# This test is only really useful if we're building with sanitizers and takes a long time, so let's skip it
# for now.
export TEST_SKIP="TEST-21-DFUZZER ${TEST_SKIP:-}"
mkosi genkey
mkosi summary
mkosi -f box -- true
mkosi box -- meson setup build integration-tests/standalone
mkosi -f
if [[ "$(mkosi box -- meson test --help)" == *"--max-lines"* ]]; then
MAX_LINES=(--max-lines 300)
else
MAX_LINES=()
fi
mkosi box -- \
meson test \
-C build \
--setup=integration \
--print-errorlogs \
--no-stdsplit \
--num-processes "$NPROC" \
"${MAX_LINES[@]}" && EC=0 || EC=$?
[[ -d build/meson-logs ]] && find build/meson-logs -type f -exec mv {} "$TMT_TEST_DATA" \;
[[ -d build/test/journal ]] && find build/test/journal -type f -exec mv {} "$TMT_TEST_DATA" \;
popd
exit "$EC"

22
plans/upstream.fmf Normal file
View file

@ -0,0 +1,22 @@
summary: systemd upstream test suite
provision:
hardware:
virtualization:
is-supported: true
prepare:
- name: install-dependencies
how: install
package:
- coreutils
- distribution-gpg-keys
- dnf
- git-core
- koji
- centos-packager
- copr-cli
exclude:
- systemd-standalone-.*
execute:
how: tmt
script: exec plans/run-integration-tests.sh
duration: 2h

View file

@ -1,101 +0,0 @@
#!/bin/bash -eu
if [ $UID -ne 0 ]; then
echo "WARNING: This script needs to run as root to be effective"
exit 1
fi
export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
if [ "${1:-}" = "--ignore-journal" ]; then
shift
ignore_journal=1
else
ignore_journal=0
fi
echo "Checking processes..."
if ps h -u 99 | grep .; then
echo "ERROR: ps reports processes with UID 99!"
exit 2
fi
echo "... not found"
echo "Checking UTMP..."
if w -h 199 | grep . ; then
echo "ERROR: w reports UID 99 as active!"
exit 2
fi
if w -h nobody | grep . ; then
echo "ERROR: w reports user nobody as active!"
exit 2
fi
echo "... not found"
echo "Checking the journal..."
if [ "$ignore_journal" = 0 ] && journalctl -q -b -n10 _UID=99 | grep . ; then
echo "ERROR: journalctl reports messages from UID 99 in current boot!"
exit 2
fi
echo "... not found"
echo "Looking for files in /etc, /run, /tmp, and /var..."
if find /etc /run /tmp /var -uid 99 -print | grep -m 10 . ; then
echo "ERROR: found files belonging to UID 99"
exit 2
fi
echo "... not found"
echo "Checking if nobody is defined correctly..."
if getent passwd nobody |
grep '^nobody:[x*]:65534:65534:.*:/:/sbin/nologin';
then
echo "OK, nothing to do."
exit 0
else
echo "NOTICE: User nobody is not defined correctly"
fi
echo "Checking if nfsnobody or something else is using the uid..."
if getent passwd 65534 | grep . ; then
echo "NOTICE: will have to remove this user"
else
echo "... not found"
fi
if [ "${1:-}" = "-x" ]; then
if getent passwd nobody >/dev/null; then
# this will remove both the user and the group.
( set -x
userdel nobody
)
fi
if getent passwd 65534 >/dev/null; then
# Make sure the uid is unused. This should free gid too.
name="$(getent passwd 65534 | cut -d: -f1)"
( set -x
userdel "$name"
)
fi
if grep -qE '^(passwd|group):.*\bsss\b' /etc/nsswitch.conf; then
echo "Sleeping, so sss can catch up"
sleep 3
fi
if getent group 65534; then
# Make sure the gid is unused, even if uid wasn't.
name="$(getent group 65534 | cut -d: -f1)"
( set -x
groupdel "$name"
)
fi
# systemd-sysusers uses the same gid and uid
( set -x
systemd-sysusers --inline 'u nobody 65534 "Kernel Overflow User" / /sbin/nologin'
)
else
echo "Pass '-x' to perform changes"
fi

View file

@ -1,13 +1,24 @@
# Disable badfuncs check that has tons of false positives.
badfuncs:
exclude_path: .*
allowed:
/usr/lib/systemd/tests/unit-tests/*:
- inet_addr
- inet_aton
/usr/bin/networkctl:
- inet_addr
- inet_aton
# don't report changed content of compiled files
# that is expected with every update
changedfiles:
exclude_path: .*
# completely disabled inspections:
# completely disable inspections:
inspections:
# we know about our patches, no need to report anything
patches: off
# this inspection uses `udevadm` which comes from this package
# disable so we do not check udev rules with a possibly outdated version
# of the command
udevrules: off

View file

@ -1 +1 @@
SHA512 (systemd-249.13.tar.gz) = eca374a66cc6a3439e83495e11d96f885c68508f340332cd750558f9fde3e6f31775e98caf085be53c7ef1ac8cf01ba7f84641112e5c978c4670e053cca305b0
SHA512 (systemd-259.tar.gz) = ef46b13661df43e3cfbeee1bc22f0b1eb902e8ebe39c19868c465efd08b35a199c2a2cd9d8021a6bc4d692fa0c6e0eab3f13eecd6ce24dde81d3945464a25b50

View file

@ -1,8 +1,47 @@
import re, sys, os, collections
buildroot = sys.argv[1]
known_files = sys.stdin.read().splitlines()
known_files = {line.split()[-1]:line for line in known_files}
no_bootloader = '--no-bootloader' in sys.argv
known_files = '''
%ghost %config(noreplace) /etc/crypttab
%ghost %attr(0444,root,root) /etc/udev/hwdb.bin
/etc/inittab
# This directory is owned by openssh-server, but we don't want to introduce
# a dependency. So let's copy the config and co-own the directory.
%dir %attr(0700,root,root) /etc/ssh/sshd_config.d
%ghost %config(noreplace) /etc/vconsole.conf
%ghost %config(noreplace) /etc/X11/xorg.conf.d/00-keyboard.conf
%ghost %attr(0664,root,root) %verify(not group) /run/utmp
%ghost %attr(0664,root,root) %verify(not group) /var/log/wtmp
%ghost %attr(0660,root,root) %verify(not group) /var/log/btmp
%ghost %attr(0664,root,root) %verify(not md5 size mtime group) /var/log/lastlog
%ghost %config(noreplace) /etc/hostname
%ghost %config(noreplace) /etc/localtime
%ghost %config(noreplace) /etc/locale.conf
%ghost %attr(0444,root,root) %config(noreplace) /etc/machine-id
%ghost %config(noreplace) /etc/machine-info
%ghost %attr(0700,root,root) %dir /var/cache/private
%ghost %attr(0700,root,root) %dir /var/lib/private
%ghost %dir /var/lib/private/systemd
%ghost %dir /var/lib/private/systemd/journal-upload
%ghost /var/lib/private/systemd/journal-upload/state
%ghost %dir /var/lib/systemd/timesync
%ghost /var/lib/systemd/timesync/clock
%ghost %dir /var/lib/systemd/backlight
%ghost /var/lib/systemd/catalog/database
%ghost %dir /var/lib/systemd/coredump
%ghost /var/lib/systemd/journal-upload
%ghost %dir /var/lib/systemd/linger
%ghost %attr(0600,root,root) /var/lib/systemd/random-seed
%ghost %dir /var/lib/systemd/rfkill
%ghost %dir %verify(not mode group) /var/log/journal
%ghost %dir /var/log/journal/remote
%ghost %attr(0700,root,root) %dir /var/log/private
'''
known_files = {line.split()[-1]:line for line in known_files.splitlines()
if line and not line.startswith('#')}
def files(root):
os.chdir(root)
@ -15,20 +54,31 @@ def files(root):
if file.is_dir() and not file.is_symlink():
todo.append(file)
o_libs = open('.file-list-libs', 'w')
o_udev = open('.file-list-udev', 'w')
o_pam = open('.file-list-pam', 'w')
o_rpm_macros = open('.file-list-rpm-macros', 'w')
o_devel = open('.file-list-devel', 'w')
o_container = open('.file-list-container', 'w')
o_networkd = open('.file-list-networkd', 'w')
o_oomd_defaults = open('.file-list-oomd-defaults', 'w')
o_remote = open('.file-list-remote', 'w')
o_resolve = open('.file-list-resolve', 'w')
o_tests = open('.file-list-tests', 'w')
o_standalone_tmpfiles = open('.file-list-standalone-tmpfiles', 'w')
o_standalone_sysusers = open('.file-list-standalone-sysusers', 'w')
o_rest = open('.file-list-rest', 'w')
outputs = {suffix: open(f'.file-list-{suffix}', 'w')
for suffix in (
'shared',
'libs',
'udev',
'ukify',
'boot',
'pam',
'rpm-macros',
'sysusers',
'devel',
'container',
'networkd',
'networkd-defaults',
'oomd-defaults',
'remote',
'resolve',
'tests',
'standalone-repart',
'standalone-tmpfiles',
'standalone-sysusers',
'standalone-shutdown',
'main',
)}
for file in files(buildroot):
n = file.path[1:]
if re.match(r'''/usr/(share|include)$|
@ -52,47 +102,112 @@ for file in files(buildroot):
/var(/cache|/log|/lib|/run|)$
''', n, re.X):
continue
if '/security/pam_' in n or '/man8/pam_' in n:
o = o_pam
if n.endswith('.standalone'):
if 'repart' in n:
o = outputs['standalone-repart']
elif 'tmpfiles' in n:
o = outputs['standalone-tmpfiles']
elif 'sysusers' in n:
o = outputs['standalone-sysusers']
elif 'shutdown' in n:
o = outputs['standalone-shutdown']
else:
assert False, 'Found .standalone not belonging to known packages'
elif '/security/pam_' in n or '/man8/pam_' in n:
o = outputs['pam']
elif '/rpm/' in n:
o = o_rpm_macros
o = outputs['rpm-macros']
elif '/usr/lib/systemd/tests' in n:
o = o_tests
elif re.search(r'/lib.*\.pc|/man3/|/usr/include|(?<!/libsystemd-shared-...).so$', n):
o = o_devel
o = outputs['tests']
elif 'ukify' in n and '/man/' not in n:
o = outputs['ukify']
elif re.search(r'/libsystemd-core-.*\.so$', n):
o = outputs['main']
elif re.search(r'/libsystemd-shared-.*\.so$', n):
o = outputs['shared']
elif re.search(r'/libcryptsetup-token-systemd-.*\.so$', n):
o = outputs['udev']
elif re.search(r'/lib.*\.pc$|/man3/|/usr/include|\.so$', n):
o = outputs['devel']
elif re.search(r'''journal-(remote|gateway|upload)|
systemd-remote\.conf|
/usr/share/systemd/gatewayd|
/var/log/journal/remote
''', n, re.X):
o = o_remote
o = outputs['remote']
# Just the binary, the dir, and the man page.
elif re.search(r'''systemd-sysusers$|
sysusers\.d$|
man/.*sysusers\.d\.5|
man/.*systemd-sysusers\.8
''', n, re.X):
o = outputs['sysusers']
elif re.search(r'''mymachines|
machinectl|
mount.ddi|
importctl|
portablectl|
systemd-nspawn|
import-pubring.gpg|
systemd-(machined|import|pull)|
systemd\.nspawn|
systemd-vmspawn|
systemd-dissect|
import-pubring|
systemd-machined|
systemd-import|
systemd-export|
systemd-pull|
systemd-mountfsd|
systemd-mountwork|
systemd-nsresource|
/machine.slice|
/machines.target|
var-lib-machines.mount|
org.freedesktop.(import|machine)1
''', n, re.X):
o = o_container
elif re.search(r'''/usr/lib/systemd/network/80-|
o = outputs['container']
# .network.example files go into systemd-networkd, and the matching files
# without .example go into systemd-networkd-defaults
elif (re.search(r'''/usr/lib/systemd/network/.*\.network$''', n)
and os.path.exists(f'./{n}.example')):
o = outputs['networkd-defaults']
# Files that are "consumed" by systemd-networkd go into the -networkd
# subpackage. As a special case, network-generator is co-owned also by
# the -udev subpackage because systemd-udevd reads .link files.
elif re.search(r'''/usr/lib/systemd/network/.*\.network|
networkd|
networkctl|
org.freedesktop.network1
org.freedesktop.network1|
sysusers\.d/systemd-network.conf|
tmpfiles\.d/systemd-network.conf|
systemd\.network|
systemd\.netdev
''', n, re.X):
o = o_networkd
o = outputs['networkd']
elif 'network-generator' in n:
o = (outputs['networkd'], outputs['udev'])
elif '.so.' in n:
o = o_libs
o = outputs['libs']
elif re.search(r'10-oomd-.*defaults.conf|lib/systemd/oomd.conf.d', n, re.X):
o = outputs['oomd-defaults']
elif re.search(r'''udev(?!\.pc)|
hwdb|
ac-power|
bootctl|
sd-boot|systemd-boot\.|loader.conf|
boot-update|
bless-boot|
boot-system-token|
bsod|
kernel-install|
installkernel|
vconsole|
backlight|
rfkill|
@ -100,12 +215,14 @@ for file in files(buildroot):
modules-load|
timesync|
crypttab|
cryptenroll|
cryptsetup|
kmod|
quota|
pstore|
sleep|suspend|hibernate|
systemd-tmpfiles-setup-dev|
network/98-default-mac-none.link|
network/99-default.link|
growfs|makefs|makeswap|mkswap|
fsck|
@ -116,8 +233,11 @@ for file in files(buildroot):
integritysetup|
integritytab|
remount-fs|
/initrd|
systemd[.-]pcr|
/pcrlock\.d|
systemd-measure|
/boot$|
/boot/efi|
/kernel/|
/kernel$|
/modprobe.d|
@ -125,46 +245,54 @@ for file in files(buildroot):
sysctl|
coredump|
homed|home1|
sysupdate|updatctl|
oomd|
portabled|portable1
''', n, re.X): # coredumpctl, homectl, portablectl are included in the main package because
# they can be used to interact with remote daemons. Also, the user could be
# confused if those user-facing binaries are not available.
o = o_udev
o = outputs['udev']
elif re.search(r'''/boot/efi|
/usr/lib/systemd/boot|
sd-boot|systemd-boot\.|loader.conf
''', n, re.X):
o = outputs['boot']
elif re.search(r'''resolved|resolve1|
systemd-resolve|
resolvconf|
systemd\.(positive|negative)
''', n, re.X): # resolvectl and nss-resolve are in the main package.
o = o_resolve
elif re.search(r'10-oomd-.*defaults.conf|lib/systemd/oomd.conf.d', n, re.X):
o = o_oomd_defaults
elif n.endswith('.standalone'):
if 'tmpfiles' in n:
o = o_standalone_tmpfiles
elif 'sysusers' in n:
o = o_standalone_sysusers
else:
assert False, 'Found .standalone not belonging to known packages'
o = outputs['resolve']
else:
o = o_rest
o = outputs['main']
if n in known_files:
prefix = ' '.join(known_files[n].split()[:-1])
if prefix:
prefix += ' '
elif file.is_dir() and not file.is_symlink():
prefix = '%dir '
prefix = known_files[n].split()[:-1]
elif file.is_dir(follow_symlinks=False):
prefix = ['%dir']
elif 'README' in n:
prefix = '%doc '
prefix = ['%doc']
elif n.startswith('/etc'):
prefix = '%config(noreplace) '
prefix = ['%config(noreplace)']
if not file.is_symlink() and file.stat().st_size == 0:
prefix += ['%ghost']
else:
prefix = ''
prefix = []
prefix = ' '.join(prefix + ['']) if prefix else ''
suffix = '*' if '/man/' in n else ''
print(f'{prefix}{n}{suffix}', file=o)
if not isinstance(o, tuple):
o = (o,)
for file in o:
print(f'{prefix}{n}{suffix}', file=file)
if [print(f'ERROR: no file names were written to {o.name}')
for name, o in outputs.items()
if (o.tell() == 0 and
not (no_bootloader and name == 'boot'))
]:
sys.exit(1)

View file

@ -1,10 +1,14 @@
# This file is part of systemd.
#
# Used by systemd --user instances.
account include system-auth
-account sufficient pam_systemd_home.so
account sufficient pam_unix.so no_pass_expiry
account include system-auth
session required pam_selinux.so close
session required pam_selinux.so nottys open
session required pam_loginuid.so
session include system-auth
session required pam_selinux.so close
session required pam_selinux.so nottys open
session required pam_loginuid.so
session optional pam_keyinit.so force revoke
session required pam_namespace.so
-session optional pam_systemd_home.so
session optional pam_umask.so silent
session include system-auth

File diff suppressed because it is too large Load diff

View file

@ -1,79 +1,96 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: true; tab-width: 4; -*-
# This script turns sysuser.d files into scriptlets mandated by Fedora
# packaging guidelines. The general idea is to define users using the
# declarative syntax but to turn this into traditional scriptlets.
user() {
user="$1"
uid="$2"
desc="$3"
group="$4"
home="$5"
shell="$6"
user="$1"
uid="$2"
desc="$3"
group="$4"
home="$5"
shell="$6"
[ "$desc" = '-' ] && desc=
{ [ "$home" = '-' ] || [ "$home" = '' ]; } && home=/
{ [ "$shell" = '-' ] || [ "$shell" = '' ]; } && shell=/sbin/nologin
[ "$desc" = '-' ] && desc=
{ [ "$home" = '-' ] || [ "$home" = '' ]; } && home=/
{ [ "$shell" = '-' ] || [ "$shell" = '' ]; } && shell=/usr/sbin/nologin
if [ "$uid" = '-' ] || [ "$uid" = '' ]; then
cat <<EOF
getent passwd '$user' >/dev/null || \\
useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user'
EOF
else
cat <<EOF
if ! getent passwd '$user' >/dev/null ; then
if ! getent passwd '$uid' >/dev/null ; then
useradd -r -u '$uid' -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user'
else
useradd -r -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user'
fi
fi
if [ "$uid" = '-' ] || [ "$uid" = '' ]; then
cat <<-EOF
getent passwd '$user' >/dev/null || \\
useradd -r -g ${group@Q} -d ${home@Q} -s ${shell@Q} -c ${desc@Q} ${user@Q} || :
EOF
else
cat <<-EOF
if ! getent passwd ${user@Q} >/dev/null; then
if ! getent passwd ${uid@Q} >/dev/null; then
useradd -r -u ${uid@Q} -g ${group@Q} -d ${home@Q} -s ${shell@Q} -c ${desc@Q} ${user@Q} || :
else
useradd -r -g ${group@Q} -d ${home@Q} -s ${shell@Q} -c ${desc@Q} ${user@Q} || :
fi
fi
EOF
fi
EOF
fi
}
group() {
group="$1"
gid="$2"
if [ "$gid" = '-' ]; then
cat <<-EOF
getent group '$group' >/dev/null || groupadd -r '$group'
group="$1"
gid="$2"
if [ "$gid" = '-' ]; then
cat <<-EOF
getent group ${group@Q} >/dev/null || groupadd -r ${group@Q} || :
EOF
else
cat <<-EOF
getent group ${group@Q} >/dev/null || groupadd -f -g ${gid@Q} -r ${group@Q} || :
EOF
fi
}
usermod() {
user="$1"
group="$2"
cat <<-EOF
if getent group ${group@Q} >/dev/null; then
usermod -a -G ${group@Q} '$user' || :
fi
EOF
else
cat <<-EOF
getent group '$group' >/dev/null || groupadd -f -g '$gid' -r '$group'
EOF
fi
}
parse() {
while read -r line || [ -n "$line" ] ; do
{ [ "${line:0:1}" = '#' ] || [ "${line:0:1}" = ';' ]; } && continue
line="${line## *}"
[ -z "$line" ] && continue
eval "arr=( $line )"
case "${arr[0]}" in
('u')
group "${arr[1]}" "${arr[2]}"
user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
# TODO: user:group support
;;
('g')
group "${arr[1]}" "${arr[2]}"
;;
('m')
group "${arr[2]}" "-"
user "${arr[1]}" "-" "" "${arr[2]}"
;;
esac
done
while read -r line || [ -n "$line" ] ; do
{ [ "${line:0:1}" = '#' ] || [ "${line:0:1}" = ';' ]; } && continue
line="${line## *}"
[ -z "$line" ] && continue
eval "arr=( $line )"
case "${arr[0]}" in
('u'|'u!')
if [[ "${arr[2]}" == *":"* ]]; then
user "${arr[1]}" "${arr[2]%:*}" "${arr[3]}" "${arr[2]#*:}" "${arr[4]}" "${arr[5]}"
else
group "${arr[1]}" "${arr[2]}"
user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
fi
;;
('g')
group "${arr[1]}" "${arr[2]}"
;;
('m')
group "${arr[2]}" "-"
user "${arr[1]}" "-" "" "${arr[1]}" "" ""
usermod "${arr[1]}" "${arr[2]}"
;;
esac
done
}
for fn in "$@"; do
[ -e "$fn" ] || continue
echo "# generated from $(basename "$fn")"
parse <"$fn"
[ -e "$fn" ] || continue
echo "# generated from $(basename "$fn")"
parse <"$fn"
done

View file

@ -42,7 +42,7 @@ parse() {
[ -z "$line" ] && continue
set -- $line
case "$1" in
('u')
('u'|'u!')
process_u "$2" "$3"
;;
('g')

39
test_sysusers_defined.py Executable file
View file

@ -0,0 +1,39 @@
#!/usr/bin/python
import os
import sys
def parse_sysusers_file(filename):
users, groups = set(), set()
for line in open(filename):
line = line.strip()
if not line or line.startswith('#'):
continue
words = line.split()
match words[0]:
case 'u'|'u!':
users.add(words[1])
case 'g':
groups.add(words[1])
case 'm'|'r':
continue
case _:
assert False
return users, groups
setup_users, setup_groups = set(), set()
for arg in sys.argv[1:-1]:
users, groups = parse_sysusers_file(arg)
setup_users |= users
setup_groups |= groups
basic_users, basic_groups = parse_sysusers_file(sys.argv[-1])
ignored = set(os.getenv('IGNORED', '').split())
if d := basic_users - setup_users - ignored:
exit(f'We have new users: {d}')
if d := basic_groups - setup_groups - ignored:
exit(f'We have new groups: {d}')

View file

@ -1,50 +0,0 @@
---
- hosts: localhost
vars:
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
tasks:
# switch SELinux to permissive mode
- name: Get default kernel
command: "grubby --default-kernel"
register: default_kernel
- debug: msg="{{ default_kernel.stdout }}"
- name: Set permissive mode
command: "grubby --args=enforcing=0 --update-kernel {{ default_kernel.stdout }}"
- name: reboot
block:
- name: restart host
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
ignore_errors: true
- name: wait for host to come back
wait_for_connection:
delay: 10
timeout: 300
- name: Re-create /tmp/artifacts
command: mkdir /tmp/artifacts
- name: Gather SELinux denials since boot
shell: |
result=pass
dmesg | grep -i -e type=1300 -e type=1400 > /tmp/avc.log && result=fail
ausearch -m avc -m selinux_err -m user_avc -ts boot &>> /tmp/avc.log
grep -q '<no matches>' /tmp/avc.log || result=fail
echo -e "\nresults:\n- test: reboot and collect AVC\n result: $result\n logs:\n - avc.log\n\n" > /tmp/results.yml
( [ $result = "pass" ] && echo PASS test-reboot || echo FAIL test-reboot ) > /tmp/test.log
always:
- name: Pull out the artifacts
fetch:
dest: "{{ artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- /tmp/test.log
- /tmp/avc.log
- /tmp/results.yml

View file

@ -9,21 +9,17 @@
#
# Minimum rpm version supported: 4.14.0
%transfiletriggerin -P 900900 -- /usr/lib/systemd/system /etc/systemd/system
%transfiletriggerin -P 900900 -- /usr/lib/systemd/system/ /etc/systemd/system/
# This script will run after any package is initially installed or
# upgraded. We care about the case where a package is initially
# installed, because other cases are covered by the *un scriptlets,
# so sometimes we will reload needlessly.
/usr/lib/systemd/systemd-update-helper system-reload-restart || :
%transfiletriggerin -P 900899 -- /usr/lib/systemd/user /etc/systemd/user
if selinuxenabled &>/dev/null; then
/usr/lib/systemd/systemd-update-helper user-reload-restart 2>/dev/null || :
else
/usr/lib/systemd/systemd-update-helper user-reload-restart || :
fi
%transfiletriggerin -P 900899 -- /usr/lib/systemd/user/ /etc/systemd/user/
/usr/lib/systemd/systemd-update-helper user-reload-restart || :
%transfiletriggerpostun -P 1000100 -- /usr/lib/systemd/system /etc/systemd/system
%transfiletriggerpostun -P 1000100 -- /usr/lib/systemd/system/ /etc/systemd/system/
# On removal, we need to run daemon-reload after any units have been
# removed.
# On upgrade, we need to run daemon-reload after any new unit files
@ -31,49 +27,35 @@ fi
# executed.
/usr/lib/systemd/systemd-update-helper system-reload || :
%transfiletriggerpostun -P 1000099 -- /usr/lib/systemd/user /etc/systemd/user
%transfiletriggerpostun -P 1000099 -- /usr/lib/systemd/user/ /etc/systemd/user/
# Execute daemon-reload in user managers.
if selinuxenabled &>/dev/null; then
/usr/lib/systemd/systemd-update-helper user-reload 2>/dev/null || :
else
/usr/lib/systemd/systemd-update-helper user-reload || :
fi
/usr/lib/systemd/systemd-update-helper user-reload || :
%transfiletriggerpostun -P 10000 -- /usr/lib/systemd/system /etc/systemd/system
%transfiletriggerpostun -P 10000 -- /usr/lib/systemd/system/ /etc/systemd/system/
# We restart remaining system services that should be restarted here.
/usr/lib/systemd/systemd-update-helper system-restart || :
%transfiletriggerpostun -P 9999 -- /usr/lib/systemd/user /etc/systemd/user
%transfiletriggerpostun -P 9999 -- /usr/lib/systemd/user/ /etc/systemd/user/
# We restart remaining user services that should be restarted here.
if selinuxenabled &>/dev/null; then
/usr/lib/systemd/systemd-update-helper user-restart 2>/dev/null || :
else
/usr/lib/systemd/systemd-update-helper user-restart || :
fi
/usr/lib/systemd/systemd-update-helper user-restart || :
%transfiletriggerin -P 1000700 -- /usr/lib/sysusers.d
%transfiletriggerin -P 1000700 -- /usr/lib/sysusers.d/
# This script will process files installed in /usr/lib/sysusers.d to create
# specified users automatically. The priority is set such that it
# will run before the tmpfiles file trigger.
if test -d "/run/systemd/system"; then
systemd-sysusers || :
fi
systemd-sysusers || :
%transfiletriggerin -P 1000700 udev -- /usr/lib/udev/hwdb.d
%transfiletriggerin -P 1000700 udev -- /usr/lib/udev/hwdb.d/
# This script will automatically invoke hwdb update if files have been
# installed or updated in /usr/lib/udev/hwdb.d.
if test -d "/run/systemd/system"; then
systemd-hwdb update || :
fi
systemd-hwdb update || :
%transfiletriggerin -P 1000700 -- /usr/lib/systemd/catalog
%transfiletriggerin -P 1000700 -- /usr/lib/systemd/catalog/
# This script will automatically invoke journal catalog update if files
# have been installed or updated in /usr/lib/systemd/catalog.
if test -d "/run/systemd/system"; then
journalctl --update-catalog || :
fi
journalctl --update-catalog || :
%transfiletriggerin -P 1000700 -- /usr/lib/binfmt.d
%transfiletriggerin -P 1000700 -- /usr/lib/binfmt.d/
# This script will automatically apply binfmt rules if files have been
# installed or updated in /usr/lib/binfmt.d.
if test -d "/run/systemd/system"; then
@ -82,7 +64,7 @@ if test -d "/run/systemd/system"; then
/usr/lib/systemd/systemd-binfmt || :
fi
%transfiletriggerin -P 1000600 -- /usr/lib/tmpfiles.d
%transfiletriggerin -P 1000600 -- /usr/lib/tmpfiles.d/
# This script will process files installed in /usr/lib/tmpfiles.d to create
# tmpfiles automatically. The priority is set such that it will run
# after the sysusers file trigger, but before any other triggers.
@ -90,14 +72,12 @@ if test -d "/run/systemd/system"; then
systemd-tmpfiles --create || :
fi
%transfiletriggerin -P 1000600 udev -- /usr/lib/udev/rules.d
%transfiletriggerin -P 1000600 udev -- /usr/lib/udev/rules.d/
# This script will automatically update udev with new rules if files
# have been installed or updated in /usr/lib/udev/rules.d.
if test -e /run/udev/control; then
udevadm control --reload || :
fi
/usr/lib/systemd/systemd-update-helper mark-reload-system-units systemd-udevd.service || :
%transfiletriggerin -P 1000500 -- /usr/lib/sysctl.d
%transfiletriggerin -P 1000500 -- /usr/lib/sysctl.d/
# This script will automatically apply sysctl rules if files have been
# installed or updated in /usr/lib/sysctl.d.
if test -d "/run/systemd/system"; then

View file

@ -1,41 +0,0 @@
From 223ea50950f97ed4e67311dfcffed7ffc27a7cd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 14 Aug 2019 15:57:42 +0200
Subject: [PATCH] udev: use bfq as the default scheduler
As requested in https://bugzilla.redhat.com/show_bug.cgi?id=1738828.
Test results are that bfq seems to behave better and more consistently on
typical hardware. The kernel does not have a configuration option to set
the default scheduler, and it currently needs to be set by userspace.
See the bug for more discussion and links.
---
rules.d/60-block-scheduler.rules | 5 +++++
rules.d/meson.build | 1 +
2 files changed, 6 insertions(+)
create mode 100644 rules.d/60-block-scheduler.rules
diff --git a/rules.d/60-block-scheduler.rules b/rules.d/60-block-scheduler.rules
new file mode 100644
index 0000000000..480b941761
--- /dev/null
+++ b/rules.d/60-block-scheduler.rules
@@ -0,0 +1,6 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="add", SUBSYSTEM=="block", \
+ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
+ ENV{DEVTYPE}=="disk", \
+ ATTR{queue/scheduler}="bfq"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index ca4445d774..38d6aa6970 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -3,6 +3,7 @@
rules = files('''
60-autosuspend.rules
60-block.rules
+ 60-block-scheduler.rules
60-cdrom_id.rules
60-drm.rules
60-evdev.rules

View file

@ -1,2 +0,0 @@
systemd
systemd-udev