aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Ressel <aranea@aixah.de>2017-11-13 07:45:32 +0100
committerAnthony G. Basile <blueness@gentoo.org>2017-11-13 04:44:43 -0500
commit3330500670e7fb63e7fb79c2cb1571e77975d993 (patch)
tree73fa208558ef5ea0385a382e40ab33bfd2a12ccc
parentsys-apps/policycoreutils: Import from ::gentoo (diff)
downloadmusl-3330500670e7fb63e7fb79c2cb1571e77975d993.tar.gz
musl-3330500670e7fb63e7fb79c2cb1571e77975d993.tar.bz2
musl-3330500670e7fb63e7fb79c2cb1571e77975d993.zip
sys-apps/policycoreutils: Patch for musl
-rw-r--r--sys-apps/policycoreutils/files/policycoreutils-2.7-musl.patch34
-rw-r--r--sys-apps/policycoreutils/policycoreutils-2.7.ebuild2
2 files changed, 35 insertions, 1 deletions
diff --git a/sys-apps/policycoreutils/files/policycoreutils-2.7-musl.patch b/sys-apps/policycoreutils/files/policycoreutils-2.7-musl.patch
new file mode 100644
index 00000000..dc12f9df
--- /dev/null
+++ b/sys-apps/policycoreutils/files/policycoreutils-2.7-musl.patch
@@ -0,0 +1,34 @@
+From fa4f156c37043b2b60a75c968074a07c2bee0575 Mon Sep 17 00:00:00 2001
+From: Luis Ressel <aranea@aixah.de>
+Date: Mon, 13 Nov 2017 07:41:42 +0100
+Subject: [PATCH] Musl compatibility
+
+musl doesn't implement GLOB_BRACE and GLOB_TILDE, so simply don't use
+them there. This only affects "setfiles -f", which I don't expect many
+people use, and it's undocumented anyway that it expands globs.
+---
+ setfiles/restore.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/setfiles/restore.c b/setfiles/restore.c
+index 50d192a..9dea565 100644
+--- a/setfiles/restore.c
++++ b/setfiles/restore.c
+@@ -6,6 +6,14 @@
+ #include "restore.h"
+ #include <glob.h>
+
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
++#ifndef GLOB_TILDE
++#define GLOB_TILDE 0
++#endif
++
+ char **exclude_list;
+ int exclude_count;
+
+--
+2.15.0
+
diff --git a/sys-apps/policycoreutils/policycoreutils-2.7.ebuild b/sys-apps/policycoreutils/policycoreutils-2.7.ebuild
index 2f74519d..a75b766c 100644
--- a/sys-apps/policycoreutils/policycoreutils-2.7.ebuild
+++ b/sys-apps/policycoreutils/policycoreutils-2.7.ebuild
@@ -41,7 +41,6 @@ LICENSE="GPL-2"
SLOT="0"
DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python,${PYTHON_USEDEP}]
- >=sys-libs/glibc-2.4
>=sys-libs/libcap-1.10-r10:=
>=sys-libs/libsemanage-${SEMNG_VER}:=[python,${PYTHON_USEDEP}]
sys-libs/libcap-ng:=
@@ -84,6 +83,7 @@ src_prepare() {
if [[ ${PV} != 9999 ]] ; then
# If needed for live ebuilds please use /etc/portage/patches
eapply "${FILESDIR}/policycoreutils-2.7-0001-newrole-not-suid.patch"
+ eapply "${FILESDIR}/${P}-musl.patch"
fi
# rlpkg is more useful than fixfiles