Release 248-3mamba
This commit is contained in:
parent
1898ba2b75
commit
3e7405ad5f
59
systemd.spec
59
systemd.spec
@ -27,7 +27,7 @@
|
||||
Name: systemd
|
||||
Epoch: 2
|
||||
Version: 248
|
||||
Release: 2mamba
|
||||
Release: 3mamba
|
||||
Summary: A system and service manager compatible with SysV and LSB init scripts
|
||||
Group: System/Configuration
|
||||
Vendor: openmamba
|
||||
@ -99,6 +99,7 @@ BuildRequires: libselinux-devel
|
||||
BuildRequires: libz-devel
|
||||
BuildRequires: libzstd-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: kmod >= 28-3mamba
|
||||
BuildRequires: vala-tools
|
||||
BuildRequires: meson
|
||||
BuildRequires: ninja
|
||||
@ -330,7 +331,7 @@ install -d -m0755 %{buildroot}%{_prefix}/lib/repart.d
|
||||
:
|
||||
|
||||
%post core
|
||||
if [ "$1" -ge 1 ]; then
|
||||
if [ $1 -ge 1 ]; then
|
||||
# causes systemd not to boot since 219
|
||||
sed -i "/\/proc\/bus\/usb/d" /etc/fstab
|
||||
# SYSV5 -> Systemd migration
|
||||
@ -379,6 +380,33 @@ if [ "$1" -ge 1 ]; then
|
||||
# Configure libnss_myhostanme.so resolver
|
||||
grep "^hosts:.* myhostname" /etc/nsswitch.conf &>/dev/null || \
|
||||
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
|
||||
:
|
||||
|
||||
@ -390,6 +418,22 @@ if [ $1 -eq 0 ]; then
|
||||
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
|
||||
# /bin and /sbin are removed during old filesystem postun
|
||||
[ -e /lib/systemd ] || ln -s ../usr/lib/systemd /lib/systemd
|
||||
@ -398,8 +442,8 @@ fi
|
||||
%posttrans core
|
||||
if [ $1 -ge 1 ]; then
|
||||
|
||||
[ -L /lib/systemd ] || {
|
||||
# /lib/system -> /usr/lib/system
|
||||
[ ! -L /lib -a ! -L /lib/systemd ] && {
|
||||
# Migrate /lib/system -> /usr/lib/system
|
||||
for d in systemd; do
|
||||
[ -L /lib/$d ] && continue
|
||||
echo "Migrating /lib/$d to /usr/lib/$d..."
|
||||
@ -529,8 +573,8 @@ groupadd render -g %{group_render} 2>/dev/null
|
||||
:
|
||||
|
||||
%posttrans -n udev
|
||||
[ -L /lib/udev ] || {
|
||||
# /lib/udev -> /usr/lib/udev migration
|
||||
[ ! -L /lib -a ! -L /lib/udev ] && {
|
||||
# Migrate /lib/udev -> /usr/lib/udev migration
|
||||
for d in udev; do
|
||||
[ -L /lib/$d ] && continue
|
||||
echo "Migrating /lib/$d to /usr/lib/$d..."
|
||||
@ -806,6 +850,9 @@ systemctl daemon-reload &>/dev/null || :
|
||||
%{_libdir}/pkgconfig/libudev.pc
|
||||
|
||||
%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
|
||||
- perform migration in posttrans insted of pre of all new files get removed
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user