Gate systemd's preset-all so it runs only on first install (#4249)

* Gate systemd's preset-all so it runs only on first install
This commit is contained in:
Daniel McIlvaney 2022-12-08 11:56:05 -08:00 коммит произвёл GitHub
Родитель caf667ca0e
Коммит 855a2b52e2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 30 добавлений и 12 удалений

Просмотреть файл

@ -1,7 +1,7 @@
Summary: Bootstrap version of systemd. Workaround for systemd circular dependency.
Name: systemd-bootstrap
Version: 250.3
Release: 8%{?dist}
Release: 9%{?dist}
License: LGPLv2+ AND GPLv2+ AND MIT
Vendor: Microsoft Corporation
Distribution: Mariner
@ -143,7 +143,13 @@ install -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/systemd/network
# Enable default systemd units.
%post
/sbin/ldconfig
systemctl preset-all
# Only force the presets to default values when first installing systemd ($1 = # of currently installed pacakges,
# $1 >= 2 for upgrades). This will resolve issues where systemd may be installed after a package that enables a service
# during the same transaction, leaving the service disabled unexpectedly. Once systemd is installed all future attempts
# to enable/disable services should succeed.
if [ $1 -eq 1 ]; then
systemctl preset-all
fi
%postun -p /sbin/ldconfig
@ -233,6 +239,9 @@ systemctl preset-all
%{_datadir}/pkgconfig/udev.pc
%changelog
* Wed Nov 29 2022 Daniel McIlvaney <damcilva@microsoft.com> - 250.3-9
- Conditionally run systemctl preset-all only when first installing systemd, not on upgrades
* Fri Nov 18 2022 Sam Meluch <sammeluch@microsoft.com> - 250.3-8
- Add patch for CVE-2022-3821

Просмотреть файл

@ -1,7 +1,7 @@
Summary: Systemd-250
Name: systemd
Version: 250.3
Release: 10%{?dist}
Release: 11%{?dist}
License: LGPLv2+ AND GPLv2+ AND MIT
Vendor: Microsoft Corporation
Distribution: Mariner
@ -171,7 +171,13 @@ meson test -C build
# Enable default systemd units.
%post
/sbin/ldconfig
systemctl preset-all
# Only force the presets to default values when first installing systemd ($1 = # of currently installed pacakges,
# $1 >= 2 for upgrades). This will resolve issues where systemd may be installed after a package that enables a service
# during the same transaction, leaving the service disabled unexpectedly. Once systemd is installed all future attempts
# to enable/disable services should succeed.
if [ $1 -eq 1 ]; then
systemctl preset-all
fi
%postun -p /sbin/ldconfig
@ -263,6 +269,9 @@ systemctl preset-all
%files lang -f %{name}.lang
%changelog
* Wed Nov 29 2022 Daniel McIlvaney <damcilva@microsoft.com> - 250.3-11
- Conditionally run systemctl preset-all only when first installing systemd, not on upgrades
* Thu Nov 17 2022 Sam Meluch <sammeluch@microsoft.com> - 250.3-10
- Add patch for CVE-2022-3821

Просмотреть файл

@ -545,10 +545,10 @@ sqlite-devel-3.39.2-1.cm2.aarch64.rpm
sqlite-libs-3.39.2-1.cm2.aarch64.rpm
swig-4.0.2-3.cm2.aarch64.rpm
swig-debuginfo-4.0.2-3.cm2.aarch64.rpm
systemd-bootstrap-250.3-8.cm2.aarch64.rpm
systemd-bootstrap-debuginfo-250.3-8.cm2.aarch64.rpm
systemd-bootstrap-devel-250.3-8.cm2.aarch64.rpm
systemd-bootstrap-rpm-macros-250.3-8.cm2.noarch.rpm
systemd-bootstrap-250.3-9.cm2.aarch64.rpm
systemd-bootstrap-debuginfo-250.3-9.cm2.aarch64.rpm
systemd-bootstrap-devel-250.3-9.cm2.aarch64.rpm
systemd-bootstrap-rpm-macros-250.3-9.cm2.noarch.rpm
tar-1.34-1.cm2.aarch64.rpm
tar-debuginfo-1.34-1.cm2.aarch64.rpm
tdnf-3.2.2-4.cm2.aarch64.rpm

Просмотреть файл

@ -545,10 +545,10 @@ sqlite-devel-3.39.2-1.cm2.x86_64.rpm
sqlite-libs-3.39.2-1.cm2.x86_64.rpm
swig-4.0.2-3.cm2.x86_64.rpm
swig-debuginfo-4.0.2-3.cm2.x86_64.rpm
systemd-bootstrap-250.3-8.cm2.x86_64.rpm
systemd-bootstrap-debuginfo-250.3-8.cm2.x86_64.rpm
systemd-bootstrap-devel-250.3-8.cm2.x86_64.rpm
systemd-bootstrap-rpm-macros-250.3-8.cm2.noarch.rpm
systemd-bootstrap-250.3-9.cm2.x86_64.rpm
systemd-bootstrap-debuginfo-250.3-9.cm2.x86_64.rpm
systemd-bootstrap-devel-250.3-9.cm2.x86_64.rpm
systemd-bootstrap-rpm-macros-250.3-9.cm2.noarch.rpm
tar-1.34-1.cm2.x86_64.rpm
tar-debuginfo-1.34-1.cm2.x86_64.rpm
tdnf-3.2.2-4.cm2.x86_64.rpm