svn commit: r338394 - in head/mail/sympa: . files
Chris Rees
crees at FreeBSD.org
Wed Jan 1 20:46:37 UTC 2014
Author: crees
Date: Wed Jan 1 20:46:35 2014
New Revision: 338394
URL: http://svnweb.freebsd.org/changeset/ports/338394
Log:
Stop using chown in stage part-- upstream's Makefile is keen to ensure ownership
too early.
Added:
head/mail/sympa/files/patch-Makefile.in (contents, props changed)
Modified:
head/mail/sympa/Makefile
head/mail/sympa/pkg-plist
Modified: head/mail/sympa/Makefile
==============================================================================
--- head/mail/sympa/Makefile Wed Jan 1 19:54:44 2014 (r338393)
+++ head/mail/sympa/Makefile Wed Jan 1 20:46:35 2014 (r338394)
@@ -40,7 +40,6 @@ RUN_DEPENDS+= \
# Ignore alpha/beta versions
PORTSCOUT= limit:^[0-9]+(\.[0-9]+)*$$
-NEED_ROOT= yes
USERS= sympa
GROUPS= sympa
# Shebang is corrected by configure script
@@ -128,9 +127,24 @@ post-patch:
-e 's|^\( *bouncedir=\).*$$|\1${DATADIR}/bounce|' \
-e 's|^\( *execcgidir=\).*$$|\1${PREFIX}/libexec/${PORTNAME}|' \
${WRKSRC}/configure
- @${REINPLACE_CMD} -e 's|\(--target.*sympa.conf\)|\1.sample|' \
+ ${REINPLACE_CMD} -e 's|\(--target.*sympa.conf\)|\1.sample|' \
+ -e 's|/bin/true$$|:|' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's#\$$(DESTDIR)\$$(sampledir)#${STAGEDIR}\$$(sampledir)#g' \
${WRKSRC}/doc/sample/Makefile.in
+pre-install:
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
+
+post-install:
+ for dir in $$(sort ${WRKSRC}/createddirs); do \
+ ${MKDIR} -m755 ${STAGEDIR}$$dir; \
+ ${TOUCH} ${STAGEDIR}$$dir/.keep; \
+ ${ECHO_CMD} "@exec chown ${USERS}:${GROUPS} $${dir#${PREFIX}/}" >> ${TMPPLIST}; \
+ ${ECHO_CMD} "$${dir#${PREFIX}/}/.keep" >> ${TMPPLIST}; \
+ done; \
+ for dir in $$(sort -r ${WRKSRC}/createddirs); do \
+ ${ECHO_CMD} "@unexec rmdir $$dir" >> ${TMPPLIST}; \
+ done
+
.include <bsd.port.mk>
Added: head/mail/sympa/files/patch-Makefile.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/sympa/files/patch-Makefile.in Wed Jan 1 20:46:35 2014 (r338394)
@@ -0,0 +1,31 @@
+Avoid chown before install, to avoid using root.
+
+createddirs is read in Makefile and processed there
+
+--- Makefile.in.orig 2013-02-05 14:57:30.000000000 +0000
++++ Makefile.in 2014-01-01 20:07:50.489335639 +0000
+@@ -631,12 +631,9 @@
+ $(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
+@@ -668,8 +665,6 @@
+ 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
+
+ nextstep:
Modified: head/mail/sympa/pkg-plist
==============================================================================
--- head/mail/sympa/pkg-plist Wed Jan 1 19:54:44 2014 (r338393)
+++ head/mail/sympa/pkg-plist Wed Jan 1 20:46:35 2014 (r338394)
@@ -561,8 +561,6 @@ man/man8/sympa.8.gz
%%NLS%%@dirrmtry share/locale/ca
%%NLS%%@dirrmtry share/locale/bg/LC_MESSAGES
%%NLS%%@dirrmtry share/locale/bg
- at dirrm %%DATADIR%%/list_data
- at dirrmtry %%ETCDIR%%
@dirrm %%EXAMPLESDIR%%/web_tt2
@dirrm %%EXAMPLESDIR%%/scenari
@dirrm %%EXAMPLESDIR%%/sample/test/web_tt2
@@ -588,17 +586,3 @@ man/man8/sympa.8.gz
@dirrm libexec/sympa/Marc
@dirrm libexec/sympa/HTML
@dirrm libexec/sympa
- at dirrm %%DATADIR%%/arc
- at dirrm %%DATADIR%%/bounce
- at dirrm %%DATADIR%%/icons
- at dirrm %%DATADIR%%
- at cwd /var
- at dirrm spool/sympa/tmp
- at dirrm spool/sympa/task
- at dirrm spool/sympa/outgoing
- at dirrm spool/sympa/msg
- at dirrm spool/sympa/moderation
- at dirrm spool/sympa/expire
- at dirrm spool/sympa/digest
- at dirrm spool/sympa/auth
- at dirrm spool/sympa
More information about the svn-ports-all
mailing list