From e8b60d782eccee13fae539732236e0b19111f706 Mon Sep 17 00:00:00 2001 From: rusty-snake <41237666+rusty-snake@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:40:11 +0200 Subject: Speedup the buildsystem - replaing 'include /etc/firejail/foobar.inc' with 'include $(sysconfdir)/firejail/foobar.inc' is useless since 0.9.58 - onetime calling install with globbing is faster the a loop calling install nearly 1000 times --- Makefile.in | 9 ++++----- mketc.sh | 13 +------------ 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Makefile.in b/Makefile.in index afe8c9972..61889c017 100644 --- a/Makefile.in +++ b/Makefile.in @@ -128,13 +128,12 @@ endif install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/. install -c -m 0644 etc/templates/* $(DESTDIR)/$(DOCDIR)/. # etc files - ./mketc.sh $(sysconfdir) $(BUSYBOX_WORKAROUND) +ifeq ($(BUSYBOX_WORKAROUND),yes) + ./mketc.sh +endif install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail - for file in .etc/* etc/firejail.config; do \ - install -c -m 0644 $$file $(DESTDIR)/$(sysconfdir)/firejail; \ - done + install -m 0644 -t $(DESTDIR)/$(sysconfdir)/firejail etc/{*.profile,*.inc,*.net,firejail.config} sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" - rm -fr .etc 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; fi;" diff --git a/mketc.sh b/mketc.sh index 8dbc72915..d9728f3c5 100755 --- a/mketc.sh +++ b/mketc.sh @@ -3,16 +3,6 @@ # Copyright (C) 2014-2020 Firejail Authors # License GPL v2 -rm -fr .etc -mkdir .etc - -for file in etc/*.profile etc/*.inc etc/*.net; -do - sed "s;/etc/firejail;$1/firejail;g" $file > .$file -done - -if [ "x$2" = "xyes" ] -then sed -i -e ' 1i# Workaround for systems where common UNIX utilities are symlinks to busybox.\ # If this is not your case you can remove --enable-busybox-workaround from\ @@ -23,5 +13,4 @@ noblacklist \${PATH}/su\ noblacklist \${PATH}/sudo\ noblacklist \${PATH}/nc\ noblacklist \${PATH}/crontab\ -' .etc/disable-common.inc -fi +' etc/disable-common.inc -- cgit v1.2.3-54-g00ecf