Skip to contentSkip to conversation

restorecond: Fix consistancy of DESTDIR usage

PATCH In review Laurent Bigonville 2 participants 3 messages May 29, 2018 – May 31, 2018 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 restorecond: Fix consistancy of DESTDIR usage

From: Laurent Bigonville <[email protected]>

---
 restorecond/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
restorecond/Makefile +3 -3
index 25be18d4..fed65bba 100644
@@ -9,7 +9,7 @@ DBUSSERVICEDIR = $(PREFIX)/share/dbus-1/services
 SYSTEMDDIR ?= $(PREFIX)/lib/systemd
 
 autostart_DATA = sealertauto.desktop
-INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
+INITDIR ?= /etc/rc.d/init.d
 SELINUXDIR = $(DESTDIR)/etc/selinux
 
 DBUSFLAGS = -DHAVE_DBUS $(shell $(PKG_CONFIG) --cflags dbus-glib-1)
@@ -42,8 +42,8 @@ install: all
 	-mkdir -p $(DESTDIR)$(SBINDIR)
 	install -m 755 restorecond $(DESTDIR)$(SBINDIR)
 	install -m 644 restorecond.8 $(DESTDIR)$(MANDIR)/man8
-	-mkdir -p $(INITDIR)
-	install -m 755 restorecond.init $(INITDIR)/restorecond
+	-mkdir -p $(DESTDIR)$(INITDIR)
+	install -m 755 restorecond.init $(DESTDIR)$(INITDIR)/restorecond
 	-mkdir -p $(SELINUXDIR)
 	install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
 	install -m 644 restorecond_user.conf $(SELINUXDIR)/restorecond_user.conf
Signature · 1 line
2.17.0
#1 lore raw
Quoted 11 lines · Laurent Bigonville

From: Laurent Bigonville <[email protected]>

---
 restorecond/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
restorecond/Makefile +0 -0
index 25be18d4..fed65bba 100644

restorecond/Makefile DBUSSERVICEDIR = $(PREFIX)/share/dbus-1/services · line 13

Quoted 6 lines
restorecond/Makefile +1 -1
@@ -9,7 +9,7 @@ DBUSSERVICEDIR = $(PREFIX)/share/dbus-1/services
 SYSTEMDDIR ?= $(PREFIX)/lib/systemd
 
 autostart_DATA = sealertauto.desktop
-INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
+INITDIR ?= /etc/rc.d/init.d
 SELINUXDIR = $(DESTDIR)/etc/selinux

This looks good to me, but seeing the SELINUXDIR definition, I am wondering whether this line should also be migrated to remove DESTDIR from it. This could be done in an other patch.

Nicolas

Quoted 15 lines
restorecond/Makefile +2 -3
 DBUSFLAGS = -DHAVE_DBUS $(shell $(PKG_CONFIG) --cflags dbus-glib-1)
@@ -42,8 +42,8 @@ install: all
        -mkdir -p $(DESTDIR)$(SBINDIR)
        install -m 755 restorecond $(DESTDIR)$(SBINDIR)
        install -m 644 restorecond.8 $(DESTDIR)$(MANDIR)/man8
-       -mkdir -p $(INITDIR)
-       install -m 755 restorecond.init $(INITDIR)/restorecond
+       -mkdir -p $(DESTDIR)$(INITDIR)
+       install -m 755 restorecond.init $(DESTDIR)$(INITDIR)/restorecond
        -mkdir -p $(SELINUXDIR)
        install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
        install -m 644 restorecond_user.conf $(SELINUXDIR)/restorecond_user.conf
--

2.17.0

#2 lore raw

Le 30/05/18 à 22:19, Nicolas Iooss a écrit :

Quoted 14 lines · Laurent Bigonville
Quoted 13 lines

From: Laurent Bigonville <[email protected]>

---
  restorecond/Makefile | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
restorecond/Makefile +0 -0
index 25be18d4..fed65bba 100644
@@ -9,7 +9,7 @@ DBUSSERVICEDIR = $(PREFIX)/share/dbus-1/services
  SYSTEMDDIR ?= $(PREFIX)/lib/systemd
 
Quoted 7 lines

restorecond/Makefile DBUSSERVICEDIR = $(PREFIX)/share/dbus-1/services · line 13

Quoted 4 lines
restorecond/Makefile +1 -1
  autostart_DATA = sealertauto.desktop
-INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
+INITDIR ?= /etc/rc.d/init.d
  SELINUXDIR = $(DESTDIR)/etc/selinux

This looks good to me, but seeing the SELINUXDIR definition, I am wondering whether this line should also be migrated to remove DESTDIR from it. This could be done in an other patch.

You want a new patch? I could amend that one instead

Quoted 17 lines

Nicolas

Quoted 14 lines
restorecond/Makefile +2 -3
  DBUSFLAGS = -DHAVE_DBUS $(shell $(PKG_CONFIG) --cflags dbus-glib-1)
@@ -42,8 +42,8 @@ install: all
         -mkdir -p $(DESTDIR)$(SBINDIR)
         install -m 755 restorecond $(DESTDIR)$(SBINDIR)
         install -m 644 restorecond.8 $(DESTDIR)$(MANDIR)/man8
-       -mkdir -p $(INITDIR)
-       install -m 755 restorecond.init $(INITDIR)/restorecond
+       -mkdir -p $(DESTDIR)$(INITDIR)
+       install -m 755 restorecond.init $(DESTDIR)$(INITDIR)/restorecond
         -mkdir -p $(SELINUXDIR)
         install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
         install -m 644 restorecond_user.conf $(SELINUXDIR)/restorecond_user.conf
--

2.17.0