aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2020-09-30 04:15:14 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-10-01 19:42:22 +0000
commita0e9ca04f2a2c3d33e3cf10c64c5d8634c5ea398 (patch)
treecc60e0f29ff31df9965e4df056b0b3b041de2071
parent468e11990db9faac9b43976e568644e8a75eff28 (diff)
downloadaports-a0e9ca04f2a2c3d33e3cf10c64c5d8634c5ea398.tar.gz
aports-a0e9ca04f2a2c3d33e3cf10c64c5d8634c5ea398.tar.bz2
aports-a0e9ca04f2a2c3d33e3cf10c64c5d8634c5ea398.tar.xz
main/audit: fix building with -fno-common
This fixes "multiple definition of" linking error due to -fno-common, which is a default flag in gcc 10.
-rw-r--r--main/audit/APKBUILD15
-rw-r--r--main/audit/fno-common-fix.patch23
2 files changed, 29 insertions, 9 deletions
diff --git a/main/audit/APKBUILD b/main/audit/APKBUILD
index 66b6785223..1304fb33a1 100644
--- a/main/audit/APKBUILD
+++ b/main/audit/APKBUILD
@@ -2,9 +2,9 @@
# Maintainer: Tycho Andersen <tycho@docker.com>
pkgname=audit
pkgver=2.8.5
-pkgrel=1
+pkgrel=2
pkgdesc="User space tools for 2.6 kernel auditing"
-url="http://people.redhat.com/sgrubb/audit/"
+url="https://people.redhat.com/sgrubb/audit/"
arch="all"
license="GPL-2.0-or-later"
depends_dev="linux-headers"
@@ -12,6 +12,7 @@ makedepends="$depends_dev swig libcap-ng-dev python3"
install="$pkgname.pre-install"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc"
source="https://people.redhat.com/sgrubb/audit/audit-$pkgver.tar.gz
+ fno-common-fix.patch
0002-auparse-remove-use-of-rawmemchr.patch
0003-all-get-rid-of-strndupa.patch
0004-fix-path-in-au-remote-conf.patch
@@ -33,7 +34,6 @@ build() {
WITHOUT="--without-python3 --without-python"
fi
- cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -48,17 +48,13 @@ build() {
}
check() {
- cd "$builddir"
make -j1 check
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
- install -D -m644 "$srcdir"/auditd.confd \
- "$pkgdir"/etc/conf.d/auditd
- install -D -m755 "$srcdir"/auditd.initd \
- "$pkgdir"/etc/init.d/auditd
+ install -Dm755 "$srcdir"/auditd.initd "$pkgdir"/etc/init.d/auditd
+ install -Dm644 "$srcdir"/auditd.confd "$pkgdir"/etc/conf.d/auditd
}
static() {
@@ -68,6 +64,7 @@ static() {
}
sha512sums="7d416aaa21c1a167f8e911ca82aecbaba804424f3243f505066c43ecc4a62a34feb2c27555e99d3268608404793dccca0f828c63670e3aa816016fb493f8174a audit-2.8.5.tar.gz
+78e32c05b6896d37bacf0938954fbce7486a528dabd55421f1715438fe489171f9157059050abdcb3f673258aa28b4a11f643ddb7824f3499a195dbbe634f101 fno-common-fix.patch
b7851d4c3c6d7d35f2e822273c17ab530ac24301c414da7f0c7578b7a182692ecd01b51cb50ea04adba4b43987f27020f8f411aec23b3bda0af4d4b6e9fbae5d 0002-auparse-remove-use-of-rawmemchr.patch
f3f2c4ee745e99877c981d889c5cbb0379d073a9b7634c1480ae603a21a13045f9978b51f8cb53c8d0ba414d249bb859af7bca7e302c464b3fc3c6463ecca762 0003-all-get-rid-of-strndupa.patch
6a0e1fb81d7defe6ad84da447a55e1e0b90299fcbd1ca679934a1dfa1a211986ea4642a1c69abe0619120b64b16546a41fa028f55f27c79819d896178aac6df7 0004-fix-path-in-au-remote-conf.patch
diff --git a/main/audit/fno-common-fix.patch b/main/audit/fno-common-fix.patch
new file mode 100644
index 0000000000..b73ae271ff
--- /dev/null
+++ b/main/audit/fno-common-fix.patch
@@ -0,0 +1,23 @@
+From 017e6c6ab95df55f34e339d2139def83e5dada1f Mon Sep 17 00:00:00 2001
+From: Steve Grubb <sgrubb@redhat.com>
+Date: Fri, 10 Jan 2020 21:13:50 -0500
+Subject: [PATCH] Header definitions need to be external when building with
+ -fno-common (which is default in GCC 10) - Tony Jones
+
+---
+ src/ausearch-common.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ausearch-common.h b/src/ausearch-common.h
+index 6669203..3040547 100644
+--- a/src/ausearch-common.h
++++ b/src/ausearch-common.h
+@@ -50,7 +50,7 @@ extern pid_t event_pid;
+ extern int event_exact_match;
+ extern uid_t event_uid, event_euid, event_loginuid;
+ extern const char *event_tuid, *event_teuid, *event_tauid;
+-slist *event_node_list;
++extern slist *event_node_list;
+ extern const char *event_comm;
+ extern const char *event_filename;
+ extern const char *event_hostname;