get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/495231/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 495231,
    "url": "http://patchwork.ozlabs.org/api/patches/495231/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/1436905227-26937-3-git-send-email-clayton.shotwell@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": "<1436905227-26937-3-git-send-email-clayton.shotwell@rockwellcollins.com>",
    "list_archive_url": null,
    "date": "2015-07-14T20:20:14",
    "name": "[v9,02/15] policycoreutils: new package",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ac6d6a1193e342263b8426d08e2ed6bf4a6c9202",
    "submitter": {
        "id": 64481,
        "url": "http://patchwork.ozlabs.org/api/people/64481/?format=api",
        "name": "Clayton Shotwell",
        "email": "clayton.shotwell@rockwellcollins.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/1436905227-26937-3-git-send-email-clayton.shotwell@rockwellcollins.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/495231/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/495231/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 855B21402AC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 15 Jul 2015 06:20:49 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A1F36A4390;\n\tTue, 14 Jul 2015 20:20:48 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 2kr26Fa6AeAo; Tue, 14 Jul 2015 20:20:40 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A8A2AA42FC;\n\tTue, 14 Jul 2015 20:20:39 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6DD151CE612\n\tfor <buildroot@lists.busybox.net>;\n\tTue, 14 Jul 2015 20:20:37 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6B06C95978\n\tfor <buildroot@lists.busybox.net>;\n\tTue, 14 Jul 2015 20:20:37 +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 gXGphnirti7l for <buildroot@lists.busybox.net>;\n\tTue, 14 Jul 2015 20:20:35 +0000 (UTC)",
            "from ch3vs02.rockwellcollins.com (ch3vs02.rockwellcollins.com\n\t[205.175.226.29])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 55A8D9558D\n\tfor <buildroot@buildroot.org>; Tue, 14 Jul 2015 20:20:35 +0000 (UTC)",
            "from ofwch3n02.rockwellcollins.com (HELO\n\tcrulimr02.rockwellcollins.com) ([205.175.226.14])\n\tby ch3vs02.rockwellcollins.com with ESMTP; 14 Jul 2015 15:20:34 -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 thehammer.rockwellcollins.com (unknown [192.168.141.197])\n\tby crulimr02.rockwellcollins.com (Postfix) with ESMTP id 6253960150; \n\tTue, 14 Jul 2015 15:20:34 -0500 (CDT)",
        "From": "Clayton Shotwell <clayton.shotwell@rockwellcollins.com>",
        "To": "buildroot@buildroot.org",
        "Date": "Tue, 14 Jul 2015 15:20:14 -0500",
        "Message-Id": "<1436905227-26937-3-git-send-email-clayton.shotwell@rockwellcollins.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1436905227-26937-1-git-send-email-clayton.shotwell@rockwellcollins.com>",
        "References": "<1436905227-26937-1-git-send-email-clayton.shotwell@rockwellcollins.com>",
        "Cc": "Clayton Shotwell <clayton.shotwell@rockwellcollins.com>",
        "Subject": "[Buildroot] [PATCH v9 02/15] 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": "Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\nSigned-off-by: Matt Weber <matthew.weber@rockwellcollins.com>\n\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 | 275 +++++++++++++++++++++\n .../0002-Allow-CFLAGS-to-be-overwritten.patch      |  57 +++++\n ...licy-python-install-arguments-to-be-a-var.patch |  42 ++++\n package/policycoreutils/Config.in                  |  59 +++++\n package/policycoreutils/policycoreutils.hash       |   2 +\n package/policycoreutils/policycoreutils.mk         | 108 ++++++++\n 7 files changed, 544 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-Allow-CFLAGS-to-be-overwritten.patch\n create mode 100644 package/policycoreutils/0003-Change-sepolicy-python-install-arguments-to-be-a-var.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 5beb450..514c1e5 100644\n--- a/package/Config.in\n+++ b/package/Config.in\n@@ -1363,6 +1363,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..a25bd33\n--- /dev/null\n+++ b/package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch\n@@ -0,0 +1,275 @@\n+From 92d7cc3539f8bfc68b2f2bf688375647abf73ee7 Mon Sep 17 00:00:00 2001\n+From: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Date: Fri, 10 Jul 2015 11:44:08 -0500\n+Subject: [PATCH 1/3] Add DESTDIR to all paths that use an absolute path\n+\n+To aid in cross compiling, add the DESTDIR variable to the start of all\n+of the paths used during compilation. Most paths already used DESTDIR.\n+\n+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+---\n+ Makefile                |  4 ++--\n+ audit2allow/Makefile    |  2 +-\n+ load_policy/Makefile    |  2 +-\n+ mcstrans/src/Makefile   | 22 +++++++++++++---------\n+ mcstrans/utils/Makefile | 11 +++++++----\n+ newrole/Makefile        | 12 ++++++------\n+ restorecond/Makefile    |  6 ++++--\n+ run_init/Makefile       | 12 ++++++------\n+ sepolicy/Makefile       |  2 +-\n+ setfiles/Makefile       |  4 ++--\n+ 10 files changed, 43 insertions(+), 34 deletions(-)\n+\n+diff --git a/Makefile b/Makefile\n+index 3980799..0fca022 100644\n+--- a/Makefile\n++++ b/Makefile\n+@@ -1,8 +1,8 @@\n+ SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init sandbox secon audit2allow audit2why sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui\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++ifeq (${INOTIFYH}, $(DESTDIR)/usr/include/sys/inotify.h)\n+ \tSUBDIRS += restorecond\n+ endif\n+ \n+diff --git a/audit2allow/Makefile b/audit2allow/Makefile\n+index 88635d4..1647b5a 100644\n+--- a/audit2allow/Makefile\n++++ b/audit2allow/Makefile\n+@@ -3,7 +3,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: ;\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 fb44490..a0666f1 100644\n+--- a/mcstrans/src/Makefile\n++++ b/mcstrans/src/Makefile\n+@@ -1,22 +1,26 @@\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++\n++ARCH ?= $(shell uname -i)\n+ ifeq \"$(ARCH)\" \"x86_64\"\n+ \t# In case of 64 bit system, use these lines\n+-\tLIBDIR=/usr/lib64\n+-else \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++else\n++\t# Default to these lines if arch is unknown\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+ \n+ PROG_SRC=mcstrans.c  mcscolor.c  mcstransd.c  mls_level.c\n+ PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC))\n+diff --git a/mcstrans/utils/Makefile b/mcstrans/utils/Makefile\n+index 1ffb027..da5c152 100644\n+--- a/mcstrans/utils/Makefile\n++++ b/mcstrans/utils/Makefile\n+@@ -2,18 +2,21 @@\n+ PREFIX ?= $(DESTDIR)/usr\n+ BINDIR ?= $(PREFIX)/sbin\n+ \n+-ARCH = $(shell uname -i)\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++        LIBDIR=$(PREFIX)/lib64\n+ else\n+ ifeq \"$(ARCH)\" \"i686\"\n+         # In case of 32 bit system, use these lines\n+-        LIBDIR=/usr/lib\n++        LIBDIR=$(PREFIX)/lib\n+ else\n+ ifeq \"$(ARCH)\" \"i386\"\n+         # In case of 32 bit system, use these lines\n+-        LIBDIR=/usr/lib\n++        LIBDIR=$(PREFIX)/lib\n++else\n++        # Default to these lines if arch is unknown\n++        LIBDIR=$(PREFIX)/lib\n+ endif\n+ endif\n+ endif\n+diff --git a/newrole/Makefile b/newrole/Makefile\n+index 646cd4d..045e3b7 100644\n+--- a/newrole/Makefile\n++++ b/newrole/Makefile\n+@@ -3,9 +3,9 @@ PREFIX ?= $(DESTDIR)/usr\n+ 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++LOCALEDIR = $(PREFIX)/share/locale\n++PAMH = $(shell ls $(PREFIX)/include/security/pam_appl.h 2>/dev/null)\n++AUDITH = $(shell ls $(PREFIX)/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+@@ -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/restorecond/Makefile b/restorecond/Makefile\n+index 3074542..7c40f95 100644\n+--- a/restorecond/Makefile\n++++ b/restorecond/Makefile\n+@@ -10,11 +10,13 @@ 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$(PREFIX)/include/dbus-1.0 -I$(PREFIX)/lib64/dbus-1.0/include \\\n++\t\t-I$(PREFIX)/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$(PREFIX)/include $(DBUSFLAGS) -I$(PREFIX)/include/glib-2.0 \\\n++\t\t-I$(PREFIX)/lib64/glib-2.0/include -I$(PREFIX)/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 12b39b4..da49c41 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+-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)\n+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)\n++LOCALEDIR ?= $(PREFIX)/share/locale\n++PAMH = $(shell ls $(PREFIX)/include/security/pam_appl.h 2>/dev/null)\n++AUDITH = $(shell ls $(PREFIX)/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 11b534f..1249546 100644\n+--- a/sepolicy/Makefile\n++++ b/sepolicy/Makefile\n+@@ -5,7 +5,7 @@ LIBDIR ?= $(PREFIX)/lib\n+ BINDIR ?= $(PREFIX)/bin\n+ SBINDIR ?= $(PREFIX)/sbin\n+ MANDIR ?= $(PREFIX)/share/man\n+-LOCALEDIR ?= /usr/share/locale\n++LOCALEDIR ?= $(PREFIX)/share/locale\n+ PYTHON ?= /usr/bin/python\n+ BASHCOMPLETIONDIR ?= $(DESTDIR)/etc/bash_completion.d/\n+ SHAREDIR ?= $(PREFIX)/share/sandbox\n+diff --git a/setfiles/Makefile b/setfiles/Makefile\n+index 4b44b3c..ebc22c8 100644\n+--- a/setfiles/Makefile\n++++ b/setfiles/Makefile\n+@@ -3,7 +3,7 @@ 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 $(PREFIX)/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+@@ -12,7 +12,7 @@ CFLAGS = -g -Werror -Wall -W\n+ override CFLAGS += -I$(PREFIX)/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+1.9.1\n+\ndiff --git a/package/policycoreutils/0002-Allow-CFLAGS-to-be-overwritten.patch b/package/policycoreutils/0002-Allow-CFLAGS-to-be-overwritten.patch\nnew file mode 100644\nindex 0000000..ca708ab\n--- /dev/null\n+++ b/package/policycoreutils/0002-Allow-CFLAGS-to-be-overwritten.patch\n@@ -0,0 +1,57 @@\n+From cfce1180f96cca5e7444d94b2ebc39213d7dac75 Mon Sep 17 00:00:00 2001\n+From: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Date: Fri, 10 Jul 2015 11:47:09 -0500\n+Subject: [PATCH 2/3] Allow CFLAGS to be overwritten\n+\n+Allow all CFLAGS declarations to be overwritten to aid in cross\n+compiling.\n+\n+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+---\n+ sepolicy/Makefile | 2 +-\n+ sestatus/Makefile | 2 +-\n+ setfiles/Makefile | 2 +-\n+ 3 files changed, 3 insertions(+), 3 deletions(-)\n+\n+diff --git a/sepolicy/Makefile b/sepolicy/Makefile\n+index 1249546..a52667a 100644\n+--- a/sepolicy/Makefile\n++++ b/sepolicy/Makefile\n+@@ -9,7 +9,7 @@ LOCALEDIR ?= $(PREFIX)/share/locale\n+ PYTHON ?= /usr/bin/python\n+ BASHCOMPLETIONDIR ?= $(DESTDIR)/etc/bash_completion.d/\n+ SHAREDIR ?= $(PREFIX)/share/sandbox\n+-override CFLAGS = $(LDFLAGS) -I$(PREFIX)/include -DPACKAGE=\"policycoreutils\" -Wall -Werror -Wextra -W  -DSHARED -shared\n++override CFLAGS += $(LDFLAGS) -I$(PREFIX)/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 c5db7a3..c04ff00 100644\n+--- a/sestatus/Makefile\n++++ b/sestatus/Makefile\n+@@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man\n+ ETCDIR ?= $(DESTDIR)/etc\n+ LIBDIR ?= $(PREFIX)/lib\n+ \n+-CFLAGS = -Werror -Wall -W\n++CFLAGS ?= -Werror -Wall -W\n+ override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64\n+ LDLIBS = -lselinux -L$(LIBDIR)\n+ \n+diff --git a/setfiles/Makefile b/setfiles/Makefile\n+index ebc22c8..7c48814 100644\n+--- a/setfiles/Makefile\n++++ b/setfiles/Makefile\n+@@ -8,7 +8,7 @@ AUDITH = $(shell ls $(PREFIX)/include/libaudit.h 2>/dev/null)\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++CFLAGS ?= -g -Werror -Wall -W\n+ override CFLAGS += -I$(PREFIX)/include\n+ LDLIBS = -lselinux -lsepol -L$(LIBDIR)\n+ \n+-- \n+1.9.1\n+\ndiff --git a/package/policycoreutils/0003-Change-sepolicy-python-install-arguments-to-be-a-var.patch b/package/policycoreutils/0003-Change-sepolicy-python-install-arguments-to-be-a-var.patch\nnew file mode 100644\nindex 0000000..1b8c3bf\n--- /dev/null\n+++ b/package/policycoreutils/0003-Change-sepolicy-python-install-arguments-to-be-a-var.patch\n@@ -0,0 +1,42 @@\n+From 4bb3e6bda68fe52fcd2df4f27c5900f4b0d50fa1 Mon Sep 17 00:00:00 2001\n+From: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+Date: Fri, 10 Jul 2015 11:56:49 -0500\n+Subject: [PATCH 3/3] 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+Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>\n+---\n+ sepolicy/Makefile | 7 ++++++-\n+ 1 file changed, 6 insertions(+), 1 deletion(-)\n+\n+diff --git a/sepolicy/Makefile b/sepolicy/Makefile\n+index a52667a..4a10df6 100644\n+--- a/sepolicy/Makefile\n++++ b/sepolicy/Makefile\n+@@ -7,6 +7,11 @@ SBINDIR ?= $(PREFIX)/sbin\n+ MANDIR ?= $(PREFIX)/share/man\n+ LOCALEDIR ?= $(PREFIX)/share/locale\n+ PYTHON ?= /usr/bin/python\n++ifneq (,$(DESTDIR))\n++PYTHON_INSTALL_ARGS ?= --root $(DESTDIR)\n++else\n++PYTHON_INSTALL_ARGS ?=\n++endif\n+ BASHCOMPLETIONDIR ?= $(DESTDIR)/etc/bash_completion.d/\n+ SHAREDIR ?= $(PREFIX)/share/sandbox\n+ override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DPACKAGE=\"policycoreutils\" -Wall -Werror -Wextra -W  -DSHARED -shared\n+@@ -23,7 +28,7 @@ clean:\n+ \t-rm -rf build *~ \\#* *pyc .#*\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-mkdir -p $(MANDIR)/man8\n+-- \n+1.9.1\n+\ndiff --git a/package/policycoreutils/Config.in b/package/policycoreutils/Config.in\nnew file mode 100644\nindex 0000000..1dc01c4\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_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_DBUS_GLIB\n+\tdepends on BR2_PACKAGE_DBUS\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, dbus\"\n+\tdepends on BR2_USE_MMU\n+\tdepends on BR2_PACKAGE_DBUS\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..575dd25\n--- /dev/null\n+++ b/package/policycoreutils/policycoreutils.hash\n@@ -0,0 +1,2 @@\n+# https://github.com/SELinuxProject/selinux/wiki/Releases\n+sha256 b6881741f9f9988346a73bfeccb0299941dc117349753f0ef3f23ee86f06c1b5  policycoreutils-2.1.14.tar.gz\ndiff --git a/package/policycoreutils/policycoreutils.mk b/package/policycoreutils/policycoreutils.mk\nnew file mode 100644\nindex 0000000..7c44352\n--- /dev/null\n+++ b/package/policycoreutils/policycoreutils.mk\n@@ -0,0 +1,108 @@\n+################################################################################\n+#\n+# policycoreutils\n+#\n+################################################################################\n+\n+POLICYCOREUTILS_VERSION = 2.1.14\n+POLICYCOREUTILS_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423\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_DEPENDENCIES += dbus-glib\n+POLICYCOREUTILS_MAKE_DIRS += restorecond\n+endif\n+\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+\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 audit2why 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+\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/audit2why\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": [
        "v9",
        "02/15"
    ]
}