diff options
Diffstat (limited to 'mail/prayer/files')
-rw-r--r-- | mail/prayer/files/patch-Config | 79 | ||||
-rw-r--r-- | mail/prayer/files/patch-lib-mydb.c (renamed from mail/prayer/files/patch-prayer-mydb.c) | 4 | ||||
-rw-r--r-- | mail/prayer/files/patch-man-Makefile | 22 | ||||
-rw-r--r-- | mail/prayer/files/patch-os_bsd.c | 18 | ||||
-rw-r--r-- | mail/prayer/files/patch-servers-Makefile | 11 | ||||
-rw-r--r-- | mail/prayer/files/patch-templates-remove-url-prefix | 184 | ||||
-rw-r--r-- | mail/prayer/files/prayer.in | 52 | ||||
-rw-r--r-- | mail/prayer/files/prayer.sh | 38 |
8 files changed, 329 insertions, 79 deletions
diff --git a/mail/prayer/files/patch-Config b/mail/prayer/files/patch-Config index f8c621381eb8..f86a591e0e5c 100644 --- a/mail/prayer/files/patch-Config +++ b/mail/prayer/files/patch-Config @@ -1,6 +1,6 @@ ---- Config.orig 2008-04-16 00:43:56.000000000 -0800 -+++ Config 2008-04-16 00:44:36.000000000 -0800 -@@ -28,7 +28,7 @@ +--- Config.orig 2009-03-16 00:51:45.000000000 +0800 ++++ Config 2009-03-16 00:52:23.000000000 +0800 +@@ -27,31 +27,31 @@ ############################################################################ # Location of compiler @@ -9,33 +9,51 @@ # Location of make program (GNU make required) MAKE = gmake # Location of install program (GNU install or compatible required) -@@ -37,9 +37,10 @@ - # Base Compiler options for GCC. - #BASECFLAGS = -Wall -g - #BASELDFLAGS = -g --BASECFLAGS = -Wall -g -O2 -+#BASECFLAGS = -Wall -g -O2 -+BASECFLAGS = -Wall -g ${PORTCFLAGS} - BASELDFLAGS = -g -O2 + INSTALL = install + +-# Base Compiler options for GCC (use CPPFLAGS and LDFLAGS if passed in) +-ifdef CPPFLAGS +- BASECFLAGS = $(CPPFLAGS) ++# Base Compiler options for GCC (use PORTCFLAGS and LDFLAGS if passed in) ++ifdef PORTCFLAGS ++ BASECFLAGS = $(PORTCFLAGS) + else + BASECFLAGS = -Wall -g -O2 + endif + ifdef INCLUDES + BASECFLAGS += $(INCLUDES) + endif +-ifdef LDFLAGS +- BASELDFLAGS = $(LDFLAGS) ++ifdef PORTLDFLAGS ++ BASELDFLAGS = $(PORTLDFLAGS) + else + BASELDFLAGS = -g + endif + + # Minimal libraries needed by Linux -BASE_LIBS = -lcrypt -+BASE_LIBS = -lcrypt -liconv ++# BASE_LIBS = -lcrypt + # FreeBSD needs some extra libraries: +-# BASE_LIBS = -lcrypt -liconv -lutil ++BASE_LIBS = -lcrypt -liconv -lutil + # Solaris needs even more libararies: + # BASE_LIBS = -lcrypt -lxnet -lnsl -lsocket - # Base Compiler options for Sun SUNWspro compiler - #CC = /opt/SUNWspro/bin/cc -@@ -58,9 +59,9 @@ +@@ -71,9 +71,9 @@ # which points to ../../imap/c-client. This just reduces the amount of # noise output on each line when building the package. # --CCLIENT_DIR=./c-client +-CCLIENT_DIR=../c-client -CCLIENT_INCLUDE=-I $(CCLIENT_DIR) -CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a -+#CCLIENT_DIR=./c-client ++#CCLIENT_DIR=../c-client +#CCLIENT_INCLUDE=-I $(CCLIENT_DIR) +#CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a - CCLIENT_SSL_ENABLE = true # -@@ -80,12 +81,14 @@ + # Following works with imap-devel RPM package from Redhat 7. +@@ -92,12 +92,14 @@ # Following works with the mail/cclient port from FreeBSD # #CCLIENT_INCLUDE = -I/usr/local/include/c-client @@ -51,7 +69,7 @@ #CCLIENT_KERB_ENABLE = true ############################################################################ -@@ -99,7 +102,7 @@ +@@ -111,7 +113,7 @@ Z_LIBS = -lz # LDAP (required if LDAP_ENABLE set) @@ -60,7 +78,7 @@ LDAP_LIBS = -lldap # Pam (required if CCLIENT_PAM_ENABLE set) -@@ -128,12 +131,12 @@ +@@ -140,12 +142,12 @@ # DB definitions (required if SESSION_CACHE_ENABLE set) # # Following suitable for Redhat Linux which has DB 3 preinstalled @@ -77,3 +95,22 @@ ############################################################################ +@@ -166,7 +168,7 @@ + # Default configuration and permissions does not allow prayer user to + # update prayer configuration file. + +-PREFIX = /usr/local/prayer ++PREFIX = %%PREFIX%%/prayer + RO_USER = root + RO_GROUP = prayer + +@@ -181,8 +183,8 @@ + PRIVATE_FILE = 0640 + + # Location of configuration files and binaries +-PRAYER_CONFIG_FILE = ${PREFIX}/etc/prayer.cf ++PRAYER_CONFIG_FILE = %%PREFIX%%/etc/prayer/prayer.cf +-BIN_DIR = ${PREFIX}/sbin ++BIN_DIR = %%PREFIX%%/sbin +-ACCOUNTD_CONFIG_FILE = ${PREFIX}/etc/prayer-accountd.cf ++ACCOUNTD_CONFIG_FILE = %%PREFIX%%/etc/prayer/accountd.cf diff --git a/mail/prayer/files/patch-prayer-mydb.c b/mail/prayer/files/patch-lib-mydb.c index e962244c01a3..9cd1d0017133 100644 --- a/mail/prayer/files/patch-prayer-mydb.c +++ b/mail/prayer/files/patch-lib-mydb.c @@ -1,5 +1,5 @@ ---- prayer/mydb.c.orig Thu Feb 17 23:09:40 2005 -+++ prayer/mydb.c Thu Feb 17 23:06:11 2005 +--- lib/mydb.c.orig Thu Feb 17 23:09:40 2005 ++++ lib/mydb.c Thu Feb 17 23:06:11 2005 @@ -49,12 +49,12 @@ #include <string.h> #include <stdio.h> diff --git a/mail/prayer/files/patch-man-Makefile b/mail/prayer/files/patch-man-Makefile new file mode 100644 index 000000000000..ab8e8e273a74 --- /dev/null +++ b/mail/prayer/files/patch-man-Makefile @@ -0,0 +1,22 @@ +--- man/Makefile.orig 2009-03-16 13:46:41.000000000 +0800 ++++ man/Makefile 2009-03-16 13:46:56.000000000 +0800 +@@ -20,12 +20,12 @@ + PUBLIC_EXEC=$(PUBLIC_FILE) PRIVATE_EXEC=$(PRIVATE_EXEC) \ + BIN_DIR=$(BIN_DIR) INSTALL=$(INSTALL) \ + +- mkdir -p $(BROOT)$(PREFIX)/man +- mkdir -p $(BROOT)$(PREFIX)/man/man5 +- mkdir -p $(BROOT)$(PREFIX)/man/man8 ++ mkdir -p $(BROOT)$(MANPREFIX)/man ++ mkdir -p $(BROOT)$(MANPREFIX)/man/man5 ++ mkdir -p $(BROOT)$(MANPREFIX)/man/man8 + +- $(INSTALL) prayer.cf.5 $(BROOT)$(PREFIX)/man/man5 +- $(INSTALL) prayer.8 $(BROOT)$(PREFIX)/man/man8 +- $(INSTALL) prayer-session.8 $(BROOT)$(PREFIX)/man/man8 +- $(INSTALL) prayer-ssl-prune.8 $(BROOT)$(PREFIX)/man/man8 ++ $(INSTALL) prayer.cf.5 $(BROOT)$(MANPREFIX)/man/man5 ++ $(INSTALL) prayer.8 $(BROOT)$(MANPREFIX)/man/man8 ++ $(INSTALL) prayer-session.8 $(BROOT)$(MANPREFIX)/man/man8 ++ $(INSTALL) prayer-ssl-prune.8 $(BROOT)$(MANPREFIX)/man/man8 + diff --git a/mail/prayer/files/patch-os_bsd.c b/mail/prayer/files/patch-os_bsd.c deleted file mode 100644 index 7b88e9b19af8..000000000000 --- a/mail/prayer/files/patch-os_bsd.c +++ /dev/null @@ -1,18 +0,0 @@ ---- prayer/os_bsd.c.orig 2008-04-09 12:58:30.000000000 -0800 -+++ prayer/os_bsd.c 2008-04-16 00:23:36.000000000 -0800 -@@ -576,14 +576,7 @@ - void - os_limit_vm(unsigned long x) - { -- struct rlimit rl; -- rlim_t y = (rlim_t)x; -- -- rl.rlim_cur = y; -- rl.rlim_max = y; -- if (setrlimit(RLIMIT_DATA, &rl) < 0) { -- log_misc("setrlimit: Unable to set vm limit to %ld: %m", x); -- } -+ /* Linux specific */ - } - - void diff --git a/mail/prayer/files/patch-servers-Makefile b/mail/prayer/files/patch-servers-Makefile new file mode 100644 index 000000000000..2d3383e821dc --- /dev/null +++ b/mail/prayer/files/patch-servers-Makefile @@ -0,0 +1,11 @@ +--- servers/Makefile.orig 2009-03-16 22:51:20.000000000 +0800 ++++ servers/Makefile 2009-03-16 22:51:25.000000000 +0800 +@@ -98,8 +98,6 @@ + -rm -f $(BIN) core *.o *.flc *~ \#*\# + + install: all +- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \ +- $(BROOT)$(BIN_DIR) + $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \ + prayer $(BROOT)$(BIN_DIR) + $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \ diff --git a/mail/prayer/files/patch-templates-remove-url-prefix b/mail/prayer/files/patch-templates-remove-url-prefix new file mode 100644 index 000000000000..85f6f2a20c18 --- /dev/null +++ b/mail/prayer/files/patch-templates-remove-url-prefix @@ -0,0 +1,184 @@ +diff -Naur templates.orig/cam/frontend_compose_timeout.t templates/cam/frontend_compose_timeout.t +--- templates.orig/cam/frontend_compose_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_compose_timeout.t 2009-03-13 12:18:28.859721000 +0100 +@@ -46,7 +46,7 @@ + </div> + </form> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here to login again</a></p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/frontend_login_error.t templates/cam/frontend_login_error.t +--- templates.orig/cam/frontend_login_error.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_login_error.t 2009-03-13 12:18:54.133542000 +0100 +@@ -12,10 +12,10 @@ + % ENDIF + + % IFDEF $user +-<p>Please <a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p>Please <a href="/login/<% $user |u %>">\ + try again</a></p> + % ELSE +-<p>Please <a href="<% $url_prefix |n %>/">try again</a></p> ++<p>Please <a href="/">try again</a></p> + % ENDIF + + % CALL container_end +diff -Naur templates.orig/cam/frontend_security.t templates/cam/frontend_security.t +--- templates.orig/cam/frontend_security.t 2008-10-02 09:01:56.000000000 +0200 ++++ templates/cam/frontend_security.t 2009-03-13 12:19:23.592170000 +0100 +@@ -5,7 +5,7 @@ + <h2>Security Alert</h2> + + <p>Login request did not come from +- <a href = "<% $url_prefix |n %>"><% $url_prefix |h %></a></p> ++ <a href = "/"><% $url_prefix |h %></a></p> + + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/frontend_session.t templates/cam/frontend_session.t +--- templates.orig/cam/frontend_session.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_session.t 2009-03-13 12:19:42.839703000 +0100 +@@ -4,7 +4,7 @@ + % CALL container_start + <h3>Couldn't connect to Webmail session server</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Try again</a> later</p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/frontend_timeout.t templates/cam/frontend_timeout.t +--- templates.orig/cam/frontend_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_timeout.t 2009-03-13 12:19:55.817016000 +0100 +@@ -4,7 +4,7 @@ + % CALL container_start + <h3>Couldn't connect to session. Maybe it timed out?</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here to login again</a></p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/login.t templates/cam/login.t +--- templates.orig/cam/login.t 2008-10-07 10:36:43.000000000 +0200 ++++ templates/cam/login.t 2009-03-13 12:20:17.892743000 +0100 +@@ -82,7 +82,7 @@ + </table> + % ENDIF + <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" +- action="<% ${url_prefix} |n %>" class="lookup" id="credentials"> ++ action="/" class="lookup" id="credentials"> + <fieldset> + <div> + <table id="login"><tr> +diff -Naur templates.orig/cam/login_hermes.t templates/cam/login_hermes.t +--- templates.orig/cam/login_hermes.t 2008-10-27 12:43:06.000000000 +0100 ++++ templates/cam/login_hermes.t 2009-03-13 12:20:36.756388000 +0100 +@@ -106,7 +106,7 @@ + </table> + % ENDIF + <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" +- action="<% ${url_prefix} |n %>" class="lookup" id="credentials"> ++ action="/" class="lookup" id="credentials"> + <fieldset> + <div> + % IFDEF $raven_enable +diff -Naur templates.orig/cam/raven_blocked.t templates/cam/raven_blocked.t +--- templates.orig/cam/raven_blocked.t 2008-09-16 12:52:45.000000000 +0200 ++++ templates/cam/raven_blocked.t 2009-03-13 12:21:04.147607000 +0100 +@@ -7,7 +7,7 @@ + <p>Raven logins have been disabled for this account. You will need to log + in using the normal <% $g_service_name |h %> username and password</p> + +-<p><a href="<% $url_prefix |n %>/login/<% $username |u %>">Click here</a> ++<p><a href="/login/<% $username |u %>">Click here</a> + to return to the login screen</p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/old/frontend_compose_timeout.t templates/old/frontend_compose_timeout.t +--- templates.orig/old/frontend_compose_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_compose_timeout.t 2009-03-13 12:25:09.617868000 +0100 +@@ -45,7 +45,7 @@ + </div> + </form> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here</a> to login again</p> + + % CALL footer +diff -Naur templates.orig/old/frontend_login_error.t templates/old/frontend_login_error.t +--- templates.orig/old/frontend_login_error.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_login_error.t 2009-03-13 12:27:01.925958000 +0100 +@@ -11,9 +11,9 @@ + % ENDIF + + % IFDEF $user +-<p>Please <a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p>Please <a href="/login/<% $user |u %>">\ + try again</a></p> + % ELSE +-<p>Please <a href="<% $url_prefix |n %>/">try again</a></p> ++<p>Please <a href="/">try again</a></p> + % ENDIF + % CALL footer +diff -Naur templates.orig/old/frontend_security.t templates/old/frontend_security.t +--- templates.orig/old/frontend_security.t 2008-10-02 09:01:57.000000000 +0200 ++++ templates/old/frontend_security.t 2009-03-13 12:27:52.204673000 +0100 +@@ -4,6 +4,6 @@ + <h2>Security Alert</h2> + + <p>Login request did not come from +- <a href = "<% $url_prefix |n %>"><% $url_prefix |h %></a></p> ++ <a href = "/"><% $url_prefix |h %></a></p> + + % CALL footer +diff -Naur templates.orig/old/frontend_session.t templates/old/frontend_session.t +--- templates.orig/old/frontend_session.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_session.t 2009-03-13 12:28:05.778814000 +0100 +@@ -3,6 +3,6 @@ + % CALL header + <h3>Couldn't connect to Webmail session server</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Try again</a> later</p> + % CALL footer +diff -Naur templates.orig/old/frontend_timeout.t templates/old/frontend_timeout.t +--- templates.orig/old/frontend_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_timeout.t 2009-03-13 12:28:24.240569000 +0100 +@@ -3,6 +3,6 @@ + % CALL header + <h3>Couldn't connect to session. Maybe it timed out?</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here</a> to login again</p> + % CALL footer +diff -Naur templates.orig/old/login.t templates/old/login.t +--- templates.orig/old/login.t 2008-10-02 09:01:57.000000000 +0200 ++++ templates/old/login.t 2009-03-13 12:28:39.815144000 +0100 +@@ -37,7 +37,7 @@ + % ENDIF + % + <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" +- action="<% ${url_prefix} |n %>" id="credentials"> ++ action="/" id="credentials"> + <table cellpadding="5"> + <tr> + <td>Username</td> +diff -Naur templates.orig/old/raven_blocked.t templates/old/raven_blocked.t +--- templates.orig/old/raven_blocked.t 2008-09-16 12:52:48.000000000 +0200 ++++ templates/old/raven_blocked.t 2009-03-13 12:28:57.300178000 +0100 +@@ -6,7 +6,7 @@ + <p>Raven logins have been disabled for this account. You will need to log + in using the normal <% $g_service_name |h %> username and password</p> + +-<p><a href="<% $url_prefix |n %>/login/<% $username |u %>">Click here</a> ++<p><a href="/login/<% $username |u %>">Click here</a> + to return to the login screen</p> + + % CALL footer diff --git a/mail/prayer/files/prayer.in b/mail/prayer/files/prayer.in new file mode 100644 index 000000000000..529a1a62fd52 --- /dev/null +++ b/mail/prayer/files/prayer.in @@ -0,0 +1,52 @@ +#!/bin/sh + +# PROVIDE: prayer +# REQUIRE: LOGIN +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# prayer_enable (bool): Set to NO by default. +# prayer_chrooted (bool): Set to NO by default. +# Force prayer to be executed in chrooted +# prayer_prefork (bool): Set to NO by default. +# Allow prayer to prefork itself at startup +# + +. %%RC_SUBR%% + +name="prayer" +rcvar=${name}_enable + +command=%%PREFIX%%/sbin/${name} +pidfile="/var/spool/prayer/pid/${name}.pid" + +start_precmd="prayer_prestart" +stop_postcmd="prayer_poststop" + +load_rc_config $name + +: ${prayer_enable="NO"} +: ${prayer_chrooted="NO"} +: ${prayer_prefork="NO"} + +prayer_prestart() +{ + if checkyesno prayer_enable; then + if checkyesno prayer_chrooted; then + echo "Chroot no fully functionnal for now so not activated" + # command=/usr/local/sbin/${name}-chroot + fi + if ! checkyesno prayer_prefork; then + command_args="--disable-prefork" + fi + fi + return 0 +} + +prayer_poststop() +{ + kill -15 `head -1 /var/spool/prayer/pid/${name}-session.pid` +} + +run_rc_command "$1" diff --git a/mail/prayer/files/prayer.sh b/mail/prayer/files/prayer.sh deleted file mode 100644 index f0f6ccb99979..000000000000 --- a/mail/prayer/files/prayer.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -if ! test -x %%PREFIX%%/prayer/sbin/prayer -then - exit 0 -fi -# -case "$1" in -start) - %%PREFIX%%/prayer/sbin/prayer && - echo -n ' prayer' - ;; -stop) - for i in \ - /var/spool/prayer/pid/prayer-session \ - /var/spool/prayer/pid/prayer - do - if test -e ${i} - then - kill `head -1 ${i}` - rm -f "${i}" - fi - done - killall prayer-session - killall prayer - echo -n ' prayer' - ;; -restart) - $0 stop - $0 start - ;; -*) - echo "Usage: ${0##*/}: { start | stop | restart }" >&2 - exit 64 - ;; -esac |