lua-csnappy: bump to version 0.1.4
[buildroot-gz.git] / package / ejabberd / 0006-fix-install-permissions.patch
blob4d770449026e33fa6458d58147ae263759aa8892
1 From ef847479778cc58818e066b87aa1789ba1c4148b Mon Sep 17 00:00:00 2001
2 From: Johan Oudinet <johan.oudinet@gmail.com>
3 Date: Wed, 20 Jan 2016 09:34:07 -0500
4 Subject: [PATCH] fix install permissions
6 Without this patch, the makefile will try to install directories and
7 files with incompatible permissions for ejabberd, which run as an
8 ejabberd user.
10 Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
11 ---
12 Makefile.in | 38 +++++---------------------------------
13 1 file changed, 5 insertions(+), 33 deletions(-)
15 diff --git a/Makefile.in b/Makefile.in
16 index 2a6457c..0be4c50 100644
17 --- a/Makefile.in
18 +++ b/Makefile.in
19 @@ -155,10 +155,8 @@ copy-files-sub: copy-files-sub2
20 install: all copy-files
22 # Configuration files
23 - $(INSTALL) -d -m 750 $(G_USER) $(ETCDIR)
24 - [ -f $(ETCDIR)/ejabberd.yml ] \
25 - && $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \
26 - || $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml
27 + $(INSTALL) -d $(ETCDIR)
28 + $(INSTALL) -b -m 644 ejabberd.yml.example $(ETCDIR)/ejabberd.yml
29 $(SED) -e "s*{{rootdir}}*@prefix@*" \
30 -e "s*{{installuser}}*@INSTALLUSER@*" \
31 -e "s*{{bindir}}*@bindir@*" \
32 @@ -168,14 +166,11 @@ install: all copy-files
33 -e "s*{{docdir}}*@docdir@*" \
34 -e "s*{{erl}}*@ERL@*" ejabberdctl.template \
35 > ejabberdctl.example
36 - [ -f $(ETCDIR)/ejabberdctl.cfg ] \
37 - && $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
38 - || $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
39 - $(INSTALL) -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
40 + $(INSTALL) -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
41 + $(INSTALL) -b -m 644 inetrc $(ETCDIR)/inetrc
43 # Administration script
44 - [ -d $(SBINDIR) ] || $(INSTALL) -d -m 755 $(SBINDIR)
45 - $(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
46 + $(INSTALL) -D ejabberdctl.example $(SBINDIR)/ejabberdctl
47 # Elixir binaries
48 [ -d $(BINDIR) ] || $(INSTALL) -d -m 755 $(BINDIR)
49 [ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex || true
50 @@ -187,29 +182,6 @@ install: all copy-files
51 -e "s*@installuser@*$(INIT_USER)*" ejabberd.init.template \
52 > ejabberd.init
53 chmod 755 ejabberd.init
54 - #
55 - # Spool directory
56 - $(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR)
57 - $(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT)
58 - chmod -R 750 $(SPOOLDIR)
59 - [ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; }
60 - #
61 - # ejabberdctl lock directory
62 - $(INSTALL) -d -m 750 $(O_USER) $(CTLLOCKDIR)
63 - $(CHOWN_COMMAND) -R @INSTALLUSER@ $(CTLLOCKDIR) >$(CHOWN_OUTPUT)
64 - chmod -R 750 $(CTLLOCKDIR)
65 - #
66 - # Log directory
67 - $(INSTALL) -d -m 750 $(O_USER) $(LOGDIR)
68 - $(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
69 - chmod -R 750 $(LOGDIR)
70 - #
71 - # Documentation
72 - $(INSTALL) -d $(DOCDIR)
73 - [ -f doc/guide.html ] \
74 - && $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \
75 - || echo "Documentation not included in sources"
76 - $(INSTALL) -m 644 COPYING $(DOCDIR)
78 uninstall: uninstall-binary
80 --
81 2.5.0