Change the path to the executable files in accordance with Filesystem Hierarchy Standard
Closed this issue · 1 comments
svalx commented
FHS 2.3 prescribes to place these executables in subdirectories of /usr. SUSE rpm place it there too.
Index: mt-st-1.2/Makefile
===================================================================
--- mt-st-1.2.orig/Makefile
+++ mt-st-1.2/Makefile
@@ -2,9 +2,11 @@ CFLAGS?= -Wall -O2
SBINDIR= $(DESTDIR)/sbin
BINDIR= $(DESTDIR)/bin
USRBINDIR= $(DESTDIR)/usr/bin
+USRSBINDIR= $(DESTDIR)/usr/sbin
MANDIR= $(DESTDIR)/usr/share/man
-MTDIR=$(BINDIR)
+MTDIR=$(USRBINDIR)
+STINITDIR=$(USRSBINDIR)
PROGS=mt stinit
@@ -35,12 +37,12 @@ version.h: Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
install: $(PROGS)
- install -d $(MTDIR) $(MANDIR) $(SBINDIR)
+ install -d $(MTDIR) $(MANDIR) $(STINITDIR)
install -s mt $(MTDIR)
install -c -m 444 mt.1 $(MANDIR)/man1
(if [ -f $(MANDIR)/man1/mt.1.gz ] ; then \
rm -f $(MANDIR)/man1/mt.1.gz; gzip $(MANDIR)/man1/mt.1; fi)
- install -s stinit $(SBINDIR)
+ install -s stinit $(STINITDIR)
install -c -m 444 stinit.8 $(MANDIR)/man8
(if [ -f $(MANDIR)/man8/stinit.8.gz ] ; then \
rm -f $(MANDIR)/man8/stinit.8.gz; gzip $(MANDIR)/man8/stinit.8; fi)
iustin commented
This will get moot with the /usr
unification, but until then, stinit
is supposed to early run at boot time as tape devices are discovered, so I would say that /sbin
is slightly better than /usr/sbin
. Similarly, one can presume that mt
is needed to restore /usr
from tape, but in today's age that's even less probable.
I'll make a patch to allow customisation of this at install time.