Author: baggins                      Date: Mon Jan 30 13:49:48 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new macro __spec_install_post_check_tmpfiles to avoid missing files under
  /var/run on systems running systemd

---- Files affected:
packages/rpm-build-macros:
   rpm.macros (1.635 -> 1.636) 

---- Diffs:

================================================================
Index: packages/rpm-build-macros/rpm.macros
diff -u packages/rpm-build-macros/rpm.macros:1.635 
packages/rpm-build-macros/rpm.macros:1.636
--- packages/rpm-build-macros/rpm.macros:1.635  Fri Jan 27 14:08:13 2012
+++ packages/rpm-build-macros/rpm.macros        Mon Jan 30 14:49:43 2012
@@ -687,6 +687,30 @@
 }; __spec_install_post_check_so }}
 
 #-----------------------------------------------------------------
+# Verify that for each directory under /var/run package contains
+# tmpfiles.d configuration. Warn and terminate build if config is
+# missing.
+#
+#%no_install_post_check_tmpfiles 1
+#
+%__spec_install_post_check_tmpfiles { \
+__spec_install_post_check_tmpfiles() { \
+%{!?debug:set +x;} \
+       fail=0; \
+       echo "Checking /var/run <-> tmpfiles.d completeness..."; \
+       for d in $RPM_BUILD_ROOT/var/run/*; do \
+               [ -d "$d" ] || continue; \
+               d=${d##$RPM_BUILD_ROOT}; \
+               if ! LC_ALL=C grep -qs "$d" 
$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/*.conf 
$RPM_BUILD_ROOT/etc/tmpfiles.d/*.conf; then\
+                   echo "No tmpfiles configuration for '$d'";\
+                       fail=1 ; \
+               fi \
+       done ; \
+       echo " DONE"; \
+       %{!?no_install_post_check_tmpfiles:return $fail;} \
+}; __spec_install_post_check_tmpfiles }}
+
+#-----------------------------------------------------------------
 # Find and gzip all kernel modules
 #
 # Requires: find
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-macros/rpm.macros?r1=1.635&r2=1.636&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to