Release 247-3mamba
This commit is contained in:
parent
f6cbf8e717
commit
767274370e
37
systemd.spec
37
systemd.spec
@ -27,7 +27,7 @@
|
|||||||
Name: systemd
|
Name: systemd
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Version: 247
|
Version: 247
|
||||||
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
|
||||||
@ -40,6 +40,7 @@ Source1: udev-initscript
|
|||||||
Source2: udev-permissions.rules
|
Source2: udev-permissions.rules
|
||||||
Source4: udev-openmamba.rules
|
Source4: udev-openmamba.rules
|
||||||
Source8: udev-check-cdrom.sh
|
Source8: udev-check-cdrom.sh
|
||||||
|
Source10: triggers.systemd
|
||||||
Source11: udev-MAKEDEV
|
Source11: udev-MAKEDEV
|
||||||
Source13: udev-blacklist
|
Source13: udev-blacklist
|
||||||
Source14: udev-ifupdown.rules
|
Source14: udev-ifupdown.rules
|
||||||
@ -223,12 +224,11 @@ This package include development files for building software using udev librarie
|
|||||||
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
|
|
||||||
# LANG Workaround for meson error
|
# LANG Workaround for meson error
|
||||||
export LANG="en_US.UTF-8"
|
export LANG="en_US.UTF-8"
|
||||||
export LC_ALL="en_US.UTF-8"
|
export LC_ALL="en_US.UTF-8"
|
||||||
|
|
||||||
meson build \
|
%meson \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--bindir=%{_bindir} \
|
--bindir=%{_bindir} \
|
||||||
--sbindir=%{_sbindir} \
|
--sbindir=%{_sbindir} \
|
||||||
@ -259,22 +259,18 @@ meson build \
|
|||||||
-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
|
||||||
|
|
||||||
# --build=release \
|
%meson_build
|
||||||
# KMOD=/sbin/kmod
|
|
||||||
# --enable-compat-libs \
|
|
||||||
|
|
||||||
|
if ! diff -u %{SOURCE10} build/src/core/triggers.systemd; then
|
||||||
#sed -i "s|@rootlibdir@|/%{_lib}|" src/libudev/libudev.pc
|
echo -e "\n\n\nWARNING: triggers.systemd in Source10 is different!"
|
||||||
|
echo -e " cp build/src/core/triggers.systemd %{SOURCE10}\n\n\n"
|
||||||
# TODO?
|
sleep 5
|
||||||
# --enable-terminal \
|
fi
|
||||||
# --enable-kdbus \
|
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
%makeinstall rpmmacrosdir=%{_sysconfdir}/rpm
|
%meson_install
|
||||||
|
#rpmmacrosdir=%{_sysconfdir}/rpm
|
||||||
|
|
||||||
install -D -m644 %{S:2} \
|
install -D -m644 %{S:2} \
|
||||||
%{buildroot}/lib/udev/rules.d/60-permissions.rules
|
%{buildroot}/lib/udev/rules.d/60-permissions.rules
|
||||||
@ -319,6 +315,8 @@ install -d -m0755 %{buildroot}%{_prefix}/lib/repart.d
|
|||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%include %{SOURCE10}
|
||||||
|
|
||||||
%pre core
|
%pre core
|
||||||
[ -e %{_sysconfdir}/mtab -a ! -L %{_sysconfdir}/mtab ] && rm -f %{_sysconfdir}/mtab
|
[ -e %{_sysconfdir}/mtab -a ! -L %{_sysconfdir}/mtab ] && rm -f %{_sysconfdir}/mtab
|
||||||
[ -L /var/lib/systemd/timesync ] && rm -f /var/lib/systemd/timesync
|
[ -L /var/lib/systemd/timesync ] && rm -f /var/lib/systemd/timesync
|
||||||
@ -453,6 +451,12 @@ if [ $1 -ge 1 ]; then
|
|||||||
fi
|
fi
|
||||||
:
|
:
|
||||||
|
|
||||||
|
%transfiletriggerin -- %{_unitdir} /etc/systemd/system
|
||||||
|
systemctl daemon-reload &>/dev/null || :
|
||||||
|
|
||||||
|
%transfiletriggerun -- %{_unitdir} /etc/systemd/system
|
||||||
|
systemctl daemon-reload &>/dev/null || :
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_initrddir}/README
|
%{_initrddir}/README
|
||||||
@ -694,6 +698,9 @@ fi
|
|||||||
%{_libdir}/pkgconfig/libudev.pc
|
%{_libdir}/pkgconfig/libudev.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 247-3mamba
|
||||||
|
- include rpm triggers file
|
||||||
|
|
||||||
* Sat Dec 26 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 247-2mamba
|
* Sat Dec 26 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 247-2mamba
|
||||||
- added patch with upstream fixes
|
- added patch with upstream fixes
|
||||||
|
|
||||||
|
143
triggers.systemd
Normal file
143
triggers.systemd
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
#
|
||||||
|
# This file is part of systemd.
|
||||||
|
# Copyright © 2018 Neal Gompa
|
||||||
|
|
||||||
|
# The contents of this are an example to be copied into systemd.spec.
|
||||||
|
#
|
||||||
|
# Minimum rpm version supported: 4.13.0
|
||||||
|
|
||||||
|
%transfiletriggerin -P 900900 -p <lua> -- /lib/systemd/system /etc/systemd/system
|
||||||
|
-- This script will run after any package is initially installed or
|
||||||
|
-- upgraded. We care about the case where a package is initially
|
||||||
|
-- installed, because other cases are covered by the *un scriptlets,
|
||||||
|
-- so sometimes we will reload needlessly.
|
||||||
|
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/systemctl", "daemon-reload"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerun -p <lua> -- /lib/systemd/system /etc/systemd/system
|
||||||
|
-- On removal, we need to run daemon-reload after any units have been
|
||||||
|
-- removed. %transfiletriggerpostun would be ideal, but it does not get
|
||||||
|
-- executed for some reason.
|
||||||
|
-- On upgrade, we need to run daemon-reload after any new unit files
|
||||||
|
-- have been installed, but before %postun scripts in packages get
|
||||||
|
-- executed. %transfiletriggerun gets the right list of files
|
||||||
|
-- but it is invoked too early (before changes happen).
|
||||||
|
-- %filetriggerpostun happens at the right time, but it fires for
|
||||||
|
-- every package.
|
||||||
|
-- To execute the reload at the right time, we create a state
|
||||||
|
-- file in %transfiletriggerun and execute the daemon-reload in
|
||||||
|
-- the first %filetriggerpostun.
|
||||||
|
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
posix.mkdir("%{_localstatedir}/lib")
|
||||||
|
posix.mkdir("%{_localstatedir}/lib/rpm-state")
|
||||||
|
posix.mkdir("%{_localstatedir}/lib/rpm-state/systemd")
|
||||||
|
io.open("%{_localstatedir}/lib/rpm-state/systemd/needs-reload", "w")
|
||||||
|
end
|
||||||
|
|
||||||
|
%filetriggerpostun -P 1000100 -p <lua> -- /lib/systemd/system /etc/systemd/system
|
||||||
|
if posix.access("%{_localstatedir}/lib/rpm-state/systemd/needs-reload") then
|
||||||
|
posix.unlink("%{_localstatedir}/lib/rpm-state/systemd/needs-reload")
|
||||||
|
posix.rmdir("%{_localstatedir}/lib/rpm-state/systemd")
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/systemctl", "daemon-reload"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -P 100700 -p <lua> -- /usr/lib/sysusers.d
|
||||||
|
-- This script will process files installed in /usr/lib/sysusers.d to create
|
||||||
|
-- specified users automatically. The priority is set such that it
|
||||||
|
-- will run before the tmpfiles file trigger.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/systemd-sysusers"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -P 100500 -p <lua> -- /usr/lib/tmpfiles.d
|
||||||
|
-- This script will process files installed in /usr/lib/tmpfiles.d to create
|
||||||
|
-- tmpfiles automatically. The priority is set such that it will run
|
||||||
|
-- after the sysusers file trigger, but before any other triggers.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/systemd-tmpfiles", "--create"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -p <lua> -- /lib/udev/hwdb.d
|
||||||
|
-- This script will automatically invoke hwdb update if files have been
|
||||||
|
-- installed or updated in /lib/udev/hwdb.d.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/systemd-hwdb", "update"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -p <lua> -- /usr/lib/systemd/catalog
|
||||||
|
-- This script will automatically invoke journal catalog update if files
|
||||||
|
-- have been installed or updated in /usr/lib/systemd/catalog.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/journalctl", "--update-catalog"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -p <lua> -- /lib/udev/rules.d
|
||||||
|
-- This script will automatically update udev with new rules if files
|
||||||
|
-- have been installed or updated in /lib/udev/rules.d.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("%{_bindir}/udevadm", "control", "--reload"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -p <lua> -- /usr/lib/sysctl.d
|
||||||
|
-- This script will automatically apply sysctl rules if files have been
|
||||||
|
-- installed or updated in /usr/lib/sysctl.d.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("/lib/systemd/systemd-sysctl"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
%transfiletriggerin -p <lua> -- /usr/lib/binfmt.d
|
||||||
|
-- This script will automatically apply binfmt rules if files have been
|
||||||
|
-- installed or updated in /usr/lib/binfmt.d.
|
||||||
|
if posix.access("/run/systemd/system") then
|
||||||
|
pid = posix.fork()
|
||||||
|
if pid == 0 then
|
||||||
|
assert(posix.exec("/lib/systemd/systemd-binfmt"))
|
||||||
|
elseif pid > 0 then
|
||||||
|
posix.wait(pid)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user