aboutsummaryrefslogtreecommitdiff
path: root/system/pax-utils
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-04-13 22:34:55 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-15 07:15:26 +0700
commit1221f08625e106ef780ce6ad07ada3e420141657 (patch)
treec22308d492a984a3c9180b15699f38aa905476a9 /system/pax-utils
parent0ede7f2818608498c0bcbc8a715332529e5d45b2 (diff)
system/pax-utils: Added (security audit tools for ELF binaries)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/pax-utils')
-rw-r--r--system/pax-utils/README9
-rw-r--r--system/pax-utils/pax-utils.SlackBuild88
-rw-r--r--system/pax-utils/pax-utils.info10
-rw-r--r--system/pax-utils/slack-desc19
4 files changed, 126 insertions, 0 deletions
diff --git a/system/pax-utils/README b/system/pax-utils/README
new file mode 100644
index 0000000000000..61ee533183a53
--- /dev/null
+++ b/system/pax-utils/README
@@ -0,0 +1,9 @@
+pax-utils (security audit tools for ELF binaries)
+
+pax-utils is a small set of utilities for peforming Q/A (mostly
+security) checks on systems (most notably, scanelf). It is focused on
+the ELF format, but does include a Mach-O helper too for OS X systems.
+
+You don't need PaX to use the pax-utils. In fact, the only thing they
+really have in common is that pax-utils was initially written to aid
+in deploying PaX systems.
diff --git a/system/pax-utils/pax-utils.SlackBuild b/system/pax-utils/pax-utils.SlackBuild
new file mode 100644
index 0000000000000..990c3f5f4387d
--- /dev/null
+++ b/system/pax-utils/pax-utils.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# Slackware build script for pax-utils
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=pax-utils
+VERSION=${VERSION:-1.3.7}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+gzip -9 $PKG/usr/man/man*/*
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a BUGS COPYING README* TODO $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/pax-utils/pax-utils.info b/system/pax-utils/pax-utils.info
new file mode 100644
index 0000000000000..bfb0950cdf34b
--- /dev/null
+++ b/system/pax-utils/pax-utils.info
@@ -0,0 +1,10 @@
+PRGNAM="pax-utils"
+VERSION="1.3.7"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities"
+DOWNLOAD="https://github.com/gentoo/pax-utils/archive/v1.3.7/pax-utils-1.3.7.tar.gz"
+MD5SUM="928b04e8f854d0b6041ef550cbc2398a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="pyelftools"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/pax-utils/slack-desc b/system/pax-utils/slack-desc
new file mode 100644
index 0000000000000..669b6d334814c
--- /dev/null
+++ b/system/pax-utils/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+pax-utils: pax-utils (security audit tools for ELF binaries)
+pax-utils:
+pax-utils: pax-utils is a small set of utilities for peforming Q/A (mostly
+pax-utils: security) checks on systems (most notably, scanelf). It is focused on
+pax-utils: the ELF format, but does include a Mach-O helper too for OS X systems.
+pax-utils:
+pax-utils:
+pax-utils:
+pax-utils:
+pax-utils:
+pax-utils: