Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/686669/?format=api
{ "id": 686669, "url": "http://patchwork.ozlabs.org/api/patches/686669/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/1477423570-15694-1-git-send-email-bryce.ferguson@rockwellcollins.com/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1477423570-15694-1-git-send-email-bryce.ferguson@rockwellcollins.com>", "list_archive_url": null, "date": "2016-10-25T19:26:03", "name": "[v13,1/8] policycoreutils: new package", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4bd5efa3743e40b40aca4fe3769a8fdac375c4b0", "submitter": { "id": 70083, "url": "http://patchwork.ozlabs.org/api/people/70083/?format=api", "name": "Bryce Ferguson", "email": "bryce.ferguson@rockwellcollins.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/1477423570-15694-1-git-send-email-bryce.ferguson@rockwellcollins.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/686669/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/686669/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3t3NSG446Gz9sBR\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 26 Oct 2016 06:26:38 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0B50591FE8;\n\tTue, 25 Oct 2016 19:26:37 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id y7FO-3C+zP0f; Tue, 25 Oct 2016 19:26:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id AB32091FC7;\n\tTue, 25 Oct 2016 19:26:29 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2B3F01C1E97\n\tfor <buildroot@lists.busybox.net>;\n\tTue, 25 Oct 2016 19:26:29 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 1B42D8ABF9\n\tfor <buildroot@lists.busybox.net>;\n\tTue, 25 Oct 2016 19:26:29 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 7baXJchIasIy for <buildroot@lists.busybox.net>;\n\tTue, 25 Oct 2016 19:26:26 +0000 (UTC)", "from secvs01.rockwellcollins.com (secvs01.rockwellcollins.com\n\t[205.175.225.240])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id A582F8A5A6\n\tfor <buildroot@buildroot.org>; Tue, 25 Oct 2016 19:26:26 +0000 (UTC)", "from ofwgwc03.rockwellcollins.com (HELO\n\tdtulimr01.rockwellcollins.com) ([205.175.225.12])\n\tby secvs01.rockwellcollins.com with ESMTP; 25 Oct 2016 14:26:25 -0500" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Received": "from largo.rockwellcollins.com (unknown [192.168.140.76])\n\tby dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 4D693601D8; \n\tTue, 25 Oct 2016 14:26:25 -0500 (CDT)", "From": "Bryce Ferguson <bryce.ferguson@rockwellcollins.com>", "To": "buildroot@buildroot.org", "Date": "Tue, 25 Oct 2016 14:26:03 -0500", "Message-Id": "<1477423570-15694-1-git-send-email-bryce.ferguson@rockwellcollins.com>", "X-Mailer": "git-send-email 1.9.1", "Cc": "Bryce Ferguson <bryce.ferguson@rockwellcollins.com>,\n\tNiranjan Reddy <niranjan.reddy@rockwellcollins.com>", "Subject": "[Buildroot] [PATCH v13 1/8] policycoreutils: new package", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>", "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>", "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>", "List-Post": "<mailto:buildroot@busybox.net>", "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>", "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>" }, "content": "From: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n\nThis package contains the core policy utilities that are required\nfor basic operation of an SELinux system.\n\nSigned-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\nSigned-off-by: Matt Weber <matthew.weber@rockwellcollins.com>\nSigned-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>\nTested-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>\nSigned-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>\n\n---\nChanges: v12 -> v13:\n - Incorporated changes found here: https://patchwork.ozlabs.org/patch/649176/\n\nChanges v11 -> v12:\n - splitted DESTDIR and CFLAGS patches into three patches( DESTDIR,PREFIX and removal of ARCH).\n\nChanges v10 -> v11:\n - Removed LDFLAGS=\"-Wl,-rpath,$(HOST_DIR)/usr/lib\" as it is overriding LDFLAGS.\n - Removed patch PREFIX number in the subject line .\n - Replaced line LDFLAGS=\"-Wl,-rpath,$(HOST_DIR)/usr/lib\" with LDFLAGS=\"$(HOST_LDFLAGS)\".\n - Added patch to disable dbuslib flags in policycoreutils .\n - Added libglib2 dependency for restorecond.\n\nChanges v9 -> v10:\n - Added LDFLAGS for HOST_POLICYCOREUTILS_MAKE_OPTS:LDFLAGS=\"-Wl,-rpath,$(HOST_DIR)/usr/lib\"\n\nChanges v8 -> v9:\n - Cleaned up DESTDIR references in patches to use PREFIX instead\n (suggested by Samuel)\n - Added the use of the ARCH to pass the host and target architectures\n to the build (Suggested by Samuel)\n\nChanges v7 -> v8:\n - Cleaned up indentations in policycoreutils.mk (Suggested by\n Thomas P.)\n - Fixed sed separator (Suggested by Thomas P.)\n - Cleaned up cross compile patches and make options (Suggested by\n Thomas P.)\n - Changed dbus-glib dependency to a select and cleaned up the\n dependencies (Suggested by Thomas P.)\n\nChanges v6 -> v7:\n - No changes\n\nChanges v5 -> v6:\n - No changes\n\nChanges v4 -> v5:\n - Updated depends and removed glibc dependency (Matt W.)\n - Updated site to github (Matt W.)\n - Added host python 2/3 support (Matt W.)\n - Removed sandbox and mctrans support (Matt W.)\n - Removed restorcon init script (Matt W.)\n - Agree as optional settings were removed so menu isn't needed\n (Suggested by Ryan B. and Thomas P.)\n - added Config.in select for LIBCAP_NG (Suggested by Thomas P.)\n - cleaned up pam/audit ifeq (Suggested by Thomas P.)\n - fixed CFLAGS to include target_cflags instead of += (Suggested by\n Thomas P.)\n - Refactored lists of build/install steps into loops (Suggested by\n Thomas P.)\n - Removed += on first host depends assignment (Suggested by Thomas P.)\n - Refactored host make opts assignments (Suggested by Thomas P.)\n - Limited to glibc because of fts.h, some uclibc toolchains have it\n others don't. Eventually this would be good to fix with the updated\n method of file traversal. (Matt W.)\n - Gettext fixups for uclibc support. Counter productive as we\n now limit to glibc only. (Matt W.)\n - Added musl as possible lib type (Matt W.)\n - Removed largefile dependency (Clayton S.)\n - Changed dbus-glib select to a depends on in the Config.in (suggested\n by Ryan B.)\n\nChanges v3 -> v4:\n - Add a select for the libselinux Python bindings when debugging\n is enabled. This will cause Python to be built for the target\n (suggested by Thomas P.)\n - Cleaned up the configure comments (suggested by Thomas).\n - Added a dependency on BR2_USE_MMU for the debugging option\n because python requires it (suggested by Thomas P.)\n - Removed the dependencies on audit and linux-pam. Both packages\n are now optional dependencies based on whether or not the package\n has been selected\n - Moved the dependency on dbus-glib to only the restorecond option\n where it is used\n - Added a INSTALL_INIT_SYSV for the restorecond daemon rather than\n just installing it directly\n - Adding a dependency on glibc\n - Removed the clean commands\n\nChanges v2 -> v3:\n - Added dependencies on BR2_TOOLCHAIN_HAS_THREADS and BR2_LARGEFILE\n (suggested by Thomas P.)\n - Changes patch naming convention (suggested by Thomas P.)\n - Added selects for linux-pam and audit\n\nChanges v1 -> v2:\n - General cleanup to the mk file to conform to the standard format\n - Fixed the patch naming to avoid using the version number\n - Cleaned up the patch to include a signed-off-by line\n - Changed package dependencies into selects in the config\n---\n package/Config.in | 1 +\n ...IR-to-all-paths-that-use-an-absolute-path.patch | 131 +++++++++++++\n .../0002-Add-PREFIX-to-host-paths.patch | 211 +++++++++++++++++++++\n .../0003-Remove-hardcoded-arch-variable.patch | 43 +++++\n ...licy-python-install-arguments-to-be-a-var.patch | 42 ++++\n .../0005-Check-to-see-if-DBUS-is-enabled.patch | 56 ++++++\n package/policycoreutils/Config.in | 59 ++++++\n package/policycoreutils/policycoreutils.hash | 2 +\n package/policycoreutils/policycoreutils.mk | 111 +++++++++++\n 9 files changed, 656 insertions(+)\n create mode 100644 package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch\n create mode 100644 package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch\n create mode 100644 package/policycoreutils/0003-Remove-hardcoded-arch-variable.patch\n create mode 100644 package/policycoreutils/0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch\n create mode 100644 package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch\n create mode 100644 package/policycoreutils/Config.in\n create mode 100644 package/policycoreutils/policycoreutils.hash\n create mode 100644 package/policycoreutils/policycoreutils.mk", "diff": "diff --git a/package/Config.in b/package/Config.in\nindex 9399f63..8091e33 100644\n--- a/package/Config.in\n+++ b/package/Config.in\n@@ -1657,6 +1657,7 @@ menu \"Real-Time\"\n endmenu\n \n menu \"Security\"\n+\tsource \"package/policycoreutils/Config.in\"\n \tsource \"package/setools/Config.in\"\n endmenu\n \ndiff --git a/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch b/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch\nnew file mode 100644\nindex 0000000..bbd6895\n--- /dev/null\n+++ b/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch\n@@ -0,0 +1,131 @@\n+The addition of this patch makes the use of DESTDIR\n+mandatory as there are conditional checks which would fail if it's not\n+defined.\n+\n+This patch was updated from the patch provided by Niranjan Reddy to\n+accomodate version 2.5\n+\n+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>\n+Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>\n+Signed-off-by: Adam Duskett <Aduskett@gmail.com>\n+---\n+ policycoreutils/Makefile | 2 +-\n+ policycoreutils/newrole/Makefile | 4 ++--\n+ policycoreutils/restorecond/Makefile | 5 +++--\n+ policycoreutils/run_init/Makefile | 4 ++--\n+ policycoreutils/sepolicy/Makefile | 2 +-\n+ policycoreutils/sestatus/Makefile | 2 +-\n+ policycoreutils/setfiles/Makefile | 4 ++--\n+ 7 files changed, 12 insertions(+), 11 deletions(-)\n+\n+diff --git a/Makefile b/Makefile\n+index 962ac12..0634a2a 100644\n+--- a/Makefile\n++++ b/Makefile\n+@@ -1,6 +1,6 @@\n+ SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init sandbox secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll\n+ \n+-INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)\n++INOTIFYH = $(shell ls $(DESTDIR)/usr/include/sys/inotify.h 2>/dev/null)\n+ \n+ ifeq (${INOTIFYH}, /usr/include/sys/inotify.h)\n+ \tSUBDIRS += restorecond\n+diff --git a/newrole/Makefile b/newrole/Makefile\n+index 646cd4d..f124a6a 100644\n+--- a/newrole/Makefile\n++++ b/newrole/Makefile\n+@@ -4,8 +4,8 @@ BINDIR ?= $(PREFIX)/bin\n+ MANDIR ?= $(PREFIX)/share/man\n+ ETCDIR ?= $(DESTDIR)/etc\n+ LOCALEDIR = /usr/share/locale\n+-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)\n+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)\n++PAMH = $(shell ls $(DESTDIR)/usr/include/security/pam_appl.h 2>/dev/null)\n++AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)\n+ # Enable capabilities to permit newrole to generate audit records.\n+ # This will make newrole a setuid root program.\n+ # The capabilities used are: CAP_AUDIT_WRITE.\n+diff --git a/restorecond/Makefile b/restorecond/Makefile\n+index f99e1e7..92a4a4d 100644\n+--- a/restorecond/Makefile\n++++ b/restorecond/Makefile\n+@@ -11,11 +11,12 @@ autostart_DATA = sealertauto.desktop\n+ INITDIR ?= $(DESTDIR)/etc/rc.d/init.d\n+ SELINUXDIR = $(DESTDIR)/etc/selinux\n+ \n+-DBUSFLAGS = -DHAVE_DBUS -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/dbus-1.0/include\n++DBUSFLAGS = -DHAVE_DBUS -I$(DESTDIR)/usr/include/dbus-1.0 -I$(DESTDIR)/usr/lib64/dbus-1.0/include -I$(DESTDIR)/usr/lib/dbus-1.0/include\n+ DBUSLIB = -ldbus-glib-1 -ldbus-1\n+ \n+ CFLAGS ?= -g -Werror -Wall -W\n+-override CFLAGS += -I$(PREFIX)/include $(DBUSFLAGS) -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib/glib-2.0/include\n++override CFLAGS += -I$(DESTDIR)/usr/include $(DBUSFLAGS) -I$(DESTDIR)/usr/include/glib-2.0 \\\n++-I$(DESTDIR)/usr/lib64/glib-2.0/include -I$(DESTDIR)/usr/lib/glib-2.0/include\n+ \n+ LDLIBS += -lselinux $(DBUSLIB) -lglib-2.0 -L$(LIBDIR)\n+ \n+diff --git a/run_init/Makefile b/run_init/Makefile\n+index 5815a08..c81179b 100644\n+--- a/run_init/Makefile\n++++ b/run_init/Makefile\n+@@ -5,8 +5,8 @@ SBINDIR ?= $(PREFIX)/sbin\n+ MANDIR ?= $(PREFIX)/share/man\n+ ETCDIR ?= $(DESTDIR)/etc\n+ LOCALEDIR ?= /usr/share/locale\n+-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)\n+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)\n++PAMH = $(shell ls $(DESTDIR)/usr/include/security/pam_appl.h 2>/dev/null)\n++AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)\n+ \n+ CFLAGS ?= -Werror -Wall -W\n+ override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR=\"\\\"$(LOCALEDIR)\\\"\" -DPACKAGE=\"\\\"policycoreutils\\\"\"\n+diff --git a/sepolicy/Makefile b/sepolicy/Makefile\n+index 39d46e8..6624373 100644\n+--- a/sepolicy/Makefile\n++++ b/sepolicy/Makefile\n+@@ -12,7 +12,7 @@ LOCALEDIR ?= /usr/share/locale\n+ BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions\n+ SHAREDIR ?= $(PREFIX)/share/sandbox\n+ CFLAGS ?= -Wall -Werror -Wextra -W\n+-override CFLAGS += -I$(PREFIX)/include -DPACKAGE=\"policycoreutils\" -DSHARED -shared\n++override CFLAGS = $(LDFLAGS) -I$(DESTDIR)/usr/include -DPACKAGE=\"policycoreutils\" -Wall -Werror -Wextra -W -DSHARED -shared\n+ \n+ BASHCOMPLETIONS=sepolicy-bash-completion.sh\n+ \n+diff --git a/sestatus/Makefile b/sestatus/Makefile\n+index c04ff00..e10c32c 100644\n+--- a/sestatus/Makefile\n++++ b/sestatus/Makefile\n+@@ -6,7 +6,7 @@ ETCDIR ?= $(DESTDIR)/etc\n+ LIBDIR ?= $(PREFIX)/lib\n+ \n+ CFLAGS ?= -Werror -Wall -W\n+-override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64\n++override CFLAGS += -I$(DESTDIR)/usr/include -D_FILE_OFFSET_BITS=64\n+ LDLIBS = -lselinux -L$(LIBDIR)\n+ \n+ all: sestatus\n+diff --git a/setfiles/Makefile b/setfiles/Makefile\n+index 98f4f7d..eb26ed0 100644\n+--- a/setfiles/Makefile\n++++ b/setfiles/Makefile\n+@@ -3,13 +3,13 @@ PREFIX ?= $(DESTDIR)/usr\n+ SBINDIR ?= $(DESTDIR)/sbin\n+ MANDIR = $(PREFIX)/share/man\n+ LIBDIR ?= $(PREFIX)/lib\n+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)\n++AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)\n+ \n+ PROGRESS_STEP=$(shell grep \"^\\#define STAR_COUNT\" restore.h | awk -S '{ print $$3 }')\n+ ABORT_ON_ERRORS=$(shell grep \"^\\#define ABORT_ON_ERRORS\" setfiles.c | awk -S '{ print $$3 }')\n+ \n+ CFLAGS ?= -g -Werror -Wall -W\n+-override CFLAGS += -I$(PREFIX)/include\n++override CFLAGS += -I$(DESTDIR)/usr/include\n+ LDLIBS = -lselinux -lsepol -L$(LIBDIR)\n+ \n+ ifeq ($(AUDITH), /usr/include/libaudit.h)\n+-- \n+2.7.4\n+\ndiff --git a/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch b/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch\nnew file mode 100644\nindex 0000000..ba7a478\n--- /dev/null\n+++ b/package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch\n@@ -0,0 +1,211 @@\n+From 7f99a727cdb8160d49bb0d0554fc88787980c971 Mon Sep 17 00:00:00 2001\n+From: Adam Duskett <Aduskett@gmail.com>\n+Date: Thu, 14 Jul 2016 13:16:03 -0400\n+Subject: [PATCH 2/5] Add PREFIX to host paths\n+\n+Updates the remaining hardcoded host paths used in the build to be\n+prefixed with a PREFIX path to allow cross compilation.\n+\n+Updated to work with version 2.5\n+\n+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>\n+Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>\n+Signed-off-by: Adam Duskett <Aduskett@gmail.com>\n+---\n+ policycoreutils/Makefile | 4 +++-\n+ policycoreutils/audit2allow/Makefile | 2 +-\n+ policycoreutils/load_policy/Makefile | 2 +-\n+ policycoreutils/mcstrans/src/Makefile | 17 +++++++++--------\n+ policycoreutils/newrole/Makefile | 8 ++++----\n+ policycoreutils/run_init/Makefile | 8 ++++----\n+ policycoreutils/sepolicy/Makefile | 2 +-\n+ policycoreutils/setfiles/Makefile | 4 ++--\n+ 8 files changed, 25 insertions(+), 22 deletions(-)\n+\n+diff --git a/Makefile b/Makefile\n+index 0634a2a..bd99b1c 100644\n+--- a/Makefile\n++++ b/Makefile\n+@@ -1,8 +1,10 @@\n++PREFIX ?= $(DESTDIR)/usr\n++\n+ SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init sandbox secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll\n+ \n+ INOTIFYH = $(shell ls $(DESTDIR)/usr/include/sys/inotify.h 2>/dev/null)\n+ \n+-ifeq (${INOTIFYH}, /usr/include/sys/inotify.h)\n++ifeq (${INOTIFYH}, $(PREFIX)/include/sys/inotify.h)\n+ \tSUBDIRS += restorecond\n+ endif\n+ \n+diff --git a/audit2allow/Makefile b/audit2allow/Makefile\n+index 87d2502..d4108fe 100644\n+--- a/audit2allow/Makefile\n++++ b/audit2allow/Makefile\n+@@ -5,7 +5,7 @@ PREFIX ?= $(DESTDIR)/usr\n+ BINDIR ?= $(PREFIX)/bin\n+ LIBDIR ?= $(PREFIX)/lib\n+ MANDIR ?= $(PREFIX)/share/man\n+-LOCALEDIR ?= /usr/share/locale\n++LOCALEDIR ?= $(PREFIX)/share/locale\n+ \n+ all: audit2why\n+ \n+diff --git a/load_policy/Makefile b/load_policy/Makefile\n+index 7c5bab0..5cd0bbb 100644\n+--- a/load_policy/Makefile\n++++ b/load_policy/Makefile\n+@@ -3,7 +3,7 @@ PREFIX ?= $(DESTDIR)/usr\n+ SBINDIR ?= $(DESTDIR)/sbin\n+ USRSBINDIR ?= $(PREFIX)/sbin\n+ MANDIR ?= $(PREFIX)/share/man\n+-LOCALEDIR ?= /usr/share/locale\n++LOCALEDIR ?= $(PREFIX)/share/locale\n+ \n+ CFLAGS ?= -Werror -Wall -W\n+ override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR=\"\\\"$(LOCALEDIR)\\\"\" -DPACKAGE=\"\\\"policycoreutils\\\"\"\n+diff --git a/mcstrans/src/Makefile b/mcstrans/src/Makefile\n+index 907a1f1..6fda57e 100644\n+--- a/mcstrans/src/Makefile\n++++ b/mcstrans/src/Makefile\n+@@ -1,23 +1,24 @@\n+ ARCH = $(shell uname -i)\n++# Installation directories.\n++PREFIX ?= $(DESTDIR)/usr\n++SBINDIR ?= $(DESTDIR)/sbin\n++INITDIR ?= $(DESTDIR)/etc/rc.d/init.d\n++SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd\n++\n+ ifeq \"$(ARCH)\" \"x86_64\"\n+ \t# In case of 64 bit system, use these lines\n+-\tLIBDIR=/usr/lib64\n++\tLIBDIR=$(PREFIX)/lib64\n+ else \n+ ifeq \"$(ARCH)\" \"i686\"\n+ \t# In case of 32 bit system, use these lines\n+-\tLIBDIR=/usr/lib\n++\tLIBDIR=$(PREFIX)/lib\n+ else\n+ ifeq \"$(ARCH)\" \"i386\"\n+ \t# In case of 32 bit system, use these lines\n+-\tLIBDIR=/usr/lib\n++\tLIBDIR=$(PREFIX)/lib\n+ endif\n+ endif\n+ endif\n+-# Installation directories.\n+-PREFIX ?= $(DESTDIR)/usr\n+-SBINDIR ?= $(DESTDIR)/sbin\n+-INITDIR ?= $(DESTDIR)/etc/rc.d/init.d\n+-SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd\n+ \n+ PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c\n+ PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC))\n+diff --git a/newrole/Makefile b/newrole/Makefile\n+index f124a6a..b687a09 100644\n+--- a/newrole/Makefile\n++++ b/newrole/Makefile\n+@@ -3,7 +3,7 @@ PREFIX ?= $(DESTDIR)/usr\n+ BINDIR ?= $(PREFIX)/bin\n+ MANDIR ?= $(PREFIX)/share/man\n+ ETCDIR ?= $(DESTDIR)/etc\n+-LOCALEDIR = /usr/share/locale\n++LOCALEDIR = $(PREFIX)/share/locale\n+ PAMH = $(shell ls $(DESTDIR)/usr/include/security/pam_appl.h 2>/dev/null)\n+ AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)\n+ # Enable capabilities to permit newrole to generate audit records.\n+@@ -24,7 +24,7 @@ CFLAGS ?= -Werror -Wall -W\n+ EXTRA_OBJS =\n+ override CFLAGS += -DVERSION=\\\"$(VERSION)\\\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR=\"\\\"$(LOCALEDIR)\\\"\" -DPACKAGE=\"\\\"policycoreutils\\\"\"\n+ LDLIBS += -lselinux -L$(PREFIX)/lib\n+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)\n++ifeq ($(PAMH), $(PREFIX)/include/security/pam_appl.h)\n+ \toverride CFLAGS += -DUSE_PAM\n+ \tEXTRA_OBJS += hashtab.o\n+ \tLDLIBS += -lpam -lpam_misc\n+@@ -32,7 +32,7 @@ else\n+ \toverride CFLAGS += -D_XOPEN_SOURCE=500\n+ \tLDLIBS += -lcrypt\n+ endif\n+-ifeq ($(AUDITH), /usr/include/libaudit.h)\n++ifeq ($(AUDITH), $(PREFIX)/include/libaudit.h)\n+ \toverride CFLAGS += -DUSE_AUDIT\n+ \tLDLIBS += -laudit\n+ endif\n+@@ -66,7 +66,7 @@ install: all\n+ \ttest -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1\n+ \tinstall -m $(MODE) newrole $(BINDIR)\n+ \tinstall -m 644 newrole.1 $(MANDIR)/man1/\n+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)\n++ifeq ($(PAMH), $(PREFIX)/include/security/pam_appl.h)\n+ \ttest -d $(ETCDIR)/pam.d || install -m 755 -d $(ETCDIR)/pam.d\n+ ifeq ($(LSPP_PRIV),y)\n+ \tinstall -m 644 newrole-lspp.pamd $(ETCDIR)/pam.d/newrole\n+diff --git a/run_init/Makefile b/run_init/Makefile\n+index c81179b..ce0df9f 100644\n+--- a/run_init/Makefile\n++++ b/run_init/Makefile\n+@@ -4,21 +4,21 @@ PREFIX ?= $(DESTDIR)/usr\n+ SBINDIR ?= $(PREFIX)/sbin\n+ MANDIR ?= $(PREFIX)/share/man\n+ ETCDIR ?= $(DESTDIR)/etc\n+-LOCALEDIR ?= /usr/share/locale\n++LOCALEDIR ?= $(PREFIX)/share/locale\n+ PAMH = $(shell ls $(DESTDIR)/usr/include/security/pam_appl.h 2>/dev/null)\n+ AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)\n+ \n+ CFLAGS ?= -Werror -Wall -W\n+ override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR=\"\\\"$(LOCALEDIR)\\\"\" -DPACKAGE=\"\\\"policycoreutils\\\"\"\n+ LDLIBS += -lselinux -L$(PREFIX)/lib\n+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)\n++ifeq ($(PAMH), $(PREFIX)/include/security/pam_appl.h)\n+ \toverride CFLAGS += -DUSE_PAM\n+ \tLDLIBS += -lpam -lpam_misc\n+ else\n+ \toverride CFLAGS += -D_XOPEN_SOURCE=500\n+ \tLDLIBS += -lcrypt\n+ endif\n+-ifeq ($(AUDITH), /usr/include/libaudit.h)\n++ifeq ($(AUDITH), $(PREFIX)/include/libaudit.h)\n+ \toverride CFLAGS += -DUSE_AUDIT\n+ \tLDLIBS += -laudit\n+ endif\n+@@ -38,7 +38,7 @@ install: all\n+ \tinstall -m 755 open_init_pty $(SBINDIR)\n+ \tinstall -m 644 run_init.8 $(MANDIR)/man8/\n+ \tinstall -m 644 open_init_pty.8 $(MANDIR)/man8/\n+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)\n++ifeq ($(PAMH), $(PREFIX)/include/security/pam_appl.h)\n+ \tinstall -m 644 run_init.pamd $(ETCDIR)/pam.d/run_init\n+ endif\n+ \n+diff --git a/sepolicy/Makefile b/sepolicy/Makefile\n+index 6624373..a16f8de 100644\n+--- a/sepolicy/Makefile\n++++ b/sepolicy/Makefile\n+@@ -8,7 +8,7 @@ BINDIR ?= $(PREFIX)/bin\n+ SBINDIR ?= $(PREFIX)/sbin\n+ DATADIR ?= $(PREFIX)/share\n+ MANDIR ?= $(PREFIX)/share/man\n+-LOCALEDIR ?= /usr/share/locale\n++LOCALEDIR ?= $(PREFIX)/share/locale\n+ BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions\n+ SHAREDIR ?= $(PREFIX)/share/sandbox\n+ CFLAGS ?= -Wall -Werror -Wextra -W\n+diff --git a/setfiles/Makefile b/setfiles/Makefile\n+index eb26ed0..3c6b80d 100644\n+--- a/setfiles/Makefile\n++++ b/setfiles/Makefile\n+@@ -12,7 +12,7 @@ CFLAGS ?= -g -Werror -Wall -W\n+ override CFLAGS += -I$(DESTDIR)/usr/include\n+ LDLIBS = -lselinux -lsepol -L$(LIBDIR)\n+ \n+-ifeq ($(AUDITH), /usr/include/libaudit.h)\n++ifeq ($(AUDITH), $(PREFIX)/include/libaudit.h)\n+ \toverride CFLAGS += -DUSE_AUDIT\n+ \tLDLIBS += -laudit\n+ endif\n+-- \n+2.7.4\n+\ndiff --git a/package/policycoreutils/0003-Remove-hardcoded-arch-variable.patch b/package/policycoreutils/0003-Remove-hardcoded-arch-variable.patch\nnew file mode 100644\nindex 0000000..bf48051\n--- /dev/null\n+++ b/package/policycoreutils/0003-Remove-hardcoded-arch-variable.patch\n@@ -0,0 +1,43 @@\n+From 7424f2bea0cb412e96202f596ad8077131589f40 Mon Sep 17 00:00:00 2001\n+From: Adam Duskett <Aduskett@gmail.com>\n+Date: Thu, 14 Jul 2016 13:18:24 -0400\n+Subject: [PATCH 3/5] Remove hardcoded arch variable.\n+\n+Allow the ARCH value to be passed in as original configuration was\n+solely based on host architecture.\n+\n+This patch was updated to work with version 2.5\n+\n+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>\n+Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>\n+Signed-off-by: Adam Duskett <Aduskett@gmail.com>\n+---\n+ policycoreutils/mcstrans/src/Makefile | 1 -\n+ policycoreutils/mcstrans/utils/Makefile | 1 -\n+ 2 files changed, 2 deletions(-)\n+\n+diff --git a/mcstrans/src/Makefile b/mcstrans/src/Makefile\n+index 6fda57e..7b4489f 100644\n+--- a/mcstrans/src/Makefile\n++++ b/mcstrans/src/Makefile\n+@@ -1,4 +1,3 @@\n+-ARCH = $(shell uname -i)\n+ # Installation directories.\n+ PREFIX ?= $(DESTDIR)/usr\n+ SBINDIR ?= $(DESTDIR)/sbin\n+diff --git a/mcstrans/utils/Makefile b/mcstrans/utils/Makefile\n+index 1ffb027..912fe12 100644\n+--- a/mcstrans/utils/Makefile\n++++ b/mcstrans/utils/Makefile\n+@@ -2,7 +2,6 @@\n+ PREFIX ?= $(DESTDIR)/usr\n+ BINDIR ?= $(PREFIX)/sbin\n+ \n+-ARCH = $(shell uname -i)\n+ ifeq \"$(ARCH)\" \"x86_64\"\n+ # In case of 64 bit system, use these lines\n+ LIBDIR=/usr/lib64\n+-- \n+2.7.4\n+\ndiff --git a/package/policycoreutils/0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch b/package/policycoreutils/0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch\nnew file mode 100644\nindex 0000000..7c4b417\n--- /dev/null\n+++ b/package/policycoreutils/0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch\n@@ -0,0 +1,42 @@\n+From 27fd1c85ca95b5d66ab0241a08242a75b60b375c Mon Sep 17 00:00:00 2001\n+From: Adam Duskett <Aduskett@gmail.com>\n+Date: Thu, 14 Jul 2016 13:22:57 -0400\n+Subject: [PATCH 4/5] Change sepolicy python install arguments to be a variable\n+\n+To allow the python install arguments to be overwritten, change the\n+arguments to be a variable. This also cleans up the DESTDIR detection a\n+little bit.\n+\n+Updated to work with version 2.5\n+\n+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>\n+Signed-off-by: Adam Duskett <Aduskett@gmail.com>\n+---\n+ policycoreutils/sepolicy/Makefile | 5 ++++-\n+ 1 file changed, 4 insertions(+), 1 deletion(-)\n+\n+diff --git a/sepolicy/Makefile b/sepolicy/Makefile\n+index a16f8de..2013301 100644\n+--- a/sepolicy/Makefile\n++++ b/sepolicy/Makefile\n+@@ -1,4 +1,7 @@\n+ PYTHON ?= python\n++ifneq ($(DESTDIR),)\n++PYTHON_INSTALL_ARGS ?= --root $(DESTDIR)\n++endif\n+ \n+ # Installation directories.\n+ PREFIX ?= $(DESTDIR)/usr\n+@@ -32,7 +35,7 @@ test:\n+ \t@$(PYTHON) test_sepolicy.py -v\n+ \n+ install:\n+-\t$(PYTHON) setup.py install `test -n \"$(DESTDIR)\" && echo --root $(DESTDIR)`\n++\t$(PYTHON) setup.py install $(PYTHON_INSTALL_ARGS)\n+ \t[ -d $(BINDIR) ] || mkdir -p $(BINDIR)\n+ \tinstall -m 755 sepolicy.py $(BINDIR)/sepolicy\n+ \t(cd $(BINDIR); ln -sf sepolicy sepolgen)\n+-- \n+2.7.4\n+\ndiff --git a/package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch b/package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch\nnew file mode 100644\nindex 0000000..1e57af1\n--- /dev/null\n+++ b/package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch\n@@ -0,0 +1,56 @@\n+From d1bc28c5b2efe60a0ee04d9c171928d0f3475654 Mon Sep 17 00:00:00 2001\n+From: Adam Duskett <Aduskett@gmail.com>\n+Date: Thu, 14 Jul 2016 13:26:23 -0400\n+Subject: [PATCH 5/5] Check to see if DBUS is enabled.\n+\n+Adds a condition to prevent linking against dbus when at build time\n+dbus has not been enabled.\n+\n+Updated for 2.5.\n+\n+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>\n+Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>\n+Signed-off-by: Adam Duskett <Aduskett@gmail.com>\n+---\n+ policycoreutils/restorecond/Makefile | 2 ++\n+ policycoreutils/restorecond/user.c | 2 +-\n+ 2 files changed, 3 insertions(+), 1 deletion(-)\n+\n+diff --git a/restorecond/Makefile b/restorecond/Makefile\n+index 92a4a4d..95f38a6 100644\n+--- a/restorecond/Makefile\n++++ b/restorecond/Makefile\n+@@ -11,8 +11,10 @@ autostart_DATA = sealertauto.desktop\n+ INITDIR ?= $(DESTDIR)/etc/rc.d/init.d\n+ SELINUXDIR = $(DESTDIR)/etc/selinux\n+ \n++ifdef ENABLE_DBUS\n+ DBUSFLAGS = -DHAVE_DBUS -I$(DESTDIR)/usr/include/dbus-1.0 -I$(DESTDIR)/usr/lib64/dbus-1.0/include -I$(DESTDIR)/usr/lib/dbus-1.0/include\n+ DBUSLIB = -ldbus-glib-1 -ldbus-1\n++endif\n+ \n+ CFLAGS ?= -g -Werror -Wall -W\n+ override CFLAGS += -I$(DESTDIR)/usr/include $(DBUSFLAGS) -I$(DESTDIR)/usr/include/glib-2.0 \\\n+diff --git a/restorecond/user.c b/restorecond/user.c\n+index 714aae7..a04cddb 100644\n+--- a/restorecond/user.c\n++++ b/restorecond/user.c\n+@@ -54,7 +54,6 @@ static const char *PATH=\"/org/selinux/Restorecond\";\n+ static const char *INTERFACE=\"org.selinux.RestorecondIface\";\n+ static const char *RULE=\"type='signal',interface='org.selinux.RestorecondIface'\";\n+ \n+-static int local_lock_fd = -1;\n+ \n+ static DBusHandlerResult\n+ signal_filter (DBusConnection *connection __attribute__ ((__unused__)), DBusMessage *message, void *user_data)\n+@@ -101,6 +100,7 @@ static int dbus_server(GMainLoop *loop) {\n+ #include <selinux/selinux.h>\n+ #include <sys/file.h>\n+ \n++static int local_lock_fd = -1;\n+ /* size of the event structure, not counting name */\n+ #define EVENT_SIZE (sizeof (struct inotify_event))\n+ /* reasonable guess as to size of 1024 events */\n+-- \n+2.7.4\n+\ndiff --git a/package/policycoreutils/Config.in b/package/policycoreutils/Config.in\nnew file mode 100644\nindex 0000000..519d1d9\n--- /dev/null\n+++ b/package/policycoreutils/Config.in\n@@ -0,0 +1,59 @@\n+config BR2_PACKAGE_POLICYCOREUTILS\n+\tbool \"policycoreutils\"\n+\tselect BR2_PACKAGE_LIBSEMANAGE\n+\tselect BR2_PACKAGE_LIBCAP_NG\n+\tselect BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT\n+\tdepends on BR2_TOOLCHAIN_HAS_THREADS # libsemanage\n+\tdepends on !BR2_STATIC_LIBS #libsemanage\n+\tdepends on !BR2_arc #libsemanage\n+\tdepends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # uses fts.h\n+\thelp\n+\t Policycoreutils is a collection of policy utilities (originally\n+\t the \"core\" set of utilities needed to use SELinux, although it\n+\t has grown a bit over time), which have different dependencies.\n+\t sestatus, secon, run_init, and newrole only use libselinux.\n+\t load_policy and setfiles only use libselinux and libsepol.\n+\t semodule and semanage use libsemanage (and thus bring in\n+\t dependencies on libsepol and libselinux as well). setsebool\n+\t uses libselinux to make non-persistent boolean changes (via\n+\t the kernel interface) and uses libsemanage to make persistent\n+\t boolean changes.\n+\n+\t The base package will install the following utilities:\n+\t load_policy\n+\t newrole\n+\t restorecond\n+\t run_init\n+\t secon\n+\t semodule\n+\t semodule_deps\n+\t semodule_expand\n+\t semodule_link\n+\t semodule_package\n+\t sepolgen-ifgen\n+\t sestatus\n+\t setfiles\n+\t setsebool\n+\n+\t http://selinuxproject.org/page/Main_Page\n+\n+comment \"policycoreutils needs a glibc or musl toolchain w/ threads\"\n+\tdepends on !BR2_TOOLCHAIN_HAS_THREADS \\\n+\t\t|| !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)\n+\n+if BR2_PACKAGE_POLICYCOREUTILS\n+\n+config BR2_PACKAGE_POLICYCOREUTILS_RESTORECOND\n+\tbool \"restorecond Utility\"\n+\tselect BR2_PACKAGE_LIBGLIB2 #glib2\n+\tdepends on BR2_USE_WCHAR # glib2\n+\tdepends on BR2_TOOLCHAIN_HAS_THREADS # glib2\n+\tdepends on BR2_USE_MMU # glib2\n+\thelp\n+\t Enable restorecond to be built\n+\n+comment \"restorecond needs a toolchain w/ wchar, threads\"\n+\tdepends on BR2_USE_MMU\n+\tdepends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS\n+\n+endif\ndiff --git a/package/policycoreutils/policycoreutils.hash b/package/policycoreutils/policycoreutils.hash\nnew file mode 100644\nindex 0000000..44cb0c3\n--- /dev/null\n+++ b/package/policycoreutils/policycoreutils.hash\n@@ -0,0 +1,2 @@\n+# https://github.com/SELinuxProject/selinux/wiki/Releases\n+sha256 329382cfe9fa977678abf541dcd8fe3847cf0c83b24654c8f7322343907078a1 policycoreutils-2.5.tar.gz\ndiff --git a/package/policycoreutils/policycoreutils.mk b/package/policycoreutils/policycoreutils.mk\nnew file mode 100644\nindex 0000000..6611cdb\n--- /dev/null\n+++ b/package/policycoreutils/policycoreutils.mk\n@@ -0,0 +1,111 @@\n+################################################################################\n+#\n+# policycoreutils\n+#\n+################################################################################\n+\n+POLICYCOREUTILS_VERSION = 2.5\n+POLICYCOREUTILS_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223\n+POLICYCOREUTILS_LICENSE = GPLv2\n+POLICYCOREUTILS_LICENSE_FILES = COPYING\n+\n+# gettext for load_policy.c use of libintl_* functions\n+POLICYCOREUTILS_DEPENDENCIES = libsemanage libcap-ng $(if $(BR2_NEEDS_GETTEXT),gettext)\n+\n+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)\n+POLICYCOREUTILS_DEPENDENCIES += linux-pam\n+POLICYCOREUTILS_MAKE_OPTS += NAMESPACE_PRIV=y\n+define POLICYCOREUTILS_INSTALL_TARGET_LINUX_PAM_CONFS\n+\t$(INSTALL) -D -m 0644 $(@D)/newrole/newrole-lspp.pamd $(TARGET_DIR)/etc/pam.d/newrole\n+\t$(INSTALL) -D -m 0644 $(@D)/run_init/run_init.pamd $(TARGET_DIR)/etc/pam.d/run_init\n+endef\n+endif\n+\n+ifeq ($(BR2_PACKAGE_AUDIT),y)\n+POLICYCOREUTILS_DEPENDENCIES += audit\n+POLICYCOREUTILS_MAKE_OPTS += AUDIT_LOG_PRIV=y\n+endif\n+\n+# Enable LSPP_PRIV if both audit and linux pam are enabled\n+ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_PACKAGE_AUDIT),yy)\n+POLICYCOREUTILS_MAKE_OPTS += LSPP_PRIV=y\n+endif\n+\n+# Undefining _FILE_OFFSET_BITS here because of a \"bug\" with glibc fts.h\n+# large file support.\n+# See https://bugzilla.redhat.com/show_bug.cgi?id=574992 for more information\n+POLICYCOREUTILS_MAKE_OPTS += \\\n+\tCC=\"$(TARGET_CC)\" \\\n+\tCFLAGS=\"$(TARGET_CFLAGS) -U_FILE_OFFSET_BITS\" \\\n+\tLDFLAGS=\"$(TARGET_LDFLAGS) $(if $(BR2_NEEDS_GETTEXT),-lintl)\" \\\n+\tARCH=\"$(BR2_ARCH)\" \n+\n+POLICYCOREUTILS_MAKE_DIRS = load_policy newrole run_init \\\n+\tsecon semodule semodule_deps semodule_expand semodule_link \\\n+\tsemodule_package sepolgen-ifgen sestatus setfiles setsebool\n+\n+ifeq ($(BR2_PACKAGE_POLICYCOREUTILS_RESTORECOND),y)\n+POLICYCOREUTILS_MAKE_DIRS += restorecond\n+endif\n+#The source has been patched to require a DESTDIR path which is\n+#prefixed to all filesystem paths which were by default hardcoded to\n+#host system paths.\n+define POLICYCOREUTILS_BUILD_CMDS\n+\tfor dir in $(POLICYCOREUTILS_MAKE_DIRS) ; do \\\n+\t\t$(MAKE) -C $(@D)/$${dir} $(POLICYCOREUTILS_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all || exit 1 ; \\\n+\tdone\n+endef\n+\n+define POLICYCOREUTILS_INSTALL_TARGET_CMDS\n+\tfor dir in $(POLICYCOREUTILS_MAKE_DIRS) ; do \\\n+\t\t$(MAKE) -C $(@D)/$${dir} $(POLICYCOREUTILS_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install || exit 1 ; \\\n+\tdone\n+endef\n+\n+HOST_POLICYCOREUTILS_DEPENDENCIES = host-libsemanage host-dbus-glib host-sepolgen host-setools\n+\n+# Undefining _FILE_OFFSET_BITS here because of a \"bug\" with glibc fts.h\n+# large file support.\n+# See https://bugzilla.redhat.com/show_bug.cgi?id=574992 for more information\n+HOST_POLICYCOREUTILS_MAKE_OPTS = \\\n+\tCC=\"$(HOSTCC)\" \\\n+\tCFLAGS=\"$(HOST_CFLAGS) -U_FILE_OFFSET_BITS\" \\\n+\tPYTHON=\"$(HOST_DIR)/usr/bin/python\" \\\n+\tPYTHON_INSTALL_ARGS=\"$(HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS)\" \\\n+\tARCH=\"$(HOSTARCH)\" \\\n+\tLDFLAGS=\"$(HOST_LDFLAGS)\"\n+\n+ifeq ($(BR2_PACKAGE_PYTHON3),y)\n+HOST_POLICYCOREUTILS_DEPENDENCIES += host-python3\n+HOST_POLICYCOREUTILS_MAKE_OPTS += \\\n+\tPYLIBVER=\"python$(PYTHON3_VERSION_MAJOR)\"\n+else\n+HOST_POLICYCOREUTILS_DEPENDENCIES += host-python\n+HOST_POLICYCOREUTILS_MAKE_OPTS += \\\n+\tPYLIBVER=\"python$(PYTHON_VERSION_MAJOR)\"\n+endif\n+\n+# Note: We are only building the programs required by the refpolicy build\n+HOST_POLICYCOREUTILS_MAKE_DIRS = load_policy semodule semodule_deps semodule_expand semodule_link \\\n+\tsemodule_package setfiles restorecond audit2allow scripts semanage sepolicy\n+\n+define HOST_POLICYCOREUTILS_BUILD_CMDS\n+\tfor dir in $(HOST_POLICYCOREUTILS_MAKE_DIRS) ; do \\\n+\t\t$(MAKE) -C $(@D)/$${dir} $(HOST_POLICYCOREUTILS_MAKE_OPTS) DESTDIR=$(HOST_DIR) all || exit 1 ; \\\n+\tdone\n+endef\n+#The source has been patched to require a DESTDIR path which is\n+#prefixed to all filesystem paths which were by default hardcoded to\n+#host system paths.\n+define HOST_POLICYCOREUTILS_INSTALL_CMDS\n+\tfor dir in $(HOST_POLICYCOREUTILS_MAKE_DIRS) ; do \\\n+\t\t$(MAKE) -C $(@D)/$${dir} $(HOST_POLICYCOREUTILS_MAKE_OPTS) DESTDIR=$(HOST_DIR) install || exit 1 ; \\\n+\tdone\n+\t# Fix python paths\n+\t$(SED) 's%/usr/bin/%$(HOST_DIR)/usr/bin/%g' $(HOST_DIR)/usr/bin/audit2allow\n+\t$(SED) 's%/usr/bin/%$(HOST_DIR)/usr/bin/%g' $(HOST_DIR)/usr/bin/sepolgen-ifgen\n+\t$(SED) 's%/usr/bin/%$(HOST_DIR)/usr/bin/%g' $(HOST_DIR)/usr/bin/sepolicy\n+endef\n+\n+$(eval $(generic-package))\n+$(eval $(host-generic-package))\n", "prefixes": [ "v13", "1/8" ] }