diff options
author | Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | 2014-11-21 21:38:56 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | 2014-11-21 21:38:56 +0100 |
commit | 129f727e7b6215c88e623d31156e2c31346ecb21 (patch) | |
tree | f9b2bebcdc8ed385d81305d7b5fb2b46f8b1c1f1 | |
parent | f55b3f371ed9c97416ff3257d7d1ac6251ad0c00 (diff) | |
download | alpine_aports-129f727e7b6215c88e623d31156e2c31346ecb21.tar.bz2 alpine_aports-129f727e7b6215c88e623d31156e2c31346ecb21.tar.xz alpine_aports-129f727e7b6215c88e623d31156e2c31346ecb21.zip |
testing/prayer: new aport
-rw-r--r-- | testing/prayer/APKBUILD | 67 | ||||
-rw-r--r-- | testing/prayer/buildfix.patch | 138 | ||||
-rw-r--r-- | testing/prayer/disable_ssl3.patch | 58 | ||||
-rw-r--r-- | testing/prayer/makefile_install_config.patch | 170 | ||||
-rw-r--r-- | testing/prayer/no_db_version_check.patch | 24 | ||||
-rw-r--r-- | testing/prayer/sighandling.patch | 67 | ||||
-rw-r--r-- | testing/prayer/unbrand_accountd.patch | 32 | ||||
-rw-r--r-- | testing/prayer/unbrand_cam_template.patch | 38 |
8 files changed, 594 insertions, 0 deletions
diff --git a/testing/prayer/APKBUILD b/testing/prayer/APKBUILD new file mode 100644 index 0000000000..2b6dc316e9 --- /dev/null +++ b/testing/prayer/APKBUILD | |||
@@ -0,0 +1,67 @@ | |||
1 | # Maintainer: | ||
2 | # Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | ||
3 | |||
4 | pkgname=prayer | ||
5 | pkgver=1.3.5 | ||
6 | pkgrel=0 | ||
7 | pkgdesc='Lightweight webmail interface for IMAP servers' | ||
8 | url='http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/' | ||
9 | arch=all | ||
10 | license=GPL | ||
11 | depends= | ||
12 | makedepends='perl imap-dev openssl-dev db-dev linux-pam-dev tar' | ||
13 | subpackages= | ||
14 | source="ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/prayer-$pkgver.tar.gz | ||
15 | buildfix.patch | ||
16 | disable_ssl3.patch | ||
17 | makefile_install_config.patch | ||
18 | no_db_version_check.patch | ||
19 | sighandling.patch | ||
20 | unbrand_accountd.patch | ||
21 | unbrand_cam_template.patch" | ||
22 | |||
23 | prepare() { | ||
24 | cd "$srcdir"/$pkgname-$pkgver | ||
25 | |||
26 | local i | ||
27 | for i in $source; do | ||
28 | case $i in | ||
29 | *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; | ||
30 | esac | ||
31 | done | ||
32 | } | ||
33 | |||
34 | build() { | ||
35 | cd "$srcdir"/$pkgname-$pkgver | ||
36 | make || return 1 | ||
37 | } | ||
38 | |||
39 | package() { | ||
40 | cd "$srcdir"/$pkgname-$pkgver | ||
41 | BROOT="$pkgdir" make install | ||
42 | } | ||
43 | |||
44 | md5sums="e5c632e9abd517ee91f1f1cf5fb0eaf3 prayer-1.3.5.tar.gz | ||
45 | 8194a70b8def543ed2754ea8050fcc81 buildfix.patch | ||
46 | 479044ae50f58166ff3b101e9b0ca77e disable_ssl3.patch | ||
47 | e5cfaee5abb3f92b5ad8b19cb31c4d10 makefile_install_config.patch | ||
48 | 7e241e9bd923ccd5deea254684f7023d no_db_version_check.patch | ||
49 | 4be579fda05ae887b1bbcd5c66145e68 sighandling.patch | ||
50 | 12117d22dfaaf74d68da235b31dec2fc unbrand_accountd.patch | ||
51 | 807ab15f361fe567047585da7451fac5 unbrand_cam_template.patch" | ||
52 | sha256sums="aa79da17dceeb7eb24a1744e25286b3518eef882d8682f9959050d2bfb92ae8c prayer-1.3.5.tar.gz | ||
53 | a8b483bcb9d951e992fa0679651758a48d0cb0c1b3e79e6b4168b0b8096fa25b buildfix.patch | ||
54 | 1b8bfb1a560434444992c3cfc050e59384f4737eb834aa2fe89e5f55ccc716e2 disable_ssl3.patch | ||
55 | 1b6baad865cfee27438ebf6a5e73a1d77dff611f02fcccb12da9ce5542f91b5c makefile_install_config.patch | ||
56 | af65ba073614068bf3d7136d0193bcf870a9963c66a0adad163c4775573ae875 no_db_version_check.patch | ||
57 | 8a951fad98cffe4a12e52d6afc708b3e7e6b0f5ac2d4d4c8cb6d2a21bc770075 sighandling.patch | ||
58 | 22541d2f5c07660952b27f8389a2ff6240fddb28e09e2e3d93c7646154438180 unbrand_accountd.patch | ||
59 | ed12c3cd3d6fff26823531b660edeee8b0fc8455f8fc9cffdccb76435bd55820 unbrand_cam_template.patch" | ||
60 | sha512sums="6bb190fda2ac60c6f3801bc89eb719bea7b479c4417eb5e3315d95118dcfecceca9274fb0478360756d2f361d08ebf1f8176a393dbf1b5a3775a52f46e315be1 prayer-1.3.5.tar.gz | ||
61 | ac7fc9e26871fd2e11e4e80bb0b6464f1262aa0b7298d043b5663da77c16b97174ac96214b2383432311a4ad6fbb4d35c4bbef0f5783be0462acf600ec15ee05 buildfix.patch | ||
62 | ebb7710d9368aabeb8107f0cb16c399fb599345ff90fe3b8ae13a86949dd449ef13d7324048b9774183636c1581d1aa507053577608f9eff606b0d328e7ccf52 disable_ssl3.patch | ||
63 | ce90bbf21d5b5b7eaad69d885012506dcee2386dd522899e1f4b9f7ad7906b050249faf329d7cf4e228735694fc201bef112fd7e2bdb4e19ad9cac3909fb73d1 makefile_install_config.patch | ||
64 | a968e6cc3ce3c255918a0a520f7c81b0efaafcfd4fd548905167b11c69ce3b633524771af8fcb8866090e35fa1578db3158054bd8d06fd7d86e05e98d46c1e0a no_db_version_check.patch | ||
65 | 679cbdf560909005cc485317a2c35f4fe5c94eacb938996d58632a030d1a0f456e40ec883ded2a31879b20c9246fede2ead44c740768d1ab936c3a231c7ad8b2 sighandling.patch | ||
66 | 60c56f67e4b29b43973506f77837432d8e2449ea38ceb86b6b430c92af7023257740625bb3bedfe6bfa16d16c9dea73c523a98329e9415f5fc725861cc4de629 unbrand_accountd.patch | ||
67 | cb230d3b1e64915a6843d72222a11d4d6aea1b5e27f6ba99870cb9011c41abcacbc30c183c19c706f26360001dbd38d3ea274393ddbb8d6d6bbf2661cf1f2568 unbrand_cam_template.patch" | ||
diff --git a/testing/prayer/buildfix.patch b/testing/prayer/buildfix.patch new file mode 100644 index 0000000000..66d525873a --- /dev/null +++ b/testing/prayer/buildfix.patch | |||
@@ -0,0 +1,138 @@ | |||
1 | diff --git a/Config b/Config | ||
2 | index 54044b7..48da020 100644 | ||
3 | --- a/Config | ||
4 | +++ b/Config | ||
5 | @@ -10,7 +10,7 @@ | ||
6 | SSL_ENABLE = true # SSL requires OpenSSL | ||
7 | SESSION_CACHE_ENABLE = true # SSL session cache Requires Berkeley DB 3 or 4 | ||
8 | GZIP_ENABLE = true # Enable on the fly compression of pages | ||
9 | -LDAP_ENABLE = true # Add LDAP interface | ||
10 | +LDAP_ENABLE = false # Add LDAP interface | ||
11 | FENCE_ENABLE = false # Use Electric Fence to catch malloc problems | ||
12 | MUTEX_SEMAPHORE = false # Use SYSV mutexes rather than file locking | ||
13 | TIDY_ENABLE = true # Use libtidy for HTML sanitisation. | ||
14 | @@ -30,7 +30,7 @@ ACCOUNTD_PAM_ENABLE = true # Enable PAM support in account management daemon | ||
15 | # Location of compiler | ||
16 | CC = gcc | ||
17 | # Location of make program (GNU make required) | ||
18 | -MAKE = gmake | ||
19 | +MAKE = make | ||
20 | # Location of install program (GNU install or compatible required) | ||
21 | INSTALL = install | ||
22 | |||
23 | @@ -72,21 +72,21 @@ BASE_LIBS = -lcrypt -lutil | ||
24 | # which points to ../../imap/c-client. This just reduces the amount of | ||
25 | # noise output on each line when building the package. | ||
26 | # | ||
27 | -CCLIENT_DIR=../c-client | ||
28 | -CCLIENT_INCLUDE=-I $(CCLIENT_DIR) | ||
29 | -CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a | ||
30 | +#CCLIENT_DIR=../c-client | ||
31 | +#CCLIENT_INCLUDE=-I $(CCLIENT_DIR) | ||
32 | +#CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a | ||
33 | |||
34 | # | ||
35 | # Following works with imap-devel RPM package from Redhat 7. | ||
36 | # | ||
37 | -#CCLIENT_INCLUDE = -I/usr/include/imap | ||
38 | -#CCLIENT_LIBS = -lc-client | ||
39 | +CCLIENT_INCLUDE = -I/usr/include/imap | ||
40 | +CCLIENT_LIBS = -lc-client | ||
41 | # | ||
42 | # Complication: | ||
43 | # The Redhat RPM package links against SSL, PAM and kerberos libraries. | ||
44 | # | ||
45 | -#CCLIENT_SSL_ENABLE = true | ||
46 | -#CCLIENT_PAM_ENABLE = true | ||
47 | +CCLIENT_SSL_ENABLE = true | ||
48 | +CCLIENT_PAM_ENABLE = true | ||
49 | #CCLIENT_KERB_ENABLE = true | ||
50 | |||
51 | # | ||
52 | @@ -162,20 +162,19 @@ DB_LIBS=-ldb | ||
53 | # RW_GROUP. It is important that nothing else can read the certificate file. | ||
54 | |||
55 | # Build root (used by Redhat RPM system) | ||
56 | -BROOT= | ||
57 | +#BROOT= | ||
58 | |||
59 | # Directory, User and group for read-write files: log files, sockets etc | ||
60 | VAR_PREFIX = /var/spool/prayer | ||
61 | -RW_USER = prayer | ||
62 | -RW_GROUP = prayer | ||
63 | +RW_USER = root | ||
64 | +RW_GROUP = root | ||
65 | |||
66 | # Root Directory, User and group for read-only configuration files. | ||
67 | # Default configuration and permissions does not allow prayer user to | ||
68 | # update prayer configuration file. | ||
69 | |||
70 | -PREFIX = /usr/local/prayer | ||
71 | RO_USER = root | ||
72 | -RO_GROUP = prayer | ||
73 | +RO_GROUP = root | ||
74 | |||
75 | # Access permissions for general objects (wrt above users and groups) | ||
76 | PUBLIC_EXEC = 0755 | ||
77 | @@ -188,6 +187,6 @@ PRIVATE_DIR = 0750 | ||
78 | PRIVATE_FILE = 0640 | ||
79 | |||
80 | # Location of configuration files and binaries | ||
81 | -PRAYER_CONFIG_FILE = ${PREFIX}/etc/prayer.cf | ||
82 | -BIN_DIR = ${PREFIX}/sbin | ||
83 | -ACCOUNTD_CONFIG_FILE = ${PREFIX}/etc/prayer-accountd.cf | ||
84 | +PRAYER_CONFIG_FILE = /etc/prayer.cf | ||
85 | +BIN_DIR = /usr/sbin | ||
86 | +ACCOUNTD_CONFIG_FILE = /etc/prayer-accountd.cf | ||
87 | diff --git a/session/mm.c b/session/mm.c | ||
88 | index 19b6fbd..d080eb3 100644 | ||
89 | --- a/session/mm.c | ||
90 | +++ b/session/mm.c | ||
91 | @@ -31,7 +31,7 @@ static void | ||
92 | /* Must call mminit before any other fn */ | ||
93 | void mm_init() | ||
94 | { | ||
95 | -#include "linkage.c" | ||
96 | +#include <imap/linkage.h> | ||
97 | |||
98 | ml_init(); | ||
99 | } | ||
100 | diff --git a/templates/cam/Makefile b/templates/cam/Makefile | ||
101 | index 9f4122a..ff95283 100644 | ||
102 | --- a/templates/cam/Makefile | ||
103 | +++ b/templates/cam/Makefile | ||
104 | @@ -7,7 +7,7 @@ include ../../Config | ||
105 | endif | ||
106 | |||
107 | CFLAGS = $(BASECFLAGS) | ||
108 | -LDFLAGS = $(BASELDFLAGS) | ||
109 | +LDFLAGS := $(BASELDFLAGS) | ||
110 | |||
111 | TYPE=cam | ||
112 | |||
113 | diff --git a/templates/old/Makefile b/templates/old/Makefile | ||
114 | index 31016cf..cf8738a 100644 | ||
115 | --- a/templates/old/Makefile | ||
116 | +++ b/templates/old/Makefile | ||
117 | @@ -7,7 +7,7 @@ include ../../Config | ||
118 | endif | ||
119 | |||
120 | CFLAGS = $(BASECFLAGS) | ||
121 | -LDFLAGS = $(BASELDFLAGS) | ||
122 | +LDFLAGS := $(BASELDFLAGS) | ||
123 | |||
124 | TYPE=old | ||
125 | |||
126 | diff --git a/templates/src/Makefile b/templates/src/Makefile | ||
127 | index 5348a14..26cf2f1 100644 | ||
128 | --- a/templates/src/Makefile | ||
129 | +++ b/templates/src/Makefile | ||
130 | @@ -7,7 +7,7 @@ include ../../Config | ||
131 | endif | ||
132 | |||
133 | CFLAGS = $(BASECFLAGS) | ||
134 | -LDFLAGS = $(BASELDFLAGS) | ||
135 | +LDFLAGS := $(BASELDFLAGS) | ||
136 | |||
137 | LIB= ../../lib/lib_nossl.a | ||
138 | |||
diff --git a/testing/prayer/disable_ssl3.patch b/testing/prayer/disable_ssl3.patch new file mode 100644 index 0000000000..35f74e5121 --- /dev/null +++ b/testing/prayer/disable_ssl3.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | Description: Disable SSL 3.0 on client as well as server side | ||
2 | Author: Magnus Holmgren <holmgren@debian.org> | ||
3 | |||
4 | --- a/lib/ssl.c | ||
5 | +++ b/lib/ssl.c | ||
6 | @@ -387,12 +387,16 @@ void ssl_context_init(struct ssl_config | ||
7 | SSL_load_error_strings(); | ||
8 | |||
9 | /* Set up client context: only used by accountd */ | ||
10 | - client_ctx = SSL_CTX_new(SSLv3_client_method()); | ||
11 | + client_ctx = SSL_CTX_new(SSLv23_client_method()); | ||
12 | SSL_CTX_set_session_cache_mode(client_ctx, SSL_SESS_CACHE_BOTH); | ||
13 | SSL_CTX_set_info_callback(client_ctx, info_callback); | ||
14 | #ifdef SSL_MODE_AUTO_RETRY | ||
15 | SSL_CTX_set_mode(client_ctx, SSL_MODE_AUTO_RETRY); | ||
16 | #endif | ||
17 | + /* SSLv2 now obsolete */ | ||
18 | + SSL_CTX_set_options(client_ctx, SSL_OP_NO_SSLv2); | ||
19 | + /* SSLv3 now also obsolete */ | ||
20 | + SSL_CTX_set_options(client_ctx, SSL_OP_NO_SSLv3); | ||
21 | |||
22 | if (SSL_CTX_need_tmp_RSA(client_ctx)) | ||
23 | SSL_CTX_set_tmp_rsa_callback(client_ctx, rsa_callback); | ||
24 | @@ -420,6 +424,8 @@ void ssl_context_init(struct ssl_config | ||
25 | |||
26 | /* SSLv2 now obsolete */ | ||
27 | SSL_CTX_set_options(server_ctx, SSL_OP_NO_SSLv2); | ||
28 | + /* SSLv3 now also obsolete */ | ||
29 | + SSL_CTX_set_options(server_ctx, SSL_OP_NO_SSLv3); | ||
30 | |||
31 | /* Start off with the session cache disabled */ | ||
32 | SSL_CTX_set_session_cache_mode(server_ctx, SSL_SESS_CACHE_OFF); | ||
33 | @@ -625,6 +631,12 @@ void *ssl_start_server(int fd, unsigned | ||
34 | case TLS1_VERSION: | ||
35 | ver = "TLSv1"; | ||
36 | break; | ||
37 | + case TLS1_1_VERSION: | ||
38 | + ver = "TLSv1.1"; | ||
39 | + break; | ||
40 | + case TLS1_2_VERSION: | ||
41 | + ver = "TLSv1.2"; | ||
42 | + break; | ||
43 | default: | ||
44 | ver = "UNKNOWN"; | ||
45 | } | ||
46 | @@ -678,6 +690,12 @@ void *ssl_start_client(int fd, unsigned | ||
47 | case TLS1_VERSION: | ||
48 | ver = "TLSv1"; | ||
49 | break; | ||
50 | + case TLS1_1_VERSION: | ||
51 | + ver = "TLSv1.1"; | ||
52 | + break; | ||
53 | + case TLS1_2_VERSION: | ||
54 | + ver = "TLSv1.2"; | ||
55 | + break; | ||
56 | default: | ||
57 | ver = "UNKNOWN"; | ||
58 | } | ||
diff --git a/testing/prayer/makefile_install_config.patch b/testing/prayer/makefile_install_config.patch new file mode 100644 index 0000000000..15002ad0c3 --- /dev/null +++ b/testing/prayer/makefile_install_config.patch | |||
@@ -0,0 +1,170 @@ | |||
1 | --- a/files/etc/prayer-accountd.cf | ||
2 | +++ b/files/etc/prayer-accountd.cf | ||
3 | @@ -8,6 +8,10 @@ | ||
4 | # Default accountd.cf file suitable for RedHat Linux only. | ||
5 | # See distribution for some sample files for FreeBSD and Solaris | ||
6 | |||
7 | +accountd_port = 145 | ||
8 | + | ||
9 | +authtype = pam | ||
10 | + | ||
11 | msforward_name = ".MSforward" | ||
12 | forward_name = ".forward" | ||
13 | aliases_name = "vacation.aliases" | ||
14 | --- a/files/Makefile | ||
15 | +++ b/files/Makefile | ||
16 | @@ -66,21 +66,16 @@ install-aconfig: | ||
17 | |||
18 | install-motd: | ||
19 | $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \ | ||
20 | - etc/motd.html ${BROOT}${PREFIX}/etc | ||
21 | + etc/motd.html ${BROOT}/etc/prayer | ||
22 | |||
23 | install: | ||
24 | - PREFIX=$(BROOT)$(PREFIX) VAR_PREFIX=$(BROOT)$(VAR_PREFIX) \ | ||
25 | - RO_USER=$(RO_USER) RO_GROUP=$(RO_GROUP) \ | ||
26 | - RW_USER=$(RW_USER) RW_GROUP=$(RW_GROUP) \ | ||
27 | - PUBLIC_DIR=$(PUBLIC_DIR) PRIVATE_DIR=$(PRIVATE_DIR) \ | ||
28 | - PUBLIC_FILE=$(PUBLIC_FILE) PRIVATE_FILE=$(PRIVATE_FILE) \ | ||
29 | - PUBLIC_EXEC=$(PUBLIC_FILE) PRIVATE_EXEC=$(PRIVATE_EXEC) \ | ||
30 | - BIN_DIR=$(BIN_DIR) INSTALL=$(INSTALL) \ | ||
31 | - ./install.sh | ||
32 | - if [ ! -f $(BROOT)$(PREFIX)/certs/prayer.pem ]; then $(MAKE) install-cert; fi | ||
33 | + ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${BROOT}${PREFIX} | ||
34 | + ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${BROOT}/etc/prayer | ||
35 | + | ||
36 | + tar -c --owner ${RO_USER} --group ${RO_GROUP} --mode "a-x+X" icons static | tar -C ${BROOT}${PREFIX} -x | ||
37 | if [ ! -f $(BROOT)$(PRAYER_CONFIG_FILE) ]; then $(MAKE) install-config; fi | ||
38 | if [ ! -f $(BROOT)$(ACCOUNTD_CONFIG_FILE) ]; then $(MAKE) install-aconfig; fi | ||
39 | - if [ ! -f $(BROOT)$(PREFIX)/etc/motd.html ]; then $(MAKE) install-motd; fi | ||
40 | + if [ ! -f $(BROOT)/etc/prayer/motd.html ]; then $(MAKE) install-motd; fi | ||
41 | |||
42 | redhat-install-init.d: | ||
43 | install -D -o root -g root -m 755 \ | ||
44 | --- a/files/etc/prayer.cf.SRC | ||
45 | +++ b/files/etc/prayer.cf.SRC | ||
46 | @@ -20,7 +20,7 @@ var_prefix = "__VAR_PREFIX__" | ||
47 | # User ID to run as if we start off as root | ||
48 | prayer_user = "prayer" | ||
49 | # Group ID to run as if we start off as root | ||
50 | -prayer_group = "prayer" | ||
51 | +prayer_group = "nogroup" | ||
52 | |||
53 | # Run prayer as background process. | ||
54 | # TRUE => will return as soon as valid configuration is found. | ||
55 | @@ -53,7 +53,7 @@ directory_perms = 0750 | ||
56 | imapd_user_map = "" | ||
57 | |||
58 | # Default imapd server. | ||
59 | -imapd_server = localhost | ||
60 | +imapd_server = localhost/notls | ||
61 | |||
62 | # Name of Prayer user preferences file on IMAP server | ||
63 | prefs_folder_name = ".prayer" | ||
64 | @@ -270,11 +270,11 @@ icon_expire_timeout = 7d | ||
65 | |||
66 | # Locatation of SSL certificate file (only used if SSL ports defined). | ||
67 | # Required if we are going to provide SSL services. | ||
68 | -ssl_cert_file = "$prefix/certs/prayer.pem" | ||
69 | +ssl_cert_file = "/etc/ssl/certs/ssl-cert-snakeoil.pem" | ||
70 | |||
71 | # Locatation of SSL private key file (only used if SSL ports defined). | ||
72 | # Required if we are going to provide SSL services. | ||
73 | -ssl_privatekey_file = "$prefix/certs/prayer.pem" | ||
74 | +ssl_privatekey_file = "/etc/ssl/private/ssl-cert-snakeoil.key" | ||
75 | |||
76 | # Master server will regenerate shared RSA key at this interval: | ||
77 | ssl_rsakey_lifespan = 15m | ||
78 | @@ -282,8 +282,9 @@ ssl_rsakey_lifespan = 15m | ||
79 | # RSA key remains fresh in child process for this long after first actual use. | ||
80 | ssl_rsakey_freshen = 15m | ||
81 | |||
82 | -# SSL session cache timeout. | ||
83 | -ssl_session_timeout = 24h | ||
84 | +# SSL session cache timeout. Uncomment to enable SSL session caching. | ||
85 | +# You should also arrange for prayer-ssl-prune to be run periodically. | ||
86 | +#ssl_session_timeout = 24h | ||
87 | |||
88 | # EGD socket, if system has no /dev/urandom | ||
89 | #egd_socket = "/var/prngd/urandom" | ||
90 | @@ -374,13 +375,15 @@ sendmail_path = /usr/lib/sendmail | ||
91 | ispell_path = /usr/bin/ispell | ||
92 | |||
93 | # Message of the day file | ||
94 | -motd_path = "$prefix/etc/motd.html" | ||
95 | +#motd_path = "/etc/prayer/motd.html" | ||
96 | |||
97 | -# HTML to insert into login page | ||
98 | -#login_insert1_path = "$prefix/etc/ucsnews.html" | ||
99 | - | ||
100 | -# HTML to insert into login page | ||
101 | -#login_insert2_path = "$prefix/etc/ucsnews.html" | ||
102 | +# HTML to make available to login template as $login_insert1 | ||
103 | +# (only used in "cam" template set). | ||
104 | +#login_insert1_path = "/etc/prayer/login1.html" | ||
105 | + | ||
106 | +# HTML to make available to login template as $login_insert2 | ||
107 | +# (currently not used in any template set). | ||
108 | +#login_insert2_path = "/etc/prayer/login2.html" | ||
109 | |||
110 | # Login security: Prayer's front page defaults to a login form. | ||
111 | # If the user does not connect via SSL then this can be changed | ||
112 | @@ -409,10 +412,11 @@ bin_dir = "__BIN_DIR__" | ||
113 | |||
114 | # Various directories used by the running system | ||
115 | # Logs stored in $log_dir | ||
116 | -log_dir = "$var_prefix/logs" | ||
117 | +log_dir = "/var/log/prayer" | ||
118 | |||
119 | # $lock_dir used for interlocking between prayer processes | ||
120 | -lock_dir = "$var_prefix/locks" | ||
121 | +# (only on Debian GNU/kFreeBSD) | ||
122 | +lock_dir = "$var_prefix" | ||
123 | |||
124 | # $socket_dir is location for unix domain sockets which connect frontend | ||
125 | # to backend in proxy mode of operation. | ||
126 | @@ -420,7 +424,7 @@ socket_dir = "$var_prefix/socke | ||
127 | |||
128 | # Split socket directory into 64 subdirs keyed on first letter of sessionID | ||
129 | # Code provides compatibility in both directions: can switch back and forward | ||
130 | -socket_split_dir = TRUE | ||
131 | +socket_split_dir = FALSE | ||
132 | |||
133 | # Name of Unix domain socket (in $socket_dir) used for initial handshake | ||
134 | # between prayer and prayer-session processes when a user logs in | ||
135 | @@ -434,7 +438,7 @@ ssl_session_dir = "$var_prefix/ssl_s | ||
136 | tmp_dir = "$var_prefix/tmp" | ||
137 | |||
138 | # Location for PID files for prayer and prayer-session master processes. | ||
139 | -pid_dir = "$var_prefix/pid" | ||
140 | +pid_dir = "$var_prefix" | ||
141 | |||
142 | # Interface to Hermes finger database | ||
143 | #lookup_rpasswd = "/data/finger/rpasswd.cdb" | ||
144 | @@ -452,7 +456,7 @@ pid_dir = "$var_prefix/pid" | ||
145 | # Template stuff | ||
146 | |||
147 | template_path = "__PREFIX__/templates" | ||
148 | -template_set = "cam" | ||
149 | +template_set = "old" | ||
150 | template_use_compiled = TRUE | ||
151 | |||
152 | template old "Traditional" | ||
153 | @@ -601,14 +605,14 @@ hiersep = "/" | ||
154 | dualuse = FALSE | ||
155 | |||
156 | # Names of postponed_folder and sent_mail_folder, relative to maildir | ||
157 | -postponed_folder = "postponed-msgs" | ||
158 | -sent_mail_folder = "sent-mail" | ||
159 | +postponed_folder = "Drafts" | ||
160 | +sent_mail_folder = "Sent" | ||
161 | |||
162 | # Default domain for outgoing mail. Defaults to "$hostname". | ||
163 | # default_domain = "<valid mail domain>" | ||
164 | |||
165 | # Language for ispell. | ||
166 | -ispell_language = "british" | ||
167 | +ispell_language = "american" | ||
168 | |||
169 | # Size of small and large compose windows | ||
170 | small_cols = 80 | ||
diff --git a/testing/prayer/no_db_version_check.patch b/testing/prayer/no_db_version_check.patch new file mode 100644 index 0000000000..28bb11501d --- /dev/null +++ b/testing/prayer/no_db_version_check.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | --- a/lib/mydb_db3.c | ||
2 | +++ b/lib/mydb_db3.c | ||
3 | @@ -190,21 +190,10 @@ static int myinit(const char *dbdir, int | ||
4 | |||
5 | static int init(const char *dbdir, int myflags) | ||
6 | { | ||
7 | - int maj, min, patch; | ||
8 | - char *vstr; | ||
9 | int r; | ||
10 | |||
11 | if (dbinit++) return 0; | ||
12 | |||
13 | - vstr = db_version(&maj, &min, &patch); | ||
14 | - if (maj != DB_VERSION_MAJOR || min != DB_VERSION_MINOR || | ||
15 | - DB_VERSION_PATCH > patch) { | ||
16 | - log_fatal("incorrect version of Berkeley db: " | ||
17 | - "compiled against %d.%d.%d, linked against %d.%d.%d", | ||
18 | - DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, | ||
19 | - maj, min, patch); | ||
20 | - } | ||
21 | - | ||
22 | if (!(r = myinit(dbdir, myflags))) | ||
23 | return(0); | ||
24 | |||
diff --git a/testing/prayer/sighandling.patch b/testing/prayer/sighandling.patch new file mode 100644 index 0000000000..e7916ea80b --- /dev/null +++ b/testing/prayer/sighandling.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | --- a/lib/os.h | ||
2 | +++ b/lib/os.h | ||
3 | @@ -44,6 +44,8 @@ BOOL os_signal_alarm_clear(void); | ||
4 | |||
5 | BOOL os_signal_init(); | ||
6 | |||
7 | +BOOL os_signal_hup_term_init(void (*hup_fn) (), void (*term_fn) ()); | ||
8 | + | ||
9 | BOOL os_lock_exclusive(int fd); | ||
10 | |||
11 | BOOL os_lock_shared(int fd); | ||
12 | --- a/servers/session_server.c | ||
13 | +++ b/servers/session_server.c | ||
14 | @@ -286,6 +286,7 @@ BOOL session_server(struct config *confi | ||
15 | fd_set readfds; | ||
16 | pid_t child; | ||
17 | unsigned long timeout = 0L; | ||
18 | + BOOL sighup_seen = NIL; | ||
19 | |||
20 | if (config->direct_enable) { | ||
21 | ssl_portlist | ||
22 | @@ -348,6 +349,18 @@ BOOL session_server(struct config *confi | ||
23 | } else { | ||
24 | rc = select(maxfd + 1, &readfds, NIL, NIL, NIL); | ||
25 | } | ||
26 | + if (sighup_seen) { | ||
27 | + log_misc("SIGHUP received - reexec daemon"); | ||
28 | + close(sockfd); | ||
29 | + if (config->direct_enable) { | ||
30 | + /* Find some way to pass this information along | ||
31 | + to the new invocation somehow later. */ | ||
32 | + portlist_close_all(ssl_portlist); | ||
33 | + portlist_close_all(plain_portlist); | ||
34 | + } | ||
35 | + log_misc_free(); | ||
36 | + return (T); | ||
37 | + } | ||
38 | } | ||
39 | while ((rc < 0) && (errno == EINTR)); | ||
40 | |||
41 | --- a/shared/log.c | ||
42 | +++ b/shared/log.c | ||
43 | @@ -502,6 +502,13 @@ BOOL log_misc_init(struct config *config | ||
44 | return (log_open(log_misc_ptr, log_name)); | ||
45 | } | ||
46 | |||
47 | +void log_misc_free() | ||
48 | +{ | ||
49 | + if ((log_misc_ptr == NIL) || (log_misc_ptr->fd < 0)) | ||
50 | + return; | ||
51 | + log_free(log_misc_ptr); | ||
52 | +} | ||
53 | + | ||
54 | /* log_misc_ping() ******************************************************* | ||
55 | * | ||
56 | * Reopen misc log file if required | ||
57 | --- a/shared/log.h | ||
58 | +++ b/shared/log.h | ||
59 | @@ -45,6 +45,8 @@ void log_record_peer_pid(struct log *log | ||
60 | BOOL | ||
61 | log_misc_init(struct config *config, char *progname, char *misc_log_name); | ||
62 | |||
63 | +void log_misc_free(); | ||
64 | + | ||
65 | BOOL log_misc_ping(); | ||
66 | |||
67 | void log_misc(char *fmt, ...); | ||
diff --git a/testing/prayer/unbrand_accountd.patch b/testing/prayer/unbrand_accountd.patch new file mode 100644 index 0000000000..ede0add749 --- /dev/null +++ b/testing/prayer/unbrand_accountd.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | --- a/accountd/filter.c | ||
2 | +++ b/accountd/filter.c | ||
3 | @@ -266,7 +266,6 @@ filter_print_vacation(struct config *con | ||
4 | |||
5 | fprintf(file, "# MSshell :: vacation\n"); | ||
6 | fprintf(file, "if personal\n"); | ||
7 | - fprintf(file, " alias %s@cam.ac.uk\n", pwd->pw_name); | ||
8 | |||
9 | if (!filter_print_aliases(config, file)) | ||
10 | return (NIL); | ||
11 | @@ -278,7 +277,7 @@ filter_print_vacation(struct config *con | ||
12 | fprintf(file, ("This message is automatically generated " | ||
13 | "in response to your mail\\n\\" "\n")); | ||
14 | fprintf(file, ("message (perhaps re-directed) to " | ||
15 | - "$local_part@hermes.cam.ac.uk.\\n\\n\"\n")); | ||
16 | + "$local_part@$local_domain.\\n\\n\"\n")); | ||
17 | fprintf(file, " file ${home}/vacation.message\n"); | ||
18 | fprintf(file, " log ${home}/vacation.log\n"); | ||
19 | fprintf(file, " once ${home}/vacation.once\n"); | ||
20 | @@ -307,10 +306,10 @@ filter_print_spam(struct config *config, | ||
21 | threshold = atoi(filter->threshold); | ||
22 | |||
23 | /* XXX (threshold == 0) okay? */ | ||
24 | - fprintf(file, "if $h_X-Cam-SpamScore contains \""); | ||
25 | + fprintf(file, "if $h_X-Spam-Level contains \""); | ||
26 | |||
27 | for (i=0 ; i < threshold; i++) | ||
28 | - fputc('s', file); | ||
29 | + fputc('*', file); | ||
30 | |||
31 | fprintf(file, "\" then\n"); | ||
32 | fprintf(file, " save mail/spam\n"); | ||
diff --git a/testing/prayer/unbrand_cam_template.patch b/testing/prayer/unbrand_cam_template.patch new file mode 100644 index 0000000000..eeabb8f03e --- /dev/null +++ b/testing/prayer/unbrand_cam_template.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | --- a/templates/cam/compose_toolbar.t | ||
2 | +++ b/templates/cam/compose_toolbar.t | ||
3 | @@ -2,8 +2,6 @@ | ||
4 | <div id="skip"> <a href="#skip-content" accesskey="2">Skip to content</a></div> | ||
5 | <div id="header"> | ||
6 | <div id="branding"> | ||
7 | - <a href="http://www.cam.ac.uk/" accesskey="1"> | ||
8 | - <img src="/icons/ucs-id-small.jpg" alt="" class="logo" /></a> | ||
9 | </div> | ||
10 | <div id="change-to"> | ||
11 | <div class="change"> | ||
12 | --- a/templates/cam/login.t | ||
13 | +++ b/templates/cam/login.t | ||
14 | @@ -42,11 +42,6 @@ table#login td input {margin:0 0 0.5em 0 | ||
15 | href="#skip-content" accesskey="2">Skip to content</a> </div> | ||
16 | <div id="header"> | ||
17 | <div id="branding"> | ||
18 | -<a href="http://www.cam.ac.uk/" accesskey="1"> | ||
19 | - <img src="/icons/identifier.gif" | ||
20 | - alt="University of Cambridge" class="ucam" /> | ||
21 | - <img src="/icons/ucs.gif" alt="" class="logo" /> | ||
22 | -</a> | ||
23 | </div> | ||
24 | </div> | ||
25 | % | ||
26 | --- a/templates/cam/toolbar.t | ||
27 | +++ b/templates/cam/toolbar.t | ||
28 | @@ -4,9 +4,7 @@ | ||
29 | href="#skip-content" accesskey="2">Skip to content</a> </div> | ||
30 | <div id="header"> | ||
31 | <div id="branding"> | ||
32 | - <a href="http://www.cam.ac.uk/" accesskey="1"> | ||
33 | - <img src="/icons/ucs-id-small.jpg" alt="" class="logo" /> | ||
34 | -</a></div> | ||
35 | +</div> | ||
36 | <div id="change-to"> | ||
37 | <form method="post" accept-charset="UTF-8" | ||
38 | enctype="multipart/form-data" action="<% change |s %>"> | ||