Date: Tuesday, February 28, 2023 @ 19:57:25 Author: arojas Revision: 1405633
archrelease: copy trunk to community-testing-x86_64 Added: cyrus-imapd/repos/community-testing-x86_64/PKGBUILD (from rev 1405632, cyrus-imapd/trunk/PKGBUILD) cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.service (from rev 1405632, cyrus-imapd/trunk/cyrus-imapd.service) cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.sysusers (from rev 1405632, cyrus-imapd/trunk/cyrus-imapd.sysusers) cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.tmpfiles (from rev 1405632, cyrus-imapd/trunk/cyrus-imapd.tmpfiles) cyrus-imapd/repos/community-testing-x86_64/imapd.conf.patch (from rev 1405632, cyrus-imapd/trunk/imapd.conf.patch) cyrus-imapd/repos/community-testing-x86_64/keys/ cyrus-imapd/repos/community-testing-x86_64/pcre2.patch (from rev 1405632, cyrus-imapd/trunk/pcre2.patch) Deleted: cyrus-imapd/repos/community-testing-x86_64/PKGBUILD cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.service cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.sysusers cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.tmpfiles cyrus-imapd/repos/community-testing-x86_64/imapd.conf.patch cyrus-imapd/repos/community-testing-x86_64/keys/ cyrus-imapd/repos/community-testing-x86_64/pcre2.patch ----------------------+ PKGBUILD | 266 +++++++++++++++++++++---------------------- cyrus-imapd.service | 24 +-- cyrus-imapd.sysusers | 2 cyrus-imapd.tmpfiles | 14 +- imapd.conf.patch | 26 ++-- pcre2.patch | 300 ++++++++++++++++++++++++------------------------- 6 files changed, 316 insertions(+), 316 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2023-02-28 19:57:00 UTC (rev 1405632) +++ PKGBUILD 2023-02-28 19:57:25 UTC (rev 1405633) @@ -1,133 +0,0 @@ -# Maintainer: Bruno Pagani <archa...@archlinux.org> -# Contributor: Jakob Gahde <j...@fmail.co.uk> -# Contributor: Carsten Feuls <archli...@carstenfeuls.de> -# Contributor: John Lane <archlinux at jelmail dot com> -# Contributor: Fisher Duan <steamedf...@njuopen.com> -# Contributor: Ryan Corder <ry...@greengrey.org> - -pkgbase=cyrus-imapd -pkgname=(cyrus-imapd cyrus-imapd-docs) -pkgver=3.6.0 -pkgrel=3 -pkgdesc="An email, contacts and calendar server" -arch=(x86_64) -url="https://www.cyrusimap.org/" -license=(BSD) -makedepends=(libsasl jansson libbsd icu util-linux openssl sqlite - krb5 mariadb-libs postgresql-libs brotli libchardet libical - libxml2 libnghttp2 shapelib libwslay zlib zstd libcap - clamav libldap pcre2 perl xapian-core rsync) -checkdepends=(cunit) -source=(https://github.com/cyrusimap/cyrus-imapd/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz{,.sig} - pcre2.patch - imapd.conf.patch - ${pkgname}.service - ${pkgname}.sysusers - ${pkgname}.tmpfiles) -sha512sums=('d2b21117e7d0dd93212a43ca42098dc8b59613cb45ed2287d381c8c363026ac29386dfd90f07fa2ce8a77f56dddd19f2cc5b80d9c60c400d65cbb1d52a8db93c' - 'SKIP' - 'ee40b72a52125ee9f59a26a99ab1c75116929644b05ade339aa921d6c4173d80d9d48ec5d9ad71a95f5adc025337d1d13ad8e23184b60f3c11e397c6e9746cd5' - '0862ffc8c05208efd4d2fb50a6e3719ebc65fc2d72f8e6404235aa32cc44d8227056a17b78f2726e15ff8e38d473795f837c34bfbe89b694b2298c9baab9d5db' - '738242e80cec2c25ae6a85a889cc8d35d7c2f43b2b4d64d74f99a230b21024f168a885f1e319aec1aab0e0599e41211478b99dc608a4ba036be90f8d7e23fd96' - '148f20fc018196bc54078dbd63469542617aebde80937866282b0811acd90065529cfc6b5f4cf34d0095f5052b31e4bbaf877424f575753a09912a8b40a66f4b' - '6cb3b4d0c0c8e301d0fa9c4bf38dd971aa8309eb538c86fb95480768223e8b29f7f7f4da8a9afd8693169830418f92a6f2ddb60661b455b5ca678248ad9a8a41') -validpgpkeys=(5B55619A9D7040A9DEE2A2CB554F04FEB36378E0) - -prepare() { - cd ${pkgbase}-${pkgver} - patch -p1 < ../pcre2.patch - rm sieve/sieve.c - autoreconf -vfi -} - -build() { - cd ${pkgbase}-${pkgver} - - export PERL_MM_OPT="NO_PACKLIST=true NO_PERLLOCAL=true" - # Work around Cyrus bug #3562, #3588 - export CFLAGS="${CFLAGS} -fno-toplevel-reorder" - - ./configure \ - --prefix=/usr \ - --libexecdir=/usr/lib/cyrus \ - --sysconfdir=/etc/cyrus \ - --sbindir=/usr/bin \ - --enable-xapian \ - --enable-autocreate \ - --enable-idled \ - --enable-nntp \ - --enable-murder \ - --enable-http \ - --enable-calalarmd \ - --enable-jmap \ - --enable-replication \ - --enable-backup \ - --enable-unit-tests \ - --with-mysql=yes \ - --with-pgsql=yes \ - --with-sqlite=yes \ - --with-ldap \ - --with-libcap \ - --with-pidfile=/run/cyrus-master.pid \ - --with-syslogfacility=MAIL - - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool - - make -} - -check() { - cd ${pkgbase}-${pkgver} - make check -} - -package_cyrus-imapd() { - depends=(libsasl jansson icu util-linux-libs openssl sqlite - krb5 mariadb-libs postgresql-libs brotli libchardet libical - libxml2 libnghttp2 shapelib libwslay zlib zstd libcap - libldap pcre2 perl xapian-core e2fsprogs) - optdepends=('cyrus-imapd-docs: documentation' - 'clamav: for cyr_virusscan' - 'rsync: for compacting Xapian databases') - provides=(imap-server pop3-server) - backup=(etc/cyrus/cyrus.conf etc/cyrus/imapd.conf) - - # Install system configuration - install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/ - install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf - install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf - - cd ${pkgbase}-${pkgver} - - make install INSTALLDIRS=vendor DESTDIR="${pkgdir}" - - # Rename httpd.8 and master.8 so they don’t conflict with the identically - # named manpages from postfix and apache - mv "${pkgdir}"/usr/share/man/man8/httpd.8{,cyrus} - mv "${pkgdir}"/usr/share/man/man8/master.8{,cyrus} - - # Install additional utilities - for i in arbitronsort.pl masssievec mkimap mknewsgroups rehash translatesieve; do - install -Dm755 tools/${i} -t "${pkgdir}"/usr/bin/ - done - - # Install configuration files - install -Dm644 doc/examples/cyrus_conf/normal.conf "${pkgdir}"/etc/cyrus/cyrus.conf - install -Dm644 doc/examples/imapd_conf/normal.conf "${pkgdir}"/etc/cyrus/imapd.conf - patch "${pkgdir}"/etc/cyrus/imapd.conf "${srcdir}"/imapd.conf.patch - - # Install basic documentation - install -Dm644 -t "${pkgdir}"/usr/share/doc/cyrus-imapd/ README.md doc/README.* - cp -r doc/examples "${pkgdir}"/usr/share/doc/cyrus-imapd/ - - install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}/ -} - -package_cyrus-imapd-docs() { - pkgdesc="Documentation for the Cyrus IMAP server" -# arch=(any) - cd ${pkgbase}-${pkgver} - install -dm755 "${pkgdir}"/usr/share/doc/cyrus-imapd - cp -r doc/html doc/internal doc/legacy doc/text "${pkgdir}"/usr/share/doc/cyrus-imapd - install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}/ -} Copied: cyrus-imapd/repos/community-testing-x86_64/PKGBUILD (from rev 1405632, cyrus-imapd/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2023-02-28 19:57:25 UTC (rev 1405633) @@ -0,0 +1,133 @@ +# Maintainer: Bruno Pagani <archa...@archlinux.org> +# Contributor: Jakob Gahde <j...@fmail.co.uk> +# Contributor: Carsten Feuls <archli...@carstenfeuls.de> +# Contributor: John Lane <archlinux at jelmail dot com> +# Contributor: Fisher Duan <steamedf...@njuopen.com> +# Contributor: Ryan Corder <ry...@greengrey.org> + +pkgbase=cyrus-imapd +pkgname=(cyrus-imapd cyrus-imapd-docs) +pkgver=3.6.1 +pkgrel=1 +pkgdesc="An email, contacts and calendar server" +arch=(x86_64) +url="https://www.cyrusimap.org/" +license=(BSD) +makedepends=(libsasl jansson libbsd icu util-linux openssl sqlite + krb5 mariadb-libs postgresql-libs brotli libchardet libical + libxml2 libnghttp2 shapelib libwslay zlib zstd libcap + clamav libldap pcre2 perl xapian-core rsync) +checkdepends=(cunit) +source=(https://github.com/cyrusimap/cyrus-imapd/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz{,.sig} + pcre2.patch + imapd.conf.patch + ${pkgname}.service + ${pkgname}.sysusers + ${pkgname}.tmpfiles) +sha512sums=('3d669dbd2bf4bc421dd70527168f265f53a00f5573c4c2d15e08b7009258ded6e52acf4562da18d13ef8b7eb35d10cb5f4965e2d4e378a86c50dfa3eff78657a' + 'SKIP' + 'ee40b72a52125ee9f59a26a99ab1c75116929644b05ade339aa921d6c4173d80d9d48ec5d9ad71a95f5adc025337d1d13ad8e23184b60f3c11e397c6e9746cd5' + '0862ffc8c05208efd4d2fb50a6e3719ebc65fc2d72f8e6404235aa32cc44d8227056a17b78f2726e15ff8e38d473795f837c34bfbe89b694b2298c9baab9d5db' + '738242e80cec2c25ae6a85a889cc8d35d7c2f43b2b4d64d74f99a230b21024f168a885f1e319aec1aab0e0599e41211478b99dc608a4ba036be90f8d7e23fd96' + '148f20fc018196bc54078dbd63469542617aebde80937866282b0811acd90065529cfc6b5f4cf34d0095f5052b31e4bbaf877424f575753a09912a8b40a66f4b' + '6cb3b4d0c0c8e301d0fa9c4bf38dd971aa8309eb538c86fb95480768223e8b29f7f7f4da8a9afd8693169830418f92a6f2ddb60661b455b5ca678248ad9a8a41') +validpgpkeys=(5B55619A9D7040A9DEE2A2CB554F04FEB36378E0) + +prepare() { + cd ${pkgbase}-${pkgver} + patch -p1 < ../pcre2.patch + rm sieve/sieve.c + autoreconf -vfi +} + +build() { + cd ${pkgbase}-${pkgver} + + export PERL_MM_OPT="NO_PACKLIST=true NO_PERLLOCAL=true" + # Work around Cyrus bug #3562, #3588 + export CFLAGS="${CFLAGS} -fno-toplevel-reorder" + + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/cyrus \ + --sysconfdir=/etc/cyrus \ + --sbindir=/usr/bin \ + --enable-xapian \ + --enable-autocreate \ + --enable-idled \ + --enable-nntp \ + --enable-murder \ + --enable-http \ + --enable-calalarmd \ + --enable-jmap \ + --enable-replication \ + --enable-backup \ + --enable-unit-tests \ + --with-mysql=yes \ + --with-pgsql=yes \ + --with-sqlite=yes \ + --with-ldap \ + --with-libcap \ + --with-pidfile=/run/cyrus-master.pid \ + --with-syslogfacility=MAIL + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make +} + +check() { + cd ${pkgbase}-${pkgver} + make check +} + +package_cyrus-imapd() { + depends=(libsasl jansson icu util-linux-libs openssl sqlite + krb5 mariadb-libs postgresql-libs brotli libchardet libical + libxml2 libnghttp2 shapelib libwslay zlib zstd libcap + libldap pcre2 perl xapian-core e2fsprogs) + optdepends=('cyrus-imapd-docs: documentation' + 'clamav: for cyr_virusscan' + 'rsync: for compacting Xapian databases') + provides=(imap-server pop3-server) + backup=(etc/cyrus/cyrus.conf etc/cyrus/imapd.conf) + + # Install system configuration + install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/ + install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf + install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf + + cd ${pkgbase}-${pkgver} + + make install INSTALLDIRS=vendor DESTDIR="${pkgdir}" + + # Rename httpd.8 and master.8 so they don’t conflict with the identically + # named manpages from postfix and apache + mv "${pkgdir}"/usr/share/man/man8/httpd.8{,cyrus} + mv "${pkgdir}"/usr/share/man/man8/master.8{,cyrus} + + # Install additional utilities + for i in arbitronsort.pl masssievec mkimap mknewsgroups rehash translatesieve; do + install -Dm755 tools/${i} -t "${pkgdir}"/usr/bin/ + done + + # Install configuration files + install -Dm644 doc/examples/cyrus_conf/normal.conf "${pkgdir}"/etc/cyrus/cyrus.conf + install -Dm644 doc/examples/imapd_conf/normal.conf "${pkgdir}"/etc/cyrus/imapd.conf + patch "${pkgdir}"/etc/cyrus/imapd.conf "${srcdir}"/imapd.conf.patch + + # Install basic documentation + install -Dm644 -t "${pkgdir}"/usr/share/doc/cyrus-imapd/ README.md doc/README.* + cp -r doc/examples "${pkgdir}"/usr/share/doc/cyrus-imapd/ + + install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}/ +} + +package_cyrus-imapd-docs() { + pkgdesc="Documentation for the Cyrus IMAP server" +# arch=(any) + cd ${pkgbase}-${pkgver} + install -dm755 "${pkgdir}"/usr/share/doc/cyrus-imapd + cp -r doc/html doc/internal doc/legacy doc/text "${pkgdir}"/usr/share/doc/cyrus-imapd + install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}/ +} Deleted: cyrus-imapd.service =================================================================== --- cyrus-imapd.service 2023-02-28 19:57:00 UTC (rev 1405632) +++ cyrus-imapd.service 2023-02-28 19:57:25 UTC (rev 1405633) @@ -1,12 +0,0 @@ -[Unit] -Description=Cyrus IMAP mail server -After=network.target - -[Service] -Type=simple -Restart=on-failure -ExecStart=/usr/lib/cyrus/master -ExecReload=/usr/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target Copied: cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.service (from rev 1405632, cyrus-imapd/trunk/cyrus-imapd.service) =================================================================== --- cyrus-imapd.service (rev 0) +++ cyrus-imapd.service 2023-02-28 19:57:25 UTC (rev 1405633) @@ -0,0 +1,12 @@ +[Unit] +Description=Cyrus IMAP mail server +After=network.target + +[Service] +Type=simple +Restart=on-failure +ExecStart=/usr/lib/cyrus/master +ExecReload=/usr/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Deleted: cyrus-imapd.sysusers =================================================================== --- cyrus-imapd.sysusers 2023-02-28 19:57:00 UTC (rev 1405632) +++ cyrus-imapd.sysusers 2023-02-28 19:57:25 UTC (rev 1405633) @@ -1 +0,0 @@ -u cyrus 70:12 "Cyrus IMAP server" /var/lib/cyrus Copied: cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.sysusers (from rev 1405632, cyrus-imapd/trunk/cyrus-imapd.sysusers) =================================================================== --- cyrus-imapd.sysusers (rev 0) +++ cyrus-imapd.sysusers 2023-02-28 19:57:25 UTC (rev 1405633) @@ -0,0 +1 @@ +u cyrus 70:12 "Cyrus IMAP server" /var/lib/cyrus Deleted: cyrus-imapd.tmpfiles =================================================================== --- cyrus-imapd.tmpfiles 2023-02-28 19:57:00 UTC (rev 1405632) +++ cyrus-imapd.tmpfiles 2023-02-28 19:57:25 UTC (rev 1405633) @@ -1,7 +0,0 @@ -d /run/cyrus 0750 cyrus mail -d /run/cyrus/lock 0700 cyrus mail -d /run/cyrus/proc 0700 cyrus mail -d /run/cyrus/socket 0750 cyrus mail -d /var/lib/cyrus 0750 cyrus mail -d /var/spool/cyrus 0750 cyrus mail -d /var/spool/sieve 0750 cyrus mail Copied: cyrus-imapd/repos/community-testing-x86_64/cyrus-imapd.tmpfiles (from rev 1405632, cyrus-imapd/trunk/cyrus-imapd.tmpfiles) =================================================================== --- cyrus-imapd.tmpfiles (rev 0) +++ cyrus-imapd.tmpfiles 2023-02-28 19:57:25 UTC (rev 1405633) @@ -0,0 +1,7 @@ +d /run/cyrus 0750 cyrus mail +d /run/cyrus/lock 0700 cyrus mail +d /run/cyrus/proc 0700 cyrus mail +d /run/cyrus/socket 0750 cyrus mail +d /var/lib/cyrus 0750 cyrus mail +d /var/spool/cyrus 0750 cyrus mail +d /var/spool/sieve 0750 cyrus mail Deleted: imapd.conf.patch =================================================================== --- imapd.conf.patch 2023-02-28 19:57:00 UTC (rev 1405632) +++ imapd.conf.patch 2023-02-28 19:57:25 UTC (rev 1405633) @@ -1,13 +0,0 @@ ---- imapd.conf.pristine 2019-02-18 22:47:57.002057198 +0100 -+++ imapd.conf.new 2019-02-18 22:48:44.138434755 +0100 -@@ -65,6 +65,10 @@ - virtdomains: yes - defaultdomain: localhost - -+# Use these credentials to run services -+cyrus_user: cyrus -+cyrus_group: mail -+ - ################################################################### - ## User experience settings - ################################################################### Copied: cyrus-imapd/repos/community-testing-x86_64/imapd.conf.patch (from rev 1405632, cyrus-imapd/trunk/imapd.conf.patch) =================================================================== --- imapd.conf.patch (rev 0) +++ imapd.conf.patch 2023-02-28 19:57:25 UTC (rev 1405633) @@ -0,0 +1,13 @@ +--- imapd.conf.pristine 2019-02-18 22:47:57.002057198 +0100 ++++ imapd.conf.new 2019-02-18 22:48:44.138434755 +0100 +@@ -65,6 +65,10 @@ + virtdomains: yes + defaultdomain: localhost + ++# Use these credentials to run services ++cyrus_user: cyrus ++cyrus_group: mail ++ + ################################################################### + ## User experience settings + ################################################################### Deleted: pcre2.patch =================================================================== --- pcre2.patch 2023-02-28 19:57:00 UTC (rev 1405632) +++ pcre2.patch 2023-02-28 19:57:25 UTC (rev 1405633) @@ -1,150 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 8fe7d78..ac601a3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -666,7 +666,7 @@ AM_CONDITIONAL([SQUATTER], - AC_ARG_ENABLE(sieve, - [AS_HELP_STRING([--disable-sieve], [disable Sieve support])],,[enable_sieve="yes";]) - AC_ARG_ENABLE(pcre, -- [AS_HELP_STRING([--disable-pcre], [disable PCRE library])],[cyrus_cv_pcre_utf8="$enableval"]) -+ [AS_HELP_STRING([--disable-pcre2], [disable PCRE library])],[cyrus_cv_pcre_utf8="$enableval"]) - - if test "$enable_sieve" != "no"; then - AC_DEFINE(USE_SIEVE,[],[Build in Sieve support?]) -@@ -692,25 +692,25 @@ fi - - AM_CONDITIONAL([SIEVE], [test "${enable_sieve}" != "no"]) - --if test "$enable_pcre" != "no"; then -- AC_CHECK_HEADER(pcreposix.h) -- if test "$ac_cv_header_pcreposix_h" = "yes"; then -- AC_MSG_CHECKING(for utf8 enabled pcre) -- AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcreposix.h> --#ifndef REG_UTF8 -+if test "$enable_pcre2" != "no"; then -+ AC_CHECK_HEADER(pcre2posix.h) -+ if test "$ac_cv_header_pcre2posix_h" = "yes"; then -+ AC_MSG_CHECKING(for utf8 enabled pcre2) -+ AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcre2posix.h> -+#ifndef REG_UTF - #include </nonexistent> --#endif],cyrus_cv_pcre_utf8=yes,cyrus_cv_pcre_utf8=no)) -- AC_MSG_RESULT($cyrus_cv_pcre_utf8) -+#endif],cyrus_cv_pcre2_utf8=yes,cyrus_cv_pcre2_utf8=no)) -+ AC_MSG_RESULT($cyrus_cv_pcre2_utf8) - else -- cyrus_cv_pcre_utf8="no" -+ cyrus_cv_pcre2_utf8="no" - fi - fi - - LIB_REGEX= --if test "$cyrus_cv_pcre_utf8" = "yes"; then -- LIB_REGEX="-lpcre -lpcreposix"; -+if test "$cyrus_cv_pcre2_utf8" = "yes"; then -+ LIB_REGEX="-lpcre2-posix"; - AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?]) -- AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?]) -+ AC_DEFINE(HAVE_PCRE2POSIX_H, [], [Do we have usable pcre2 library?]) - else - AC_CHECK_HEADERS(rxposix.h) - if test "$ac_cv_header_rxposix_h" = "yes"; then -diff --git a/imap/cyr_buildinfo.c b/imap/cyr_buildinfo.c -index d8c4a96..c2db3b0 100644 ---- a/imap/cyr_buildinfo.c -+++ b/imap/cyr_buildinfo.c -@@ -181,7 +181,7 @@ static json_t *buildinfo() - #else - json_object_set_new(dependency, "jansson", json_false()); - #endif --#if defined(ENABLE_REGEX) && defined(HAVE_PCREPOSIX_H) -+#if defined(ENABLE_REGEX) && defined(HAVE_PCRE2POSIX_H) - json_object_set_new(dependency, "pcre", json_true()); - #else - json_object_set_new(dependency, "pcre", json_false()); -diff --git a/lib/util.h b/lib/util.h -index 6ac085c..dbeef25 100644 ---- a/lib/util.h -+++ b/lib/util.h -@@ -71,16 +71,17 @@ - extern const char CYRUS_VERSION[]; - - #ifdef ENABLE_REGEX --# ifdef HAVE_PCREPOSIX_H --# include <pcre.h> --# include <pcreposix.h> --# else /* !HAVE_PCREPOSIX_H */ -+# if defined(HAVE_PCRE2POSIX_H) && !defined(PCRE2_CODE_UNIT_WIDTH) -+# define PCRE2_CODE_UNIT_WIDTH 8 -+# include <pcre2.h> -+# include <pcre2posix.h> -+# elif !defined(HAVE_PCRE2POSIX_H) /* !HAVE_PCRE2POSIX_H */ - # ifdef HAVE_RXPOSIX_H - # include <rxposix.h> - # else /* !HAVE_RXPOSIX_H */ - # include <regex.h> - # endif /* HAVE_RXPOSIX_H */ --# endif /* HAVE_PCREPOSIX_H */ -+# endif /* HAVE_PCRE2POSIX_H */ - #endif /* ENABLE_REGEX */ - - #ifdef HAVE_LIBUUID -diff --git a/sieve/bc_eval.c b/sieve/bc_eval.c -index f14a5d7..9c3d67c 100644 ---- a/sieve/bc_eval.c -+++ b/sieve/bc_eval.c -@@ -316,9 +316,9 @@ static int regcomp_flags(int comparator, int requires) - { - int cflags = REG_EXTENDED; - --#ifdef HAVE_PCREPOSIX_H -+#ifdef HAVE_PCRE2POSIX_H - /* support UTF8 comparisons */ -- cflags |= REG_UTF8; -+ cflags |= REG_UTF; - #endif - - if (comparator == B_ASCIICASEMAP) { -diff --git a/sieve/comparator.h b/sieve/comparator.h -index b043bc2..8ff05b0 100644 ---- a/sieve/comparator.h -+++ b/sieve/comparator.h -@@ -47,16 +47,17 @@ - #include <sys/types.h> - - #ifdef ENABLE_REGEX --# ifdef HAVE_PCREPOSIX_H --# include <pcre.h> --# include <pcreposix.h> --# else /* !HAVE_PCREPOSIX_H */ -+# if defined(HAVE_PCRE2POSIX_H) && !defined(PCRE2_CODE_UNIT_WIDTH) -+# define PCRE2_CODE_UNIT_WIDTH 8 -+# include <pcre2.h> -+# include <pcre2posix.h> -+# elif !defined(HAVE_PCRE2POSIX_H) /* !HAVE_PCRE2POSIX_H */ - # ifdef HAVE_RXPOSIX_H - # include <rxposix.h> - # else /* !HAVE_RXPOSIX_H */ - # include <regex.h> - # endif /* HAVE_RXPOSIX_H */ --# endif /* HAVE_PCREPOSIX_H */ -+# endif /* HAVE_PCRE2POSIX_H */ - #endif /* ENABLE_REGEX */ - - #include "sieve_interface.h" -diff --git a/sieve/sieve.y b/sieve/sieve.y -index b080c26..8692fc1 100644 ---- a/sieve/sieve.y -+++ b/sieve/sieve.y -@@ -2215,9 +2215,9 @@ static int verify_regexlist(sieve_script_t *sscript, - regex_t reg; - int cflags = REG_EXTENDED | REG_NOSUB; - --#ifdef HAVE_PCREPOSIX_H -+#ifdef HAVE_PCRE2POSIX_H - /* support UTF8 comparisons */ -- cflags |= REG_UTF8; -+ cflags |= REG_UTF; - #endif - - if (collation == B_ASCIICASEMAP) { Copied: cyrus-imapd/repos/community-testing-x86_64/pcre2.patch (from rev 1405632, cyrus-imapd/trunk/pcre2.patch) =================================================================== --- pcre2.patch (rev 0) +++ pcre2.patch 2023-02-28 19:57:25 UTC (rev 1405633) @@ -0,0 +1,150 @@ +diff --git a/configure.ac b/configure.ac +index 8fe7d78..ac601a3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -666,7 +666,7 @@ AM_CONDITIONAL([SQUATTER], + AC_ARG_ENABLE(sieve, + [AS_HELP_STRING([--disable-sieve], [disable Sieve support])],,[enable_sieve="yes";]) + AC_ARG_ENABLE(pcre, +- [AS_HELP_STRING([--disable-pcre], [disable PCRE library])],[cyrus_cv_pcre_utf8="$enableval"]) ++ [AS_HELP_STRING([--disable-pcre2], [disable PCRE library])],[cyrus_cv_pcre_utf8="$enableval"]) + + if test "$enable_sieve" != "no"; then + AC_DEFINE(USE_SIEVE,[],[Build in Sieve support?]) +@@ -692,25 +692,25 @@ fi + + AM_CONDITIONAL([SIEVE], [test "${enable_sieve}" != "no"]) + +-if test "$enable_pcre" != "no"; then +- AC_CHECK_HEADER(pcreposix.h) +- if test "$ac_cv_header_pcreposix_h" = "yes"; then +- AC_MSG_CHECKING(for utf8 enabled pcre) +- AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcreposix.h> +-#ifndef REG_UTF8 ++if test "$enable_pcre2" != "no"; then ++ AC_CHECK_HEADER(pcre2posix.h) ++ if test "$ac_cv_header_pcre2posix_h" = "yes"; then ++ AC_MSG_CHECKING(for utf8 enabled pcre2) ++ AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcre2posix.h> ++#ifndef REG_UTF + #include </nonexistent> +-#endif],cyrus_cv_pcre_utf8=yes,cyrus_cv_pcre_utf8=no)) +- AC_MSG_RESULT($cyrus_cv_pcre_utf8) ++#endif],cyrus_cv_pcre2_utf8=yes,cyrus_cv_pcre2_utf8=no)) ++ AC_MSG_RESULT($cyrus_cv_pcre2_utf8) + else +- cyrus_cv_pcre_utf8="no" ++ cyrus_cv_pcre2_utf8="no" + fi + fi + + LIB_REGEX= +-if test "$cyrus_cv_pcre_utf8" = "yes"; then +- LIB_REGEX="-lpcre -lpcreposix"; ++if test "$cyrus_cv_pcre2_utf8" = "yes"; then ++ LIB_REGEX="-lpcre2-posix"; + AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?]) +- AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?]) ++ AC_DEFINE(HAVE_PCRE2POSIX_H, [], [Do we have usable pcre2 library?]) + else + AC_CHECK_HEADERS(rxposix.h) + if test "$ac_cv_header_rxposix_h" = "yes"; then +diff --git a/imap/cyr_buildinfo.c b/imap/cyr_buildinfo.c +index d8c4a96..c2db3b0 100644 +--- a/imap/cyr_buildinfo.c ++++ b/imap/cyr_buildinfo.c +@@ -181,7 +181,7 @@ static json_t *buildinfo() + #else + json_object_set_new(dependency, "jansson", json_false()); + #endif +-#if defined(ENABLE_REGEX) && defined(HAVE_PCREPOSIX_H) ++#if defined(ENABLE_REGEX) && defined(HAVE_PCRE2POSIX_H) + json_object_set_new(dependency, "pcre", json_true()); + #else + json_object_set_new(dependency, "pcre", json_false()); +diff --git a/lib/util.h b/lib/util.h +index 6ac085c..dbeef25 100644 +--- a/lib/util.h ++++ b/lib/util.h +@@ -71,16 +71,17 @@ + extern const char CYRUS_VERSION[]; + + #ifdef ENABLE_REGEX +-# ifdef HAVE_PCREPOSIX_H +-# include <pcre.h> +-# include <pcreposix.h> +-# else /* !HAVE_PCREPOSIX_H */ ++# if defined(HAVE_PCRE2POSIX_H) && !defined(PCRE2_CODE_UNIT_WIDTH) ++# define PCRE2_CODE_UNIT_WIDTH 8 ++# include <pcre2.h> ++# include <pcre2posix.h> ++# elif !defined(HAVE_PCRE2POSIX_H) /* !HAVE_PCRE2POSIX_H */ + # ifdef HAVE_RXPOSIX_H + # include <rxposix.h> + # else /* !HAVE_RXPOSIX_H */ + # include <regex.h> + # endif /* HAVE_RXPOSIX_H */ +-# endif /* HAVE_PCREPOSIX_H */ ++# endif /* HAVE_PCRE2POSIX_H */ + #endif /* ENABLE_REGEX */ + + #ifdef HAVE_LIBUUID +diff --git a/sieve/bc_eval.c b/sieve/bc_eval.c +index f14a5d7..9c3d67c 100644 +--- a/sieve/bc_eval.c ++++ b/sieve/bc_eval.c +@@ -316,9 +316,9 @@ static int regcomp_flags(int comparator, int requires) + { + int cflags = REG_EXTENDED; + +-#ifdef HAVE_PCREPOSIX_H ++#ifdef HAVE_PCRE2POSIX_H + /* support UTF8 comparisons */ +- cflags |= REG_UTF8; ++ cflags |= REG_UTF; + #endif + + if (comparator == B_ASCIICASEMAP) { +diff --git a/sieve/comparator.h b/sieve/comparator.h +index b043bc2..8ff05b0 100644 +--- a/sieve/comparator.h ++++ b/sieve/comparator.h +@@ -47,16 +47,17 @@ + #include <sys/types.h> + + #ifdef ENABLE_REGEX +-# ifdef HAVE_PCREPOSIX_H +-# include <pcre.h> +-# include <pcreposix.h> +-# else /* !HAVE_PCREPOSIX_H */ ++# if defined(HAVE_PCRE2POSIX_H) && !defined(PCRE2_CODE_UNIT_WIDTH) ++# define PCRE2_CODE_UNIT_WIDTH 8 ++# include <pcre2.h> ++# include <pcre2posix.h> ++# elif !defined(HAVE_PCRE2POSIX_H) /* !HAVE_PCRE2POSIX_H */ + # ifdef HAVE_RXPOSIX_H + # include <rxposix.h> + # else /* !HAVE_RXPOSIX_H */ + # include <regex.h> + # endif /* HAVE_RXPOSIX_H */ +-# endif /* HAVE_PCREPOSIX_H */ ++# endif /* HAVE_PCRE2POSIX_H */ + #endif /* ENABLE_REGEX */ + + #include "sieve_interface.h" +diff --git a/sieve/sieve.y b/sieve/sieve.y +index b080c26..8692fc1 100644 +--- a/sieve/sieve.y ++++ b/sieve/sieve.y +@@ -2215,9 +2215,9 @@ static int verify_regexlist(sieve_script_t *sscript, + regex_t reg; + int cflags = REG_EXTENDED | REG_NOSUB; + +-#ifdef HAVE_PCREPOSIX_H ++#ifdef HAVE_PCRE2POSIX_H + /* support UTF8 comparisons */ +- cflags |= REG_UTF8; ++ cflags |= REG_UTF; + #endif + + if (collation == B_ASCIICASEMAP) {