pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/ezmlm With the "althash" option, enable Iain Trus...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e21d316997e4
branches: trunk
changeset: 486012:e21d316997e4
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Tue Dec 21 04:22:03 2004 +0000
description:
With the "althash" option, enable Iain Truskett's 2002-10-16 patch
to hash the on-disk subscriber database using an algorithm compatible
with case-insensitive filesystems. Enabled by default on Darwin.
Bump PKGREVISION.
diffstat:
mail/ezmlm/Makefile | 6 ++-
mail/ezmlm/files/patch-althash | 78 ++++++++++++++++++++++++++++++++++++++++++
mail/ezmlm/options.mk | 17 +++++++++
3 files changed, 100 insertions(+), 1 deletions(-)
diffs (128 lines):
diff -r 051b6698b18b -r e21d316997e4 mail/ezmlm/Makefile
--- a/mail/ezmlm/Makefile Tue Dec 21 03:43:26 2004 +0000
+++ b/mail/ezmlm/Makefile Tue Dec 21 04:22:03 2004 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.12 2004/07/21 22:58:10 schmonz Exp $
+# $NetBSD: Makefile,v 1.13 2004/12/21 04:22:03 schmonz Exp $
#
.include "../../mail/ezmlm/Makefile.common"
DISTNAME= ${EZMLM_VERS}
+PKGREVISION= 1
MAINTAINER= schmonz%NetBSD.org@localhost
HOMEPAGE= http://cr.yp.to/ezmlm.html
@@ -23,6 +24,9 @@
INSTALLATION_DIRS= bin man man/man1 man/man5 man/cat1 man/cat5
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
.include "../../mk/compiler.mk"
.if !empty(CC_VERSION:Mgcc-*)
diff -r 051b6698b18b -r e21d316997e4 mail/ezmlm/files/patch-althash
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/ezmlm/files/patch-althash Tue Dec 21 04:22:03 2004 +0000
@@ -0,0 +1,78 @@
+Attached below are diffs. They convert the hashing to do:
+ '@'..'Z'
+
+It's not that great as a hashing algorithm since you end up with a
+non-prime number that's reasonably close to a power of 2 for your number
+of buckets, but hey.
+
+It's possible one other place (in constmap) needs to be changed. DJB's
+code scares me in its lack of constants and lack of subroutines to
+factor away similar bits of code.
+
+Test it and see if it works.
+
+
+cheers,
+--
+Iain.
+
+
+--- ezmlm-list.c.orig 1997-06-29 23:11:54.000000000 -0400
++++ ezmlm-list.c
+@@ -36,7 +36,7 @@ char **argv;
+ if (chdir(dir) == -1)
+ strerr_die4sys(111,FATAL,"unable to switch to ",dir,": ");
+
+- for (fn[12] = 64;fn[12] < 64 + 53;++fn[12]) {
++ for (fn[12] = 64;fn[12] < 64 + 27;++fn[12]) {
+ fd = open_read(fn);
+ if (fd == -1) {
+ if (errno != error_noent)
+--- ezmlm-send.c.orig 1997-06-29 23:11:54.000000000 -0400
++++ ezmlm-send.c
+@@ -288,7 +288,7 @@ char **argv;
+
+ qmail_from(&qq,line.s);
+
+- for (i = 0;i < 53;++i) {
++ for (i = 0;i < 27;++i) {
+ ch = 64 + i;
+ if (!stralloc_copys(&fnsub,"subscribers/")) die_nomem();
+ if (!stralloc_catb(&fnsub,&ch,1)) strerr_die2x(111,FATAL,"out of memory");
+--- ezmlm.5.orig 1997-06-29 23:11:54.000000000 -0400
++++ ezmlm.5
+@@ -30,10 +30,10 @@ allows automatic subscription if
+ .I dir\fB/public
+ exists.
+
+-The list is hashed into 53 files, named
++The list is hashed into 27 files, named
+ .B @
+ through
+-.B t
++.B Z
+ in ASCII.
+ A nonexistent file is treated as an empty file.
+
+--- issub.c.orig 1997-06-29 23:11:54.000000000 -0400
++++ issub.c
+@@ -35,7 +35,7 @@ char *userhost;
+ h = 5381;
+ for (j = 0;j < addr.len;++j)
+ h = (h + (h << 5)) ^ (uint32) (unsigned char) addr.s[j];
+- ch = 64 + (h % 53);
++ ch = 64 + (h % 27);
+
+ if (!stralloc_0(&addr)) return -2;
+
+--- subscribe.c.orig 1997-06-29 23:11:54.000000000 -0400
++++ subscribe.c
+@@ -45,7 +45,7 @@ int flagadd;
+ h = 5381;
+ for (j = 0;j < addr.len;++j)
+ h = (h + (h << 5)) ^ (uint32) (unsigned char) addr.s[j];
+- ch = 64 + (h % 53);
++ ch = 64 + (h % 27);
+
+ if (!stralloc_0(&addr)) return -2;
+
diff -r 051b6698b18b -r e21d316997e4 mail/ezmlm/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/ezmlm/options.mk Tue Dec 21 04:22:03 2004 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: options.mk,v 1.1 2004/12/21 04:22:03 schmonz Exp $
+
+.if ${OPSYS} == "Darwin"
+PKG_DEFAULT_OPTIONS+= althash
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.ezmlm
+PKG_SUPPORTED_OPTIONS= althash
+.include "../../mk/bsd.options.mk"
+
+###
+### alternate subscriber hashing scheme for case-insensitive filesystems
+###
+.if !empty(PKG_OPTIONS:Malthash)
+post-patch:
+ @cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} < ${FILESDIR}/patch-althash
+.endif
Home |
Main Index |
Thread Index |
Old Index