Release 248-2mamba

This commit is contained in:
Automatic Build System 2023-12-30 11:39:47 +01:00
parent 81c2607ba9
commit 1898ba2b75
2 changed files with 238 additions and 315 deletions

View File

@ -1,176 +0,0 @@
From 48fff0a2af3f62acd446ebec8081b039b72caad8 Mon Sep 17 00:00:00 2001
From: Daan De Meyer <daan.j.demeyer@gmail.com>
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

View File

@ -26,14 +26,14 @@
Name: systemd Name: systemd
Epoch: 2 Epoch: 2
Version: 247 Version: 248
Release: 5mamba Release: 2mamba
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
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
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: https://github.com/systemd/systemd.git/v%{version}/systemd-%{version}.tar.bz2
#Source: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz #Source: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz
Source1: udev-initscript Source1: udev-initscript
@ -69,7 +69,6 @@ Patch18: systemd-238-upstream-dont-include-libmount-h.patch
Patch19: systemd-239-glibc-2.28.patch Patch19: systemd-239-glibc-2.28.patch
Patch20: systemd-240-upstream_fix_return_values.patch Patch20: systemd-240-upstream_fix_return_values.patch
Patch21: systemd-247-upstream-fixes-1.patch Patch21: systemd-247-upstream-fixes-1.patch
Patch22: systemd-247-gnu-efi-3.0.13.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -83,21 +82,22 @@ BuildRequires: libcryptsetup-devel
BuildRequires: libcurl-devel BuildRequires: libcurl-devel
BuildRequires: libdw-devel BuildRequires: libdw-devel
BuildRequires: libelf-devel BuildRequires: libelf-devel
BuildRequires: libfdisk-devel
BuildRequires: libgcrypt-devel BuildRequires: libgcrypt-devel
BuildRequires: libgnutls-devel BuildRequires: libgnutls-devel
BuildRequires: libgpg-error-devel BuildRequires: libgpg-error-devel
BuildRequires: libidn-devel
BuildRequires: libkmod-devel BuildRequires: libkmod-devel
BuildRequires: liblz4-devel BuildRequires: liblz4-devel
BuildRequires: liblzma-devel BuildRequires: liblzma-devel
BuildRequires: libmicrohttpd-devel BuildRequires: libmicrohttpd-devel
BuildRequires: libmount-devel BuildRequires: libmount-devel
BuildRequires: libopenssl-devel
BuildRequires: libp11-kit-devel
BuildRequires: libpam-devel BuildRequires: libpam-devel
BuildRequires: libpcre2-devel
BuildRequires: libqrencode-devel
BuildRequires: libseccomp-devel BuildRequires: libseccomp-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: libz-devel BuildRequires: libz-devel
BuildRequires: libzstd-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: vala-tools BuildRequires: vala-tools
BuildRequires: meson BuildRequires: meson
@ -110,8 +110,11 @@ Requires: udev = %{?epoch:%epoch:}%{version}-%{release}
Requires: kbd Requires: kbd
Requires: dbus >= 1.13.2 Requires: dbus >= 1.13.2
Provides: laptop-mode-tools Provides: laptop-mode-tools
Requires: filesystem >= 2.3-4mamba Obsoletes: laptop-mode-tools < 248
Obsoletes: laptop-mode-tools Provides: /sbin/halt
Provides: /sbin/poweroff
Provides: /sbin/reboot
Provides: /sbin/shutdown
%description %description
systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. 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 Group: Development/Libraries
Requires: libsystemd = %{?epoch:%epoch:}%{version}-%{release} Requires: libsystemd = %{?epoch:%epoch:}%{version}-%{release}
Provides: systemd-devel Provides: systemd-devel
Obsoletes: systemd-devel Obsoletes: systemd-devel < 248
%description -n libsystemd-devel %description -n libsystemd-devel
systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. 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 Group: System/Kernel and Hardware
Conflicts: devfsd Conflicts: devfsd
Conflicts: udev173 Conflicts: udev173
Obsoletes: devfsd Obsoletes: devfsd < 248
Obsoletes: hotplug Obsoletes: hotplug < 248
Provides: udev-static Provides: udev-static
Obsoletes: udev-static Obsoletes: udev-static < 248
Requires(post):/usr/sbin/groupadd Requires(post):/usr/sbin/groupadd
Requires(post):setup Requires(post):setup
Requires: %{name}-core = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name}-core = %{?epoch:%epoch:}%{version}-%{release}
@ -207,7 +210,7 @@ Summary: Development files for udev
Group: Development/Libraries Group: Development/Libraries
Requires: libudev = %{?epoch:%epoch:}%{version}-%{release} Requires: libudev = %{?epoch:%epoch:}%{version}-%{release}
Provides: udev-devel Provides: udev-devel
Obsoletes: udev-devel Obsoletes: udev-devel < 248
%description -n libudev-devel %description -n libudev-devel
Udev allows Linux users to have a dynamic /dev directory and it provides the ability to have persistent device names. 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 %setup -q
#-D -T #-D -T
#:<< _EOF #:<< _EOF
%patch21 -p1 #%patch21 -p1
%patch22 -p1
sed -i "s|@bindir@|/bin|g" src/core/macros.systemd.in #sed -i "s|@bindir@|/bin|g" src/core/macros.systemd.in
%build %build
#:<< _EOF #:<< _EOF
@ -244,12 +246,11 @@ export LC_ALL="en_US.UTF-8"
--mandir=%{_mandir} \ --mandir=%{_mandir} \
--infodir=%{_datadir}/info \ --infodir=%{_datadir}/info \
-Dc_std=gnu11 \ -Dc_std=gnu11 \
-Drootlibdir=/%{_lib} \ -Drootlibdir=%{_libdir} \
-Dpamlibdir=/%{_lib}/security \ -Dpamlibdir=/%{_lib}/security \
-Dtty-gid=4 \ -Dtty-gid=4 \
-Dman=true \ -Dman=true \
-Dusers-gid=100 \ -Dusers-gid=100 \
-Dsplit-usr=true \
-Dsplit-bin=true \ -Dsplit-bin=true \
-Dsysvinit-path=%{_initrddir} \ -Dsysvinit-path=%{_initrddir} \
-Drc-local=%{_initrddir}/rc.local \ -Drc-local=%{_initrddir}/rc.local \
@ -260,7 +261,10 @@ export LC_ALL="en_US.UTF-8"
-Drpmmacrosdir=%{_sysconfdir}/rpm \ -Drpmmacrosdir=%{_sysconfdir}/rpm \
-Dsupport-url="https://openmamba.org" \ -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" \ -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 %meson_build
@ -276,31 +280,31 @@ fi
#rpmmacrosdir=%{_sysconfdir}/rpm #rpmmacrosdir=%{_sysconfdir}/rpm
install -D -m644 %{S:2} \ 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} \ 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} \ #install -D -m755 %{S:14} \
# %{buildroot}/lib/udev/rules.d/85-ifupdown.rules # %{buildroot}/lib/udev/rules.d/85-ifupdown.rules
install -D -m755 %{S:8} \ install -D -m755 %{S:8} \
%{buildroot}/lib/udev/check-cdrom.sh %{buildroot}%{_prefix}/lib/udev/check-cdrom.sh
install -D -m644 %{S:13} \ install -D -m644 %{S:13} \
%{buildroot}%{_sysconfdir}/modprobe.d/udev.conf %{buildroot}%{_sysconfdir}/modprobe.d/udev.conf
install -d -m0755 %{buildroot}/sbin #install -d -m0755 %{buildroot}/sbin
# compatibility symlinks # compatibility symlinks
ln -s /lib/systemd/systemd-udevd %{buildroot}/sbin/udevd #ln -s /lib/systemd/systemd-udevd %{buildroot}/sbin/udevd
ln -s libudev.so.1 %{buildroot}/%{_lib}/libudev.so.0 ln -s libudev.so.1 %{buildroot}/%{_libdir}/libudev.so.0
# fix libudev.so link since 232 ## fix libudev.so link since 232
#mv %{buildroot}/%{_lib}/libudev.la %{buildroot}%{_libdir}/ ##mv %{buildroot}/%{_lib}/libudev.la %{buildroot}%{_libdir}/
#rm -f %{buildroot}/%{_lib}/libudev.so ##rm -f %{buildroot}/%{_lib}/libudev.so
#ln -sf /%{_lib}/libudev.la %{buildroot}%{_libdir}/libudev.la ##ln -sf /%{_lib}/libudev.la %{buildroot}%{_libdir}/libudev.la
ln -sf /%{_lib}/libudev.so.1 %{buildroot}%{_libdir}/libudev.so #ln -sf /%{_lib}/libudev.so.1 %{buildroot}%{_libdir}/libudev.so
# same for libsystemd.so ## same for libsystemd.so
#mv %{buildroot}/%{_lib}/libsystemd.la %{buildroot}%{_libdir}/ ##mv %{buildroot}/%{_lib}/libsystemd.la %{buildroot}%{_libdir}/
#rm -f %{buildroot}/%{_lib}/libsystemd.so ##rm -f %{buildroot}/%{_lib}/libsystemd.so
#ln -sf /%{_lib}/libsystemd.la %{buildroot}%{_libdir}/libsystemd.la ##ln -sf /%{_lib}/libsystemd.la %{buildroot}%{_libdir}/libsystemd.la
ln -sf /%{_lib}/libsystemd.so.0 %{buildroot}%{_libdir}/libsystemd.so #ln -sf /%{_lib}/libsystemd.so.0 %{buildroot}%{_libdir}/libsystemd.so
# /etc/mtab symlink # /etc/mtab symlink
ln -s /proc/mounts %{buildroot}%{_sysconfdir}/mtab 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}/ #mv %{buildroot}%{_libdir}/libnss_myhostname.so.* %{buildroot}/%{_lib}/
# install our systemd-sysv-install # 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} %find_lang %{name}
install -d -m0755 %{buildroot}%{_sysconfdir}/repart.d install -d -m0755 %{buildroot}%{_sysconfdir}/repart.d
install -d -m0755 %{buildroot}%{_prefix}/lib/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 %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -392,6 +390,91 @@ if [ $1 -eq 0 ]; then
fi 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 %post -n libsystemd
/sbin/ldconfig /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 \ mv %{_sysconfdir}/udev/rules.d/70-persistent-net.rules \
%{_sysconfdir}/udev/rules.d/70-persistent-net.rules.save %{_sysconfdir}/udev/rules.d/70-persistent-net.rules.save
fi fi
exit 0 :
%post -n udev %post -n udev
if [ $1 -ge 1 ]; then 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 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 %post -n libudev
/sbin/ldconfig /sbin/ldconfig
: :
@ -440,24 +528,56 @@ groupadd render -g %{group_render} 2>/dev/null
/sbin/ldconfig /sbin/ldconfig
: :
%posttrans core %posttrans -n udev
if [ $1 -ge 1 ]; then [ -L /lib/udev ] || {
systemctl --no-reload preset systemd-timesyncd # /lib/udev -> /usr/lib/udev migration
# remove broken left sysv5 symlink due to migrating services to systemd for d in udev; do
find /etc/rc*.d/* -xtype l -delete 2>/dev/null [ -L /lib/$d ] && continue
systemctl -q daemon-reload echo "Migrating /lib/$d to /usr/lib/$d..."
KVER=`uname -r` for f in /lib/$d/*; do
INITRAMFS=/boot/initramfs-$KVER.img dest=/usr$f
KERNEL=/boot/vmlinuz-$KVER if [ -e $dest ]; then
[ -e $INITRAMFS -a ${_sysconfdir}/systemd/system.conf -nt $INITRAMFS ] || continue #echo "$f exists as $dest"
[ -e $KERNEL -a -e /usr/bin/mkinitrd ] || continue if [ -L $f ]; then
mkinitrd $INITRAMFS $KVER -f -q linkdest=`readlink $f`
# fix initial console fonts with lighter one and working FONT_MAP (219) #echo "$f is a symlink to $linkdest"
grep -q "^FONT_MAP=8859-1_to_uni" /etc/vconsole.conf && { rm -f $f
sed -i "s|^FONT_MAP=8859-1_to_uni|FONT_MAP=latin2u|" /etc/vconsole.conf elif [ -L $dest ]; then
sed -i "s|^FONT=lat9w-16|FONT=LatGrkCyr-8x16|" /etc/vconsole.conf linkdest=`readlink $dest`
} #echo "$dest is a symlink to $linkdest"
fi 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 %transfiletriggerin -- %{_unitdir} /etc/systemd/system
@ -469,13 +589,13 @@ systemctl daemon-reload &>/dev/null || :
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_initrddir}/README %{_initrddir}/README
/sbin/halt %{_sbindir}/halt
/sbin/init %{_sbindir}/init
/sbin/poweroff %{_sbindir}/poweroff
/sbin/reboot %{_sbindir}/reboot
/sbin/runlevel %{_sbindir}/runlevel
/sbin/shutdown %{_sbindir}/shutdown
/sbin/telinit %{_sbindir}/telinit
%{_mandir}/man1/init.1* %{_mandir}/man1/init.1*
%{_mandir}/man8/reboot.8* %{_mandir}/man8/reboot.8*
%{_mandir}/man8/halt.8* %{_mandir}/man8/halt.8*
@ -503,8 +623,8 @@ systemctl daemon-reload &>/dev/null || :
%dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/system
%dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/systemd/user
%config(noreplace) %{_sysconfdir}/systemd/user.conf %config(noreplace) %{_sysconfdir}/systemd/user.conf
%config(noreplace) %{_sysconfdir}/homed.conf %config(noreplace) %{_sysconfdir}/systemd/homed.conf
%config(noreplace) %{_sysconfdir}/oomd.conf %config(noreplace) %{_sysconfdir}/systemd/oomd.conf
%{_sysconfdir}/mtab %{_sysconfdir}/mtab
%dir %{_sysconfdir}/binfmt.d %dir %{_sysconfdir}/binfmt.d
%dir %{_sysconfdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d
@ -522,44 +642,18 @@ systemctl daemon-reload &>/dev/null || :
%{_bindir}/kernel-install %{_bindir}/kernel-install
%{_bindir}/localectl %{_bindir}/localectl
%{_bindir}/resolvectl %{_bindir}/resolvectl
%{_bindir}/systemd-dissect
%{_bindir}/systemd-mount
%{_bindir}/systemd-umount
%{_bindir}/systemd-path
%{_bindir}/systemd-run
%{_bindir}/timedatectl %{_bindir}/timedatectl
/bin/homectl %{_bindir}/homectl
/bin/journalctl %{_bindir}/journalctl
/bin/loginctl %{_bindir}/loginctl
/bin/machinectl %{_bindir}/machinectl
/bin/networkctl %{_bindir}/networkctl
/bin/oomctl %{_bindir}/oomctl
/bin/portablectl %{_bindir}/portablectl
/bin/systemctl %{_bindir}/systemctl
/bin/userdbctl %{_bindir}/userdbctl
/bin/systemd-ask-password %{_bindir}/systemd-*
/bin/systemd-escape %{_sbindir}/resolvconf
/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
%{_datadir}/bash-completion/completions/* %{_datadir}/bash-completion/completions/*
%exclude %{_datadir}/bash-completion/completions/udevadm %exclude %{_datadir}/bash-completion/completions/udevadm
%dir %{_prefix}/lib/kernel %dir %{_prefix}/lib/kernel
@ -570,19 +664,24 @@ systemctl daemon-reload &>/dev/null || :
%dir %{_prefix}/lib/modules-load.d %dir %{_prefix}/lib/modules-load.d
%dir %{_prefix}/lib/repart.d %dir %{_prefix}/lib/repart.d
%dir %{_prefix}/lib/sysctl.d %dir %{_prefix}/lib/sysctl.d
%{_prefix}/lib/sysctl.d/README
%{_prefix}/lib/sysctl.d/50-*.conf %{_prefix}/lib/sysctl.d/50-*.conf
%dir %{_prefix}/lib/tmpfiles.d %dir %{_prefix}/lib/tmpfiles.d
%{_prefix}/lib/tmpfiles.d/README
%dir %{_prefix}/lib/systemd %dir %{_prefix}/lib/systemd
%{_prefix}/lib/systemd/* %{_prefix}/lib/systemd/*
%dir %{_prefix}/lib/sysusers.d %dir %{_prefix}/lib/sysusers.d
%{_prefix}/lib/sysusers.d/README
%{_prefix}/lib/sysusers.d/*.conf %{_prefix}/lib/sysusers.d/*.conf
%dir /lib/systemd #%dir /lib/systemd
/lib/systemd/* #/lib/systemd/*
%exclude /lib/systemd/systemd-udevd %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/kernel/install.d/00-entry-directory.install
%{_prefix}/lib/environment.d/99-environment.conf %{_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 %{_prefix}/lib/tmpfiles.d/*.conf
%{_datadir}/dbus-1/system.d/org.freedesktop.*.conf %{_datadir}/dbus-1/system.d/org.freedesktop.*.conf
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
@ -640,15 +739,16 @@ systemctl daemon-reload &>/dev/null || :
%{_mandir}/man8/nss-resolve.8* %{_mandir}/man8/nss-resolve.8*
%{_mandir}/man8/pam_systemd.8* %{_mandir}/man8/pam_systemd.8*
%{_mandir}/man8/pam_systemd_home.8* %{_mandir}/man8/pam_systemd_home.8*
%{_mandir}/man8/rc-local.service.8*
%{_mandir}/man8/systemd-*.8* %{_mandir}/man8/systemd-*.8*
%{_mandir}/man8/30-systemd-environment-d-generator.8* %{_mandir}/man8/30-systemd-environment-d-generator.8*
%files -n libsystemd %files -n libsystemd
%defattr(-,root,root) %defattr(-,root,root)
/%{_lib}/libsystemd.so.* %{_libdir}/libsystemd.so.*
/%{_lib}/security/pam_systemd.* /%{_lib}/security/pam_systemd.*
/%{_lib}/security/pam_systemd_home.so /%{_lib}/security/pam_systemd_home.so
/%{_lib}/libnss_*.so.* %{_libdir}/libnss_*.so.*
#%doc LICENSE.LGPL2.1 #%doc LICENSE.LGPL2.1
%files -n libsystemd-devel %files -n libsystemd-devel
@ -656,7 +756,6 @@ systemctl daemon-reload &>/dev/null || :
%{_sysconfdir}/rpm/macros.systemd %{_sysconfdir}/rpm/macros.systemd
%dir %{_includedir}/systemd %dir %{_includedir}/systemd
%{_includedir}/systemd/*.h %{_includedir}/systemd/*.h
/%{_lib}/libsystemd.so
%{_libdir}/libsystemd.so %{_libdir}/libsystemd.so
%{_libdir}/pkgconfig/libsystemd.pc %{_libdir}/pkgconfig/libsystemd.pc
%dir %{_docdir}/systemd %dir %{_docdir}/systemd
@ -672,46 +771,46 @@ systemctl daemon-reload &>/dev/null || :
%dir %{_sysconfdir}/udev/rules.d %dir %{_sysconfdir}/udev/rules.d
%{_sysconfdir}/udev/udev.conf %{_sysconfdir}/udev/udev.conf
%{_sysconfdir}/modprobe.d/udev.conf %{_sysconfdir}/modprobe.d/udev.conf
/sbin/udevd #%{_sbindir}/udevd
/bin/udevadm %{_bindir}/udevadm
%{_datadir}/bash-completion/completions/udevadm %{_datadir}/bash-completion/completions/udevadm
/lib/systemd/systemd-udevd %{_prefix}/lib/systemd/systemd-udevd
%dir /lib/udev %dir %{_prefix}/lib/udev
#/lib/udev/accelerometer %{_prefix}/lib/udev/ata_id
/lib/udev/ata_id %{_prefix}/lib/udev/cdrom_id
/lib/udev/cdrom_id %{_prefix}/lib/udev/check-cdrom.sh
/lib/udev/check-cdrom.sh %{_prefix}/lib/udev/dmi_memory_id
#/lib/udev/collect %{_prefix}/lib/udev/fido_id
/lib/udev/fido_id %dir %{_prefix}/lib/udev/hwdb.d
%dir /lib/udev/hwdb.d %{_prefix}/lib/udev/hwdb.d/README
/lib/udev/hwdb.d/*.hwdb %{_prefix}/lib/udev/hwdb.d/*.hwdb
/lib/udev/mtd_probe %{_prefix}/lib/udev/mtd_probe
%dir /lib/udev/rules.d %dir %{_prefix}/lib/udev/rules.d
/lib/udev/rules.d/*.rules %{_prefix}/lib/udev/rules.d/README
%exclude /lib/udev/rules.d/99-systemd.rules %{_prefix}/lib/udev/rules.d/*.rules
/lib/udev/scsi_id %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules
/lib/udev/v4l_id %{_prefix}/lib/udev/scsi_id
%{_prefix}/lib/udev/v4l_id
%{_datadir}/pkgconfig/udev.pc %{_datadir}/pkgconfig/udev.pc
%{_mandir}/man8/udevadm.8* %{_mandir}/man8/udevadm.8*
#%doc LICENSE.GPL2 #%doc LICENSE.GPL2
%files -n libudev %files -n libudev
%defattr(-,root,root) %defattr(-,root,root)
/%{_lib}/libudev.so.* %{_libdir}/libudev.so.*
%files -n libudev-devel %files -n libudev-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/libudev.h %{_includedir}/libudev.h
/%{_lib}/libudev.so
%{_libdir}/libudev.so %{_libdir}/libudev.so
%{_libdir}/pkgconfig/libudev.pc %{_libdir}/pkgconfig/libudev.pc
%changelog %changelog
* Tue Apr 20 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 247-5mamba * Tue Apr 13 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 248-2mamba
- fix for symlinks fixed in previous release - perform migration in posttrans insted of pre of all new files get removed
* Mon Apr 19 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 247-4mamba * Tue Apr 13 2021 Automatic Build System <autodist@mambasoft.it> 248-1mamba
- fix /sbin/init and /sbin/resolvconf symlinks broken after flat bin dirs migration - automatic version update by autodist
* Sat Mar 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 247-3mamba * Sat Mar 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 247-3mamba
- include rpm triggers file - include rpm triggers file