The scriptlet to *add* it was removed in 38d93ea79f,
November 2015. We only care about upgrades from previous two releases, so it is
long overdue to remove this.
We tried this back in 2016 and it didn't go so well, because at
that time, preset-all was badly broken. See
https://bugzilla.redhat.com/show_bug.cgi?id=1363858 for the
history there. It seems that the bugs in preset-all were fixed
quite soon after that, but for whatever reason, the change to
%post was not re-applied (probably it just got forgotten).
We've now run into a bug in Rawhide where dbus-daemon is getting
installed before systemd despite having a dependency that should
make that not happen:
https://bugzilla.redhat.com/show_bug.cgi?id=1647172
this is apparently because there are very complex dependency
loops during initial install that rpm cannot find a single
clearly correct 'answer' for, so it does not always choose to
honor this dependency. We can take a look at breaking up those
loops, but we also figured it can't hurt to resurrect this change
to help with such cases: this way if some service with a preset
*does* happen to get installed before systemd, and so its attempt
to apply the preset in its own %post fails, that will be fixed up
here.
This makes it possible to build RPMs from a git tree using
`rpmbuild --build-in-place --noprep` and have resulting RPMs
that will preserve the override of the PAM config file.
This needs to commit to HAVE_SELINUX being defined (since there
is no longer an m4 step to make that stanza conditional), but
that should be acceptable since the %build step calls Meson
with -Dselinux=true.
Tested:
- Chdir into a checkout of github.com/systemd/systemd tree and run:
$ rpmbuild -bb --build-in-place --noprep \
--define "gitcommit $(git rev-parse HEAD)" \
--define "_sourcedir $HOME/fedorarpms/systemd" \
~/fedorarpms/systemd/systemd.spec
- Inspect the contents of systemd-user in the generated RPM package:
$ rpm2cpio ~/rpmbuild/RPMS/x86_64/systemd-239-3.git99352de.fc29.x86_64.rpm \
| cpio -i --to-stdout --quiet ./etc/pam.d/systemd-user
...
account include system-auth
...
session include system-auth
Existing patches moved to the systemd-stable tarball, with the exception
of 0991-core-fix-resetting-of-Delegate-and-properly-ignore-i.patch,
which was partially reverted upstream and is just removed.
2018-03-06 23:21:31,835 INFO pylorax.dnfhelper: Performing post-installation setup tasks
2018-03-06 23:22:41,901 WARNING pylorax.dnfhelper: Non-fatal POSTTRANS scriptlet failure in rpm package kernel-core
warning: %posttrans(kernel-core-4.16.0-0.rc4.git0.1.fc29.x86_6 scriptlet failed, exit status 1
Please specify the kernel command line in /etc/kernel/cmdline!
Could not determine the kernel command line parameters
/usr/lib/kernel/install.d/90-loaderentry.install: line 53: /proc/cmdline: No such file or directory
GRUB now has BootLoaderSpec support, the user can choose to use this by
setting GRUB_ENABLE_BLSCFG to true in /etc/default/grub. On this setup,
grubby isn't used to generate the kernel modules dependencies, instead
the depmod install script could be used.
But the BLS support in GRUB uses the config snippets that are generated
at build time and included in the kernel package, so the loaderentry
install script shouldn't be executed when using GRUB.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>