Skip to contentSkip to conversation

libselinux: rename EMFLAGS to DISABLE_FLAGS

PATCH Applied [email protected] 2 participants 4 messages Sep 28, 2016 – Sep 29, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libselinux: rename EMFLAGS to DISABLE_FLAGS

From: William Roberts <[email protected]>

Change EMFLAGS variable, used for setting additional CFLAGS to DISABLE_FLAGS, to indicate its usage better.

---
 libselinux/Makefile       | 6 +++---
 libselinux/src/Makefile   | 6 +++---
 libselinux/utils/Makefile | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
libselinux/Makefile +3 -3
index bfeb4b8..41d836c 100644
@@ -3,12 +3,12 @@ SUBDIRS = src include utils man
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
 ifeq ($(DISABLE_RPM),y)
-	EMFLAGS+= -DDISABLE_RPM
+	DISABLE_FLAGS+= -DDISABLE_RPM
 endif
 ifeq ($(DISABLE_SETRANS),y)
-	EMFLAGS+= -DDISABLE_SETRANS
+	DISABLE_FLAGS+= -DDISABLE_SETRANS
 endif
-export DISABLE_SETRANS DISABLE_RPM EMFLAGS
+export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS
 
 USE_PCRE2 ?= n
 ifeq ($(USE_PCRE2),y)
libselinux/src/Makefile +3 -3
index d8a79b4..7bf11a8 100644
@@ -69,7 +69,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
 
 PCRE_LDFLAGS ?= -lpcre
 
-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(EMFLAGS) $(PCRE_CFLAGS)
+override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
 
 SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
 		-Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations
@@ -81,9 +81,9 @@ ifneq (,$(filter i386,$(ARCH)))
 TLSFLAGS += -mno-tls-direct-seg-refs
 endif
 
-SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(EMFLAGS)
+SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(DISABLE_FLAGS)
 
-SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(EMFLAGS)
+SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
 
 all: $(LIBA) $(LIBSO) $(LIBPC)
 
libselinux/utils/Makefile +1 -1
index 0708d6d..7898c08 100644
@@ -24,7 +24,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -fasynchronous-unwind-tables -fdiagnostics-show-option -funit-at-a-time \
           -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
           -Werror -Wno-aggregate-return -Wno-redundant-decls
-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(EMFLAGS) $(PCRE_CFLAGS)
+override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
 LDLIBS += -L../src -lselinux -L$(LIBDIR)
 PCRE_LDFLAGS ?= -lpcre
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 libselinux: set DISABLE_RPM default to y.

From: William Roberts <[email protected]>

Change the default build behavior to always use DISABLE_RPM. To get the old behavior call make with DISABLE_RPM=n.

eg.)
make DISABLE_RPM=n

---
 libselinux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libselinux/Makefile +1 -1
index 41d836c..cec2943 100644
@@ -1,7 +1,7 @@
 SUBDIRS = src include utils man
 
 DISABLE_SETRANS ?= n
-DISABLE_RPM ?= n
+DISABLE_RPM ?= y
 ifeq ($(DISABLE_RPM),y)
 	DISABLE_FLAGS+= -DDISABLE_RPM
 endif
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 2/2] libselinux: set DISABLE_RPM default to y.

Quoted 7 lines · On 09/28/2016 12:00 PM, [email protected] wrote:

From: William Roberts <[email protected]>

Change the default build behavior to always use DISABLE_RPM. To get the old behavior call make with DISABLE_RPM=n.

eg.)
make DISABLE_RPM=n

Thanks, applied both. We'll see if anyone complains about this one and revert if necessary.

Quoted 20 lines
---
 libselinux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libselinux/Makefile +1 -1
index 41d836c..cec2943 100644
@@ -1,7 +1,7 @@
 SUBDIRS = src include utils man
 
 DISABLE_SETRANS ?= n
-DISABLE_RPM ?= n
+DISABLE_RPM ?= y
 ifeq ($(DISABLE_RPM),y)
 	DISABLE_FLAGS+= -DDISABLE_RPM
 endif
#3 lore raw

Re: [PATCH 2/2] libselinux: set DISABLE_RPM default to y.

In reply to [email protected]
Quoted 7 lines · On 09/28/2016 12:00 PM, [email protected] wrote:

From: William Roberts <[email protected]>

Change the default build behavior to always use DISABLE_RPM. To get the old behavior call make with DISABLE_RPM=n.

eg.)
make DISABLE_RPM=n

I reverted this change. It would break rpm on RHEL 7 and earlier, so it is still too soon to make this the default ;(

Quoted 20 lines
---
 libselinux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libselinux/Makefile +1 -1
index 41d836c..cec2943 100644
@@ -1,7 +1,7 @@
 SUBDIRS = src include utils man
 
 DISABLE_SETRANS ?= n
-DISABLE_RPM ?= n
+DISABLE_RPM ?= y
 ifeq ($(DISABLE_RPM),y)
 	DISABLE_FLAGS+= -DDISABLE_RPM
 endif