Skip to content

Commit

Permalink
build: fix some inconsistencies in install commands
Browse files Browse the repository at this point in the history
Changes:

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

See also commit dae3933 ("rework make realinstall and uninstall
(netblue30#3435)", 2020-06-04).
  • Loading branch information
kmk3 committed Jun 2, 2024
1 parent 6b35ed7 commit afdb371
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit afdb371

Please sign in to comment.