summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2019-08-24 17:58:50 +0200
committerNicolas Iooss2019-08-24 17:58:50 +0200
commit5985a36e0b29ca397c983469feac3e2c7a9cce6b (patch)
treea8574dde56740166a8c32f8fe3d4b835f8e44bad
parent1c29bef9b2ce6ed8b7373ab17877d7b54b765a9d (diff)
downloadaur-5985a36e0b29ca397c983469feac3e2c7a9cce6b.tar.gz
libselinux 2.9-3 update
Fix a build issue reported in https://aur.archlinux.org/packages/libselinux/#comment-705409
-rw-r--r--.SRCINFO6
-rw-r--r--0001-libselinux-Fix-security_get_boolean_names-build-erro.patch49
-rw-r--r--PKGBUILD14
3 files changed, 64 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c2aab4726e1..2227e84b338 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libselinux
pkgdesc = SELinux library and simple utilities
pkgver = 2.9
- pkgrel = 2
+ pkgrel = 3
url = http://userspace.selinuxproject.org
arch = i686
arch = x86_64
@@ -18,14 +18,16 @@ pkgbase = libselinux
optdepends = python2: python2 bindings
optdepends = python: python bindings
optdepends = ruby: ruby bindings
- provides = selinux-usr-libselinux=2.9-2
+ provides = selinux-usr-libselinux=2.9-3
conflicts = selinux-usr-libselinux
source = https://github.com/SELinuxProject/selinux/releases/download/20190315/libselinux-2.9.tar.gz
source = libselinux.tmpfiles.d
source = 0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch
+ source = 0001-libselinux-Fix-security_get_boolean_names-build-erro.patch
sha256sums = 1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693
sha256sums = afe23890fb2e12e6756e5d81bad3c3da33f38a95d072731c0422fbeb0b1fa1fc
sha256sums = 47e8c4b6c67d1778bd0a8de782ea6d2406e8de3ad13064c85d53deba222100af
+ sha256sums = 9a0bcf7b8e2ec60fe954d2bbcd527f3b5d34e4cdb898ab19cd8b2ef869eed241
pkgname = libselinux
diff --git a/0001-libselinux-Fix-security_get_boolean_names-build-erro.patch b/0001-libselinux-Fix-security_get_boolean_names-build-erro.patch
new file mode 100644
index 00000000000..232aa8c1a4c
--- /dev/null
+++ b/0001-libselinux-Fix-security_get_boolean_names-build-erro.patch
@@ -0,0 +1,49 @@
+From ee8f7a870c625de139aa271eae0c40578488c2f6 Mon Sep 17 00:00:00 2001
+From: Richard Haines <richard_c_haines@btinternet.com>
+Date: Mon, 8 Jul 2019 14:37:01 +0100
+Subject: [PATCH 1/1] libselinux: Fix security_get_boolean_names build error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When running 'make' from libselinux on Fedora 30 (gcc 9.1.1) the
+following error is reported:
+
+bute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wstrict-overflow=5
+-I../include -D_GNU_SOURCE -DNO_ANDROID_BACKEND -c -o booleans.o
+booleans.c
+booleans.c: In function ‘security_get_boolean_names’:
+booleans.c:39:5: error: assuming signed overflow does not occur when
+changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Werror=strict-overflow]
+ 39 | int security_get_boolean_names(char ***names, int *len)
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~
+cc1: all warnings being treated as errors
+make[1]: *** [Makefile:171: booleans.o] Error 1
+
+This is caused by the '--i' in the: 'for (--i; i >= 0; --i)' loop.
+
+Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
+---
+ libselinux/src/booleans.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libselinux/src/booleans.c b/libselinux/src/booleans.c
+index ab1e0754e961..a9154ce86b5d 100644
+--- a/libselinux/src/booleans.c
++++ b/libselinux/src/booleans.c
+@@ -81,8 +81,10 @@ int security_get_boolean_names(char ***names, int *len)
+ free(namelist);
+ return rc;
+ bad_freen:
+- for (--i; i >= 0; --i)
+- free(n[i]);
++ if (i > 0) {
++ while (i >= 1)
++ free(n[--i]);
++ }
+ free(n);
+ bad:
+ goto out;
+--
+2.22.0
+
diff --git a/PKGBUILD b/PKGBUILD
index df402287799..d24c6280dc2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
pkgname=libselinux
pkgver=2.9
-pkgrel=2
+pkgrel=3
pkgdesc="SELinux library and simple utilities"
arch=('i686' 'x86_64' 'armv6h')
url='http://userspace.selinuxproject.org'
@@ -24,15 +24,23 @@ conflicts=("selinux-usr-${pkgname}")
provides=("selinux-usr-${pkgname}=${pkgver}-${pkgrel}")
source=("https://github.com/SELinuxProject/selinux/releases/download/20190315/${pkgname}-${pkgver}.tar.gz"
"libselinux.tmpfiles.d"
- '0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch')
+ '0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch'
+ '0001-libselinux-Fix-security_get_boolean_names-build-erro.patch')
sha256sums=('1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693'
'afe23890fb2e12e6756e5d81bad3c3da33f38a95d072731c0422fbeb0b1fa1fc'
- '47e8c4b6c67d1778bd0a8de782ea6d2406e8de3ad13064c85d53deba222100af')
+ '47e8c4b6c67d1778bd0a8de782ea6d2406e8de3ad13064c85d53deba222100af'
+ '9a0bcf7b8e2ec60fe954d2bbcd527f3b5d34e4cdb898ab19cd8b2ef869eed241')
prepare() {
cd "${pkgname}-${pkgver}"
+ # Backport "libselinux: Use Python distutils to install SELinux python bindings"
+ # https://github.com/SELinuxProject/selinux/commit/2efa06857575e4118e91ca250b6b92da68b130d5
patch -Np2 -i ../0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch
+
+ # Backport "libselinux: Fix security_get_boolean_names build error"
+ # https://github.com/SELinuxProject/selinux/commit/ee8f7a870c625de139aa271eae0c40578488c2f6
+ patch -Np2 -i ../0001-libselinux-Fix-security_get_boolean_names-build-erro.patch
}
build() {