packages: systemd/systemd.spec, systemd/systemd_booted.c (NEW) - added syst...

wiget wiget at pld-linux.org
Sun Dec 4 14:23:36 CET 2011


Author: wiget                        Date: Sun Dec  4 13:23:36 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added systemd_booted (check if system is booted with systemd)

---- Files affected:
packages/systemd:
   systemd.spec (1.58 -> 1.59) , systemd_booted.c (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/systemd/systemd.spec
diff -u packages/systemd/systemd.spec:1.58 packages/systemd/systemd.spec:1.59
--- packages/systemd/systemd.spec:1.58	Sun Dec  4 04:16:18 2011
+++ packages/systemd/systemd.spec	Sun Dec  4 14:23:30 2011
@@ -1,12 +1,4 @@
 # $Revision$, $Date$
-# UNPACKAGED files:
-#   /etc/hostname
-#   /etc/locale.conf
-#   /etc/machine-info
-#   /etc/os-release
-#   /etc/timezone
-#   /etc/vconsole.conf
-#
 # TODO:	- move %_libexecdir/tmpfiles.d/* to /etc/tmpfiles.d?
 #	- shouldn't ../bin/systemctl symlinks be absolute? -no they shouldn't (think browsing mounted as chroot and seeing all blink due invalid link targets when doing ls)
 #	- separate init subpackage (with symlink), one can switch to
@@ -25,12 +17,13 @@
 Summary(pl.UTF-8):	systemd - zarządca systemu i usług dla Linuksa
 Name:		systemd
 Version:	37
-Release:	0.9
+Release:	0.10
 License:	GPL v2+
 Group:		Base
 Source0:	http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2
 # Source0-md5:	1435f23be79c8c38d1121c6b150510f3
 Source1:	%{name}-sysv-convert
+Source2:	systemd_booted.c
 Patch0:		target-pld.patch
 Patch1:		config-pld.patch
 URL:		http://www.freedesktop.org/wiki/Software/systemd
@@ -161,6 +154,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+cp -p %{SOURCE2} src/systemd_booted.c
 
 %build
 %{__aclocal} -I m4
@@ -179,6 +173,7 @@
 	--with-rootdir=
 
 %{__make}
+./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd-daemon
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -186,6 +181,8 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+./libtool --mode=install install -m755 systemd_booted $RPM_BUILD_ROOT/bin/systemd_booted
+
 for lib in libsystemd-daemon libsystemd-login; do
 	%{__mv} $RPM_BUILD_ROOT{%{_libdir}/$lib.so.*,/%{_lib}}
 	ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/$lib.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/$lib.so
@@ -300,6 +297,12 @@
 /etc/dbus-1/system.d/org.freedesktop.systemd1.conf
 /etc/dbus-1/system.d/org.freedesktop.timedate1.conf
 %ghost %config(noreplace) %{_sysconfdir}/machine-id
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostname
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locale.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/machine-info
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/os-release
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timezone
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vconsole.conf
 %dir %{_sysconfdir}/systemd
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/*.conf
 /etc/xdg/systemd
@@ -416,6 +419,7 @@
 %dir %{_libexecdir}/sysctl.d
 %attr(755,root,root) /bin/systemctl
 %attr(755,root,root) /bin/systemd-tmpfiles
+%attr(755,root,root) /bin/systemd_booted
 %{_mandir}/man1/systemctl.1*
 %{_mandir}/man5/tmpfiles.d.5*
 %{_mandir}/man8/systemd-tmpfiles.8*
@@ -471,6 +475,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.59  2011/12/04 13:23:30  wiget
+- added systemd_booted (check if system is booted with systemd)
+
 Revision 1.58  2011/12/04 03:16:18  wiget
 - package more *.target.wants dirs
 

================================================================
Index: packages/systemd/systemd_booted.c
diff -u /dev/null packages/systemd/systemd_booted.c:1.1
--- /dev/null	Sun Dec  4 14:23:36 2011
+++ packages/systemd/systemd_booted.c	Sun Dec  4 14:23:30 2011
@@ -0,0 +1,5 @@
+#include "sd-daemon.h"
+
+int main(int argc, char*argv[]) {
+	return (sd_booted() > 0) ? 0 : 1;
+}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/systemd/systemd.spec?r1=1.58&r2=1.59&f=u



More information about the pld-cvs-commit mailing list