X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fejabberd%2F0007-fix-install-permissions.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fejabberd%2F0007-fix-install-permissions.patch;h=b4633aad89c7db9f7175f60e3d5127afc724bdb1;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/ejabberd/0007-fix-install-permissions.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/ejabberd/0007-fix-install-permissions.patch new file mode 100644 index 0000000..b4633aa --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/ejabberd/0007-fix-install-permissions.patch @@ -0,0 +1,76 @@ +Description: fix install permissions + Without this patch, the makefile will try to install directories and + files with incompatible permissions for ejabberd, which run as an + ejabberd user. +Author: Johan Oudinet + +Index: ejabberd/Makefile.in +=================================================================== +--- ejabberd.orig/Makefile.in 2014-10-28 12:36:49.228713322 +0100 ++++ ejabberd/Makefile.in 2014-10-28 13:53:13.538888807 +0100 +@@ -91,10 +91,10 @@ spec: + install: all + # + # Configuration files +- $(INSTALL) -d -m 750 $(G_USER) $(ETCDIR) ++ $(INSTALL) -d $(ETCDIR) + [ -f $(ETCDIR)/ejabberd.yml ] \ +- && $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \ +- || $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml ++ && $(INSTALL) -b -m 644 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \ ++ || $(INSTALL) -b -m 644 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml + $(SED) -e "s*{{rootdir}}*@prefix@*" \ + -e "s*{{installuser}}*@INSTALLUSER@*" \ + -e "s*{{libdir}}*@libdir@*" \ +@@ -104,13 +104,12 @@ install: all + -e "s*{{erl}}*@ERL@*" ejabberdctl.template \ + > ejabberdctl.example + [ -f $(ETCDIR)/ejabberdctl.cfg ] \ +- && $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \ +- || $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg ++ && $(INSTALL) -b -m 644 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \ ++ || $(INSTALL) -b -m 644 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg + $(INSTALL) -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc + # + # Administration script +- [ -d $(SBINDIR) ] || $(INSTALL) -d -m 755 $(SBINDIR) +- $(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl ++ $(INSTALL) -D ejabberdctl.example $(SBINDIR)/ejabberdctl + # + # Init script + $(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*" \ +@@ -129,10 +128,7 @@ install: all + $(INSTALL) -m 644 include/*.hrl $(INCLUDEDIR) + # + # Binary C programs +- $(INSTALL) -d $(PBINDIR) +- $(INSTALL) -m 750 $(O_USER) tools/captcha.sh $(PBINDIR) +- -[ -f deps/p1_pam/priv/bin/epam ] \ +- && $(INSTALL) -m 750 $(O_USER) deps/p1_pam/priv/bin/epam $(PBINDIR) ++ $(INSTALL) -D tools/captcha.sh $(PBINDIR)/captcha.sh + # + # Binary system libraries + $(INSTALL) -d $(SODIR) +@@ -140,22 +136,6 @@ install: all + # Translated strings + $(INSTALL) -d $(MSGSDIR) + $(INSTALL) -m 644 priv/msgs/*.msg $(MSGSDIR) +- # +- # Spool directory +- $(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR) +- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT) +- chmod -R 750 $(SPOOLDIR) +- [ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; } +- # +- # ejabberdctl lock directory +- $(INSTALL) -d -m 750 $(O_USER) $(CTLLOCKDIR) +- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(CTLLOCKDIR) >$(CHOWN_OUTPUT) +- chmod -R 750 $(CTLLOCKDIR) +- # +- # Log directory +- $(INSTALL) -d -m 750 $(O_USER) $(LOGDIR) +- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT) +- chmod -R 750 $(LOGDIR) + + uninstall: uninstall-binary +