Subversion Repositories prayer-err

Compare Revisions

Ignore whitespace Rev 36 → Rev 37

/trunk/debian/prayer.dirs
1,2 → 1,4
var/run/prayer
var/log/prayer
etc/prayer/templates/xhtml_transitional
etc/prayer/templates/xhtml_strict
/trunk/debian/prayer.install
1,10 → 1,6
usr/sbin/prayer
usr/sbin/prayer-session
usr/sbin/prayer-chroot
usr/sbin/prayer-db-prune
usr/sbin/prayer-sem-prune
usr/sbin/prayer-ssl-prune
usr/share/prayer
etc/prayer/prayer.cf
etc/prayer/motd.html
etc/prayer/welcome.html
/trunk/debian/README.Debian
2,14 → 2,65
-----------------
 
The Debian version of Prayer is built with SSL support with session
cache using libdb4.3, gzip Content-Transfer-Encoding, LDAP, and System
cache using libdb4.6, gzip Content-Transfer-Encoding, LDAP, and System
V mutex support. The previous version, which was only uloaded to the
experimental distribution, was heavily patched to add UTF-8 and IPv6
support among other things. All that has been incorporated and
improved by upstream in 1.1.0. The remaining patches concern changes
to default configuration regarding directory structure, and minor
cosmetic changes to the folder list.
to the default configuration as detailed below, or fix bugs. You can
always find information about patches in changelog.Debian.gz.
 
To enable Prayer, you must edit /etc/default/prayer and change
ENABLED=0 to ENABLED=1. But before you do that you should go through
/etc/prayer/prayer.cf and adapt it to your needs. In particular, if
you already run a web server on this machine you need to change
use_http_port (and use_https_port) to something else.
 
Debian-specific configuration defaults:
 
* Static files (templates, icons, CSS files) are installed in
/usr/share/prayer in accordance with policy. The prefix option
points there, while var_prefix, the location of pid files
(pid_dir), sockets (socket_dir), and the SSL session cache
(ssl_session_dir), is /var/run/prayer and subdirectories. Log
files are written to /var/log/prayer (log_dir) and /tmp is used to
temporarily store uploaded attachments (tmp_dir).
 
* Prayer by default runs as user prayer (created on install) and
group nogroup. The prayer user is added to the ssl-cert group on
installation, so that it can access keys in /etc/ssl/private.
 
* ssl_cert_file and ssl_privatekey_file point to the "snake oil"
certificate and key created by the ssl-cert package, so that you
only have to uncomment use_https_port to enable encryption. For a
production server you should of course install a real certificate.
 
* Support for SSL session caching is compiled in, but caching is
disabled by default, as it probably doesn't make that much a
difference on modern hardware. To enable it, uncomment the
ssl_session_timeout setting in prayer.cf. You should also arrange
for prayer-ssl-prune and prayer-db-prune to be run periodically,
for example by placing symlinks to them in /etc/cron.hourly or
/etc/cron.daily.
 
* The default IMAP folders for sent mail (sent_mail_folder) and
drafts (postponed_folder) are "Sent" and "Drafts", respectively,
the default for Mozilla Thunderbird and others (although many IMAP
clients unfortunately use localized folder names).
 
* socket_split_dir is off by default to reduce complexity when
testing. You will probably only need it if you have lots of
simultaneous users and a file system without directory indexes.
 
Customizing templates:
 
To use customized templates you must set template_use_compiled to
FALSE in prayer.cf. Then copy the template (.t file) you wish to
customize from /usr/share/prayer/templates to the corresponding
location under /etc/prayer/templates and edit it there. Prayer will
still use the compiled-in versions of the remaining templates, thanks
to a small patch.
 
Quirks:
 
* If your IMAP server supports STARTTLS, then Prayer (actually the
27,5 → 78,27
containing a dot. Unfortunately this means that the preference
folder will be fully visible.
 
-- Magnus Holmgren <holmgren@debian.org>, Tue, 13 May 2008 22:27:11 +0200
* Prayer doesn't handle signals gracefully yet, which means that it
will leave SysV semaphores lying around when it is stopped or
restarted. You can use ipcs to find them and ipcrm to delete them.
 
* While Prayer does its best to remove potentially harmful tags from
HTML email, it doesn't try to convert it to XHTML. This means that
Prayer's output is conformant XHTML only when not viewing HTML
mail.
 
* Prayer deletes mail the IMAP way, which is by marking messages as
deleted and leaving them in their folders. Prayer always lists
deleted messages (with a special icon) and expunges (deletes
permanently) deleted messages only when explicitly requested.
Before that they can be undeleted at any time by "unmarking" them.
 
Most mail client software deletes mail by moving it to a "trash"
folder, which in reality means creating a copy in the trash folder
and marking the original deleted. Messages that are marked as
deleted are usually never listed, cannot be unmarked, and are often
automatically expunged. These two approaches are rather
incompatible, but some software can take either.
 
-- Magnus Holmgren <holmgren@debian.org>, Mon, 23 Jun 2008 20:57:05 +0200
 
/trunk/debian/prayer.examples
New file
0,0 → 1,3
files/etc.hermes/login_prefix.html
files/etc.hermes/login_suffix.html
files/etc.hermes/motd.html
/trunk/debian/changelog
22,8 → 22,14
the welcome screen if the option was unset or the file couldn't be
read. This patch removes that check as well as the welcome_path and
help_path options from prayer.cf.
* No longer install welcome.html (see above) and motd.html (no real
content) in /etc/prayer. Install login_prefix.html, login_suffix.html,
and motd.html (the versions found in files/etc.hermes in the
distribution tarball) in /usr/share/doc/prayer/examples instead.
* Do not install prayer-chroot (too experimental, hardcoded chroot path)
or prayer-sem-prune (does nothing that ipcrm cannot do).
 
-- Magnus Holmgren <holmgren@debian.org> Mon, 23 Jun 2008 21:32:03 +0200
-- Magnus Holmgren <holmgren@debian.org> Mon, 23 Jun 2008 21:37:23 +0200
 
prayer (1.2.0-1) unstable; urgency=low
 
/trunk/debian/patches/templates_fallback_to_compiled.patch
New file
0,0 → 1,45
--- a/lib/template_expand.c
+++ b/lib/template_expand.c
@@ -496,11 +496,11 @@ template_expand_call(struct template_cal
char *s, *t;
char *err = NIL;
- if (tvals->use_compiled)
+ if (tvals->use_compiled ||
+ !(template = template_parse(tvals->dir, tvals->set,
+ item->name, tvals->pool)))
template = template_find(tvals->set, item->name, tvals->pool);
- else
- template = template_parse(tvals->dir, tvals->set,
- item->name, tvals->pool);
+
if (!template) {
str_printf(state->error,
"Template \"%s\" not found (CALL from template \"%s\")\n",
@@ -579,11 +579,11 @@ template_expand(char *name, struct templ
struct str *error = tvals->error;
char *err;
- if (tvals->use_compiled) {
+ if (tvals->use_compiled ||
+ !(template = template_parse(tvals->dir, tvals->set,
+ item->name, tvals->pool)))
template = template_find(tvals->set, name, tvals->pool);
- } else {
- template = template_parse(tvals->dir, tvals->set, name, tvals->pool);
- }
+
if (!template) {
str_printf(tvals->error,
"Template %s not found (top level template_expand())",
--- a/files/etc/prayer.cf.SRC
+++ b/files/etc/prayer.cf.SRC
@@ -452,7 +452,7 @@ pid_dir = "$var_prefix"
######################################################################
# Template stuff
-template_path = "__PREFIX__/templates"
+template_path = "/etc/prayer/templates"
template_set = "xhtml_strict"
template_use_compiled = TRUE
/trunk/debian/patches/series
1,3 → 1,4
repair_ssl_session_db_on_version_mismatch.patch
makefile_install_config.patch
repair_ssl_session_db_on_version_mismatch.patch
accountd_makefile_typo.patch
welcome_is_template.patch
templates_fallback_to_compiled.patch
/trunk/debian/patches/repair_ssl_session_db_on_version_mismatch.patch
1,11 → 1,15
--- a/lib/mydb_db3.c
+++ b/lib/mydb_db3.c
@@ -208,7 +208,7 @@ static int init(const char *dbdir, int m
@@ -208,7 +208,11 @@ static int init(const char *dbdir, int m
if (!(r = myinit(dbdir, myflags)))
return(0);
- if (r != ENOENT) {
+ if (r != ENOENT && r != DB_VERSION_MISMATCH) {
+ if (r != ENOENT
+#ifdef DB_VERSION_MISMATCH
+ && r != DB_VERSION_MISMATCH
+#endif
+ ) {
log_panic("DBERROR: dbenv->open '%s' failed: %s", dbdir, db_strerror(r));
return MYDB_IOERROR;
}