Release 248-3mamba

This commit is contained in:
Automatic Build System 2023-12-30 11:39:52 +01:00
parent 1898ba2b75
commit 3e7405ad5f

View File

@ -27,7 +27,7 @@
Name: systemd Name: systemd
Epoch: 2 Epoch: 2
Version: 248 Version: 248
Release: 2mamba Release: 3mamba
Summary: A system and service manager compatible with SysV and LSB init scripts Summary: A system and service manager compatible with SysV and LSB init scripts
Group: System/Configuration Group: System/Configuration
Vendor: openmamba Vendor: openmamba
@ -99,6 +99,7 @@ BuildRequires: libselinux-devel
BuildRequires: libz-devel BuildRequires: libz-devel
BuildRequires: libzstd-devel BuildRequires: libzstd-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: kmod >= 28-3mamba
BuildRequires: vala-tools BuildRequires: vala-tools
BuildRequires: meson BuildRequires: meson
BuildRequires: ninja BuildRequires: ninja
@ -330,7 +331,7 @@ install -d -m0755 %{buildroot}%{_prefix}/lib/repart.d
: :
%post core %post core
if [ "$1" -ge 1 ]; then if [ $1 -ge 1 ]; then
# causes systemd not to boot since 219 # causes systemd not to boot since 219
sed -i "/\/proc\/bus\/usb/d" /etc/fstab sed -i "/\/proc\/bus\/usb/d" /etc/fstab
# SYSV5 -> Systemd migration # SYSV5 -> Systemd migration
@ -379,6 +380,33 @@ if [ "$1" -ge 1 ]; then
# Configure libnss_myhostanme.so resolver # Configure libnss_myhostanme.so resolver
grep "^hosts:.* myhostname" /etc/nsswitch.conf &>/dev/null || \ grep "^hosts:.* myhostname" /etc/nsswitch.conf &>/dev/null || \
sed -i "s|\(^hosts:.*files\)|\1 myhostname|" /etc/nsswitch.conf sed -i "s|\(^hosts:.*files\)|\1 myhostname|" /etc/nsswitch.conf
systemctl daemon-reexec &>/dev/null || {
# From Fedora:
# systemd v239 had bug #9553 in D-Bus authentication of the private socket,
# which was later fixed in v240 by #9625.
# To work around this issue, let's fall back to using a `kill -TERM 1` to
# re-execute the daemon when the `systemctl daemon-reexec` call fails.
if [ $1 -gt 1 ] && [ -d /run/systemd/system ] ; then
kill -TERM 1 &>/dev/null || :
fi
}
fi
if [ $1 -eq 1 ]; then
systemctl preset-all &>/dev/null || :
systemctl --global preset-all &>/dev/null || :
# From Fedora:
# Create /etc/resolv.conf symlink.
# We would also create it using tmpfiles, but let's do this here
# too before NetworkManager gets a chance. (systemd-tmpfiles invocation above
# does not do this, because it's marked with ! and we don't specify --boot.)
if test -d /run/systemd/system/ &&
systemctl -q is-enabled systemd-resolved.service &>/dev/null &&
! mountpoint /etc/resolv.conf &>/dev/null &&
! systemd-analyze cat-config systemd/resolved.conf 2>/dev/null | \
grep -qE '^DNSStubListener\s*=\s*([nN][oO]?|[fF]|[fF][aA][lL][sS][eE]|0|[oO][fF][fF])$'; then
ln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
fi
fi fi
: :
@ -390,6 +418,22 @@ if [ $1 -eq 0 ]; then
fi fi
: :
%triggerun core -- systemd-core <= 2:248-2mamba
# From Fedora
# This is for upgrades from previous versions before systemd-resolved became the default.
systemctl --no-reload preset systemd-resolved.service &>/dev/null || :
if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then
systemctl -q is-enabled NetworkManager.service 2>/dev/null && \
! test -L /etc/resolv.conf 2>/dev/null && \
! mountpoint /etc/resolv.conf &>/dev/null && \
grep -q 'Generated by NetworkManager' /etc/resolv.conf 2>/dev/null && \
echo -e '/etc/resolv.conf was generated by NetworkManager.\nRemoving it to let systemd-resolved manage this file.' && \
mv -v /etc/resolv.conf /etc/resolv.conf.orig-with-nm && \
ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf 2>/dev/null || :
systemctl start systemd-resolved.service &>/dev/null || :
fi
:
%triggerpostun core -- systemd-core < 2:248 %triggerpostun core -- systemd-core < 2:248
# /bin and /sbin are removed during old filesystem postun # /bin and /sbin are removed during old filesystem postun
[ -e /lib/systemd ] || ln -s ../usr/lib/systemd /lib/systemd [ -e /lib/systemd ] || ln -s ../usr/lib/systemd /lib/systemd
@ -398,8 +442,8 @@ fi
%posttrans core %posttrans core
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
[ -L /lib/systemd ] || { [ ! -L /lib -a ! -L /lib/systemd ] && {
# /lib/system -> /usr/lib/system # Migrate /lib/system -> /usr/lib/system
for d in systemd; do for d in systemd; do
[ -L /lib/$d ] && continue [ -L /lib/$d ] && continue
echo "Migrating /lib/$d to /usr/lib/$d..." echo "Migrating /lib/$d to /usr/lib/$d..."
@ -529,8 +573,8 @@ groupadd render -g %{group_render} 2>/dev/null
: :
%posttrans -n udev %posttrans -n udev
[ -L /lib/udev ] || { [ ! -L /lib -a ! -L /lib/udev ] && {
# /lib/udev -> /usr/lib/udev migration # Migrate /lib/udev -> /usr/lib/udev migration
for d in udev; do for d in udev; do
[ -L /lib/$d ] && continue [ -L /lib/$d ] && continue
echo "Migrating /lib/$d to /usr/lib/$d..." echo "Migrating /lib/$d to /usr/lib/$d..."
@ -806,6 +850,9 @@ systemctl daemon-reload &>/dev/null || :
%{_libdir}/pkgconfig/libudev.pc %{_libdir}/pkgconfig/libudev.pc
%changelog %changelog
* Thu Apr 22 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 248-3mamba
- enable systemd-resolved and create /etc/resolve.conf as symlink
* Tue Apr 13 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 248-2mamba * Tue Apr 13 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 248-2mamba
- perform migration in posttrans insted of pre of all new files get removed - perform migration in posttrans insted of pre of all new files get removed