diff options
Diffstat (limited to 'mail/sympa/files')
-rw-r--r-- | mail/sympa/files/apache.sample.in | 16 | ||||
-rw-r--r-- | mail/sympa/files/fcgi.sample.in | 7 | ||||
-rw-r--r-- | mail/sympa/files/nginx.sample.in | 28 | ||||
-rw-r--r-- | mail/sympa/files/patch-Makefile.in | 94 | ||||
-rw-r--r-- | mail/sympa/files/patch-src-etc-script-Makefile.in | 11 | ||||
-rw-r--r-- | mail/sympa/files/patch-src_etc_script_Makefile.in | 11 | ||||
-rw-r--r-- | mail/sympa/files/patch-src_lib_Sympa_Spool_Moderation.pm | 11 | ||||
-rw-r--r-- | mail/sympa/files/pkg-install.in | 26 | ||||
-rw-r--r-- | mail/sympa/files/pkg-message.in | 38 | ||||
-rw-r--r-- | mail/sympa/files/sympa.in | 10 |
10 files changed, 160 insertions, 92 deletions
diff --git a/mail/sympa/files/apache.sample.in b/mail/sympa/files/apache.sample.in new file mode 100644 index 000000000000..d169b8808391 --- /dev/null +++ b/mail/sympa/files/apache.sample.in @@ -0,0 +1,16 @@ +DocumentRoot "%%DATADIR%%" +AddDefaultCharset UTF-8 +DirectoryIndex wws +Options +Indexes +# you may replace 'fcgid' by 'fastcgi' +LoadModule fcgid_module libexec/apache2/mod_fcgid.so +<Location /wws> + SetHandler fcgid-script +</Location> +<Directory %%DATADIR%%> + Require all granted +</Directory> +<Directory %%PREFIX%%/libexec/sympa> + Require all granted +</Directory> +ScriptAlias /wws %%PREFIX%%/libexec/sympa/wwsympa-wrapper diff --git a/mail/sympa/files/fcgi.sample.in b/mail/sympa/files/fcgi.sample.in new file mode 100644 index 000000000000..85a63d9230e9 --- /dev/null +++ b/mail/sympa/files/fcgi.sample.in @@ -0,0 +1,7 @@ +# in rc.conf: +spawn_fcgi_enable="YES" +spawn_fcgi_app="%%PREFIX%%/libexec/sympa/wwsympa.fcgi" +spawn_fcgi_bindsocket="/var/run/sympa/wwsympa.socket" +spawn_fcgi_bindsocket_mode="0777" +spawn_fcgi_username="%%USERS%%" +spawn_fcgi_groupname"%%GROUPS%%" diff --git a/mail/sympa/files/nginx.sample.in b/mail/sympa/files/nginx.sample.in new file mode 100644 index 000000000000..859745a8a09b --- /dev/null +++ b/mail/sympa/files/nginx.sample.in @@ -0,0 +1,28 @@ +upstream sympafcgi { + server unix:/var/run/sympa/wwsympa.socket; +} + +server { + server_name_in_redirect off; + charset utf-8; + gzip off; + location / { + fastcgi_param SCRIPT_FILENAME %%PREFIX%%/libexec/sympa/wwsympa.fcgi; + fastcgi_param PATH_INFO $fastcgi_script_name; + + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param SERVER_NAME $host; + fastcgi_param HTTP_HOST $host; + fastcgi_param SERVER_PORT $server_port; + fastcgi_pass sympafcgi; + } + location /static-sympa { + alias %%DATADIR%% + access_log off; + } +} diff --git a/mail/sympa/files/patch-Makefile.in b/mail/sympa/files/patch-Makefile.in index dfa50fb50935..c3bb06b5f587 100644 --- a/mail/sympa/files/patch-Makefile.in +++ b/mail/sympa/files/patch-Makefile.in @@ -1,49 +1,65 @@ -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; \ +--- Makefile.in.orig 2015-10-02 21:18:14 UTC ++++ Makefile.in +@@ -712,8 +712,8 @@ installdir: + 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; \ ++ chown $(USER) $(DESTDIR)$$dir || /usr/bin/true; \ ++ chgrp $(GROUP) $(DESTDIR)$$dir || /usr/bin/true; \ 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; \ + sympa_wizard.pl.inst: $(top_srcdir)/src/sbin/sympa_wizard.pl.in Makefile +@@ -725,27 +725,27 @@ sympa_wizard.pl.inst: $(top_srcdir)/src/ + installconfig: installdir sympa_wizard.pl.inst + @echo "Installing basic configuration ..." + export PERL5LIB=$(DESTDIR)$(modulesdir); \ +- if [ ! -f $(DESTDIR)$(confdir)/sympa.conf ]; then \ ++ if [ ! -f $(DESTDIR)$(confdir)/sympa.conf.sample ]; then \ + echo "This looks like your first Sympa installation. The following wizard will assist you to create your first Sympa configuration.";\ + if [ ! -d $(DESTDIR)$(confdir) ]; then \ + $(INSTALL) -d -m 755 $(DESTDIR)$(confdir); \ + fi; \ +- chown $(USER) $(DESTDIR)$(confdir) || /bin/true; \ +- chgrp $(GROUP) $(DESTDIR)$(confdir) || /bin/true; \ ++ chown $(USER) $(DESTDIR)$(confdir) || /usr/bin/true; \ ++ chgrp $(GROUP) $(DESTDIR)$(confdir) || /usr/bin/true; \ + $(PERL) sympa_wizard.pl.inst \ + --create sympa.conf \ +- --target $(DESTDIR)$(confdir)/sympa.conf \ +- || /bin/true; \ +- chown $(USER) $(DESTDIR)$(confdir)/sympa.conf || /bin/true; \ +- chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf || /bin/true; \ ++ --target $(DESTDIR)$(confdir)/sympa.conf.sample \ ++ || /usr/bin/true; \ ++ chown $(USER) $(DESTDIR)$(confdir)/sympa.conf.sample || /usr/bin/true; \ ++ chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf.sample || /usr/bin/true; \ + fi; \ +- if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version ]; then \ ++ if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version.sample ]; then \ + cd $(DESTDIR)$(sysconfdir); \ +- 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; \ ++ echo "# automatically created file" >> data_structure.version.sample; \ ++ echo "# you should not modify it" >> data_structure.version.sample; \ ++ echo $(VERSION) >> data_structure.version.sample; \ ++ chown $(USER) data_structure.version.sample || /usr/bin/true; \ ++ chgrp $(GROUP) data_structure.version.sample || /usr/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; \ + @for dir in create_list_templates custom_actions custom_conditions \ + data_sources families global_task_models list_task_models \ +@@ -754,8 +754,8 @@ installconfig: installdir sympa_wizard.p + 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; \ ++ chown $(USER) $(DESTDIR)$(sysconfdir)/$$dir || /usr/bin/true; \ ++ chgrp $(GROUP) $(DESTDIR)$(sysconfdir)/$$dir || /usr/bin/true; \ 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 "" + @if [ ! -e $(DESTDIR)$(sysconfdir)/README ]; then \ + echo "Creating $(DESTDIR)$(sysconfdir)/README"; \ diff --git a/mail/sympa/files/patch-src-etc-script-Makefile.in b/mail/sympa/files/patch-src-etc-script-Makefile.in deleted file mode 100644 index d54f791b51bc..000000000000 --- a/mail/sympa/files/patch-src-etc-script-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- src/etc/script/Makefile.in.orig 2013-03-13 18:06:41.202599651 +0000 -+++ src/etc/script/Makefile.in 2013-03-13 18:06:05.882611401 +0000 -@@ -355,7 +355,7 @@ - - info-am: - --install-data-am: install-initSCRIPTS install-scriptSCRIPTS -+install-data-am: install-scriptSCRIPTS - - install-exec-am: - diff --git a/mail/sympa/files/patch-src_etc_script_Makefile.in b/mail/sympa/files/patch-src_etc_script_Makefile.in new file mode 100644 index 000000000000..01f228a1f467 --- /dev/null +++ b/mail/sympa/files/patch-src_etc_script_Makefile.in @@ -0,0 +1,11 @@ +--- src/etc/script/Makefile.in.orig 2015-10-02 21:18:14 UTC ++++ src/etc/script/Makefile.in +@@ -330,7 +330,7 @@ info: info-am + + info-am: + +-install-data-am: install-initSCRIPTS ++install-data-am: + + install-exec-am: + diff --git a/mail/sympa/files/patch-src_lib_Sympa_Spool_Moderation.pm b/mail/sympa/files/patch-src_lib_Sympa_Spool_Moderation.pm new file mode 100644 index 000000000000..bf738c1bf2b8 --- /dev/null +++ b/mail/sympa/files/patch-src_lib_Sympa_Spool_Moderation.pm @@ -0,0 +1,11 @@ +--- src/lib/Sympa/Spool/Moderation.pm.orig 2015-10-03 09:26:05 UTC ++++ src/lib/Sympa/Spool/Moderation.pm +@@ -223,6 +223,8 @@ None. + + =back + ++=back ++ + =head1 CONFIGURATION PARAMETERS + + Following site configuration parameters in sympa.conf will be referred. diff --git a/mail/sympa/files/pkg-install.in b/mail/sympa/files/pkg-install.in index 87b81bb78d47..ea0a7a125e17 100644 --- a/mail/sympa/files/pkg-install.in +++ b/mail/sympa/files/pkg-install.in @@ -2,12 +2,24 @@ # $FreeBSD$ # -[ "$2" = "POST_INSTALL" ] || exit 0 - -for conf in sympa.conf wwsympa.conf -do [ ! -f ${PKG_PREFIX}/etc/${conf} ] && \ - cp -p ${PKG_PREFIX}/etc/${conf}.sample ${PKG_PREFIX}/etc/${conf} && \ - chmod u+w ${PKG_PREFIX}/etc/${conf} -done +if [ "$2" = "POST_INSTALL" ]; then + if [ ! -f %%ETCDIR%%/sympa.conf -o ! -f %%ETCDIR%%/data_structure.version ]; then + cp -p %%ETCDIR%%/sympa.conf.sample %%ETCDIR%%/sympa.conf + chmod u+w %%ETCDIR%%/sympa.conf + else + if [ $(tail -1 %%ETCDIR%%/data_structure.version | cut -d. -f3) -lt 2 ]; then + echo "It seems you are upgrading from version <6.2 ($(cat %%ETCDIR%%/data_structure.version))" + echo "You'll have to read https://www.sympa.org/faq/upgrade-to-v6.2 and (at least) run:" + echo " # %%PREFIX%%/libexec/sympa/sympa.pl --upgrade_config_location" + echo " # %%PREFIX%%/libexec/sympa/sympa.pl --upgrade" + echo " # %%PREFIX%%/libexec/sympa/upgrade_bulk_spool.pl" + echo " # %%PREFIX%%/libexec/sympa/upgrade_send_spool.pl" + echo "to update your config files to the new layout" + else + echo "to upgrade, run:" + echo " # %%PREFIX%%/libexec/sympa/sympa.pl --upgrade" + fi + fi +fi exit 0 diff --git a/mail/sympa/files/pkg-message.in b/mail/sympa/files/pkg-message.in index e26337baa62a..952c6c30a790 100644 --- a/mail/sympa/files/pkg-message.in +++ b/mail/sympa/files/pkg-message.in @@ -1,33 +1,13 @@ -If this is your first installation of sympa, please load -this file with your %%DB_TYPE%% database client: - %%PREFIX%%/libexec/sympa/create_db.%%DB_TYPE%% +If you upgrade from <6.2, read +https://www.sympa.org/faq/upgrade-to-v6.2 -Before configuring sympa, you need to copy the samples: - cp /usr/local/etc/sympa.conf.sample /usr/local/etc/sympa.conf - cp /usr/local/etc/wwsympa.conf.sample /usr/local/etc/wwsympa.conf +Else upgrade with: + run sympa.pl --upgrade -To configure sympa interactively, please run: - perl %%PREFIX%%/libexec/sympa/sympa_wizard.pl +If this is your first installation of sympa, run + create database with this schema: + %%LOCALBASE%%/libexec/sympa/create_db.%%DB_TYPE%% + run sympa_wizard.pl + for wwsympa server, see samples configs in %%EXAMPLESDIR%% -You may also manually edit the two configuration files: - %%PREFIX%%/etc/sympa.conf - %%PREFIX%%/etc/wwsympa.conf -To set up the wwsympa server, add something like this to -your Apache configuration file: - - DocumentRoot "%%DATADIR%%" - AddDefaultCharset UTF-8 - DirectoryIndex wws - Options +Indexes -%%FCGI%% LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so -%%FCGI%% <Location /wws> -%%FCGI%% SetHandler fastcgi-script -%%FCGI%% </Location> - <Directory %%DATADIR%%> - Allow from all - </Directory> - <Directory %%PREFIX%%/libexec/sympa> - Allow from all - </Directory> - ScriptAlias /wws %%PREFIX%%/libexec/sympa/wwsympa-wrapper diff --git a/mail/sympa/files/sympa.in b/mail/sympa/files/sympa.in index c2d0d77fd90e..7b1cede906e5 100644 --- a/mail/sympa/files/sympa.in +++ b/mail/sympa/files/sympa.in @@ -37,8 +37,7 @@ extra_commands=status sympadir=%%PREFIX%%/libexec/sympa -sympaconf=%%PREFIX%%/etc/sympa.conf -wwsympaconf=%%PREFIX%%/etc/wwsympa.conf +sympaconf=%%ETCDIR%%/sympa.conf sub_status() { @@ -155,7 +154,6 @@ sympa_check_config() # Check config files [ -d $sympadir ] || exit 0 [ -f $sympaconf ] || exit 0 - [ -f $wwsympaconf ] || exit 0 } sympa_start() @@ -163,7 +161,7 @@ sympa_start() sympa_check_config if [ ! -f /var/spool/lock/sympa ]; then echo "Starting Sympa subsystem: " - sub_start sympa + sub_start sympa_msg sub_start bulk sub_start archived sub_start bounced @@ -183,7 +181,7 @@ sympa_stop() sub_stop bounced sub_stop archived sub_stop bulk - sub_stop sympa + sub_stop sympa_msg if [ -f /var/run/sympa/sympa-creation.pid ]; then sub_stop sympa-creation fi @@ -201,7 +199,7 @@ sympa_status() else echo "Status file for subsystem NOT found." fi - sub_status sympa + sub_status sympa_msg sub_status bulk sub_status archived sub_status bounced |