2022-03-20 13:19:37 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
|
|
# Website : https://pozol.eu
|
|
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
|
|
|
|
pkgbase=audit
|
2023-02-16 01:25:06 +01:00
|
|
|
_name=audit-userspace
|
2022-03-20 13:19:37 +01:00
|
|
|
pkgname=('audit' 'python-audit')
|
2024-03-14 19:11:55 +01:00
|
|
|
pkgver=4.0.1
|
2024-04-22 01:32:14 +02:00
|
|
|
pkgrel=03
|
2022-04-22 21:14:33 +02:00
|
|
|
pkgdesc="Userspace components of the audit framework w/o systemd"
|
2022-03-20 13:19:37 +01:00
|
|
|
url='https://people.redhat.com/sgrubb/audit'
|
2024-01-17 19:39:43 +01:00
|
|
|
makedepends=(apparmor glibc krb5 libcap-ng libldap linux-api-headers python swig)
|
2022-03-20 13:19:37 +01:00
|
|
|
options=(emptydirs)
|
2022-04-22 21:14:33 +02:00
|
|
|
#options=(emptydirs debug) # comment above options uncomment this to have debug packages produced
|
2024-01-17 19:39:43 +01:00
|
|
|
source=( https://github.com/linux-audit/$_name/archive/v$pkgver/$_name-v$pkgver.tar.gz
|
|
|
|
$pkgbase.tmpfiles)
|
|
|
|
# $pkgbase-4.0-executable_paths.patch) # systemd patch ... irrelevant
|
2022-04-22 21:14:33 +02:00
|
|
|
|
2023-01-08 02:26:48 +01:00
|
|
|
_pick() {
|
|
|
|
local p="$1" f d; shift
|
|
|
|
for f; do
|
|
|
|
d="$srcdir/$p/${f#$pkgdir/}"
|
|
|
|
mkdir -p "$(dirname "$d")"
|
|
|
|
mv "$f" "$d"
|
|
|
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2024-01-17 19:39:43 +01:00
|
|
|
# use /usr and /bin merge compatible paths in configs and systemd services
|
|
|
|
# patch -Np1 -d $pkgbase-userspace-$pkgver -i ../$pkgbase-4.0-executable_paths.patch
|
2022-04-22 21:14:33 +02:00
|
|
|
|
2023-02-16 01:25:06 +01:00
|
|
|
cd $_name-$pkgver
|
2023-01-08 02:26:48 +01:00
|
|
|
autoreconf -fiv
|
|
|
|
}
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
build() {
|
2023-01-08 02:26:48 +01:00
|
|
|
local configure_options=(
|
|
|
|
--prefix=/usr
|
|
|
|
--sbindir=/usr/bin
|
|
|
|
--sysconfdir=/etc
|
2024-03-14 19:11:55 +01:00
|
|
|
--runstatedir=/run
|
2023-01-08 02:26:48 +01:00
|
|
|
--enable-gssapi-krb5=yes
|
2024-01-17 19:39:43 +01:00
|
|
|
--enable-systemd=no
|
|
|
|
--enable-zos-remote
|
|
|
|
--libexecdir=/usr/lib/audit
|
|
|
|
--with-apparmor=yes
|
|
|
|
--with-io_uring=yes
|
2022-03-20 13:19:37 +01:00
|
|
|
--with-libcap-ng=yes
|
2023-08-07 18:55:47 +02:00
|
|
|
--with-python3=yes
|
2023-01-08 02:26:48 +01:00
|
|
|
)
|
|
|
|
|
2023-02-16 01:25:06 +01:00
|
|
|
cd $_name-$pkgver
|
2023-01-08 02:26:48 +01:00
|
|
|
./configure "${configure_options[@]}"
|
2022-04-22 21:14:33 +02:00
|
|
|
# prevent excessive overlinking due to libtool
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
2023-01-08 02:26:48 +01:00
|
|
|
make
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package_audit() {
|
2022-04-22 21:14:33 +02:00
|
|
|
depends=(glibc krb5 libkrb5.so libgssapi_krb5.so libcap-ng libcap-ng.so)
|
2024-01-17 19:39:43 +01:00
|
|
|
|
|
|
|
optdepends=('libldap: for audispd-zos-remote'
|
|
|
|
'sh: for augenrules')
|
2022-04-22 21:14:33 +02:00
|
|
|
provides=(libaudit.so libauparse.so)
|
2022-03-20 13:19:37 +01:00
|
|
|
backup=(
|
|
|
|
etc/libaudit.conf
|
|
|
|
etc/audit/audit-stop.rules
|
|
|
|
etc/audit/auditd.conf
|
|
|
|
etc/audit/audisp-remote.conf
|
|
|
|
etc/audit/zos-remote.conf
|
|
|
|
etc/audit/plugins.d/af_unix.conf
|
|
|
|
etc/audit/plugins.d/au-remote.conf
|
|
|
|
etc/audit/plugins.d/audispd-zos-remote.conf
|
|
|
|
etc/audit/plugins.d/syslog.conf
|
|
|
|
)
|
|
|
|
|
2023-02-16 01:25:06 +01:00
|
|
|
make DESTDIR="$pkgdir" install -C $_name-$pkgver
|
2023-01-08 02:26:48 +01:00
|
|
|
|
2023-01-31 21:17:45 +01:00
|
|
|
# add rules.d dir to satisfy augenrules
|
|
|
|
install -vdm 755 "$pkgdir/etc/audit/rules.d/"
|
2024-01-17 19:39:43 +01:00
|
|
|
# add config dir for audisp
|
|
|
|
install -vdm 755 "$pkgdir/etc/audisp"
|
|
|
|
|
|
|
|
# add factory files
|
|
|
|
install -vdm 755 "$pkgdir/usr/share/factory/"
|
|
|
|
cp -av "$pkgdir/etc" "$pkgdir/usr/share/factory/"
|
|
|
|
|
|
|
|
# add tmpfiles.d integration for factory files and file permissions
|
|
|
|
install -vDm 644 $pkgbase.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgbase.conf"
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
# remove legacy files
|
|
|
|
rm -frv "$pkgdir/usr/lib/audit"
|
|
|
|
|
2024-01-17 19:39:43 +01:00
|
|
|
# remove systemd crap that is still pushed by upstream even when you configure disable system
|
|
|
|
rm -frv $pkgdir/usr/lib/systemd
|
2023-01-08 02:26:48 +01:00
|
|
|
(
|
|
|
|
cd "$pkgdir"
|
|
|
|
_pick python-audit usr/lib/python*
|
|
|
|
)
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package_python-audit() {
|
|
|
|
pkgdesc+=' (python bindings)'
|
2024-01-17 19:39:43 +01:00
|
|
|
depends=(audit libaudit.so libauparse.so glibc python)
|
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
|
2023-01-08 02:26:48 +01:00
|
|
|
mv -v $pkgname/* "$pkgdir"
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
2023-04-30 04:15:37 +02:00
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
|
|
|
|
arch=(x86_64)
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2023-08-07 18:55:47 +02:00
|
|
|
license=(GPL-2.0-or-later LGPL-2.0-or-later)
|
2023-05-03 18:28:02 +02:00
|
|
|
|
2024-03-14 19:11:55 +01:00
|
|
|
sha256sums=(f964610dc0c1e68075d5ae4b14d6280d1164b6eca3a4a13721d1a711681403d9 # audit-userspace-v4.0.1.tar.gz
|
2024-01-17 19:39:43 +01:00
|
|
|
0ed3ff18f966f57e62d181705cad44ec0873a50d151dad46ca18a82edaa5589c) # audit.tmpfiles
|
2023-05-03 18:28:02 +02:00
|
|
|
|
2024-04-22 01:32:14 +02:00
|
|
|
## 4c1bc01da10a5f4f9b5d8964f89235107bf00077f5814c51286349a0a7dd1782 python-audit-4.0.1-03-x86_64.pkg.tar.lz
|
|
|
|
## 0bd124f21ead27fb36645bf8f6ab8692aeb319bc3c043125bd854e5f8b30fa3d audit-4.0.1-03-x86_64.pkg.tar.lz
|
2024-03-14 19:11:55 +01:00
|
|
|
|