diff mbox

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

Message ID 20161221210951.14337-1-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Nicolas Iooss Dec. 21, 2016, 9:09 p.m. UTC
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.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libselinux/utils/Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Stephen Smalley Dec. 21, 2016, 9:22 p.m. UTC | #1
On Wed, 2016-12-21 at 22:09 +0100, Nicolas Iooss wrote:
> 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.
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Thanks, applied.

> ---
>  libselinux/utils/Makefile | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
> index 774418495dbe..954da450c4d3 100644
> --- a/libselinux/utils/Makefile
> +++ b/libselinux/utils/Makefile
> @@ -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 *~
>
diff mbox

Patch

diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
index 774418495dbe..954da450c4d3 100644
--- a/libselinux/utils/Makefile
+++ b/libselinux/utils/Makefile
@@ -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 *~