diff options
Diffstat (limited to 'mail/mailman/files/pkg-install.in')
-rw-r--r-- | mail/mailman/files/pkg-install.in | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/mail/mailman/files/pkg-install.in b/mail/mailman/files/pkg-install.in index c3f5b5340557..bec7b2bb3616 100644 --- a/mail/mailman/files/pkg-install.in +++ b/mail/mailman/files/pkg-install.in @@ -63,17 +63,20 @@ POST-INSTALL) # goof up the group writable and/or setgid bits /usr/bin/find "%%MAILMANDIR%%/qfiles" -maxdepth 1 -type d -exec \ /bin/chmod u+rwx,g+rwsx,o-w "{}" + - /bin/chmod 02775 "%%MAILMANDIR%%" \ - "%%MAILMANDIR%%/Mailman" \ + + # deliberately skip "%%MAILMANDIR%%" itself below: + /bin/chmod 02775 \ + "%%MAILMANDIR%%/archives" \ + "%%MAILMANDIR%%/archives/public" \ "%%MAILMANDIR%%/bin" \ "%%MAILMANDIR%%/cgi-bin" \ + "%%MAILMANDIR%%/cron" \ + "%%MAILMANDIR%%/data" \ "%%MAILMANDIR%%/icons" \ - "%%MAILMANDIR%%/mail" \ - "%%MAILMANDIR%%/scripts" \ - "%%MAILMANDIR%%/tests" \ - "%%MAILMANDIR%%/pythonlib" \ - "%%MAILMANDIR%%/spam" \ + "%%MAILMANDIR%%/lists" \ "%%MAILMANDIR%%/locks" \ + "%%MAILMANDIR%%/mail" \ + "%%MAILMANDIR%%/Mailman" \ "%%MAILMANDIR%%/Mailman/Archiver" \ "%%MAILMANDIR%%/Mailman/Bouncers" \ "%%MAILMANDIR%%/Mailman/Cgi" \ @@ -83,13 +86,12 @@ POST-INSTALL) "%%MAILMANDIR%%/Mailman/Logging" \ "%%MAILMANDIR%%/Mailman/MTA" \ "%%MAILMANDIR%%/Mailman/Queue" \ + "%%MAILMANDIR%%/pythonlib" \ + "%%MAILMANDIR%%/scripts" \ + "%%MAILMANDIR%%/spam" \ + "%%MAILMANDIR%%/tests" \ "%%MAILMANDIR%%/tests/bounces" \ - "%%MAILMANDIR%%/tests/msgs" \ - "%%MAILMANDIR%%/cron" \ - "%%MAILMANDIR%%/data" \ - "%%MAILMANDIR%%/lists" \ - "%%MAILMANDIR%%/archives" \ - "%%MAILMANDIR%%/archives/public" + "%%MAILMANDIR%%/tests/msgs" # this can be 2770 or 2771 but should not be stomped over test -d "%%MAILMANDIR%%/archives/private" \ || /usr/bin/install -m 02771 -g "%%GROUP%%" \ @@ -98,9 +100,29 @@ POST-INSTALL) /bin/chmod u+rwx,g+srwx "%%MAILMANDIR%%/archives/private" /bin/chmod u+rwx,g+srwx,o+rx "%%MAILMANDIR%%/logs" - /usr/bin/find "%%MAILMANDIR%%/messages" "%%MAILMANDIR%%/templates" -type d \ + if [ "NLS" = "%%NLS%%" ] ; then + /usr/bin/find "%%MAILMANDIR%%/messages" -type d \ + -exec chown "%%GROUP%%" '{}' + \ + -exec chmod 0755 '{}' + + fi + + /usr/bin/find "%%MAILMANDIR%%/templates" -type d \ -exec chmod 02775 '{}' + + # if .sample files were not moved to destination... + # (pkg install --no-scripts) ... fix up + + # cp -n will not overwrite destination file, -p preserves permissions/owner etc. + /usr/bin/find "%%MAILMANDIR%%/templates" -type f -name '*.sample' \ + -exec /bin/sh -c 'f={};cp -np ${f} ${f%.sample}' \; + + test -s %%MAILMANDIR%%/Mailman/mm_cfg.py || cp -p %%MAILMANDIR%%/Mailman/mm_cfg.py.dist %%MAILMANDIR%%/Mailman/mm_cfg.py + + # This is subject to the EXAMPLES port option: + test -r ${PKG_PREFIX}/share/examples/mailman.newsyslog.sample && + cp -np ${PKG_PREFIX}/share/examples/mailman.newsyslog.sample \ + ${PKG_PREFIX}/etc/newsyslog.conf.d/mailman.conf + echo "---> Running update" if test -r /var/tmp/last_mailman_version ; then |