aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
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 f8cd8ad4a86f..a63904c928c9 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 c7dc8797b6a0..2d1e9728143a 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 781de2e3559e..339fa5b7e2c0 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 bd4e1eded77c..522fd53cffec 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 9388bc73386a..2a397b6d21f7 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 01fddbfabc8d..38bce38c7938 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 104f2dc9209c..7be269316e57 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 c9a61d1f3b39..2b4d5fa34726 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 feb8ab8d9c65..6759939eddea 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 19dab69321c2..93869ebe1391 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 31a672fa9497..9e03ac128ec0 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 df3d741363ee..33e96881d4a2 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 8ae518e78615..9289c4aeeff3 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 77a41f1904a6..166e191f9c8d 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 dabaa8ac4247..7ef224a6fd0b 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 43c5d5a53e70..a458a1732ba2 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 4a32612dad4d..ff872a5af5b8 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 0c14347c0089..6a19ae589f42 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 f8335e9677fa..2a94dfb9f488 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 0e38e698daf5..f02350a0614a 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 cba92dc9c258..830b49778145 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 c1feef5b8336..33c4f6a45ac9 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 e138fc440772..a4500fe3dfcc 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 a3405e00c1b2..bd74a37a720d 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 73d0fd932be4..720249161dc8 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 03983c6012c2..0147de73fdf8 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 cf59adf00419..b50767a514f7 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 3107eca1964e..bc37c06eb354 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 e92c9688f1c3..656148c8edc6 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 1875b81b1b46..0048d5184029 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 e1c4f602f337..f0af09f6e1c0 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 eb6c748c38f2..63367e7841f8 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 d578d1e6fb0a..114f1473e45a 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 5f84b7dadc26..97fbba21ff6a 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 1ad69aaae8a2..eb9ea7595ce1 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 7ad16ae29265..bfce83c5b355 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 2015df183e60..a504ee833f1c 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 d164c838039c..4212548092a2 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 97d3d5152616..3e8ae115d4e0 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 0c53f7b4f1b3..9a46bde6c455 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 5316f6cddb13..7701f49436c3 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 f88162b051c7..312cae523180 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 94cd58c95d24..4c7de6e69fcc 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 ea429dbc47a1..1c4f1f7353a4 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 098eeb2e5842..88b7720c08c0 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 8d24b08c675d..42ab60051e14 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 40ae307b0cdb..f798a749304d 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 4375d2790bfa..0d7848db6887 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 8c0a90736072..61a73b585c8d 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 881e53ff7736..51fde68fe2f6 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 54ba03cbd369..644802a4b869 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 d1ebe7e41765..1c6ca7265c1f 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 df05ab0e467f..5bf80d5a50df 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 d9c3019680ea..768b98f4680e 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 0901c5377221..96bba08a86e4 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 088f7ef599b9..97498dfc6202 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 b719d7e1c712..57bdc9bcb6e4 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 90d4b276c964..b1c1c76c363b 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 2281db9561f0..4320797f3830 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 aeda51be44d0..f64c15ff5301 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 608e69bc04a3..5ba533796fee 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 d436b419ce63..32f220165822 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 4f297447cd3c..80e3e188d47f 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 34605cdf18c5..b452b3316468 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 d0d86af1fa41..1cf3b530ea2c 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 a5d72654d078..a3a5cd164222 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 2fcb26a5e883..736b14a06994 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 63247dc15d87..a51b11ee3075 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 6dc8402223f9..d2753aa9277a 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 18ef4276d412..47cb5b90e5f4 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 ecbfcbc323db..b92de2d91f96 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 1319a69e7b73..3a135ddc61b3 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 f9634c206079..c8bc0fab6f0b 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 8345f37b849a..7d64d24e2fdc 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 a2e600dd9a70..3ae97d08b1ba 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 6f6511e9ea8c..c622fde3ec9a 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 60b765445957..14177849cf58 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 ccdebd964af5..c4af94a4ec93 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 77304048da06..bec1c2e386ef 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 6eb03bbd9478..6fe7616457b1 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 8e24de5da3a4..0b3c252ae118 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 47bc3a9d8683..799f3e2464b5 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 acff56218062..7f09e7f561a5 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 f1aa9183f5ef..fa8d6250c799 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 6a8527030277..88b5e381a059 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 a63d64cd9ae8..e6f9ead42304 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 82a919fc3559..9224e14463db 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 2070f9a1e08c..2fb09e442676 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 3fff4e4147c8..251afee86784 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 eeccc1fbeddd..20315d716db6 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 cc5428ae616a..10a24bce2c85 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 2b2013d2347b..e009e190cf0d 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 0e6a373e8f2f..6d05ab08f647 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 10713e78ad91..0aaa0132c7cd 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 5749d5e35e25..cc05ff7fd474 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 76c2eb07f1da..d7c95da069ab 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 159cfccd01e0..ae092367882d 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 46d4707fe140..789e5f00ca45 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 b420246509f7..a7d91e904d00 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 3f06bdb510b8..e1c472646fce 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 513f6105d4e4..69107d0fa66f 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 758232da6efa..847a230a6cee 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 a355aa604b6f..abaa39f49dd9 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 41b866b066d0..b66dc7f6329f 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 0bb67114516e..b96cfbacfd75 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 c87331c63bd7..fbb9ba0f4f86 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 797f07ba87c8..70b19e32c401 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 e18b0874100d..a49f71a88eeb 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 e1f5cb658f2e..0546d12a4e3b 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 679fb1a06385..40c3d88617d4 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 11817e96d047..52c339d13c4a 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 dcb3e8da2cca..474c6eadcffa 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 5a335c7b6e19..54655389fe19 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 44d8da2aa6d4..d162c36a122b 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 9db2e09c7e06..8ec5f986e764 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 5249af489d31..6e55e2073cab 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