diff options
author | crees <crees@FreeBSD.org> | 2014-01-02 04:46:35 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2014-01-02 04:46:35 +0800 |
commit | 8961afe8c8721c8ed287854523c849b99688c666 (patch) | |
tree | e2a212a76edbcc67b3e2b7c4543a994ab9447160 /mail/sympa | |
parent | 33294ef069ac4a50c2835f44a3cb13d0ea261e0b (diff) | |
download | freebsd-ports-gnome-8961afe8c8721c8ed287854523c849b99688c666.tar.gz freebsd-ports-gnome-8961afe8c8721c8ed287854523c849b99688c666.tar.zst freebsd-ports-gnome-8961afe8c8721c8ed287854523c849b99688c666.zip |
Stop using chown in stage part-- upstream's Makefile is keen to ensure ownership
too early.
Diffstat (limited to 'mail/sympa')
-rw-r--r-- | mail/sympa/Makefile | 18 | ||||
-rw-r--r-- | mail/sympa/files/patch-Makefile.in | 31 | ||||
-rw-r--r-- | mail/sympa/pkg-plist | 16 |
3 files changed, 47 insertions, 18 deletions
diff --git a/mail/sympa/Makefile b/mail/sympa/Makefile index ecfac9ccf775..a13e586b51e4 100644 --- a/mail/sympa/Makefile +++ b/mail/sympa/Makefile @@ -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> diff --git a/mail/sympa/files/patch-Makefile.in b/mail/sympa/files/patch-Makefile.in new file mode 100644 index 000000000000..e05b6c10a1c2 --- /dev/null +++ b/mail/sympa/files/patch-Makefile.in @@ -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: diff --git a/mail/sympa/pkg-plist b/mail/sympa/pkg-plist index 62c6d96cb347..2695b759139e 100644 --- a/mail/sympa/pkg-plist +++ b/mail/sympa/pkg-plist @@ -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 -@dirrm %%DATADIR%%/list_data -@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 -@dirrm %%DATADIR%%/arc -@dirrm %%DATADIR%%/bounce -@dirrm %%DATADIR%%/icons -@dirrm %%DATADIR%% -@cwd /var -@dirrm spool/sympa/tmp -@dirrm spool/sympa/task -@dirrm spool/sympa/outgoing -@dirrm spool/sympa/msg -@dirrm spool/sympa/moderation -@dirrm spool/sympa/expire -@dirrm spool/sympa/digest -@dirrm spool/sympa/auth -@dirrm spool/sympa |