build: fix some inconsistencies in install commands

Changes:

* Remove / after `$(DESTDIR)`
* Remove useless -c
* Use 0755 instead of 755
* Use -d after -m

See also commit dae3933bc ("rework make realinstall and uninstall
(#3435)", 2020-06-04).
This commit is contained in:
Kelvin M. Klann 2024-05-21 09:22:11 -03:00
parent 6b35ed7997
commit afdb371f27

View file

@ -245,8 +245,8 @@ endif
$(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail/firecfg.d
$(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail src/firecfg/firecfg.config
$(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config
sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then \
$(INSTALL) -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; \
sh -c "if [ ! -f $(DESTDIR)$(sysconfdir)/firejail/login.users ]; then \
$(INSTALL) -m 0644 etc/login.users $(DESTDIR)$(sysconfdir)/firejail/.; \
fi"
ifeq ($(HAVE_IDS),-DHAVE_IDS)
$(INSTALL) -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/ids.config
@ -256,21 +256,20 @@ ifeq ($(BUSYBOX_WORKAROUND),yes)
endif
ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)
# install apparmor profile
sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then \
$(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; \
sh -c "if [ ! -d $(DESTDIR)$(sysconfdir)/apparmor.d ]; then \
$(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d; \
fi"
$(INSTALL) -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d
# install apparmor profile customization file
sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then \
$(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; \
sh -c "if [ ! -d $(DESTDIR)$(sysconfdir)/apparmor.d/local ]; then \
$(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d/local; \
fi"
sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default ]; then \
$(INSTALL) -c -m 0644 etc/apparmor/firejail-local \
$(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default; \
sh -c "if [ ! -f $(DESTDIR)$(sysconfdir)/apparmor.d/local/firejail-default ]; then \
$(INSTALL) -m 0644 etc/apparmor/firejail-local $(DESTDIR)$(sysconfdir)/apparmor.d/local/firejail-default; \
fi"
# install apparmor base abstraction drop-in
sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d ]; then \
$(INSTALL) -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d; \
sh -c "if [ ! -d $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d ]; then \
$(INSTALL) -m 0755 -d $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d; \
fi"
$(INSTALL) -m 0644 etc/apparmor/firejail-base $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d
endif