commit:     3330500670e7fb63e7fb79c2cb1571e77975d993
Author:     Luis Ressel <aranea <AT> aixah <DOT> de>
AuthorDate: Mon Nov 13 06:45:32 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Nov 13 09:44:43 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=33305006

sys-apps/policycoreutils: Patch for musl

 .../files/policycoreutils-2.7-musl.patch           | 34 ++++++++++++++++++++++
 .../policycoreutils/policycoreutils-2.7.ebuild     |  2 +-
 2 files changed, 35 insertions(+), 1 deletion(-)

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 0000000..dc12f9d
--- /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 <[email protected]>
+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 2f74519..a75b766 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

Reply via email to