python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / policycoreutils / 0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch
blobbbd6895e7f6ee9826ad5921aaa04531e98f9cf86
1 The addition of this patch makes the use of DESTDIR
2 mandatory as there are conditional checks which would fail if it's not
3 defined.
5 This patch was updated from the patch provided by Niranjan Reddy to
6 accomodate version 2.5
8 Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
9 Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
10 Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
11 Signed-off-by: Adam Duskett <Aduskett@gmail.com>
12 ---
13 policycoreutils/Makefile | 2 +-
14 policycoreutils/newrole/Makefile | 4 ++--
15 policycoreutils/restorecond/Makefile | 5 +++--
16 policycoreutils/run_init/Makefile | 4 ++--
17 policycoreutils/sepolicy/Makefile | 2 +-
18 policycoreutils/sestatus/Makefile | 2 +-
19 policycoreutils/setfiles/Makefile | 4 ++--
20 7 files changed, 12 insertions(+), 11 deletions(-)
22 diff --git a/Makefile b/Makefile
23 index 962ac12..0634a2a 100644
24 --- a/Makefile
25 +++ b/Makefile
26 @@ -1,6 +1,6 @@
27 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
29 -INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
30 +INOTIFYH = $(shell ls $(DESTDIR)/usr/include/sys/inotify.h 2>/dev/null)
32 ifeq (${INOTIFYH}, /usr/include/sys/inotify.h)
33 SUBDIRS += restorecond
34 diff --git a/newrole/Makefile b/newrole/Makefile
35 index 646cd4d..f124a6a 100644
36 --- a/newrole/Makefile
37 +++ b/newrole/Makefile
38 @@ -4,8 +4,8 @@ BINDIR ?= $(PREFIX)/bin
39 MANDIR ?= $(PREFIX)/share/man
40 ETCDIR ?= $(DESTDIR)/etc
41 LOCALEDIR = /usr/share/locale
42 -PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
43 -AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
44 +PAMH = $(shell ls $(DESTDIR)/usr/include/security/pam_appl.h 2>/dev/null)
45 +AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)
46 # Enable capabilities to permit newrole to generate audit records.
47 # This will make newrole a setuid root program.
48 # The capabilities used are: CAP_AUDIT_WRITE.
49 diff --git a/restorecond/Makefile b/restorecond/Makefile
50 index f99e1e7..92a4a4d 100644
51 --- a/restorecond/Makefile
52 +++ b/restorecond/Makefile
53 @@ -11,11 +11,12 @@ autostart_DATA = sealertauto.desktop
54 INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
55 SELINUXDIR = $(DESTDIR)/etc/selinux
57 -DBUSFLAGS = -DHAVE_DBUS -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/dbus-1.0/include
58 +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
59 DBUSLIB = -ldbus-glib-1 -ldbus-1
61 CFLAGS ?= -g -Werror -Wall -W
62 -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
63 +override CFLAGS += -I$(DESTDIR)/usr/include $(DBUSFLAGS) -I$(DESTDIR)/usr/include/glib-2.0 \
64 +-I$(DESTDIR)/usr/lib64/glib-2.0/include -I$(DESTDIR)/usr/lib/glib-2.0/include
66 LDLIBS += -lselinux $(DBUSLIB) -lglib-2.0 -L$(LIBDIR)
68 diff --git a/run_init/Makefile b/run_init/Makefile
69 index 5815a08..c81179b 100644
70 --- a/run_init/Makefile
71 +++ b/run_init/Makefile
72 @@ -5,8 +5,8 @@ SBINDIR ?= $(PREFIX)/sbin
73 MANDIR ?= $(PREFIX)/share/man
74 ETCDIR ?= $(DESTDIR)/etc
75 LOCALEDIR ?= /usr/share/locale
76 -PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
77 -AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
78 +PAMH = $(shell ls $(DESTDIR)/usr/include/security/pam_appl.h 2>/dev/null)
79 +AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)
81 CFLAGS ?= -Werror -Wall -W
82 override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
83 diff --git a/sepolicy/Makefile b/sepolicy/Makefile
84 index 39d46e8..6624373 100644
85 --- a/sepolicy/Makefile
86 +++ b/sepolicy/Makefile
87 @@ -12,7 +12,7 @@ LOCALEDIR ?= /usr/share/locale
88 BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
89 SHAREDIR ?= $(PREFIX)/share/sandbox
90 CFLAGS ?= -Wall -Werror -Wextra -W
91 -override CFLAGS += -I$(PREFIX)/include -DPACKAGE="policycoreutils" -DSHARED -shared
92 +override CFLAGS = $(LDFLAGS) -I$(DESTDIR)/usr/include -DPACKAGE="policycoreutils" -Wall -Werror -Wextra -W -DSHARED -shared
94 BASHCOMPLETIONS=sepolicy-bash-completion.sh
96 diff --git a/sestatus/Makefile b/sestatus/Makefile
97 index c04ff00..e10c32c 100644
98 --- a/sestatus/Makefile
99 +++ b/sestatus/Makefile
100 @@ -6,7 +6,7 @@ ETCDIR ?= $(DESTDIR)/etc
101 LIBDIR ?= $(PREFIX)/lib
103 CFLAGS ?= -Werror -Wall -W
104 -override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64
105 +override CFLAGS += -I$(DESTDIR)/usr/include -D_FILE_OFFSET_BITS=64
106 LDLIBS = -lselinux -L$(LIBDIR)
108 all: sestatus
109 diff --git a/setfiles/Makefile b/setfiles/Makefile
110 index 98f4f7d..eb26ed0 100644
111 --- a/setfiles/Makefile
112 +++ b/setfiles/Makefile
113 @@ -3,13 +3,13 @@ PREFIX ?= $(DESTDIR)/usr
114 SBINDIR ?= $(DESTDIR)/sbin
115 MANDIR = $(PREFIX)/share/man
116 LIBDIR ?= $(PREFIX)/lib
117 -AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
118 +AUDITH = $(shell ls $(DESTDIR)/usr/include/libaudit.h 2>/dev/null)
120 PROGRESS_STEP=$(shell grep "^\#define STAR_COUNT" restore.h | awk -S '{ print $$3 }')
121 ABORT_ON_ERRORS=$(shell grep "^\#define ABORT_ON_ERRORS" setfiles.c | awk -S '{ print $$3 }')
123 CFLAGS ?= -g -Werror -Wall -W
124 -override CFLAGS += -I$(PREFIX)/include
125 +override CFLAGS += -I$(DESTDIR)/usr/include
126 LDLIBS = -lselinux -lsepol -L$(LIBDIR)
128 ifeq ($(AUDITH), /usr/include/libaudit.h)
130 2.7.4