From 1898ba2b75596870aaf4c35290edcc9ac5a4135e Mon Sep 17 00:00:00 2001 From: autodist Date: Sat, 30 Dec 2023 11:39:47 +0100 Subject: [PATCH] Release 248-2mamba --- systemd-247-gnu-efi-3.0.13.patch | 176 --------------- systemd.spec | 377 +++++++++++++++++++------------ 2 files changed, 238 insertions(+), 315 deletions(-) delete mode 100644 systemd-247-gnu-efi-3.0.13.patch diff --git a/systemd-247-gnu-efi-3.0.13.patch b/systemd-247-gnu-efi-3.0.13.patch deleted file mode 100644 index 37d4658..0000000 --- a/systemd-247-gnu-efi-3.0.13.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 48fff0a2af3f62acd446ebec8081b039b72caad8 Mon Sep 17 00:00:00 2001 -From: Daan De Meyer -Date: Fri, 12 Mar 2021 22:09:44 +0000 -Subject: [PATCH] boot: Move console declarations to missing_efi.h - -These were added to eficonex.h in gnu-efi 3.0.13. Let's move them -to missing_efi.h behind an appropriate guard to fix the build with -recent versions of gnu-efi. - -(cherry picked from commit 95ba433a5f34baf92921fb58051bc8241f908c0e) ---- - src/boot/efi/console.c | 57 -------------------------------- - src/boot/efi/console.h | 6 +--- - src/boot/efi/missing_efi.h | 67 ++++++++++++++++++++++++++++++++++++++ - 3 files changed, 68 insertions(+), 62 deletions(-) - -diff --git a/src/boot/efi/console.c b/src/boot/efi/console.c -index 2dd4543d51..1d6dfeeea2 100644 ---- a/src/boot/efi/console.c -+++ b/src/boot/efi/console.c -@@ -9,63 +9,6 @@ - #define SYSTEM_FONT_WIDTH 8 - #define SYSTEM_FONT_HEIGHT 19 - --#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \ -- { 0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } } -- --struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL; -- --typedef EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)( -- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -- BOOLEAN ExtendedVerification --); -- --typedef UINT8 EFI_KEY_TOGGLE_STATE; -- --typedef struct { -- UINT32 KeyShiftState; -- EFI_KEY_TOGGLE_STATE KeyToggleState; --} EFI_KEY_STATE; -- --typedef struct { -- EFI_INPUT_KEY Key; -- EFI_KEY_STATE KeyState; --} EFI_KEY_DATA; -- --typedef EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)( -- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -- EFI_KEY_DATA *KeyData --); -- --typedef EFI_STATUS (EFIAPI *EFI_SET_STATE)( -- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -- EFI_KEY_TOGGLE_STATE *KeyToggleState --); -- --typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)( -- EFI_KEY_DATA *KeyData --); -- --typedef EFI_STATUS (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)( -- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -- EFI_KEY_DATA KeyData, -- EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, -- VOID **NotifyHandle --); -- --typedef EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)( -- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -- VOID *NotificationHandle --); -- --typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL { -- EFI_INPUT_RESET_EX Reset; -- EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx; -- EFI_EVENT WaitForKeyEx; -- EFI_SET_STATE SetState; -- EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify; -- EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify; --} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL; -- - EFI_STATUS console_key_read(UINT64 *key, BOOLEAN wait) { - EFI_GUID EfiSimpleTextInputExProtocolGuid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID; - static EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInputEx; -diff --git a/src/boot/efi/console.h b/src/boot/efi/console.h -index 41df3a406e..2c69af552a 100644 ---- a/src/boot/efi/console.h -+++ b/src/boot/efi/console.h -@@ -1,11 +1,7 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - #pragma once - --#define EFI_SHIFT_STATE_VALID 0x80000000 --#define EFI_RIGHT_CONTROL_PRESSED 0x00000004 --#define EFI_LEFT_CONTROL_PRESSED 0x00000008 --#define EFI_RIGHT_ALT_PRESSED 0x00000010 --#define EFI_LEFT_ALT_PRESSED 0x00000020 -+#include "missing_efi.h" - - #define EFI_CONTROL_PRESSED (EFI_RIGHT_CONTROL_PRESSED|EFI_LEFT_CONTROL_PRESSED) - #define EFI_ALT_PRESSED (EFI_RIGHT_ALT_PRESSED|EFI_LEFT_ALT_PRESSED) -diff --git a/src/boot/efi/missing_efi.h b/src/boot/efi/missing_efi.h -index 1b838af2a4..b6aae1eb5b 100644 ---- a/src/boot/efi/missing_efi.h -+++ b/src/boot/efi/missing_efi.h -@@ -53,3 +53,70 @@ typedef struct _EFI_RNG_PROTOCOL { - } EFI_RNG_PROTOCOL; - - #endif -+ -+#ifndef EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID -+ -+#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \ -+ { 0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } } -+ -+#define EFI_SHIFT_STATE_VALID 0x80000000 -+#define EFI_RIGHT_CONTROL_PRESSED 0x00000004 -+#define EFI_LEFT_CONTROL_PRESSED 0x00000008 -+#define EFI_RIGHT_ALT_PRESSED 0x00000010 -+#define EFI_LEFT_ALT_PRESSED 0x00000020 -+ -+struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL; -+ -+typedef EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)( -+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -+ BOOLEAN ExtendedVerification -+); -+ -+typedef UINT8 EFI_KEY_TOGGLE_STATE; -+ -+typedef struct { -+ UINT32 KeyShiftState; -+ EFI_KEY_TOGGLE_STATE KeyToggleState; -+} EFI_KEY_STATE; -+ -+typedef struct { -+ EFI_INPUT_KEY Key; -+ EFI_KEY_STATE KeyState; -+} EFI_KEY_DATA; -+ -+typedef EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)( -+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -+ EFI_KEY_DATA *KeyData -+); -+ -+typedef EFI_STATUS (EFIAPI *EFI_SET_STATE)( -+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -+ EFI_KEY_TOGGLE_STATE *KeyToggleState -+); -+ -+typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)( -+ EFI_KEY_DATA *KeyData -+); -+ -+typedef EFI_STATUS (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)( -+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -+ EFI_KEY_DATA KeyData, -+ EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, -+ VOID **NotifyHandle -+); -+ -+typedef EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)( -+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, -+ VOID *NotificationHandle -+); -+ -+typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL { -+ EFI_INPUT_RESET_EX Reset; -+ EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx; -+ EFI_EVENT WaitForKeyEx; -+ EFI_SET_STATE SetState; -+ EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify; -+ EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify; -+} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL; -+ -+#endif diff --git a/systemd.spec b/systemd.spec index 3d78bf8..5a8ce37 100644 --- a/systemd.spec +++ b/systemd.spec @@ -26,14 +26,14 @@ Name: systemd Epoch: 2 -Version: 247 -Release: 5mamba +Version: 248 +Release: 2mamba Summary: A system and service manager compatible with SysV and LSB init scripts Group: System/Configuration Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://freedesktop.org/wiki/Software/systemd +URL: https://freedesktop.org/wiki/Software/systemd Source: https://github.com/systemd/systemd.git/v%{version}/systemd-%{version}.tar.bz2 #Source: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz Source1: udev-initscript @@ -69,7 +69,6 @@ Patch18: systemd-238-upstream-dont-include-libmount-h.patch Patch19: systemd-239-glibc-2.28.patch Patch20: systemd-240-upstream_fix_return_values.patch Patch21: systemd-247-upstream-fixes-1.patch -Patch22: systemd-247-gnu-efi-3.0.13.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -83,21 +82,22 @@ BuildRequires: libcryptsetup-devel BuildRequires: libcurl-devel BuildRequires: libdw-devel BuildRequires: libelf-devel +BuildRequires: libfdisk-devel BuildRequires: libgcrypt-devel BuildRequires: libgnutls-devel BuildRequires: libgpg-error-devel -BuildRequires: libidn-devel BuildRequires: libkmod-devel BuildRequires: liblz4-devel BuildRequires: liblzma-devel BuildRequires: libmicrohttpd-devel BuildRequires: libmount-devel +BuildRequires: libopenssl-devel +BuildRequires: libp11-kit-devel BuildRequires: libpam-devel -BuildRequires: libpcre2-devel -BuildRequires: libqrencode-devel BuildRequires: libseccomp-devel BuildRequires: libselinux-devel BuildRequires: libz-devel +BuildRequires: libzstd-devel ## AUTOBUILDREQ-END BuildRequires: vala-tools BuildRequires: meson @@ -110,8 +110,11 @@ Requires: udev = %{?epoch:%epoch:}%{version}-%{release} Requires: kbd Requires: dbus >= 1.13.2 Provides: laptop-mode-tools -Requires: filesystem >= 2.3-4mamba -Obsoletes: laptop-mode-tools +Obsoletes: laptop-mode-tools < 248 +Provides: /sbin/halt +Provides: /sbin/poweroff +Provides: /sbin/reboot +Provides: /sbin/shutdown %description systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. @@ -148,7 +151,7 @@ Summary: Devel package for %{name} Group: Development/Libraries Requires: libsystemd = %{?epoch:%epoch:}%{version}-%{release} Provides: systemd-devel -Obsoletes: systemd-devel +Obsoletes: systemd-devel < 248 %description -n libsystemd-devel systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. @@ -174,10 +177,10 @@ Summary: A userspace tool to manage a dynamic devices directory Group: System/Kernel and Hardware Conflicts: devfsd Conflicts: udev173 -Obsoletes: devfsd -Obsoletes: hotplug +Obsoletes: devfsd < 248 +Obsoletes: hotplug < 248 Provides: udev-static -Obsoletes: udev-static +Obsoletes: udev-static < 248 Requires(post):/usr/sbin/groupadd Requires(post):setup Requires: %{name}-core = %{?epoch:%epoch:}%{version}-%{release} @@ -207,7 +210,7 @@ Summary: Development files for udev Group: Development/Libraries Requires: libudev = %{?epoch:%epoch:}%{version}-%{release} Provides: udev-devel -Obsoletes: udev-devel +Obsoletes: udev-devel < 248 %description -n libudev-devel Udev allows Linux users to have a dynamic /dev directory and it provides the ability to have persistent device names. @@ -220,10 +223,9 @@ This package include development files for building software using udev librarie %setup -q #-D -T #:<< _EOF -%patch21 -p1 -%patch22 -p1 +#%patch21 -p1 -sed -i "s|@bindir@|/bin|g" src/core/macros.systemd.in +#sed -i "s|@bindir@|/bin|g" src/core/macros.systemd.in %build #:<< _EOF @@ -244,12 +246,11 @@ export LC_ALL="en_US.UTF-8" --mandir=%{_mandir} \ --infodir=%{_datadir}/info \ -Dc_std=gnu11 \ - -Drootlibdir=/%{_lib} \ + -Drootlibdir=%{_libdir} \ -Dpamlibdir=/%{_lib}/security \ -Dtty-gid=4 \ -Dman=true \ -Dusers-gid=100 \ - -Dsplit-usr=true \ -Dsplit-bin=true \ -Dsysvinit-path=%{_initrddir} \ -Drc-local=%{_initrddir}/rc.local \ @@ -260,7 +261,10 @@ export LC_ALL="en_US.UTF-8" -Drpmmacrosdir=%{_sysconfdir}/rpm \ -Dsupport-url="https://openmamba.org" \ -Dntp-servers="0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 3.europe.pool.ntp.org" \ - -Ddefault-hierarchy=hybrid + -Ddefault-hierarchy=hybrid \ +%ifarch arm + -Dtests=false +%endif %meson_build @@ -276,31 +280,31 @@ fi #rpmmacrosdir=%{_sysconfdir}/rpm install -D -m644 %{S:2} \ - %{buildroot}/lib/udev/rules.d/60-permissions.rules + %{buildroot}%{_prefix}/lib/udev/rules.d/60-permissions.rules install -D -m644 %{S:4} \ - %{buildroot}/lib/udev/rules.d/55-udev-openmamba.rules + %{buildroot}%{_prefix}/lib/udev/rules.d/55-udev-openmamba.rules #install -D -m755 %{S:14} \ # %{buildroot}/lib/udev/rules.d/85-ifupdown.rules install -D -m755 %{S:8} \ - %{buildroot}/lib/udev/check-cdrom.sh + %{buildroot}%{_prefix}/lib/udev/check-cdrom.sh install -D -m644 %{S:13} \ %{buildroot}%{_sysconfdir}/modprobe.d/udev.conf -install -d -m0755 %{buildroot}/sbin +#install -d -m0755 %{buildroot}/sbin # compatibility symlinks -ln -s /lib/systemd/systemd-udevd %{buildroot}/sbin/udevd -ln -s libudev.so.1 %{buildroot}/%{_lib}/libudev.so.0 +#ln -s /lib/systemd/systemd-udevd %{buildroot}/sbin/udevd +ln -s libudev.so.1 %{buildroot}/%{_libdir}/libudev.so.0 -# fix libudev.so link since 232 -#mv %{buildroot}/%{_lib}/libudev.la %{buildroot}%{_libdir}/ -#rm -f %{buildroot}/%{_lib}/libudev.so -#ln -sf /%{_lib}/libudev.la %{buildroot}%{_libdir}/libudev.la -ln -sf /%{_lib}/libudev.so.1 %{buildroot}%{_libdir}/libudev.so -# same for libsystemd.so -#mv %{buildroot}/%{_lib}/libsystemd.la %{buildroot}%{_libdir}/ -#rm -f %{buildroot}/%{_lib}/libsystemd.so -#ln -sf /%{_lib}/libsystemd.la %{buildroot}%{_libdir}/libsystemd.la -ln -sf /%{_lib}/libsystemd.so.0 %{buildroot}%{_libdir}/libsystemd.so +## fix libudev.so link since 232 +##mv %{buildroot}/%{_lib}/libudev.la %{buildroot}%{_libdir}/ +##rm -f %{buildroot}/%{_lib}/libudev.so +##ln -sf /%{_lib}/libudev.la %{buildroot}%{_libdir}/libudev.la +#ln -sf /%{_lib}/libudev.so.1 %{buildroot}%{_libdir}/libudev.so +## same for libsystemd.so +##mv %{buildroot}/%{_lib}/libsystemd.la %{buildroot}%{_libdir}/ +##rm -f %{buildroot}/%{_lib}/libsystemd.so +##ln -sf /%{_lib}/libsystemd.la %{buildroot}%{_libdir}/libsystemd.la +#ln -sf /%{_lib}/libsystemd.so.0 %{buildroot}%{_libdir}/libsystemd.so # /etc/mtab symlink ln -s /proc/mounts %{buildroot}%{_sysconfdir}/mtab @@ -309,18 +313,12 @@ ln -s /proc/mounts %{buildroot}%{_sysconfdir}/mtab #mv %{buildroot}%{_libdir}/libnss_myhostname.so.* %{buildroot}/%{_lib}/ # install our systemd-sysv-install -install -D -m0755 %{SOURCE17} %{buildroot}/lib/systemd/systemd-sysv-install +install -D -m0755 %{SOURCE17} %{buildroot}%{_prefix}/lib/systemd/systemd-sysv-install %find_lang %{name} install -d -m0755 %{buildroot}%{_sysconfdir}/repart.d install -d -m0755 %{buildroot}%{_prefix}/lib/repart.d -# fix /sbin/init symlink after flat filesystem migration -rm -f %{buildroot}/sbin/init -ln -s /lib/systemd/systemd %{buildroot}/sbin/init -rm -f %{buildroot}/sbin/resolvconf -ln -s /usr/bin/resolvectl %{buildroot}/sbin/resolvconf - %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -392,6 +390,91 @@ if [ $1 -eq 0 ]; then 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 +: + +%posttrans core +if [ $1 -ge 1 ]; then + +[ -L /lib/systemd ] || { + # /lib/system -> /usr/lib/system + for d in systemd; do + [ -L /lib/$d ] && continue + echo "Migrating /lib/$d to /usr/lib/$d..." + for f in /lib/$d/*; do + dest=/usr$f + if [ -e $dest ]; then + #echo "$f exists as $dest" + if [ -L $f ]; then + linkdest=`readlink $f` + #echo "$f is a symlink to $linkdest" + rm -f $f + elif [ -L $dest ]; then + linkdest=`readlink $dest` + #echo "$dest is a symlink to $linkdest" + rm -f $dest && mv $f $dest + elif [ -d $dest ]; then + # second directory level + for f1 in $f/*; do + dest1=/usr$f1 + if [ ! -d $dest1 ]; then + mv $f1 $dest1 + else + # third directory level (should be enough) + for f2 in $f1/*; do + mv $f2 $dest1/ + done + rmdir $f1 2>/dev/null || true + fi + done + rmdir $f 2>/dev/null || true + else + #echo "$f exists as a file also as $linkdest" + rm -f $f + fi + else + if [ -L $f ]; then + linkdest=`readlink $f` + if [ "${linkdest:0:3}" = "../" ]; then + fulllinkdest=`readlink -f $f` + #echo "$f is a symlink pointing to ../ -> fixing" + ln -s $fulllinkdest $dest + rm -f $f + else + mv $f $dest + fi + else + mv $f $dest + fi + fi + done + rmdir /lib/$d || mv /lib/$d /lib/$d.notmigrated + ln -s ../usr/lib/$d /lib/$d + done +} +# Add if missing for safety +[ -e /lib/systemd ] || ln -s ../usr/lib/systemd /lib/systemd + + systemctl --no-reload preset systemd-timesyncd + # remove broken left sysv5 symlink due to migrating services to systemd + find /etc/rc*.d/* -xtype l -delete 2>/dev/null + systemctl -q daemon-reload + KVER=`uname -r` + INITRAMFS=/boot/initramfs-$KVER.img + KERNEL=/boot/vmlinuz-$KVER + [ -e $INITRAMFS -a ${_sysconfdir}/systemd/system.conf -nt $INITRAMFS ] || continue + [ -e $KERNEL -a -e /usr/bin/mkinitrd ] || continue + mkinitrd $INITRAMFS $KVER -f -q + # fix initial console fonts with lighter one and working FONT_MAP (219) + grep -q "^FONT_MAP=8859-1_to_uni" /etc/vconsole.conf && { + sed -i "s|^FONT_MAP=8859-1_to_uni|FONT_MAP=latin2u|" /etc/vconsole.conf + sed -i "s|^FONT=lat9w-16|FONT=LatGrkCyr-8x16|" /etc/vconsole.conf + } +fi +: + %post -n libsystemd /sbin/ldconfig : @@ -407,7 +490,7 @@ if [ -e %{_sysconfdir}/udev/rules.d/70-persistent-net.rules ]; then mv %{_sysconfdir}/udev/rules.d/70-persistent-net.rules \ %{_sysconfdir}/udev/rules.d/70-persistent-net.rules.save fi -exit 0 +: %post -n udev if [ $1 -ge 1 ]; then @@ -432,6 +515,11 @@ groupadd kvm -g %{group_kvm} 2>/dev/null groupadd render -g %{group_render} 2>/dev/null : +%triggerpostun core -- udev < 2:248 +# /bin and /sbin are removed during old filesystem postun +[ -e /lib/udev ] || ln -s ../usr/lib/udev /lib/udev +: + %post -n libudev /sbin/ldconfig : @@ -440,24 +528,56 @@ groupadd render -g %{group_render} 2>/dev/null /sbin/ldconfig : -%posttrans core -if [ $1 -ge 1 ]; then - systemctl --no-reload preset systemd-timesyncd - # remove broken left sysv5 symlink due to migrating services to systemd - find /etc/rc*.d/* -xtype l -delete 2>/dev/null - systemctl -q daemon-reload - KVER=`uname -r` - INITRAMFS=/boot/initramfs-$KVER.img - KERNEL=/boot/vmlinuz-$KVER - [ -e $INITRAMFS -a ${_sysconfdir}/systemd/system.conf -nt $INITRAMFS ] || continue - [ -e $KERNEL -a -e /usr/bin/mkinitrd ] || continue - mkinitrd $INITRAMFS $KVER -f -q - # fix initial console fonts with lighter one and working FONT_MAP (219) - grep -q "^FONT_MAP=8859-1_to_uni" /etc/vconsole.conf && { - sed -i "s|^FONT_MAP=8859-1_to_uni|FONT_MAP=latin2u|" /etc/vconsole.conf - sed -i "s|^FONT=lat9w-16|FONT=LatGrkCyr-8x16|" /etc/vconsole.conf - } -fi +%posttrans -n udev +[ -L /lib/udev ] || { + # /lib/udev -> /usr/lib/udev migration + for d in udev; do + [ -L /lib/$d ] && continue + echo "Migrating /lib/$d to /usr/lib/$d..." + for f in /lib/$d/*; do + dest=/usr$f + if [ -e $dest ]; then + #echo "$f exists as $dest" + if [ -L $f ]; then + linkdest=`readlink $f` + #echo "$f is a symlink to $linkdest" + rm -f $f + elif [ -L $dest ]; then + linkdest=`readlink $dest` + #echo "$dest is a symlink to $linkdest" + rm -f $dest && mv $f $dest + elif [ -d $dest ]; then + # second directory level + for f1 in $f/*; do + mv $f1 $dest/ + done + rmdir $f 2>/dev/null || true + else + #echo "$f exists as a file also as $linkdest" + rm -f $f + fi + else + if [ -L $f ]; then + linkdest=`readlink $f` + if [ "${linkdest:0:3}" = "../" ]; then + fulllinkdest=`readlink -f $f` + #echo "$f is a symlink pointing to ../ -> fixing" + ln -s $fulllinkdest $dest + rm -f $f + else + mv $f $dest + fi + else + mv $f $dest + fi + fi + done + rmdir /lib/$d || mv /lib/$d /lib/$d.notmigrated + ln -s ../usr/lib/$d /lib/$d + done +} +# Add if missing for safety +[ -e /lib/udev ] || ln -s ../usr/lib/udev /lib/udev : %transfiletriggerin -- %{_unitdir} /etc/systemd/system @@ -469,13 +589,13 @@ systemctl daemon-reload &>/dev/null || : %files %defattr(-,root,root) %{_initrddir}/README -/sbin/halt -/sbin/init -/sbin/poweroff -/sbin/reboot -/sbin/runlevel -/sbin/shutdown -/sbin/telinit +%{_sbindir}/halt +%{_sbindir}/init +%{_sbindir}/poweroff +%{_sbindir}/reboot +%{_sbindir}/runlevel +%{_sbindir}/shutdown +%{_sbindir}/telinit %{_mandir}/man1/init.1* %{_mandir}/man8/reboot.8* %{_mandir}/man8/halt.8* @@ -503,8 +623,8 @@ systemctl daemon-reload &>/dev/null || : %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %config(noreplace) %{_sysconfdir}/systemd/user.conf -%config(noreplace) %{_sysconfdir}/homed.conf -%config(noreplace) %{_sysconfdir}/oomd.conf +%config(noreplace) %{_sysconfdir}/systemd/homed.conf +%config(noreplace) %{_sysconfdir}/systemd/oomd.conf %{_sysconfdir}/mtab %dir %{_sysconfdir}/binfmt.d %dir %{_sysconfdir}/modules-load.d @@ -522,44 +642,18 @@ systemctl daemon-reload &>/dev/null || : %{_bindir}/kernel-install %{_bindir}/localectl %{_bindir}/resolvectl -%{_bindir}/systemd-dissect -%{_bindir}/systemd-mount -%{_bindir}/systemd-umount -%{_bindir}/systemd-path -%{_bindir}/systemd-run %{_bindir}/timedatectl -/bin/homectl -/bin/journalctl -/bin/loginctl -/bin/machinectl -/bin/networkctl -/bin/oomctl -/bin/portablectl -/bin/systemctl -/bin/userdbctl -/bin/systemd-ask-password -/bin/systemd-escape -/bin/systemd-firstboot -/bin/systemd-hwdb -/bin/systemd-inhibit -/bin/systemd-machine-id-setup -/bin/systemd-notify -/bin/systemd-repart -/bin/systemd-tmpfiles -/bin/systemd-tty-ask-password-agent -/bin/systemd-sysusers -/sbin/resolvconf -%{_bindir}/systemd-cat -%{_bindir}/systemd-cgtop -%{_bindir}/systemd-delta -%{_bindir}/systemd-detect-virt -%{_bindir}/systemd-analyze -%{_bindir}/systemd-cgls -%{_bindir}/systemd-id128 -%{_bindir}/systemd-nspawn -%{_bindir}/systemd-resolve -%{_bindir}/systemd-socket-activate -%{_bindir}/systemd-stdio-bridge +%{_bindir}/homectl +%{_bindir}/journalctl +%{_bindir}/loginctl +%{_bindir}/machinectl +%{_bindir}/networkctl +%{_bindir}/oomctl +%{_bindir}/portablectl +%{_bindir}/systemctl +%{_bindir}/userdbctl +%{_bindir}/systemd-* +%{_sbindir}/resolvconf %{_datadir}/bash-completion/completions/* %exclude %{_datadir}/bash-completion/completions/udevadm %dir %{_prefix}/lib/kernel @@ -570,19 +664,24 @@ systemctl daemon-reload &>/dev/null || : %dir %{_prefix}/lib/modules-load.d %dir %{_prefix}/lib/repart.d %dir %{_prefix}/lib/sysctl.d +%{_prefix}/lib/sysctl.d/README %{_prefix}/lib/sysctl.d/50-*.conf %dir %{_prefix}/lib/tmpfiles.d +%{_prefix}/lib/tmpfiles.d/README %dir %{_prefix}/lib/systemd %{_prefix}/lib/systemd/* %dir %{_prefix}/lib/sysusers.d +%{_prefix}/lib/sysusers.d/README %{_prefix}/lib/sysusers.d/*.conf -%dir /lib/systemd -/lib/systemd/* +#%dir /lib/systemd +#/lib/systemd/* %exclude /lib/systemd/systemd-udevd -/lib/udev/rules.d/99-systemd.rules +%{_prefix}/lib/udev/rules.d/99-systemd.rules %{_prefix}/lib/kernel/install.d/00-entry-directory.install %{_prefix}/lib/environment.d/99-environment.conf -/lib/modprobe.d/systemd.conf +%dir %{_prefix}/lib/modprobe.d +%{_prefix}/lib/modprobe.d/systemd.conf +%{_prefix}/lib/modprobe.d/README %{_prefix}/lib/tmpfiles.d/*.conf %{_datadir}/dbus-1/system.d/org.freedesktop.*.conf %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service @@ -640,15 +739,16 @@ systemctl daemon-reload &>/dev/null || : %{_mandir}/man8/nss-resolve.8* %{_mandir}/man8/pam_systemd.8* %{_mandir}/man8/pam_systemd_home.8* +%{_mandir}/man8/rc-local.service.8* %{_mandir}/man8/systemd-*.8* %{_mandir}/man8/30-systemd-environment-d-generator.8* %files -n libsystemd %defattr(-,root,root) -/%{_lib}/libsystemd.so.* +%{_libdir}/libsystemd.so.* /%{_lib}/security/pam_systemd.* /%{_lib}/security/pam_systemd_home.so -/%{_lib}/libnss_*.so.* +%{_libdir}/libnss_*.so.* #%doc LICENSE.LGPL2.1 %files -n libsystemd-devel @@ -656,7 +756,6 @@ systemctl daemon-reload &>/dev/null || : %{_sysconfdir}/rpm/macros.systemd %dir %{_includedir}/systemd %{_includedir}/systemd/*.h -/%{_lib}/libsystemd.so %{_libdir}/libsystemd.so %{_libdir}/pkgconfig/libsystemd.pc %dir %{_docdir}/systemd @@ -672,46 +771,46 @@ systemctl daemon-reload &>/dev/null || : %dir %{_sysconfdir}/udev/rules.d %{_sysconfdir}/udev/udev.conf %{_sysconfdir}/modprobe.d/udev.conf -/sbin/udevd -/bin/udevadm +#%{_sbindir}/udevd +%{_bindir}/udevadm %{_datadir}/bash-completion/completions/udevadm -/lib/systemd/systemd-udevd -%dir /lib/udev -#/lib/udev/accelerometer -/lib/udev/ata_id -/lib/udev/cdrom_id -/lib/udev/check-cdrom.sh -#/lib/udev/collect -/lib/udev/fido_id -%dir /lib/udev/hwdb.d -/lib/udev/hwdb.d/*.hwdb -/lib/udev/mtd_probe -%dir /lib/udev/rules.d -/lib/udev/rules.d/*.rules -%exclude /lib/udev/rules.d/99-systemd.rules -/lib/udev/scsi_id -/lib/udev/v4l_id +%{_prefix}/lib/systemd/systemd-udevd +%dir %{_prefix}/lib/udev +%{_prefix}/lib/udev/ata_id +%{_prefix}/lib/udev/cdrom_id +%{_prefix}/lib/udev/check-cdrom.sh +%{_prefix}/lib/udev/dmi_memory_id +%{_prefix}/lib/udev/fido_id +%dir %{_prefix}/lib/udev/hwdb.d +%{_prefix}/lib/udev/hwdb.d/README +%{_prefix}/lib/udev/hwdb.d/*.hwdb +%{_prefix}/lib/udev/mtd_probe +%dir %{_prefix}/lib/udev/rules.d +%{_prefix}/lib/udev/rules.d/README +%{_prefix}/lib/udev/rules.d/*.rules +%exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules +%{_prefix}/lib/udev/scsi_id +%{_prefix}/lib/udev/v4l_id %{_datadir}/pkgconfig/udev.pc %{_mandir}/man8/udevadm.8* #%doc LICENSE.GPL2 %files -n libudev %defattr(-,root,root) -/%{_lib}/libudev.so.* +%{_libdir}/libudev.so.* %files -n libudev-devel %defattr(-,root,root) %{_includedir}/libudev.h -/%{_lib}/libudev.so %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc %changelog -* Tue Apr 20 2021 Silvan Calarco 247-5mamba -- fix for symlinks fixed in previous release +* Tue Apr 13 2021 Silvan Calarco 248-2mamba +- perform migration in posttrans insted of pre of all new files get removed -* Mon Apr 19 2021 Silvan Calarco 247-4mamba -- fix /sbin/init and /sbin/resolvconf symlinks broken after flat bin dirs migration +* Tue Apr 13 2021 Automatic Build System 248-1mamba +- automatic version update by autodist * Sat Mar 06 2021 Silvan Calarco 247-3mamba - include rpm triggers file