summaryrefslogtreecommitdiff
path: root/mail/sympa/files/patch-Makefile.in
blob: dfa50fb5093550c6bda83b549f0d11a569c2be9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Avoid chown before install, to avoid using root.

createddirs is read in Makefile and processed there

--- Makefile.in.orig	2014-02-05 15:08:23.000000000 +0100
+++ Makefile.in	2014-03-14 10:42:06.143965800 +0100
@@ -639,12 +639,7 @@
 		$(spooldir)/moderation $(spooldir)/expire $(spooldir)/auth \
 		$(spooldir)/outgoing $(spooldir)/tmp $(spooldir)/task \
 		$(bouncedir) $(arcdir) $(piddir) $(staticdir) $(sysconfdir); do \
-		if [ ! -d $(DESTDIR)$$dir ] ; then \
-			echo "Creating $(DESTDIR)$$dir"; \
-			install -d -m 755 $(DESTDIR)$$dir; \
-		fi; \
-		chown $(USER) $(DESTDIR)$$dir || /bin/true; \
-		chgrp $(GROUP) $(DESTDIR)$$dir || /bin/true; \
+		echo "$${dir}" >> createddirs; \
 	done
 
 installconfig: installdir
@@ -676,27 +671,12 @@
 		echo "# automatically created file" >> data_structure.version; \
 		echo "# you should not modify it" >> data_structure.version; \
 		echo $(VERSION) >> data_structure.version; \
-		chown $(USER) data_structure.version || /bin/true; \
-		chgrp $(GROUP) data_structure.version || /bin/true; \
 	fi
 	@for dir in create_list_templates families \
 		global_task_models list_task_models scenari search_filters \
 		mail_tt2 web_tt2; do \
-		if [ ! -d $(DESTDIR)$(sysconfdir)/$$dir ] ; then \
-			echo "Creating $(DESTDIR)$(sysconfdir)/$$dir"; \
-			install -d -m 755 $(DESTDIR)$(sysconfdir)/$$dir; \
-		fi; \
-		chown $(USER) $(DESTDIR)$(sysconfdir)/$$dir || /bin/true; \
-		chgrp $(GROUP) $(DESTDIR)$(sysconfdir)/$$dir || /bin/true; \
+		echo "$(DESTDIR)$(sysconfdir)/$${dir}" >> createddirs; \
 	done
-	@if [ ! -e $(DESTDIR)$(sysconfdir)/README ]; then \
-		echo "Creating $(DESTDIR)$(sysconfdir)/README"; \
-		$(SED) \
-			-e 's|--sysconfdir--|$(sysconfdir)|' \
-			-e 's|--defaultdir--|$(defaultdir)|' \
-			etc_README > $(DESTDIR)$(sysconfdir)/README; \
-		chmod 444 $(DESTDIR)$(sysconfdir)/README; \
-	fi
 
 nextstep: 
 	@echo ""