summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arendsen Hein <thomas@intevation.de>2007-07-17 14:59:33 (GMT)
committerThomas Arendsen Hein <thomas@intevation.de>2007-07-17 14:59:33 (GMT)
commitb43f75a568a55946348a166c5e2f9d84088f73d8 (patch)
tree50871488cf453b4b3cc6d10b5c6c1fbff5e8abce
parent192f281e78e87b6cb5fcae2818a6db1ec2eef3b2 (diff)
downloadserver-b43f75a568a55946348a166c5e2f9d84088f73d8.tar.gz
Removed files that are not part of Kolab server 2.2-beta1
Many patches have been accepted upstream or exist as patches to the used OpenPKG versions. obmtool is mostly superceded by the 'openpkg build' command.
-rw-r--r--amavisd/.cvsignore1
-rw-r--r--amavisd/Makefile38
-rw-r--r--amavisd/kolab.patch28
-rw-r--r--amavisd/undecipherable_subject.patch11
-rw-r--r--apache/.cvsignore1
-rw-r--r--apache/Makefile55
-rw-r--r--apache/kolab.patch48
-rw-r--r--apache/mod_auth_ldap.patch156
-rw-r--r--clamav/.cvsignore1
-rw-r--r--clamav/Makefile38
-rw-r--r--clamav/kolab.patch22
-rw-r--r--db/Makefile16
-rw-r--r--db/kolab.patch14
-rw-r--r--file/.cvsignore1
-rw-r--r--file/Makefile40
-rw-r--r--file/file-cve-2007-1536.patch117
-rw-r--r--file/kolab.patch31
-rw-r--r--imap/.cvsignore1
-rw-r--r--imap/Makefile40
-rw-r--r--imap/README12
-rw-r--r--imap/imap.annotate.patch445
-rw-r--r--imap/kolab.patch33
-rw-r--r--imapd/.cvsignore1
-rw-r--r--imapd/Makefile48
-rw-r--r--imapd/README12
-rw-r--r--imapd/cyradm.annotate.patch78
-rw-r--r--imapd/imapd-goodchars.patch52
-rw-r--r--imapd/imapd-murder.patch20
-rw-r--r--imapd/imapd.annotate.patch118
-rw-r--r--imapd/imapd.folderchar.patch140
-rw-r--r--imapd/imapd.group2.patch20
-rw-r--r--imapd/imapd.morelogging.patch100
-rw-r--r--imapd/kolab-ldap.patch137
-rw-r--r--imapd/kolab.patch110
-rwxr-xr-xobmtool994
-rw-r--r--obmtool.conf191
-rw-r--r--php/.cvsignore1
-rw-r--r--php/Makefile53
-rw-r--r--php/kolab.patch31
-rw-r--r--php/php-getacl-backport.patch93
-rw-r--r--php/php-imap-annotation.patch200
-rw-r--r--php/php-imap-status-current.patch65
-rw-r--r--postfix/.cvsignore1
-rw-r--r--postfix/Makefile42
-rw-r--r--postfix/kolab.patch30
-rw-r--r--postfix/postfix-ldap-leafonly.patch86
-rw-r--r--postfix/postfix-pipe-allow-empty-sender.patch86
-rw-r--r--postfix/postfix-pipe.patch101
-rw-r--r--spamassassin/.cvsignore1
-rw-r--r--spamassassin/Makefile39
-rw-r--r--spamassassin/spamassassin-cve-2007-0451.patch130
51 files changed, 0 insertions, 4129 deletions
diff --git a/amavisd/.cvsignore b/amavisd/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/amavisd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/amavisd/Makefile b/amavisd/Makefile
deleted file mode 100644
index 290f6bd..0000000
--- a/amavisd/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC/PLUS/
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=amavisd
-VERSION=2.3.3
-RELEASE=2.5.0
-KOLABRELEASE=2.5.0_kolab
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm undecipherable_subject.patch kolab.patch
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(KOLABCVSDIR)/undecipherable_subject.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp -p $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)-$(VERSION)
diff --git a/amavisd/kolab.patch b/amavisd/kolab.patch
deleted file mode 100644
index bb1fd83..0000000
--- a/amavisd/kolab.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -urN amavisd.orig/amavisd.spec amavisd/amavisd.spec
---- amavisd.orig/amavisd.spec 2005-10-11 14:46:17.000000000 +0200
-+++ amavisd/amavisd.spec 2007-04-26 17:03:02.666179000 +0200
-@@ -36,7 +36,7 @@
- Group: Mail
- License: GPL
- Version: %{V_amavis}
--Release: 2.5.0
-+Release: 2.5.0_kolab
-
- # package options
- %option with_milter no
-@@ -46,6 +46,7 @@
- Source1: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/amavisd/amavislogsumm-%{V_logsumm}
- Source2: rc.amavisd
- Patch0: amavisd.patch
-+Patch1: undecipherable_subject.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -84,6 +85,7 @@
- %prep
- %setup -q -n amavisd-new-%{version}
- %patch -p0
-+ %patch -p0 -P 1
-
- %build
- %{l_shtool} subst \
diff --git a/amavisd/undecipherable_subject.patch b/amavisd/undecipherable_subject.patch
deleted file mode 100644
index 255bfd7..0000000
--- a/amavisd/undecipherable_subject.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- amavisd.orig 2006-10-19 05:25:38.000000000 +0200
-+++ amavisd 2006-10-19 05:47:08.000000000 +0200
-@@ -8078,7 +8078,7 @@ sub add_forwarding_header_edits_per_reci
- my($entity) = $msginfo->mime_entity;
- if (defined $entity && defined $entity->head->get('Subject',0)) {
- $hdr_edits->edit_header('Subject',
-- sub { $_[1]=~/^([ \t]?)(.*)\z/s; ' '.$subject_insert.$2 });
-+ sub { $_[1]=~/^([ \t]?)(.*)\z/s; my $subj = $2; $subj=~s/\Q$subject_insert\E//sg; ' '.$subject_insert.$subj });
- } else { # no Subject header field present, insert one
- $subject_insert =~ s/[ \t]+\z//; # trim
- $hdr_edits->append_header('Subject', $subject_insert);
diff --git a/apache/.cvsignore b/apache/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/apache/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/apache/Makefile b/apache/Makefile
deleted file mode 100644
index 2969561..0000000
--- a/apache/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/UPD
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=apache
-VERSION=1.3.33
-RELEASE=2.5.6
-KOLABRELEASE=2.5.6_kolab2
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-PATCHES = $(KOLABCVSDIR)/mod_auth_ldap.patch \
- $(KOLABCVSDIR)/../php/php-getacl-backport.patch \
- $(KOLABCVSDIR)/../php/php-imap-annotation.patch \
- $(KOLABCVSDIR)/../php/php-imap-status-current.patch
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(PATCHES) $(KOLABCVSDIR)/kolab.patch Makefile
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
- cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec \
- --define 'with_gdbm_ndbm no' \
- --define 'with_mod_auth_ldap yes' \
- --define 'with_mod_dav yes' \
- --define 'with_mod_php yes' \
- --define 'with_mod_php_zlib yes' \
- --define 'with_mod_php_bdb yes' \
- --define 'with_mod_php_gettext yes' \
- --define 'with_mod_php_imap yes' \
- --define 'with_mod_php_openldap yes' \
- --define 'with_mod_php_xml yes' \
- --define 'with_mod_php_dom yes' \
- --define 'with_mod_ssl yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp $(KOLABRPMSRC)/../PKG/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)-$(VERSION)*
diff --git a/apache/kolab.patch b/apache/kolab.patch
deleted file mode 100644
index dbaa483..0000000
--- a/apache/kolab.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- apache.spec.orig 2007-03-15 14:43:36.000000000 +0100
-+++ apache.spec 2007-03-15 14:47:40.000000000 +0100
-@@ -65,7 +65,7 @@ Class: BASE
- Group: Web
- License: ASF
- Version: %{V_apache}
--Release: 2.5.6
-+Release: 2.5.6_kolab2
-
- # package options (suexec related)
- %option with_suexec yes
-@@ -214,6 +214,10 @@ Patch1: apache.patch.modowa
- Patch2: apache.patch.php
- Patch3: http://www.hardened-php.net/hardening-patch-%{V_mod_php_hardened}.patch.gz
- Patch4: apache.patch.suphp
-+Patch5: mod_auth_ldap.patch
-+Patch6: php-getacl-backport.patch
-+Patch7: php-imap-annotation.patch
-+Patch8: php-imap-status-current.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -527,6 +531,9 @@ AutoReqProv: no
- %if "%{with_mod_php_hardened}" == "yes"
- %patch -p1 -P 3
- %endif
-+ %patch -p1 -P 6
-+ %patch -p1 -P 7
-+ %patch -p0 -P 8
- ) || exit $?
- %endif
- %if "%{with_mod_dav}" == "yes"
-@@ -561,6 +568,7 @@ AutoReqProv: no
- %endif
- %if "%{with_mod_auth_ldap}" == "yes"
- %setup -q -T -D -a 14
-+ %patch -p0 -P 5
- %endif
- %if "%{with_mod_auth_radius}" == "yes"
- %setup -q -T -D -a 15
-@@ -1129,6 +1137,7 @@ AutoReqProv: no
- %if "%{with_mod_dav}" == "yes"
- --activate-module=src/modules/dav/libdav.a \
- %endif
-+ --disable-module=auth_dbm \
- --disable-rule=EXPAT \
- %if "%{with_shared_core}" == "yes"
- --enable-rule=SHARED_CORE \
diff --git a/apache/mod_auth_ldap.patch b/apache/mod_auth_ldap.patch
deleted file mode 100644
index eb9c976..0000000
--- a/apache/mod_auth_ldap.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-diff -upr mod_auth_ldap.orig/mod_auth_ldap.c mod_auth_ldap/mod_auth_ldap.c
---- mod_auth_ldap.orig/mod_auth_ldap.c 2003-06-08 07:10:33.000000000 +0200
-+++ mod_auth_ldap/mod_auth_ldap.c 2004-10-13 03:17:52.000000000 +0200
-@@ -150,7 +150,8 @@ typedef struct _ldap_auth_config_rec
- char
- *ldap_server,
- *base_dn,
-- *uid_attr;
-+ *uid_attr,
-+ *uid_filter;
-
- char
- *user_dn;
-@@ -187,6 +188,7 @@ static void *create_ldap_auth_dir_config
- cr->bind_dn=NULL;
- cr->bind_pass=NULL;
- cr->uid_attr=ap_pstrdup(p,"uid");
-+ cr->uid_filter=ap_pstrdup(p,"(uid=%u)");
- cr->ldap_port=LDAP_PORT;
- cr->auth_ldapauthoritative=1; /* fortress is secure by default */
-
-@@ -239,6 +241,13 @@ static const char *set_uid_attr(cmd_parm
- return (NULL);
- }
-
-+static const char *set_uid_filter(cmd_parms *cmd,ldap_auth_config_rec *cr,
-+ char *arg)
-+{
-+ cr->uid_filter=ap_pstrdup(cmd->pool,arg);
-+ return (NULL);
-+}
-+
- static const char *set_ldapauthoritative(cmd_parms *cmd,ldap_auth_config_rec
- *cr,char *arg)
- {
-@@ -292,6 +301,7 @@ static const command_rec ldap_auth_cmds[
- {"LDAP_Port", set_ldap_port, NULL,OR_AUTHCFG,TAKE1,"LDAP port"},
- {"Base_DN", set_base_dn, NULL,OR_AUTHCFG,TAKE1,"Base DN"},
- {"UID_Attr", set_uid_attr, NULL,OR_AUTHCFG,TAKE1,"uid"},
-+ {"UID_Filter", set_uid_filter, NULL,OR_AUTHCFG,TAKE1,"Search Filter"},
- {"Bind_DN", set_bind_dn, NULL,OR_AUTHCFG,TAKE1,"Bind DN"},
- {"Bind_Pass", set_bind_pass, NULL,OR_AUTHCFG,TAKE1,"Bind Password"},
- {"AuthLDAPAuthoritative",set_ldapauthoritative,NULL,OR_AUTHCFG,TAKE1,
-@@ -300,13 +310,52 @@ static const command_rec ldap_auth_cmds[
- };
-
- /*
-+** buildLdapFilter()
-+** return 0 on error, nonzero on success
-+**
-+** Parameters:
-+** char *szfilter A pointer to a buffer for storing the filter
-+** size_t *len The size of szfilter
-+** char *uid_filter LDAP filter to use with userid, e.g. "(|(uid=%u)(mail=%u))"
-+** char *userid the userid to replace %u with
-+*/
-+static int buildLdapFilter( char* szfilter, size_t len,
-+ char* uid_filter, char* userid )
-+{
-+ char* p1;
-+ char* p2;
-+ size_t s = 0;
-+
-+ szfilter[0] = 0;
-+ p1 = uid_filter;
-+ while( (p2=strstr(p1,"%u")) ) {
-+ size_t d = p2-p1;
-+ s += d;
-+ s += strlen(userid);
-+ if( s > len-1 ) {
-+ /* about to overflow, just be safe and abort */
-+ return 0;
-+ }
-+ strncat( szfilter, p1, d );
-+ strcat( szfilter, userid );
-+ p1 = p2+2;
-+ }
-+ if( s+strlen(p1) > len-1 ) {
-+ /* about to overflow, just be safe and abort */
-+ return 0;
-+ }
-+ strcat( szfilter, p1 );
-+ return 1;
-+}
-+
-+/*
- ** ldapFindUserDN()
- ** return the DN of the user
- **
- ** Parameters:
- ** LDAP *ld valid handle to LDAP
- ** char *base_dn LDAP base Distinguised Name
--** char *uid_attrib LDAP uid attribute, e.g. "uid"
-+** char *uid_filter LDAP filter to use with userid, e.g. "(|(uid=%u)(mail=%u))"
- ** char *userid the userid to check
- ** request_rect *r needed for writing log in Win2K
- ** char *bind_dn Bind_DN, can be NULL
-@@ -327,7 +376,7 @@ static const command_rec ldap_auth_cmds[
- ** mhttpd
- ** muquit@muquit.com Mar-15-2001 bind with bind and pass if provided.
- */
--static char *ldapFindUserDN(LDAP *ld,char *base_dn,char *uid_attrib,
-+static char *ldapFindUserDN(LDAP *ld,char *base_dn,char *uid_filter,
- char *userid,request_rec *r,char *bind_dn,char *bind_pass)
- {
- int
-@@ -349,8 +398,12 @@ static char *ldapFindUserDN(LDAP *ld,cha
- entry=(LDAPMessage *) NULL;
- dn=(char *) NULL;
-
-- /* prepare filter with UidAttr. */
-- ap_snprintf(szfilter,sizeof(szfilter)-1,"(%s=%s)",uid_attrib,userid);
-+ /* prepare filter with UidFilter. */
-+ if( !buildLdapFilter( szfilter, sizeof(szfilter), uid_filter, userid ) ) {
-+ ap_log_rerror(APLOG_MARK,APLOG_NOERRNO | APLOG_ERR,r,
-+ "[mod_auth_ldap.c] - Error: LDAP filter \"%s\" too long", uid_filter);
-+ return(NULL);
-+ }
-
- #ifdef DEBUG_LDAP
- ap_log_rerror(APLOG_MARK,APLOG_NOERRNO | APLOG_ERR,r,
-@@ -423,6 +476,8 @@ static char *ldapFindUserDN(LDAP *ld,cha
- /* note: ldap_err2string() returns pointer to a static space */
- ap_log_rerror(APLOG_MARK,APLOG_NOERRNO | APLOG_ERR,r,
- "[mod_auth_ldap.c] - Error: %s",ldap_err2string(rc));
-+ ap_log_rerror(APLOG_MARK,APLOG_NOERRNO | APLOG_ERR,r,
-+ "[mod_auth_ldap.c] - Error: Filter was \"%s\"",szfilter);
- return (NULL);
- }
-
-@@ -457,7 +512,7 @@ static char *ldapFindUserDN(LDAP *ld,cha
-
- #ifdef DEBUG_LDAP
- ap_log_rerror(APLOG_MARK,APLOG_NOERRNO | APLOG_ERR,r,
-- "[mod_auth_ldap.c] - %s=%s Unknown in LDAP server",uid_attrib,userid);
-+ "[mod_auth_ldap.c] - %s Unknown in LDAP server",szfilter);
- #endif /* DEBUG_LDAP */
-
- if (result != (LDAPMessage *) NULL)
-@@ -689,13 +744,13 @@ static int ldap_authenticate_basic_user(
-
-
- /* now get the User DN */
-- dn=ldapFindUserDN(cr->ld,cr->base_dn,cr->uid_attr,c->user,r,
-+ dn=ldapFindUserDN(cr->ld,cr->base_dn,cr->uid_filter,c->user,r,
- cr->bind_dn,cr->bind_pass);
- if (dn == (char *) NULL)
- {
- #ifdef DEBUG_LDAP
- ap_log_rerror(APLOG_MARK,APLOG_NOERRNO | APLOG_ERR,r,
-- "[mod_auth_ldap.c] - ldapFindUserDN() didn't return any DN for user \"%s\" with attr \"%s\"",c->user,cr->uid_attr);
-+ "[mod_auth_ldap.c] - ldapFindUserDN() didn't return any DN for user \"%s\" with filter \"%s\"",c->user,cr->uid_filter);
- #endif /* DEBUG_LDAP */
-
- /* pass control to lower modules if AuthLDAPAuthoritative=no */
-Kun i mod_auth_ldap: mod_auth_ldap.c~
diff --git a/clamav/.cvsignore b/clamav/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/clamav/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/clamav/Makefile b/clamav/Makefile
deleted file mode 100644
index b68b7df..0000000
--- a/clamav/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/current/SRC/EVAL/
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=clamav
-VERSION=0.90.3
-RELEASE=20070531
-KOLABRELEASE=20070531_kolab
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm kolab.patch
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp -p $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)-$(VERSION)
diff --git a/clamav/kolab.patch b/clamav/kolab.patch
deleted file mode 100644
index a43f740..0000000
--- a/clamav/kolab.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- clamav.spec.orig 2007-02-23 11:30:31.000000000 +0100
-+++ clamav.spec 2007-02-23 11:30:59.000000000 +0100
-@@ -33,7 +33,7 @@ Class: EVAL
- Group: AntiVirus
- License: GPL
- Version: 0.90.3
--Release: 20070531
-+Release: 20070531_kolab
-
- # package options
- %option with_milter no
-@@ -46,8 +46,8 @@ Patch0: clamav.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
--BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, bzip2, pkgconfig, bc
--PreReq: OpenPKG, openpkg >= 20060823
-+BuildPreReq: OpenPKG, openpkg >= 2.4.3, gcc, bzip2, pkgconfig, bc
-+PreReq: OpenPKG, openpkg >= 2.4.3
- BuildPreReq: zlib, bzip2, curl, gmp, libiconv, openssl
- PreReq: zlib, bzip2, curl, gmp, libiconv, openssl
- %if "%{with_milter}" == "yes"
diff --git a/db/Makefile b/db/Makefile
deleted file mode 100644
index 7446737..0000000
--- a/db/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/current/SRC
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-all:
- rpm -i $(KOLABPKGURI)/db-4.1.25.1-20030605.src.rpm
- cd $(KOLABRPMSRC)/db && patch < $(KOLABCVSDIR)/server/db/kolab.patch && rpm -bb db.spec
-
-clean:
- rm -rf /kolab/RPM/TMP/db* db* patch.*
diff --git a/db/kolab.patch b/db/kolab.patch
deleted file mode 100644
index 7b07639..0000000
--- a/db/kolab.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- db.spec.orig 2003-05-18 10:42:17.000000000 +0200
-+++ db.spec 2003-05-18 10:55:00.000000000 +0200
-@@ -106,6 +106,11 @@
- rm -f $RPM_BUILD_ROOT%{l_prefix}/include/db_cxx.h
- rm -f $RPM_BUILD_ROOT%{l_prefix}/include/cxx_*.h
- %endif
-+ (cd $RPM_BUILD_ROOT%{l_prefix}/lib
-+ for alias in libdb-41.a libdb-4.1.a libdb41.a libdb-4-1.a libdb-4.a libdb4.a libdb4.1.a; do
-+ ln -s libdb.a ${alias}
-+ done
-+ )
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
-
- %files -f files
diff --git a/file/.cvsignore b/file/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/file/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/file/Makefile b/file/Makefile
deleted file mode 100644
index a037213..0000000
--- a/file/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=file
-VERSION=4.15
-RELEASE=2.5.0
-KOLABRELEASE=2.5.0_kolab2
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm kolab-filemagic.patch file-cve-2007-1536.patch kolab.patch
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(KOLABCVSDIR)/kolab-filemagic.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cp $(KOLABCVSDIR)/file-cve-2007-1536.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for file.spec
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp -p $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)-$(VERSION)
diff --git a/file/file-cve-2007-1536.patch b/file/file-cve-2007-1536.patch
deleted file mode 100644
index 1031b43..0000000
--- a/file/file-cve-2007-1536.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-diff -urN file-4.15.orig/src/file.h file-4.15/src/file.h
---- file-4.15.orig/src/file.h 2005-07-29 19:57:20.000000000 +0200
-+++ file-4.15/src/file.h 2007-04-17 12:57:57.976179000 +0200
-@@ -234,7 +234,7 @@
- /* Accumulation buffer */
- char *buf;
- char *ptr;
-- size_t len;
-+ size_t left;
- size_t size;
- /* Printable buffer */
- char *pbuf;
-diff -urN file-4.15.orig/src/funcs.c file-4.15/src/funcs.c
---- file-4.15.orig/src/funcs.c 2005-07-12 22:05:38.000000000 +0200
-+++ file-4.15/src/funcs.c 2007-04-17 12:57:57.976179000 +0200
-@@ -26,6 +26,7 @@
- */
- #include "file.h"
- #include "magic.h"
-+#include <assert.h>
- #include <stdarg.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -46,27 +47,31 @@
- file_printf(struct magic_set *ms, const char *fmt, ...)
- {
- va_list ap;
-- size_t len;
-+ size_t len, size;
- char *buf;
-
- va_start(ap, fmt);
-
-- if ((len = vsnprintf(ms->o.ptr, ms->o.len, fmt, ap)) >= ms->o.len) {
-+ if ((len = vsnprintf(ms->o.ptr, ms->o.left, fmt, ap)) >= ms->o.left) {
-+ long diff; /* XXX: really ptrdiff_t */
-+
- va_end(ap);
-- if ((buf = realloc(ms->o.buf, len + 1024)) == NULL) {
-+ size = (ms->o.size - ms->o.left) + len + 1024;
-+ if ((buf = realloc(ms->o.buf, size)) == NULL) {
- file_oomem(ms);
- return -1;
- }
-- ms->o.ptr = buf + (ms->o.ptr - ms->o.buf);
-+ diff = ms->o.ptr - ms->o.buf;
-+ ms->o.ptr = buf + diff;
- ms->o.buf = buf;
-- ms->o.len = ms->o.size - (ms->o.ptr - ms->o.buf);
-- ms->o.size = len + 1024;
-+ ms->o.left = size - diff;
-+ ms->o.size = size;
-
- va_start(ap, fmt);
-- len = vsnprintf(ms->o.ptr, ms->o.len, fmt, ap);
-+ len = vsnprintf(ms->o.ptr, ms->o.left, fmt, ap);
- }
- ms->o.ptr += len;
-- ms->o.len -= len;
-+ ms->o.left -= len;
- va_end(ap);
- return 0;
- }
-@@ -155,8 +160,8 @@
- protected const char *
- file_getbuffer(struct magic_set *ms)
- {
-- char *nbuf, *op, *np;
-- size_t nsize;
-+ char *pbuf, *op, *np;
-+ size_t psize, len;
-
- if (ms->haderr)
- return NULL;
-@@ -164,14 +169,17 @@
- if (ms->flags & MAGIC_RAW)
- return ms->o.buf;
-
-- nsize = ms->o.len * 4 + 1;
-- if (ms->o.psize < nsize) {
-- if ((nbuf = realloc(ms->o.pbuf, nsize)) == NULL) {
-+ len = ms->o.size - ms->o.left;
-+ /* * 4 is for octal representation, + 1 is for NUL */
-+ psize = len * 4 + 1;
-+ assert(psize > len);
-+ if (ms->o.psize < psize) {
-+ if ((pbuf = realloc(ms->o.pbuf, psize)) == NULL) {
- file_oomem(ms);
- return NULL;
- }
-- ms->o.psize = nsize;
-- ms->o.pbuf = nbuf;
-+ ms->o.psize = psize;
-+ ms->o.pbuf = pbuf;
- }
-
- for (np = ms->o.pbuf, op = ms->o.buf; *op; op++) {
-diff -urN file-4.15.orig/src/magic.c file-4.15/src/magic.c
---- file-4.15.orig/src/magic.c 2005-06-30 18:33:01.000000000 +0200
-+++ file-4.15/src/magic.c 2007-04-17 12:57:57.966179000 +0200
-@@ -89,7 +89,7 @@
- goto free1;
- }
-
-- ms->o.ptr = ms->o.buf = malloc(ms->o.size = 1024);
-+ ms->o.ptr = ms->o.buf = malloc(ms->o.left = ms->o.size = 1024);
- if (ms->o.buf == NULL)
- goto free1;
-
-@@ -101,7 +101,6 @@
- if (ms->c.off == NULL)
- goto free3;
-
-- ms->o.len = 0;
- ms->haderr = 0;
- ms->error = -1;
- ms->mlist = NULL;
diff --git a/file/kolab.patch b/file/kolab.patch
deleted file mode 100644
index e90efec..0000000
--- a/file/kolab.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- file.spec.orig 2005-10-11 14:46:18.000000000 +0200
-+++ file.spec 2007-04-17 13:01:28.276179000 +0200
-@@ -37,7 +37,7 @@
- Group: Filesystem
- License: BSD
- Version: %{V_api_c}
--Release: 2.5.0
-+Release: 2.5.0_kolab2
-
- # package options
- %option with_perl no
-@@ -46,6 +46,10 @@
- Source0: ftp://ftp.astron.com/pub/file/file-%{V_api_c}.tar.gz
- Source1: http://www.cpan.org/modules/by-module/File/File-LibMagic-%{V_api_pl}.tgz
-
-+# list of patches
-+Patch0: kolab-filemagic.patch
-+Patch1: file-cve-2007-1536.patch
-+
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
-@@ -79,6 +83,8 @@
- %prep
- %setup -q
- %setup -q -D -T -a 1
-+ %patch -p0 -P 0
-+ %patch -p1 -P 1
-
- %build
- ACLOCAL=true \
diff --git a/imap/.cvsignore b/imap/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/imap/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/imap/Makefile b/imap/Makefile
deleted file mode 100644
index bd2e084..0000000
--- a/imap/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=imap
-VERSION=2004g
-RELEASE=2.5.0
-KOLABRELEASE=2.5.0_kolab
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-PATCHES=$(KOLABCVSDIR)/imap.annotate.patch
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm kolab.patch Makefile
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
- cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/ # Patch to add annotate support
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for imap.spec
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_annotate yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-imap-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/imap-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp -p $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/imap-*
diff --git a/imap/README b/imap/README
deleted file mode 100644
index a180a3b..0000000
--- a/imap/README
+++ /dev/null
@@ -1,12 +0,0 @@
-maintain patches for the openpkg imap source rpm
-
-to build imap for kolab run make
-
-Patches maintained here:
-========================
-
-imap_annotation.patch: Add support for IMAP annotations to UW library.
- This patch already committed upstream
-
-kolab.patch: Patch to the OpenPKG specfile
- Needs be send upstream to the OpenPKG people
diff --git a/imap/imap.annotate.patch b/imap/imap.annotate.patch
deleted file mode 100644
index 5173fc6..0000000
--- a/imap/imap.annotate.patch
+++ /dev/null
@@ -1,445 +0,0 @@
-diff -u -r imap-2004d/src/c-client/imap4r1.c imap-2004d.annotation/src/c-client/imap4r1.c
---- imap-2004d/src/c-client/imap4r1.c 2005-04-09 01:43:31.000000000 +0200
-+++ imap-2004d.annotation/src/c-client/imap4r1.c 2005-06-06 11:20:05.490904844 +0200
-@@ -125,7 +125,8 @@
- #define MULTIAPPEND 13
- #define SNLIST 14
- #define MULTIAPPENDREDO 15
--
-+#define QLIST 16
-+#define QSTRING 17
-
- /* Append data */
-
-@@ -195,12 +196,15 @@
- void imap_gc_body (BODY *body);
- void imap_capability (MAILSTREAM *stream);
- long imap_acl_work (MAILSTREAM *stream,char *command,IMAPARG *args[]);
-+long imap_annotation_work (MAILSTREAM *stream,char *command,IMAPARG *args[]);
-
- IMAPPARSEDREPLY *imap_send (MAILSTREAM *stream,char *cmd,IMAPARG *args[]);
- IMAPPARSEDREPLY *imap_sout (MAILSTREAM *stream,char *tag,char *base,char **s);
- long imap_soutr (MAILSTREAM *stream,char *string);
- IMAPPARSEDREPLY *imap_send_astring (MAILSTREAM *stream,char *tag,char **s,
- SIZEDTEXT *as,long wildok,char *limit);
-+IMAPPARSEDREPLY *imap_send_qstring (MAILSTREAM *stream,char *tag,char **s,
-+ SIZEDTEXT *as,char *limit);
- IMAPPARSEDREPLY *imap_send_literal (MAILSTREAM *stream,char *tag,char **s,
- STRING *st);
- IMAPPARSEDREPLY *imap_send_spgm (MAILSTREAM *stream,char *tag,char *base,
-@@ -2677,6 +2681,84 @@
- args[0] = &ambx; args[1] = NIL;
- return imap_acl_work (stream,"GETACL",args);
- }
-+
-+/* IMAP set annotation
-+ * Accepts: mail stream
-+ * annotation struct
-+ * Returns: T on success, NIL on failure
-+ */
-+
-+long imap_setannotation (MAILSTREAM *stream,ANNOTATION *annotation)
-+{
-+ IMAPARG *args[4],ambx,apth,aval;
-+ long ret;
-+
-+ ambx.type = ASTRING;
-+ ambx.text = (void *) annotation->mbox;
-+ args[0] = &ambx;
-+
-+ apth.type = QSTRING;
-+ apth.text = (void *) annotation->entry;
-+ args[1] = &apth;
-+
-+ STRINGLIST *st,*l;
-+ ANNOTATION_VALUES *v;
-+
-+ l = st = mail_newstringlist();
-+ v = annotation->values;
-+ while(v){
-+ l->text.size = strlen((char *) (l->text.data = (unsigned char*)cpystr(v->attr)));
-+ l->next = mail_newstringlist();
-+ l = l->next;
-+ l->text.size = strlen((char *) (l->text.data = (unsigned char*)cpystr(v->value)));
-+ if(v->next){
-+ l->next = mail_newstringlist();
-+ l = l->next;
-+ }
-+ v = v->next;
-+ }
-+
-+ aval.type = QLIST;
-+ aval.text = (void *)st;
-+ args[2] = &aval;
-+ args[3] = NIL;
-+
-+ ret = imap_annotation_work(stream, "SETANNOTATION",args);
-+ mail_free_stringlist(&st);
-+ return ret;
-+}
-+
-+
-+
-+/* IMAP get annotation
-+ * Accepts: mail stream
-+ * mailbox name
-+ * annotation entry list
-+ * annotation attribute list
-+ * Returns: T on success with data returned via callback, NIL on failure
-+ */
-+
-+long imap_getannotation (MAILSTREAM *stream,char *mailbox,STRINGLIST *entries, STRINGLIST *attributes)
-+{
-+ IMAPARG *args[4],ambx,apth,aattr;
-+ long ret;
-+ ambx.type = ASTRING;
-+ ambx.text = (void*) mailbox;
-+ args[0] = &ambx;
-+
-+
-+ apth.type = QLIST;
-+ apth.text = (void*) entries;
-+ args[1] = &apth;
-+
-+ aattr.type = QLIST;
-+ aattr.text = (void*) attributes;
-+ args[2] = &aattr;
-+
-+ args[3] = NIL;
-+ ret = imap_annotation_work(stream, "GETANNOTATION",args);
-+ return ret;
-+}
-
- /* IMAP list rights
- * Accepts: mail stream
-@@ -2729,6 +2811,16 @@
- else mm_log ("ACL not available on this IMAP server",ERROR);
- return ret;
- }
-+ long imap_annotation_work(MAILSTREAM *stream, char *command,IMAPARG *args[])
-+{
-+ long ret = NIL;
-+ IMAPPARSEDREPLY *reply;
-+ if (imap_OK (stream,reply = imap_send (stream,command,args)))
-+ ret = LONGT;
-+ else mm_log (reply->text,ERROR);
-+ return ret;
-+}
-+
-
- /* IMAP set quota
- * Accepts: mail stream
-@@ -2861,6 +2953,11 @@
- if (reply = imap_send_astring (stream,tag,&s,&st,NIL,CMDBASE+MAXCOMMAND))
- return reply;
- break;
-+ case QSTRING: /* atom or string, must be literal? */
-+ st.size = strlen ((char *) (st.data = (unsigned char *) arg->text));
-+ if (reply = imap_send_qstring (stream,tag,&s,&st,CMDBASE+MAXCOMMAND))
-+ return reply;
-+ break;
- case LITERAL: /* literal, as a stringstruct */
- if (reply = imap_send_literal (stream,tag,&s,arg->text)) return reply;
- break;
-@@ -2877,6 +2974,18 @@
- while (list = list->next);
- *s++ = ')'; /* close list */
- break;
-+ case QLIST: /* list of strings */
-+ list = (STRINGLIST *) arg->text;
-+ c = '('; /* open paren */
-+ do { /* for each list item */
-+ *s++ = c; /* write prefix character */
-+ if (reply = imap_send_qstring (stream,tag,&s,&list->text,
-+ CMDBASE+MAXCOMMAND)) return reply;
-+ c = ' '; /* prefix character for subsequent strings */
-+ }
-+ while (list = list->next);
-+ *s++ = ')'; /* close list */
-+ break;
- case SEARCHPROGRAM: /* search program */
- if (reply = imap_send_spgm (stream,tag,CMDBASE,&s,arg->text,
- CMDBASE+MAXCOMMAND))
-@@ -3044,6 +3153,32 @@
- mail_unlock (stream); /* unlock stream */
- return reply;
- }
-+
-+/* IMAP send quoted-string
-+ * Accepts: MAIL stream
-+ * reply tag
-+ * pointer to current position pointer of output bigbuf
-+ * atom-string to output
-+ * maximum to write as atom or qstring
-+ * Returns: error reply or NIL if success
-+ */
-+
-+IMAPPARSEDREPLY *imap_send_qstring (MAILSTREAM *stream,char *tag,char **s,
-+ SIZEDTEXT *as,char *limit)
-+{
-+ unsigned long j;
-+ char c;
-+ STRING st;
-+ /* in case needed */
-+ INIT (&st,mail_string,(void *) as->data,as->size);
-+ /* always write literal if no space */
-+ if ((*s + as->size) > limit) return imap_send_literal (stream,tag,s,&st);
-+
-+ *(*s)++ = '"'; /* write open quote */
-+ for (j = 0; j < as->size; j++) *(*s)++ = as->data[j];
-+ *(*s)++ = '"'; /* write close quote */
-+ return NIL;
-+}
-
- /* IMAP send atom-string
- * Accepts: MAIL stream
-@@ -3949,6 +4084,50 @@
- }
- }
-
-+ else if (!strcmp (reply->key,"ANNOTATION") && (s = reply->text)){
-+ char * mbox;
-+ /* response looks like ANNOTATION "mailbox" "entry" ("attr" "value" ["attr" "value"]) ["entry" ("attr "value" ["attr" "value"] )]*/
-+ getannotation_t an = (getannotation_t) mail_parameters (NIL,GET_ANNOTATION,NIL);
-+
-+ mbox = imap_parse_astring (stream, &s, reply,NIL);
-+
-+ while(*s){
-+ ANNOTATION * al = mail_newannotation();
-+ al->mbox = cpystr(mbox);
-+ t = imap_parse_astring (stream, &s, reply,NIL);
-+ al->entry = t;
-+ STRINGLIST *strlist;
-+ if (s){while (*s == ' ')s++;}
-+
-+ strlist = imap_parse_stringlist(stream, &s,reply);
-+
-+ ANNOTATION_VALUES *vlIter, *vlBegin;
-+ vlIter = vlBegin = NIL;
-+ if (strlist) {
-+ while(strlist){
-+ if(vlIter){
-+ vlIter->next = mail_newannotationvalue();
-+ vlIter = vlIter->next;
-+ }else{
-+ vlIter = mail_newannotationvalue();
-+ vlBegin = vlIter;
-+ }
-+ if ( strlist->text.size )
-+ vlIter->attr = cpystr (strlist->text.data);
-+ strlist = strlist->next;
-+ if(!strlist) continue;
-+ if ( strlist->text.size )
-+ vlIter->value = cpystr (strlist->text.data);
-+ strlist = strlist->next;
-+ }
-+ }
-+ al->values = vlBegin;
-+ if (an)
-+ (*an) (stream,al);
-+ mail_free_annotation(&al);
-+ }
-+ fs_give ((void **)&mbox);
-+ }
- else if (!strcmp (reply->key,"ACL") && (s = reply->text) &&
- (t = imap_parse_astring (stream,&s,reply,NIL))) {
- getacl_t ar = (getacl_t) mail_parameters (NIL,GET_ACL,NIL);
-diff -u -r imap-2004d/src/c-client/imap4r1.h imap-2004d.annotation/src/c-client/imap4r1.h
---- imap-2004d/src/c-client/imap4r1.h 2005-04-07 20:36:52.000000000 +0200
-+++ imap-2004d.annotation/src/c-client/imap4r1.h 2005-06-06 11:20:05.491904694 +0200
-@@ -232,3 +232,5 @@
- long imap_setquota (MAILSTREAM *stream,char *qroot,STRINGLIST *limits);
- long imap_getquota (MAILSTREAM *stream,char *qroot);
- long imap_getquotaroot (MAILSTREAM *stream,char *mailbox);
-+long imap_getannotation (MAILSTREAM *stream,char *mailbox,STRINGLIST *entries,STRINGLIST *attributes);
-+long imap_setannotation (MAILSTREAM *stream,ANNOTATION *annotation);
-diff -u -r imap-2004d/src/c-client/mail.c imap-2004d.annotation/src/c-client/mail.c
---- imap-2004d/src/c-client/mail.c 2005-03-17 01:10:18.000000000 +0100
-+++ imap-2004d.annotation/src/c-client/mail.c 2005-06-06 11:20:05.497903794 +0200
-@@ -60,6 +60,7 @@
- static newsrcquery_t mailnewsrcquery = NIL;
- /* ACL results callback */
- static getacl_t mailaclresults = NIL;
-+static getannotation_t mailannotationresults = NIL;
- /* list rights results callback */
- static listrights_t maillistrightsresults = NIL;
- /* my rights results callback */
-@@ -516,6 +517,11 @@
- ret = (void *) (debugsensitive ? VOIDT : NIL);
- break;
-
-+ case SET_ANNOTATION:
-+ mailannotationresults = (getannotation_t) value;
-+ case GET_ANNOTATION:
-+ ret = (void *) mailannotationresults;
-+ break;
- case SET_ACL:
- mailaclresults = (getacl_t) value;
- case GET_ACL:
-@@ -5487,7 +5493,15 @@
- return (ACLLIST *) memset (fs_get (sizeof (ACLLIST)),0,sizeof (ACLLIST));
- }
-
-+ANNOTATION *mail_newannotation (void)
-+{
-+ return (ANNOTATION *) memset (fs_get (sizeof (ANNOTATION)),0,sizeof(ANNOTATION));
-+}
-
-+ANNOTATION_VALUES *mail_newannotationvalue (void)
-+{
-+ return (ANNOTATION_VALUES *) memset (fs_get (sizeof (ANNOTATION_VALUES)),0,sizeof(ANNOTATION_VALUES));
-+}
- /* Mail instantiate new quotalist
- * Returns: new quotalist
- */
-@@ -5810,6 +5824,25 @@
- }
- }
-
-+static void mail_free_annotation_values(ANNOTATION_VALUES **val)
-+{
-+ if (*val) {
-+ if ((*val)->attr) fs_give ((void**) &(*val)->attr);
-+ if ((*val)->value) fs_give ((void**) &(*val)->value);
-+ mail_free_annotation_values (&(*val)->next);
-+ fs_give ((void **) val);
-+ }
-+}
-+void mail_free_annotation(ANNOTATION **al)
-+{
-+ if (*al) {
-+ if((*al)->mbox) fs_give ((void**) &(*al)->mbox);
-+ if((*al)->entry) fs_give ((void**) &(*al)->entry);
-+ if((*al)->values)
-+ mail_free_annotation_values(&(*al)->values);
-+ fs_give ((void **) al);
-+ }
-+}
-
- /* Mail garbage collect quotalist
- * Accepts: pointer to quotalist pointer
-diff -u -r imap-2004d/src/c-client/mail.h imap-2004d.annotation/src/c-client/mail.h
---- imap-2004d/src/c-client/mail.h 2005-01-22 00:56:21.000000000 +0100
-+++ imap-2004d.annotation/src/c-client/mail.h 2005-06-06 11:20:05.500903345 +0200
-@@ -311,6 +311,8 @@
- #define SET_SNARFPRESERVE (long) 567
- #define GET_INBOXPATH (long) 568
- #define SET_INBOXPATH (long) 569
-+#define GET_ANNOTATION (long) 570
-+#define SET_ANNOTATION (long) 571
-
- /* Driver flags */
-
-@@ -978,6 +980,24 @@
- ACLLIST *next;
- };
-
-+/* ANNOTATION Response */
-+
-+#define ANNOTATION_VALUES struct annotation_value_list
-+
-+ANNOTATION_VALUES {
-+ char *attr;
-+ char *value;
-+ ANNOTATION_VALUES *next;
-+};
-+
-+#define ANNOTATION struct annotation
-+
-+ANNOTATION {
-+ char *mbox;
-+ char *entry;
-+ ANNOTATION_VALUES * values;
-+};
-+
- /* Quota resource list */
-
- #define QUOTALIST struct quota_list
-@@ -1262,6 +1282,7 @@
- typedef long (*sslcertificatequery_t) (char *reason,char *host,char *cert);
- typedef void (*sslfailure_t) (char *host,char *reason,unsigned long flags);
- typedef void (*logouthook_t) (void *data);
-+typedef void (*getannotation_t) (MAILSTREAM *stream,ANNOTATION* annot);
-
- /* Globals */
-
-@@ -1671,7 +1692,10 @@
- SORTPGM *mail_newsortpgm (void);
- THREADNODE *mail_newthreadnode (SORTCACHE *sc);
- ACLLIST *mail_newacllist (void);
-+ANNOTATION* mail_newannotation(void);
-+ANNOTATION_VALUES* mail_newannotationvalue(void);
- QUOTALIST *mail_newquotalist (void);
-+void mail_free_annotation(ANNOTATION **a);
- void mail_free_body (BODY **body);
- void mail_free_body_data (BODY *body);
- void mail_free_body_parameter (PARAMETER **parameter);
-diff -u -r imap-2004d/src/mtest/mtest.c imap-2004d.annotation/src/mtest/mtest.c
---- imap-2004d/src/mtest/mtest.c 2005-04-07 20:37:44.000000000 +0200
-+++ imap-2004d.annotation/src/mtest/mtest.c 2005-06-06 11:20:05.502903045 +0200
-@@ -137,6 +137,8 @@
- #endif
- return NIL;
- }
-+
-+void mm_annotation (MAILSTREAM *stream, ANNOTATION *a);
-
- /* MM command loop
- * Accepts: MAIL stream
-@@ -187,6 +189,28 @@
- mail_setflag (stream,arg,"\\DELETED");
- else puts ("?Bad message number");
- break;
-+ case 'A':
-+ {
-+ char parms[MAILTMPLEN];
-+ prompt("Annotation: ",parms);
-+ if (parms) {
-+ mail_parameters(stream,SET_ANNOTATION,mm_annotation);
-+ STRINGLIST *entries = mail_newstringlist();
-+ STRINGLIST *cur = entries;
-+ cur->text.size = strlen((char *) (cur->text.data = (unsigned char*)cpystr (parms)));
-+ cur->next = NIL;
-+
-+ STRINGLIST *attributes = mail_newstringlist();
-+ cur = attributes;
-+ cur->text.size = strlen((char *) (cur->text.data = (unsigned char*)cpystr ("*")));
-+ cur->next = NIL;
-+
-+ imap_getannotation(stream,"INBOX",entries,attributes);
-+ mail_free_stringlist(&entries);
-+ mail_free_stringlist(&attributes);
-+ }
-+ }
-+ break;
- case 'E': /* Expunge command */
- mail_expunge (stream);
- last = 0;
-@@ -339,7 +363,7 @@
- case '?': /* ? command */
- puts ("Body, Check, Delete, Expunge, Find, GC, Headers, Literal,");
- puts (" MailboxStatus, New Mailbox, Overview, Ping, Quit, Send, Type,");
-- puts ("Undelete, Xit, +, -, or <RETURN> for next message");
-+ puts ("Undelete, Xit,Annotation, +, -, or <RETURN> for next message");
- break;
- default: /* bogus command */
- printf ("?Unrecognized command: %s\n",cmd);
-@@ -587,6 +611,18 @@
-
- /* Interfaces to C-client */
-
-+void mm_annotation (MAILSTREAM *stream, ANNOTATION *a)
-+{
-+ if(a){
-+ fprintf(stderr,"mailbox: %s\nentry: %s\n",a->mbox,a->entry);
-+ ANNOTATION_VALUES * v = a->values;
-+ while(v){
-+ fprintf(stderr,"attr: %s, value: %s\n",v->attr,v->value);
-+ v = v->next;
-+ }
-+ }
-+}
-+
-
- void mm_searched (MAILSTREAM *stream,unsigned long number)
- {
diff --git a/imap/kolab.patch b/imap/kolab.patch
deleted file mode 100644
index 5afa68e..0000000
--- a/imap/kolab.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- imap.spec.orig Wed Dec 7 18:17:59 2005
-+++ imap.spec Wed Dec 7 18:17:59 2005
-@@ -37,16 +37,18 @@
- Group: Mail
- License: University of Washington's Free-Fork License
- Version: %{V_here}
--Release: 2.5.0
-+Release: 2.5.0_kolab
-
- # package options
- %option with_ssl yes
- %option with_pam no
- %option with_daemons no
- %option with_mbxdef no
-+%option with_annotate no
-
- # list of sources
- Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z
-+Patch0: imap.annotate.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -80,6 +82,10 @@
-
- %prep
- %setup -q -n imap-%{V_real}
-+
-+%if "%{with_annotate}" == "yes"
-+ %patch -p1 -P 0
-+%endif
-
- %build
- mflags="%{l_mflags}"
diff --git a/imapd/.cvsignore b/imapd/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/imapd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/imapd/Makefile b/imapd/Makefile
deleted file mode 100644
index 62d96d4..0000000
--- a/imapd/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=imapd
-VERSION=2.2.12
-RELEASE=2.5.0
-KOLABRELEASE=2.5.0_kolab2
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-PATCHES=$(KOLABCVSDIR)/cyradm.annotate.patch \
- $(KOLABCVSDIR)/imapd.annotate.patch \
- $(KOLABCVSDIR)/imapd.morelogging.patch \
- $(KOLABCVSDIR)/imapd.group2.patch \
- $(KOLABCVSDIR)/imapd-goodchars.patch \
- $(KOLABCVSDIR)/imapd.folderchar.patch \
- $(KOLABCVSDIR)/kolab-ldap.patch
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(KOLABCVSDIR)/kolab.patch $(PATCHES) Makefile
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/
-
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for imapd.spec
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_group yes' --define 'with_atvdom yes' --define 'with_annotate yes' --define 'with_ldap yes' --define 'with_goodchars yes' --define 'with_morelogging yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-imapd-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/imapd-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/cyrus-imapd* cyrus* imapd* rc.imapd vhosthack.patch fsl.imapd groupfile.patch $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
diff --git a/imapd/README b/imapd/README
deleted file mode 100644
index ef7c124..0000000
--- a/imapd/README
+++ /dev/null
@@ -1,12 +0,0 @@
-for a short time, maintain a patch for the openpkg source rpm
-
-to build imapd for kolab run make
-
-Patches maintained here:
-========================
-
-imapd.annotate.patch: Allow for custom annotation.
-imapd.group2.patch: Patch based on OpenPKG Patch: compare groupnames case insensitively
-imapd-murder.patch: Patch to the OpenPKG specfile: build with murder
-kolab-ldap.patch: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
-kolab.patch: Patch to the OpenPKG specfile
diff --git a/imapd/cyradm.annotate.patch b/imapd/cyradm.annotate.patch
deleted file mode 100644
index 1af2887..0000000
--- a/imapd/cyradm.annotate.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff -upr ../cyrus-imapd-2.2.12.orig/doc/man/cyradm.1.html ./doc/man/cyradm.1.html
---- ../cyrus-imapd-2.2.12.orig/doc/man/cyradm.1.html 2005-02-14 19:02:26.000000000 +0100
-+++ ./doc/man/cyradm.1.html 2005-08-29 04:35:21.000000000 +0200
-@@ -191,6 +191,10 @@ Indicates that the mailbox should have a
- <DD>
- Sets an email address to which messages injected into the server via NNTP
- will be sent.
-+<P></P>
-+<DT><STRONG><A NAME="item__2fexplicit_2fannotation"><CODE>/explicit/annotation</CODE></A></STRONG><BR>
-+<DD>
-+Sets the annotation <EM>/explicit/annotation</EM> on <EM>mailbox</EM> to <EM>value</EM>.
- <P></P></DL>
- <DT><STRONG><A NAME="item_renamemailbox_%5B%2D%2Dpartition_partition%5D_oldn"><CODE>renamemailbox</CODE> [<CODE>--partition</CODE> <EM>partition</EM>] <EM>oldname</EM> <EM>newname</EM></A></STRONG><BR>
- <DD>
-diff -upr ../cyrus-imapd-2.2.12.orig/perl/imap/cyradm.sh ./perl/imap/cyradm.sh
---- ../cyrus-imapd-2.2.12.orig/perl/imap/cyradm.sh 2004-01-15 15:35:34.000000000 +0100
-+++ ./perl/imap/cyradm.sh 2005-08-29 04:28:51.000000000 +0200
-@@ -225,6 +225,10 @@ Indicates that the mailbox should have a
- Sets an email address to which messages injected into the server via NNTP
- will be sent.
-
-+=item C</explicit/annotation>
-+
-+Sets the annotation I</explicit/annotation> on I<mailbox> to I<value>.
-+
- =back
-
- =item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
-diff -upr ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Admin.pm ./perl/imap/IMAP/Admin.pm
---- ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Admin.pm 2004-02-19 23:50:12.000000000 +0100
-+++ ./perl/imap/IMAP/Admin.pm 2005-08-29 04:02:38.000000000 +0200
-@@ -789,12 +789,12 @@ sub mboxconfig {
- return undef;
- }
-
-- if(!exists($values{$entry})) {
-- $self->{error} = "Unknown parameter $entry";
-+ if(exists($values{$entry})) {
-+ $entry = $values{$entry};
-+ } else {
-+ $self->{error} = "Unknown parameter $entry" unless substr($entry,0,1) eq "/";
- }
-
-- $entry = $values{$entry};
--
- my ($rc, $msg);
-
- $value = undef if($value eq "none");
-diff -upr ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Shell.pm ./perl/imap/IMAP/Shell.pm
---- ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Shell.pm 2004-01-15 15:35:35.000000000 +0100
-+++ ./perl/imap/IMAP/Shell.pm 2005-08-29 04:02:38.000000000 +0200
-@@ -126,7 +126,7 @@ my %builtins = (exit =>
- [\&_sc_info, '[mailbox]',
- 'display mailbox/server metadata'],
- mboxcfg =>
-- [\&_sc_mboxcfg, 'mailbox [comment|news2mail|expire|squat] value',
-+ [\&_sc_mboxcfg, 'mailbox [comment|news2mail|expire|squat|/<explicit annotation>] value',
- 'configure mailbox'],
- mboxconfig => 'mboxcfg',
- reconstruct =>
-@@ -1339,7 +1339,7 @@ sub _sc_mboxcfg {
- while (defined ($opt = shift(@argv))) {
- last if $opt eq '--';
- if ($opt =~ /^-/) {
-- die "usage: mboxconfig mailbox [comment|news2mail|expire|squat] value\n";
-+ die "usage: mboxconfig mailbox [comment|news2mail|expire|squat|/<explicit annotation>] value\n";
- }
- else {
- push(@nargv, $opt);
-@@ -1348,7 +1348,7 @@ sub _sc_mboxcfg {
- }
- push(@nargv, @argv);
- if (@nargv < 2) {
-- die "usage: mboxconfig mailbox [comment|news2mail|expire|squat] value\n";
-+ die "usage: mboxconfig mailbox [comment|news2mail|expire|squat|/<explicit annotation>] value\n";
- }
- if (!$cyrref || !$$cyrref) {
- die "mboxconfig: no connection to server\n";
diff --git a/imapd/imapd-goodchars.patch b/imapd/imapd-goodchars.patch
deleted file mode 100644
index b338704..0000000
--- a/imapd/imapd-goodchars.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -upr ../cyrus-imapd-2.2.12.orig/imap/imapd.c ./imap/imapd.c
---- ../cyrus-imapd-2.2.12.orig/imap/imapd.c 2005-02-14 07:39:55.000000000 +0100
-+++ ./imap/imapd.c 2005-04-21 00:59:50.865255448 +0200
-@@ -3923,10 +3923,12 @@ void cmd_rename(const char *tag,
- }
- }
-
-+#ifdef notdef
- /* verify that the mailbox doesn't have a wildcard in it */
- for (p = oldmailboxname; !r && *p; p++) {
- if (*p == '*' || *p == '%') r = IMAP_MAILBOX_BADNAME;
- }
-+#endif
-
- /* attempt to rename the base mailbox */
- if (!r) {
-Kun i ./imap: imapd.c.orig
-diff -upr ../cyrus-imapd-2.2.12.orig/imap/mboxlist.c ./imap/mboxlist.c
---- ../cyrus-imapd-2.2.12.orig/imap/mboxlist.c 2004-07-26 20:08:03.000000000 +0200
-+++ ./imap/mboxlist.c 2005-04-21 00:59:50.874254080 +0200
-@@ -476,10 +476,12 @@ mboxlist_mycreatemailboxcheck(char *name
- free(acl);
- return IMAP_PERMISSION_DENIED;
- }
-+#ifdef notdef
- /* disallow wildcards in userids with inboxes. */
- if (strchr(mbox, '*') || strchr(mbox, '%') || strchr(mbox, '?')) {
- return IMAP_MAILBOX_BADNAME;
- }
-+#endif
-
- /*
- * Users by default have all access to their personal mailbox(es),
-diff -upr ../cyrus-imapd-2.2.12.orig/imap/mboxname.c ./imap/mboxname.c
---- ../cyrus-imapd-2.2.12.orig/imap/mboxname.c 2005-02-14 07:39:57.000000000 +0100
-+++ ./imap/mboxname.c 2005-04-21 00:59:50.879253320 +0200
-@@ -649,8 +649,13 @@ int mboxname_netnewscheck(char *name)
- /*
- * Apply site policy restrictions on mailbox names.
- * Restrictions are hardwired for now.
-- */
-+
-+ * original definition
- #define GOODCHARS " +,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
-+ */
-+
-+#define GOODCHARS " #$%'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
-+
- int mboxname_policycheck(char *name)
- {
- unsigned i;
-Kun i ./imap: mboxname.c.orig
diff --git a/imapd/imapd-murder.patch b/imapd/imapd-murder.patch
deleted file mode 100644
index 89d1d4f..0000000
--- a/imapd/imapd-murder.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- imapd.spec.orig 2004-06-24 00:51:48.000000000 +0200
-+++ imapd.spec 2004-06-24 00:56:57.000000000 +0200
-@@ -41,6 +41,7 @@ Release: 20040620
- %option with_group no
- %option with_atvdom no
- %option with_drac no
-+%option with_murder no
-
- # list of sources
- Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
-@@ -177,7 +178,8 @@ AutoReqProv: no
- --without-ucdsnmp \
- --with-cyrus-prefix=%{l_prefix} \
- --with-cyrus-user=%{l_rusr} \
-- --with-cyrus-group=%{l_rgrp}
-+ --with-cyrus-group=%{l_rgrp} \
-+ --enable-murder=%{with_murder}
-
- # redirect the hard-coded file paths
- %{l_shtool} subst \
diff --git a/imapd/imapd.annotate.patch b/imapd/imapd.annotate.patch
deleted file mode 100644
index a6ac192..0000000
--- a/imapd/imapd.annotate.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-diff -upr ../cyrus-imapd-2.2.6/imap/annotate.c ./imap/annotate.c
---- ../cyrus-imapd-2.2.6/imap/annotate.c 2004-05-22 05:45:48.000000000 +0200
-+++ ./imap/annotate.c 2004-07-05 11:59:13.000000000 +0200
-@@ -1598,6 +1598,11 @@ const struct annotate_st_entry mailbox_r
- { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
- };
-
-+const struct annotate_st_entry vendor_entry =
-+ { NULL, ATTRIB_TYPE_STRING, BACKEND_ONLY,
-+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV,
-+ ACL_ADMIN, annotation_set_todb, NULL };
-+
- int annotatemore_store(char *mailbox,
- struct entryattlist *l,
- struct namespace *namespace,
-@@ -1610,6 +1615,7 @@ int annotatemore_store(char *mailbox,
- struct attvaluelist *av;
- struct storedata sdata;
- const struct annotate_st_entry *entries;
-+ struct annotate_st_entry * working_entry;
- time_t now = time(0);
-
- memset(&sdata, 0, sizeof(struct storedata));
-@@ -1631,37 +1637,55 @@ int annotatemore_store(char *mailbox,
- while (e) {
- int entrycount, attribs;
- struct annotate_st_entry_list *nentry = NULL;
-+ struct annotate_st_entry *ientry = NULL;
-
- /* See if we support this entry */
-+ working_entry = NULL;
- for (entrycount = 0;
- entries[entrycount].name;
- entrycount++) {
- if (!strcmp(e->entry, entries[entrycount].name)) {
-+ working_entry = &(entries[entrycount]);
- break;
- }
- }
-- if (!entries[entrycount].name) {
-- /* unknown annotation */
-- return IMAP_PERMISSION_DENIED;
-+ if (working_entry==NULL) {
-+ /* test for generic vendor annotation */
-+ if ((strncmp("/vendor/", e->entry, strlen("/vendor/"))==0) &&
-+ (strlen(e->entry)>strlen("/vendor/"))) {
-+ working_entry = &(vendor_entry);
-+ }
-+ else {
-+ /* unknown annotation */
-+ return IMAP_PERMISSION_DENIED;
-+ }
- }
-
- /* Add this entry to our list only if it
- applies to our particular server type */
-- if (entries[entrycount].proxytype == PROXY_AND_BACKEND
-+ if (working_entry->proxytype == PROXY_AND_BACKEND
- || (proxy_store_func &&
-- entries[entrycount].proxytype == PROXY_ONLY)
-+ working_entry->proxytype == PROXY_ONLY)
- || (!proxy_store_func &&
-- entries[entrycount].proxytype == BACKEND_ONLY)) {
-+ working_entry->proxytype == BACKEND_ONLY)) {
-+ ientry = xzmalloc(sizeof(struct annotate_st_entry));
-+ ientry->name = e->entry;
-+ ientry->type = working_entry->type;
-+ ientry->proxytype = working_entry->proxytype;
-+ ientry->attribs = working_entry->attribs;
-+ ientry->acl = working_entry->acl;
-+ ientry->set = working_entry->set;
-+ ientry->rock = working_entry->rock;
- nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
- nentry->next = sdata.entry_list;
-- nentry->entry = &(entries[entrycount]);
-+ nentry->entry = ientry;
- nentry->shared.modifiedsince = now;
- nentry->priv.modifiedsince = now;
- sdata.entry_list = nentry;
- }
-
- /* See if we are allowed to set the given attributes. */
-- attribs = entries[entrycount].attribs;
-+ attribs = working_entry->attribs;
- av = e->attvalues;
- while (av) {
- const char *value;
-@@ -1671,7 +1695,7 @@ int annotatemore_store(char *mailbox,
- goto cleanup;
- }
- value = annotate_canon_value(av->value,
-- entries[entrycount].type);
-+ working_entry->type);
- if (!value) {
- r = IMAP_ANNOTATION_BADVALUE;
- goto cleanup;
-@@ -1697,7 +1721,7 @@ int annotatemore_store(char *mailbox,
- goto cleanup;
- }
- value = annotate_canon_value(av->value,
-- entries[entrycount].type);
-+ working_entry->type);
- if (!value) {
- r = IMAP_ANNOTATION_BADVALUE;
- goto cleanup;
-@@ -1797,6 +1821,12 @@ int annotatemore_store(char *mailbox,
- /* Free the entry list */
- while (sdata.entry_list) {
- struct annotate_st_entry_list *freeme = sdata.entry_list;
-+ if (freeme != NULL){
-+ struct annotate_st_entry *freeme2 = freeme->entry;
-+ if (freeme2 != NULL) {
-+ free( freeme2 );
-+ }
-+ }
- sdata.entry_list = sdata.entry_list->next;
- free(freeme);
- }
diff --git a/imapd/imapd.folderchar.patch b/imapd/imapd.folderchar.patch
deleted file mode 100644
index 8195748..0000000
--- a/imapd/imapd.folderchar.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/bsearch.c ./lib/bsearch.c
---- ../cyrus-imapd-2.2.12.orig/lib/bsearch.c 2003-02-13 21:15:39.000000000 +0100
-+++ ./lib/bsearch.c 2006-07-15 22:49:05.000000000 +0200
-@@ -213,3 +213,22 @@ int bsearch_compare(const char *s1, cons
- s2++;
- }
- }
-+
-+int bsearch_ncompare(const char *s1, int l1, const char *s2, int l2)
-+{
-+ int min = l1 < l2 ? l1 : l2;
-+ int cmp = 0;
-+
-+ while (min-- > 0 && (cmp = TOCOMPARE(*s1) - TOCOMPARE(*s2)) == 0) {
-+ s1++;
-+ s2++;
-+ }
-+ if (min >= 0) {
-+ return cmp;
-+ } else {
-+ if (l2 > l1) return -1;
-+ else if (l1 > l2) return 1;
-+ else return 0;
-+ }
-+}
-+
-diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/bsearch.h ./lib/bsearch.h
---- ../cyrus-imapd-2.2.12.orig/lib/bsearch.h 2003-02-13 21:15:39.000000000 +0100
-+++ ./lib/bsearch.h 2006-07-14 15:06:24.000000000 +0200
-@@ -51,4 +51,6 @@ extern int bsearch_mem(const char *word,
-
- extern int bsearch_compare(const char *s1, const char *s2);
-
-+extern int bsearch_ncompare(const char *s1, int l1, const char *s2, int l2);
-+
- #endif /* INCLUDED_BSEARCH_H */
-diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/cyrusdb_skiplist.c ./lib/cyrusdb_skiplist.c
---- ../cyrus-imapd-2.2.12.orig/lib/cyrusdb_skiplist.c 2004-06-08 21:55:17.000000000 +0200
-+++ ./lib/cyrusdb_skiplist.c 2006-07-15 22:51:08.000000000 +0200
-@@ -68,6 +68,7 @@
- #include "retry.h"
- #include "util.h"
- #include "xmalloc.h"
-+#include "bsearch.h"
-
- #define PROB (0.5)
-
-@@ -787,24 +788,6 @@ int myclose(struct db *db)
- return dispose_db(db);
- }
-
--static int compare(const char *s1, int l1, const char *s2, int l2)
--{
-- int min = l1 < l2 ? l1 : l2;
-- int cmp = 0;
--
-- while (min-- > 0 && (cmp = *s1 - *s2) == 0) {
-- s1++;
-- s2++;
-- }
-- if (min >= 0) {
-- return cmp;
-- } else {
-- if (l1 > l2) return 1;
-- else if (l2 > l1) return -1;
-- else return 0;
-- }
--}
--
- /* returns the offset to the node asked for, or the node after it
- if it doesn't exist.
- if previous is set, finds the last node < key */
-@@ -824,7 +807,7 @@ static const char *find_node(struct db *
-
- for (i = db->curlevel - 1; i >= 0; i--) {
- while ((offset = FORWARD(ptr, i)) &&
-- compare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
-+ bsearch_ncompare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
- key, keylen) < 0) {
- /* move forward at level 'i' */
- ptr = db->map_base + offset;
-@@ -875,7 +858,7 @@ int myfetch(struct db *db,
-
- ptr = find_node(db, key, keylen, 0);
-
-- if (ptr == db->map_base || compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-+ if (ptr == db->map_base || bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
- /* failed to find key/keylen */
- r = CYRUSDB_NOTFOUND;
- } else {
-@@ -963,7 +946,7 @@ int myforeach(struct db *db,
- while (ptr != db->map_base) {
- /* does it match prefix? */
- if (KEYLEN(ptr) < (bit32) prefixlen) break;
-- if (prefixlen && compare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
-+ if (prefixlen && bsearch_ncompare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
-
- if (!goodp ||
- goodp(rock, KEY(ptr), KEYLEN(ptr), DATA(ptr), DATALEN(ptr))) {
-@@ -1116,7 +1099,7 @@ int mystore(struct db *db,
- newoffset = tp->logend;
- ptr = find_node(db, key, keylen, updateoffsets);
- if (ptr != db->map_base &&
-- !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-+ !bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-
- if (!overwrite) {
- myabort(db, tp); /* releases lock */
-@@ -1282,7 +1265,7 @@ int mydelete(struct db *db,
-
- ptr = find_node(db, key, keylen, updateoffsets);
- if (ptr == db->map_base ||
-- !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-+ !bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
- /* gotcha */
- offset = ptr - db->map_base;
-
-@@ -1825,11 +1808,11 @@ static int myconsistent(struct db *db, s
- const char *q = db->map_base + offset;
- int cmp;
-
-- cmp = compare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
-+ cmp = bsearch_ncompare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
- if (cmp >= 0) {
- fprintf(stdout,
- "skiplist inconsistent: %04X: ptr %d is %04X; "
-- "compare() = %d\n",
-+ "bsearch_ncompare() = %d\n",
- ptr - db->map_base,
- i,
- offset, cmp);
-@@ -2058,7 +2041,7 @@ static int recovery(struct db *db, int f
- if (TYPE(ptr) == ADD) {
- keyptr = find_node(db, KEY(ptr), KEYLEN(ptr), updateoffsets);
- if (keyptr == db->map_base ||
-- compare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
-+ bsearch_ncompare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
- /* didn't find exactly this node */
- keyptr = NULL;
- }
diff --git a/imapd/imapd.group2.patch b/imapd/imapd.group2.patch
deleted file mode 100644
index 088ae36..0000000
--- a/imapd/imapd.group2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- ../cyrus-imapd-2.2.6.kolab-orig/lib/auth_unix.c 2004-10-09 00:07:45.000000000 +0200
-+++ lib/auth_unix.c 2004-10-09 00:29:58.000000000 +0200
-@@ -274,7 +274,7 @@ static struct group* fgetgrnam(const cha
- if (!groupfile) groupfile = fopen("/etc/group", "r");
- if (groupfile) {
- while ((grp = fgetgrent(groupfile))) {
-- if (strcmp(grp->gr_name, name) == 0) {
-+ if (strcasecmp(grp->gr_name, name) == 0) {
- fclose(groupfile);
- return grp;
- }
-@@ -386,7 +386,7 @@ struct auth_state *auth_newstate(const c
- if (groupfile) {
- while ((grp = fgetgrent(groupfile))) {
- for (mem = grp->gr_mem; *mem; mem++) {
-- if (!strcmp(*mem, identifier)) break;
-+ if (!strcasecmp(*mem, identifier)) break;
- }
-
- if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
diff --git a/imapd/imapd.morelogging.patch b/imapd/imapd.morelogging.patch
deleted file mode 100644
index 9fa02e9..0000000
--- a/imapd/imapd.morelogging.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-diff -upr cyrus-imapd-2.2.12.orig/imap/append.c cyrus-imapd-2.2.12/imap/append.c
---- cyrus-imapd-2.2.12.orig/imap/append.c 2004-05-22 05:45:48.000000000 +0200
-+++ cyrus-imapd-2.2.12/imap/append.c 2005-09-17 19:45:53.000000000 +0200
-@@ -636,6 +636,9 @@ int append_fromstage(struct appendstate
- /* ok, we've successfully added a message */
- as->quota_used += message_index.size;
-
-+ syslog(LOG_DEBUG, "append_fromstage: message %d added to %s",
-+ message_index.uid, mailbox->name );
-+
- return 0;
- }
-
-Only in cyrus-imapd-2.2.12/imap: append.c~
-diff -upr cyrus-imapd-2.2.12.orig/imap/imapd.c cyrus-imapd-2.2.12/imap/imapd.c
---- cyrus-imapd-2.2.12.orig/imap/imapd.c 2005-02-14 07:39:55.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/imapd.c 2005-09-17 23:29:45.000000000 +0200
-@@ -3652,6 +3652,8 @@ char *sequence;
- else {
- prot_printf(imapd_out, "%s OK %s\r\n", tag,
- error_message(IMAP_OK_COMPLETED));
-+ syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s",
-+ imapd_userid, imapd_mailbox->name, sequence ? sequence : "''");
- }
- }
-
-Only in cyrus-imapd-2.2.12/imap: imapd.c~
-diff -upr cyrus-imapd-2.2.12.orig/imap/lmtpd.c cyrus-imapd-2.2.12/imap/lmtpd.c
---- cyrus-imapd-2.2.12.orig/imap/lmtpd.c 2004-12-17 17:32:15.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/lmtpd.c 2005-09-17 19:41:05.000000000 +0200
-@@ -299,7 +299,10 @@ int deliver_mailbox(struct protstream *m
- prot_rewind(msg);
- r = append_fromstage(&as, stage, now,
- (const char **) flag, nflags, !singleinstance);
-- if (!r) append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
-+ if (!r) {
-+ append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
-+ syslog( LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname );
-+ }
- else append_abort(&as);
- }
-
-diff -upr cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c cyrus-imapd-2.2.12/imap/lmtpproxyd.c
---- cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c 2004-12-17 17:32:16.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/lmtpproxyd.c 2005-09-17 19:41:05.000000000 +0200
-@@ -471,6 +471,11 @@ static void runme(struct mydata *mydata,
- /* this is the only delivery we're attempting for this rcpt */
- msg_setrcpt_status(msgdata, j, lt->rcpt[i].r);
- mydata->pend[j] = done;
-+
-+ if (lt->rcpt[i].result == RCPT_GOOD) {
-+ syslog (LOG_NOTICE, "Message: %s delivered to: %s@%s",
-+ msgdata->id, d->to, d->server);
-+ }
- break;
- case done:
- case s_done:
-diff -upr cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c cyrus-imapd-2.2.12/imap/lmtp_sieve.c
---- cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c 2004-06-01 15:47:16.000000000 +0200
-+++ cyrus-imapd-2.2.12/imap/lmtp_sieve.c 2005-09-17 19:41:05.000000000 +0200
-@@ -339,6 +339,7 @@ static int sieve_redirect(void *ac,
- if (sievedb) duplicate_mark(buf, strlen(buf),
- sievedb, strlen(sievedb), time(NULL), 0);
-
-+ syslog( LOG_INFO, "sieve redirected: %s to: %s", m->id, rc->addr);
- snmp_increment(SIEVE_REDIRECT, 1);
- return SIEVE_OK;
- } else {
-@@ -406,6 +407,7 @@ static int sieve_reject(void *ac,
- origreceip, sd->username,
- rc->msg, md->data)) == 0) {
- snmp_increment(SIEVE_REJECT, 1);
-+ syslog( LOG_INFO, "sieve rejected: %s to: %s", md->id, md->return_path);
- return SIEVE_OK;
- } else {
- if (res == -1) {
-diff -upr cyrus-imapd-2.2.12.orig/imap/mailbox.c cyrus-imapd-2.2.12/imap/mailbox.c
---- cyrus-imapd-2.2.12.orig/imap/mailbox.c 2005-02-14 07:39:57.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/mailbox.c 2005-09-17 19:41:05.000000000 +0200
-@@ -1911,6 +1911,8 @@ mailbox_expunge(struct mailbox *mailbox,
- /* Delete message files */
- *fnametail++ = '/';
- for (msgno = 0; msgno < numdeleted; msgno++) {
-+ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d",
-+ mailbox->name, deleted[msgno]);
- if (iscurrentdir) {
- char shortfnamebuf[MAILBOX_FNAME_LEN];
- mailbox_message_get_fname(mailbox, deleted[msgno],
-@@ -1925,6 +1927,11 @@ mailbox_expunge(struct mailbox *mailbox,
- }
- }
-
-+ if (numdeleted > 0) {
-+ syslog (LOG_NOTICE, "Deleted %d messages from %s",
-+ numdeleted, mailbox->name);
-+ }
-+
- free(buf);
- if (deleted) free(deleted);
-
diff --git a/imapd/kolab-ldap.patch b/imapd/kolab-ldap.patch
deleted file mode 100644
index 4f19fed..0000000
--- a/imapd/kolab-ldap.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -urp ../cyrus-imapd-2.2.8.orig/configure ./configure
---- ../cyrus-imapd-2.2.8.orig/configure 2004-07-29 18:22:18.000000000 +0200
-+++ ./configure 2005-01-10 12:56:16.000000000 +0100
-@@ -14422,7 +14422,7 @@ for flag in ${ldflags} ${default_ldflags
- done
-
- IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
--IMAP_LIBS="${LIB_SASL} ${LIBS}"
-+IMAP_LIBS="${LIB_SASL} -lldap -llber ${LIBS}"
-
-
-
-diff -urp ../cyrus-imapd-2.2.8.orig/imap/global.c ./imap/global.c
---- ../cyrus-imapd-2.2.8.orig/imap/global.c 2004-05-22 05:45:49.000000000 +0200
-+++ ./imap/global.c 2005-01-10 13:40:19.000000000 +0100
-@@ -52,6 +52,9 @@
- #include <netinet/in.h>
- #include <sys/stat.h>
-
-+#include <ldap.h>
-+#include <lber.h>
-+
- #if HAVE_UNISTD_H
- # include <unistd.h>
- #endif
-@@ -349,6 +352,18 @@ char *canonify_userid(char *user, char *
- char *domain = NULL;
- int len = strlen(user);
- char buf[81];
-+ const char *uri;
-+ const char *base;
-+ const char *binddn;
-+ const char *bindpw;
-+ struct timeval timeout;
-+ char filter[255];
-+ LDAP *handle;
-+ LDAPMessage *res;
-+ LDAPMessage *entry;
-+ char ** vals;
-+
-+ int rc;
-
- /* check for domain */
- if (config_virtdomains &&
-@@ -367,6 +382,47 @@ char *canonify_userid(char *user, char *
- }
-
- if (config_virtdomains) {
-+ if (config_virtdomains == IMAP_ENUM_VIRTDOMAINS_LDAP) {
-+ uri = config_getstring(IMAPOPT_LDAP_URI);
-+ base = config_getstring(IMAPOPT_LDAP_BASE);
-+ binddn = config_getstring(IMAPOPT_LDAP_BIND_DN);
-+ bindpw = config_getstring(IMAPOPT_LDAP_PASSWORD);
-+ timeout.tv_sec = config_getint(IMAPOPT_LDAP_TIME_LIMIT);
-+ timeout.tv_usec = 0;
-+ sprintf(filter, "(uid=%s)", user);
-+ rc = ldap_initialize(&handle, uri);
-+ if (rc != LDAP_SUCCESS) {
-+ syslog(LOG_ERR, "ldap_initialize failed (%s)", uri);
-+ } else {
-+ rc = ldap_simple_bind_s(handle, binddn, bindpw);
-+ if (rc != LDAP_SUCCESS) {
-+ syslog(LOG_ERR, "ldap_simple_bind() failed %d (%s)", rc, ldap_err2string(rc));
-+ } else {
-+ rc = ldap_search_st(handle, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, &timeout, &res);
-+ if (rc != LDAP_SUCCESS) {
-+ syslog(LOG_ERR, "ldap_search_st failed %d (%s)", rc, ldap_err2string(rc));
-+ } else {
-+ if ( (entry = ldap_first_entry(handle, res)) != NULL ) {
-+ // read mail attribute from entry
-+ if ( (vals = ldap_get_values(handle, entry, "mail")) ) {
-+ if (strchr(vals[0], '@')) {
-+ static char buf[81]; /* same size as in auth_canonifyid */
-+ strncpy( buf, vals[0], sizeof(buf) );
-+ buf[80] = '\0'; /* make sure it's null-terminated */
-+ ldap_value_free( vals );
-+ ldap_msgfree( res );
-+ ldap_unbind_s(handle); /* also frees handle */
-+ return auth_canonifyid( buf, 0) ;
-+ }
-+ ldap_value_free( vals );
-+ }
-+ }
-+ ldap_msgfree( res );
-+ }
-+ }
-+ ldap_unbind_s(handle); /* also frees handle */
-+ }
-+ }
- if (domain) {
- if (config_defdomain && !strcasecmp(config_defdomain, domain+1)) {
- *domain = '\0'; /* trim the default domain */
-@@ -379,7 +435,7 @@ char *canonify_userid(char *user, char *
- user = buf;
- }
- }
-- else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID) {
-+ else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID && config_virtdomains != IMAP_ENUM_VIRTDOMAINS_LDAP) {
- socklen_t salen;
- int error;
- struct sockaddr_storage localaddr;
-Kun i ./imap: global.c~
-diff -urp ../cyrus-imapd-2.2.8.orig/lib/imapoptions ./lib/imapoptions
---- ../cyrus-imapd-2.2.8.orig/lib/imapoptions 2004-07-21 21:07:45.000000000 +0200
-+++ ./lib/imapoptions 2005-01-10 12:56:16.000000000 +0100
-@@ -839,7 +839,7 @@ are listed with ``<none>''.
- mailbox hierarchy. The default is to use the netnews separator
- character '.'. */
-
--{ "virtdomains", "off", ENUM("off", "userid", "on") }
-+{ "virtdomains", "off", ENUM("off", "userid", "ldap", "on") }
- /* Enable virtual domain support. If enabled, the user's domain will
- be determined by splitting a fully qualified userid at the last '@'
- or '%' symbol. If the userid is unqualified, and the virtdomains
-diff -urp ../cyrus-imapd-2.2.8.orig/lib/imapopts.c ./lib/imapopts.c
---- ../cyrus-imapd-2.2.8.orig/lib/imapopts.c 2004-07-29 18:22:18.000000000 +0200
-+++ ./lib/imapopts.c 2005-01-10 12:56:16.000000000 +0100
-@@ -186,7 +186,7 @@ struct imapopt_s imapopts[] =
- { IMAPOPT_USERPREFIX, "userprefix", 0, {(void *)("Other Users")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
- { IMAPOPT_UNIX_GROUP_ENABLE, "unix_group_enable", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
- { IMAPOPT_UNIXHIERARCHYSEP, "unixhierarchysep", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
-- { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
-+ { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "ldap" , IMAP_ENUM_VIRTDOMAINS_LDAP }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
-
- { IMAPOPT_LAST, NULL, 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } }
-
-diff -urp ../cyrus-imapd-2.2.8.orig/lib/imapopts.h ./lib/imapopts.h
---- ../cyrus-imapd-2.2.8.orig/lib/imapopts.h 2004-07-29 18:22:18.000000000 +0200
-+++ ./lib/imapopts.h 2005-01-10 12:56:16.000000000 +0100
-@@ -188,6 +188,7 @@ enum enum_value {
-
- IMAP_ENUM_VIRTDOMAINS_ON,
- IMAP_ENUM_VIRTDOMAINS_USERID,
-+ IMAP_ENUM_VIRTDOMAINS_LDAP,
- IMAP_ENUM_VIRTDOMAINS_OFF = 0
-
- };
diff --git a/imapd/kolab.patch b/imapd/kolab.patch
deleted file mode 100644
index c72f1c3..0000000
--- a/imapd/kolab.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- imapd.spec.orig 2006-11-03 16:49:36.210673013 +0100
-+++ imapd.spec 2006-11-03 16:50:56.703458223 +0100
-@@ -2,6 +2,9 @@
- ## imapd.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
-+## Copyright (c) 2004 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
-+## Copyright (c) 2004 Martin Konold <martin.konold@erfrakon.de>
-+## Copyright (c) 2005 Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
-@@ -33,13 +36,18 @@
- Group: Mail
- License: BSD
- Version: 2.2.12
--Release: 2.5.0
-+Release: 2.5.0_kolab2
-
- # package options
--%option with_fsl yes
--%option with_group no
--%option with_atvdom no
--%option with_drac no
-+%option with_fsl yes
-+%option with_group no
-+%option with_atvdom no
-+%option with_drac no
-+%option with_annotate no
-+%option with_ldap no
-+%option with_goodchars no
-+%option with_morelogging no
-+%option with_folderchar no
-
- # list of sources
- Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
-@@ -49,6 +57,13 @@
- Source4: fsl.imapd
- Patch0: imapd.patch
- Patch1: imapd.patch.group
-+Patch2: imapd.annotate.patch
-+Patch3: kolab-ldap.patch
-+Patch4: imapd.group2.patch
-+Patch5: imapd-goodchars.patch
-+Patch6: cyradm.annotate.patch
-+Patch7: imapd.morelogging.patch
-+Patch8: imapd.folderchar.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -61,6 +76,10 @@
- BuildPreReq: fsl >= 1.2.0
- PreReq: fsl >= 1.2.0
- %endif
-+%if "%{with_ldap}" == "yes"
-+BuildPreReq: openldap >= 2.2.14
-+PreReq: openldap >= 2.2.14
-+%endif
- AutoReq: no
- AutoReqProv: no
-
-@@ -91,6 +110,7 @@
- %{l_shtool} subst \
- -e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
- lib/auth_unix.c
-+ %patch -p0 -P 4
- %endif
- %if "%{with_drac}" == "yes"
- %{l_shtool} subst -e 's;@DRACLIBS@;-ldrac;g' contrib/drac_auth.patch
-@@ -98,10 +118,27 @@
- sleep 1
- touch configure
- %endif
-+%if "%{with_annotate}" == "yes"
-+ %patch -p0 -P 2
-+%endif
-+%if "%{with_ldap}" == "yes"
-+ %patch -p0 -P 3
-+%endif
-+%if "%{with_goodchars}" == "yes"
-+ %patch -p1 -P 5
-+%endif
-+ %patch -p0 -P 6
-+%if "%{with_morelogging}" == "yes"
-+ %patch -p1 -P 7
-+%endif
-+%if "%{with_folderchar}" == "yes"
-+ %patch -p0 -P 8
-+%endif
- %{l_shtool} subst \
- -e 's;-L/usr/local/lib;;g' \
- -e 's;-I/usr/local/include;;g' \
-- -e 's;db-4.1;db;g' \
-+ -e 's;db-4.4;db;g' \
-+ -e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
- configure
-
- # ensure local et/com_err can be found
-@@ -162,6 +199,11 @@
- -e '/alt_config/s;"deliver";"cyrdeliver";' \
- imap/deliver.c
-
-+ %{l_shtool} subst \
-+ -e '/snprintf(buf, sizeof(buf), "%s/s;/reconstruct";/cyrreconstruct";' \
-+ -e '/snprintf(buf, sizeof(buf), "%s/s;/quota";/cyrquota";' \
-+ imap/imapd.c
-+
- %build
- cflags="%{l_cppflags}"
- %if "%{with_atvdom}" == "yes"
diff --git a/obmtool b/obmtool
deleted file mode 100755
index 6bc5580..0000000
--- a/obmtool
+++ /dev/null
@@ -1,994 +0,0 @@
-#!/bin/sh
-##
-## obmtool -- OpenPKG poor man's Boot, Build & Management Tool
-## based on Ralf S. Engelschall's "devtool -- Development Tool"
-## Copyright (c) 2003 Thomas Lotterer <thomas@lotterer.net>
-## Id: obmtool,v 1.47 2005/11/30 21:19:58 thl cvs.ZfOS.org
-## $Id$
-##
-
-# default parameters
-prg="$0"
-silent=0; verbose=0; debug=0; help=0
-query=0; force=0
-conf=""; logs=""; tmpdir=""; mirror=""; dltools=""; username=""; password=""
-tmpfile=""; cmd=""; cmdargs=""
-
-# iterate over argument line
-while [ $# -gt 0 ]; do
- opt="$1"
- arg=""
- arg=`echo "${opt}" | sed -e 's;^[^=]*=*;;'`
- num=`echo "${arg}" | sed -e 's;^ *\([0-9]*\).*$;\1;'`
- opt=`echo "${opt}" | sed -e 's;=.*$;;'`
- [ ".${debug}" = .1 ] && echo "DEBUG: main: opt=$opt, arg=$arg, num=$num"
- [ ".${num}" = . ] && num=1
- case $opt in
- -s|--silent ) silent=${num} ;;
- -v|--verbose ) verbose=${num} ;;
- -D|--debug ) debug=${num} ;;
- -h|--help ) help="USAGE" ;;
- -q|--query ) query=${num} ;;
- -f|--force ) force=${num} ;;
- -c|--conf ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- conf="$1"
- fi
- else
- conf="${arg}"
- fi ;;
- -l|--logs ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- logs="$1"
- fi
- else
- logs="${arg}"
- fi ;;
- -t|--tmpdir ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- tmpdir="$1"
- fi
- else
- tmpdir="${arg}"
- fi ;;
- -m|--mirror ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- mirror="$1"
- fi
- else
- mirror="${arg}"
- fi ;;
- -d|--dltools ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- dltools="$1"
- fi
- else
- dltools="${arg}"
- fi ;;
- -u|--user ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- username="$1"
- fi
- else
- username="${arg}"
- fi ;;
- -p|--pass ) if [ ".${arg}" = . ]; then
- if [ ".$2" != . ]; then
- shift 2>/dev/null
- password="$1"
- fi
- else
- password="${arg}"
- fi ;;
- -* ) help="ERROR" ;;
- * ) break;
- esac
- shift
-done
-cmd="$1"
-if [ ".$1" = . ]; then
- help="ERROR"
-else
- shift
-fi
-cmdargs="$@"
-
-# display error or usage message
-if [ ".$help" != .0 ]; then
- echo "obmtool:$help: obmtool [-s|--silent] [-v|--verbose] [-D|--debug] [-h|--help]" 1>&2
- echo " [-q|--query] [-f|--force]" 1>&2
- echo " [-c|--conf <file>] [-l|--logs <dir>] [-t|--tmpdir <dir>]" 1>&2
- echo " [-m|--mirror <url>] [-d|dltools <tool>[:<tool>...]] [-u|--user <user>] [-p|--pass <pass>]" 1>&2
- echo " <cmd> [<arg> ...]" 1>&2
- if [ ".$help" = "USAGE" ]; then
- exit 0
- else
- exit 1
- fi
-fi
-
-# compute reasonable defaults for omitted optional arguments
-[ ".${conf}" = . ] && conf="`echo ${prg} | sed -e 's;^.*/;./;'`.conf"
-[ ".$tmpdir" = . ] && tmpdir="${TMPDIR:-/tmp}"
-
-# compute scratch file name
-tmpfile="$tmpdir/obmtool.$$.tmp"
-
-# dump debug data
-if [ ".${debug}" = .1 ]; then
- echo "DEBUG: main: prg=\"$prg\"";
- echo "DEBUG: main: silent=\"$silent\" verbose=\"$verbose\" debug=\"$debug\" help=\"$help\"";
- echo "DEBUG: main: query=\"$query\" force=\"$force\"";
- echo "DEBUG: main: conf=\"$conf\" logs=\"$logs\" tmpdir=\"$tmpdir\" mirror=\"$mirror\" dltools=\"$dltools\" username=\"$username\" password=\"$password\"";
- echo "DEBUG: main: cmd=\"$cmd\" cmdargs=\"$cmdargs\"";
-fi
-
-# check whether configuration file is readable
-if [ ! -r ${conf} ]; then
- echo "obmtool:ERROR: configuration file ${conf} not readable" 1>&2
- exit 1
-fi
-
-# check whether command in configuration file exists
-cmdline=`grep "^%${cmd}$" ${conf}`
-if [ ".$cmdline" = . ]; then
- echo "obmtool:ERROR: command ${cmd} not found in configuration file ${conf}" 1>&2
- exit 1
-fi
-
-# check whether tmpdir exists
-if [ ! -d "$tmpdir" ]; then
- echo "obmtool:ERROR: tmpdir \"$tmpdir\" does not exist" 1>&2
- exit 1
-fi
-
-# create script using name $tmpfile, pass through critical variables by exporting them and run script
-rm -f $tmpfile 2>&1 1>/dev/null || true
-(
- sed <"${prg}" -e '1,/^## obmtool.func {/d' -e '/^## } obmtool.func/,$d';
- echo " @prolog";
- sed <"${conf}" -e "1,/^%common/d" -e '/^%.*/,$d';
- echo " @epilog";
- sed <"${conf}" -e "1,/^%${cmd} *$/d" -e '/^%.*/,$d'
-) \
-| sed -e 's;^\([ ]*\)@\([a-z].*\)$;\1obmtool_\2;' >$tmpfile
-export prg
-export silent verbose debug help
-export query force
-export conf logs tmpdir
-export tmpfile cmd cmdargs
-export mirror dltools username password
-sh $tmpfile
-rc=$?
-[ $rc -eq 0 ] && rm -f $tmpfile
-exit $rc
-
-## obmtool.func { # is now embedded. This line used as cutting point. Do not remove.
-
-##
-## obmtool.func -- OpenPKG poor man's Boot, Build & Management Tool Functions
-## based on Ralf S. Engelschall's "obmtool.func -- Development Tool Functions"
-## Copyright (c) 2003 Thomas Lotterer <thomas@lotterer.net>
-##
-
-@mkdirp ()
-{
- (
- p=`echo "$1" | sed -e 's;^/;;'`
- IFS="/"
- d="/"
- for i in $p; do
- d="$d$i"
- [ -d "$d" ] || mkdir "$d" || exit 1
- d="$d/"
- done
- exit 0
- )
- return $?
-}
-
-# find a tool; works like which(1) but vendor neutral and sets TOOL variable
-@findtool ()
-{
- TOOL=""
- for _tool in $*; do
- _ifs="$IFS"; IFS=":"
- for _path in $PATH; do
- if [ -f "$_path/$_tool" ]; then
- TOOL="$_path/$_tool"
- break
- fi
- done
- IFS="$_ifs"; unset _ifs
- if [ ".$TOOL" != . ]; then
- break
- fi
- done
-}
-
-@rpm ()
-{
- if [ -x ${PREFIX}/bin/rpm -a ! -x ${PREFIX}/libexec/openpkg/rpm ]; then
- MPX=""
- RPM="${PREFIX}/bin/rpm"
- elif [ -x ${PREFIX}/bin/openpkg -a -x ${PREFIX}/libexec/openpkg/rpm ]; then
- MPX="${PREFIX}/bin/openpkg"
- RPM="rpm"
- else
- MPX=""
- RPM=""
- fi
-}
-
-#locate package
-# supports CURRENT and STABLE trunk - autodetected by release id
-# supports RELEASE and SOLID updates - autodetected by release id
-# supports PLUS packages - prefix with '+'
-# supports packages in CWD - prefix with './'
-# supports packages with absolute pathes - prefix with '/'
-# supports private repository - prefix with '=' and set URL
-#
-@locate ()
-{
- LOC="."
- PKG="$1"
- ADD=""
-
- shift
- @archostag "$@"
-
- download="${mirror:-${MIRROR:-ftp://ftp.openpkg.org}}"
-
- # packages in CWD
- echo "${PKG}" | ${EGREP} >/dev/null '^\.\/'
- if [ $? -eq 0 ]; then
- PKG=`echo "${PKG}" | sed 's/^\.\///'` # strip off leading "./", take relative path verbatim
- return
- fi
-
- # packages with absolute pathes
- echo "${PKG}" | ${EGREP} >/dev/null '^\/'
- if [ $? -eq 0 ]; then
- PKG=`echo "${PKG}" | sed 's/^\/.*\///'` # strip off leading path
- LOC=`echo "${PKG}" | sed 's/\/[^\/][^\/]*$//'` # strip off trailing file/pkg
- return
- fi
-
- # private repository
- echo "${PKG}" | ${EGREP} >/dev/null '^='
- if [ $? -eq 0 ]; then
- PKG=`echo "${PKG}" | sed 's/^=//'` # strip off leading "=", add URL to private repository
- LOC="$URL"
- return
- fi
-
- # prepare for PLUS packages
- echo "${PKG}" | ${EGREP} >/dev/null '^\+'
- if [ $? -eq 0 ]; then
- ADD="/PLUS"
- PKG=`echo "${PKG}" | sed 's/^\+//'` # strip off leading "+"
- fi
-
- # CURRENT
- echo ${PKG} | ${EGREP} >/dev/null -- '-[2-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$'
- if [ $? -eq 0 ]; then
- LOC="$download/current/SRC"
- return
- fi
-
- # STABLE
- echo ${PKG} | ${EGREP} >/dev/null -- '-[0-9][0-9]*\.[2-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$'
- if [ $? -eq 0 ]; then
- LOC="$download/stable/SRC"
- return
- fi
-
- # RELEASE (including PLUS)
- echo ${PKG} | ${EGREP} >/dev/null -- '-[1-9][0-9]*\.[0-9][0-9]*\.0$'
- if [ $? -eq 0 ]; then
- LOC="`echo ${PKG} | sed -e 's;^.*-\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9][0-9]*$;'$download'/release/\1.\2/SRC;'`$ADD"
- return
- fi
-
- # UPDATE (for CORE and BASE)
- echo ${PKG} | ${EGREP} >/dev/null -- '-[1-9][0-9]*\.[0-9][0-9]*\.[1-9][0-9]*$'
- if [ $? -eq 0 ]; then
- LOC="`echo ${PKG} | sed -e 's;^.*-\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9][0-9]*$;'$download'/release/\1.\2/UPD;'`"
- return
- fi
-
- echo "obmtool:ERROR: locate() does not understand how to handle \"${PKG}\"" 1>&2
- exit 1
-}
-
-#wipe out existing binary rpm
-@wiperpm ()
-{
- @locate "$@"
- echo "wiperpm ${PKG}"
- if [ ".$CHECKONLY" != ".yes" ]; then
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- rm -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>/dev/null || true
- fi
- fi
-}
-
-#rebuild only, no install
-@rebuild ()
-{
- @locate "$@"
- shift
- # FIXME compensate architectural bug of obmtool 1.3[12] placing .src.rpm files into RPM/SRC
- if [ -f ${PREFIX}/RPM/SRC/${PKG}.src.rpm ]; then
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- mv ${PREFIX}/RPM/SRC/${PKG}.src.rpm ${PREFIX}/RPM/PKG/${PKG}.src.rpm 2>/dev/null || true
- fi
- rm -f ${PREFIX}/RPM/SRC/${PKG}.src.rpm 2>/dev/null || true
- fi
- if [ ".$CHECKONLY" != ".yes" ]; then
- @sanity
- @rpm
- if [ ".${TERM}" = .xterm ]; then
- echo "]0;`uname -n | sed -e 's;\..*$;;'` rebuild ${PKG} [`date '+%Y-%m-%d %H:%M:%S'`]rebuild ${PKG}"
- else
- echo "rebuild ${PKG}"
- fi
- # download binary RPM only from local location
- if [ ".${MPX}${RPM}" != . -a ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm -a ".${LOC}" = .. ]; then
- @fetch ${LOC}/${PKG}.${ARCH}-${OS}-${TAG}.rpm ${PREFIX}/RPM/PKG/
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- ${MPX} ${RPM} --checksig ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm | egrep ' md5 ' >/dev/null
- if [ $? -ne 0 ]; then
- echo "obmtool:WARNING: removing damaged file ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm (md5)" 1>&2
- rm -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>/dev/null || true
- fi
- fi
- fi
- # download source RPM only if binary RPM is missing, too
- if [ ".${MPX}${RPM}" != . -a ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm -a ! -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- for retrygaps in 1 4 16; do
- @fetch ${LOC}/${PKG}.src.rpm ${PREFIX}/RPM/PKG/
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- ${MPX} ${RPM} --checksig ${PREFIX}/RPM/PKG/${PKG}.src.rpm | egrep ' md5 ' >/dev/null
- if [ $? -ne 0 ]; then
- echo "obmtool:WARNING: removing damaged file ${PREFIX}/RPM/PKG/${PKG}.src.rpm (md5)" 1>&2
- rm -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm 2>/dev/null || true
- fi
- fi
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- break
- fi
- sleep $retrygaps
- done
- fi
- # build binary from source
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm -a ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- BUILDUSER=`${MPX} ${RPM} --eval '%{?l_musr:%{l_musr}}'`
- BUILDEXEC="${MPX} ${RPM} --rebuild $@ ${PREFIX}/RPM/PKG/${PKG}.src.rpm 2>&1"
- BUILDEXEC=`echo ${BUILDEXEC} | sed \
- -e 's;--\(define\) *\([^=][^=]*\)=\([^ ][^ ]*\);--\\1 \\"\2 \3\\";g' \
- -e 's;--\(use_[^=][^=]*\)=\([^ ][^ ]*\);--define \\"\1 \2\\";g' \
- -e 's;--\(with\)=;--\1 ;g' \
- -e 's;--\(without\)=;--\1 ;g' \
- -e 's;--\(tag\)=;--\1 ;g' \
- `
- [ ".${debug}" = .1 ] && echo "DEBUG: rebuild: BUILDEXEC=${BUILDEXEC}"
- if [ ".${BUILDUSER}" = . ]; then
- ( "${BUILDEXEC}" ) | tee /tmp/${PRG}-${PKG}.rebuild.log
- else
- su "${BUILDUSER}" -c "${BUILDEXEC}" | tee /tmp/${PRG}-${PKG}.rebuild.log
- fi
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- echo "obmtool:WARNING: rebuild failure. Missing ${PREFIX}/RPM/PKG/${PKG}.src.rpm" 1>&2
- fi
- echo "rebuild ${PKG} $?" >>/tmp/${PRG}.log
- fi
- if [ ".${TERM}" = .xterm ]; then
- echo "]0;`uname -n | sed -e 's;\..*$;;'`:$0"
- fi
- fi
-}
-
-#force rebuild
-@forcere ()
-{
- @wiperpm "$@"
- @rebuild "$@"
-}
-
-#install, rebuilds if necessary, forcibly overwrite existing
-@forcein ()
-{
- @locate "$@"
- TRACK="${TRACK} ${PKG}"
- if [ ".$CHECKONLY" != ".yes" ]; then
- @sanity
- echo "forcein ${PKG}"
- if [ ".${MPX}${RPM}" = . ]; then
- echo "obmtool:ERROR: rpm multiplexer/binary missing" 1>&2
- exit 1
- fi
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- ${MPX} ${RPM} --checksig ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm | egrep ' md5 ' >/dev/null
- if [ $? -ne 0 ]; then
- echo "obmtool:WARNING: removing damaged file ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm (md5)" 1>&2
- rm -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>/dev/null || true
- fi
- fi
- @rebuild "$@"
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- ${MPX} ${RPM} -Uvh --oldpackage --nodeps --force ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>&1 | tee /tmp/${PRG}-${PKG}.forcein.log
- else
- echo "obmtool:WARNING: forcein failure. Missing ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm" 1>&2
- fi
- echo "forcein ${PKG} $?" >>/tmp/${PRG}.log
- fi
-}
-
-#fetch a RPM (or .sh)
-@fetch ()
-{
- [ ".${debug}" = .1 ] && echo "DEBUG: fetch: requested that $1 is downloaded to $2"
- echo "$1 $2" | egrep '\*' >/dev/null && return 1 # short circuit for unsupported wildcards
-
- url=`echo "$1" | sed -e 's;^\./;file://././;'` # revamp file:// URI to look like an URL
- dst=`echo "$2" | sed -e 's;/$;;'`
-
- # determine whether URL rewriting is active
- if [ ".${MPX}" != . ]; then
- rewrite=1
- echo "$url" | ${EGREP} >/dev/null '^file://' && rewrite=0
- ${MPX} register --printstatus >/dev/null 2>&1 || rewrite=0
- if [ $rewrite -eq 1 ]; then
- url=`${MPX} register --rewriteurls "$url"`
- fi
- fi
-
- prot=`echo $url | sed -e 's;^\([^:]*\)://\([^/]*\)/\(.*\)/\([^/]*\)$;\1;'`
- upah=`echo $url | sed -e 's;^\([^:]*\)://\([^/]*\)/\(.*\)/\([^/]*\)$;\2;'`
- dire=`echo $url | sed -e 's;^\([^:]*\)://\([^/]*\)/\(.*\)/\([^/]*\)$;\3;'`
- file=`echo $url | sed -e 's;^\([^:]*\)://\([^/]*\)/\(.*\)/\([^/]*\)$;\4;'`
-
- typ=1
- echo "$upah" | ${EGREP} >/dev/null '@' && typ=2
- echo "$upah" | ${EGREP} >/dev/null ':.*@' && typ=3
- case $typ in
- 3) user=`echo $upah | sed -e 's;^\([^:]*\):\([^@]*\)@\(.*\)$;\1;'`
- pass=`echo $upah | sed -e 's;^\([^:]*\):\([^@]*\)@\(.*\)$;\2;'`
- host=`echo $upah | sed -e 's;^\([^:]*\):\([^@]*\)@\(.*\)$;\3;'`
- ;;
- 2) user=`echo $upah | sed -e 's;^\([^@*]\)@\(.*\)$;\1;'`
- pass="${username:-${USERNAME}}_obmtool"
- host=`echo $upah | sed -e 's;^\([^@*]\)@\(.*\)$;\2;'`
- ;;
- 1) user="anonymous"
- pass="${username:-${USERNAME}}_obmtool"
- host="$upah"
- ;;
- esac
- [ ".$user" = . ] && user="$username"; unoa=`echo $user | sed -e 's;@;%40;g'`
- [ ".$pass" = . ] && pass="$password"; pnoa=`echo $pass | sed -e 's;@;%40;g'`
- url="$prot://$unoa:$pnoa@$host/$dire/$file"
- [ ".${debug}" = .1 ] && echo "DEBUG: fetch: url=$url prot=$prot user=$user unoa=$unoa pass=$pass pnoa=$pnoa host=$host dire=$dire file=$file"
-
- [ ".${debug}" = .1 ] && echo "DEBUG: fetch: checking whether \"$dst/$file\" already present"
- [ -f "$dst/$file" ] && return 0
-
- if [ ".$prot" = .file ]; then
- [ ".${debug}" = .1 ] && echo "DEBUG: fetch: trying local link \"$dire/$file\" to \"$dst/$file\""
- ln "$dire/$file" "$dst/$file" 2>/dev/null
- [ $? -eq 0 -a -f "$dst/$file" ] && return 0
- [ ".${debug}" = .1 ] && echo "DEBUG: fetch: trying local copy \"$dire/$file\" to \"$dst/$file\""
- cp "$dire/$file" "$dst/$file" 2>/dev/null
- [ $? -eq 0 -a -f "$dst/$file" ] && return 0
- return 1
- else
- remainder=`echo ${dltools:-${DLTOOLS:-openpkg:curl:wget:lftp:ftp:lynx:w3m:ncftpget:ncftp}} | sed -e 's;:; ;g'`
- for tool in $remainder; do
- if [ ".$tool" = .openpkg ]; then
- TOOL="$PREFIX/lib/openpkg/curl"
- else
- @findtool $tool
- fi
- if [ -x "$TOOL" ]; then
- [ ".${debug}" = .1 ] && echo "DEBUG: fetch: trying $tool -> \"$TOOL\""
- case $tool in
- openpkg) ( cd $dst || exit 1
- $TOOL -o $file $url
- ) ;;
- curl) ( cd $dst || exit 1
- $TOOL -o $file $url
- ) ;;
- wget) ( cd $dst || exit 1
- $TOOL $url
- ) ;;
- lftp) ( cd $dst || exit 1
- ( echo "cd $dire"; echo "get $file" ) | $TOOL -u $user,$pass $host
- ) ;;
- ftp) ( cd $dst || exit 1
- $TOOL -? </dev/null 2>&1 | grep ftp:// >/dev/null
- if [ $? -eq 0 ]; then
- $TOOL -n $url
- else
- ( echo "user $user $pass"; echo "cd $dire"; echo "bin"; echo "get $file" ) | ftp -n $host
- fi
- ) ;;
- lynx) ( cd $dst || exit 1
- $TOOL --source $url >$file
- ) ;;
- w3m) ( cd $dst || exit 1
- $TOOL -no-proxy -dump_source -pauth "$unoa:$pnoa" "$prot://$host/$dire/$file" >$file
- ) ;;
- ncftpget) ( cd $dst || exit 1
- $TOOL $url
- ) ;;
- ncftp) ( cd $dst || exit 1
- ( echo "cd $dire"; echo "bin"; echo "get $file" ) | $TOOL -u $user -p $pass $host
- ) ;;
- esac
- fi
- [ -s "$dst/$file" ] && return 0
- done
- fi
- rm "$dst/$file"
- return 1
-}
-
-#install, rebuilds if necessary
-@install ()
-{
- ARGS="$@"
- @locate "$@"
- TRACK="${TRACK} ${PKG}"
- # FIXME compensate architectural bug of obmtool 1.3[12] placing .src.rpm files into RPM/SRC
- if [ -f ${PREFIX}/RPM/SRC/${PKG}.src.sh ]; then
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.sh ]; then
- mv ${PREFIX}/RPM/SRC/${PKG}.src.sh ${PREFIX}/RPM/PKG/${PKG}.src.sh 2>/dev/null || true
- fi
- rm -f ${PREFIX}/RPM/SRC/${PKG}.src.sh 2>/dev/null || true
- fi
- # FIXME compensate architectural bug of obmtool 1.3[12] placing .src.rpm files into RPM/SRC
- if [ -f ${PREFIX}/RPM/SRC/${PKG}.src.rpm ]; then
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- mv ${PREFIX}/RPM/SRC/${PKG}.src.rpm ${PREFIX}/RPM/PKG/${PKG}.src.rpm 2>/dev/null || true
- fi
- rm -f ${PREFIX}/RPM/SRC/${PKG}.src.rpm 2>/dev/null || true
- fi
- if [ ".$CHECKONLY" != ".yes" ]; then
- @sanity
- #check for special package "openpkg", detect new or broken hierarchy and bootstrap
- echo "${PKG}" | ${EGREP} >/dev/null '^openpkg-[^-]+-[^-]+$'
- if [ $? -eq 0 ]; then
- [ ".${debug}" = .1 ] && echo "DEBUG: checking whether instance below ${PREFIX} is bootstrapped"
- @rpm
- if [ ".${MPX}${RPM}" = . ]; then
- echo "obmtool:NOTICE: did not find openpkg/rpm executable. Checking/fetching binary sh."
- @fetch ${LOC}/${PKG}.${ARCH:-*}-${OS:-*}-${TAG:-*}.sh ${PREFIX}/RPM/PKG/
- @fetch ${LOC}/${PKG}.${ARCH:-*}-${OS:-*}-${TAG:-*}.rpm ${PREFIX}/RPM/PKG/ #just to be complete
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH:-*}-${OS:-*}-${TAG:-*}.sh ]; then
- echo "obmtool:NOTICE: did not find binary sh. Checking/fetching source sh."
- @fetch ${LOC}/${PKG}.src.sh ${PREFIX}/RPM/PKG/
- @fetch ${LOC}/${PKG}.src.rpm ${PREFIX}/RPM/PKG/ #just to be complete
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.sh ]; then
- echo "obmtool:ERROR: please download ${LOC}/${PKG}.src.sh to ${PREFIX}/RPM/PKG/ manually and restart ${PRG}" 1>&2
- exit 1
- fi
- shift
- rm -f ${PREFIX}/RPM/TMP/${PKG}.src.sh 2>/dev/null || true
- if [ ! -f ${PREFIX}/RPM/TMP/${PKG}.src.sh ]; then
- ln ${PREFIX}/RPM/PKG/${PKG}.src.sh ${PREFIX}/RPM/TMP/${PKG}.src.sh 2>/dev/null || true
- fi
- if [ ! -f ${PREFIX}/RPM/TMP/${PKG}.src.sh ]; then
- cp ${PREFIX}/RPM/PKG/${PKG}.src.sh ${PREFIX}/RPM/TMP/${PKG}.src.sh 2>/dev/null || true
- fi
- if [ ! -f ${PREFIX}/RPM/TMP/${PKG}.src.sh ]; then
- echo "obmtool:ERROR: cannot create ${PREFIX}/RPM/TMP/${PKG}.src.sh" 1>&2
- exit 1
- fi
- ( cd ${PREFIX}/RPM/TMP && TMPDIR=${PREFIX}/RPM/TMP sh ${PKG}.src.sh $@ 2>&1 | tee /tmp/${PRG}-${PKG}.rebuild.log )
- if [ $? -ne 0 ]; then
- echo "obmtool:ERROR: building bootstrap from source using \"${PREFIX}/RPM/TMP/${PKG}.src.sh\" failed" 1>&2
- exit 1
- fi
- fi
- ALL=`( cd ${PREFIX}/RPM/PKG && echo ${PKG}.${ARCH:-*}-${OS:-*}-${TAG:-*}.sh )`
- for i in $ALL; do
- if [ ".`
- ${EGREP} <${PREFIX}/RPM/PKG/$i . \
- | sed -e '/parse command line options/,$d' \
- | egrep -v '^ *#' \
- | egrep '^(p|prefix|l_prefix)=' \
- | sed -e 's;^[^=]*=.;;' -e 's;.$;;'`" = ".${PREFIX}" ]; then
- ( cd /tmp && sh ${PREFIX}/RPM/PKG/${i} 2>&1 | tee /tmp/${PRG}-${PKG}.install.log )
- if [ $? -ne 0 ]; then
- echo "obmtool:WARNING: installing bootstrap from binary \"${PREFIX}/RPM/PKG/${i}\" failed" 1>&2
- fi
- break;
- fi
- done
- @rpm
- if [ ".${MPX}${RPM}" = . ]; then
- echo "obmtool:ERROR: bootstrapping failed" 1>&2
- exit 1
- fi
- else
- if [ ".${TAGFMT}" = . ]; then
- ARGS="$1"
- else
- ARGS="$1 --tag=${TAGFMT}"
- fi
- fi
- fi
- echo "install ${PKG}"
- @rpm
- if [ ".${MPX}${RPM}" = . ]; then
- echo "obmtool:ERROR: rpm multiplexer/binary missing" 1>&2
- exit 1
- fi
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- ${MPX} ${RPM} --checksig ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm | egrep ' md5 ' >/dev/null
- if [ $? -ne 0 ]; then
- echo "obmtool:WARNING: removing damaged file ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm (md5)" 1>&2
- rm -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>/dev/null || true
- fi
- fi
- ${MPX} ${RPM} -q >/dev/null ${PKG}
- if [ $? -eq 0 ]; then
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- MD5QP=`${MPX} ${RPM} -qp --qf '%{SIGMD5}' ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm`
- MD5DB=`${MPX} ${RPM} -q --qf '%{SIGMD5}' ${PKG}`
- if [ ".$MD5QP" != ".$MD5DB" ]; then
- echo "obmtool:WARNING: replacing installed ${PKG} with same name-version-release file having different message digest" 1>&2
- ${MPX} ${RPM} -Uvh --force --nodeps ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>&1 | tee /tmp/${PRG}-${PKG}.install.log
- fi
- fi
- else
- @rebuild ${ARGS}
- if [ -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- ${MPX} ${RPM} -Uvh --oldpackage --nodeps ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm 2>&1 | tee /tmp/${PRG}-${PKG}.install.log
- else
- echo "obmtool:WARNING: install failure. Missing ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm" 1>&2
- fi
- echo "install ${PKG} $?" >>/tmp/${PRG}.log
- fi
- fi
-}
-
-#trigger force rebuild, force install
-@trigger ()
-{
- @forcere "$@"
- @forcein "$@"
-}
-
-@prolog ()
-{
- ##
- ## obmtool has the call to the prolog() function hardcoded as the
- ## prolog of the %common scriplet. It is placed immediately after the
- ## obmtool.func has been read.
- ##
- #M prolog() initializes variables which can be used throughout the scriptlets
- #M
- #M PRG = name of the program as seen in $0 of the obm but with leading path stripped off
- #M CMD = name of the command as seen in $1 of the obm
- #M URL = URL to private packages
- #M TRACK = whitespace separated list of tracked packages, preinitialized to empty string
- #M EGREP = name of egrep(1) program
- #M CHECKONLY = yes|no; set to yes if --query option given
- #M ERASESURPLUS = yes|no; set to yes if --force option given
- #M HASX11 = yes|no; set to yes if X11 client libs available (xauth probed)
- #M PREFIX = /openpkg; default can be overridden in %common scriptlet
- #M NODE = dv1.dev.de.cw.net; uname -n
-
- # dump debug data
- if [ ".${debug}" = .1 ]; then
- echo "DEBUG: prolog: prg=\"$prg\"";
- echo "DEBUG: prolog: silent=\"$silent\" verbose=\"$verbose\" debug=\"$debug\" help=\"$help\"";
- echo "DEBUG: prolog: query=\"$query\" force=\"$force\"";
- echo "DEBUG: prolog: conf=\"$conf\" logs=\"$logs\" tmpdir=\"$tmpdir\"";
- echo "DEBUG: prolog: cmd=\"$cmd\" cmdargs=\"$cmdargs\"";
- fi
-
- PRG="`echo ${prg} | sed -e 's/.*\///'`"
- CMD="${cmd}"
-
- URL=""
- TRACK=""
-
- if [ -x /usr/xpg4/bin/egrep ]; then
- EGREP=/usr/xpg4/bin/egrep
- else
- EGREP=egrep
- fi
-
- if [ -d /usr/ccs/bin ]; then
- PATH=/usr/ccs/bin:${PATH}
- export PATH
- fi
-
- CHECKONLY="no"
- if [ ".${query}" = .1 ]; then
- CHECKONLY="yes"
- fi
-
- ERASESURPLUS="no"
- if [ ".${force}" = .1 ]; then
- ERASESURPLUS="yes"
- fi
-
- HASX11=""
- if [ -x /usr/X11R6/bin/xauth -o -x /usr/openwin/bin/xauth -o -x /usr/bin/X11/xauth ]; then
- # search for include and Intrinsic.h taken from x11-1.3.1-1.3.1
- # search for include directory
- for incdir in \
- /usr/openwin/include \
- /usr/openwin/share/include \
- /usr/[xX]/include \
- /usr/[xX]11*/include \
- /usr/[xX]386/include \
- /usr/[xX]ree86/include \
- /usr/include \
- /usr/include/[xX] \
- /usr/include/[xX]11* \
- /usr/include/[xX]386 \
- /usr/include/[xX]free86 \
- /usr/local/include \
- /usr/local/include/[xX] \
- /usr/local/include/[xX]11* \
- /usr/local/include/[xX]386 \
- /usr/local/include/[xX]free86 \
- /usr/local/[xX]/include \
- /usr/local/[xX]11*/include \
- /usr/local/[xX]386/include \
- /usr/local/[xX]ree86/include \
- /usr/athena/include \
- /usr/unsupported/include \
- ; do
- if [ -f "$incdir/X11/Intrinsic.h" ]; then
- x11_incdir="$incdir"
- HASX11="yes"
- break
- fi
- done
- fi
-
- # remove double slashes and trailing slashes
- PREFIX=`echo "${PREFIX}" | sed -e 's;//*;/;g' -e 's;/$;;'`
-
- NODE="`uname -n`"
-
- @archostag
- echo "${PRG}:${CMD}:NOTICE: restart `date '+%Y-%m-%d %H:%M:%S'`" >>/tmp/${PRG}.log
-}
-
-@epilog ()
-{
- ##
- ## obmtool has the call to the epilog() function hardcoded as the
- ## epilog of the %common scriplet. It is placed immediately after the
- ## %common scriptlet.
- ##
- #M epilog() initializes variables which can be used throughout the scriptlets
-
- # dump debug data
- if [ ".${debug}" = .1 ]; then
- echo "DEBUG: epilog: prg=\"$prg\"";
- echo "DEBUG: epilog: silent=\"$silent\" verbose=\"$verbose\" debug=\"$debug\" help=\"$help\"";
- echo "DEBUG: epilog: query=\"$query\" force=\"$force\"";
- echo "DEBUG: epilog: conf=\"$conf\" logs=\"$logs\" tmpdir=\"$tmpdir\"";
- echo "DEBUG: epilog: cmd=\"$cmd\" cmdargs=\"$cmdargs\"";
- fi
-
- @archostag
-
- # check whether a obsolete obmtool.conf tries to use us
- error=0
- for var in CWUSER CWGROUP TARGET_PATH TAGFMT CWMUID CWRUID CWNUID CWMGID CWRGID CWNGID; do
- val=`eval "echo \\$${var}"`
- if [ ".${val}" != . ]; then
- echo "obmtool:WARNING: obsolete variable ${var} set to \"${val}\"" 1>&2
- error=1
- fi
- done
- if [ ${error} -ne 0 ]; then
- echo "obmtool:ERROR: variables used which are no longer supported by obmtool" 1>&2
- exit 1
- fi
-
-}
-
-@hasfeature ()
-{
- missing=""
- for feature in "$@"; do
- case $feature in
- TAGFMT) ;;
- USE) ;;
- DEFINE) ;;
- MIRROR) ;;
- DLTOOLS) ;;
- REGISTRY) ;;
- *) missing="$missing $feature";;
- esac
- done
- if [ ".$missing" != . ]; then
- echo "obmtool:WARNING: ${file} requires \"$missing\" feature(s) which this obmtool does not provide" 1>&2
- return 1
- fi
- return 0
-}
-
-@locationid ()
-{
- echo "obmtool:ERROR: ${file} calls locationid which is deprecated by archostag()" 1>&2
- exit 1
-}
-
-@tagfmtfromargs ()
-{
- TAGFMT=""
- for i in "$@"; do
- case $i in
- --tag=*) TAGFMT=`echo $i | sed -e 's;^--tag=;;'` ;;
- esac
- done
-}
-
-@archostag ()
-{
- #M archostag() initializes variables which can be used throughout the scriptlets
- #M they are queried from a rpm installed below PREFIX, if available.
- #M Otherwise they are set to an empty string.
- #M
- #M TAG = cw; locationid (OpenPKG v1.x) or tag (OpenPKG v2.x)
- #M ARCH = ix86; architecture
- #M OS = freebsd4.8; operating system
-
- @tagfmtfromargs "$@"
- @rpm
- if [ ".${MPX}${RPM}" != . ]; then
- ARCH=`${MPX} ${RPM} -q --qf "%{ARCH}" openpkg`
- OS=`${MPX} ${RPM} --eval "%{?l_host_os:%{l_host_os}}"`
- if [ ".${OS}" = . ]; then
- OS=`${MPX} ${RPM} -q --qf "%{OS}" openpkg`
- fi
- if [ ".${TAGFMT}" = . ]; then
- TAG=`${MPX} ${RPM} --eval '%{?l_tag:%{l_tag}}%{!?l_tag:%{l_location}}'`
- else
- TAG=`${MPX} ${RPM} --define "l_tag_fmt ${TAGFMT}" --eval '%{?l_tag:%{l_tag}}%{!?l_tag:%{l_location}}'`
- fi
- else
- ARCH=""
- OS=""
- TAG=""
- fi
-
-}
-
-@sanity ()
-{
- # sanity check
- if [ ".$PREFIX" = . ]; then
- echo "obmtool:ERROR: sanity check asserted PREFIX is set but it is empty" 1>&2
- exit 1
- fi
-
- # check whether SRC|PKG|TMP either exist or can be created and are writable
- error=0
- for s in SRC PKG TMP; do
- d="$PREFIX/RPM/$s"
- @mkdirp "$d"
- if [ ! -d "$d" ]; then
- echo "obmtool:WARNING: directory \"$d\" does not exist after attempt to create it"
- error=1
- fi
- touch "$d/.writetest" 2>/dev/null
- if [ $? -ne 0 ]; then
- echo "obmtool:WARNING: directory \"$d\" not writable"
- error=1
- fi
- rm "$d/.writetest"
- done
- if [ ${error} -ne 0 ]; then
- echo "obmtool:ERROR: directory structure below prefix \"$PREFIX\" not accessible" 1>&2
- exit 1
- fi
-}
-
-@status ()
-{
- ${PREFIX}/etc/rc all status | grep active
-}
-
-@check ()
-{
- INSTALL=""
- MISSSRC=""
- MISSPKG=""
- MISSING=""
- SURPLUS=""
- @rpm
- if [ ".${MPX}${RPM}" = . ]; then
- MISSING="${TRACK}"
- else
- ALL=`${MPX} ${RPM} -qa`
- for PKG in ${TRACK}
- do
- ${MPX} ${RPM} -q ${PKG} 2>&1 >/dev/null
- if [ $? -eq 0 ]; then
- INSTALL="${INSTALL} ${PKG}"
- ALL=`echo "${ALL}" | ${EGREP} -v "^${PKG}"`
- else
- MISSING="${MISSING} ${PKG}"
- fi
- echo "${PKG}" | ${EGREP} >/dev/null '^openpkg-[^-]+-[^-]+$'
- if [ $? -eq 0 ]; then
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.sh ]; then
- MISSPKG="${MISSPKG} ${PKG}.${ARCH}-${OS}-${TAG}.sh"
- fi
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- MISSPKG="${MISSPKG} ${PKG}.${ARCH}-${OS}-${TAG}.rpm"
- fi
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.sh ]; then
- MISSSRC="${MISSSRC} ${PKG}.src.sh"
- fi
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- MISSSRC="${MISSSRC} ${PKG}.src.rpm"
- fi
- else
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.${ARCH}-${OS}-${TAG}.rpm ]; then
- MISSPKG="${MISSPKG} ${PKG}"
- fi
- if [ ! -f ${PREFIX}/RPM/PKG/${PKG}.src.rpm ]; then
- MISSSRC="${MISSSRC} ${PKG}"
- fi
- fi
- done
- fi
- if [ ! -d ${PREFIX}/RPM/PKG ]; then
- MISSPKG="all, ${PREFIX}/RPM/PKG empty"
- MISSSRC="all, ${PREFIX}/RPM/PKG empty"
- fi
-
- if [ ".${ALL}" != "." ]; then
- for i in ${ALL}
- do
- echo "$i" | ${EGREP} "^gpg-pubkey-" 2>&1 >/dev/null || SURPLUS="${SURPLUS}${SURPLUS:+ }$i"
- done
- if [ ".${ERASESURPLUS}" = ".yes" ]; then
- echo "ERASING: ${SURPLUS:-none}"
- if [ ".${SURPLUS}" != . ]; then
- ${MPX} ${RPM} -e ${SURPLUS} --allmatches 2>&1 >/dev/null
- fi
- fi
- fi
-
- SUMMARY=""
- DATE="`date '+%Y-%m-%d/%H:%M:%S'`"
- if [ ".${TERM}" = .xterm ]; then
- SUMMARY="${SUMMARY}]0;NODE=${NODE}; DATE=${DATE}; DONE"
- fi
- SUMMARY="${SUMMARY}NODE=${NODE}; CMD=${CMD}; DATE=${DATE}; HASX11=${HASX11}; DONE"
-
- INSTALL="`echo ${INSTALL}`"
- MISSSRC="`echo ${MISSSRC}`"
- MISSPKG="`echo ${MISSPKG}`"
- MISSING="`echo ${MISSING}`"
- SURPLUS="`echo ${SURPLUS}`"
-
- echo "INSTALL: ${INSTALL:-none}"
- echo "MISSSRC: ${MISSSRC:-none}"
- echo "MISSPKG: ${MISSPKG:-none}"
- echo "MISSING: ${MISSING:-none}"
- echo "SURPLUS: ${SURPLUS:-none}"
- echo "SUMMARY: ${SUMMARY:-none}"
-}
-## } obmtool.func # is now embedded. This line used as cutting point. Do not remove.
-
diff --git a/obmtool.conf b/obmtool.conf
deleted file mode 100644
index 6e40573..0000000
--- a/obmtool.conf
+++ /dev/null
@@ -1,191 +0,0 @@
-##
-## obmtool.conf -- OpenPKG poor man's Boot, Build & Management Tool Configuration
-##
-## Package listing for Kolab
-##
-## based on Ralf S. Engelschall's "obmtool.conf -- Development Tool Configuration"
-## Copyright (c) 2004-2006 Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
-## Copyright (c) 2003 Thomas Lotterer <thomas@lotterer.net>
-##
-
-%common
- @hasfeature TAGFMT || exit # require obmtool to support TAGFMT
- TMPDIR=/var/tmp # large tmp with 300MB space
- URL="ftp://ftp.klaralvdalens-datakonsult.se/pub/kolab/server/current/2.1" # used for non-ftp://ftp.openpkg.org/ packages
- USERNAME=""
- for opt in $cmdargs ; do
- arg=`echo "${opt}" | sed -e 's;^[^=]*=*;;'`
- opt=`echo "${opt}" | sed -e 's;=.*$;;'`
- case $opt in
- -u|--user) USERNAME="$arg";;
- --url) URL="$arg";;
- esac
- done
-
-%kolab
- echo "---- boot/build ${NODE} %${CMD} ----"
- kolab_version="2.1.0+cvs";
- PREFIX=/${CMD};
- loc='' # '' (empty) for ftp.openpkg.org, '=' for URL, './' for CWD or absolute path
- plusloc='+'
- altloc='='
- with_genuine=no
-
- # Check for presence of libgcrypt development files in the host system
- libgcrypt_pfx=`eval libgcrypt-config --prefix 2>/dev/null`;
- if test -n "$libgcrypt_pfx" ; then
- echo "libgcrypt installation in $libgcrypt_pfx detected";
- echo "Please deinstall it or move libgcrypt-config away";
- echo "while building Kolab"
- exit -1;
- fi
-
- # start from scratch or upgrade within 2.0.x
- @install ${loc}openpkg-2.5.4-2.5.4 \
- --tag="kolab" \
- --prefix="${PREFIX}" \
- --user="${CMD}" --group="${CMD}" \
- --muid="19414" --ruid="19415" --nuid="19416" \
- --mgid="19414" --rgid="19415" --ngid="19416"
-
- if test -n "$USERNAME" ; then
- $PREFIX/bin/openpkg register --mode=post --user=$USERNAME
- $PREFIX/bin/openpkg register --printstatus && echo "Please associate the instance now. Then RETURN to continue." && read DUMMY
- fi
-
- # Get rid of gdbm
- @wiperpm gdbm-1.8.3-2.5.0
- @wiperpm dbtool-1.6-2.5.0
- $PREFIX/bin/openpkg rpm -e --nodeps gdbm dbtool
-
- @install ${loc}make-3.80-2.5.0
- @install ${loc}binutils-2.16.1-2.5.1
- @install ${loc}gcc-4.0.2-2.5.0
- @install ${altloc}fsl-1.7.0-2.20070303
- @install ${loc}mm-1.4.0-2.5.0
- @install ${loc}perl-5.8.7-2.5.1
- @install ${loc}perl-openpkg-5.8.7-2.5.0
- @install ${loc}perl-conv-5.8.7-2.5.0
- @install ${loc}lzo-2.01-2.5.0 # PENDING(steffen) Check if we need lzop-1.0
- @install ${loc}readline-5.0.5-2.5.0
- @install ${loc}sharutils-4.5.1-2.5.0
- @install ${loc}ncurses-5.5.20051015-2.5.0
- @install ${loc}bzip2-1.0.3-2.5.0
- @install ${loc}pcre-6.4-2.5.0
- @install ${loc}grep-2.5.1a-2.5.0
- @install ${loc}texinfo-4.8-2.5.1
- @install ${loc}diffutils-2.8.7-2.5.0
- @install ${loc}gzip-1.3.5-2.5.1
- @install ${loc}zlib-1.2.3-2.5.0
- @install ${loc}expat-1.95.8-2.5.0
- @install ${loc}perl-term-5.8.7-2.5.0
- @install ${loc}perl-ds-5.8.7-2.5.0
- @install ${loc}perl-stats-5.8.7-2.5.0
- @install ${loc}perl-time-5.8.7-2.5.0
- @install ${loc}perl-util-5.8.7-2.5.0
- @install ${loc}perl-parse-5.8.7-2.5.0
- @install ${loc}perl-sys-5.8.7-2.5.0
- @install ${loc}openssl-0.9.8a-2.5.4
- @install ${loc}perl-mail-5.8.7-2.5.0
- @install ${loc}perl-crypto-5.8.7-2.5.0
- @install ${loc}perl-xml-5.8.7-2.5.0
- @install ${loc}perl-net-5.8.7-2.5.0
- @install ${loc}perl-comp-5.8.7-2.5.0
- @trigger ${loc}perl-ssl-5.8.7-2.5.0
- @install ${loc}perl-www-5.8.7-2.5.1
- @install ${loc}perl-dns-5.8.7-2.5.0
- @trigger ${altloc}imap-2004g-2.5.0_kolab --with=annotate
- @install ${loc}procmail-3.22-2.5.0
- @install ${loc}db-4.3.29.0-2.5.0
- @install ${altloc}openldap-2.3.29-2.20061110_kolab
- @install ${loc}m4-1.4.3-2.5.0
- @install ${loc}bison-2.1-2.5.0
- @install ${loc}flex-2.5.31-2.5.0
- @install ${loc}groff-1.19.2-2.5.0
- @trigger ${loc}sasl-2.1.21-2.5.0 --with=ldap --with=login
- @install ${loc}getopt-20051005-2.5.0
- @trigger ${loc}proftpd-1.3.0rc2-2.5.0 --with=ldap
- #@install ${loc}gdbm-1.8.3-2.5.0
- #@install ${plusloc}dbtool-1.6-2.5.0
- @trigger ${altloc}postfix-2.2.5-2.5.0_kolab --with=ldap --with=sasl --with=ssl
- @install ${loc}perl-ldap-5.8.7-2.5.0
- @install ${loc}perl-db-5.8.7-2.5.1
- @install ${loc}config-20051002-2.5.0
- @trigger ${altloc}imapd-2.2.12-2.5.0_kolab2 --with=group --with=ldap --with=annotate --with=atvdom --with=skiplist --with=goodchars --with=folderchar --with=morelogging # Drop morelogging if you dont want/need it
- @install ${loc}libiconv-1.10-2.5.0
- @install ${loc}autoconf-2.59-2.5.0
- @install ${loc}automake-1.9.6-2.5.0
- @install ${loc}gettext-0.14.5-2.5.0
- @install ${altloc}file-4.15-2.5.0_kolab2
- @install ${loc}openpkg-tools-0.8.47-2.5.0
- @install ${loc}patch-2.5.9-2.5.0
- @install ${loc}sed-4.1.4-2.5.0
- @install ${loc}libxml-2.6.22-2.5.0
- @install ${loc}libxslt-1.1.15-2.5.1 # WARNING: Remove libgcrypt development files before building!
- @trigger ${altloc}apache-1.3.33-2.5.6_kolab2 \
- --without=gdbm_ndbm \
- --with=mod_auth_ldap \
- --with=mod_dav \
- --with=mod_php \
- --with=mod_php_zlib \
- --with=mod_php_bdb \
- --with=mod_php_gettext \
- --with=mod_php_imap \
- --with=mod_php_openldap \
- --with=mod_php_xml \
- --with=mod_php_dom \
- --with=mod_ssl \
- --with=mod_php_mbstring
- @trigger ${altloc}php-4.4.0-2.5.2_kolab2 \
- --with=zlib \
- --with=bdb \
- --with=gettext \
- --with=imap \
- --with=openldap \
- --with=pear \
- --with=xml \
- --with=dom \
- --with=ssl \
- --with=mbstring
- @install ${altloc}php-smarty-2.6.10-20051003
- @install ${loc}gmp-4.1.4-2.5.0
- @install ${altloc}spamassassin-3.1.0-2.5.1_kolab
- @install ${altloc}amavisd-2.3.3-2.5.0_kolab
- @trigger ${loc}curl-7.15.0-2.5.2
- @install ${loc}bc-1.06-2.5.0
- @install ${loc}pkgconfig-0.19-2.5.0
- @install ${altloc}clamav-0.90.3-20070531_kolab
- @install ${altloc}perl-kolab-5.8.7-20070420
- @install ${altloc}kolabd-2.1.0-20070510 --define kolab_version=$kolab_version
- @install ${altloc}kolab-webadmin-2.1.0-20070510 --define kolab_version=$kolab_version
- @install ${altloc}kolab-horde-framework-2.1.0-20070420 --define kolab_version=$kolab_version
- @install ${altloc}kolab-resource-handlers-2.1.0-20070510 --define kolab_version=$kolab_version
- @install ${altloc}kolab-horde-fbview-2.1.0-20070420 --define kolab_version=$kolab_version
- @check
-
- if test ! -e "/usr/bin/kolab" ; then
- echo
- echo "Adding symbolic link to $PREFIX/bin/kolab as /usr/bin/kolab"
- ln -s $PREFIX/bin/kolab /usr/bin/kolab
- fi
-
-
-
-
-
-%dump
- echo "PRG = \"$PRG\""
- echo "CMD = \"$CMD\""
- echo "URL = \"$URL\""
- echo "MIRROR = \"$MIRROR\""
- echo "USERNAME = \"$USERNAME\""
- echo "TRACK = \"$TRACK\""
- echo "EGREP = \"$EGREP\""
- echo "CHECKONLY = \"$CHECKONLY\""
- echo "ERASESURPLUS = \"$ERASESURPLUS\""
- echo "HASX11 = \"$HASX11\""
- echo "PREFIX = \"${PREFIX}\""
- echo "ARCH = \"${ARCH}\""
- echo "OS = \"${OS}\""
- echo "TAG = \"${TAG}\""
- echo "TMPDIR=\"${TMPDIR}\""
diff --git a/php/.cvsignore b/php/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/php/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/php/Makefile b/php/Makefile
deleted file mode 100644
index 4d02ed0..0000000
--- a/php/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/UPD
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=php
-VERSION=4.4.0
-RELEASE=2.5.2
-KOLABRELEASE=2.5.2_kolab2
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-PATCHES = $(KOLABCVSDIR)/php-getacl-backport.patch \
- $(KOLABCVSDIR)/php-imap-annotation.patch \
- $(KOLABCVSDIR)/php-imap-status-current.patch
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(KOLABCVSDIR)/kolab.patch $(PATCHES) Makefile
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/
-
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec \
- --define 'with_zlib yes' \
- --define 'with_bdb yes' \
- --define 'with_gettext yes' \
- --define 'with_imap yes' \
- --define 'with_openldap yes' \
- --define 'with_pear yes' \
- --define 'with_xml yes' \
- --define 'with_dom yes' \
- --define 'with_ssl yes' \
- --define 'with_mbstring yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)-$(VERSION)*
diff --git a/php/kolab.patch b/php/kolab.patch
deleted file mode 100644
index 2a5a33d..0000000
--- a/php/kolab.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- php.spec.orig Wed Dec 7 18:26:35 2005
-+++ php.spec Wed Dec 7 18:26:35 2005
-@@ -37,7 +37,7 @@ Class: BASE
- Group: Language
- License: PHP
- Version: %{V_php}
--Release: 2.5.2
-+Release: 2.5.2_kolab2
-
- # package options
- %option with_bc no
-@@ -104,6 +104,9 @@ Source0: http://static.php.net/www.
- Source1: php.ini
- Patch0: http://www.hardened-php.net/hardening-patch-%{V_php_hardened}.patch.gz
- Patch1: php.patch
-+Patch2: php-getacl-backport.patch
-+Patch3: php-imap-annotation.patch
-+Patch4: php-imap-status-current.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -258,6 +261,9 @@ AutoReqProv: no
- %patch -p1 -P 0
- %endif
- %patch -p0 -P 1
-+ %patch -p1 -P 2
-+ %patch -p1 -P 3
-+ %patch -p0 -P 4
- %{l_shtool} subst \
- %{l_value -s l_prefix l_rpm l_rpmtool} \
- scripts/phpize.in
diff --git a/php/php-getacl-backport.patch b/php/php-getacl-backport.patch
deleted file mode 100644
index 6a2f011..0000000
--- a/php/php-getacl-backport.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -u -r php-4.3.11/ext/imap/php_imap.c php-4.3.11.getacl/ext/imap/php_imap.c
---- php-4.3.11/ext/imap/php_imap.c 2005-01-25 15:23:37.000000000 +0100
-+++ php-4.3.11.getacl/ext/imap/php_imap.c 2005-06-02 13:34:27.412014859 +0200
-@@ -139,6 +139,7 @@
- PHP_FE(imap_get_quotaroot, NULL)
- PHP_FE(imap_set_quota, NULL)
- PHP_FE(imap_setacl, NULL)
-+ PHP_FE(imap_getacl, NULL)
- #endif
-
- PHP_FE(imap_mail, NULL)
-@@ -378,6 +379,21 @@
- /* }}} */
- #endif
-
-+/* {{{ mail_getacl
-+ *
-+ * Mail GET_ACL callback
-+ * Called via the mail_parameter function in c-client:src/c-client/mail.c
-+ */
-+void mail_getacl(MAILSTREAM *stream, char *mailbox, ACLLIST *alist)
-+{
-+ TSRMLS_FETCH();
-+
-+ /* walk through the ACLLIST */
-+ for(; alist; alist = alist->next) {
-+ add_assoc_stringl(IMAPG(imap_acl_list), alist->identifier, alist->rights, strlen(alist->rights), 1);
-+ }
-+}
-+/* }}} */
-
- /* {{{ php_imap_init_globals
- */
-@@ -988,6 +1004,40 @@
- }
- /* }}} */
-
-+/* {{{ proto array imap_getacl(resource stream_id, string mailbox)
-+ Gets the ACL for a given mailbox */
-+PHP_FUNCTION(imap_getacl)
-+{
-+ zval **streamind, **mailbox;
-+ pils *imap_le_struct;
-+
-+ if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &mailbox) == FAILURE) {
-+ ZEND_WRONG_PARAM_COUNT();
-+ }
-+
-+ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
-+
-+ convert_to_string_ex(mailbox);
-+
-+ /* initializing the special array for the return values */
-+ if (array_init(return_value) == FAILURE) {
-+ RETURN_FALSE;
-+ }
-+
-+ IMAPG(imap_acl_list) = return_value;
-+
-+ /* set the callback for the GET_ACL function */
-+ mail_parameters(NIL, SET_ACL, (void *) mail_getacl);
-+ if(!imap_getacl(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox))) {
-+ php_error(E_WARNING, "c-client imap_getacl failed");
-+ zval_dtor(return_value);
-+ RETURN_FALSE;
-+ }
-+
-+ IMAPG(imap_acl_list) = NIL;
-+}
-+/* }}} */
-+
- #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */
-
-
-diff -u -r php-4.3.11/ext/imap/php_imap.h php-4.3.11.getacl/ext/imap/php_imap.h
---- php-4.3.11/ext/imap/php_imap.h 2003-06-13 16:45:36.000000000 +0200
-+++ php-4.3.11.getacl/ext/imap/php_imap.h 2005-06-02 13:42:19.730013114 +0200
-@@ -172,6 +172,7 @@
- PHP_FUNCTION(imap_get_quotaroot);
- PHP_FUNCTION(imap_set_quota);
- PHP_FUNCTION(imap_setacl);
-+PHP_FUNCTION(imap_getacl);
- #endif
-
-
-@@ -202,6 +203,7 @@
- unsigned long status_uidvalidity;
- #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
- zval **quota_return;
-+ zval *imap_acl_list;
- #endif
- ZEND_END_MODULE_GLOBALS(imap)
-
diff --git a/php/php-imap-annotation.patch b/php/php-imap-annotation.patch
deleted file mode 100644
index 5cd28c0..0000000
--- a/php/php-imap-annotation.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-diff -u -r php-4.3.11/ext/imap/php_imap.c php-4.3.11.annotations/ext/imap/php_imap.c
---- php-4.3.11/ext/imap/php_imap.c 2005-06-04 22:06:19.203115601 +0200
-+++ php-4.3.11.annotations/ext/imap/php_imap.c 2005-06-04 21:30:36.000000000 +0200
-@@ -142,6 +142,10 @@
- PHP_FE(imap_setacl, NULL)
- PHP_FE(imap_getacl, NULL)
- #endif
-+#if defined(HAVE_IMAP2005)
-+ PHP_FE(imap_setannotation, NULL)
-+ PHP_FE(imap_getannotation, NULL)
-+#endif
-
- PHP_FE(imap_mail, NULL)
-
-@@ -396,6 +400,27 @@
- }
- /* }}} */
-
-+#if defined(HAVE_IMAP2005)
-+/* {{{ mail_getannotation
-+ *
-+ * Mail GET_ANNOTATION callback
-+ * Called via the mail_parameter function in c-client:src/c-client/mail.c
-+ */
-+void mail_getannotation(MAILSTREAM *stream, ANNOTATION *alist)
-+{
-+ ANNOTATION_VALUES *cur;
-+
-+ TSRMLS_FETCH();
-+
-+ /* walk through the ANNOTATION_VALUES */
-+
-+ for(cur = alist->values; cur; cur = cur->next) {
-+ add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, cur->value, strlen(cur->value), 1);
-+ }
-+}
-+/* }}} */
-+#endif
-+
- /* {{{ php_imap_init_globals
- */
- static void php_imap_init_globals(zend_imap_globals *imap_globals)
-@@ -1041,6 +1066,122 @@
-
- #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */
-
-+#if defined(HAVE_IMAP2005)
-+
-+/* {{{ proto bool imap_setannotation(resource stream_id, string mailbox, string entry, string attr, string value)
-+ Sets an annotation for a given mailbox */
-+PHP_FUNCTION(imap_setannotation)
-+{
-+ zval **streamind, **mailbox, **entry, **attr, **value;
-+ pils *imap_le_struct;
-+ long ret;
-+
-+ // TODO: Use zend_parse_parameters here
-+ if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &streamind, &mailbox, &entry, &attr, &value) == FAILURE) {
-+ ZEND_WRONG_PARAM_COUNT();
-+ }
-+
-+ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
-+
-+ convert_to_string_ex(mailbox);
-+ convert_to_string_ex(entry);
-+ convert_to_string_ex(attr);
-+ convert_to_string_ex(value);
-+
-+ // create annotation object
-+ ANNOTATION *annotation = mail_newannotation();
-+ if (!annotation)
-+ RETURN_FALSE;
-+ annotation->values = mail_newannotationvalue();
-+ if (!annotation->values) {
-+ mail_free_annotation(&annotation);
-+ RETURN_FALSE;
-+ }
-+
-+ // fill in annotation values
-+ annotation->mbox = Z_STRVAL_PP(mailbox);
-+ annotation->entry = Z_STRVAL_PP(entry);
-+ annotation->values->attr = Z_STRVAL_PP(attr);
-+ annotation->values->value = Z_STRVAL_PP(value);
-+
-+ ret = imap_setannotation(imap_le_struct->imap_stream, annotation);
-+
-+ // make sure mail_free_annotation doesn't free our variables
-+ annotation->mbox = NULL;
-+ annotation->entry = NULL;
-+ annotation->values->attr = NULL;
-+ annotation->values->value = NULL;
-+ mail_free_annotation(&annotation);
-+
-+ RETURN_BOOL(ret);
-+}
-+/* }}} */
-+
-+/* {{{ proto array imap_getannotation(resource stream_id, string mailbox, string entry, string attr)
-+ Gets the ACL for a given mailbox */
-+PHP_FUNCTION(imap_getannotation)
-+{
-+ zval **streamind, **mailbox, **entry, **attr;
-+ pils *imap_le_struct;
-+ long ret;
-+
-+ if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &streamind, &mailbox, &entry, &attr) == FAILURE) {
-+ ZEND_WRONG_PARAM_COUNT();
-+ }
-+
-+ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
-+
-+ convert_to_string_ex(mailbox);
-+ convert_to_string_ex(entry);
-+ convert_to_string_ex(attr);
-+
-+ /* initializing the special array for the return values */
-+ if (array_init(return_value) == FAILURE) {
-+ RETURN_FALSE;
-+ }
-+
-+ // fillup calling parameters
-+ STRINGLIST *entries = mail_newstringlist();
-+ if (!entries)
-+ RETURN_FALSE;
-+
-+ STRINGLIST *cur = entries;
-+ cur->text.data = (unsigned char *)cpystr(Z_STRVAL_PP(entry));
-+ cur->text.size = Z_STRLEN_PP(entry);
-+ cur->next = NIL;
-+
-+ STRINGLIST *attributes = mail_newstringlist();
-+ cur = attributes;
-+ cur->text.data = (unsigned char *)cpystr (Z_STRVAL_PP(attr));
-+ cur->text.size = Z_STRLEN_PP(attr);
-+ cur->next = NIL;
-+
-+ /* initializing the special array for the return values */
-+ if (array_init(return_value) == FAILURE) {
-+ mail_free_stringlist(&entries);
-+ mail_free_stringlist(&attributes);
-+ RETURN_FALSE;
-+ }
-+
-+ IMAPG(imap_annotation_list) = return_value;
-+
-+ /* set the callback for the GET_ANNOTATION function */
-+ mail_parameters(NIL, SET_ANNOTATION, (void *) mail_getannotation);
-+ ret = imap_getannotation(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox), entries, attributes);
-+
-+ mail_free_stringlist(&entries);
-+ mail_free_stringlist(&attributes);
-+
-+ if (!ret) {
-+ zval_dtor(return_value);
-+ RETURN_FALSE;
-+ }
-+
-+ IMAPG(imap_annotation_list) = NIL;
-+}
-+/* }}} */
-+
-+#endif /* HAVE_IMAP2005 */
-
- /* {{{ proto bool imap_expunge(resource stream_id)
- Permanently delete all messages marked for deletion */
-diff -u -r php-4.3.11/ext/imap/php_imap.h php-4.3.11.annotations/ext/imap/php_imap.h
---- php-4.3.11/ext/imap/php_imap.h 2005-06-04 22:06:19.206115386 +0200
-+++ php-4.3.11.annotations/ext/imap/php_imap.h 2005-06-04 20:00:58.000000000 +0200
-@@ -168,6 +168,9 @@
- PHP_FUNCTION(imap_thread);
- PHP_FUNCTION(imap_timeout);
-
-+// TODO: Needs fixing in configure in
-+#define HAVE_IMAP2005 1
-+
- #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
- PHP_FUNCTION(imap_get_quota);
- PHP_FUNCTION(imap_get_quotaroot);
-@@ -175,7 +178,10 @@
- PHP_FUNCTION(imap_setacl);
- PHP_FUNCTION(imap_getacl);
- #endif
--
-+#if defined(HAVE_IMAP2005)
-+PHP_FUNCTION(imap_setannotation);
-+PHP_FUNCTION(imap_getannotation);
-+#endif
-
- ZEND_BEGIN_MODULE_GLOBALS(imap)
- char *imap_user;
-@@ -206,6 +212,9 @@
- zval **quota_return;
- zval *imap_acl_list;
- #endif
-+#if defined(HAVE_IMAP2005)
-+ zval *imap_annotation_list;
-+#endif
- ZEND_END_MODULE_GLOBALS(imap)
-
- #ifdef ZTS
diff --git a/php/php-imap-status-current.patch b/php/php-imap-status-current.patch
deleted file mode 100644
index db5a4d4..0000000
--- a/php/php-imap-status-current.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff -u -r -p ext/imap/php_imap.c ext.imap/imap/php_imap.c
---- ext/imap/php_imap.c Tue Jan 25 15:23:37 2005
-+++ ext.imap/imap/php_imap.c Wed Jun 1 17:35:41 2005
-@@ -115,6 +115,7 @@ function_entry imap_functions[] = {
- PHP_FE(imap_binary, NULL)
- PHP_FE(imap_utf8, NULL)
- PHP_FE(imap_status, NULL)
-+ PHP_FE(imap_status_current, NULL)
- PHP_FE(imap_mailboxmsginfo, NULL)
- PHP_FE(imap_setflag_full, NULL)
- PHP_FE(imap_clearflag_full, NULL)
-@@ -2548,6 +2549,42 @@ PHP_FUNCTION(imap_msgno)
- convert_to_long_ex(msgno);
-
- RETURN_LONG(mail_msgno(imap_le_struct->imap_stream, Z_LVAL_PP(msgno)));
-+}
-+/* }}} */
-+
-+/* {{{ proto object imap_status_current(resource stream_id, int options)
-+ Get (cached) status info from current mailbox */
-+PHP_FUNCTION(imap_status_current)
-+{
-+ zval **streamind, **pflags;
-+ pils *imap_le_struct;
-+ long flags = 0L;
-+
-+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &pflags) == FAILURE) {
-+ ZEND_WRONG_PARAM_COUNT();
-+ }
-+
-+ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
-+
-+ convert_to_long_ex(pflags);
-+ flags = Z_LVAL_PP(pflags);
-+
-+ if (object_init(return_value) == FAILURE) {
-+ RETURN_FALSE;
-+ }
-+
-+ if (flags & SA_MESSAGES) {
-+ add_property_long(return_value, "messages", imap_le_struct->imap_stream->nmsgs);
-+ }
-+ if (flags & SA_RECENT) {
-+ add_property_long(return_value, "recent", imap_le_struct->imap_stream->recent);
-+ }
-+ if (flags & SA_UIDNEXT) {
-+ add_property_long(return_value, "uidnext", imap_le_struct->imap_stream->uid_last+1);
-+ }
-+ if (flags & SA_UIDVALIDITY) {
-+ add_property_long(return_value, "uidvalidity", imap_le_struct->imap_stream->uid_validity);
-+ }
- }
- /* }}} */
-
-diff -u -r -p ext/imap/php_imap.h ext.imap/imap/php_imap.h
---- ext/imap/php_imap.h Fri Jun 13 16:45:36 2003
-+++ ext.imap/imap/php_imap.h Wed Jun 1 17:35:49 2005
-@@ -151,6 +151,7 @@ PHP_FUNCTION(imap_lsub);
- PHP_FUNCTION(imap_lsub_full);
- PHP_FUNCTION(imap_create);
- PHP_FUNCTION(imap_rename);
-+PHP_FUNCTION(imap_status_current);
- PHP_FUNCTION(imap_status);
- PHP_FUNCTION(imap_bodystruct);
- PHP_FUNCTION(imap_fetch_overview);
diff --git a/postfix/.cvsignore b/postfix/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/postfix/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/postfix/Makefile b/postfix/Makefile
deleted file mode 100644
index 6a7ea45..0000000
--- a/postfix/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=postfix
-VERSION=2.2.5
-RELEASE=2.5.0
-KOLABRELEASE=2.5.0_kolab
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-PATCHES=$(KOLABCVSDIR)/postfix-ldap-leafonly.patch \
- $(KOLABCVSDIR)/postfix-pipe-allow-empty-sender.patch
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(PATCHES) $(KOLABCVSDIR)/kolab.patch Makefile
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for postfix.spec
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_ldap yes' --define 'with_sasl yes' --define 'with_ssl yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-postfix-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/postfix-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/cyrus-imapd* cyrus* imapd* rc.imapd vhosthack.patch fsl.imapd groupfile.patch $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
diff --git a/postfix/kolab.patch b/postfix/kolab.patch
deleted file mode 100644
index 14c2fb5..0000000
--- a/postfix/kolab.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- ../postfix.orig/postfix.spec 2005-07-11 16:51:25.000000000 +0200
-+++ postfix.spec 2005-07-19 10:28:58.000000000 +0200
-@@ -38,7 +38,7 @@ Class: BASE
- Group: Mail
- License: IPL
- Version: %{V_postfix}
--Release: 2.5.0
-+Release: 2.5.0_kolab
-
- # package options
- %option with_fsl yes
-@@ -59,6 +59,8 @@ Source4: rc.postfix
- Patch0: postfix.patch
- Patch1: postfix.patch.pfls
- Patch2: ftp://ftp.openpkg.org/sources/CPY/postfix/postfix-%{V_whoson}-whoson.patch
-+Patch3: postfix-ldap-leafonly.patch
-+Patch4: postfix-pipe-allow-empty-sender.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -148,6 +150,9 @@ Conflicts: exim, sendmail, ssmtp
- %if "%{with_whoson}" == "yes"
- %patch -p0 -P 2
- %endif
-+ %patch -p0 -P 3
-+ %patch -p0 -P 4
-+
-
- %build
- # configure Postfix (hard-core part I)
diff --git a/postfix/postfix-ldap-leafonly.patch b/postfix/postfix-ldap-leafonly.patch
deleted file mode 100644
index 6fa478c..0000000
--- a/postfix/postfix-ldap-leafonly.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff -upr ../postfix-2.2.3.orig/src/global/dict_ldap.c ./src/global/dict_ldap.c
---- ../postfix-2.2.3.orig/src/global/dict_ldap.c 2005-03-08 19:58:44.000000000 +0100
-+++ ./src/global/dict_ldap.c 2005-07-19 02:46:30.000000000 +0200
-@@ -60,6 +60,10 @@
- /* .IP special_result_attribute
- /* The attribute(s) of directory entries that can contain DNs or URLs.
- /* If found, a recursive subsequent search is done using their values.
-+/* .IP exclude_internal
-+/* Used in conjunction with \fIspecial_result_attribute\fR. If set to
-+/* yes, only matching objects without \fIspecial_result_attribute\fR
-+/* attributes are included in the result. The default is no.
- /* .IP scope
- /* LDAP search scope: sub, base, or one.
- /* .IP bind
-@@ -226,6 +230,7 @@ typedef struct {
- char *search_base;
- ARGV *result_attributes;
- int num_attributes; /* rest of list is DN's. */
-+ int exclude_internal;
- int bind;
- char *bind_dn;
- char *bind_pw;
-@@ -717,6 +722,7 @@ static void dict_ldap_get_values(DICT_LD
- char *myname = "dict_ldap_get_values";
- struct timeval tv;
- LDAPURLDesc *url;
-+ int is_leaf;
-
- tv.tv_sec = dict_ldap->timeout;
- tv.tv_usec = 0;
-@@ -744,6 +750,27 @@ static void dict_ldap_get_values(DICT_LD
- dict_ldap->size_limit);
- dict_errno = DICT_ERR_RETRY;
- }
-+
-+ /*
-+ * The number of ordinary attributes is "num_attributes". We run through
-+ * the "special" attributes and check if any of them are present in the
-+ * object. If yes, then is_leaf = 0, else is_leaf = 1
-+ */
-+ is_leaf = 1;
-+ if (dict_ldap->exclude_internal) {
-+ for (i = dict_ldap->num_attributes; dict_ldap->result_attributes->argv[i]; i++) {
-+ attr = dict_ldap->result_attributes->argv[i];
-+ vals = ldap_get_values(dict_ldap->ld, entry, attr);
-+ if (vals) {
-+ if (ldap_count_values(vals) > 0) {
-+ is_leaf = 0;
-+ ldap_value_free(vals);
-+ break;
-+ }
-+ ldap_value_free(vals);
-+ }
-+ }
-+ }
- for (attr = ldap_first_attribute(dict_ldap->ld, entry, &ber);
- attr != NULL;
- ldap_memfree(attr), attr = ldap_next_attribute(dict_ldap->ld,
-@@ -791,6 +818,7 @@ static void dict_ldap_get_values(DICT_LD
- */
- if (i < dict_ldap->num_attributes) {
- /* Ordinary result attribute */
-+ if(is_leaf) {
- for (i = 0; vals[i] != NULL; i++) {
- if (db_common_expand(dict_ldap->ctx,
- dict_ldap->result_format, vals[i],
-@@ -809,6 +837,7 @@ static void dict_ldap_get_values(DICT_LD
- msg_info("%s[%d]: search returned %ld value(s) for"
- " requested result attribute %s",
- myname, recursion, i, attr);
-+ }
- } else if (recursion < dict_ldap->recursion_limit
- && dict_ldap->result_attributes->argv[i]) {
- /* Special result attribute */
-@@ -1351,6 +1380,11 @@ DICT *dict_ldap_open(const char *ldaps
- myfree(attr);
-
- /*
-+ * get configured value of "exclude_internal", default to no
-+ */
-+ dict_ldap->exclude_internal = cfg_get_bool(dict_ldap->parser, "exclude_internal", 0);
-+
-+ /*
- * get configured value of "bind"; default to true
- */
- dict_ldap->bind = cfg_get_bool(dict_ldap->parser, "bind", 1);
diff --git a/postfix/postfix-pipe-allow-empty-sender.patch b/postfix/postfix-pipe-allow-empty-sender.patch
deleted file mode 100644
index 5fb7ea7..0000000
--- a/postfix/postfix-pipe-allow-empty-sender.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff -upr ../postfix-2.2.3.orig/src/pipe/pipe.c ./src/pipe/pipe.c
---- ../postfix-2.2.3.orig/src/pipe/pipe.c 2005-02-05 05:21:23.000000000 +0100
-+++ ./src/pipe/pipe.c 2005-07-19 02:49:43.000000000 +0200
-@@ -51,7 +51,7 @@
- /* \fB\er\en\fR or \fB\en\fR. The usual C-style backslash escape
- /* sequences are recognized: \fB\ea \eb \ef \en \er \et \ev
- /* \e\fIddd\fR (up to three octal digits) and \fB\e\e\fR.
--/* .IP "\fBflags=BDFORhqu.>\fR (optional)"
-+/* .IP "\fBflags=BDFORhnqu.>\fR (optional)"
- /* Optional message processing flags. By default, a message is
- /* copied unchanged.
- /* .RS
-@@ -82,6 +82,9 @@
- /* Fold the command-line \fB$recipient\fR domain name and \fB$nexthop\fR
- /* host name to lower case.
- /* This is recommended for delivery via \fBUUCP\fR.
-+/* .IP \fBn\fR
-+/* Don't rewrite empty \fB$sender\fR. The default is to rewrite empty
-+/* \fB$sender\fR to MAILER-DAEMON.
- /* .IP \fBq\fR
- /* Quote white space and other special characters in the command-line
- /* \fB$sender\fR and \fB$recipient\fR address localparts (text to the
-@@ -399,6 +402,7 @@
- #define PIPE_OPT_FOLD_USER (1<<16)
- #define PIPE_OPT_FOLD_HOST (1<<17)
- #define PIPE_OPT_QUOTE_LOCAL (1<<18)
-+#define PIPE_OPT_ALLOW_NO_SENDER (1<<19)
-
- #define PIPE_OPT_FOLD_FLAGS (PIPE_OPT_FOLD_USER | PIPE_OPT_FOLD_HOST)
-
-@@ -719,6 +723,9 @@ static void get_service_attr(PIPE_ATTR *
- case 'h':
- attr->flags |= PIPE_OPT_FOLD_HOST;
- break;
-+ case 'n':
-+ attr->flags |= PIPE_OPT_ALLOW_NO_SENDER;
-+ break;
- case 'q':
- attr->flags |= PIPE_OPT_QUOTE_LOCAL;
- break;
-@@ -901,22 +908,6 @@ static int deliver_message(DELIVER_REQUE
- msg_info("%s: from <%s>", myname, request->sender);
-
- /*
-- * First of all, replace an empty sender address by the mailer daemon
-- * address. The resolver already fixes empty recipient addresses.
-- *
-- * XXX Should sender and recipient be transformed into external (i.e.
-- * quoted) form? Problem is that the quoting rules are transport
-- * specific. Such information must evidently not be hard coded into
-- * Postfix, but would have to be provided in the form of lookup tables.
-- */
-- if (request->sender[0] == 0) {
-- buf = vstring_alloc(100);
-- canon_addr_internal(buf, MAIL_ADDR_MAIL_DAEMON);
-- myfree(request->sender);
-- request->sender = vstring_export(buf);
-- }
--
-- /*
- * Sanity checks. The get_service_params() and get_service_attr()
- * routines also do some sanity checks. Look up service attributes and
- * config information only once. This is safe since the information comes
-@@ -932,6 +923,22 @@ static int deliver_message(DELIVER_REQUE
- }
-
- /*
-+ * First of all, replace an empty sender address by the mailer daemon
-+ * address. The resolver already fixes empty recipient addresses.
-+ *
-+ * XXX Should sender and recipient be transformed into external (i.e.
-+ * quoted) form? Problem is that the quoting rules are transport
-+ * specific. Such information must evidently not be hard coded into
-+ * Postfix, but would have to be provided in the form of lookup tables.
-+ */
-+ if ((attr.flags & PIPE_OPT_ALLOW_NO_SENDER) == 0 && request->sender[0] == 0) {
-+ buf = vstring_alloc(100);
-+ canon_addr_internal(buf, MAIL_ADDR_MAIL_DAEMON);
-+ myfree(request->sender);
-+ request->sender = vstring_export(buf);
-+ }
-+
-+ /*
- * The D flag cannot be specified for multi-recipient deliveries.
- */
- if ((attr.flags & MAIL_COPY_DELIVERED) && (rcpt_list->len > 1)) {
diff --git a/postfix/postfix-pipe.patch b/postfix/postfix-pipe.patch
deleted file mode 100644
index 185d959..0000000
--- a/postfix/postfix-pipe.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-diff -upr ../postfix-2.1.5.orig/html/pipe.8.html ./html/pipe.8.html
---- ../postfix-2.1.5.orig/html/pipe.8.html 2004-08-09 16:51:09.000000000 +0200
-+++ ./html/pipe.8.html 2004-12-16 13:17:00.000000000 +0100
-@@ -140,6 +140,29 @@ PIPE(8)
- ing information from the Postfix queue manager
- delivery request:
-
-+ <b>${client_address</b>}
-+ This macro expands to the remote client net-
-+ work address.
-+
-+ This is available in Postfix 2.2 and later.
-+
-+ <b>${client_helo</b>}
-+ This macro expands to the remote client HELO
-+ command parameter.
-+
-+ This is available in Postfix 2.2 and later.
-+
-+ <b>${client_hostname</b>}
-+ This macro expands to the remote client
-+ hostname.
-+
-+ This is available in Postfix 2.2 and later.
-+
-+ <b>${client_protocol</b>}
-+ This macro expands to the remote client pro-
-+ tocol.
-+
-+ This is available in Postfix 2.2 and later.
- <b>${extension</b>}
- This macro expands to the extension part of
- a recipient address. For example, with an
-diff -upr ../postfix-2.1.5.orig/man/man8/pipe.8 ./man/man8/pipe.8
---- ../postfix-2.1.5.orig/man/man8/pipe.8 2004-08-09 16:51:07.000000000 +0200
-+++ ./man/man8/pipe.8 2004-12-16 13:16:01.000000000 +0100
-@@ -128,6 +128,22 @@ In the command argument vector, the foll
- and replaced with corresponding information from the Postfix queue
- manager delivery request:
- .RS
-+.IP \fB${\fBclient_address\fR}\fR
-+This macro expands to the remote client network address.
-+.sp
-+This is available in Postfix 2.2 and later.
-+.IP \fB${\fBclient_helo\fR}\fR
-+This macro expands to the remote client HELO command parameter.
-+.sp
-+This is available in Postfix 2.2 and later.
-+.IP \fB${\fBclient_hostname\fR}\fR
-+This macro expands to the remote client hostname.
-+.sp
-+This is available in Postfix 2.2 and later.
-+.IP \fB${\fBclient_protocol\fR}\fR
-+This macro expands to the remote client protocol.
-+.sp
-+This is available in Postfix 2.2 and later.
- .IP \fB${\fBextension\fR}\fR
- This macro expands to the extension part of a recipient address.
- For example, with an address \fIuser+foo@domain\fR the extension is
-Kun i ../postfix-2.1.5.orig: postfix-2.1.5
-diff -upr ../postfix-2.1.5.orig/src/pipe/pipe.c ./src/pipe/pipe.c
---- ../postfix-2.1.5.orig/src/pipe/pipe.c 2004-07-24 01:09:21.000000000 +0200
-+++ ./src/pipe/pipe.c 2004-12-16 13:11:43.000000000 +0100
-@@ -332,6 +332,10 @@
- #define PIPE_DICT_EXTENSION "extension" /* key */
- #define PIPE_DICT_MAILBOX "mailbox" /* key */
- #define PIPE_DICT_SIZE "size" /* key */
-+#define PIPE_DICT_CLIENT_ADDR "client_address" /* key */
-+#define PIPE_DICT_CLIENT_NAME "client_hostname" /* key */
-+#define PIPE_DICT_CLIENT_PROTO "client_protocol" /* key */
-+#define PIPE_DICT_CLIENT_HELO "client_helo" /* key */
-
- /*
- * Flags used to pass back the type of special parameter found by
-@@ -412,6 +416,10 @@ static int parse_callback(int type, VSTR
- PIPE_DICT_EXTENSION, PIPE_FLAG_EXTENSION,
- PIPE_DICT_MAILBOX, PIPE_FLAG_MAILBOX,
- PIPE_DICT_SIZE, 0,
-+ PIPE_DICT_CLIENT_ADDR, 0,
-+ PIPE_DICT_CLIENT_NAME, 0,
-+ PIPE_DICT_CLIENT_PROTO, 0,
-+ PIPE_DICT_CLIENT_HELO, 0,
- 0, 0,
- };
- struct cmd_flags *p;
-@@ -954,6 +962,15 @@ static int deliver_message(DELIVER_REQUE
- dict_update(PIPE_DICT_TABLE, PIPE_DICT_SIZE, STR(buf));
- vstring_free(buf);
-
-+ dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_ADDR,
-+ request->client_addr);
-+ dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_HELO,
-+ request->client_helo);
-+ dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_NAME,
-+ request->client_name);
-+ dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_PROTO,
-+ request->client_proto);
-+
- if ((expanded_argv = expand_argv(service, attr.command,
- rcpt_list, attr.flags)) == 0) {
- deliver_status = eval_command_status(PIPE_STAT_DEFER, service,
diff --git a/spamassassin/.cvsignore b/spamassassin/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/spamassassin/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/spamassassin/Makefile b/spamassassin/Makefile
deleted file mode 100644
index 70b0a90..0000000
--- a/spamassassin/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/UPD
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=spamassassin
-VERSION=3.1.0
-RELEASE=2.5.1
-KOLABRELEASE=2.5.1_kolab
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm spamassassin-cve-2007-0451.patch kolab.patch
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(KOLABCVSDIR)/spamassassin-cve-2007-0451.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp -p $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/$(PACKAGE)-$(VERSION)
diff --git a/spamassassin/spamassassin-cve-2007-0451.patch b/spamassassin/spamassassin-cve-2007-0451.patch
deleted file mode 100644
index 7173433..0000000
--- a/spamassassin/spamassassin-cve-2007-0451.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-diff -urN Mail-SpamAssassin-3.1.0.orig/lib/Mail/SpamAssassin/Constants.pm Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/Constants.pm
---- Mail-SpamAssassin-3.1.0.orig/lib/Mail/SpamAssassin/Constants.pm 2005-08-12 02:38:47.000000000 +0200
-+++ Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/Constants.pm 2007-04-17 15:11:07.926179000 +0200
-@@ -37,6 +37,7 @@
- META_TEST_MIN_PRIORITY HARVEST_DNSBL_PRIORITY MBX_SEPARATOR
- MAX_BODY_LINE_LENGTH MAX_HEADER_KEY_LENGTH MAX_HEADER_VALUE_LENGTH
- MAX_HEADER_LENGTH ARITH_EXPRESSION_LEXER AI_TIME_UNKNOWN
-+ MAX_URI_LENGTH
- );
-
- %EXPORT_TAGS = (
-@@ -172,6 +173,9 @@
- # maximum byte length of entire header
- use constant MAX_HEADER_LENGTH => 65536;
-
-+# maximum byte length of any given URI
-+use constant MAX_URI_LENGTH => 1024;
-+
- # used for meta rules and "if" conditionals in Conf::Parser
- use constant ARITH_EXPRESSION_LEXER => qr/(?:
- [\-\+\d\.]+| # A Number
-diff -urN Mail-SpamAssassin-3.1.0.orig/lib/Mail/SpamAssassin/HTML.pm Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/HTML.pm
---- Mail-SpamAssassin-3.1.0.orig/lib/Mail/SpamAssassin/HTML.pm 2005-08-12 02:38:47.000000000 +0200
-+++ Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/HTML.pm 2007-04-17 15:08:38.716179000 +0200
-@@ -25,6 +25,7 @@
-
- use HTML::Parser 3.24 ();
- use Mail::SpamAssassin::Logger;
-+use Mail::SpamAssassin::Constants qw(:sa);
-
- use vars qw($re_loose $re_strict $re_other @ISA @EXPORT @EXPORT_OK);
-
-@@ -142,6 +143,7 @@
- $self->put_results(anchor => $self->{anchor});
-
- $self->put_results(uri_detail => $self->{uri});
-+ $self->put_results(uri_truncated => $self->{uri_truncated});
-
- # final results scalars
- $self->put_results(image_area => $self->{image_area});
-@@ -354,9 +356,7 @@
- sub push_uri {
- my ($self, $type, $uri) = @_;
-
-- # URIs don't have leading/trailing whitespace ...
-- $uri =~ s/^\s+//;
-- $uri =~ s/\s+$//;
-+ $uri = $self->canon_uri($uri);
-
- my $target = target_uri($self->{base_href} || "", $uri);
-
-@@ -366,6 +366,22 @@
- }
- }
-
-+sub canon_uri {
-+ my ($self, $uri) = @_;
-+
-+ # URIs don't have leading/trailing whitespace ...
-+ $uri =~ s/^\s+//;
-+ $uri =~ s/\s+$//;
-+
-+ # Make sure all the URIs are nice and short
-+ if (length $uri > MAX_URI_LENGTH) {
-+ $self->{'uri_truncated'} = 1;
-+ $uri = substr $uri, 0, MAX_URI_LENGTH;
-+ }
-+
-+ return $uri;
-+}
-+
- sub html_uri {
- my ($self, $tag, $attr) = @_;
-
-@@ -392,6 +408,8 @@
- }
- elsif ($tag eq "base") {
- if (my $uri = $attr->{href}) {
-+ $uri = $self->canon_uri($uri);
-+
- # use <BASE HREF="URI"> to turn relative links into absolute links
-
- # even if it is a base URI, handle like a normal URI as well
-@@ -694,7 +712,7 @@
-
- # special text delimiters - <a> and <title>
- if ($tag eq "a") {
-- $self->{anchor_last} = (exists $attr->{href} ? $attr->{href} : "");
-+ $self->{anchor_last} = (exists $attr->{href} ? $self->canon_uri($attr->{href}) : "");
- push(@{$self->{uri}->{$self->{anchor_last}}->{anchor_text}}, '');
- push(@{$self->{anchor}}, '');
- }
-diff -urN Mail-SpamAssassin-3.1.0.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/PerMsgStatus.pm
---- Mail-SpamAssassin-3.1.0.orig/lib/Mail/SpamAssassin/PerMsgStatus.pm 2005-09-14 04:07:31.000000000 +0200
-+++ Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/PerMsgStatus.pm 2007-04-17 15:08:38.716179000 +0200
-@@ -1971,6 +1971,7 @@
- # get URIs from HTML parsing
- # use the metadata version since $self->{html} may not be setup
- my $detail = $self->{msg}->{metadata}->{html}->{uri_detail} || { };
-+ $self->{'uri_truncated'} = 1 if $self->{msg}->{metadata}->{html}->{uri_truncated};
-
- # don't keep dereferencing ...
- my $redirector_patterns = $self->{conf}->{redirector_patterns};
-@@ -2108,6 +2109,14 @@
- }
- }
-
-+ # Make sure all the URIs are nice and short
-+ foreach my $uri ( @uris ) {
-+ if (length $uri > MAX_URI_LENGTH) {
-+ $self->{'uri_truncated'} = 1;
-+ $uri = substr $uri, 0, MAX_URI_LENGTH;
-+ }
-+ }
-+
- # setup the cache and return
- $self->{parsed_uri_list} = \@uris;
- }
-diff -urN Mail-SpamAssassin-3.1.0.orig/rules/20_body_tests.cf Mail-SpamAssassin-3.1.0/rules/20_body_tests.cf
---- Mail-SpamAssassin-3.1.0.orig/rules/20_body_tests.cf 2005-08-12 02:38:50.000000000 +0200
-+++ Mail-SpamAssassin-3.1.0/rules/20_body_tests.cf 2007-04-17 15:11:49.916179000 +0200
-@@ -143,5 +143,8 @@
- body HTTPS_IP_MISMATCH eval:check_https_ip_mismatch()
- describe HTTPS_IP_MISMATCH IP to HTTPS link found in HTML
-
-+body URI_TRUNCATED eval:check_uri_truncated()
-+describe URI_TRUNCATED Message contained a URI which was truncated
-+
- rawbody INTERRUPTUS /(?:[a-zA-Z0-9]<[\/ ]{0,2}?(?!br)(?!p)(?!sup)(?!li)(?!b)(?!i)(?!option)(?!a (?:href|name))(?:\b|!--)[^>]{0,64}?>[a-zA-Z0-9].{0,64}){3}/i
- describe INTERRUPTUS Message looks to contain HTML-interrupted text