summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Robby Workman <rworkman@slackbuilds.org>2013-10-30 23:44:33 -0500
committer Robby Workman <rworkman@slackbuilds.org>2013-10-30 23:45:59 -0500
commit2ca255d617118e749c51584c30027d9791c789e8 (patch)
tree6596db25ecf4a76d905757b62d1b57fc3688b048
parent4a05a20923cbef25bc79aba6f48d0e72b456a46a (diff)
downloadtemplates-2ca255d617118e.tar.gz
templates-2ca255d617118e.tar.xz
*.SlackBuild: Add "-L" to the permissions-fixing find invocation
From: Serg Bormant <bormant@gmail.com> Subject: [Slackbuilds-users] [BUG] SlackBuild templates Date: Fri, 21 Dec 2012 11:58:32 +0400 Hi, Consider something like this in source tarball: $ mkdir test; cd test $ mkdir docs; touch docs/README docs/COPYING $ ln -s docs/* . $ ls -o * lrwxrwxrwx 1 user 12 Dec 21 11:45 COPYING -> docs/COPYING lrwxrwxrwx 1 user 11 Dec 21 11:45 README -> docs/README docs: total 0 -rw-r--r-- 1 user 0 Dec 21 11:45 COPYING -rw-r--r-- 1 user 0 Dec 21 11:45 README *.SlackBuild templates offer this to sanitize permissions: find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; But -perm 777 will fire on symlinks and will set eXecutable permissions to docs/COPYING and docs/README. Using "find -L ..." or "... ! -type l ..." can help to avoid this.
-rw-r--r--autotools-template.SlackBuild2
-rw-r--r--cmake-template.SlackBuild2
-rw-r--r--perl-template.SlackBuild2
-rw-r--r--python-template.SlackBuild2
4 files changed, 4 insertions, 4 deletions
diff --git a/autotools-template.SlackBuild b/autotools-template.SlackBuild
index da5f61e..2e8bd28 100644
--- a/autotools-template.SlackBuild
+++ b/autotools-template.SlackBuild
@@ -94,7 +94,7 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find . \
+find . -L \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
diff --git a/cmake-template.SlackBuild b/cmake-template.SlackBuild
index 6e0b866..d283016 100644
--- a/cmake-template.SlackBuild
+++ b/cmake-template.SlackBuild
@@ -91,7 +91,7 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find . \
+find . -L \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
diff --git a/perl-template.SlackBuild b/perl-template.SlackBuild
index 298e76e..4dd762c 100644
--- a/perl-template.SlackBuild
+++ b/perl-template.SlackBuild
@@ -93,7 +93,7 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
-find . \
+find . -L \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
diff --git a/python-template.SlackBuild b/python-template.SlackBuild
index fc98132..5f99a6c 100644
--- a/python-template.SlackBuild
+++ b/python-template.SlackBuild
@@ -91,7 +91,7 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find . \
+find . -L \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \