buildroot/package/policycoreutils/0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch
Clayton Shotwell cb328f77f8 policycoreutils: new package
This package contains the core policy utilities that are required
for basic operation of an SELinux system.

Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
Tested-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
Signed-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
[Thomas:
 - Move the Config.in comment at the top of the Config.in file rather
   than between the main option and its sub-options, as this breaks
   menuconfig indentation.
 - Fix the propagation of the libsemanage dependencies. libsemanage
   depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS and
   BR2_TOOLCHAIN_USES_GLIBC which were not accounted for. Since it
   depends on BR2_TOOLCHAIN_USES_GLIBC, then all the gettext related
   handling becomes useless and has been removed.
 - Rename the prompt of the restorecond sub-option to just
   "restorecond".
 - Use TARGET_CONFIGURE_OPTS and HOST_CONFIGURE_OPTS instead of
   passing LDFLAGS, CC, etc. manually.
 - Use make "foreach" function for loops instead of shell "for" loops.
 - Rework the explanation of why we're passing DESTDIR at build time.
 - Minor formatting tweaks here and there.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-10 15:55:31 +01:00

43 lines
1.3 KiB
Diff

From 27fd1c85ca95b5d66ab0241a08242a75b60b375c Mon Sep 17 00:00:00 2001
From: Adam Duskett <Aduskett@gmail.com>
Date: Thu, 14 Jul 2016 13:22:57 -0400
Subject: [PATCH] Change sepolicy python install arguments to be a variable
To allow the python install arguments to be overwritten, change the
arguments to be a variable. This also cleans up the DESTDIR detection a
little bit.
Updated to work with version 2.5
Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
policycoreutils/sepolicy/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sepolicy/Makefile b/sepolicy/Makefile
index a16f8de..2013301 100644
--- a/sepolicy/Makefile
+++ b/sepolicy/Makefile
@@ -1,4 +1,7 @@
PYTHON ?= python
+ifneq ($(DESTDIR),)
+PYTHON_INSTALL_ARGS ?= --root $(DESTDIR)
+endif
# Installation directories.
PREFIX ?= $(DESTDIR)/usr
@@ -32,7 +35,7 @@ test:
@$(PYTHON) test_sepolicy.py -v
install:
- $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
+ $(PYTHON) setup.py install $(PYTHON_INSTALL_ARGS)
[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
install -m 755 sepolicy.py $(BINDIR)/sepolicy
(cd $(BINDIR); ln -sf sepolicy sepolgen)
--
2.7.4