upg audit

This commit is contained in:
joborun linux 2023-08-07 19:55:47 +03:00
parent df770ec394
commit d36d5ad9de
2 changed files with 23 additions and 51 deletions

View file

@ -8,7 +8,7 @@
pkgbase=audit
_name=audit-userspace
pkgname=('audit' 'python-audit')
pkgver=3.1.1
pkgver=3.1.2
pkgrel=01
pkgdesc="Userspace components of the audit framework w/o systemd"
url='https://people.redhat.com/sgrubb/audit'
@ -18,9 +18,9 @@ options=(emptydirs)
source=(#$url/$pkgname-$pkgver.tar.gz
# $pkgbase-userspace-$pkgver.tar.gz::https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$pkgver.tar.gz
https://github.com/linux-audit/$_name/archive/v$pkgver/$_name-v$pkgver.tar.gz
$pkgbase-3.0.8-config_paths.patch
$pkgbase-3.0.9-flex_array_workaround.patch
$pkgbase-3.0.9-undo_flex_array_workaround.patch)
$pkgbase-3.0.8-config_paths.patch)
# $pkgbase-3.0.9-flex_array_workaround.patch
# $pkgbase-3.0.9-undo_flex_array_workaround.patch)
_pick() {
local p="$1" f d; shift
@ -36,10 +36,6 @@ prepare() {
# replace the use of /sbin with /usr/bin in configs
patch -Np1 -d $_name-$pkgver -i ../$pkgbase-3.0.8-config_paths.patch
# fix broken userspace build due to swig: https://listman.redhat.com/archives/linux-audit/2022-February/018843.html
cp -v /usr/include/linux/audit.h $_name-$pkgver/lib/
patch -Np1 -d $_name-$pkgver -i ../$pkgbase-3.0.9-flex_array_workaround.patch
cd $_name-$pkgver
autoreconf -fiv
}
@ -50,9 +46,12 @@ build() {
--sbindir=/usr/bin
--sysconfdir=/etc
--libexecdir=/usr/lib/audit
--enable-zos-remote
--enable-gssapi-krb5=yes
--disable-systemd
--with-libcap-ng=yes
--with-python=no
--with-python3=yes
)
cd $_name-$pkgver
@ -60,7 +59,7 @@ build() {
# prevent excessive overlinking due to libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
[ -n "$SOURCE_DATE_EPOCH" ] && touch -h -d @$SOURCE_DATE_EPOCH bindings/swig/python/audit.py
}
package_audit() {
@ -80,10 +79,6 @@ package_audit() {
make DESTDIR="$pkgdir" install -C $_name-$pkgver
# undo fix for broken swig, so that other programs may use the header file correctly
patch -Np0 -d "$pkgdir" -i "$srcdir/$pkgbase-3.0.9-undo_flex_array_workaround.patch"
rm -v "$pkgdir/usr/include/libaudit.h.orig"
# add log dir
install -vdm 700 "$pkgdir/var/log/$pkgname/"
# add rules.d dir to satisfy augenrules
@ -109,22 +104,11 @@ package_python-audit() {
arch=(x86_64)
license=(GPL LGPL2.1)
sha512sums=('58a8bb5f4432e035f2abcd336927b92789fe1f43dd5a71c508c3d79b94cbae2f979a02d79164f813fef4e42f7ad747b0d868f186d2197dd5987b0b98234399f9'
'bc699123f810abcf9300728bf61d7fcfcc83677b75fbeb713fb24cc11b2f9edf687661aab70766acde7c3c41c6a62f8e0a54cdfb49d1c7ce2246b67fbe3feec5'
'442bffac895abbd0abe455c36ebc03ed5a9faee16b57347ef1f37c0d9c33777e204da917be3bbe11c56173c2ec96eed60646ac7214da47f828eef5fa104c1ebb'
'92ba0f9b3d3721bf64b56e2f3e2ac4e54b2b6acd9d5646a5ee97eea244cb165e19a56c362de16834925ae063c79e6505687749f1dd67dd0f2997919aea7cb2ef')
b2sums=('36f632550dd34ac130be408562aeaeea07c513e3ac76ba1689eb2c588e3312772dae99510584cd8b5e3878905a1695f907fa7216b7f9ab208b48d14d0cfe5f7a'
'50be1b4f76ace20d8d14b4c57a9bb69daa3da35fd654aca8730bc287682fe38f1c1917b37469fb087daf9f309ffc15cca15f54166ece0a055f540c2604778fc6'
'2241c3dd29c803493ac8e85afd6031749a46b583514829b8761c24ae12061999b7c95107ec2948dd7edb239f805ca088b7b24229abb5445a4767702539779b0f'
'd89110c32da33c2ca9292391ead930352e4c8935aa86111640130d9e3fbc0ebe27b069a83812530dfbbf28f4ddd33545658c8061d87bfac9a9d3a6a5ff0be4b8')
license=(GPL-2.0-or-later LGPL-2.0-or-later)
sha256sums=(4516dbfd1bea0eea10a30f907e50f17087673a536ec6322a2a568dff4ebe50f4 # audit-userspace-v3.1.2.tar.gz
c3647e09d1a973595d8e43e373b8644dfb7131328c7fb3e229593af02c72ca42) # audit-3.0.8-config_paths.patch
sha256sums=(6a97cc472920639d736e9927353be05e323f351067fcf6e5d34439cafa0e9006 # audit-userspace-v3.1.1.tar.gz
c3647e09d1a973595d8e43e373b8644dfb7131328c7fb3e229593af02c72ca42 # audit-3.0.8-config_paths.patch
118c01ae411904b7a7730379ebf7a7506a044182a73d9bcf0620e25e853b698a # audit-3.0.9-flex_array_workaround.patch
f4f4a06fa6070970611f49573180501f588de215cc6c26bfb8804ed9e7621e8f) # audit-3.0.9-undo_flex_array_workaround.patch
## d8e56f46c9e6e9788886339699afb5f84be0f63117400b5a335d3fe382c03a55 audit-3.1.1-01-x86_64.pkg.tar.lz
## 6204ab9b3fcc8b38d9292a0f863c1a708b8736f5931f3a6cec673cdcb100e075 python-audit-3.1.1-01-x86_64.pkg.tar.lz
## 7f06a1444a57596593e21d027a8651cc3f5d5b71e7a6d7675cfd12e70bf9b3d8 audit-3.1.2-01-x86_64.pkg.tar.lz
## 707e39f2b7aed158324865097a3ab1d8a6d8807277815ca5fc852810e1defcd3 python-audit-3.1.2-01-x86_64.pkg.tar.lz

View file

@ -13,14 +13,14 @@ pkgname=(
audit
python-audit
)
pkgver=3.1.1
pkgver=3.1.2
pkgrel=1
pkgdesc='Userspace components of the audit framework'
url='https://people.redhat.com/sgrubb/audit'
arch=(x86_64)
license=(
GPL2
LGPL2.1
GPL-2.0-or-later
LGPL-2.0-or-later
)
makedepends=(
glibc
@ -35,17 +35,11 @@ options=(emptydirs)
source=(
https://github.com/linux-audit/$_name/archive/v$pkgver/$_name-v$pkgver.tar.gz
$pkgbase-3.0.8-config_paths.patch
$pkgbase-3.0.9-flex_array_workaround.patch
$pkgbase-3.0.9-undo_flex_array_workaround.patch
)
sha512sums=('58a8bb5f4432e035f2abcd336927b92789fe1f43dd5a71c508c3d79b94cbae2f979a02d79164f813fef4e42f7ad747b0d868f186d2197dd5987b0b98234399f9'
'bc699123f810abcf9300728bf61d7fcfcc83677b75fbeb713fb24cc11b2f9edf687661aab70766acde7c3c41c6a62f8e0a54cdfb49d1c7ce2246b67fbe3feec5'
'442bffac895abbd0abe455c36ebc03ed5a9faee16b57347ef1f37c0d9c33777e204da917be3bbe11c56173c2ec96eed60646ac7214da47f828eef5fa104c1ebb'
'92ba0f9b3d3721bf64b56e2f3e2ac4e54b2b6acd9d5646a5ee97eea244cb165e19a56c362de16834925ae063c79e6505687749f1dd67dd0f2997919aea7cb2ef')
b2sums=('36f632550dd34ac130be408562aeaeea07c513e3ac76ba1689eb2c588e3312772dae99510584cd8b5e3878905a1695f907fa7216b7f9ab208b48d14d0cfe5f7a'
'50be1b4f76ace20d8d14b4c57a9bb69daa3da35fd654aca8730bc287682fe38f1c1917b37469fb087daf9f309ffc15cca15f54166ece0a055f540c2604778fc6'
'2241c3dd29c803493ac8e85afd6031749a46b583514829b8761c24ae12061999b7c95107ec2948dd7edb239f805ca088b7b24229abb5445a4767702539779b0f'
'd89110c32da33c2ca9292391ead930352e4c8935aa86111640130d9e3fbc0ebe27b069a83812530dfbbf28f4ddd33545658c8061d87bfac9a9d3a6a5ff0be4b8')
sha512sums=('d5b05686aedd6eaaced000778580bd3e96e38c020534038d6b1ee6de96dd7687c2f3a52a2ae75be8b93c173b286a56dbc92231906c68fda79b113dfcaad6da84'
'bc699123f810abcf9300728bf61d7fcfcc83677b75fbeb713fb24cc11b2f9edf687661aab70766acde7c3c41c6a62f8e0a54cdfb49d1c7ce2246b67fbe3feec5')
b2sums=('85dd8b399f608dcf51ee2fbe6c99b35802f373e033d9d27e464aa4d98c4c0b4d190b932a2f19a047f18904261bb5e9ec7947be31effad80707b458481808ffcd'
'50be1b4f76ace20d8d14b4c57a9bb69daa3da35fd654aca8730bc287682fe38f1c1917b37469fb087daf9f309ffc15cca15f54166ece0a055f540c2604778fc6')
_pick() {
local p="$1" f d; shift
@ -61,10 +55,6 @@ prepare() {
# replace the use of /sbin with /usr/bin in configs
patch -Np1 -d $pkgbase-userspace-$pkgver -i ../$pkgbase-3.0.8-config_paths.patch
# fix broken userspace build due to swig: https://listman.redhat.com/archives/linux-audit/2022-February/018843.html
cp -v /usr/include/linux/audit.h $pkgbase-userspace-$pkgver/lib/
patch -Np1 -d $pkgbase-userspace-$pkgver -i ../$pkgbase-3.0.9-flex_array_workaround.patch
cd $_name-$pkgver
autoreconf -fiv
}
@ -75,10 +65,13 @@ build() {
--sbindir=/usr/bin
--sysconfdir=/etc
--libexecdir=/usr/lib/audit
--enable-zos-remote
--enable-gssapi-krb5=yes
--enable-systemd=yes
--with-io_uring=yes
--with-libcap-ng=yes
--with-python=no
--with-python3=yes
)
cd $_name-$pkgver
@ -86,7 +79,6 @@ build() {
# prevent excessive overlinking due to libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
[ -n "$SOURCE_DATE_EPOCH" ] && touch -h -d @$SOURCE_DATE_EPOCH bindings/swig/python/audit.py
}
package_audit() {
@ -117,10 +109,6 @@ package_audit() {
make DESTDIR="$pkgdir" install -C $_name-$pkgver
# undo fix for broken swig, so that other programs may use the header file correctly
patch -Np0 -d "$pkgdir" -i "$srcdir/$pkgbase-3.0.9-undo_flex_array_workaround.patch"
rm -v "$pkgdir/usr/include/libaudit.h.orig"
# add log dir
install -vdm 700 "$pkgdir/var/log/$pkgname/"
# add rules.d dir to satisfy augenrules