summaryrefslogtreecommitdiffstats
path: root/system/osquery-bin/osquery-bin.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/osquery-bin/osquery-bin.SlackBuild')
-rw-r--r--system/osquery-bin/osquery-bin.SlackBuild27
1 files changed, 11 insertions, 16 deletions
diff --git a/system/osquery-bin/osquery-bin.SlackBuild b/system/osquery-bin/osquery-bin.SlackBuild
index 7ff944b976..3f85678ad1 100644
--- a/system/osquery-bin/osquery-bin.SlackBuild
+++ b/system/osquery-bin/osquery-bin.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for osquery-bin
# Copyright 2019-2022 Andrew Clemons, Wellington New Zealand
+# Copyright 2022-2024 Andrew Clemons, Tokyo Japan
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=osquery-bin
SRCNAM=${PRGNAM%-bin}
-VERSION=${VERSION:-5.2.3}
+VERSION=${VERSION:-5.12.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -49,20 +50,6 @@ 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
@@ -71,6 +58,8 @@ cd $PKG
if [ "$ARCH" = "x86_64" ]; then
ar p "$CWD/$SRCNAM"_"$VERSION-$DEBBUILD.linux_amd64.deb" data.tar.gz | tar xzv
+elif [ "$ARCH" = "aarch64" ]; then
+ ar p "$CWD/$SRCNAM"_"$VERSION-$DEBBUILD.linux_arm64.deb" data.tar.gz | tar xzv
else
printf "$ARCH is not supported...\n"
exit 1
@@ -83,11 +72,17 @@ find -L . \
\( -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" = "aarch64" ] ; then
+ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs patchelf --set-interpreter /lib64/ld-linux-aarch64.so.1 2> /dev/null || true
+fi
+
mkdir etc/rc.d
mv etc/init.d/osqueryd etc/rc.d/rc.osqueryd.new
rm -rf etc/init.d
-rm -rf usr/lib
+rm -rf usr/lib/systemd
+rmdir usr/lib
# make symlinks relative
(