Skip to contentSkip to conversation

libselinux/utils: do not create an empty /sbin directory

PATCH Applied Nicolas Iooss 2 participants 2 messages Dec 21, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libselinux/utils: do not create an empty /sbin directory

When building libselinux package, "make install" creates /sbin directory without putting anything in it. Remove this from the Makefile.

While at it, rename USRBINDIR variable USRSBINDIR (with an S) as it refers to /usr/sbin.

---
 libselinux/utils/Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
libselinux/utils/Makefile +4 -5
index 774418495dbe..954da450c4d3 100644
@@ -1,8 +1,7 @@
 # Installation directories.
 PREFIX ?= $(DESTDIR)/usr
 LIBDIR ?= $(PREFIX)/lib
-USRBINDIR ?= $(PREFIX)/sbin
-SBINDIR ?= $(DESTDIR)/sbin
+USRSBINDIR ?= $(PREFIX)/sbin
 INCLUDEDIR ?= $(PREFIX)/include
 
 OS ?= $(shell uname)
@@ -64,9 +63,9 @@ selinux_restorecon: LDLIBS += -lsepol
 all: $(TARGETS)
 
 install: all
-	-mkdir -p $(USRBINDIR)
-	install -m 755 $(TARGETS) $(USRBINDIR)
-	-mkdir -p $(SBINDIR)
+	-mkdir -p $(USRSBINDIR)
+	install -m 755 $(TARGETS) $(USRSBINDIR)
+
 clean:
 	rm -f $(TARGETS) *.o *~
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 8 lines · Nicolas Iooss

When building libselinux package, "make install" creates /sbin directory
without putting anything in it. Remove this from the Makefile.

While at it, rename USRBINDIR variable USRSBINDIR (with an S) as it refers to /usr/sbin.

Thanks, applied.

Quoted 31 lines

---
 libselinux/utils/Makefile | 9 ++++-----

 1 file changed, 4 insertions(+), 5 deletions(-)
libselinux/utils/Makefile +0 -0
index 774418495dbe..954da450c4d3 100644
@@ -1,8 +1,7 @@
  # Installation directories.

 PREFIX ?= $(DESTDIR)/usr
 LIBDIR ?= $(PREFIX)/lib

libselinux/utils/Makefile +1 -2
-USRBINDIR ?= $(PREFIX)/sbin
-SBINDIR ?= $(DESTDIR)/sbin
+USRSBINDIR ?= $(PREFIX)/sbin

 INCLUDEDIR ?= $(PREFIX)/include

 OS ?= $(shell uname)

libselinux/utils/Makefile +0 -0
@@ -64,9 +63,9 @@ selinux_restorecon: LDLIBS += -lsepol
  all: $(TARGETS)


 install: all

libselinux/utils/Makefile +3 -3
-	-mkdir -p $(USRBINDIR)
-	install -m 755 $(TARGETS) $(USRBINDIR)
-	-mkdir -p $(SBINDIR)
+	-mkdir -p $(USRSBINDIR)
+	install -m 755 $(TARGETS) $(USRSBINDIR)
+

 clean:
  rm -f $(TARGETS) *.o *~