From cd46b06dd43fbcefdec9e9e0d71770c3554ea11b Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 9 Oct 2016 10:37:35 +0200 Subject: [PATCH] fixed autoconf installation --- lam-packaging/autoconf/Makefile.in | 8 +++++--- lam/lib/upgrade.inc | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lam-packaging/autoconf/Makefile.in b/lam-packaging/autoconf/Makefile.in index 8652f1f1..bbafa6eb 100644 --- a/lam-packaging/autoconf/Makefile.in +++ b/lam-packaging/autoconf/Makefile.in @@ -68,7 +68,7 @@ install-lam: (cd $(srcdir) ; $(COPY) $${i}/.htaccess \ $(DESTDIR)$(localstatedir)/$${i}) ; \ done ; \ - LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \ + LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d *)`" ; \ (cd $(srcdir)/$(LIST3) ; $(TAR) cf - .) | \ (cd $(DESTDIR)$(sysconfdir) ; $(TAR) xf -) ; \ $(LN_S) $(sysconfdir) ${LIST3} ; \ @@ -91,10 +91,11 @@ do-chown: @for i in $(LIST2) ; do \ $(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(localstatedir)/$${i} ; \ done ; \ - LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \ + LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d *)`" ; \ for i in $${LIST4} ; do \ $(CHOWN) -R $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/$${i} ; \ done + $(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/config echo-chown: @@ -103,11 +104,12 @@ echo-chown: echo "$(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(localstatedir)/$${i}" \ >> $(RAR) ; \ done ; \ - LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \ + LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d *)`" ; \ for i in $${LIST4} ; do \ echo "$(CHOWN) -R $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/$${i}" \ >> $(RAR) ; \ done ; \ + echo $(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/config echo "Switch user to root and run $(RAR)" diff --git a/lam/lib/upgrade.inc b/lam/lib/upgrade.inc index 85f21740..1ad9eb68 100644 --- a/lam/lib/upgrade.inc +++ b/lam/lib/upgrade.inc @@ -114,7 +114,7 @@ function upgradeConfigToServerProfileFolders($profiles) { // copy default configs if (!file_exists('../config/templates')) { - @mkdir('../config/templates'); + @mkdir('../config/templates', 0700); recursiveCopy('../config/pdf/', '../config/templates/pdf/', $profiles, 'default.'); recursiveCopy('../config/profiles/', '../config/templates/profiles/', $profiles, 'default.'); } @@ -163,7 +163,7 @@ function copyConfigTemplates($profiles) { function recursiveCopy($src, $dst, $profiles, $fileFilter = null, $overwrite = true) { $dir = @opendir($src); if (!file_exists($dst)) { - $tmpState = @mkdir($dst); + $tmpState = @mkdir($dst, 0700, true); if ($tmpState === false) { StatusMessage('ERROR', 'Upgrade failed.', 'The directory \'' . $dst . '\' could not be created.'); }