Branch '2.3-stable' - 6 commits - apache-php/apache-php.spec apache-php/Makefile apache/rc.apache imapd/cyrus.conf imapd/fsl.imapd imapd/imapd.conf imapd/imapd.spec imapd/kolab.patch imapd/Makefile imapd/rc.imapd openldap/openldap.spec php/Makefile php/patches php/php.spec

Git Service User git at kolabsys.com
Tue Apr 5 17:06:12 CEST 2011


 apache-php/Makefile                                     |    7 
 apache-php/apache-php.spec                              |   19 
 apache/rc.apache                                        |   16 
 imapd/Makefile                                          |   23 
 imapd/cyrus.conf                                        |   35 +
 imapd/fsl.imapd                                         |  124 ++++
 imapd/imapd.conf                                        |   38 +
 imapd/imapd.spec                                        |  430 ++++++++++++++++
 imapd/kolab.patch                                       |  136 -----
 imapd/rc.imapd                                          |   75 ++
 openldap/openldap.spec                                  |   14 
 php/Makefile                                            |    6 
 php/patches/php-5.3.5/KOLAB_php-5.3.5_Annotations.patch |  302 +++++++++++
 php/patches/php-5.3.5/KOLAB_php-5.3.5_myrights.patch    |   93 +++
 php/patches/php-5.3.5/series                            |    2 
 php/php.spec                                            |   17 
 16 files changed, 1160 insertions(+), 177 deletions(-)

New commits:
commit 8846bdecc59a9b03f14772b7b6d7872a48a60762
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Mon Mar 28 16:41:55 2011 +0200

    imapd: kolab/issue4377: make sure logfiles are rotated

diff --git a/imapd/rc.imapd b/imapd/rc.imapd
index 18ae341..8ab2f45 100644
--- a/imapd/rc.imapd
+++ b/imapd/rc.imapd
@@ -11,7 +11,7 @@
     imapd_log_numfiles="10"
     imapd_log_minsize="1M"
     imapd_log_complevel="9"
-    imapd_log_daemons="cyrmaster imapd pop3d sieve lmtpd idled cyr_db misc"
+    imapd_log_daemons="cyrmaster imapd pop3d sieve lmtpd idled cyr_db misc notifyd"
     POP_type="cyrus"
     POP_logfile="@l_prefix@/var/imapd/log/pop3d.log"
 


commit e5433d3f8e622a67fd1735b8d19cc36991d4ee23
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Mon Mar 28 16:34:15 2011 +0200

    imapd: Switch to full packaging

diff --git a/imapd/Makefile b/imapd/Makefile
index fd84818..5c23ec8 100644
--- a/imapd/Makefile
+++ b/imapd/Makefile
@@ -1,13 +1,11 @@
 include ../make-helper/kolab.mk
 
-PACKAGE=imapd
-DOWNLOAD_VERSION=2.3.13
-OPENPKG_RELEASE=20081020
-VERSION=2.3.16
-RELEASE=20081020_kolab7
+PACKAGE = $(shell grep "^Name:" *.spec | sed -e "s/^Name:\s*\([a-z-]*\).*/\1/")
+VERSION = $(shell grep "^Version:" *.spec | sed -e "s/^Version:\s*\([0-9.]*\).*/\1/")
+RELEASE = $(shell grep "^Release:" *.spec | sed -e "s/^Release:\s*\([a-z0-9._-]*\).*/\1/")
 
 SOURCE_URL=ftp://ftp.andrew.cmu.edu/pub/cyrus
-SOURCE_0=cyrus-imapd-2.3.16.tar.gz
+SOURCE_0=cyrus-imapd-$(VERSION).tar.gz
 
 PATCHES=patches/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Cyradm_Annotations.patch \
         patches/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Folder-names.patch \
@@ -17,10 +15,17 @@ PATCHES=patches/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Cyradm_Annot
         patches/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_UID.patch \
         patches/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_cross-domain-acls.patch
 
-EXTRA=$(PATCHES) kolab.patch imapd.patch
+EXTRA=$(PATCHES) cyrus.conf fsl.imapd imapd.conf imapd.patch rc.imapd
 
-BUILD_OPTIONS=--define 'with_fsl yes' --define 'with_group yes' --define 'with_group_igncase yes' --define 'with_atvdom yes' --define 'with_drac no' --define 'with_replication no' --define 'with_murder no' --define 'with_listext no' --define 'with_nntp no' --define 'with_ldap yes' --define 'with_annotate yes' --define 'with_morelogging yes' --define 'with_kolab yes' --define 'with_kolab_nocaps yes' --define 'with_crossdomain_acl yes'
+BUILD_OPTIONS=--define 'with_fsl yes' --define 'with_group yes' \
+              --define 'with_group_igncase yes' --define 'with_atvdom yes' \
+              --define 'with_drac no' --define 'with_replication no' \
+              --define 'with_murder no' --define 'with_listext no' \
+              --define 'with_nntp no' --define 'with_ldap yes' \
+              --define 'with_annotate yes' --define 'with_morelogging yes' \
+              --define 'with_kolab yes' --define 'with_kolab_nocaps yes' \
+              --define 'with_crossdomain_acl yes'
 
 include ../make-helper/package.mk
-include ../make-helper/openpkg-patched.mk
+include ../make-helper/package-new.mk
 include ../make-helper/fetch.mk
diff --git a/imapd/cyrus.conf b/imapd/cyrus.conf
new file mode 100644
index 0000000..75c1d54
--- /dev/null
+++ b/imapd/cyrus.conf
@@ -0,0 +1,35 @@
+##
+##  cyrus.conf -- Cyrus IMAP master server configuration
+##
+
+START {
+    recover      cmd="ctl_cyrusdb -r"
+    #syncclient  cmd="sync_client -r"
+    #idled       cmd="idled"
+    #mupdatepush cmd="ctl_mboxlist -m"
+}
+
+SERVICES {
+    imap         cmd="imapd"       listen="127.0.0.1:143"        provide_uuid=33 prefork=2
+    #imaps       cmd="imapd -s"    listen="127.0.0.1:993"        provide_uuid=33 prefork=0
+    pop3         cmd="pop3d"       listen="127.0.0.1:110"        provide_uuid=33 prefork=2
+    #pop3s       cmd="pop3d -s"    listen="127.0.0.1:995"        provide_uuid=33 prefork=0
+    #nntp        cmd="nntpd"       listen="127.0.0.1:119"                        prefork=0
+    #nntps       cmd="nntpd -s"    listen="127.0.0.1:563"                        prefork=0
+    sieve        cmd="timsieved"   listen="127.0.0.1:2000"                       prefork=1
+    lmtp         cmd="lmtpd"       listen="127.0.0.1:2003"                       prefork=1
+    lmtpunix     cmd="lmtpd"       listen="@l_prefix@/var/imapd/socket/lmtp"     prefork=0
+    #notify      cmd="notifyd"     listen="@l_prefix@/var/imapd/socket/notify"   prefork=1  proto="udp"
+    #ptloader    cmd="ptloader"    listen="@l_prefix@/var/imapd/socket/ptloader" prefork=1
+    #fud         cmd="fud"         listen="127.0.0.1:4201"                       prefork=1  proto="udp"
+    #mupdate     cmd="mupdate"     listen="127.0.0.1:2004"                       prefork=1
+    #syncserver  cmd="sync_server" listen="127.0.0.1:2005"                       prefork=-1
+}
+
+EVENTS {
+    checkpoint   cmd="ctl_cyrusdb -c"       period=30
+    delprune     cmd="ctl_deliver -E 3"     period=1440
+    tlsprune     cmd="tls_prune"            period=1440
+    squatter     cmd="squatter -r -s user"  period=1440
+}
+
diff --git a/imapd/fsl.imapd b/imapd/fsl.imapd
new file mode 100644
index 0000000..28aefe8
--- /dev/null
+++ b/imapd/fsl.imapd
@@ -0,0 +1,124 @@
+##
+##  fsl.imapd -- OSSP fsl configuration
+##
+
+ident (imapd|imaps|imap)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/imapd.log",
+            perm=0644
+        )
+    }
+};
+
+ident (pop3d|pop3s|pop3)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/pop3d.log",
+            perm=0644
+        )
+    }
+};
+
+ident (sieve)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/sieve.log",
+            perm=0644
+        )
+    }
+};
+
+ident (lmtp|lmtpunix)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/lmtpd.log",
+            perm=0644
+        )
+    }
+};
+
+ident (idled)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/idled.log",
+            perm=0644
+        )
+    }
+};
+
+ident (notifyd)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/notifyd.log",
+            perm=0644
+        )
+    }
+};
+
+ident (cyrdeliver)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/cyrdeliver.log",
+            perm=0644
+        )
+    }
+};
+
+ident (master)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/cyrmaster.log",
+            perm=0644
+        )
+    }
+};
+
+ident (cyr_expire|ctl_cyrusdb|tls_prune|delprune)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/cyr_db.log",
+            perm=0666
+        )
+    }
+};
+
+ident (squatter)/.+ q{
+    prefix(
+        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+    )
+    -> {
+        debug: file(
+            path="@l_prefix@/var/imapd/log/misc.log",
+            perm=0666
+        )
+    }
+};
+
diff --git a/imapd/imapd.conf b/imapd/imapd.conf
new file mode 100644
index 0000000..59f1941
--- /dev/null
+++ b/imapd/imapd.conf
@@ -0,0 +1,38 @@
+##
+##  imapd.conf -- Cyrus IMAP daemon configuration
+##
+
+configdirectory:        @l_prefix@/var/imapd
+partition-default:      @l_prefix@/var/imapd/spool
+temp_path:              @l_prefix@/var/imapd/tmp
+sievedir:               @l_prefix@/var/imapd/sieve
+lmtpsocket:             @l_prefix@/var/imapd/socket/lmtp
+sendmail:               @l_prefix@/sbin/sendmail
+
+admins:                 @l_susr@
+defaultacl:             @l_susr@ lrswipcda
+sasl_pwcheck_method:    saslauthd
+sasl_mech_list:         PLAIN
+allowplaintext:         yes
+allowanonymouslogin:    no
+allowusermoves:         no
+
+servername:             mail.example.com
+defaultdomain:          example.com
+virtdomains:            yes
+unixhierarchysep:       yes
+altnamespace:           no
+
+autocreatequota:        10000
+quotawarn:              90
+timeout:                30
+reject8bit:             no
+
+#sync_host:             mail2.example.com
+#sync_realm:            example.com
+#sync_authname:         xxxxx
+#sync_password:         xxxxx
+#sync_machineid:        33
+#sync_log:              yes
+#sync_repeat_interval:  60
+
diff --git a/imapd/imapd.spec b/imapd/imapd.spec
new file mode 100644
index 0000000..96b7322
--- /dev/null
+++ b/imapd/imapd.spec
@@ -0,0 +1,430 @@
+##
+##  imapd.spec -- OpenPKG RPM Package Specification
+##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
+##
+##  Permission to use, copy, modify, and distribute this software for
+##  any purpose with or without fee is hereby granted, provided that
+##  the above copyright notice and this permission notice appear in all
+##  copies.
+##
+##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+##  SUCH DAMAGE.
+##
+
+#   package information
+Name:         imapd
+Summary:      Cyrus IMAP Server
+URL:          http://cyrusimap.web.cmu.edu/
+Vendor:       Carnegie Mellon University
+Packager:     OpenPKG Foundation e.V.
+Distribution: OpenPKG Community
+Class:        BASE
+Group:        Mail
+License:      BSD
+Version:      2.3.16
+Release:      20081020_kolab7
+
+#   package options
+%option       with_fsl             yes
+%option       with_group           no
+%option       with_group_igncase   no
+%option       with_atvdom          no
+%option       with_drac            no
+%option       with_replication     no
+%option       with_murder          no
+%option       with_listext         no
+%option       with_nntp            no
+%option       with_ldap            no
+%option       with_annotate        no
+%option       with_morelogging     no
+%option       with_kolab           no
+%option       with_kolab_nocaps    no
+%option       with_crossdomain_acl no
+
+#   fixing implicit inter-module dependencies and correlations
+%if "%{with_kolab}" == "yes"
+%undefine     with_group_igncase
+%undefine     with_ldap
+%undefine     with_annotate
+%define       with_group_igncase yes
+%define       with_ldap          yes
+%define       with_annotate      yes
+%endif
+
+#   list of sources
+#   (ping p at rdus.de if the Kolab patches are unavailable for the latest Cyrus IMAPd version)
+Source0:      ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
+Source1:      rc.imapd
+Source2:      cyrus.conf
+Source3:      imapd.conf
+Source4:      fsl.imapd
+Patch0:       imapd.patch
+Patch1:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Groups2.patch
+Patch2:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_cross-domain-acls.patch
+Patch3:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Cyradm_Annotations.patch
+Patch4:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Logging.patch
+Patch5:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_UID.patch
+Patch6:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Folder-names.patch
+Patch7:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_timsieved_starttls-sendcaps.patch
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20060823, perl, perl-openpkg, make, config
+PreReq:       OpenPKG, openpkg >= 20060823, perl, MTA
+BuildPreReq:  sasl, db >= 4.4, openssl
+PreReq:       sasl, db >= 4.4, openssl
+%if "%{with_fsl}" == "yes"
+BuildPreReq:  fsl
+PreReq:       fsl
+%endif
+%if "%{with_ldap}" == "yes"
+BuildPreReq:  openldap >= 2.2.14
+PreReq:       openldap >= 2.2.14
+%endif
+%if "%{with_drac}" == "yes"
+BuildPreReq:  drac
+PreReq:       drac
+%endif
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    The Cyrus IMAP server is an IMAP4 and POP3 daemon that differs from
+    other IMAP server implementations in that it is generally intended
+    to be run on sealed servers, where normal users are not permitted to
+    log in. The mailbox database is stored in parts of the filesystem
+    that are private to the Cyrus IMAP system. All user access to mail
+    is through the IMAP, POP3, or KPOP protocols.
+
+%track
+    prog imapd = {
+        version   = %{version}
+        url       = ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
+        regex     = cyrus-imapd-(\d+\.\d+\.\d+)\.tar\.gz
+    }
+
+%prep
+    %setup -q -n cyrus-imapd-%{version}
+    %patch -p0
+
+    #   upgrade config scripts for better platform support
+    %{l_prefix}/bin/config install
+
+    #   add optional group file support with support to ignore case
+%if "%{with_group}" == "yes"
+    %patch -p1 -P 1
+    %{l_shtool} subst \
+        -e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
+        lib/auth_unix.c
+%endif
+
+    # kolab/issue1141 (Cannot give users from other domains access to a folder (rt#5747))
+%if "%{with_crossdomain_acl}" == "yes"
+    %patch -p0 -P 2
+%endif
+
+    #   add optional folder annotation support
+%if "%{with_annotate}" == "yes"
+    %patch -p1 -P 3
+%endif
+
+    #   add optional support for extended logging
+%if "%{with_morelogging}" == "yes"
+     %patch -p1 -P 4
+%endif
+
+    #   add optional support for ldap
+%if "%{with_ldap}" == "yes"
+    %{l_shtool} subst -e 's;\(IMAP_LIBS="${LIB_SASL}\) \(.*"\);\1 -lldap -llber \2;g' configure
+%endif
+
+    #   add optional kolab specific stuff for ldap and goodchars
+%if "%{with_kolab}" == "yes"
+     sed <%{PATCH5} -e '3,14d' | %{l_patch} -p1
+     %patch -p1 -P 6
+%endif
+
+    #   kolab/issue2443 (kontact aborts sieve when imapd sends capabilities after starttls)
+%if "%{with_kolab_nocaps}" == "yes"
+     %patch -p1 -P 7
+%endif
+
+    #   add optional DRAC file support
+%if "%{with_drac}" == "yes"
+    %{l_shtool} subst -e 's;@DRACLIBS@;-ldrac;g' contrib/drac_auth.patch
+    %{l_patch} -p0 <contrib/drac_auth.patch
+%endif
+
+    #   make sure config2header rebuilds imapopts based on imapoptions
+    rm -f lib/imapopts.h lib/imapopts.c >/dev/null 2>&1 || true
+
+    #   fix Berkeley-DB detection
+    %{l_shtool} subst\
+        -e 's;-L/usr/local/lib;;g' \
+        -e 's;-I/usr/local/include;;g' \
+        -e 's;db-4\.[0-9];db;g' \
+        -e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
+        configure
+
+    #   ensure correct linking of Berkeley-DB in perl bindings
+    loclibs=""
+    case "%{l_platform -t}" in
+        *-sunos* )
+            %{l_shtool} subst \
+                -e 's;^\( *.LIBS..*\)\(\"\],.*\)$;\1 -ldb -lrt\2;' \
+                perl/sieve/managesieve/Makefile.PL perl/imap/Makefile.PL
+            ;;
+        * )
+            %{l_shtool} subst \
+                -e 's;^\( *.LIBS..*\)\(\"\],.*\)$;\1 -ldb\2;' \
+                perl/sieve/managesieve/Makefile.PL perl/imap/Makefile.PL
+            ;;
+    esac
+
+    #   ensure invocation of correct Perl
+    %{l_shtool} subst \
+        -e 's;^\(.) exec\) \(perl .*\)$;\1 %{l_prefix}/bin/\2;' \
+        perl/imap/cyradm.sh
+    %{l_shtool} subst \
+        -e 's;^\(exec\) \(perl .*\)$;\1 %{l_prefix}/bin/\2;' \
+        perl/sieve/scripts/*.pl snmp/[a-z]* tools/[a-z]*
+
+    #   adjust hard-coded location of sieve
+    %{l_shtool} subst \
+        -e 's;"/usr/sieve";"%{l_prefix}/var/imapd/sieve";g' \
+        lib/imapopts.c tools/masssievec tools/rehash tools/translatesieve tools/upgradesieve
+
+    #   adjust default config to install environment for use in "mkimap" install helper script
+    %{l_shtool} install -c -m 644 \
+        -e "s;\\(@l_prefix@\\);$RPM_BUILD_ROOT\\1;g" %{l_value -s -a} \
+        %{SOURCE imapd.conf} imapd.conf-mkimap
+    %{l_shtool} subst \
+        -e 's;^exec perl ;exec %{l_prefix}/bin/perl ;' \
+        -e 's;/etc/imapd.conf;%{l_prefix}/etc/imapd/imapd.conf;' \
+        -e 's;^\($sievedir = \).*$;\1 shift || "%{l_prefix}/var/imapd/sieve"\;;' \
+        tools/mkimap
+
+    #   adjust syslog identifier of "deliver" program
+    %{l_shtool} subst \
+        -e '/alt_config/s;"deliver";"cyrdeliver";' \
+        imap/deliver.c
+
+    #   avoid name clash with postfix
+    %{l_shtool} subst \
+        -e '/snprintf(buf, sizeof(buf), "%s/s;/reconstruct";/cyrreconstruct";' \
+        -e '/snprintf(buf, sizeof(buf), "%s/s;/quota";/cyrquota";' \
+        imap/imapd.c
+
+    #   fix up man pages
+    %{l_shtool} subst \
+        -e 's;\(\\fB\|\.B \)/etc/\(cyrus.conf\|imapd.conf\);\1%{l_prefix}/etc/imapd/\2;g' \
+        -e 's;\(\\fB\|\.B \)/var/run/\(cyrus-master.pid\);\1%{l_prefix}/var/imapd/\2;g' \
+        man/*.[1-8]
+    %{l_shtool} subst \
+        -e 's;"/var/imap/;"%{l_prefix}/var/imapd/;g' \
+        man/cyrus.conf.5
+    %{l_shtool} subst \
+        -e 's;/usr/cyrus/bin/;%{l_prefix}/bin/;g' \
+        -e 's;/usr/local/bin/gdb;%{l_prefix}/bin/gdb;g' \
+        -e 's;/usr/sieve;%{l_prefix}/var/imapd/sieve;g' \
+        -e 's;/var/imap/md5;%{l_prefix}/var/imapd/md5;g' \
+        man/imapd.conf.5
+
+%build
+    #   configure program
+    export CC="%{l_cc}"
+    export CPPFLAGS="%{l_cppflags}"
+    export CFLAGS="%{l_cflags -O}"
+    export LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}"
+    export LIBS="%{l_fsl_libs}"
+%if "%{with_atvdom}" == "yes"
+    CPPFLAGS="$CPPFLAGS -DATVDOM"
+%endif
+%if "%{with_drac}" == "yes"
+    CPPFLAGS="$CPPFLAGS -DDRAC_AUTH"
+%endif
+    case "%{l_platform -t}" in
+        *-sunos* ) LIBS="$LIBS -lsocket -lnsl -lrt" ;;
+    esac
+    ./configure \
+        --prefix=%{l_prefix} \
+        --mandir=%{l_prefix}/man \
+        --sysconfdir=%{l_prefix}/etc/imapd \
+        --with-service-path=%{l_prefix}/bin \
+        --with-lib-subdir=%{l_prefix}/lib \
+        --with-openssl=%{l_prefix} \
+        --with-bdb=%{l_prefix} \
+        --with-bdb-incdir=%{l_prefix}/include \
+        --with-bdb-libdir=%{l_prefix}/lib \
+        --with-sasl=%{l_prefix} \
+        --with-staticsasl=%{l_prefix} \
+        --with-com_err \
+        --without-libwrap \
+        --enable-idled \
+        --disable-gssapi \
+        --without-gss_impl \
+        --with-perl=%{l_prefix}/bin/perl \
+        --without-snmp \
+        --with-cyrus-prefix=%{l_prefix} \
+        --with-cyrus-user=%{l_rusr} \
+        --with-cyrus-group=%{l_rgrp} \
+        --with-pidfile=%{l_prefix}/var/imapd/cyrmaster.pid \
+%if "%{with_ldap}" == "yes"
+        --with-ldap=%{l_prefix} \
+%endif
+%if "%{with_replication}" == "yes"
+        --enable-replication \
+%endif
+%if "%{with_murder}" == "yes"
+        --enable-murder \
+%endif
+%if "%{with_listext}" == "yes"
+        --enable-listext \
+%endif
+%if "%{with_nntp}" == "yes"
+        --enable-nntp \
+%endif
+%if "%{with_kolab_nocaps}" == "yes"
+        --with-extraident=kolab-nocaps \
+%else
+        --with-extraident=openpkg \
+%endif
+        --without-krb
+
+    #   build program
+    %{l_make} %{l_mflags}
+
+%install
+    rm -rf $RPM_BUILD_ROOT
+
+    #   install package
+    %{l_make} %{l_mflags} install \
+        DESTDIR=$RPM_BUILD_ROOT
+
+    #   create additional directories
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/imapd \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
+        $RPM_BUILD_ROOT%{l_prefix}/var/imapd/log \
+        $RPM_BUILD_ROOT%{l_prefix}/var/imapd/tmp \
+        $RPM_BUILD_ROOT%{l_prefix}/var/imapd/sieve \
+        $RPM_BUILD_ROOT%{l_prefix}/var/imapd/spool \
+        $RPM_BUILD_ROOT%{l_prefix}/bin
+
+    #   install sieve administration script
+    %{l_shtool} install -c -m 755 \
+        perl/sieve/scripts/sieveshell.pl \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/sieveshell
+
+    #   install sieve command line compiler
+    %{l_shtool} install -c -m 755 \
+        sieve/sievec \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/sievec
+
+    #   offer a sane default configuration
+    l_hostname=`%{l_shtool} echo -e %h`
+    l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
+    %{l_shtool} install -c -m 644 %{l_value -s -a} \
+        -e "s;@l_hostname@;$l_hostname;g" \
+        -e "s;@l_domainname@;$l_domainname;g" \
+        %{SOURCE cyrus.conf} %{SOURCE imapd.conf} \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/imapd/
+
+    #   install run-command script
+    %{l_shtool} install -c -m 755 %{l_value -s -a} \
+        %{SOURCE rc.imapd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+    #   use "mkimap" to create additional directories and install the tool
+    ./tools/mkimap imapd.conf-mkimap \
+        $RPM_BUILD_ROOT%{l_prefix}/var/imapd/sieve
+    %{l_shtool} install -c -m 755 \
+        tools/mkimap $RPM_BUILD_ROOT%{l_prefix}/bin/
+
+    #   rename files which are likely to cause namespace conflicts
+    ( cd $RPM_BUILD_ROOT%{l_prefix}
+      for i in deliver master quota reconstruct; do
+          mv bin/$i        bin/cyr$i
+          mv man/man8/$i.8 man/man8/cyr$i.8
+      done
+    ) || exit $?
+
+    #   install OSSP fsl configuration
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
+    %{l_shtool} install -c -m 644 %{l_value -s -a} \
+        %{SOURCE fsl.imapd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
+
+    #   strip binaries and remove obsolete man pages
+    strip $RPM_BUILD_ROOT%{l_prefix}/bin/*                >/dev/null 2>&1 || true
+    rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man5/krb.equiv.5 >/dev/null 2>&1 || true
+
+    #   determine installation files
+    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+        %{l_files_std} \
+        '%config %{l_prefix}/etc/fsl/fsl.imapd' \
+        '%config %{l_prefix}/etc/imapd/imapd.conf' \
+        '%config %{l_prefix}/etc/imapd/cyrus.conf' \
+        '%dir %attr(0750,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/imapd' \
+        '%dir %attr(0750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/imapd/*' \
+        '%dir %attr(0770,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/imapd/*/*' \
+        '%dir %attr(0770,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/imapd/tmp' \
+        '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/imapd/socket' \
+        `cat perl-openpkg-files`
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+
+%pre
+    #   before upgrade, save status and stop service
+    if [ $1 -eq 2 ]; then
+        eval `%{l_rc} imapd status 2>/dev/null | tee %{l_tmpfile}`
+        %{l_rc} imapd stop 2>/dev/null
+    fi
+    exit 0
+
+%post
+    if [ $1 -eq 1 ]; then
+        #   display final hints on initial installation
+        ( echo "To complete the Cyrus IMAP installation do:"
+          echo "1. start SASL and Cyrus IMAP with:"
+          echo "   $RPM_INSTALL_PREFIX/bin/openpkg rc sasl start"
+          echo "   $RPM_INSTALL_PREFIX/bin/openpkg rc imapd start"
+          echo "2. hook Cyrus IMAP into your particular MTA manually"
+          echo "   (usually configure mail delivery via LMTP)"
+          echo "3. create mailboxes for each of your users:"
+          echo "   \$ $RPM_INSTALL_PREFIX/bin/cyradm --user=%{l_susr} localhost"
+          echo "   cyradm> createmailbox user.<user>"
+          echo "   cyradm> setaclmailbox user.<user> <user> lrswipcd"
+          echo "   cyradm> mboxconfig user.<user> comment \"<name>\""
+          echo "   cyradm> setquota user.<user> STORAGE 500000"
+        ) | %{l_rpmtool} msg -b -t notice
+    elif [ $1 -eq 2 ]; then
+        #   after upgrade, restore status
+        eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
+        [ ".$imapd_active" = .yes ] && %{l_rc} imapd start
+    fi
+    exit 0
+
+%preun
+    #   before erase, stop service and remove log and temporary files
+    if [ $1 -eq 0 ]; then
+        %{l_rc} imapd stop 2>/dev/null
+        rm -f  $RPM_INSTALL_PREFIX/var/imapd/socket/*   >/dev/null 2>&1 || true
+        rm -rf $RPM_INSTALL_PREFIX/var/imapd/tmp/*      >/dev/null 2>&1 || true
+    fi
+    exit 0
+
diff --git a/imapd/kolab.patch b/imapd/kolab.patch
deleted file mode 100644
index e2252e5..0000000
--- a/imapd/kolab.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-diff -ur imapd.spec.orig imapd.spec
---- imapd.spec.orig	2008-10-20 20:12:23.000000000 +0200
-+++ imapd.spec	2010-02-08 17:49:08.705491666 +0100
-@@ -31,23 +31,25 @@
- Class:        BASE
- Group:        Mail
- License:      BSD
--Version:      2.3.13
--Release:      20081020
-+Version:      2.3.16
-+Release:      20081020_kolab7
- 
- #   package options
--%option       with_fsl           yes
--%option       with_group         no
--%option       with_group_igncase no
--%option       with_atvdom        no
--%option       with_drac          no
--%option       with_replication   no
--%option       with_murder        no
--%option       with_listext       no
--%option       with_nntp          no
--%option       with_ldap          no
--%option       with_annotate      no
--%option       with_morelogging   no
--%option       with_kolab         no
-+%option       with_fsl             yes
-+%option       with_group           no
-+%option       with_group_igncase   no
-+%option       with_atvdom          no
-+%option       with_drac            no
-+%option       with_replication     no
-+%option       with_murder          no
-+%option       with_listext         no
-+%option       with_nntp            no
-+%option       with_ldap            no
-+%option       with_annotate        no
-+%option       with_morelogging     no
-+%option       with_kolab           no
-+%option       with_kolab_nocaps    no
-+%option       with_crossdomain_acl no
- 
- #   fixing implicit inter-module dependencies and correlations
- %if "%{with_kolab}" == "yes"
-@@ -67,12 +69,13 @@
- Source3:      imapd.conf
- Source4:      fsl.imapd
- Patch0:       imapd.patch
--Patch1:       imapd.patch.group
--Patch2:       http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/cyrus-imapd/cyrus-imapd-2.3.11/KOLAB_cyrus-imapd-2.3.11-_Annotations2.patch
--Patch3:       http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/cyrus-imapd/cyrus-imapd-2.3.11/KOLAB_cyrus-cyradm-2.3.11_Annotations.patch
--Patch4:       http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/cyrus-imapd/cyrus-imapd-2.3.11/KOLAB_cyrus-imapd-2.3.11-_Logging.patch
--Patch5:       http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/cyrus-imapd/cyrus-imapd-2.3.11/KOLAB_cyrus-imapd-2.3.11-_UID.patch
--Patch6:       http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/cyrus-imapd/cyrus-imapd-2.3.11/KOLAB_cyrus-imapd-2.3.11-_Folder-names.patch
-+Patch1:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Groups2.patch
-+Patch2:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_cross-domain-acls.patch
-+Patch3:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Cyradm_Annotations.patch
-+Patch4:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Logging.patch
-+Patch5:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_UID.patch
-+Patch6:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_Folder-names.patch
-+Patch7:       patches/cyrus-imapd-%{version}/KOLAB_cyrus-imapd-%{version}_timsieved_starttls-sendcaps.patch
- 
- #   build information
- Prefix:       %{l_prefix}
-@@ -120,19 +123,19 @@
- 
-     #   add optional group file support with support to ignore case
- %if "%{with_group}" == "yes"
--    cp %{PATCH imapd.patch.group} imapd.patch.group
--%if "%{with_group_igncase}" == "yes"
--    %{l_shtool} subst -e 's;^\(\+.*\)strcmp;\1strcasecmp;' imapd.patch.group
--%endif
--    %{l_patch} -p1 <imapd.patch.group
-+    %patch -p1 -P 1
-     %{l_shtool} subst \
-         -e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
-         lib/auth_unix.c
- %endif
- 
-+    # kolab/issue1141 (Cannot give users from other domains access to a folder (rt#5747))
-+%if "%{with_crossdomain_acl}" == "yes"
-+    %patch -p0 -P 2
-+%endif
-+
-     #   add optional folder annotation support
- %if "%{with_annotate}" == "yes"
--    sed <%{PATCH2} -e '5,27d' | %{l_patch} -p1
-     %patch -p1 -P 3
- %endif
- 
-@@ -152,6 +155,11 @@
-      %patch -p1 -P 6
- %endif
- 
-+    #   kolab/issue2443 (kontact aborts sieve when imapd sends capabilities after starttls)
-+%if "%{with_kolab_nocaps}" == "yes"
-+     %patch -p1 -P 7
-+%endif
-+
-     #   add optional DRAC file support
- %if "%{with_drac}" == "yes"
-     %{l_shtool} subst -e 's;@DRACLIBS@;-ldrac;g' contrib/drac_auth.patch
-@@ -287,7 +295,11 @@
- %if "%{with_nntp}" == "yes"
-         --enable-nntp \
- %endif
-+%if "%{with_kolab_nocaps}" == "yes"
-+        --with-extraident=kolab-nocaps \
-+%else
-         --with-extraident=openpkg \
-+%endif
-         --without-krb
- 
-     #   build program
-@@ -411,9 +423,6 @@
-     #   before erase, stop service and remove log and temporary files
-     if [ $1 -eq 0 ]; then
-         %{l_rc} imapd stop 2>/dev/null
--        rm -f  $RPM_INSTALL_PREFIX/var/imapd/*.db       >/dev/null 2>&1 || true
--        rm -f  $RPM_INSTALL_PREFIX/var/imapd/db.backup* >/dev/null 2>&1 || true
--        rm -f  $RPM_INSTALL_PREFIX/var/imapd/log/*.log  >/dev/null 2>&1 || true
-         rm -f  $RPM_INSTALL_PREFIX/var/imapd/socket/*   >/dev/null 2>&1 || true
-         rm -rf $RPM_INSTALL_PREFIX/var/imapd/tmp/*      >/dev/null 2>&1 || true
-     fi
-diff -ur fsl.imapd.orig fsl.imapd
---- fsl.imapd.orig	2007-12-11 10:53:12.000000000 +0100
-+++ fsl.imapd	2010-02-08 17:35:54.886390975 +0100
-@@ -14,7 +14,7 @@
-     }
- };
- 
--ident (pop3.)/.+ q{
-+ident (pop3d|pop3s|pop3)/.+ q{
-     prefix(
-         prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
-     )
diff --git a/imapd/rc.imapd b/imapd/rc.imapd
new file mode 100644
index 0000000..18ae341
--- /dev/null
+++ b/imapd/rc.imapd
@@ -0,0 +1,75 @@
+#!@l_prefix@/bin/openpkg rc
+##
+##  rc.imapd -- Run-Commands
+##
+
+%config
+    imapd_enable="$openpkg_rc_def"
+    imapd_flags=""
+    imapd_log_prolog="true"
+    imapd_log_epilog="true"
+    imapd_log_numfiles="10"
+    imapd_log_minsize="1M"
+    imapd_log_complevel="9"
+    imapd_log_daemons="cyrmaster imapd pop3d sieve lmtpd idled cyr_db misc"
+    POP_type="cyrus"
+    POP_logfile="@l_prefix@/var/imapd/log/pop3d.log"
+
+%common
+    imapd_pidfile="@l_prefix@/var/imapd/cyrmaster.pid"
+    imapd_signal () {
+        [ -f $imapd_pidfile ] && kill -$1 `cat $imapd_pidfile`
+    }
+
+%status -u @l_susr@ -o
+    imapd_usable="unknown"
+    imapd_active="no"
+    rcService imapd enable yes && \
+        imapd_signal 0 && imapd_active="yes"
+    echo "imapd_enable=\"$imapd_enable\""
+    echo "imapd_usable=\"$imapd_usable\""
+    echo "imapd_active=\"$imapd_active\""
+
+%start -u @l_susr@
+    rcService imapd enable yes || exit 0
+    rcService imapd active yes && exit 0
+    @l_prefix@/bin/cyrmaster -d ${imapd_flags}
+
+%stop -u @l_susr@
+    rcService imapd enable yes || exit 0
+    rcService imapd active no && exit 0
+    imapd_signal TERM
+    rm -f $imapd_pidfile >/dev/null 2>&1 || true
+
+%restart -u @l_susr@
+    rcService imapd enable yes || exit 0
+    rcService imapd active no && exit 0
+    imapd_signal TERM
+    rc imapd stop
+    sleep 2
+    rc imapd start
+
+%reload -u @l_susr@
+    rcService imapd enable yes || exit 0
+    rcService imapd active no && exit 0
+    imapd_signal HUP
+
+%daily -u @l_susr@
+    rcService imapd enable yes || exit 0
+    rcTmp -i
+    hintfile=`rcTmp -f -n hint`
+    for daemon in $imapd_log_daemons; do
+        if [ -f @l_prefix@/var/imapd/log/$daemon.log ]; then
+            shtool rotate -f \
+                -n $imapd_log_numfiles -s $imapd_log_minsize -d \
+                -z $imapd_log_complevel -m 664 -o @l_rusr@ -g @l_rgrp@ \
+                -P "$imapd_log_prolog" \
+                -E "$imapd_log_epilog; echo 1 >$hintfile" \
+                @l_prefix@/var/imapd/log/$daemon.log
+        fi
+    done
+    if [ -s $hintfile ]; then
+        rc imapd restart
+    fi
+    rcTmp -k
+


commit bea2d59af4939a4d591b82975e9e0e9bb8275683
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Mon Mar 28 13:03:34 2011 +0200

    apache: kolab/issue4377: make sure logfiles are rotated

diff --git a/apache/rc.apache b/apache/rc.apache
index 4506ca0..cafd94d 100644
--- a/apache/rc.apache
+++ b/apache/rc.apache
@@ -5,18 +5,24 @@
 
 %config
     apache_enable="$openpkg_rc_def"
-    apache_log_files="@l_prefix@/var/apache/log/access.log"
+    apache_log_files="@l_prefix@/var/apache/log/apache-access.log"
     apache_log_rotsteps="10"
     apache_log_rotminsize="10M"
     apache_log_rotcomplevel="9"
     apache_log_rotprolog="true"
     apache_log_rotepilog="true"
-    apache_err_files="@l_prefix@/var/apache/log/error.log"
+    apache_err_files="@l_prefix@/var/apache/log/apache-error.log"
     apache_err_rotsteps="10"
     apache_err_rotminsize="1M"
     apache_err_rotcomplevel="9"
     apache_err_rotprolog="true"
     apache_err_rotepilog="true"
+    apache_php_err_files="@l_prefix@/var/apache/log/php-errors.log"
+    apache_php_err_rotsteps="10"
+    apache_php_err_rotminsize="1M"
+    apache_php_err_rotcomplevel="9"
+    apache_php_err_rotprolog="true"
+    apache_php_err_rotepilog="true"
     apache_cgi_files="@l_prefix@/var/apache/log/script.log"
     apache_cgi_rotsteps="10"
     apache_cgi_rotminsize="1M"
@@ -84,6 +90,12 @@
         -E "$apache_err_rotepilog; echo 1 >$hintfile" \
         ${apache_err_files}
     shtool rotate -f \
+        -n ${apache_php_err_rotsteps} -s ${apache_err_rotminsize} -d \
+        -z ${apache_php_err_rotcomplevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
+        -P "$apache_php_err_rotprolog" \
+        -E "$apache_php_err_rotepilog; echo 1 >$hintfile" \
+        ${apache_php_err_files}
+    shtool rotate -f \
         -n ${apache_cgi_rotsteps} -s ${apache_cgi_rotminsize} -d \
         -z ${apache_cgi_rotcomplevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
         -P "$apache_cgi_rotprolog" \


commit da0be2cf0a46a898b75a8e7af6109eeb23d48514
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Mar 8 14:46:41 2011 +0100

    openldap: Update to 2.4.23

diff --git a/openldap/openldap.spec b/openldap/openldap.spec
index 00c1053..deabc7d 100644
--- a/openldap/openldap.spec
+++ b/openldap/openldap.spec
@@ -31,8 +31,8 @@ Distribution: OpenPKG Community
 Class:        BASE
 Group:        LDAP
 License:      GPL
-Version:      2.4.21
-Release:      20100105
+Version:      2.4.23
+Release:      20110308
 
 #   package options
 %option       with_server   yes
@@ -331,3 +331,13 @@ AutoReqProv:  no
     exit 0
 %endif
 
+
+%changelog
+* Tue Mar 08 2011 Christoph Wickert <wickert at kolabsys.com> - 2.4.23-20110308
+- Update to 2.4.23
+
+* Wed Mar 24 2010 Gunnar Wrobel <wrobel at kolabsys.com> - 2.4.21-20100105
+- Update to 2.4.21
+
+* Tue Jan 05 2010 Gunnar Wrobel <wrobel at kolabsys.com> - 2.4.19-20100105
+- Update to 2.4.19


commit 15b9ee03442674aa7794a1e6876e91550b9b647e
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Mar 2 00:39:49 2011 +0100

    apache-php: Update to 5.3.5

diff --git a/apache-php/Makefile b/apache-php/Makefile
index 16290ca..64cf666 100644
--- a/apache-php/Makefile
+++ b/apache-php/Makefile
@@ -1,9 +1,8 @@
 include ../make-helper/kolab.mk
 
-NAME=apache-php
-PACKAGE = $(NAME)
-VERSION=5.3.4
-RELEASE=20101230_kolab1
+PACKAGE = $(shell grep "^Name:" *.spec | sed -e "s/^Name:\s*\([a-z-]*\).*/\1/")
+VERSION = $(shell grep "^Version:" *.spec | sed -e "s/^Version:\s*\([0-9.]*\).*/\1/")
+RELEASE = $(shell grep "^Release:" *.spec | sed -e "s/^Release:\s*\([0-9]*\).*/\1/")
 
 SOURCE_URL=http://www.php.net/distributions
 SOURCE_0=php-$(VERSION).tar.bz2
diff --git a/apache-php/apache-php.spec b/apache-php/apache-php.spec
index d501c3f..f44dad1 100644
--- a/apache-php/apache-php.spec
+++ b/apache-php/apache-php.spec
@@ -21,9 +21,6 @@
 ##  SUCH DAMAGE.
 ##
 
-#   package versions
-%define       V_php                     5.3.4
-
 #   package information
 Name:         apache-php
 Summary:      Apache Extension: PHP Scripting Language
@@ -34,8 +31,8 @@ Distribution: OpenPKG Community
 Class:        BASE
 Group:        Web
 License:      PHP
-Version:      %{V_php}
-Release:      20101230_kolab1
+Version:      5.3.5
+Release:      20110301
 
 #   package options
 %option       with_bc                   no
@@ -127,12 +124,12 @@ Release:      20101230_kolab1
 %endif
 
 #   list of sources
-Source0:      http://static.php.net/www.php.net/distributions/php-%{V_php}.tar.bz2
+Source0:      http://static.php.net/www.php.net/distributions/php-%{version}.tar.bz2
 Source2:      apache-php.ini
 Source3:      apache-php.conf
-Patch1:       http://git.kolab.org/server/tree/php/patches/%{V_php}/KOLAB_php-%{V_php}_Annotations.patch
+Patch1:       http://git.kolab.org/server/tree/php/patches/%{version}/KOLAB_php-%{version}_Annotations.patch
 Patch2:       apache-php.patch
-Patch3:       http://git.kolab.org/server/tree/php/patches/%{V_php}/KOLAB_php-%{V_php}_myrights.patch
+Patch3:       http://git.kolab.org/server/tree/php/patches/%{version}/KOLAB_php-%{version}_myrights.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -281,18 +278,18 @@ AutoReqProv:  no
 
 %track
     prog apache-php = {
-        version   = %{V_php}
+        version   = %{version}
         url       = http://www.php.net/downloads.php
         regex     = php-(5\.\d+\.\d+)\.tar\.(bz2|gz)
     }
     prog apache-php:kolab = {
-        version   = %{V_php}
+        version   = %{version}
         url       = http://git.kolab.org/server/tree/php/patches/
         regex     = php-(\d+(\.\d+)+)/
     }
 
 %prep
-    %setup -q -n php-%{V_php}
+    %setup -q -n php-%{version}
     %{l_shtool} subst \
         -e 's;-i -a -n php5;-i -n php5;' \
         configure


commit c92f03c59679f1736d4335c785fc878e460a4868
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date:   Tue Apr 5 17:03:49 2011 +0200

    php: Update to 5.3.5

diff --git a/php/Makefile b/php/Makefile
index dcd8308..94b73ff 100644
--- a/php/Makefile
+++ b/php/Makefile
@@ -1,8 +1,8 @@
 include ../make-helper/kolab.mk
 
-PACKAGE=php
-VERSION=5.3.4
-RELEASE=20101230_kolab1
+PACKAGE = $(shell grep "^Name:" *.spec | sed -e "s/^Name:\s*\([a-z-]*\).*/\1/")
+VERSION = $(shell grep "^Version:" *.spec | sed -e "s/^Version:\s*\([0-9.]*\).*/\1/")
+RELEASE = $(shell grep "^Release:" *.spec | sed -e "s/^Release:\s*\([0-9]*\).*/\1/")
 
 SOURCE_URL=http://www.php.net/distributions
 SOURCE_0=php-$(VERSION).tar.bz2
diff --git a/php/patches/php-5.3.5/KOLAB_php-5.3.5_Annotations.patch b/php/patches/php-5.3.5/KOLAB_php-5.3.5_Annotations.patch
new file mode 100644
index 0000000..58c2732
--- /dev/null
+++ b/php/patches/php-5.3.5/KOLAB_php-5.3.5_Annotations.patch
@@ -0,0 +1,302 @@
+diff -dur php-5.3.5.orig/ext/imap/php_imap.c php-5.3.5/ext/imap/php_imap.c
+--- php-5.3.5.orig/ext/imap/php_imap.c	2010-11-18 16:22:22.000000000 +0100
++++ php-5.3.5/ext/imap/php_imap.c	2011-03-02 00:22:59.437080229 +0100
+@@ -164,6 +164,22 @@
+ 	ZEND_ARG_INFO(0, mailbox)
+ ZEND_END_ARG_INFO()
+ #endif
++#if defined(HAVE_IMAP2005)
++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setannotation, 0, 0, 5)
++	ZEND_ARG_INFO(0, stream_id)
++	ZEND_ARG_INFO(0, mailbox)
++	ZEND_ARG_INFO(0, entry)
++	ZEND_ARG_INFO(0, attr)
++	ZEND_ARG_INFO(0, value)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_getannotation, 0, 0, 4)
++	ZEND_ARG_INFO(0, stream_id)
++	ZEND_ARG_INFO(0, mailbox)
++	ZEND_ARG_INFO(0, entry)
++	ZEND_ARG_INFO(0, attr)
++ZEND_END_ARG_INFO()
++#endif
+ 
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_expunge, 0, 0, 1)
+ 	ZEND_ARG_INFO(0, stream_id)
+@@ -408,6 +424,11 @@
+ 	ZEND_ARG_INFO(0, options)
+ ZEND_END_ARG_INFO()
+ 
++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_status_current, 0, 0, 2)
++	ZEND_ARG_INFO(0, stream_id)
++	ZEND_ARG_INFO(0, options)
++ZEND_END_ARG_INFO()
++
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_bodystruct, 0, 0, 3)
+ 	ZEND_ARG_INFO(0, stream_id)
+ 	ZEND_ARG_INFO(0, msg_no)
+@@ -507,6 +528,7 @@
+ 	PHP_FE(imap_binary,								arginfo_imap_binary)
+ 	PHP_FE(imap_utf8,								arginfo_imap_utf8)
+ 	PHP_FE(imap_status,								arginfo_imap_status)
++	PHP_FE(imap_status_current,						arginfo_imap_status_current)
+ 	PHP_FE(imap_mailboxmsginfo,						arginfo_imap_mailboxmsginfo)
+ 	PHP_FE(imap_setflag_full,						arginfo_imap_setflag_full)
+ 	PHP_FE(imap_clearflag_full,						arginfo_imap_clearflag_full)
+@@ -537,6 +559,10 @@
+ 	PHP_FE(imap_setacl,								arginfo_imap_setacl)
+ 	PHP_FE(imap_getacl,								arginfo_imap_getacl)
+ #endif
++#if defined(HAVE_IMAP2005)
++ 	PHP_FE(imap_setannotation,						arginfo_imap_setannotation)
++ 	PHP_FE(imap_getannotation,						arginfo_imap_getannotation)
++#endif
+ 
+ 	PHP_FE(imap_mail,								arginfo_imap_mail)
+ 
+@@ -798,6 +824,30 @@
+ /* }}} */
+ #endif
+ 
++#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) {
++	    if (cur->value)
++		add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, cur->value, strlen(cur->value), 1);
++	    else
++		add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, "", 0, 1);
++	}
++}
++/* }}} */
++#endif
++
+ /* {{{ PHP_GINIT_FUNCTION
+  */
+ static PHP_GINIT_FUNCTION(imap)
+@@ -823,6 +873,7 @@
+ #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ 	imap_globals->quota_return = NIL;
+ 	imap_globals->imap_acl_list = NIL;
++	imap_globals->imap_annotation_list = NIL;
+ #endif
+ 	imap_globals->gets_stream = NIL;
+ }
+@@ -1547,7 +1598,119 @@
+ }
+ /* }}} */
+ #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();
++        if (!attributes)
++            RETURN_FALSE;
++        cur = attributes;
++        cur->text.data = (unsigned char *)cpystr (Z_STRVAL_PP(attr));
++        cur->text.size = Z_STRLEN_PP(attr);
++        cur->next = NIL;
++        
++        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 */
+ PHP_FUNCTION(imap_expunge)
+@@ -3190,6 +3353,42 @@
+ }
+ /* }}} */
+ 
++/* {{{ 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);
++	}
++}
++/* }}} */
++
+ /* {{{ proto object imap_status(resource stream_id, string mailbox, int options)
+    Get status info from a mailbox */
+ PHP_FUNCTION(imap_status)
+diff -dur php-5.3.5.orig/ext/imap/php_imap.h php-5.3.5/ext/imap/php_imap.h
+--- php-5.3.5.orig/ext/imap/php_imap.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.3.5/ext/imap/php_imap.h	2011-03-02 00:22:59.437080229 +0100
+@@ -153,6 +153,7 @@
+ 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);
+@@ -173,6 +174,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);
+@@ -180,7 +184,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;
+@@ -211,6 +218,9 @@
+ 	zval **quota_return;
+ 	zval *imap_acl_list;
+ #endif
++#if defined(HAVE_IMAP2005)
++        zval *imap_annotation_list;
++#endif
+ 	/* php_stream for php_mail_gets() */
+ 	php_stream *gets_stream;
+ ZEND_END_MODULE_GLOBALS(imap)
diff --git a/php/patches/php-5.3.5/KOLAB_php-5.3.5_myrights.patch b/php/patches/php-5.3.5/KOLAB_php-5.3.5_myrights.patch
new file mode 100644
index 0000000..e5fa5e2
--- /dev/null
+++ b/php/patches/php-5.3.5/KOLAB_php-5.3.5_myrights.patch
@@ -0,0 +1,93 @@
+diff -u php-5.3.5.orig/ext/imap/php_imap.c php-5.3.5/ext/imap/php_imap.c
+--- php-5.3.5.orig/ext/imap/php_imap.c	2011-03-02 00:31:19.838254798 +0100
++++ php-5.3.5/ext/imap/php_imap.c	2011-03-02 00:30:57.751782818 +0100
+@@ -163,6 +163,11 @@
+ 	ZEND_ARG_INFO(0, stream_id)
+ 	ZEND_ARG_INFO(0, mailbox)
+ ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_myrights, 0, 0, 2)
++	ZEND_ARG_INFO(0, stream_id)
++	ZEND_ARG_INFO(0, mailbox)
++ZEND_END_ARG_INFO()
+ #endif
+ #if defined(HAVE_IMAP2005)
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setannotation, 0, 0, 5)
+@@ -558,6 +563,7 @@
+ 	PHP_FE(imap_set_quota,							arginfo_imap_set_quota)
+ 	PHP_FE(imap_setacl,								arginfo_imap_setacl)
+ 	PHP_FE(imap_getacl,								arginfo_imap_getacl)
++	PHP_FE(imap_myrights,							arginfo_imap_myrights)
+ #endif
+ #if defined(HAVE_IMAP2005)
+  	PHP_FE(imap_setannotation,						arginfo_imap_setannotation)
+@@ -846,6 +852,20 @@
+ 	}
+ }
+ /* }}} */
++
++/* {{{ mail_myrights
++ *
++ * Mail MYRIGHTS callback
++ * Called via the mail_parameter function in c-client:src/c-client/mail.c
++ */
++void mail_myrights(MAILSTREAM *stream, char *mailbox, char *rights)
++{
++	TSRMLS_FETCH();
++
++	ZVAL_STRING(IMAPG(imap_acl_list), rights, 1)
++
++}
++/* }}} */
+ #endif
+ 
+ /* {{{ PHP_GINIT_FUNCTION
+@@ -1597,6 +1617,36 @@
+ 	IMAPG(imap_acl_list) = NIL;
+ }
+ /* }}} */
++
++/* {{{ proto string imap_myrights(resource stream_id, string mailbox)
++	Gets my rights (ACL) for a given mailbox */
++PHP_FUNCTION(imap_myrights)
++{
++	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);
++
++	IMAPG(imap_acl_list) = return_value;
++
++	/* set the callback for the GET_ACL function */
++	mail_parameters(NIL, SET_MYRIGHTS, (void *) mail_myrights);
++	if(!imap_myrights(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox))) {
++		php_error(E_WARNING, "c-client imap_myrights failed");
++		zval_dtor(return_value);
++		RETURN_FALSE;
++	}
++
++	IMAPG(imap_acl_list) = NIL;
++}
++/* }}} */
++
+ #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */
+  
+ #if defined(HAVE_IMAP2005)
+diff -u php-5.3.5.orig/ext/imap/php_imap.h php-5.3.5/ext/imap/php_imap.h
+--- php-5.3.5.orig/ext/imap/php_imap.h	2011-03-02 00:31:19.839254637 +0100
++++ php-5.3.5/ext/imap/php_imap.h	2011-03-02 00:30:57.752782658 +0100
+@@ -183,6 +183,7 @@
+ PHP_FUNCTION(imap_set_quota);
+ PHP_FUNCTION(imap_setacl);
+ PHP_FUNCTION(imap_getacl);
++PHP_FUNCTION(imap_myrights);
+ #endif
+ #if defined(HAVE_IMAP2005)
+ PHP_FUNCTION(imap_setannotation);
+Gemeinsame Unterverzeichnisse: php-5.3.5.orig/ext/imap/tests und php-5.3.5/ext/imap/tests.
diff --git a/php/patches/php-5.3.5/series b/php/patches/php-5.3.5/series
new file mode 100644
index 0000000..cf6d8b0
--- /dev/null
+++ b/php/patches/php-5.3.5/series
@@ -0,0 +1,2 @@
+KOLAB_Annotations.patch
+KOLAB_myrights.patch
diff --git a/php/php.spec b/php/php.spec
index ded346b..95f9576 100644
--- a/php/php.spec
+++ b/php/php.spec
@@ -21,9 +21,6 @@
 ##  SUCH DAMAGE.
 ##
 
-#   package versions
-%define       V_php                     5.3.4
-
 #   package information
 Name:         php
 Summary:      Personal HomePage (PHP)
@@ -34,8 +31,8 @@ Distribution: OpenPKG Community
 Class:        BASE
 Group:        Language
 License:      PHP
-Version:      %{V_php}
-Release:      20101230_kolab1
+Version:      5.3.5
+Release:      20110301
 
 #   package options
 %option       with_bc                   no
@@ -127,11 +124,11 @@ Release:      20101230_kolab1
 %endif
 
 #   list of sources
-Source0:      http://static.php.net/www.php.net/distributions/php-%{V_php}.tar.bz2
+Source0:      http://static.php.net/www.php.net/distributions/php-%{version}.tar.bz2
 Source2:      php.ini
-Patch1:       http://git.kolab.org/server/tree/php/patches/%{V_php}/KOLAB_php-%{V_php}_Annotations.patch
+Patch1:       http://git.kolab.org/server/tree/php/patches/%{version}/KOLAB_php-%{version}_Annotations.patch
 Patch2:       php.patch
-Patch3:       http://git.kolab.org/server/tree/php/patches/%{V_php}/KOLAB_php-%{V_php}_myrights.patch
+Patch3:       http://git.kolab.org/server/tree/php/patches/%{version}/KOLAB_php-%{version}_myrights.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -276,12 +273,12 @@ AutoReqProv:  no
 
 %track
     prog php = {
-        version   = %{V_php}
+        version   = %{version}
         url       = http://www.php.net/downloads.php
         regex     = php-(5\.\d+\.\d+)\.tar\.(bz2|gz)
     }
     prog php:kolab = {
-        version   = %{V_php}
+        version   = %{version}
         url       = http://git.kolab.org/server/tree/php/patches/
         regex     = php-(\d+(\.\d+)+)/
     }





More information about the commits mailing list