]> git.pld-linux.org Git - packages/rpm-pld-macros.git/commitdiff
- new macro __spec_install_post_check_tmpfiles to avoid missing files under
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 30 Jan 2012 13:49:43 +0000 (13:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  /var/run on systems running systemd

Changed files:
    rpm.macros -> 1.636

rpm.macros

index 31d54434f0dd9150a1aaff09cc8431cefebff4e9..d195ae0f3d2ca397af4748b168dda9911b724c88 100644 (file)
@@ -686,6 +686,30 @@ __spec_install_post_check_so() { \
        %{!?no_install_post_check_so:return $fail;} \
 }; __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
 #
This page took 0.045054 seconds and 4 git commands to generate.