]> granicus.if.org Git - sudo/commitdiff
For rpm, do not specify a mode in %attr for symbolic links. Avoids
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 Jul 2014 16:27:23 +0000 (10:27 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 Jul 2014 16:27:23 +0000 (10:27 -0600)
the warning "Explicit %attr() mode not applicaple to symlink"

pp

diff --git a/pp b/pp
index 8ffa5548750f55dd5177a7dab611a3c89e4b4a26..247dd2daf2fa65619b41878cae361066e6c0ca92 100755 (executable)
--- a/pp
+++ b/pp
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Copyright 2014 Quest Software, Inc. ALL RIGHTS RESERVED
-pp_revision="20140620"
+pp_revision="20140711"
  # Copyright 2012 Quest Software, Inc.  ALL RIGHTS RESERVED.
  #
  # Redistribution and use in source and binary forms, with or without
@@ -5517,7 +5517,10 @@ pp_rpm_writefiles () {
     while read t m o g f p st; do
         _l="$p"
        test $t = d && _l="%dir ${_l%/}/"
-        if test x"$m" = x"-"; then
+       if test $t = s; then
+           # rpm warns if %attr contains a mode for symlinks
+           m=-
+        elif test x"$m" = x"-"; then
             case "$t" in
                 d) m=755;;
                 f) m=644;;