]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- sysconfig fixes: another try
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 6 Apr 2005 18:15:08 +0000 (18:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.149

adapter.awk

index 8d6a9ed6a92e1f5da2dc56a786132085c54cb43c..63feaa171524426938397f9c0bae1061f260b25e 100644 (file)
@@ -711,26 +711,23 @@ function use_files_macros(        i, n, t, a)
 
        # /etc/sysconfig files
        # %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
-       if (/\/etc\/sysconfig\// && !/%attr.*/) {
-               $0 = "%attr(640,root,root) " $0
-       }
-
+       # attr not required, allow default 644 attr
        if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
                gsub("%config", "%config(noreplace)")
        }
 
        if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
-                $1 = $1 " %config(noreplace)"
-       }
-
-       if (/\/etc\/sysconfig\// && !/%verify/) {
-               gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+                $NF = "%config(noreplace) " $NF
        }
 
        if (/\/etc\/sysconfig\// && /%attr\(755/) {
                gsub("^%attr\(... *,", "%attr(640,");
        }
 
+       if (/\/etc\/sysconfig\// && !/%verify/) {
+               gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+       }
+
 
        # kill leading zeros
        gsub("%attr\(0", "%attr(")
This page took 0.126006 seconds and 4 git commands to generate.