aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2013-11-25 12:23:31 +0100
committerHeinz Wiesinger <pprkut@slackbuilds.org>2013-11-25 13:11:59 +0100
commit926b93d445e92be03e62efcd742b2ac88f0d96ed (patch)
treea9e1e616e37f2f7187d0b0ab2d8e83b3ad8eed63 /system
parent7bc7feac90a3966ebaea1b1ad87431764a560344 (diff)
various: Replace chmod command with find command from template.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/acpitool/acpitool.SlackBuild6
-rw-r--r--system/adobe-source-code-pro-font/adobe-source-code-pro-font.SlackBuild6
-rw-r--r--system/adobe-source-sans-pro-font/adobe-source-sans-pro-font.SlackBuild6
-rw-r--r--system/amanda/amanda.SlackBuild6
-rw-r--r--system/anacron/anacron.SlackBuild6
-rw-r--r--system/apcupsd/apcupsd.SlackBuild6
-rw-r--r--system/artwiz-aleczapka/artwiz-aleczapka.SlackBuild6
-rw-r--r--system/artwiz-cursor/artwiz-cursor.SlackBuild6
-rw-r--r--system/aterm/aterm.SlackBuild6
-rw-r--r--system/bleachbit/bleachbit.SlackBuild6
-rw-r--r--system/cabextract/cabextract.SlackBuild6
-rw-r--r--system/cdemu-client/cdemu-client.SlackBuild6
-rw-r--r--system/cdemu-daemon/cdemu-daemon.SlackBuild6
-rw-r--r--system/chkrootkit/chkrootkit.SlackBuild6
-rw-r--r--system/clamav/clamav.SlackBuild6
-rw-r--r--system/commons-daemon/commons-daemon.SlackBuild6
-rw-r--r--system/coolkey/coolkey.SlackBuild6
-rw-r--r--system/curlftpfs/curlftpfs.SlackBuild6
-rw-r--r--system/daemonize/daemonize.SlackBuild6
-rw-r--r--system/detox/detox.SlackBuild6
-rw-r--r--system/dstat/dstat.SlackBuild6
-rw-r--r--system/encfs/encfs.SlackBuild6
-rw-r--r--system/fbterm/fbterm.SlackBuild9
-rw-r--r--system/fish/fish.SlackBuild6
-rw-r--r--system/freedup/freedup.SlackBuild6
-rw-r--r--system/fs-uae/fs-uae.SlackBuild6
-rw-r--r--system/fslint/fslint.SlackBuild6
-rw-r--r--system/fuseiso/fuseiso.SlackBuild6
-rw-r--r--system/gammu/gammu.SlackBuild6
-rw-r--r--system/gcdemu/gcdemu.SlackBuild6
-rw-r--r--system/gconf-editor/gconf-editor.SlackBuild6
-rw-r--r--system/gkrellm-volume/gkrellm-volume.SlackBuild6
-rw-r--r--system/gparted/gparted.SlackBuild6
-rw-r--r--system/gpsbabel/gpsbabel.SlackBuild6
-rw-r--r--system/gpsd/gpsd.SlackBuild6
-rw-r--r--system/gsmartcontrol/gsmartcontrol.SlackBuild6
-rw-r--r--system/hdapsd/hdapsd.SlackBuild6
-rw-r--r--system/hercules/hercules.SlackBuild6
-rw-r--r--system/hwinfo/hwinfo.SlackBuild6
-rw-r--r--system/ibam/ibam.SlackBuild9
-rw-r--r--system/image-analyzer/image-analyzer.SlackBuild6
-rw-r--r--system/innotop/innotop.SlackBuild6
-rw-r--r--system/inxi/inxi.SlackBuild6
-rw-r--r--system/iotop/iotop.SlackBuild6
-rw-r--r--system/isomaster/isomaster.SlackBuild6
-rw-r--r--system/linux-libertine-fonts/linux-libertine-fonts.SlackBuild6
-rw-r--r--system/lshw/lshw.SlackBuild6
-rw-r--r--system/md5deep/md5deep.SlackBuild6
-rw-r--r--system/memtest86+/memtest86+.SlackBuild6
-rw-r--r--system/memtest86/memtest86.SlackBuild6
-rw-r--r--system/microcode_ctl/microcode_ctl.SlackBuild6
-rw-r--r--system/mjpg-streamer/mjpg-streamer.SlackBuild6
-rw-r--r--system/mksh/mksh.SlackBuild6
-rw-r--r--system/mrxvt/mrxvt.SlackBuild6
-rw-r--r--system/multitail/multitail.SlackBuild6
-rw-r--r--system/ncdu/ncdu.SlackBuild6
-rw-r--r--system/nilfs-utils/nilfs-utils.SlackBuild6
-rw-r--r--system/nss_ldap/nss_ldap.SlackBuild6
-rw-r--r--system/numactl/numactl.SlackBuild6
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild36
-rw-r--r--system/nvidia-kernel/nvidia-kernel.SlackBuild6
-rw-r--r--system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild24
-rw-r--r--system/nvidia-legacy173-kernel/nvidia-legacy173-kernel.SlackBuild6
-rw-r--r--system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild24
-rw-r--r--system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild6
-rw-r--r--system/nvidia-legacy96-driver/nvidia-legacy96-driver.SlackBuild24
-rw-r--r--system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild6
-rw-r--r--system/openmpi/openmpi.SlackBuild6
-rw-r--r--system/p7zip/p7zip.SlackBuild6
-rw-r--r--system/parallel/parallel.SlackBuild6
-rw-r--r--system/pbzip2/pbzip2.SlackBuild6
-rw-r--r--system/percona-toolkit/percona-toolkit.SlackBuild6
-rw-r--r--system/pipemeter/pipemeter.SlackBuild6
-rw-r--r--system/postgresql/postgresql.SlackBuild6
-rw-r--r--system/pwgen/pwgen.SlackBuild6
-rw-r--r--system/pwsafe/pwsafe.SlackBuild6
-rw-r--r--system/qemu/qemu.SlackBuild6
-rw-r--r--system/rdiff-backup/rdiff-backup.SlackBuild6
-rw-r--r--system/recorder/recorder.SlackBuild6
-rw-r--r--system/redis/redis.SlackBuild6
-rw-r--r--system/roxterm/roxterm.SlackBuild6
-rw-r--r--system/rsyslog/rsyslog.SlackBuild6
-rw-r--r--system/rxvt-unicode/rxvt-unicode.SlackBuild6
-rw-r--r--system/scanmem/scanmem.SlackBuild6
-rw-r--r--system/sdltrs/sdltrs.SlackBuild6
-rw-r--r--system/set_rlimits/set_rlimits.SlackBuild6
-rw-r--r--system/sleuthkit/sleuthkit.SlackBuild6
-rw-r--r--system/smbldap-tools/smbldap-tools.SlackBuild6
-rw-r--r--system/splix/splix.SlackBuild6
-rw-r--r--system/squashfs-tools/squashfs-tools.SlackBuild6
-rw-r--r--system/t1utils/t1utils.SlackBuild6
-rw-r--r--system/tilda/tilda.SlackBuild6
-rw-r--r--system/tp_smapi/tp_smapi.SlackBuild9
-rw-r--r--system/trash-cli/trash-cli.SlackBuild6
-rw-r--r--system/trrntzip/trrntzip.SlackBuild6
-rw-r--r--system/truecrypt/truecrypt.SlackBuild6
-rw-r--r--system/ttf-bitstream-vera/ttf-bitstream-vera.SlackBuild6
-rw-r--r--system/twin/twin.SlackBuild6
-rw-r--r--system/ufiformat/ufiformat.SlackBuild6
-rw-r--r--system/unace/unace.SlackBuild6
-rw-r--r--system/unhide/unhide.SlackBuild6
-rw-r--r--system/unison/unison.SlackBuild6
-rw-r--r--system/usbmon/usbmon.SlackBuild6
-rw-r--r--system/usbview/usbview.SlackBuild6
-rw-r--r--system/vhba-module/vhba-module.SlackBuild6
-rw-r--r--system/virtualbox-addons/virtualbox-addons.SlackBuild6
-rw-r--r--system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild6
-rw-r--r--system/virtualbox-kernel/virtualbox-kernel.SlackBuild6
-rw-r--r--system/virtualbox/virtualbox.SlackBuild6
-rw-r--r--system/whowatch/whowatch.SlackBuild6
-rw-r--r--system/xbindkeys/xbindkeys.SlackBuild6
-rw-r--r--system/xosd/xosd.SlackBuild6
-rw-r--r--system/xtrs/xtrs.SlackBuild6
-rw-r--r--system/yakuake/yakuake.SlackBuild6
-rw-r--r--system/zeroinstall-injector/zeroinstall-injector.SlackBuild6
-rw-r--r--system/zfs-fuse/zfs-fuse.SlackBuild6
116 files changed, 647 insertions, 142 deletions
diff --git a/system/acpitool/acpitool.SlackBuild b/system/acpitool/acpitool.SlackBuild
index f8cd8ad4a86fa..a63904c928c99 100644
--- a/system/acpitool/acpitool.SlackBuild
+++ b/system/acpitool/acpitool.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Add the string.h include in toshiba.cpp and freq.cpp
patch -p1 < $CWD/acpitool-0.5-add_string.h.patch
diff --git a/system/adobe-source-code-pro-font/adobe-source-code-pro-font.SlackBuild b/system/adobe-source-code-pro-font/adobe-source-code-pro-font.SlackBuild
index c7dc8797b6a0b..2d1e9728143a1 100644
--- a/system/adobe-source-code-pro-font/adobe-source-code-pro-font.SlackBuild
+++ b/system/adobe-source-code-pro-font/adobe-source-code-pro-font.SlackBuild
@@ -47,7 +47,11 @@ rm -rf ${SRC}
unzip $CWD/${SRC}.zip
cd ${SRC}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/share/fonts/OTF/
cp OTF/*.otf $PKG/usr/share/fonts/OTF/
diff --git a/system/adobe-source-sans-pro-font/adobe-source-sans-pro-font.SlackBuild b/system/adobe-source-sans-pro-font/adobe-source-sans-pro-font.SlackBuild
index 781de2e3559eb..339fa5b7e2c05 100644
--- a/system/adobe-source-sans-pro-font/adobe-source-sans-pro-font.SlackBuild
+++ b/system/adobe-source-sans-pro-font/adobe-source-sans-pro-font.SlackBuild
@@ -47,7 +47,11 @@ rm -rf ${SRC}
unzip $CWD/${SRC}.zip
cd ${SRC}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/share/fonts/OTF/
cp OTF/*.otf $PKG/usr/share/fonts/OTF/
diff --git a/system/amanda/amanda.SlackBuild b/system/amanda/amanda.SlackBuild
index bd4e1eded77c1..522fd53cffecd 100644
--- a/system/amanda/amanda.SlackBuild
+++ b/system/amanda/amanda.SlackBuild
@@ -92,7 +92,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
PERLDIR=$(perl -V:installvendorlib | cut -d\' -f2)
diff --git a/system/anacron/anacron.SlackBuild b/system/anacron/anacron.SlackBuild
index 9388bc73386a7..2a397b6d21f78 100644
--- a/system/anacron/anacron.SlackBuild
+++ b/system/anacron/anacron.SlackBuild
@@ -59,7 +59,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# "Patch" gregor.c
sed -i 's,const int isleap,int isleap,' gregor.c
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild
index 01fddbfabc8d1..38bce38c79389 100644
--- a/system/apcupsd/apcupsd.SlackBuild
+++ b/system/apcupsd/apcupsd.SlackBuild
@@ -66,7 +66,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Create /var/lock/subsys in the init script (rc.apcupsd)
# These days, /var/lock may be on a tmpfs, so we can't assume the dir is there
diff --git a/system/artwiz-aleczapka/artwiz-aleczapka.SlackBuild b/system/artwiz-aleczapka/artwiz-aleczapka.SlackBuild
index 104f2dc9209c7..7be269316e570 100644
--- a/system/artwiz-aleczapka/artwiz-aleczapka.SlackBuild
+++ b/system/artwiz-aleczapka/artwiz-aleczapka.SlackBuild
@@ -69,7 +69,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go-w,a+rX-st .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
for bdf in *.bdf; do
pcf=$(basename $bdf .bdf).pcf
diff --git a/system/artwiz-cursor/artwiz-cursor.SlackBuild b/system/artwiz-cursor/artwiz-cursor.SlackBuild
index c9a61d1f3b397..2b4d5fa347268 100644
--- a/system/artwiz-cursor/artwiz-cursor.SlackBuild
+++ b/system/artwiz-cursor/artwiz-cursor.SlackBuild
@@ -45,7 +45,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go-w,a+rX-st .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# The x/font-cursor-misc package already contains a file named "cursor.pcf.gz".
# Rename the file in this package to "artwiz-cursor.pcf.gz" so we don't clobber
diff --git a/system/aterm/aterm.SlackBuild b/system/aterm/aterm.SlackBuild
index feb8ab8d9c657..6759939eddea0 100644
--- a/system/aterm/aterm.SlackBuild
+++ b/system/aterm/aterm.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/bleachbit/bleachbit.SlackBuild b/system/bleachbit/bleachbit.SlackBuild
index 19dab69321c2a..93869ebe1391e 100644
--- a/system/bleachbit/bleachbit.SlackBuild
+++ b/system/bleachbit/bleachbit.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Exclude the Windows-only cleaners from the source per author's instructions.
grep -l os=.windows. cleaners/*xml | xargs rm -f
diff --git a/system/cabextract/cabextract.SlackBuild b/system/cabextract/cabextract.SlackBuild
index 31a672fa94973..9e03ac128ec08 100644
--- a/system/cabextract/cabextract.SlackBuild
+++ b/system/cabextract/cabextract.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root.root .
-chmod -R a-s,u+rw,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/cdemu-client/cdemu-client.SlackBuild b/system/cdemu-client/cdemu-client.SlackBuild
index df3d741363eeb..33e96881d4a2a 100644
--- a/system/cdemu-client/cdemu-client.SlackBuild
+++ b/system/cdemu-client/cdemu-client.SlackBuild
@@ -47,7 +47,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cd build
diff --git a/system/cdemu-daemon/cdemu-daemon.SlackBuild b/system/cdemu-daemon/cdemu-daemon.SlackBuild
index 8ae518e786151..9289c4aeeff3e 100644
--- a/system/cdemu-daemon/cdemu-daemon.SlackBuild
+++ b/system/cdemu-daemon/cdemu-daemon.SlackBuild
@@ -68,7 +68,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cd build
diff --git a/system/chkrootkit/chkrootkit.SlackBuild b/system/chkrootkit/chkrootkit.SlackBuild
index 77a41f1904a66..166e191f9c8d8 100644
--- a/system/chkrootkit/chkrootkit.SlackBuild
+++ b/system/chkrootkit/chkrootkit.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
if [ "$ARCH" = "i486" ]; then
sed -i 's#-DHAVE_LASTLOG_H#-O2 -march=i486 -mtune=i686#' Makefile
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild
index dabaa8ac42477..7ef224a6fd0b0 100644
--- a/system/clamav/clamav.SlackBuild
+++ b/system/clamav/clamav.SlackBuild
@@ -86,7 +86,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Specify the desired mirror in the update config file
# http://www.iana.org/cctld/cctld-whois.htm
diff --git a/system/commons-daemon/commons-daemon.SlackBuild b/system/commons-daemon/commons-daemon.SlackBuild
index 43c5d5a53e70b..a458a1732ba2b 100644
--- a/system/commons-daemon/commons-daemon.SlackBuild
+++ b/system/commons-daemon/commons-daemon.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION-src
tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
cd $PRGNAM-$VERSION-src
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
ant dist
diff --git a/system/coolkey/coolkey.SlackBuild b/system/coolkey/coolkey.SlackBuild
index 4a32612dad4d4..ff872a5af5b8e 100644
--- a/system/coolkey/coolkey.SlackBuild
+++ b/system/coolkey/coolkey.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Redhat is dallying on a post 1.1.0 coolkey release
# but the cac and pcsc-lite fixes are necessary. These
diff --git a/system/curlftpfs/curlftpfs.SlackBuild b/system/curlftpfs/curlftpfs.SlackBuild
index 0c14347c00896..6a19ae589f425 100644
--- a/system/curlftpfs/curlftpfs.SlackBuild
+++ b/system/curlftpfs/curlftpfs.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/daemonize/daemonize.SlackBuild b/system/daemonize/daemonize.SlackBuild
index f8335e9677fa7..2a94dfb9f4885 100644
--- a/system/daemonize/daemonize.SlackBuild
+++ b/system/daemonize/daemonize.SlackBuild
@@ -48,7 +48,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/detox/detox.SlackBuild b/system/detox/detox.SlackBuild
index 0e38e698daf58..f02350a0614ab 100644
--- a/system/detox/detox.SlackBuild
+++ b/system/detox/detox.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/dstat/dstat.SlackBuild b/system/dstat/dstat.SlackBuild
index cba92dc9c2588..830b497781459 100644
--- a/system/dstat/dstat.SlackBuild
+++ b/system/dstat/dstat.SlackBuild
@@ -42,7 +42,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make install DESTDIR=$PKG
diff --git a/system/encfs/encfs.SlackBuild b/system/encfs/encfs.SlackBuild
index c1feef5b8336c..33c4f6a45ac97 100644
--- a/system/encfs/encfs.SlackBuild
+++ b/system/encfs/encfs.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/fbterm/fbterm.SlackBuild b/system/fbterm/fbterm.SlackBuild
index e138fc440772f..a4500fe3dfcc3 100644
--- a/system/fbterm/fbterm.SlackBuild
+++ b/system/fbterm/fbterm.SlackBuild
@@ -47,12 +47,11 @@ rm -rf $TOPDIR
tar xvf $CWD/$PRGNAM-$TARBALL_VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/fish/fish.SlackBuild b/system/fish/fish.SlackBuild
index a3405e00c1b20..bd74a37a720dc 100644
--- a/system/fish/fish.SlackBuild
+++ b/system/fish/fish.SlackBuild
@@ -66,7 +66,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/freedup/freedup.SlackBuild b/system/freedup/freedup.SlackBuild
index 73d0fd932be40..720249161dc87 100644
--- a/system/freedup/freedup.SlackBuild
+++ b/system/freedup/freedup.SlackBuild
@@ -67,7 +67,11 @@ tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.bz2
mv $PRGNAM-$ALTVER $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
diff --git a/system/fs-uae/fs-uae.SlackBuild b/system/fs-uae/fs-uae.SlackBuild
index 03983c6012c27..0147de73fdf8b 100644
--- a/system/fs-uae/fs-uae.SlackBuild
+++ b/system/fs-uae/fs-uae.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make CXXFLAGS="$SLKCFLAGS"
make install prefix=$PKG/usr docdir=$PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/system/fslint/fslint.SlackBuild b/system/fslint/fslint.SlackBuild
index cf59adf00419d..b50767a514f72 100644
--- a/system/fslint/fslint.SlackBuild
+++ b/system/fslint/fslint.SlackBuild
@@ -42,7 +42,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i 's|^liblocation=.*$|liblocation="/usr/share/fslint" |' fslint-gui
sed -i 's|^locale_base=.*$|locale_base=None |' fslint-gui
diff --git a/system/fuseiso/fuseiso.SlackBuild b/system/fuseiso/fuseiso.SlackBuild
index 3107eca1964e5..bc37c06eb354a 100644
--- a/system/fuseiso/fuseiso.SlackBuild
+++ b/system/fuseiso/fuseiso.SlackBuild
@@ -57,7 +57,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/gammu/gammu.SlackBuild b/system/gammu/gammu.SlackBuild
index e92c9688f1c32..656148c8edc6f 100644
--- a/system/gammu/gammu.SlackBuild
+++ b/system/gammu/gammu.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# I know the docdir / mandir syntax looks weird, but it's correct --rworkman
mkdir -p build
diff --git a/system/gcdemu/gcdemu.SlackBuild b/system/gcdemu/gcdemu.SlackBuild
index 1875b81b1b463..0048d5184029d 100644
--- a/system/gcdemu/gcdemu.SlackBuild
+++ b/system/gcdemu/gcdemu.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cd build
diff --git a/system/gconf-editor/gconf-editor.SlackBuild b/system/gconf-editor/gconf-editor.SlackBuild
index e1c4f602f337c..f0af09f6e1c0e 100644
--- a/system/gconf-editor/gconf-editor.SlackBuild
+++ b/system/gconf-editor/gconf-editor.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/gkrellm-volume/gkrellm-volume.SlackBuild b/system/gkrellm-volume/gkrellm-volume.SlackBuild
index eb6c748c38f26..63367e7841f81 100644
--- a/system/gkrellm-volume/gkrellm-volume.SlackBuild
+++ b/system/gkrellm-volume/gkrellm-volume.SlackBuild
@@ -58,7 +58,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Patch the Makefile and po/Makefile to support DESTDIR
patch -p1 < $CWD/Makefile.diff || exit 1
diff --git a/system/gparted/gparted.SlackBuild b/system/gparted/gparted.SlackBuild
index d578d1e6fb0a5..114f1473e45a9 100644
--- a/system/gparted/gparted.SlackBuild
+++ b/system/gparted/gparted.SlackBuild
@@ -59,7 +59,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/gpsbabel/gpsbabel.SlackBuild b/system/gpsbabel/gpsbabel.SlackBuild
index 5f84b7dadc268..97fbba21ff6a9 100644
--- a/system/gpsbabel/gpsbabel.SlackBuild
+++ b/system/gpsbabel/gpsbabel.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/gpsd/gpsd.SlackBuild b/system/gpsd/gpsd.SlackBuild
index 1ad69aaae8a21..eb9ea7595ce19 100644
--- a/system/gpsd/gpsd.SlackBuild
+++ b/system/gpsd/gpsd.SlackBuild
@@ -85,7 +85,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS=$SLKCFLAGS \
scons \
diff --git a/system/gsmartcontrol/gsmartcontrol.SlackBuild b/system/gsmartcontrol/gsmartcontrol.SlackBuild
index 7ad16ae292651..bfce83c5b3550 100644
--- a/system/gsmartcontrol/gsmartcontrol.SlackBuild
+++ b/system/gsmartcontrol/gsmartcontrol.SlackBuild
@@ -57,7 +57,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix build with gcc-4.7.x
sed -i "s/\tdestroy/\tthis->destroy/" src/gsc_text_window.h
diff --git a/system/hdapsd/hdapsd.SlackBuild b/system/hdapsd/hdapsd.SlackBuild
index 2015df183e601..a504ee833f1ce 100644
--- a/system/hdapsd/hdapsd.SlackBuild
+++ b/system/hdapsd/hdapsd.SlackBuild
@@ -68,7 +68,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# From hdapsd's git repository:
# http://repo.or.cz/w/hdapsd.git/commitdiff/3a35d05a1a7260de9f3adefdbfb34ed8c9b5f577
diff --git a/system/hercules/hercules.SlackBuild b/system/hercules/hercules.SlackBuild
index d164c838039c2..4212548092a22 100644
--- a/system/hercules/hercules.SlackBuild
+++ b/system/hercules/hercules.SlackBuild
@@ -54,7 +54,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/hwinfo/hwinfo.SlackBuild b/system/hwinfo/hwinfo.SlackBuild
index 97d3d5152616d..3e8ae115d4e02 100644
--- a/system/hwinfo/hwinfo.SlackBuild
+++ b/system/hwinfo/hwinfo.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# disable regeneration of changelog and VERSION
chmod -x ./git2log
diff --git a/system/ibam/ibam.SlackBuild b/system/ibam/ibam.SlackBuild
index 0c53f7b4f1b34..9a46bde6c4555 100644
--- a/system/ibam/ibam.SlackBuild
+++ b/system/ibam/ibam.SlackBuild
@@ -60,12 +60,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Make use of our CFLAGS
sed -i 's/^CFLAGS=-O3/CFLAGS+=/' Makefile
diff --git a/system/image-analyzer/image-analyzer.SlackBuild b/system/image-analyzer/image-analyzer.SlackBuild
index 5316f6cddb13d..7701f49436c37 100644
--- a/system/image-analyzer/image-analyzer.SlackBuild
+++ b/system/image-analyzer/image-analyzer.SlackBuild
@@ -68,7 +68,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cd build
diff --git a/system/innotop/innotop.SlackBuild b/system/innotop/innotop.SlackBuild
index f88162b051c73..312cae5231809 100644
--- a/system/innotop/innotop.SlackBuild
+++ b/system/innotop/innotop.SlackBuild
@@ -43,7 +43,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
perl Makefile.PL INSTALLDIRS=vendor
make
diff --git a/system/inxi/inxi.SlackBuild b/system/inxi/inxi.SlackBuild
index 94cd58c95d240..4c7de6e69fcc0 100644
--- a/system/inxi/inxi.SlackBuild
+++ b/system/inxi/inxi.SlackBuild
@@ -42,7 +42,11 @@ mkdir -p $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
chown -R root:root .
-chmod -R u+w,go+r-w,a+X-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
install -D -m 0755 inxi $PKG/usr/bin/inxi
install -D -m 0644 inxi.8.gz $PKG/usr/man/man8/inxi.8.gz
diff --git a/system/iotop/iotop.SlackBuild b/system/iotop/iotop.SlackBuild
index ea429dbc47a11..1c4f1f7353a40 100644
--- a/system/iotop/iotop.SlackBuild
+++ b/system/iotop/iotop.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s+X .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i 's|share/man/man8|man/man8|' setup.py
diff --git a/system/isomaster/isomaster.SlackBuild b/system/isomaster/isomaster.SlackBuild
index 098eeb2e58428..88b7720c08c06 100644
--- a/system/isomaster/isomaster.SlackBuild
+++ b/system/isomaster/isomaster.SlackBuild
@@ -57,7 +57,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# No autotools, do manually.
CFLAGS="$SLKCFLAGS" \
diff --git a/system/linux-libertine-fonts/linux-libertine-fonts.SlackBuild b/system/linux-libertine-fonts/linux-libertine-fonts.SlackBuild
index 8d24b08c675d7..42ab60051e14c 100644
--- a/system/linux-libertine-fonts/linux-libertine-fonts.SlackBuild
+++ b/system/linux-libertine-fonts/linux-libertine-fonts.SlackBuild
@@ -49,7 +49,11 @@ cd $PRGNAM-$VERSION
tar xvf $CWD/${SRCNAM1}_${VERSION}_${RELDATE}.tgz
tar xvf $CWD/${SRCNAM2}_${VERSION}_${RELDATE}.tgz
chown -R root:root .
-chmod -R u+w,go+r-w,a+X-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/share/fonts/{TTF,OTF}
cp -a *.ttf $PKG/usr/share/fonts/TTF
diff --git a/system/lshw/lshw.SlackBuild b/system/lshw/lshw.SlackBuild
index 40ae307b0cdb6..f798a749304df 100644
--- a/system/lshw/lshw.SlackBuild
+++ b/system/lshw/lshw.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix the MANDIR variable
sed -i "s%MANDIR=\$(PREFIX)/share/man%MANDIR=\$(PREFIX)/man%" src/Makefile
diff --git a/system/md5deep/md5deep.SlackBuild b/system/md5deep/md5deep.SlackBuild
index 4375d2790bfa0..0d7848db6887b 100644
--- a/system/md5deep/md5deep.SlackBuild
+++ b/system/md5deep/md5deep.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/memtest86+/memtest86+.SlackBuild b/system/memtest86+/memtest86+.SlackBuild
index 8c0a90736072d..61a73b585c8d0 100644
--- a/system/memtest86+/memtest86+.SlackBuild
+++ b/system/memtest86+/memtest86+.SlackBuild
@@ -46,7 +46,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go-w,a+rX-st .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix false positives in test #7
# https://bugzilla.novell.com/show_bug.cgi?id=773569
diff --git a/system/memtest86/memtest86.SlackBuild b/system/memtest86/memtest86.SlackBuild
index 881e53ff7736d..51fde68fe2f63 100644
--- a/system/memtest86/memtest86.SlackBuild
+++ b/system/memtest86/memtest86.SlackBuild
@@ -46,7 +46,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go-w,a+rX-st .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make
install -D -m 0644 memtest.bin $PKG/boot/memtest86.bin
diff --git a/system/microcode_ctl/microcode_ctl.SlackBuild b/system/microcode_ctl/microcode_ctl.SlackBuild
index 54ba03cbd369b..644802a4b869f 100644
--- a/system/microcode_ctl/microcode_ctl.SlackBuild
+++ b/system/microcode_ctl/microcode_ctl.SlackBuild
@@ -30,7 +30,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# use our CFLAGS
sed -i "s/-O2/$SLKCFLAGS/" Makefile
diff --git a/system/mjpg-streamer/mjpg-streamer.SlackBuild b/system/mjpg-streamer/mjpg-streamer.SlackBuild
index d1ebe7e417659..1c6ca7265c1ff 100644
--- a/system/mjpg-streamer/mjpg-streamer.SlackBuild
+++ b/system/mjpg-streamer/mjpg-streamer.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Add our flags to the Makefiles
find . -name Makefile -exec \
diff --git a/system/mksh/mksh.SlackBuild b/system/mksh/mksh.SlackBuild
index df05ab0e467f8..5bf80d5a50df7 100644
--- a/system/mksh/mksh.SlackBuild
+++ b/system/mksh/mksh.SlackBuild
@@ -79,7 +79,11 @@ else
fi
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir build
cd build
diff --git a/system/mrxvt/mrxvt.SlackBuild b/system/mrxvt/mrxvt.SlackBuild
index d9c3019680ea5..768b98f4680e8 100644
--- a/system/mrxvt/mrxvt.SlackBuild
+++ b/system/mrxvt/mrxvt.SlackBuild
@@ -51,7 +51,11 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.gz
cd $PKGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/multitail/multitail.SlackBuild b/system/multitail/multitail.SlackBuild
index 0901c53772212..96bba08a86e41 100644
--- a/system/multitail/multitail.SlackBuild
+++ b/system/multitail/multitail.SlackBuild
@@ -57,7 +57,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix our destination
sed -i "s|/usr/share|/usr|" Makefile
diff --git a/system/ncdu/ncdu.SlackBuild b/system/ncdu/ncdu.SlackBuild
index 088f7ef599b93..97498dfc6202f 100644
--- a/system/ncdu/ncdu.SlackBuild
+++ b/system/ncdu/ncdu.SlackBuild
@@ -57,7 +57,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/nilfs-utils/nilfs-utils.SlackBuild b/system/nilfs-utils/nilfs-utils.SlackBuild
index b719d7e1c7126..57bdc9bcb6e4e 100644
--- a/system/nilfs-utils/nilfs-utils.SlackBuild
+++ b/system/nilfs-utils/nilfs-utils.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/nss_ldap/nss_ldap.SlackBuild b/system/nss_ldap/nss_ldap.SlackBuild
index 90d4b276c964d..b1c1c76c363b7 100644
--- a/system/nss_ldap/nss_ldap.SlackBuild
+++ b/system/nss_ldap/nss_ldap.SlackBuild
@@ -68,7 +68,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/numactl/numactl.SlackBuild b/system/numactl/numactl.SlackBuild
index 2281db9561f0a..4320797f3830f 100644
--- a/system/numactl/numactl.SlackBuild
+++ b/system/numactl/numactl.SlackBuild
@@ -31,7 +31,11 @@ rm -rf $PRGNAM-$VERSION
tar xzf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index aeda51be44d0e..f64c15ff53017 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -103,7 +103,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only
cd $SRCNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
$PKG/etc/OpenCL/vendors/ $PKG/usr/lib$LIBDIRSUFFIX/tls \
@@ -203,7 +207,11 @@ fi
# Not really needed for this SBo package
cd $TMP/nvidia-installer-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" LDFLAGS="-lz" make
@@ -214,7 +222,11 @@ cd -
# Compiling nvidia-settings from source
cd $TMP/nvidia-settings-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd src/libXNVCtrl
make clean
@@ -234,7 +246,11 @@ cd ../
# Compiling nvidia-xconfig from source
cd $TMP/nvidia-xconfig-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
make
@@ -249,7 +265,11 @@ if [ "${OPTAPPS}" = "yes" ]; then
# Compiling nvidia-modprobe from source
cd $TMP/nvidia-modprobe-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" make
@@ -259,7 +279,11 @@ if [ "${OPTAPPS}" = "yes" ]; then
# Compiling nvidia-persistenced from source
cd $TMP/nvidia-persistenced-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" make
#FIXME: need rc.nvidia-persistenced script
diff --git a/system/nvidia-kernel/nvidia-kernel.SlackBuild b/system/nvidia-kernel/nvidia-kernel.SlackBuild
index 608e69bc04a3c..5ba533796fee7 100644
--- a/system/nvidia-kernel/nvidia-kernel.SlackBuild
+++ b/system/nvidia-kernel/nvidia-kernel.SlackBuild
@@ -86,7 +86,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only || exit 1
cd $SRCNAM || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd kernel || exit 1
diff --git a/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild b/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild
index d436b419ce63e..32f220165822f 100644
--- a/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild
+++ b/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild
@@ -81,7 +81,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only
cd $SRCNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/{bin,share,lib$LIBDIRSUFFIX,sbin} $PKG/usr/include/GL \
$PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
@@ -148,7 +152,11 @@ cd -
# Compiling nvidia-installer from source
cd $TMP/nvidia-installer-1.0.7
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
LDFLAGS="-lz" \
@@ -161,7 +169,11 @@ cd -
# Compiling nvidia-settings from source
cd $TMP/nvidia-settings-1.0
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix missing include necessary for newer version of libXxf86vm
patch -p1 -i $CWD/NvCtrlAttributesVidMode.diff
@@ -188,7 +200,11 @@ cd ../
# Compiling nvidia-xconfig from source
cd $TMP/nvidia-xconfig-1.0
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
NV_CFLAGS="$SLKCFLAGS" \
make
diff --git a/system/nvidia-legacy173-kernel/nvidia-legacy173-kernel.SlackBuild b/system/nvidia-legacy173-kernel/nvidia-legacy173-kernel.SlackBuild
index 4f297447cd3c5..80e3e188d47f3 100644
--- a/system/nvidia-legacy173-kernel/nvidia-legacy173-kernel.SlackBuild
+++ b/system/nvidia-legacy173-kernel/nvidia-legacy173-kernel.SlackBuild
@@ -71,7 +71,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only || exit 1
cd $SRCNAM || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd usr/src/nv/ || exit 1
diff --git a/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild b/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild
index 34605cdf18c5f..b452b33164680 100644
--- a/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild
+++ b/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild
@@ -98,7 +98,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only
cd $SRCNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
$PKG/etc/OpenCL/vendors/ $PKG/usr/lib$LIBDIRSUFFIX/tls \
@@ -155,7 +159,11 @@ install -m 644 nvidia-smi.1.gz $PKG/usr/man/man1/
# Compiling nvidia-installer from source
cd $TMP/nvidia-installer-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
LDFLAGS="-lz" \
@@ -168,7 +176,11 @@ cd -
# Compiling nvidia-settings from source
cd $TMP/nvidia-settings-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd src/libXNVCtrl
make clean
@@ -188,7 +200,11 @@ cd ../
# Compiling nvidia-xconfig from source
cd $TMP/nvidia-xconfig-$VERSION
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
make
diff --git a/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild b/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild
index d0d86af1fa410..1cf3b530ea2c6 100644
--- a/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild
+++ b/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild
@@ -88,7 +88,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only || exit 1
cd $SRCNAM || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd kernel || exit 1
diff --git a/system/nvidia-legacy96-driver/nvidia-legacy96-driver.SlackBuild b/system/nvidia-legacy96-driver/nvidia-legacy96-driver.SlackBuild
index a5d72654d0785..a3a5cd164222b 100644
--- a/system/nvidia-legacy96-driver/nvidia-legacy96-driver.SlackBuild
+++ b/system/nvidia-legacy96-driver/nvidia-legacy96-driver.SlackBuild
@@ -81,7 +81,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only
cd $SRCNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/{bin,share,lib$LIBDIRSUFFIX,sbin} $PKG/usr/include/GL \
$PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
@@ -146,7 +150,11 @@ cd -
# Compiling nvidia-installer from source
cd $TMP/nvidia-installer-1.0.7
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
LDFLAGS="-lz" \
@@ -159,7 +167,11 @@ cd -
# Compiling nvidia-settings from source
cd $TMP/nvidia-settings-1.0
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix missing include necessary for newer version of libXxf86vm
patch -p1 -i $CWD/NvCtrlAttributesVidMode.diff
@@ -187,7 +199,11 @@ cd ../
# Compiling nvidia-xconfig from source
cd $TMP/nvidia-xconfig-1.0
chown -R root:root .
- chmod -R u+w,go+r-w,a-s .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
NV_CFLAGS="$SLKCFLAGS" \
make
diff --git a/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild b/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild
index 2fcb26a5e8839..736b14a06994b 100644
--- a/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild
+++ b/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild
@@ -73,7 +73,11 @@ rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only || exit 1
cd $SRCNAM || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd usr/src/nv/ || exit 1
diff --git a/system/openmpi/openmpi.SlackBuild b/system/openmpi/openmpi.SlackBuild
index 63247dc15d875..a51b11ee3075c 100644
--- a/system/openmpi/openmpi.SlackBuild
+++ b/system/openmpi/openmpi.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/p7zip/p7zip.SlackBuild b/system/p7zip/p7zip.SlackBuild
index 6dc8402223f9e..d2753aa9277a9 100644
--- a/system/p7zip/p7zip.SlackBuild
+++ b/system/p7zip/p7zip.SlackBuild
@@ -66,7 +66,11 @@ rm -rf ${PRGNAM}_${VERSION}
tar xvf $CWD/${PRGNAM}_${VERSION}_src_all.tar.bz2
cd ${PRGNAM}_${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make all3 \
OPTFLAGS="$SLKCFLAGS" \
diff --git a/system/parallel/parallel.SlackBuild b/system/parallel/parallel.SlackBuild
index 18ef4276d4122..47cb5b90e5f40 100644
--- a/system/parallel/parallel.SlackBuild
+++ b/system/parallel/parallel.SlackBuild
@@ -43,7 +43,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
./configure \
--prefix=/usr \
diff --git a/system/pbzip2/pbzip2.SlackBuild b/system/pbzip2/pbzip2.SlackBuild
index ecbfcbc323dba..b92de2d91f962 100644
--- a/system/pbzip2/pbzip2.SlackBuild
+++ b/system/pbzip2/pbzip2.SlackBuild
@@ -59,7 +59,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make CFLAGS+="$SLKCFLAGS"
diff --git a/system/percona-toolkit/percona-toolkit.SlackBuild b/system/percona-toolkit/percona-toolkit.SlackBuild
index 1319a69e7b73d..3a135ddc61b3d 100644
--- a/system/percona-toolkit/percona-toolkit.SlackBuild
+++ b/system/percona-toolkit/percona-toolkit.SlackBuild
@@ -43,7 +43,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
perl Makefile.PL INSTALLDIRS=vendor
make
diff --git a/system/pipemeter/pipemeter.SlackBuild b/system/pipemeter/pipemeter.SlackBuild
index f9634c206079e..c8bc0fab6f0bf 100644
--- a/system/pipemeter/pipemeter.SlackBuild
+++ b/system/pipemeter/pipemeter.SlackBuild
@@ -41,7 +41,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/postgresql/postgresql.SlackBuild b/system/postgresql/postgresql.SlackBuild
index 8345f37b849a6..7d64d24e2fdc8 100644
--- a/system/postgresql/postgresql.SlackBuild
+++ b/system/postgresql/postgresql.SlackBuild
@@ -75,7 +75,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/pwgen/pwgen.SlackBuild b/system/pwgen/pwgen.SlackBuild
index a2e600dd9a704..3ae97d08b1ba0 100644
--- a/system/pwgen/pwgen.SlackBuild
+++ b/system/pwgen/pwgen.SlackBuild
@@ -69,7 +69,11 @@ cd $TMP
tar xvf $CWD/$APP-$VERSION.tar.gz
cd $APP-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/pwsafe/pwsafe.SlackBuild b/system/pwsafe/pwsafe.SlackBuild
index 6f6511e9ea8c0..c622fde3ec9ac 100644
--- a/system/pwsafe/pwsafe.SlackBuild
+++ b/system/pwsafe/pwsafe.SlackBuild
@@ -45,7 +45,11 @@ cd $TMP
tar xvf $CWD/$APP-$VERSION.tar.gz
cd $APP-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/qemu/qemu.SlackBuild b/system/qemu/qemu.SlackBuild
index 60b7654459574..14177849cf581 100644
--- a/system/qemu/qemu.SlackBuild
+++ b/system/qemu/qemu.SlackBuild
@@ -89,7 +89,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Remove double CFLAGS
sed -i "s|^\ \ CFLAGS=\"-O2\ | CFLAGS=\"|" configure || exit 1
diff --git a/system/rdiff-backup/rdiff-backup.SlackBuild b/system/rdiff-backup/rdiff-backup.SlackBuild
index ccdebd964af58..c4af94a4ec934 100644
--- a/system/rdiff-backup/rdiff-backup.SlackBuild
+++ b/system/rdiff-backup/rdiff-backup.SlackBuild
@@ -48,7 +48,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i 's|share/man/|man/|g' setup.py || exit 1
python setup.py install --prefix=/usr --root=$PKG || exit 1
diff --git a/system/recorder/recorder.SlackBuild b/system/recorder/recorder.SlackBuild
index 77304048da06e..bec1c2e386ef1 100644
--- a/system/recorder/recorder.SlackBuild
+++ b/system/recorder/recorder.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make install DESTDIR=$PKG
diff --git a/system/redis/redis.SlackBuild b/system/redis/redis.SlackBuild
index 6eb03bbd94780..6fe7616457b15 100644
--- a/system/redis/redis.SlackBuild
+++ b/system/redis/redis.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Use our CFLAGS.
sed -i "s|-O3||" deps/Makefile deps/hiredis/Makefile
diff --git a/system/roxterm/roxterm.SlackBuild b/system/roxterm/roxterm.SlackBuild
index 8e24de5da3a49..0b3c252ae1182 100644
--- a/system/roxterm/roxterm.SlackBuild
+++ b/system/roxterm/roxterm.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
./mscript.py configure \
--no-lock \
diff --git a/system/rsyslog/rsyslog.SlackBuild b/system/rsyslog/rsyslog.SlackBuild
index 47bc3a9d8683c..799f3e2464b5a 100644
--- a/system/rsyslog/rsyslog.SlackBuild
+++ b/system/rsyslog/rsyslog.SlackBuild
@@ -68,7 +68,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/rxvt-unicode/rxvt-unicode.SlackBuild b/system/rxvt-unicode/rxvt-unicode.SlackBuild
index acff562180629..7f09e7f561a52 100644
--- a/system/rxvt-unicode/rxvt-unicode.SlackBuild
+++ b/system/rxvt-unicode/rxvt-unicode.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Option to enable/disable the embedded perl interpreter
CONFIG_PERL=${CONFIG_PERL:-YES}
diff --git a/system/scanmem/scanmem.SlackBuild b/system/scanmem/scanmem.SlackBuild
index f1aa9183f5ef4..fa8d6250c7999 100644
--- a/system/scanmem/scanmem.SlackBuild
+++ b/system/scanmem/scanmem.SlackBuild
@@ -45,7 +45,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/sdltrs/sdltrs.SlackBuild b/system/sdltrs/sdltrs.SlackBuild
index 6a85270302770..88b5e381a0598 100644
--- a/system/sdltrs/sdltrs.SlackBuild
+++ b/system/sdltrs/sdltrs.SlackBuild
@@ -71,7 +71,11 @@ cd $TMP
tar xvf $CWD/${PRGNAM}_$SRCVERSION.tar.gz
cd ${PRGNAM}_$SRCVERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# include -lX11 in the Makefile (sw-14.0)
sed "/^LIBS/s/= /= -lX11 /" -i src/linux/Makefile
diff --git a/system/set_rlimits/set_rlimits.SlackBuild b/system/set_rlimits/set_rlimits.SlackBuild
index a63d64cd9ae84..e6f9ead42304e 100644
--- a/system/set_rlimits/set_rlimits.SlackBuild
+++ b/system/set_rlimits/set_rlimits.SlackBuild
@@ -46,7 +46,11 @@ rm -rf $PKGNAME-$VERSION
tar xvf $CWD/$PKGNAME-$VERSION.tgz
cd $PKGNAME-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fixup CFLAGS usage and add DESTDIR support
patch -p1 < $CWD/Makefile.patch
diff --git a/system/sleuthkit/sleuthkit.SlackBuild b/system/sleuthkit/sleuthkit.SlackBuild
index 82a919fc3559b..9224e14463db6 100644
--- a/system/sleuthkit/sleuthkit.SlackBuild
+++ b/system/sleuthkit/sleuthkit.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/smbldap-tools/smbldap-tools.SlackBuild b/system/smbldap-tools/smbldap-tools.SlackBuild
index 2070f9a1e08cb..2fb09e442676b 100644
--- a/system/smbldap-tools/smbldap-tools.SlackBuild
+++ b/system/smbldap-tools/smbldap-tools.SlackBuild
@@ -51,7 +51,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Thanks to Paul Howarth - http://gna.org/support/index.php?3013
cat $CWD/smbldap-config.pl.append >> smbldap-config.pl
diff --git a/system/splix/splix.SlackBuild b/system/splix/splix.SlackBuild
index 3fff4e4147c8f..251afee867849 100644
--- a/system/splix/splix.SlackBuild
+++ b/system/splix/splix.SlackBuild
@@ -55,7 +55,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i "s%\`cups-config --cflags\`%$CUPSCFLAGS%" module.mk
sed -i "s%\`cups-config --ldflags\`%$CUPSLDFLAGS%" module.mk
diff --git a/system/squashfs-tools/squashfs-tools.SlackBuild b/system/squashfs-tools/squashfs-tools.SlackBuild
index eeccc1fbeddd0..20315d716db63 100644
--- a/system/squashfs-tools/squashfs-tools.SlackBuild
+++ b/system/squashfs-tools/squashfs-tools.SlackBuild
@@ -41,7 +41,11 @@ rm -rf $SRC_NAME_VERSION
tar xvf $CWD/${SRC_NAME_VERSION}.tar.gz
cd $SRC_NAME_VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
make -C $PRGNAM \
diff --git a/system/t1utils/t1utils.SlackBuild b/system/t1utils/t1utils.SlackBuild
index cc5428ae616a4..10a24bce2c85a 100644
--- a/system/t1utils/t1utils.SlackBuild
+++ b/system/t1utils/t1utils.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go-w,a+rX-st .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/tilda/tilda.SlackBuild b/system/tilda/tilda.SlackBuild
index 2b2013d2347bc..e009e190cf0d6 100644
--- a/system/tilda/tilda.SlackBuild
+++ b/system/tilda/tilda.SlackBuild
@@ -58,7 +58,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Starting with glib 2.32 it is now mandatory to
# include glib.h instead of individual headers.
diff --git a/system/tp_smapi/tp_smapi.SlackBuild b/system/tp_smapi/tp_smapi.SlackBuild
index 0e6a373e8f2f3..6d05ab08f6479 100644
--- a/system/tp_smapi/tp_smapi.SlackBuild
+++ b/system/tp_smapi/tp_smapi.SlackBuild
@@ -64,12 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
( case "$ARCH" in
i?86) ARCH=x86 ;;
diff --git a/system/trash-cli/trash-cli.SlackBuild b/system/trash-cli/trash-cli.SlackBuild
index 10713e78ad915..0aaa0132c7cda 100644
--- a/system/trash-cli/trash-cli.SlackBuild
+++ b/system/trash-cli/trash-cli.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$SRCVER
tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
cd $PRGNAM-$SRCVER
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python setup.py install --root=$PKG
diff --git a/system/trrntzip/trrntzip.SlackBuild b/system/trrntzip/trrntzip.SlackBuild
index 5749d5e35e251..cc05ff7fd474a 100644
--- a/system/trrntzip/trrntzip.SlackBuild
+++ b/system/trrntzip/trrntzip.SlackBuild
@@ -58,7 +58,11 @@ rm -rf $PRGNAM
tar xvf $CWD/${PRGNAM}_${VERSION}_src.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# A small patch to fix a permissions issue:
patch -p1 < $CWD/trrntzip_permission_fix.diff
diff --git a/system/truecrypt/truecrypt.SlackBuild b/system/truecrypt/truecrypt.SlackBuild
index 76c2eb07f1daa..d7c95da069ab4 100644
--- a/system/truecrypt/truecrypt.SlackBuild
+++ b/system/truecrypt/truecrypt.SlackBuild
@@ -67,7 +67,11 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION-source
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
if [ $ARCH = "x86_64" ]; then
export LDFLAGS="$SLKLDFLAGS"
diff --git a/system/ttf-bitstream-vera/ttf-bitstream-vera.SlackBuild b/system/ttf-bitstream-vera/ttf-bitstream-vera.SlackBuild
index 159cfccd01e05..ae092367882d5 100644
--- a/system/ttf-bitstream-vera/ttf-bitstream-vera.SlackBuild
+++ b/system/ttf-bitstream-vera/ttf-bitstream-vera.SlackBuild
@@ -43,7 +43,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/share/fonts/TTF
cp -a *.ttf $PKG/usr/share/fonts/TTF
diff --git a/system/twin/twin.SlackBuild b/system/twin/twin.SlackBuild
index 46d4707fe1404..789e5f00ca45a 100644
--- a/system/twin/twin.SlackBuild
+++ b/system/twin/twin.SlackBuild
@@ -62,7 +62,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/ufiformat/ufiformat.SlackBuild b/system/ufiformat/ufiformat.SlackBuild
index b420246509f7c..a7d91e904d007 100644
--- a/system/ufiformat/ufiformat.SlackBuild
+++ b/system/ufiformat/ufiformat.SlackBuild
@@ -44,7 +44,11 @@ rm -rf ${PRGNAM}_${VERSION}
tar xvf $CWD/${PRGNAM}-${VERSION}.tar.gz
cd ${PRGNAM}-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
./configure \
--prefix=/usr \
diff --git a/system/unace/unace.SlackBuild b/system/unace/unace.SlackBuild
index 3f06bdb510b8d..e1c472646fce3 100644
--- a/system/unace/unace.SlackBuild
+++ b/system/unace/unace.SlackBuild
@@ -43,7 +43,11 @@ mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
tar xvf $CWD/lin${PRGNAM}${VERSION/./}.tgz
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/bin
install -m 0755 unace $PKG/usr/bin/unace
diff --git a/system/unhide/unhide.SlackBuild b/system/unhide/unhide.SlackBuild
index 513f6105d4e44..69107d0fa66f1 100644
--- a/system/unhide/unhide.SlackBuild
+++ b/system/unhide/unhide.SlackBuild
@@ -59,7 +59,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# gcc --static unhide.c -o unhide #### This is an obsolete version.
gcc $SLKCFLAGS -Wall --static -pthread unhide-linux*.c unhide-output.c -o unhide-linux
diff --git a/system/unison/unison.SlackBuild b/system/unison/unison.SlackBuild
index 758232da6efa6..847a230a6cee7 100644
--- a/system/unison/unison.SlackBuild
+++ b/system/unison/unison.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# no need to set CFLAGS
diff --git a/system/usbmon/usbmon.SlackBuild b/system/usbmon/usbmon.SlackBuild
index a355aa604b6fb..abaa39f49dd97 100644
--- a/system/usbmon/usbmon.SlackBuild
+++ b/system/usbmon/usbmon.SlackBuild
@@ -47,7 +47,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make CFLAGS="$SLKCFLAGS"
strip --strip-unneeded $PRGNAM
diff --git a/system/usbview/usbview.SlackBuild b/system/usbview/usbview.SlackBuild
index 41b866b066d0d..b66dc7f6329fe 100644
--- a/system/usbview/usbview.SlackBuild
+++ b/system/usbview/usbview.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/vhba-module/vhba-module.SlackBuild b/system/vhba-module/vhba-module.SlackBuild
index 0bb67114516e9..b96cfbacfd75b 100644
--- a/system/vhba-module/vhba-module.SlackBuild
+++ b/system/vhba-module/vhba-module.SlackBuild
@@ -55,7 +55,11 @@ rm -rf $PRGNAM-$SRC_VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Use -j1 to avoid problems if larger number of jobs is defined in MAKEFLAGS
make -j1 KERNELRELEASE=$KERNEL
diff --git a/system/virtualbox-addons/virtualbox-addons.SlackBuild b/system/virtualbox-addons/virtualbox-addons.SlackBuild
index c87331c63bd7f..fbb9ba0f4f86e 100644
--- a/system/virtualbox-addons/virtualbox-addons.SlackBuild
+++ b/system/virtualbox-addons/virtualbox-addons.SlackBuild
@@ -76,7 +76,11 @@ rm -rf $SRCNAM-${VERSION}
tar xvf $CWD/$SRCNAM-${VERSION}.tar.bz2
cd $SRCNAM-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# We don't want an init-script building kernel modules.
# Use virtualbox-kernel-addons.SlackBuild for this.
diff --git a/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild b/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild
index 797f07ba87c86..70b19e32c401b 100644
--- a/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild
+++ b/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild
@@ -57,7 +57,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/lib/modules/$KERNEL/misc
diff --git a/system/virtualbox-kernel/virtualbox-kernel.SlackBuild b/system/virtualbox-kernel/virtualbox-kernel.SlackBuild
index e18b0874100da..a49f71a88eebf 100644
--- a/system/virtualbox-kernel/virtualbox-kernel.SlackBuild
+++ b/system/virtualbox-kernel/virtualbox-kernel.SlackBuild
@@ -59,7 +59,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
if ! [ "${HARDENING:-yes}" = "yes" ]; then
sed -i "s/ -DVBOX_WITH_HARDENING//g" \
diff --git a/system/virtualbox/virtualbox.SlackBuild b/system/virtualbox/virtualbox.SlackBuild
index e1f5cb658f2e4..0546d12a4e3b6 100644
--- a/system/virtualbox/virtualbox.SlackBuild
+++ b/system/virtualbox/virtualbox.SlackBuild
@@ -98,7 +98,11 @@ rm -rf $SRCNAM-${VERSION}
tar xvf $CWD/$SRCNAM-${VERSION}.tar.bz2
cd $SRCNAM-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
GROUP="vboxusers"
MODE="755"
diff --git a/system/whowatch/whowatch.SlackBuild b/system/whowatch/whowatch.SlackBuild
index 679fb1a06385c..40c3d88617d4e 100644
--- a/system/whowatch/whowatch.SlackBuild
+++ b/system/whowatch/whowatch.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/system/xbindkeys/xbindkeys.SlackBuild b/system/xbindkeys/xbindkeys.SlackBuild
index 11817e96d0476..52c339d13c4a6 100644
--- a/system/xbindkeys/xbindkeys.SlackBuild
+++ b/system/xbindkeys/xbindkeys.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/xosd/xosd.SlackBuild b/system/xosd/xosd.SlackBuild
index dcb3e8da2cca0..474c6eadcffa9 100644
--- a/system/xosd/xosd.SlackBuild
+++ b/system/xosd/xosd.SlackBuild
@@ -46,7 +46,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# the less warnings, the better
sed -i "s|AC_DEFUN(AM_PATH_LIBXOSD|AC_DEFUN([AM_PATH_LIBXOSD]|" libxosd.m4
diff --git a/system/xtrs/xtrs.SlackBuild b/system/xtrs/xtrs.SlackBuild
index 5a335c7b6e193..54655389fe192 100644
--- a/system/xtrs/xtrs.SlackBuild
+++ b/system/xtrs/xtrs.SlackBuild
@@ -46,7 +46,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Make /usr/share/xtrs the default rom directory
patch -p1 < $CWD/default_rom_dir.patch
diff --git a/system/yakuake/yakuake.SlackBuild b/system/yakuake/yakuake.SlackBuild
index 44d8da2aa6d4c..d162c36a122b3 100644
--- a/system/yakuake/yakuake.SlackBuild
+++ b/system/yakuake/yakuake.SlackBuild
@@ -70,7 +70,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cmake \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
diff --git a/system/zeroinstall-injector/zeroinstall-injector.SlackBuild b/system/zeroinstall-injector/zeroinstall-injector.SlackBuild
index 9db2e09c7e06c..8ec5f986e7646 100644
--- a/system/zeroinstall-injector/zeroinstall-injector.SlackBuild
+++ b/system/zeroinstall-injector/zeroinstall-injector.SlackBuild
@@ -31,7 +31,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python setup.py install \
--root=$PKG \
diff --git a/system/zfs-fuse/zfs-fuse.SlackBuild b/system/zfs-fuse/zfs-fuse.SlackBuild
index 5249af489d312..6e55e2073cab7 100644
--- a/system/zfs-fuse/zfs-fuse.SlackBuild
+++ b/system/zfs-fuse/zfs-fuse.SlackBuild
@@ -32,7 +32,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -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 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Patch for glib>=2.14
# http://zfs-fuse.net/issues/137