[packages/rc-scripts] - rel 6; prepare tmpfiles based on systemd configs (even when not using systemd)

arekm arekm at pld-linux.org
Wed Jan 15 15:27:00 CET 2020


commit 4e59ae97a3b65995dc8685b3e9e9992177e9e9bd
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Jan 15 15:26:46 2020 +0100

    - rel 6; prepare tmpfiles based on systemd configs (even when not using systemd)

 rc-scripts.spec |  4 +++-
 tmpfiles.patch  | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletion(-)
---
diff --git a/rc-scripts.spec b/rc-scripts.spec
index 7e0e5e0..f522f7f 100644
--- a/rc-scripts.spec
+++ b/rc-scripts.spec
@@ -11,7 +11,7 @@ Summary(pl.UTF-8):	inittab i skrypty startowe z katalogu /etc/rc.d
 Summary(tr.UTF-8):	inittab ve /etc/rc.d dosyaları
 Name:		rc-scripts
 Version:	0.4.18
-Release:	5
+Release:	6
 License:	GPL v2
 Group:		Base
 #Source0:	ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.gz
@@ -23,6 +23,7 @@ Source3:	%{name}.tmpfiles
 Patch0:		95229.patch
 Patch1:		27a3470.patch
 Patch2:		%{name}-bond.patch
+Patch3:		tmpfiles.patch
 URL:		http://svn.pld-linux.org/trac/svn/wiki/packages/rc-scripts
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -144,6 +145,7 @@ po cichu ignorowane.
 #%patch0 -p3 -d lib
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch:
 #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"
diff --git a/tmpfiles.patch b/tmpfiles.patch
new file mode 100644
index 0000000..973cf65
--- /dev/null
+++ b/tmpfiles.patch
@@ -0,0 +1,57 @@
+commit a268fbbd235b78d863a4181bc1b7d5bdbbe3c1e4
+Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
+Date:   Wed Jan 15 14:56:29 2020 +0100
+
+    Clean and recreate systemd tmpfiles (even if not using systemd).
+
+diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
+index 936244b..083b080 100755
+--- a/rc.d/rc.sysinit
++++ b/rc.d/rc.sysinit
+@@ -1029,6 +1029,8 @@ touch /var/log/wtmp
+ chown root:utmp /var/run/utmp /var/log/wtmp
+ chmod 0664 /var/run/utmp /var/log/wtmp
+ 
++[ -x /bin/systemd-tmpfiles ] && /bin/systemd-tmpfiles --clean --boot
++
+ # Clean /tmp
+ if is_yes "$CLEAN_TMP" && ! is_fsmounted tmpfs /tmp; then
+ 	LC_ALL=C rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
+@@ -1039,6 +1041,8 @@ mkdir -m 1777 -p /tmp/.ICE-unix > /dev/null 2>&1
+ chown root:root /tmp/.ICE-unix
+ is_yes "$SELINUX" && restorecon /tmp/.ICE-unix >/dev/null 2>&1
+ 
++[ -x /bin/systemd-tmpfiles ] && /bin/systemd-tmpfiles --create --boot
++
+ test -d /var/run/netreport || mkdir -m 770 /var/run/netreport
+ 
+ if ! is_yes "$VSERVER"; then
+
+commit 4b8afb999975a31089c08cdcfcdce5dd466a1bbf
+Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
+Date:   Wed Jan 15 15:12:43 2020 +0100
+
+    Silence notices (like 'Line references path below legacy directory /var/run/...').
+
+diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
+index 083b080..b55f0cc 100755
+--- a/rc.d/rc.sysinit
++++ b/rc.d/rc.sysinit
+@@ -1029,7 +1029,7 @@ touch /var/log/wtmp
+ chown root:utmp /var/run/utmp /var/log/wtmp
+ chmod 0664 /var/run/utmp /var/log/wtmp
+ 
+-[ -x /bin/systemd-tmpfiles ] && /bin/systemd-tmpfiles --clean --boot
++[ -x /bin/systemd-tmpfiles ] && SYSTEMD_LOG_LEVEL=warning /bin/systemd-tmpfiles --clean --boot
+ 
+ # Clean /tmp
+ if is_yes "$CLEAN_TMP" && ! is_fsmounted tmpfs /tmp; then
+@@ -1041,7 +1041,7 @@ mkdir -m 1777 -p /tmp/.ICE-unix > /dev/null 2>&1
+ chown root:root /tmp/.ICE-unix
+ is_yes "$SELINUX" && restorecon /tmp/.ICE-unix >/dev/null 2>&1
+ 
+-[ -x /bin/systemd-tmpfiles ] && /bin/systemd-tmpfiles --create --boot
++[ -x /bin/systemd-tmpfiles ] && SYSTEMD_LOG_LEVEL=warning /bin/systemd-tmpfiles --create --boot
+ 
+ test -d /var/run/netreport || mkdir -m 770 /var/run/netreport
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rc-scripts.git/commitdiff/4e59ae97a3b65995dc8685b3e9e9992177e9e9bd



More information about the pld-cvs-commit mailing list