aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libselinux
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-02-21 20:11:43 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2017-02-21 20:11:43 +0100
commit24cbb405c2d5a08cc30bc3d7e2be816e1ad96e55 (patch)
tree27fa1c0bead2f9007af08cb3197943529135817a /testing/libselinux
parent19f2f70821237554ea0aa7206f78f93cff039444 (diff)
downloadaports-24cbb405c2d5a08cc30bc3d7e2be816e1ad96e55.tar.bz2
aports-24cbb405c2d5a08cc30bc3d7e2be816e1ad96e55.tar.xz
testing/libselinux: upgrade to 2.6
Diffstat (limited to 'testing/libselinux')
-rw-r--r--testing/libselinux/0001-libselinux-allow-link-with-lfts.patch40
-rw-r--r--testing/libselinux/APKBUILD22
-rw-r--r--testing/libselinux/fts.patch11
-rw-r--r--testing/libselinux/libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch18
4 files changed, 45 insertions, 46 deletions
diff --git a/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch b/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch
new file mode 100644
index 0000000000..744bc4222a
--- /dev/null
+++ b/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch
@@ -0,0 +1,40 @@
+From 79e346397327277ab793868e2f9d4a29525b6bf3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 21 Feb 2017 19:50:18 +0100
+Subject: [PATCH] libselinux: allow link with -lfts
+
+This makes it possible to build libselinux with the external libtfs for
+systems which does not implement the non-standard fts. For example musl
+libc.
+
+ make FTS_LDFLAGS=-lfts
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ libselinux/src/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
+index 5640a57..513a9e7 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -92,6 +92,7 @@ LD_SONAME_FLAGS=-install_name,$(LIBSO)
+ endif
+
+ PCRE_LDFLAGS ?= -lpcre
++FTS_LDFLAGS ?=
+
+ override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
+
+@@ -143,7 +144,7 @@ $(LIBA): $(OBJS)
+ $(RANLIB) $@
+
+ $(LIBSO): $(LOBJS)
+- $(CC) $(CFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,$(LD_SONAME_FLAGS)
++ $(CC) $(CFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) $(FTS_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,$(LD_SONAME_FLAGS)
+ ln -sf $@ $(TARGET)
+
+ $(LIBPC): $(LIBPC).in ../VERSION
+--
+2.11.1
+
diff --git a/testing/libselinux/APKBUILD b/testing/libselinux/APKBUILD
index 7998aac4a7..ff0cb1feb6 100644
--- a/testing/libselinux/APKBUILD
+++ b/testing/libselinux/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libselinux
-pkgver=2.5
+pkgver=2.6
pkgrel=0
pkgdesc="SELinux library and simple utilities"
url="https://github.com/SELinuxProject/selinux/wiki"
@@ -11,17 +11,15 @@ depends_dev=""
makedepends="$depends_dev pcre-dev linux-headers libsepol-dev fts-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils"
-source="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/libselinux-$pkgver.tar.gz
- libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch
+source="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20161014/libselinux-$pkgver.tar.gz
symlink.patch
- fts.patch
"
builddir="$srcdir/libselinux-$pkgver"
build() {
cd "$builddir"
- make || return 1
+ make PCRE_LDFLAGS="-lpcre -lfts" || return 1
}
package() {
@@ -35,15 +33,5 @@ utils() {
mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/
}
-md5sums="d1399f5c2fd2fbe0e9603d5143b30367 libselinux-2.5.tar.gz
-04b40a63466aa62a99e74cebc2ccc074 libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch
-55b8ac1062b9e95e28d1803525a4c3b9 symlink.patch
-de426b7922c739e49c32ff0274e820ff fts.patch"
-sha256sums="94c9e97706280bedcc288f784f67f2b9d3d6136c192b2c9f812115edba58514f libselinux-2.5.tar.gz
-225c9c2dfefc0fa976d829910bc88fcd00744165dad971929d32cbd093904aff libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch
-b1db0ab90341417ac43dc75cf615b492685f7ebadb71eaac151e06b333e8d4ce symlink.patch
-759fd63af3a0176e937925604abb5f8f1a687442f9fa3daa449d7ddb387c5190 fts.patch"
-sha512sums="1c6718aa6fa05c8635427cd6f5a89ce47fb6bb9bd2fec417293122826695d1ebb0e0b86e83711abb5c4fe71c67dce6f2e18745592833d1711f0ab2d01246b8c7 libselinux-2.5.tar.gz
-957dac83abb87b004eb1d2b89a1584c91b0939cb8a94b69fce8586a014a38806ee3068336d56b9e99658f6b9d2ffb5292805088e3f522661f0b584e44d096424 libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch
-3a4cefdcdd32df7430b38c961e9e20cebf1bdea9fa2fdba9680269426c07b6766d0f4e2f6a0b938c5d6d90110f71729413fe00877740ef592f96c706657b21f1 symlink.patch
-3cd0bc14fad5b6fdbbcbf34070b65eb93c04aef8a7f714a97b27805ec9c384afd04fa0f487562b5f8001a70fb062e440334223e6c04ee977b2102fd71ab4075d fts.patch"
+sha512sums="906e1bf98c669862ab4f4e883d511db8d739a5763dc857c9405ad3cc6c70766a482853d07134698a1a98257a8632cc756d0549a7640c2915d051714f502ff14b libselinux-2.6.tar.gz
+3a4cefdcdd32df7430b38c961e9e20cebf1bdea9fa2fdba9680269426c07b6766d0f4e2f6a0b938c5d6d90110f71729413fe00877740ef592f96c706657b21f1 symlink.patch"
diff --git a/testing/libselinux/fts.patch b/testing/libselinux/fts.patch
deleted file mode 100644
index aae13c8edd..0000000000
--- a/testing/libselinux/fts.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/Makefile.orig
-+++ ./src/Makefile
-@@ -112,7 +112,7 @@
- $(RANLIB) $@
-
- $(LIBSO): $(LOBJS)
-- $(CC) $(CFLAGS) -shared -o $@ $^ -lpcre -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
-+ $(CC) $(CFLAGS) -shared -o $@ $^ -lpcre -ldl -lfts $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
- ln -sf $@ $(TARGET)
-
- $(LIBPC): $(LIBPC).in ../VERSION
diff --git a/testing/libselinux/libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch b/testing/libselinux/libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch
deleted file mode 100644
index 5fbfce1136..0000000000
--- a/testing/libselinux/libselinux-drop-usage-of-_D_ALLOC_NAMLEN.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/libselinux/src/booleans.c b/libselinux/src/booleans.c
-index 4b39a28..c438af1 100644
---- a/src/booleans.c
-+++ b/src/booleans.c
-@@ -63,12 +63,11 @@ int security_get_boolean_names(char ***names, int *len)
- }
-
- for (i = 0; i < *len; i++) {
-- n[i] = (char *)malloc(_D_ALLOC_NAMLEN(namelist[i]));
-+ n[i] = strdup(namelist[i]->d_name);
- if (!n[i]) {
- rc = -1;
- goto bad_freen;
- }
-- strcpy(n[i], namelist[i]->d_name);
- }
- rc = 0;
- *names = n;