The package rpms/cyrus-imapd.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/cyrus-imapd.git/commit/?id=9d10c9d73... https://src.fedoraproject.org/cgit/rpms/cyrus-imapd.git/commit/?id=0a476b2b8....
Change: +%ifnarch s390x ppc64 +%ifnarch s390x ppc64 i686 armv7hl
Thanks.
Full change: ============
commit 0a476b2b84a2b1f492518cd098047d58495584a1 Author: Jason Tibbitts tibbs@math.uh.edu Date: Wed May 31 20:25:21 2017 -0500
OK, just avoid __isa_bits.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 11304d7..6b9d140 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -403,9 +403,10 @@ find %buildroot -name ".packlist" -exec rm {} ; # https://github.com/cyrusimap/cyrus-imapd/issues/1993 %ifnarch s390x ppc64 make %{?_smp_mflags} check || exit 1 +%endif
%if %{with cassandane} -%if %__isa_bits == 64 +%ifnarch s390x ppc64 i686 armv7hl # Run the Cassandane test suite. This will exhaustively test the various # server components, but running it in a mock chroot is rather an exercise. # Sadly Cassandane simply can't run on a 32-bit host at the moment. It needs @@ -487,7 +488,6 @@ export CYRUS_USER=$USER
%endif %endif -%endif
%pre
commit 5a9407dc6c4285efa3b2f544fd7adaf3a1c5a526 Author: Jason Tibbitts tibbs@math.uh.edu Date: Wed May 31 20:14:10 2017 -0500
Try a different conditional expression.
What's there works fine for me but mock doesn't like it for some reason.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index d3556b1..11304d7 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -404,7 +404,8 @@ find %buildroot -name ".packlist" -exec rm {} ; %ifnarch s390x ppc64 make %{?_smp_mflags} check || exit 1
-%if %{with cassandane} && %__isa_bits == 64 +%if %{with cassandane} +%if %__isa_bits == 64 # Run the Cassandane test suite. This will exhaustively test the various # server components, but running it in a mock chroot is rather an exercise. # Sadly Cassandane simply can't run on a 32-bit host at the moment. It needs @@ -486,6 +487,7 @@ export CYRUS_USER=$USER
%endif %endif +%endif
%pre
commit f28eca0f9ac4d341e60258bd5ecf28ca41da9ce0 Author: Jason Tibbitts tibbs@math.uh.edu Date: Wed May 31 18:42:09 2017 -0500
Exclude Cassandane on BE machines as well.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index daec511..d3556b1 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -403,8 +403,6 @@ find %buildroot -name ".packlist" -exec rm {} ; # https://github.com/cyrusimap/cyrus-imapd/issues/1993 %ifnarch s390x ppc64 make %{?_smp_mflags} check || exit 1 -%endif -
%if %{with cassandane} && %__isa_bits == 64 # Run the Cassandane test suite. This will exhaustively test the various @@ -487,6 +485,7 @@ export CYRUS_USER=$USER 2>&1
%endif +%endif
%pre
commit 9d10c9d73e2f11d3b8a837e74dc6a34efc711661 Author: Jason Tibbitts tibbs@math.uh.edu Date: Wed May 31 17:06:29 2017 -0500
More test suite work; run only on selected arches
I've decided to skip running the internal test suite on big-endian machines, and to not run Cassandane on 32-bit machines. Upstream is working on it but it's going to take a while.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index a062dfe..daec511 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -28,6 +28,9 @@ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz
Patch0: patch-cyrus-testsuite-endianness Patch1: patch-cyrus-testsuite-endianness2 +Patch2: patch-cyrus-testsuite-endianness3 +Patch3: patch-cyrus-testsuite-endianness4 +Patch4: patch-cyrus-autoreconf-keep-version
Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config @@ -190,6 +193,7 @@ IMAP server.
%prep %autosetup -p1 -S git +echo %version > VERSION
# Install the Fedora-specific documentation file install -m 644 %SOURCE16 doc/ @@ -235,7 +239,7 @@ popd # instead.
# Running autoreconf will confuse the program about what version it is. -# autoreconf -vi +autoreconf -vi
%configure \ --disable-silent-rules \ @@ -382,7 +386,7 @@ mv %buildroot/%_mandir/man8/httpd.8 %buildroot/%_mandir/man8/cyr_httpd.8 #remove executable bit from docs for ddir in doc perl/imap/examples do - find $ddir -type f -ls -exec chmod -x {} ; + find $ddir -type f -exec chmod -x {} ; done
# Remove pointless libtool archives @@ -395,11 +399,23 @@ find %buildroot -name ".packlist" -exec rm {} ;
%check +# The test suite fails on big-endian machines currently. This is tracked at +# https://github.com/cyrusimap/cyrus-imapd/issues/1993 +%ifnarch s390x ppc64 make %{?_smp_mflags} check || exit 1 +%endif
-%if %{with cassandane} + +%if %{with cassandane} && %__isa_bits == 64 # Run the Cassandane test suite. This will exhaustively test the various # server components, but running it in a mock chroot is rather an exercise. +# Sadly Cassandane simply can't run on a 32-bit host at the moment. It needs +# Perl to be compiled with support for 64-bit types, and due to an unfortunate +# typo in the Perl specfile, that's not the case currently. +# https://bugzilla.redhat.com/show_bug.cgi?id=1268828 +# There may be other Cassandane issues, so occasional testing on 32-bit +# architectures is needed until this is all resolved. +# Tracked upstream as https://github.com/cyrusimap/cassandane/issues/21 pushd cassandane
mkdir -p imaptest/src diff --git a/patch-cyrus-autoreconf-keep-version b/patch-cyrus-autoreconf-keep-version new file mode 100644 index 0000000..a515915 --- /dev/null +++ b/patch-cyrus-autoreconf-keep-version @@ -0,0 +1,53 @@ +From 216934c3f4884999206715db3499fc0162e1d65c Mon Sep 17 00:00:00 2001 +From: ellie timoney ellie@fastmail.com +Date: Tue, 30 May 2017 17:52:04 +1000 +Subject: [PATCH] build: preserve release version across autoreconf + +Administrators building from a release tarball can safely run +autoreconf without the source tree forgetting its version (or +worse, scavenging an unrelated version string from some git +repository in an ancestor directory). +--- + Makefile.am | 6 +++++- + tools/git-version.sh | 4 ++++ + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 9a4fa49be..e37822aac 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -116,7 +116,8 @@ noinst_HEADERS = + noinst_LTLIBRARIES = + noinst_PROGRAMS = + EXTRA_DIST = \ +- $(wildcard tools/vzic/*) ++ $(wildcard tools/vzic/*) \ ++ VERSION + + if COM_ERR + COMPILE_ET_DEP = com_err/et/compile_et +@@ -1910,6 +1911,9 @@ dist-hook: + find $(top_distdir) -type f -name .sphinx-build.stamp -delete + rm -rf $(top_distdir)/$(SPHINX_CACHE) + ++VERSION: tools/git-version.sh ++ $(AM_V_GEN)$< > $@.NEW && mv $@.NEW $@ ++ + install-data-hook: + if CMULOCAL + $(INSTALL) -m 644 $(top_srcdir)/depot/depot.conf $(DESTDIR)/ +diff --git a/tools/git-version.sh b/tools/git-version.sh +index 66563c162..c728769db 100755 +--- a/tools/git-version.sh ++++ b/tools/git-version.sh +@@ -41,6 +41,10 @@ + # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + # + ++# if we've come from a release package, ignore git entirely ++test -s VERSION && ++ exec head -1 VERSION ++ + # first try: based on annotated git tags (real releases) + version=$(git describe --dirty=-dirty 2>/dev/null) + test -n "$version" && diff --git a/patch-cyrus-testsuite-endianness3 b/patch-cyrus-testsuite-endianness3 new file mode 100644 index 0000000..5ba6c26 --- /dev/null +++ b/patch-cyrus-testsuite-endianness3 @@ -0,0 +1,58 @@ +From e3ee582fcf74e0754d2a850fbabe270125e334e8 Mon Sep 17 00:00:00 2001 +From: ellie timoney ellie@fastmail.com +Date: Wed, 31 May 2017 10:56:27 +1000 +Subject: [PATCH] cunit: run cyrusdb tests first + +Other suites depend on cyrusdb functionality so if it's broken, it +would be good to know that before they start complaining. +--- + Makefile.am | 2 +- + cunit/{db.testc => aaa-db.testc} | 0 + doc/internal/unit-tests.html | 2 +- + 3 files changed, 2 insertions(+), 2 deletions(-) + rename cunit/{db.testc => aaa-db.testc} (100%) + +diff --git a/Makefile.am b/Makefile.am +index e37822aac..c2c82d15d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -618,6 +618,7 @@ cunit_FRAMEWORK = \ + cunit/timeofday.h + + cunit_TESTS = \ ++ cunit/aaa-db.testc \ + cunit/annotate.testc \ + cunit/backend.testc \ + cunit/binhex.testc \ +@@ -628,7 +629,6 @@ cunit_TESTS = \ + cunit/command.testc \ + cunit/conversations.testc \ + cunit/crc32.testc \ +- cunit/db.testc \ + cunit/dlist.testc \ + cunit/duplicate.testc \ + cunit/getxstring.testc \ +diff --git a/cunit/db.testc b/cunit/aaa-db.testc +similarity index 100% +rename from cunit/db.testc +rename to cunit/aaa-db.testc +diff --git a/doc/internal/unit-tests.html b/doc/internal/unit-tests.html +index a2c490dfb..75a945853 100644 +--- a/doc/internal/unit-tests.html ++++ b/doc/internal/unit-tests.html +@@ -452,6 +452,7 @@ + of the <tt>cunit_TESTS</tt> variable.</p> + + <blockquote class="src">cunit_TESTS = \ ++ cunit/aaa-db.testc \ + cunit/annotate.testc \ + cunit/backend.testc \ + cunit/binhex.testc \ +@@ -460,7 +461,6 @@ + cunit/byteorder64.testc \ + cunit/charset.testc \ + cunit/<b>crc32</b>.testc \ +- cunit/db.testc \ + cunit/dlist.testc \ + cunit/duplicate.testc \ + </blockquote> diff --git a/patch-cyrus-testsuite-endianness4 b/patch-cyrus-testsuite-endianness4 new file mode 100644 index 0000000..2d2544e --- /dev/null +++ b/patch-cyrus-testsuite-endianness4 @@ -0,0 +1,218 @@ +From 443e54646bc529654bc4bb2d58ddde9751f43fe2 Mon Sep 17 00:00:00 2001 +From: ellie timoney ellie@fastmail.com +Date: Mon, 29 May 2017 15:35:38 +1000 +Subject: [PATCH] cunit/conversations: conversations_open_path failures are + fatal + +--- + cunit/conversations.testc | 48 +++++++++++++++++++++++------------------------ + 1 file changed, 24 insertions(+), 24 deletions(-) + +diff --git a/cunit/conversations.testc b/cunit/conversations.testc +index 026d271c9..85562cbed 100644 +--- a/cunit/conversations.testc ++++ b/cunit/conversations.testc +@@ -22,7 +22,7 @@ static void test_open(void) + struct conversations_state *state = NULL; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + r = conversations_abort(&state); + CU_ASSERT_EQUAL(r, 0); +@@ -38,7 +38,7 @@ static void test_getset(void) + arrayu64_t cids = ARRAYU64_INITIALIZER; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* Database is empty, so get should succeed and report no results */ + memset(&cid, 0x45, sizeof(cid)); +@@ -62,7 +62,7 @@ static void test_getset(void) + CU_ASSERT_EQUAL(r, 0); + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* get should still succeed after the db is closed & reopened */ + memset(&cid, 0x45, sizeof(cid)); +@@ -87,7 +87,7 @@ static void test_abort(void) + arrayu64_t cids = ARRAYU64_INITIALIZER; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* Database is empty, so get should succeed and report no results */ + memset(&cid, 0x45, sizeof(cid)); +@@ -113,7 +113,7 @@ static void test_abort(void) + + /* open the db again */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* the set vanished with the txn abort, so get should + * succeed and report no results */ +@@ -147,7 +147,7 @@ static void test_prune(void) + unsigned int nseen = 0, ndeleted = 0; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* Add keys, with delays in between */ + /* TODO: CUnit needs a time warping system */ +@@ -174,7 +174,7 @@ static void test_prune(void) + /* Should be able to get all 3 msgids */ + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + memset(&cid, 0x45, sizeof(cid)); + arrayu64_truncate(&cids, 0); +@@ -247,10 +247,10 @@ static void test_two(void) + arrayu64_t cids = ARRAYU64_INITIALIZER; + + r = conversations_open_path(DBNAME, &state1); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + r = conversations_open_path(DBNAME2, &state2); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* Databases are empty, so gets of either msgid from either db + * should succeed and report no results */ +@@ -385,8 +385,8 @@ static void test_folder_rename(void) + conv_folder_t *folder; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); +- CU_ASSERT_PTR_NOT_NULL(state); ++ CU_ASSERT_EQUAL_FATAL(r, 0); ++ CU_ASSERT_PTR_NOT_NULL_FATAL(state); + + /* setup the records we expect */ + r = conversations_add_msgid(state, C_MSGID1, C_CID); +@@ -420,7 +420,7 @@ static void test_folder_rename(void) + + /* open the db again */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* do a rename */ + r = conversations_rename_folder(state, FOLDER2, FOLDER3); +@@ -432,7 +432,7 @@ static void test_folder_rename(void) + + /* open the db again */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + conv = NULL; + r = conversation_load(state, C_CID, &conv); +@@ -475,7 +475,7 @@ static void test_folders(void) + imapopts[IMAPOPT_CONVERSATIONS_COUNTED_FLAGS].val.s = "\Draft $HasRandom"; + + r = conversations_open_path(DBNAME3, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + imapopts[IMAPOPT_CONVERSATIONS_COUNTED_FLAGS].val.s = NULL; + +@@ -672,7 +672,7 @@ static void test_folders(void) + + /* open the db again */ + r = conversations_open_path(DBNAME3, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* get should still succeed and report all values we gave it */ + conv = NULL; +@@ -805,7 +805,7 @@ static void test_folder_ordering(void) + int *counts = 0; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* Database is empty, so get should succeed and report no results */ + conv = NULL; +@@ -903,7 +903,7 @@ static void test_folder_ordering(void) + + /* open the db again */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* get should still succeed and report all values we gave it */ + conv = NULL; +@@ -956,7 +956,7 @@ static void __test_senders(void) + int *counts = 0; + + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* Database is empty, so get should succeed and report no results */ + conv = NULL; +@@ -1045,7 +1045,7 @@ static void __test_senders(void) + + /* open the db again */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + /* get should still succeed and report all values we gave it */ + conv = NULL; +@@ -1150,7 +1150,7 @@ static void test_dump(void) + + /* generate some data in the database */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + for (i = 0 ; i < N_MSGID_TO_CID ; i++) { + gen_msgid_cid(i, msgid, sizeof(msgid), &cid); +@@ -1179,7 +1179,7 @@ static void test_dump(void) + + /* open and dump the database */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + conversations_dump(state, fp); + +@@ -1198,7 +1198,7 @@ static void test_dump(void) + + /* open and truncate the database */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + r = conversations_truncate(state); + CU_ASSERT_EQUAL(r, 0); +@@ -1208,7 +1208,7 @@ static void test_dump(void) + + /* check we can no longer find any of the data */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + for (i = 0 ; i < N_MSGID_TO_CID ; i++) { + gen_msgid_cid(i, msgid, sizeof(msgid), &cid); +@@ -1234,7 +1234,7 @@ static void test_dump(void) + + /* finally check that we got all the data back */ + r = conversations_open_path(DBNAME, &state); +- CU_ASSERT_EQUAL(r, 0); ++ CU_ASSERT_EQUAL_FATAL(r, 0); + + for (i = 0 ; i < N_MSGID_TO_CID ; i++) { + gen_msgid_cid(i, msgid, sizeof(msgid), &cid);
commit 1c7b0e8083d63e4277f2c0a6788a478b48849d23 Author: Jason Tibbitts tibbs@math.uh.edu Date: Tue May 30 14:22:54 2017 -0500
Still more work on tests.
Basically Cyrus is completely fine on 64-bit little-endian machines. "make check" fails on big-endian machines. The Cassandane tests fail on 32-bit machines.
Some of the Cassandane tests are known to be due to bugs in the tests suite; Fedora's 32-bit Perl does not support 64-bit types ("Q" and "q") in pack and unpack. This is being fixed in rawhide on our side, but it won't be a complete solution because there are some failures elsewhere in the test suite.
Fedora is the first to fully integrate Cassandane into the build process, and we appear to be the only ones to do testing on big-endian and 32-bit machines. So there's a bit of teething still to get through.
I still do intend to try and push this to F26 as upstream has requested.
diff --git a/.gitignore b/.gitignore index dd6269d..b170ba4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /cassandane-testdata-20170523.tar.gz /cassandane-b97ba9c.tar.gz /cassandane-0a6c13e.tar.gz +/cassandane-2f8f3f4.tar.gz diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 1503055..a062dfe 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -1,7 +1,8 @@ %define scmt(l:) %(c=%1; echo ${c:0:%{-l:%{-l*}}%{!-l:7}})
-# Cassandane doesn't have releases often. This was fetched on 20170525. -%global cmt1 0a6c13e83813d4bb1ed4ee36ec7298c56db1b99b +# Cassandane doesn't have releases often, but it receives constant development. +# This was fetched on 20170530. +%global cmt1 2f8f3f4949e58bf20362c3cd8b1720f49002660d
# Cassandane run by default. '--without cassandane' disables. %bcond_without cassandane @@ -26,6 +27,7 @@ URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz
Patch0: patch-cyrus-testsuite-endianness +Patch1: patch-cyrus-testsuite-endianness2
Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config @@ -411,29 +413,58 @@ gcc -fPIC -shared -Wl,-soname,-libredirectsyslog.so.0 -ldl -o libredirectsyslog. export LD_LIBRARY_PATH=%buildroot/%_libdir export CYRUS_USER=$USER
-# These are all the tests I have managed to make work at this time. +# Most Cassandane tests pass, but using snapshots includes new tests which +# aren't supposed to pass on released versions of cyrus. So we have a big +# exclusion list. # Note that Cassandane::Test::Core must always be excluded; it can't possibly # work. The others are expected on 3.0.1 and should be removed and re-checked # at each release. + #!JMAPCalendars.creationids \
# Add -vvv for too much output ./testrunner.pl %{?_smp_mflags} -f pretty \ !Cassandane::Test::Core \ !Admin.imap_admins \ !Fetch.fetch_flags_before_exists \ +\ + !JMAPCalendars.creationids \ + !JMAPCalendars.getcalendareventlist \ + !JMAPCalendars.getcalendareventlist_date \ + !JMAPCalendars.getcalendareventlist_datetime \ + !JMAPCalendars.getcalendareventlist_text \ + !JMAPCalendars.getcalendarevents_privacy \ !JMAPCalendars.getcalendarevents_properties \ !JMAPCalendars.getcalendarevents_relatedto \ !JMAPCalendars.getcalendarevents_simple \ + !JMAPCalendars.getcalendareventupdates \ +\ !JMAPCalendars.setcalendarevents_alerts \ + !JMAPCalendars.setcalendarevents_caldav \ + !JMAPCalendars.setcalendarevents_endtimezone \ + !JMAPCalendars.setcalendarevents_endtimezone_recurrence \ + !JMAPCalendars.setcalendarevents_isallday \ + !JMAPCalendars.setcalendarevents_links \ + !JMAPCalendars.setcalendarevents_localizations \ !JMAPCalendars.setcalendarevents_locations \ + !JMAPCalendars.setcalendarevents_move \ + !JMAPCalendars.setcalendarevents_participantid \ !JMAPCalendars.setcalendarevents_participants \ + !JMAPCalendars.setcalendarevents_prodid \ !JMAPCalendars.setcalendarevents_recurrenceoverrides \ !JMAPCalendars.setcalendarevents_relatedto \ + !JMAPCalendars.setcalendarevents_recurrence \ + !JMAPCalendars.setcalendarevents_schedule_cancel \ + !JMAPCalendars.setcalendarevents_schedule_reply \ + !JMAPCalendars.setcalendarevents_schedule_request \ + !JMAPCalendars.setcalendarevents_simple \ +\ !JMAPMail.getmessagelist_attachments \ !JMAPMail.getmessagelist_window \ !JMAPMail.getmessages_body_nontext \ !JMAPMail.getmessages_attachment_name \ !JMAPMail.setmailboxes_destroy_empty \ + !JMAPMail.setmessages_attachments \ +\ !Quota.num_folders_rename \ !SearchFuzzy.cjk_words \ !SearchFuzzy.xattachmentname \ diff --git a/patch-cyrus-testsuite-endianness2 b/patch-cyrus-testsuite-endianness2 new file mode 100644 index 0000000..01dc84b --- /dev/null +++ b/patch-cyrus-testsuite-endianness2 @@ -0,0 +1,20 @@ +diff --git a/imap/conversations.c b/imap/conversations.c +index 504c5db..2b151dc 100644 +--- a/imap/conversations.c ++++ b/imap/conversations.c +@@ -560,11 +560,14 @@ EXPORTED int conversations_get_msgid(struct conversations_state *state, + &data, &datalen, + &state->txn); + ++ if (r == CYRUSDB_NOTFOUND) ++ return 0; /* not an error, but nothing more to do */ ++ + if (!r) r = _conversations_parse(data, datalen, cids, NULL); + + if (r) arrayu64_truncate(cids, 0); + +- return 0; ++ return r; + } + + /* diff --git a/sources b/sources index 9b8d44e..ab5590a 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (cassandane-0a6c13e.tar.gz) = fa37cd3fd7f32bbfb4af8ec48da0a48b8bce7f4d0135cb5361559464285ea18ff815ec812ba3be037c054a80513c3150af6943d90b60e6aff2d75060ade4d321 SHA512 (cassandane-testdata-20170523.tar.gz) = 705f5af6a31fe3b8d6e8027bbddbedb2f64d65997f8a06620ec07fcd30a95d98ac3f3fbef7af5080684ee21be1c5b8bcad2374b2749f0571099e780355a04420 SHA512 (cyrus-imapd-3.0.1.tar.gz) = 0a2bf13b4793e642f3df53231fd66774e0c5ad753b436a7fb0645db6ee70121d0da245038527cc58cb078255fec3e7b32a6230c196cceea040f74813ef78e337 +SHA512 (cassandane-2f8f3f4.tar.gz) = b949155b85e30a9cabd5992806fafe78a462662297398e8a74856f345c063769e5e419d01777e08c1f326622244181667ead47a057e38b1974ec121e7913a955
commit c43a3db86deb5441cf34c9d0721b5bf4a055fb63 Author: Jason Tibbitts tibbs@math.uh.edu Date: Fri May 26 12:39:43 2017 -0500
Add patch to fix some test issues on big-endian machines.
diff --git a/.gitignore b/.gitignore index c365257..dd6269d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /cyrus-imapd-*/ /cassandane-testdata-20170523.tar.gz /cassandane-b97ba9c.tar.gz +/cassandane-0a6c13e.tar.gz diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 5f1ceda..1503055 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -25,6 +25,8 @@ License: BSD URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz
+Patch0: patch-cyrus-testsuite-endianness + Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config Source12: cyrus-imapd.sysconfig diff --git a/patch-cyrus-testsuite-endianness b/patch-cyrus-testsuite-endianness new file mode 100644 index 0000000..2f54012 --- /dev/null +++ b/patch-cyrus-testsuite-endianness @@ -0,0 +1,22 @@ +diff --git a/cunit/timeout.c b/cunit/timeout.c +index f02c9ac..a444ac8 100644 +--- a/cunit/timeout.c ++++ b/cunit/timeout.c +@@ -197,7 +197,7 @@ int timeout_init(void (*cb)(void)) + + int timeout_begin(int millisec) + { +- int c; ++ char c; + int r; + + // fprintf(stderr, "timeout_begin\n"); +@@ -220,7 +220,7 @@ int timeout_begin(int millisec) + + int timeout_end(void) + { +- int c; ++ char c; + int r; + + // fprintf(stderr, "timeout_end\n");
commit 5d37ee86be3e287e148c65e023133f07146a8c12 Author: Jason Tibbitts tibbs@math.uh.edu Date: Fri May 26 12:38:57 2017 -0500
Use the proper location of master in the service file.
diff --git a/cyrus-imapd.service b/cyrus-imapd.service index 2d28731..d8f5bde 100644 --- a/cyrus-imapd.service +++ b/cyrus-imapd.service @@ -8,7 +8,7 @@ After=cyrus-imapd-init.service [Service] Type=simple EnvironmentFile=/etc/sysconfig/cyrus-imapd -ExecStart=/usr/lib/cyrus-imapd/cyrus-master $CYRUSOPTIONS +ExecStart=/usr/libexec/cyrus-imapd/master $CYRUSOPTIONS PrivateTmp=true
# Cyrus may spawn many processes in normal operation. These figures are higher
commit c92dbf22d8c65fc7c3000258361d390b24b38e25 Author: Jason Tibbitts tibbs@math.uh.edu Date: Fri May 26 11:57:48 2017 -0500
Upload new cassandane version.
diff --git a/sources b/sources index 860f5e6..9b8d44e 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ +SHA512 (cassandane-0a6c13e.tar.gz) = fa37cd3fd7f32bbfb4af8ec48da0a48b8bce7f4d0135cb5361559464285ea18ff815ec812ba3be037c054a80513c3150af6943d90b60e6aff2d75060ade4d321 SHA512 (cassandane-testdata-20170523.tar.gz) = 705f5af6a31fe3b8d6e8027bbddbedb2f64d65997f8a06620ec07fcd30a95d98ac3f3fbef7af5080684ee21be1c5b8bcad2374b2749f0571099e780355a04420 SHA512 (cyrus-imapd-3.0.1.tar.gz) = 0a2bf13b4793e642f3df53231fd66774e0c5ad753b436a7fb0645db6ee70121d0da245038527cc58cb078255fec3e7b32a6230c196cceea040f74813ef78e337 -SHA512 (cassandane-b97ba9c.tar.gz) = e7f263bb216e3f4bff075036f419743cbf39b9c7c34d1d184ebb24da80a7a5e92494b187af7bad8bcc42ea95adc75fe8c3a79ab66194166319ddaa615299f1a9
commit 7c484621fe9727b007c942ac7948aca50fedf4c7 Author: Jason Tibbitts tibbs@math.uh.edu Date: Fri May 26 11:54:05 2017 -0500
Clean up some comments.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 136bbee..5f1ceda 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -437,19 +437,6 @@ export CYRUS_USER=$USER !SearchFuzzy.xattachmentname \ 2>&1
- -# ClamAV - we don't build with clamav yet. -# TesterCalDAV - Would need to either package or bundle this. -# TesterCardDAV - ^^ -# TesterJMAP - Would need "jmaptester" from https://github.com/pobox/JMAP-TestSuite -# It doesn't need to be installed so should be trivial. - - -# No runnable tests: -# Cassandane::AnnotatorDaemon-# Annotator: patch utils/annotator.pl to pass the -# current UID to Cassandane::AnnotatorDaemon->run. -# (getpwuid($<))[0] -# Also override group %endif
commit 9a65b5c93e8755c24458295ecd6d3fc23fc4bd91 Author: Jason Tibbitts tibbs@math.uh.edu Date: Fri May 26 11:50:15 2017 -0500
Fully functional cassandane with fewer patches.
Working with upstream I got some fixes pushed and found out about a couple of other tricks.
Was able to drop some patches and now cassandane runs 603 tests successfully. The only tests excluded now are those which are expected to fail with 3.0.1, and five coredump tests which would require removal of systemd coredump redirection in order to be useful.
diff --git a/cassandane.ini b/cassandane.ini index 50428dc..929c65f 100644 --- a/cassandane.ini +++ b/cassandane.ini @@ -32,16 +32,22 @@ destdir = BUILDROOT # timsieved = yes # backupd = yes
-#[config] +[config] +altnamespace = no +unixhierarchysep = no
#[caldavtalk] #basedir = CASSDIR/cassandane/testdata
-#[imaptest] -# XXX Cassandane wants this to not be installed. Don't know why. If -# necessary, make a link farm to it. -#basedir = /usr +[imaptest] +# Cassandane wants this to not be installed. Don't know why. To use it we +# have to make a directory and link things into it. +basedir = imaptest
-#[caldavtester] +# [jmaptester] +# basedir = JMAP-Tester +# The JMAP modules end up needing JSON-Typist (which I could bundle) and CryptX (which is a bit too much to bundle) + +# [caldavtester] # XXX Would need to include the source in the cyrus package just as cassandane is, and get it built before running tests # basedir = ... diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 7f79a39..136bbee 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -1,7 +1,8 @@ -# Cassandane doesn't have releases often. This was fetched on 20170523. -%global cmt1 b97ba9cbe78e48d10ee0cbdb1f43a73b907e3460 %define scmt(l:) %(c=%1; echo ${c:0:%{-l:%{-l*}}%{!-l:7}})
+# Cassandane doesn't have releases often. This was fetched on 20170525. +%global cmt1 0a6c13e83813d4bb1ed4ee36ec7298c56db1b99b + # Cassandane run by default. '--without cassandane' disables. %bcond_without cassandane
@@ -24,9 +25,6 @@ License: BSD URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz
-# Allow master to run even if there's no cyrus user in /etc/passwd -Patch1: patch-neuter-become-cyrus - Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config Source12: cyrus-imapd.sysconfig @@ -58,8 +56,8 @@ Source83: cassandane-redirect-syslog.c
# These are source files and not patches because you can't use autosetup to # apply patches to secondary unpacked source files. -Source90: patch-cassandane-no-sudo Source91: patch-cassandane-no-syslog +Source92: patch-cassandane-fix-annotator
# Dependency notes: # * clamav-devel and mariadb-devel removed because they both depend on @@ -83,18 +81,21 @@ BuildRequires: xapian-core-devel
# Miscellaneous modules needed for 'make check' to function: BuildRequires: cyrus-sasl-plain cyrus-sasl-md5 -BuildRequires: net-tools words -#BuildRequires: imaptest
%if %{with cassandane} -# Perl modules required for cassandane to function +# Additional packages required for cassandane to function +BuildRequires: imaptest net-tools words BuildRequires: perl(AnyEvent) perl(BSD::Resource) perl(Clone) BuildRequires: perl(File::chdir) perl(IO::Socket::INET6) perl(Mail::IMAPTalk) BuildRequires: perl(Config::IniFiles) perl(Mail::JMAPTalk) perl(Math::Int64) BuildRequires: perl(Net::CalDAVTalk) perl(Net::CardDAVTalk) -BuildRequires: perl(Net::Server) perl(News::NNTPClient) perl(String::CRC32) -BuildRequires: perl(Sys::Syslog) perl(Test::Unit::TestRunner) perl(Time::HiRes) +BuildRequires: perl(Net::Server) perl(News::NNTPClient) perl(Path::Tiny) +BuildRequires: perl(String::CRC32) perl(Sys::Syslog) +BuildRequires: perl(Test::Unit::TestRunner) perl(Time::HiRes) BuildRequires: perl(Unix::Syslog) perl(XML::DOM) perl(XML::Generator) + +# These were only for JMAP-Tester +# perl(Moo), perl(Moose), perl(MooseX::Role::Parameterized) perl(Throwable), perl(Safe::Isa) %endif
Requires(pre): shadow-utils @@ -134,11 +135,11 @@ hierarchies.
%package devel Summary: Cyrus IMAP server development files -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %name%{?_isa} = %version-%release Requires: pkgconfig
%description devel -The %{name}-devel package contains header files and libraries +The %name-devel package contains header files and libraries necessary for developing applications which use the imclient library.
@@ -196,8 +197,8 @@ pushd cassandane mkdir work tar xf %SOURCE81
-patch -p1 < %SOURCE90 patch -p1 < %SOURCE91 +patch -p1 < %SOURCE92 cp %SOURCE82 cassandane.ini # RF rpm-buildroot-usage sed -i \ @@ -229,7 +230,9 @@ popd # --with-cyrus-prefix and --with-service-path went away; use --with-libexecdir= # instead.
-#autoreconf -vi +# Running autoreconf will confuse the program about what version it is. +# autoreconf -vi + %configure \ --disable-silent-rules \ \ @@ -271,9 +274,6 @@ make notifyd/notifytest # Also not built by default, but the tools are needed for serving timezone info make -C tools/vzic
-#make -C man -f Makefile.dist -#make -C doc -f Makefile.dist -
%install make install DESTDIR=%buildroot @@ -306,9 +306,7 @@ for i in vzic vzic-test.pl vzic-merge.pl vzic-dump.pl; do done
# Install additional files - install -p -m 644 %SOURCE10 %buildroot/etc/logrotate.d/%name - install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/pop install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/imap install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/sieve @@ -316,16 +314,14 @@ install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/mupdate install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/lmtp install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/nntp install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/csync - install -p -m 644 %SOURCE12 %buildroot/etc/sysconfig/%name - -install -m 755 %SOURCE13 %buildroot/%cyrexecdir/cvt_cyrusdb_all -install -m 644 %SOURCE14 %buildroot/%_datadir/%name/rpm/magic - +install -p -m 755 %SOURCE13 %buildroot/%cyrexecdir/cvt_cyrusdb_all +install -p -m 644 %SOURCE14 %buildroot/%_datadir/%name/rpm/magic install -p -m 755 %SOURCE15 %buildroot/etc/cron.daily/%name - install -p -m 644 doc/examples/cyrus_conf/prefork.conf %buildroot/etc/cyrus.conf install -p -m 644 doc/examples/imapd_conf/normal.conf %buildroot/etc/imapd.conf +install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service +install -p -D -m 644 %SOURCE18 %buildroot/%_unitdir/cyrus-imapd-init.service
cat >> %buildroot/etc/imapd.conf <<END
@@ -336,9 +332,6 @@ tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd-key.pem tls_ca_file: /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem END
-install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service -install -p -D -m 644 %SOURCE18 %buildroot/%_unitdir/cyrus-imapd-init.service - # Cleanup of doc dir find doc perl -name CVS -type d -prune -exec rm -rf {} ; find doc perl -name .cvsignore -type f -exec rm -f {} ; @@ -359,14 +352,9 @@ find %buildroot/%_libdir/perl5/ -type f -name "*.so" -exec chmod 755 {} ; # create the ghost pem file touch %buildroot/%ssl_pem_file
-## Cyrus has various files with extremely conflicting names. Some of these are +# Cyrus has various files with extremely conflicting names. Some of these are # not unexpected ("imapd" itself) but some like "httpd" are rather surprising.
-# Where these files live in /usr/libexec and are not conflicting, they have -# been left alone even though this may cause a bit of confusion. Upstream -# intends to rename all potential conflict, and possibley just rename -# everything, to have a "cyr_" prefix. But this didn't happen for version 3. - # Where there are only conflicting manpages, they have been moved to a "8cyrus" # section. If the binary was renamed, then the manpages are renamed to match # but a internal replacement has not been done. This may lead to more @@ -390,7 +378,7 @@ mv %buildroot/%_mandir/man8/httpd.8 %buildroot/%_mandir/man8/cyr_httpd.8 #remove executable bit from docs for ddir in doc perl/imap/examples do - find $ddir -type f -exec chmod -x {} ; + find $ddir -type f -ls -exec chmod -x {} ; done
# Remove pointless libtool archives @@ -406,50 +394,56 @@ find %buildroot -name ".packlist" -exec rm {} ; make %{?_smp_mflags} check || exit 1
%if %{with cassandane} +# Run the Cassandane test suite. This will exhaustively test the various +# server components, but running it in a mock chroot is rather an exercise. pushd cassandane
+mkdir -p imaptest/src +ln -s /usr/bin/imaptest imaptest/src +ln -s /usr/share/imaptest/tests imaptest/src + + # Build the syslog interposer gcc -fPIC -shared -Wl,-soname,-libredirectsyslog.so.0 -ldl -o libredirectsyslog.so.0.0 redirect-syslog.c
-# More work is required to get this going properly - export LD_LIBRARY_PATH=%buildroot/%_libdir -#./testrunner.pl %{?_smp_mflags} -f tap \ -# -vvv \ -# !Cassandane::Test::Core \ -# ACL \ -# 2>&1 -# #!ACL \ -# #!Admin \ -#LD_LIBRARY_PATH=%buildroot/%_libdir ./testrunner.pl -j 16 --config cassandane.ini -f tap 2>&1 -#exit 1 - -# Can't possibly work: -# Cassandane::Test::Core - -# Known OK tests: -# Archive -# Backups -# Bug3072 (slow) -# Bug3470 -# Bug3649 -# CaldavAlarm -# Carddav -# Conversations -# CyrusDB - - -# Known bad tests: -# ACL (9 failures of 11) -# Admin (1 failure of 1) -# Annotator (all tests error; very slow, problems running the annotator utility; problems with missing cyrus user) -# Autocreate (1 failure of 1) -# Bug3463 -# Bug3903 -# Caldav (just 3 failures out of 46 tests) -# Delete (all tests fail) - -# ClamAV is probably not supported. +export CYRUS_USER=$USER + +# These are all the tests I have managed to make work at this time. +# Note that Cassandane::Test::Core must always be excluded; it can't possibly +# work. The others are expected on 3.0.1 and should be removed and re-checked +# at each release. + +# Add -vvv for too much output +./testrunner.pl %{?_smp_mflags} -f pretty \ + !Cassandane::Test::Core \ + !Admin.imap_admins \ + !Fetch.fetch_flags_before_exists \ + !JMAPCalendars.getcalendarevents_properties \ + !JMAPCalendars.getcalendarevents_relatedto \ + !JMAPCalendars.getcalendarevents_simple \ + !JMAPCalendars.setcalendarevents_alerts \ + !JMAPCalendars.setcalendarevents_locations \ + !JMAPCalendars.setcalendarevents_participants \ + !JMAPCalendars.setcalendarevents_recurrenceoverrides \ + !JMAPCalendars.setcalendarevents_relatedto \ + !JMAPMail.getmessagelist_attachments \ + !JMAPMail.getmessagelist_window \ + !JMAPMail.getmessages_body_nontext \ + !JMAPMail.getmessages_attachment_name \ + !JMAPMail.setmailboxes_destroy_empty \ + !Quota.num_folders_rename \ + !SearchFuzzy.cjk_words \ + !SearchFuzzy.xattachmentname \ + 2>&1 + + +# ClamAV - we don't build with clamav yet. +# TesterCalDAV - Would need to either package or bundle this. +# TesterCardDAV - ^^ +# TesterJMAP - Would need "jmaptester" from https://github.com/pobox/JMAP-TestSuite +# It doesn't need to be installed so should be trivial. +
# No runnable tests: # Cassandane::AnnotatorDaemon-# Annotator: patch utils/annotator.pl to pass the diff --git a/patch-cassandane-fix-annotator b/patch-cassandane-fix-annotator new file mode 100644 index 0000000..1899ae0 --- /dev/null +++ b/patch-cassandane-fix-annotator @@ -0,0 +1,14 @@ +diff --git a/utils/annotator.pl b/utils/annotator.pl +index 94b84a2..0208831 100755 +--- a/utils/annotator.pl ++++ b/utils/annotator.pl +@@ -140,6 +140,8 @@ GetOptions( + xlog "annotator $$ starting"; + Cassandane::AnnotatorDaemon->run( + pid_file => $pidfile, +- port => $port ++ port => $port, ++ user => (getpwuid($<))[0], ++ group => (getgrgid($())[0], + ); + xlog "annotator $$ exiting"; diff --git a/patch-cassandane-no-sudo b/patch-cassandane-no-sudo deleted file mode 100644 index fc27b13..0000000 --- a/patch-cassandane-no-sudo +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Cassandane/Util/Setup.pm b/Cassandane/Util/Setup.pm -index 3a67f0b..5a81e51 100644 ---- a/Cassandane/Util/Setup.pm -+++ b/Cassandane/Util/Setup.pm -@@ -57,6 +57,7 @@ my @saved_argv = @ARGV; - - sub become_cyrus - { -+ return 0; - my $cyrus = 'cyrus'; - my $pw = getpwnam($cyrus); - die "No user named '$cyrus'" diff --git a/patch-neuter-become-cyrus b/patch-neuter-become-cyrus deleted file mode 100644 index ecfe06e..0000000 --- a/patch-neuter-become-cyrus +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/lib/util.c b/lib/util.c -index 62ad7bd..37f0463 100644 ---- a/lib/util.c -+++ b/lib/util.c -@@ -605,7 +605,7 @@ EXPORTED int become_cyrus(int is_master) - p = getpwnam(cyrus); - if (p == NULL) { - syslog(LOG_ERR, "no entry in /etc/passwd for user %s", cyrus); -- return -1; -+ return 0; - } - - /* Save these in case initgroups does a getpw*() */ -@@ -625,13 +625,13 @@ EXPORTED int become_cyrus(int is_master) - if (initgroups(cyrus, newgid)) { - syslog(LOG_ERR, "unable to initialize groups for user %s: %s", - cyrus, strerror(errno)); -- return -1; -+ return 0; - } - - if (setgid(newgid)) { - syslog(LOG_ERR, "unable to set group id to %d for user %s: %s", - newgid, cyrus, strerror(errno)); -- return -1; -+ return 0; - } - - result = cap_setuid(newuid, is_master);
commit e63a593c459d08a49ba445682e413563ff13623f Author: Jason Tibbitts tibbs@math.uh.edu Date: Thu May 25 12:11:50 2017 -0500
Upload new sources.
diff --git a/.gitignore b/.gitignore index bde6cf7..c365257 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /results_cyrus-imapd/ /cyrus-imapd-*.tar.gz /cyrus-imapd-*/ -cyrus_sharedbackup-0.1.tar.gz +/cassandane-testdata-20170523.tar.gz +/cassandane-b97ba9c.tar.gz diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 15ed19a..7f79a39 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -41,7 +41,6 @@ Source18: cyrus-imapd-init.service # Source files for running the Cassandane test suite at build time. Source80: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz
- # The CPAN version, and hence the Fedora-packaged version, of Net::CalDAVTalk # doesn't include the testdata directory. Cassandane can use it for testing # calendaring, so it's included here. diff --git a/sources b/sources index ec560fc..860f5e6 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -b738adfd7b8aa2c4b95b1d10350450ca cyrus-imapd-2.5.10.tar.gz +SHA512 (cassandane-testdata-20170523.tar.gz) = 705f5af6a31fe3b8d6e8027bbddbedb2f64d65997f8a06620ec07fcd30a95d98ac3f3fbef7af5080684ee21be1c5b8bcad2374b2749f0571099e780355a04420 +SHA512 (cyrus-imapd-3.0.1.tar.gz) = 0a2bf13b4793e642f3df53231fd66774e0c5ad753b436a7fb0645db6ee70121d0da245038527cc58cb078255fec3e7b32a6230c196cceea040f74813ef78e337 +SHA512 (cassandane-b97ba9c.tar.gz) = e7f263bb216e3f4bff075036f419743cbf39b9c7c34d1d184ebb24da80a7a5e92494b187af7bad8bcc42ea95adc75fe8c3a79ab66194166319ddaa615299f1a9
commit 8965061af741491b5d4dfae37b6e7970f13b7aa5 Author: Jason Tibbitts tibbs@math.uh.edu Date: Thu May 25 11:27:34 2017 -0500
Add rpmlint filter for "rpm-buildroot-usage".
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index fbc9eff..15ed19a 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -200,6 +200,7 @@ tar xf %SOURCE81 patch -p1 < %SOURCE90 patch -p1 < %SOURCE91 cp %SOURCE82 cassandane.ini +# RF rpm-buildroot-usage sed -i \ -e "s!CASSDIR!$(pwd)!" \ -e "s!BUILDROOT!%buildroot!" \
commit 5ebd7deb39e05c884eb257a1bc8991d7e7183c10 Author: Jason Tibbitts tibbs@math.uh.edu Date: Thu May 25 11:19:25 2017 -0500
Conditionalize the cassandane stuff.
To facilitate building for EL7 and maybe F25 and older, conditionalize the build dependencies and calls to Cassandane.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index c033fb9..fbc9eff 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -2,6 +2,9 @@ %global cmt1 b97ba9cbe78e48d10ee0cbdb1f43a73b907e3460 %define scmt(l:) %(c=%1; echo ${c:0:%{-l:%{-l*}}%{!-l:7}})
+# Cassandane run by default. '--without cassandane' disables. +%bcond_without cassandane + Name: cyrus-imapd Version: 3.0.1 Release: 1%{?dist} @@ -84,6 +87,7 @@ BuildRequires: cyrus-sasl-plain cyrus-sasl-md5 BuildRequires: net-tools words #BuildRequires: imaptest
+%if %{with cassandane} # Perl modules required for cassandane to function BuildRequires: perl(AnyEvent) perl(BSD::Resource) perl(Clone) BuildRequires: perl(File::chdir) perl(IO::Socket::INET6) perl(Mail::IMAPTalk) @@ -92,6 +96,7 @@ BuildRequires: perl(Net::CalDAVTalk) perl(Net::CardDAVTalk) BuildRequires: perl(Net::Server) perl(News::NNTPClient) perl(String::CRC32) BuildRequires: perl(Sys::Syslog) perl(Test::Unit::TestRunner) perl(Time::HiRes) BuildRequires: perl(Unix::Syslog) perl(XML::DOM) perl(XML::Generator) +%endif
Requires(pre): shadow-utils Requires(post): /sbin/ldconfig @@ -207,9 +212,11 @@ popd # This is the test suite, which doesn't build much but does verify its dependencies. # If this is done after the configure call, the one thing it does build fails # because the configure macro puts some hardening flags into the environment. +%if %{with cassandane} pushd cassandane make popd +%endif
# Options not enabled: # --enable-objectstore @@ -398,6 +405,7 @@ find %buildroot -name ".packlist" -exec rm {} ; %check make %{?_smp_mflags} check || exit 1
+%if %{with cassandane} pushd cassandane
# Build the syslog interposer @@ -448,6 +456,7 @@ export LD_LIBRARY_PATH=%buildroot/%_libdir # current UID to Cassandane::AnnotatorDaemon->run. # (getpwuid($<))[0] # Also override group +%endif
%pre
commit f33aeb98442fd29afeb57575b702234dd65aab29 Author: Jason Tibbitts tibbs@math.uh.edu Date: Thu May 25 11:01:50 2017 -0500
Remove cyr_systemd_helper completely.
It turns that, at least in cyrus 3, the cyr_systemd_helper script will end up wiping out your databases every time the daemon starts. It was something that was needed to handle the horror that was Berkeley DB/Sleepycat DB/whatever it's called today, but Cyrus no longer supports BDB and so there's no point.
diff --git a/cyr_systemd_helper b/cyr_systemd_helper deleted file mode 100755 index 2d9ad56..0000000 --- a/cyr_systemd_helper +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# get_config [config default] -# extracts config option from config file -get_config() { - if conf=$(grep "^$1" /etc/imapd.conf); then - echo $conf | cut -d: -f2 - else - echo $2 - fi -} - -CONFIGDIRECTORY=$(get_config configdirectory /var/lib/imap) -RETVAL=0 - -start() { - cd $CONFIGDIRECTORY - runuser - cyrus -s /bin/sh -c "umask 166 ; /usr/lib/cyrus-imapd/cvt_cyrusdb_all > ${CONFIGDIRECTORY}/rpm/db_import.log 2>&1" < /dev/null - RETVAL=$? -} - -stop() { - cd $CONFIGDIRECTORY - runuser - cyrus -s /bin/sh -c "umask 166 ; /usr/lib/cyrus-imapd/cvt_cyrusdb_all export > ${CONFIGDIRECTORY}/rpm/db_export.log 2>&1" < /dev/null - RETVAL=$? -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - *) - ;; -esac - -exit $RETVAL diff --git a/cyrus-imapd.service b/cyrus-imapd.service index 9fe5df7..2d28731 100644 --- a/cyrus-imapd.service +++ b/cyrus-imapd.service @@ -8,9 +8,7 @@ After=cyrus-imapd-init.service [Service] Type=simple EnvironmentFile=/etc/sysconfig/cyrus-imapd -ExecStartPre=/usr/lib/cyrus-imapd/cyr_systemd_helper start ExecStart=/usr/lib/cyrus-imapd/cyrus-master $CYRUSOPTIONS -ExecStopPost=/usr/lib/cyrus-imapd/cyr_systemd_helper stop PrivateTmp=true
# Cyrus may spawn many processes in normal operation. These figures are higher diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 7f23673..c033fb9 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -34,7 +34,6 @@ Source15: cyrus-imapd.cron-daily Source16: README.rpm Source17: cyrus-imapd.service Source18: cyrus-imapd-init.service -Source19: cyr_systemd_helper
# Source files for running the Cassandane test suite at build time. Source80: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz @@ -332,7 +331,6 @@ END
install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service install -p -D -m 644 %SOURCE18 %buildroot/%_unitdir/cyrus-imapd-init.service -install -p -D -m 755 %SOURCE19 %buildroot/%cyrexecdir/cyr_systemd_helper
# Cleanup of doc dir find doc perl -name CVS -type d -prune -exec rm -rf {} ;
commit b9bfd810a74c2a71cd4ae67dfc51c10b6da38fe9 Author: Jason Tibbitts tibbs@math.uh.edu Date: Thu May 25 10:33:34 2017 -0500
Add source files/patches.
diff --git a/cassandane-redirect-syslog.c b/cassandane-redirect-syslog.c new file mode 100644 index 0000000..37ad53e --- /dev/null +++ b/cassandane-redirect-syslog.c @@ -0,0 +1,17 @@ +/* This is used to build an LD_PRELOAD library to redirect syslog calls. */ + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +void openlog(const char *ident, int option, int facility) { return; } +void closelog(void) { return; } + +void syslog(int priority, const char *format, ...) { + va_list va; + va_start(va, format); + vfprintf(stderr, format, va); + va_end(va); +} + + diff --git a/patch-cassandane-no-syslog b/patch-cassandane-no-syslog new file mode 100644 index 0000000..67d30b3 --- /dev/null +++ b/patch-cassandane-no-syslog @@ -0,0 +1,21 @@ +diff --git a/Cassandane/Util/Log.pm b/Cassandane/Util/Log.pm +index 9cd93d5..8d3b3c1 100644 +--- a/Cassandane/Util/Log.pm ++++ b/Cassandane/Util/Log.pm +@@ -52,16 +52,12 @@ our @EXPORT = qw( + + my $verbose = 0; + +-openlog('cassandane', '', LOG_LOCAL6) +- or die "Cannot openlog"; +- + sub xlog + { + my ($pkg, $file, $line) = caller; + $pkg =~ s/^Cassandane:://; + my $msg = "=====> " . $pkg . "[" . $line . "] " . join(' ', @_); + print STDERR "$msg\n"; +- syslog(LOG_ERR, "$msg"); + } + + sub set_verbose diff --git a/patch-neuter-become-cyrus b/patch-neuter-become-cyrus new file mode 100644 index 0000000..ecfe06e --- /dev/null +++ b/patch-neuter-become-cyrus @@ -0,0 +1,29 @@ +diff --git a/lib/util.c b/lib/util.c +index 62ad7bd..37f0463 100644 +--- a/lib/util.c ++++ b/lib/util.c +@@ -605,7 +605,7 @@ EXPORTED int become_cyrus(int is_master) + p = getpwnam(cyrus); + if (p == NULL) { + syslog(LOG_ERR, "no entry in /etc/passwd for user %s", cyrus); +- return -1; ++ return 0; + } + + /* Save these in case initgroups does a getpw*() */ +@@ -625,13 +625,13 @@ EXPORTED int become_cyrus(int is_master) + if (initgroups(cyrus, newgid)) { + syslog(LOG_ERR, "unable to initialize groups for user %s: %s", + cyrus, strerror(errno)); +- return -1; ++ return 0; + } + + if (setgid(newgid)) { + syslog(LOG_ERR, "unable to set group id to %d for user %s: %s", + newgid, cyrus, strerror(errno)); +- return -1; ++ return 0; + } + + result = cap_setuid(newuid, is_master);
commit c70cf04055fb6a5a18f7176e8db0574bbd8ef045 Author: Jason Tibbitts tibbs@math.uh.edu Date: Thu May 25 10:32:04 2017 -0500
More work on test suite.
diff --git a/cassandane.ini b/cassandane.ini index 5705bf9..50428dc 100644 --- a/cassandane.ini +++ b/cassandane.ini @@ -6,8 +6,8 @@ # so this requires some finesse.
[cassandane] -rootdir = BUILDDIR/cassandane/work -pwcheck = alwaystrue +rootdir = CASSDIR/work +pwcheck = alwaystrue # This is enabled in Fedora builds cleanup = no maxworkers = 1
@@ -35,7 +35,7 @@ destdir = BUILDROOT #[config]
#[caldavtalk] -#basedir = BUILDDIR/cassandane/testdata +#basedir = CASSDIR/cassandane/testdata
#[imaptest] # XXX Cassandane wants this to not be installed. Don't know why. If diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 46a9873..7f23673 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -1,5 +1,5 @@ -# Cassandane doesn't have releases often. This was fetched on 20170412. -%global cmt1 9fed6232e4bf202987b5b8a57bac018797fbb6c6 +# Cassandane doesn't have releases often. This was fetched on 20170523. +%global cmt1 b97ba9cbe78e48d10ee0cbdb1f43a73b907e3460 %define scmt(l:) %(c=%1; echo ${c:0:%{-l:%{-l*}}%{!-l:7}})
Name: cyrus-imapd @@ -21,6 +21,9 @@ License: BSD URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz
+# Allow master to run even if there's no cyrus user in /etc/passwd +Patch1: patch-neuter-become-cyrus + Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config Source12: cyrus-imapd.sysconfig @@ -34,7 +37,8 @@ Source18: cyrus-imapd-init.service Source19: cyr_systemd_helper
# Source files for running the Cassandane test suite at build time. -Source90: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz +Source80: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz +
# The CPAN version, and hence the Fedora-packaged version, of Net::CalDAVTalk # doesn't include the testdata directory. Cassandane can use it for testing @@ -42,14 +46,19 @@ Source90: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassanda # This archive was generated by running: # svn export https://github.com/brong/Net-CalDAVTalk/trunk/testdata # tar cfz cassandane-testdata-20170523.tar.gz testdata -Source91: cassandane-testdata-20170523.tar.gz - -# This is a source file and not a patch because you can't use autosetup to -# apply patches to secondary unpacked source files. -Source92: patch-cassandane-no-sudo +Source81: cassandane-testdata-20170523.tar.gz
# A template config file for cassandane; we will substitute in varions values. -Source93: cassandane.ini +Source82: cassandane.ini + +# Basically everything in the test suite wants to use syslog. That's not so +# easy in mock, so here's an LD_PRELOAD to redirect syslog calls to stderr. +Source83: cassandane-redirect-syslog.c + +# These are source files and not patches because you can't use autosetup to +# apply patches to secondary unpacked source files. +Source90: patch-cassandane-no-sudo +Source91: patch-cassandane-no-syslog
# Dependency notes: # * clamav-devel and mariadb-devel removed because they both depend on @@ -59,11 +68,11 @@ Source93: cassandane.ini # configure: Your version of libical can not support patching iCalendar # objects. Consider upgrading to libical >= 2.1
-BuildRequires: autoconf automake bison flex groff libtool +BuildRequires: autoconf automake bison flex gcc gcc-c++ git groff libtool BuildRequires: pkgconfig systemd tcp_wrappers transfig
-BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) perl(Pod::Html) - +BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) +BuildRequires: perl(Pod::Html)
BuildRequires: clamav-devel CUnit-devel cyrus-sasl-devel glib2-devel BuildRequires: jansson-devel krb5-devel libical-devel libnghttp2-devel @@ -71,9 +80,9 @@ BuildRequires: libxml2-devel net-snmp-devel openldap-devel BuildRequires: openssl-devel postgresql-devel shapelib-devel sqlite-devel BuildRequires: xapian-core-devel
-# SASL modules needed for 'make check' to function: +# Miscellaneous modules needed for 'make check' to function: BuildRequires: cyrus-sasl-plain cyrus-sasl-md5 - +BuildRequires: net-tools words #BuildRequires: imaptest
# Perl modules required for cassandane to function @@ -81,9 +90,9 @@ BuildRequires: perl(AnyEvent) perl(BSD::Resource) perl(Clone) BuildRequires: perl(File::chdir) perl(IO::Socket::INET6) perl(Mail::IMAPTalk) BuildRequires: perl(Config::IniFiles) perl(Mail::JMAPTalk) perl(Math::Int64) BuildRequires: perl(Net::CalDAVTalk) perl(Net::CardDAVTalk) -BuildRequires: perl(News::NNTPClient) perl(String::CRC32) perl(Sys::Syslog) -BuildRequires: perl(Test::Unit::TestRunner) perl(Time::HiRes) perl(XML::DOM) -BuildRequires: perl(XML::Generator) +BuildRequires: perl(Net::Server) perl(News::NNTPClient) perl(String::CRC32) +BuildRequires: perl(Sys::Syslog) perl(Test::Unit::TestRunner) perl(Time::HiRes) +BuildRequires: perl(Unix::Syslog) perl(XML::DOM) perl(XML::Generator)
Requires(pre): shadow-utils Requires(post): /sbin/ldconfig @@ -172,24 +181,27 @@ IMAP server. # Build dir is either $PWD, $(pwd) or %
%prep -%autosetup -p1 +%autosetup -p1 -S git
# Install the Fedora-specific documentation file install -m 644 %SOURCE16 doc/
# Unpack and prepare cassandane -tar xf %SOURCE90 +tar xf %SOURCE80 ln -s cassandane-%cmt1 cassandane pushd cassandane mkdir work -tar xf %SOURCE91 +tar xf %SOURCE81
-patch -p1 < %SOURCE92 -cp %SOURCE93 cassandane.ini +patch -p1 < %SOURCE90 +patch -p1 < %SOURCE91 +cp %SOURCE82 cassandane.ini sed -i \ - -e "s!BUILDDIR!$(pwd)!" \ + -e "s!CASSDIR!$(pwd)!" \ -e "s!BUILDROOT!%buildroot!" \ cassandane.ini + +cp %SOURCE83 redirect-syslog.c popd
%build @@ -211,12 +223,12 @@ popd # --with-cyrus-prefix and --with-service-path went away; use --with-libexecdir= # instead.
-autoreconf -vi +#autoreconf -vi %configure \ --disable-silent-rules \ \ --libexecdir=%cyrexecdir \ - --with-extraident="Fedora-RPM-%version-%release" \ + --with-extraident="%release Fedora" \ --with-krbimpl=mit \ --with-ldap=/usr \ --with-pgsql \ @@ -386,10 +398,59 @@ find %buildroot -name ".packlist" -exec rm {} ;
%check -make check +make %{?_smp_mflags} check || exit 1
pushd cassandane -./testrunner.pl --config cassandane.ini -f tap + +# Build the syslog interposer +gcc -fPIC -shared -Wl,-soname,-libredirectsyslog.so.0 -ldl -o libredirectsyslog.so.0.0 redirect-syslog.c + +# More work is required to get this going properly + +export LD_LIBRARY_PATH=%buildroot/%_libdir +#./testrunner.pl %{?_smp_mflags} -f tap \ +# -vvv \ +# !Cassandane::Test::Core \ +# ACL \ +# 2>&1 +# #!ACL \ +# #!Admin \ +#LD_LIBRARY_PATH=%buildroot/%_libdir ./testrunner.pl -j 16 --config cassandane.ini -f tap 2>&1 +#exit 1 + +# Can't possibly work: +# Cassandane::Test::Core + +# Known OK tests: +# Archive +# Backups +# Bug3072 (slow) +# Bug3470 +# Bug3649 +# CaldavAlarm +# Carddav +# Conversations +# CyrusDB + + +# Known bad tests: +# ACL (9 failures of 11) +# Admin (1 failure of 1) +# Annotator (all tests error; very slow, problems running the annotator utility; problems with missing cyrus user) +# Autocreate (1 failure of 1) +# Bug3463 +# Bug3903 +# Caldav (just 3 failures out of 46 tests) +# Delete (all tests fail) + +# ClamAV is probably not supported. + +# No runnable tests: +# Cassandane::AnnotatorDaemon-# Annotator: patch utils/annotator.pl to pass the +# current UID to Cassandane::AnnotatorDaemon->run. +# (getpwuid($<))[0] +# Also override group +
%pre # Create 'cyrus' user on target host
commit 5a7ae2315974d9f22bc7b8524d4d324079210ac3 Author: Jason Tibbitts tibbs@math.uh.edu Date: Tue May 23 12:18:54 2017 -0500
More work on getting cassandane running.
diff --git a/cassandane.ini b/cassandane.ini new file mode 100644 index 0000000..5705bf9 --- /dev/null +++ b/cassandane.ini @@ -0,0 +1,47 @@ +# A basic cassandane.ini file for running cassandane as part of the Fedora +# package build process. + +# The idea here is to run tests on the just-compiled version of cyrus-imapd. +# However, many of the build locations are just random temporary directories, and +# so this requires some finesse. + +[cassandane] +rootdir = BUILDDIR/cassandane/work +pwcheck = alwaystrue +cleanup = no +maxworkers = 1 + +#[valgrind] +#enabled = no + +# The installed copy +[cyrus default] +prefix = /usr +destdir = BUILDROOT + +# Replication testing disabled +# [cyrus replica] +# [cyrus murder] + +# Don't enable any of the gdb options but leave them here in case someone ever +# needs to do so +#[gdb] +# imapd = yes +# sync_server = yes +# lntpd = yes +# timsieved = yes +# backupd = yes + +#[config] + +#[caldavtalk] +#basedir = BUILDDIR/cassandane/testdata + +#[imaptest] +# XXX Cassandane wants this to not be installed. Don't know why. If +# necessary, make a link farm to it. +#basedir = /usr + +#[caldavtester] +# XXX Would need to include the source in the cyrus package just as cassandane is, and get it built before running tests +# basedir = ... diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index c2d7477..46a9873 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -20,7 +20,6 @@ Summary: A high-performance email, contacts and calendar server License: BSD URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz -Source1: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz
Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config @@ -34,6 +33,24 @@ Source17: cyrus-imapd.service Source18: cyrus-imapd-init.service Source19: cyr_systemd_helper
+# Source files for running the Cassandane test suite at build time. +Source90: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz + +# The CPAN version, and hence the Fedora-packaged version, of Net::CalDAVTalk +# doesn't include the testdata directory. Cassandane can use it for testing +# calendaring, so it's included here. +# This archive was generated by running: +# svn export https://github.com/brong/Net-CalDAVTalk/trunk/testdata +# tar cfz cassandane-testdata-20170523.tar.gz testdata +Source91: cassandane-testdata-20170523.tar.gz + +# This is a source file and not a patch because you can't use autosetup to +# apply patches to secondary unpacked source files. +Source92: patch-cassandane-no-sudo + +# A template config file for cassandane; we will substitute in varions values. +Source93: cassandane.ini + # Dependency notes: # * clamav-devel and mariadb-devel removed because they both depend on # compat-openssl. @@ -57,6 +74,8 @@ BuildRequires: xapian-core-devel # SASL modules needed for 'make check' to function: BuildRequires: cyrus-sasl-plain cyrus-sasl-md5
+#BuildRequires: imaptest + # Perl modules required for cassandane to function BuildRequires: perl(AnyEvent) perl(BSD::Resource) perl(Clone) BuildRequires: perl(File::chdir) perl(IO::Socket::INET6) perl(Mail::IMAPTalk) @@ -150,20 +169,30 @@ files compatible with the iCalendar specification (RFC2445). This package contains a forked version of vzic for internal use by the Cyrus IMAP server.
+# Build dir is either $PWD, $(pwd) or %
%prep %autosetup -p1 -tar xf %SOURCE1 -ln -s cassandane-%cmt1 cassandane
+# Install the Fedora-specific documentation file install -m 644 %SOURCE16 doc/
-# Fix permissions on perl programs -#find . -type f -name "*.pl" -exec chmod 755 {} ; - +# Unpack and prepare cassandane +tar xf %SOURCE90 +ln -s cassandane-%cmt1 cassandane +pushd cassandane +mkdir work +tar xf %SOURCE91 + +patch -p1 < %SOURCE92 +cp %SOURCE93 cassandane.ini +sed -i \ + -e "s!BUILDDIR!$(pwd)!" \ + -e "s!BUILDROOT!%buildroot!" \ + cassandane.ini +popd
%build - # This is the test suite, which doesn't build much but does verify its dependencies. # If this is done after the configure call, the one thing it does build fails # because the configure macro puts some hardening flags into the environment. @@ -175,13 +204,14 @@ popd # --enable-objectstore # It's experimental, and it doesn't appear that either openio or caringo are # in Fedora. +# --with-mysql +# libmysqlclient doesn't support openssl 1.1 and you can't two versions of +# openssl linked into the same program.
-# XXX --with-cyrus-prefix and --with-service-path went away. -# Use --with-libexecdir= instead +# --with-cyrus-prefix and --with-service-path went away; use --with-libexecdir= +# instead.
autoreconf -vi -# XXX --with-mysql removed because libmysqlclient needs compat-openssl and you -# can't link them both into the same program. %configure \ --disable-silent-rules \ \ @@ -330,7 +360,6 @@ touch %buildroot/%ssl_pem_file mv %buildroot/%_sbindir/fetchnews %buildroot/%cyrexecdir/cyr_fetchnews mv %buildroot/%_mandir/man8/fetchnews.8 %buildroot/%_mandir/man8/cyr_fetchnews.8
- # fix conflicts with uw-imap mv %buildroot/%_mandir/man8/imapd.8 %buildroot/%_mandir/man8/imapd.8cyrus mv %buildroot/%_mandir/man8/pop3d.8 %buildroot/%_mandir/man8/pop3d.8cyrus @@ -359,6 +388,8 @@ find %buildroot -name ".packlist" -exec rm {} ; %check make check
+pushd cassandane +./testrunner.pl --config cassandane.ini -f tap
%pre # Create 'cyrus' user on target host diff --git a/fix-sched_param.patch b/fix-sched_param.patch deleted file mode 100644 index d2f3d4d..0000000 --- a/fix-sched_param.patch +++ /dev/null @@ -1,238 +0,0 @@ -diff --git a/imap/http_caldav.c b/imap/http_caldav.c -index 98c0f70..4520424 100644 ---- a/imap/http_caldav.c -+++ b/imap/http_caldav.c -@@ -362,7 +362,7 @@ static int store_resource(struct transaction_t *txn, icalcomponent *ical, - struct caldav_db *caldavdb, int overwrite, - unsigned flags); - --static void sched_request(const char *organizer, struct sched_param *sparam, -+static void sched_request(const char *organizer, struct caldav_sched_param *sparam, - icalcomponent *oldical, icalcomponent *newical, - const char *att_update); - static void sched_reply(const char *userid, -@@ -1154,7 +1154,7 @@ static int caldav_delete_sched(struct transaction_t *txn, - const char *userid, *organizer, **hdr; - icalcomponent *ical, *comp; - icalproperty *prop; -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - - /* Load message containing the resource and parse iCal data */ - ical = record_to_ical(mailbox, record); -@@ -2441,7 +2441,7 @@ static int caldav_post(struct transaction_t *txn) - icalproperty_method meth = 0; - icalproperty *prop = NULL; - const char *uid = NULL, *organizer = NULL; -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - - if (!(namespace_calendar.allow & ALLOW_CAL_SCHED) || !txn->req_tgt.flags) { - /* POST to regular calendar collection */ -@@ -2726,7 +2726,7 @@ static int caldav_put(struct transaction_t *txn, - /* Scheduling object resource */ - const char *userid; - struct caldav_data *cdata; -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - icalcomponent *oldical = NULL; - int r; - -@@ -5359,12 +5359,12 @@ static int store_resource(struct transaction_t *txn, icalcomponent *ical, - } - - --int caladdress_lookup(const char *addr, struct sched_param *param) -+int caladdress_lookup(const char *addr, struct caldav_sched_param *param) - { - const char *userid = addr; - int islocal = 1, found = 1; - -- memset(param, 0, sizeof(struct sched_param)); -+ memset(param, 0, sizeof(struct caldav_sched_param)); - - if (!addr) return HTTP_NOT_FOUND; - -@@ -5571,7 +5571,7 @@ struct remote_rock { - static void busytime_query_remote(const char *server __attribute__((unused)), - void *data, void *rock) - { -- struct sched_param *remote = (struct sched_param *) data; -+ struct caldav_sched_param *remote = (struct caldav_sched_param *) data; - struct remote_rock *rrock = (struct remote_rock *) rock; - icalcomponent *comp; - struct proplist *list; -@@ -5673,18 +5673,18 @@ static void busytime_query_remote(const char *server __attribute__((unused)), - } - - --static void free_sched_param(void *data) -+static void free_caldav_sched_param(void *data) - { -- struct sched_param *sched_param = (struct sched_param *) data; -+ struct caldav_sched_param *caldav_sched_param = (struct caldav_sched_param *) data; - -- if (sched_param) { -+ if (caldav_sched_param) { - struct proplist *prop, *next; - -- for (prop = sched_param->props; prop; prop = next) { -+ for (prop = caldav_sched_param->props; prop; prop = next) { - next = prop->next; - free(prop); - } -- free(sched_param); -+ free(caldav_sched_param); - } - } - -@@ -5700,14 +5700,14 @@ int sched_busytime_query(struct transaction_t *txn, - char mailboxname[MAX_MAILBOX_BUFFER]; - icalproperty *prop = NULL, *next; - const char *uid = NULL, *organizer = NULL; -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - struct auth_state *org_authstate = NULL; - xmlNodePtr root = NULL; - xmlNsPtr ns[NUM_NAMESPACE]; - struct propfind_ctx fctx; - struct calquery_filter calfilter; - struct hash_table remote_table; -- struct sched_param *remote = NULL; -+ struct caldav_sched_param *remote = NULL; - - if (!calendarprefix) { - calendarprefix = config_getstring(IMAPOPT_CALENDARPREFIX); -@@ -5811,7 +5811,7 @@ int sched_busytime_query(struct transaction_t *txn, - remote = hash_lookup(key, &remote_table); - if (!remote) { - /* New remote - add it to the hash table */ -- remote = xzmalloc(sizeof(struct sched_param)); -+ remote = xzmalloc(sizeof(struct caldav_sched_param)); - if (sparam.server) remote->server = xstrdup(sparam.server); - remote->port = sparam.port; - remote->flags = sparam.flags; -@@ -5907,7 +5907,7 @@ int sched_busytime_query(struct transaction_t *txn, - struct remote_rock rrock = { txn, ical, root, ns }; - hash_enumerate(&remote_table, busytime_query_remote, &rrock); - } -- free_hash_table(&remote_table, free_sched_param); -+ free_hash_table(&remote_table, free_caldav_sched_param); - - /* Output the XML response */ - if (!ret) xml_response(HTTP_OK, txn, root->doc); -@@ -5945,7 +5945,7 @@ static void free_sched_data(void *data) - - /* Deliver scheduling object to a remote recipient */ - static void sched_deliver_remote(const char *recipient, -- struct sched_param *sparam, -+ struct caldav_sched_param *sparam, - struct sched_data *sched_data) - { - int r; -@@ -6250,7 +6250,7 @@ static int deliver_merge_pollstatus(icalcomponent *ical, icalcomponent *request) - - - static void sched_pollstatus(const char *organizer, -- struct sched_param *sparam, icalcomponent *ical, -+ struct caldav_sched_param *sparam, icalcomponent *ical, - const char *voter) - { - struct auth_state *authstate; -@@ -6376,7 +6376,7 @@ deliver_merge_pollstatus(icalcomponent *ical __attribute__((unused)), - } - - static void sched_pollstatus(const char *organizer __attribute__((unused)), -- struct sched_param *sparam __attribute__((unused)), -+ struct caldav_sched_param *sparam __attribute__((unused)), - icalcomponent *ical __attribute__((unused)), - const char *voter __attribute__((unused))) - { -@@ -6708,7 +6708,7 @@ static int deliver_merge_request(const char *attendee, - - /* Deliver scheduling object to local recipient */ - static void sched_deliver_local(const char *recipient, -- struct sched_param *sparam, -+ struct caldav_sched_param *sparam, - struct sched_data *sched_data, - struct auth_state *authstate) - { -@@ -6986,7 +6986,7 @@ void sched_deliver(const char *recipient, void *data, void *rock) - { - struct sched_data *sched_data = (struct sched_data *) data; - struct auth_state *authstate = (struct auth_state *) rock; -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - int islegal; - - /* Check SCHEDULE-FORCE-SEND value */ -@@ -7325,7 +7325,7 @@ static unsigned propcmp(icalcomponent *oldical, icalcomponent *newical, - - - /* Create and deliver an organizer scheduling request */ --static void sched_request(const char *organizer, struct sched_param *sparam, -+static void sched_request(const char *organizer, struct caldav_sched_param *sparam, - icalcomponent *oldical, icalcomponent *newical, - const char *att_update) - { -@@ -7607,7 +7607,7 @@ static icalcomponent *trim_attendees(icalcomponent *comp, const char *userid, - prop; - prop = nextprop) { - const char *att = get_recipient(prop); -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - - nextprop = icalcomponent_get_next_property(copy, recip_kind); - -diff --git a/imap/http_caldav_sched.h b/imap/http_caldav_sched.h -index 5d8b2a9..9b66b81 100644 ---- a/imap/http_caldav_sched.h -+++ b/imap/http_caldav_sched.h -@@ -109,7 +109,7 @@ struct proplist { - }; - - /* Each calendar user address has the following scheduling protocol params */ --struct sched_param { -+struct caldav_sched_param { - char *userid; /* Userid corresponding to calendar address */ - char *server; /* Remote server user lives on */ - unsigned port; /* Remote server port, default = 80 */ -@@ -119,7 +119,7 @@ struct sched_param { - - extern icalarray *rscale_calendars; - extern const char *get_icalcomponent_errstr(icalcomponent *ical); --extern int isched_send(struct sched_param *sparam, const char *recipient, -+extern int isched_send(struct caldav_sched_param *sparam, const char *recipient, - icalcomponent *ical, xmlNodePtr *xml); - - extern int sched_busytime_query(struct transaction_t *txn, -@@ -127,6 +127,6 @@ extern int sched_busytime_query(struct transaction_t *txn, - extern void sched_deliver(const char *recipient, void *data, void *rock); - extern xmlNodePtr xml_add_schedresponse(xmlNodePtr root, xmlNsPtr dav_ns, - xmlChar *recipient, xmlChar *status); --extern int caladdress_lookup(const char *addr, struct sched_param *param); -+extern int caladdress_lookup(const char *addr, struct caldav_sched_param *param); - - #endif /* HTTP_CALDAV_SCHED_H */ -diff --git a/imap/http_ischedule.c b/imap/http_ischedule.c -index fef11a0..e08bc80 100644 ---- a/imap/http_ischedule.c -+++ b/imap/http_ischedule.c -@@ -540,7 +540,7 @@ static int meth_post_isched(struct transaction_t *txn, - - while ((recipient = tok_next(&tok))) { - /* Is recipient remote or local? */ -- struct sched_param sparam; -+ struct caldav_sched_param sparam; - int r = caladdress_lookup(recipient, &sparam); - - /* Don't allow scheduling with remote users via iSchedule */ -@@ -583,7 +583,7 @@ static int meth_post_isched(struct transaction_t *txn, - } - - --int isched_send(struct sched_param *sparam, const char *recipient, -+int isched_send(struct caldav_sched_param *sparam, const char *recipient, - icalcomponent *ical, xmlNodePtr *xml) - { - int r = 0; diff --git a/patch-cassandane-no-sudo b/patch-cassandane-no-sudo new file mode 100644 index 0000000..fc27b13 --- /dev/null +++ b/patch-cassandane-no-sudo @@ -0,0 +1,12 @@ +diff --git a/Cassandane/Util/Setup.pm b/Cassandane/Util/Setup.pm +index 3a67f0b..5a81e51 100644 +--- a/Cassandane/Util/Setup.pm ++++ b/Cassandane/Util/Setup.pm +@@ -57,6 +57,7 @@ my @saved_argv = @ARGV; + + sub become_cyrus + { ++ return 0; + my $cyrus = 'cyrus'; + my $pw = getpwnam($cyrus); + die "No user named '$cyrus'"
commit ab96e24f943c93d317cd8f7beb23162aa744f3c9 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:53:26 2017 -0500
Renumber source24->19.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index d214189..c2d7477 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -32,7 +32,7 @@ Source15: cyrus-imapd.cron-daily Source16: README.rpm Source17: cyrus-imapd.service Source18: cyrus-imapd-init.service -Source24: cyr_systemd_helper +Source19: cyr_systemd_helper
# Dependency notes: # * clamav-devel and mariadb-devel removed because they both depend on @@ -290,7 +290,7 @@ END
install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service install -p -D -m 644 %SOURCE18 %buildroot/%_unitdir/cyrus-imapd-init.service -install -p -D -m 755 %SOURCE24 %buildroot/%cyrexecdir/cyr_systemd_helper +install -p -D -m 755 %SOURCE19 %buildroot/%cyrexecdir/cyr_systemd_helper
# Cleanup of doc dir find doc perl -name CVS -type d -prune -exec rm -rf {} ;
commit 1c99445a363bdf16447b8ae555a88c0eb6fd499a Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:53:02 2017 -0500
Renumber source 23->18.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 573c86c..d214189 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -31,7 +31,7 @@ Source14: cyrus-imapd.magic Source15: cyrus-imapd.cron-daily Source16: README.rpm Source17: cyrus-imapd.service -Source23: cyrus-imapd-init.service +Source18: cyrus-imapd-init.service Source24: cyr_systemd_helper
# Dependency notes: @@ -289,7 +289,7 @@ tls_ca_file: /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem END
install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service -install -p -D -m 644 %SOURCE23 %buildroot/%_unitdir/cyrus-imapd-init.service +install -p -D -m 644 %SOURCE18 %buildroot/%_unitdir/cyrus-imapd-init.service install -p -D -m 755 %SOURCE24 %buildroot/%cyrexecdir/cyr_systemd_helper
# Cleanup of doc dir
commit 98bfc7d6649e0b9f0b36768eb650b8e04e3f3624 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:52:35 2017 -0500
Renumber source22->17.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index f97a388..573c86c 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -30,7 +30,7 @@ Source14: cyrus-imapd.magic # XXX A systemd timer would probably be better Source15: cyrus-imapd.cron-daily Source16: README.rpm -Source22: cyrus-imapd.service +Source17: cyrus-imapd.service Source23: cyrus-imapd-init.service Source24: cyr_systemd_helper
@@ -288,7 +288,7 @@ tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd-key.pem tls_ca_file: /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem END
-install -p -D -m 644 %SOURCE22 %buildroot/%_unitdir/cyrus-imapd.service +install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service install -p -D -m 644 %SOURCE23 %buildroot/%_unitdir/cyrus-imapd-init.service install -p -D -m 755 %SOURCE24 %buildroot/%cyrexecdir/cyr_systemd_helper
commit 4339e190d197cf3478d7be814cfc72180593dc72 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:52:07 2017 -0500
Renumber source21->16.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 67dc910..f97a388 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -29,7 +29,7 @@ Source13: cyrus-imapd.cvt_cyrusdb_all Source14: cyrus-imapd.magic # XXX A systemd timer would probably be better Source15: cyrus-imapd.cron-daily -Source21: README.rpm +Source16: README.rpm Source22: cyrus-imapd.service Source23: cyrus-imapd-init.service Source24: cyr_systemd_helper @@ -156,7 +156,7 @@ IMAP server. tar xf %SOURCE1 ln -s cassandane-%cmt1 cassandane
-install -m 644 %SOURCE21 doc/ +install -m 644 %SOURCE16 doc/
# Fix permissions on perl programs #find . -type f -name "*.pl" -exec chmod 755 {} ;
commit 684974ccd8582e9e5ed1e30d7aebb717a3f1c6dd Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:51:28 2017 -0500
Renumber source20->15.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 2e7586c..67dc910 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -28,7 +28,7 @@ Source12: cyrus-imapd.sysconfig Source13: cyrus-imapd.cvt_cyrusdb_all Source14: cyrus-imapd.magic # XXX A systemd timer would probably be better -Source20: cyrus-imapd.cron-daily +Source15: cyrus-imapd.cron-daily Source21: README.rpm Source22: cyrus-imapd.service Source23: cyrus-imapd-init.service @@ -274,7 +274,7 @@ install -p -m 644 %SOURCE12 %buildroot/etc/sysconfig/%name install -m 755 %SOURCE13 %buildroot/%cyrexecdir/cvt_cyrusdb_all install -m 644 %SOURCE14 %buildroot/%_datadir/%name/rpm/magic
-install -p -m 755 %SOURCE20 %buildroot/etc/cron.daily/%name +install -p -m 755 %SOURCE15 %buildroot/etc/cron.daily/%name
install -p -m 644 doc/examples/cyrus_conf/prefork.conf %buildroot/etc/cyrus.conf install -p -m 644 doc/examples/imapd_conf/normal.conf %buildroot/etc/imapd.conf
commit 224d9399ecc02dcbf919268add7789022a1d0b8a Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:50:49 2017 -0500
Renumber source19->14.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 3583953..2e7586c 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -26,7 +26,7 @@ Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config Source12: cyrus-imapd.sysconfig Source13: cyrus-imapd.cvt_cyrusdb_all -Source19: cyrus-imapd.magic +Source14: cyrus-imapd.magic # XXX A systemd timer would probably be better Source20: cyrus-imapd.cron-daily Source21: README.rpm @@ -272,7 +272,7 @@ install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/csync install -p -m 644 %SOURCE12 %buildroot/etc/sysconfig/%name
install -m 755 %SOURCE13 %buildroot/%cyrexecdir/cvt_cyrusdb_all -install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic +install -m 644 %SOURCE14 %buildroot/%_datadir/%name/rpm/magic
install -p -m 755 %SOURCE20 %buildroot/etc/cron.daily/%name
commit 4a7375e2c442e1a0e561653951cb677d7f52f9d5 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:50:21 2017 -0500
Renumber source18->13.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index ecd84bb..3583953 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -25,7 +25,7 @@ Source1: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandan Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config Source12: cyrus-imapd.sysconfig -Source18: cyrus-imapd.cvt_cyrusdb_all +Source13: cyrus-imapd.cvt_cyrusdb_all Source19: cyrus-imapd.magic # XXX A systemd timer would probably be better Source20: cyrus-imapd.cron-daily @@ -271,7 +271,7 @@ install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/csync
install -p -m 644 %SOURCE12 %buildroot/etc/sysconfig/%name
-install -m 755 %SOURCE18 %buildroot/%cyrexecdir/cvt_cyrusdb_all +install -m 755 %SOURCE13 %buildroot/%cyrexecdir/cvt_cyrusdb_all install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic
install -p -m 755 %SOURCE20 %buildroot/etc/cron.daily/%name
commit 6e07affa6406e4baf3485498d5be696b49bf3db4 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:49:48 2017 -0500
Renumber source17->12.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index ce0b573..ecd84bb 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -24,7 +24,7 @@ Source1: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandan
Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config -Source17: cyrus-imapd.sysconfig +Source12: cyrus-imapd.sysconfig Source18: cyrus-imapd.cvt_cyrusdb_all Source19: cyrus-imapd.magic # XXX A systemd timer would probably be better @@ -269,7 +269,7 @@ install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/lmtp install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/nntp install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/csync
-install -p -m 644 %SOURCE17 %buildroot/etc/sysconfig/%name +install -p -m 644 %SOURCE12 %buildroot/etc/sysconfig/%name
install -m 755 %SOURCE18 %buildroot/%cyrexecdir/cvt_cyrusdb_all install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic
commit e3b1f185d17efcbb2b087ca1ed34f8a80ba3a80c Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:49:21 2017 -0500
Reorder sources
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 00a3c72..ce0b573 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -258,9 +258,8 @@ for i in vzic vzic-test.pl vzic-merge.pl vzic-dump.pl; do done
# Install additional files -install -m 755 %SOURCE18 %buildroot/%cyrexecdir/cvt_cyrusdb_all -install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic
+install -p -m 644 %SOURCE10 %buildroot/etc/logrotate.d/%name
install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/pop install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/imap @@ -270,8 +269,11 @@ install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/lmtp install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/nntp install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/csync
-install -p -m 644 %SOURCE10 %buildroot/etc/logrotate.d/%name install -p -m 644 %SOURCE17 %buildroot/etc/sysconfig/%name + +install -m 755 %SOURCE18 %buildroot/%cyrexecdir/cvt_cyrusdb_all +install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic + install -p -m 755 %SOURCE20 %buildroot/etc/cron.daily/%name
install -p -m 644 doc/examples/cyrus_conf/prefork.conf %buildroot/etc/cyrus.conf
commit a19e54f75b76eef5c1c61ffe71a9fd217b1c361a Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:48:11 2017 -0500
Renumber source13->11.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index c196d58..00a3c72 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -23,7 +23,7 @@ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz Source1: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz
Source10: cyrus-imapd.logrotate -Source13: cyrus-imapd.pam-config +Source11: cyrus-imapd.pam-config Source17: cyrus-imapd.sysconfig Source18: cyrus-imapd.cvt_cyrusdb_all Source19: cyrus-imapd.magic @@ -262,13 +262,13 @@ install -m 755 %SOURCE18 %buildroot/%cyrexecdir/cvt_cyrusdb_all install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic
-install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/pop -install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/imap -install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/sieve -install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/mupdate -install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/lmtp -install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/nntp -install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/csync +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/pop +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/imap +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/sieve +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/mupdate +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/lmtp +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/nntp +install -p -m 644 %SOURCE11 %buildroot/etc/pam.d/csync
install -p -m 644 %SOURCE10 %buildroot/etc/logrotate.d/%name install -p -m 644 %SOURCE17 %buildroot/etc/sysconfig/%name
commit a01e045039d559f4f49967735f79864618026469 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:47:36 2017 -0500
Renumber source11 -> 10.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index d437974..c196d58 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -22,7 +22,7 @@ URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz Source1: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz
-Source11: cyrus-imapd.logrotate +Source10: cyrus-imapd.logrotate Source13: cyrus-imapd.pam-config Source17: cyrus-imapd.sysconfig Source18: cyrus-imapd.cvt_cyrusdb_all @@ -270,7 +270,7 @@ install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/lmtp install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/nntp install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/csync
-install -p -m 644 %SOURCE11 %buildroot/etc/logrotate.d/%name +install -p -m 644 %SOURCE10 %buildroot/etc/logrotate.d/%name install -p -m 644 %SOURCE17 %buildroot/etc/sysconfig/%name install -p -m 755 %SOURCE20 %buildroot/etc/cron.daily/%name
commit d4035a6d3f02ca102885ce9068be5af5d3ca3a4f Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 17:17:04 2017 -0500
Add doc-extra subpackage; reorganize subpackage ordering.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index cc0502b..d437974 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -101,6 +101,35 @@ supports access control lists on mailboxes and storage quotas on mailbox hierarchies.
+%package devel +Summary: Cyrus IMAP server development files +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains header files and libraries +necessary for developing applications which use the imclient library. + + +%package doc-extra +Summary: Extra documentation for the Cyrus IMAP server +BuildArch: noarch + +%description doc-extra +This package contains the HTML documentation for the Cyrus IMAP server, as well +as some legacy and internal documentation not useful for normal operation of +the server. + + +%package utils +Summary: Cyrus IMAP server administration utilities + +%description utils +The cyrus-imapd-utils package contains administrative tools for the +Cyrus IMAP server. It can be installed on systems other than the +one running the server. + + %package vzic Summary: Utilities to convert timezone database files License: GPLv2+ @@ -122,23 +151,6 @@ This package contains a forked version of vzic for internal use by the Cyrus IMAP server.
-%package devel -Summary: Cyrus IMAP server development files -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: pkgconfig - -%description devel -The %{name}-devel package contains header files and libraries -necessary for developing applications which use the imclient library. - -%package utils -Summary: Cyrus IMAP server administration utilities - -%description utils -The cyrus-imapd-utils package contains administrative tools for the -Cyrus IMAP server. It can be installed on systems other than the -one running the server. - %prep %autosetup -p1 tar xf %SOURCE1 @@ -149,6 +161,7 @@ install -m 644 %SOURCE21 doc/ # Fix permissions on perl programs #find . -type f -name "*.pl" -exec chmod 755 {} ;
+ %build
# This is the test suite, which doesn't build much but does verify its dependencies. @@ -362,9 +375,10 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v /sbin/ldconfig %systemd_postun_with_restart cyrus-imapd.service
+ %files %license COPYING -%doc README.md doc/* +%doc README.md doc/README.* doc/examples doc/text
%_datadir/cyrus-imapd %_libdir/libcyrus*.so.* @@ -405,15 +419,17 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %attr(0700,%cyrususer,%cyrusgroup) /var/spool/imap/
-%files vzic -%cyrexecdir/vzic* - %files devel %_includedir/cyrus/ %_libdir/libcyrus*.so %_libdir/pkgconfig/*.pc %_mandir/man3/imclient.3*
+ +%files doc-extra +%doc doc/html doc/internal doc/legacy + + %files utils %license COPYING %doc perl/imap/README @@ -427,6 +443,11 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %{_mandir}/man3/*.3pm* %{_mandir}/man1/*
+ +%files vzic +%cyrexecdir/vzic* + + %changelog * Thu Apr 20 2017 Jason L Tibbitts III tibbs@math.uh.edu - 3.0.1-1 - Initial attempt at importing 3.0. Many new dependencies.
commit 1f8c1109f32cbe981a0a034dcf800e0ffc7dc688 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 16:14:19 2017 -0500
Now have a buildable package.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index b75085e..cc0502b 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -8,14 +8,12 @@ Release: 1%{?dist}
%define ssl_pem_file /etc/pki/%name/%name.pem
-# uid/gid reserved, see setup:/usr/share/doc/setup*/uidgid +# UID/GID 76 have long been reserved for Cyrus %define uid 76 %define gid 76
%define cyrususer cyrus %define cyrusgroup mail -# RF hardcoded-library-path in %%_prefix/lib/%%name -#define cyrexecdir %%_prefix/lib/%name %define cyrexecdir %_libexecdir/%name
Summary: A high-performance email, contacts and calendar server @@ -29,6 +27,7 @@ Source13: cyrus-imapd.pam-config Source17: cyrus-imapd.sysconfig Source18: cyrus-imapd.cvt_cyrusdb_all Source19: cyrus-imapd.magic +# XXX A systemd timer would probably be better Source20: cyrus-imapd.cron-daily Source21: README.rpm Source22: cyrus-imapd.service @@ -365,7 +364,7 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%files %license COPYING -%doc README doc/* +%doc README.md doc/*
%_datadir/cyrus-imapd %_libdir/libcyrus*.so.* @@ -421,6 +420,7 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %doc perl/imap/Changes %doc perl/imap/examples %{_bindir}/* +%{_sbindir}/* %{perl_vendorarch}/auto/Cyrus %{perl_vendorarch}/Cyrus %{perl_vendorlib}/Cyrus
commit 176b9d04958e464f99d780af3c8d02ba33d11d8a Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 15:54:46 2017 -0500
Now passes %check.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 371ee5d..b75085e 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -35,12 +35,19 @@ Source22: cyrus-imapd.service Source23: cyrus-imapd-init.service Source24: cyr_systemd_helper
+# Dependency notes: +# * clamav-devel and mariadb-devel removed because they both depend on +# compat-openssl. +# * As of 2017-05-22, libical 2.1 has not actually been released. The +# configure script will always produce the following message: +# configure: Your version of libical can not support patching iCalendar +# objects. Consider upgrading to libical >= 2.1 + BuildRequires: autoconf automake bison flex groff libtool BuildRequires: pkgconfig systemd tcp_wrappers transfig
BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) perl(Pod::Html)
-# Note: clamav-devel and mariadb-devel removed because they both depend on compat-openssl.
BuildRequires: clamav-devel CUnit-devel cyrus-sasl-devel glib2-devel BuildRequires: jansson-devel krb5-devel libical-devel libnghttp2-devel @@ -48,6 +55,9 @@ BuildRequires: libxml2-devel net-snmp-devel openldap-devel BuildRequires: openssl-devel postgresql-devel shapelib-devel sqlite-devel BuildRequires: xapian-core-devel
+# SASL modules needed for 'make check' to function: +BuildRequires: cyrus-sasl-plain cyrus-sasl-md5 + # Perl modules required for cassandane to function BuildRequires: perl(AnyEvent) perl(BSD::Resource) perl(Clone) BuildRequires: perl(File::chdir) perl(IO::Socket::INET6) perl(Mail::IMAPTalk)
commit 213ef748ce7bdf5f0b92c5ddbb66eeeb357bbf69 Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 14:22:00 2017 -0500
Some further work. Try to run the test suite.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 974bb77..371ee5d 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -15,7 +15,8 @@ Release: 1%{?dist} %define cyrususer cyrus %define cyrusgroup mail # RF hardcoded-library-path in %%_prefix/lib/%%name -%define cyrexecdir %_prefix/lib/%name +#define cyrexecdir %%_prefix/lib/%name +%define cyrexecdir %_libexecdir/%name
Summary: A high-performance email, contacts and calendar server License: BSD @@ -39,10 +40,11 @@ BuildRequires: pkgconfig systemd tcp_wrappers transfig
BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) perl(Pod::Html)
-BuildRequires: clamav-devel CUnit-devel cyrus-sasl-devel glib2-devel +# Note: clamav-devel and mariadb-devel removed because they both depend on compat-openssl.
+BuildRequires: clamav-devel CUnit-devel cyrus-sasl-devel glib2-devel BuildRequires: jansson-devel krb5-devel libical-devel libnghttp2-devel -BuildRequires: libxml2-devel mariadb-devel net-snmp-devel openldap-devel +BuildRequires: libxml2-devel net-snmp-devel openldap-devel BuildRequires: openssl-devel postgresql-devel shapelib-devel sqlite-devel BuildRequires: xapian-core-devel
@@ -135,20 +137,6 @@ ln -s cassandane-%cmt1 cassandane
install -m 644 %SOURCE21 doc/
-# Modify the documentation to change master --> cyrus-master -#sed -i -e "s/master(8)/cyrus-master(8)/" man/*5 man/*8 lib/imapoptions -#sed -i -e 's|([^-])master|\1cyrus-master|g' \ -# -e 's|^master|cyrus-master|g' \ -# -e 's|Master|Cyrus-master|g' \ -# -e 's|MASTER|CYRUS-MASTER|g' \ -# man/master.8 doc/man.html - -# modify lmtp socket path in .conf files -#sed -i -e "s@/var/imap/@/var/lib/imap/@" master/conf/*.conf doc/cyrusv2.mc - -# enable idled in .conf files to prevent error messages -#sed -i -e "s/# idled/ idled/" master/conf/*.conf - # Fix permissions on perl programs #find . -type f -name "*.pl" -exec chmod 755 {} ;
@@ -167,15 +155,18 @@ popd # in Fedora.
# XXX --with-cyrus-prefix and --with-service-path went away. +# Use --with-libexecdir= instead
autoreconf -vi -%{configure} \ +# XXX --with-mysql removed because libmysqlclient needs compat-openssl and you +# can't link them both into the same program. +%configure \ --disable-silent-rules \ \ + --libexecdir=%cyrexecdir \ --with-extraident="Fedora-RPM-%version-%release" \ --with-krbimpl=mit \ --with-ldap=/usr \ - --with-mysql \ --with-pgsql \ --with-perl=%__perl \ --with-snmp \ @@ -288,15 +279,8 @@ rm -rf doc/man # fix permissions on perl .so files find %buildroot/%_libdir/perl5/ -type f -name "*.so" -exec chmod 755 {} ;
-# fix conflicts with uw-imap -mv %buildroot/%_mandir/man8/imapd.8 %buildroot/%_mandir/man8/imapd.8cyrus -mv %buildroot/%_mandir/man8/pop3d.8 %buildroot/%_mandir/man8/pop3d.8cyrus - -# Install templates -install -m 755 -d doc/conf -install -m 644 master/conf/*.conf doc/conf/ - # Generate db config file +# XXX Is this still necessary? ( grep '^{' lib/imapoptions | grep _db | cut -d'"' -f 2,4 | \ sed -e 's/^ *//' -e 's/-nosync//' -e 's/ *$//' -e 's/"/=/' echo sieve_version=2.2.3 ) | sort > %buildroot/%_datadir/%name/rpm/db.cfg @@ -304,18 +288,34 @@ install -m 644 master/conf/*.conf doc/conf/ # create the ghost pem file touch %buildroot/%ssl_pem_file
-# Rename 'master' binary and manpage to avoid clash with postfix -mv %buildroot/%cyrexecdir/master %buildroot/%cyrexecdir/cyrus-master -mv %buildroot/%_mandir/man8/master.8 %buildroot/%_mandir/man8/cyrus-master.8 +## Cyrus has various files with extremely conflicting names. Some of these are +# not unexpected ("imapd" itself) but some like "httpd" are rather surprising.
+# Where these files live in /usr/libexec and are not conflicting, they have +# been left alone even though this may cause a bit of confusion. Upstream +# intends to rename all potential conflict, and possibley just rename +# everything, to have a "cyr_" prefix. But this didn't happen for version 3. + +# Where there are only conflicting manpages, they have been moved to a "8cyrus" +# section. If the binary was renamed, then the manpages are renamed to match +# but a internal replacement has not been done. This may lead to more +# confusion but involves modifying fewer upstream files. + +# Actual binary conflicts # Rename 'fetchnews' binary and manpage to avoid clash with leafnode -mv %buildroot/%cyrexecdir/fetchnews %buildroot/%cyrexecdir/cyrfetchnews -mv %buildroot/%_mandir/man8/fetchnews.8 %buildroot/%_mandir/man8/cyrfetchnews.8 -perl -pi -e 's|fetchnews|cyrfetchnews|g;s|Fetchnews|Cyrfetchnews|g;s/FETCHNEWS/CYRFETCHNEWS/g' \ - %buildroot/%_mandir/man8/cyrfetchnews.8 +mv %buildroot/%_sbindir/fetchnews %buildroot/%cyrexecdir/cyr_fetchnews +mv %buildroot/%_mandir/man8/fetchnews.8 %buildroot/%_mandir/man8/cyr_fetchnews.8 + + +# fix conflicts with uw-imap +mv %buildroot/%_mandir/man8/imapd.8 %buildroot/%_mandir/man8/imapd.8cyrus +mv %buildroot/%_mandir/man8/pop3d.8 %buildroot/%_mandir/man8/pop3d.8cyrus + +# Rename 'master' manpage +mv %buildroot/%_mandir/man8/master.8 %buildroot/%_mandir/man8/master.8cyrus
# Rename 'httpd' manpage to avoid clash with Apache -mv %buildroot/%_mandir/man8/httpd.8 %buildroot/%_mandir/man8/cyrhttpd.8 +mv %buildroot/%_mandir/man8/httpd.8 %buildroot/%_mandir/man8/cyr_httpd.8
#remove executable bit from docs for ddir in doc perl/imap/examples @@ -332,6 +332,10 @@ find %buildroot -name "perllocal.pod" -exec rm {} ; find %buildroot -name ".packlist" -exec rm {} ;
+%check +make check + + %pre # Create 'cyrus' user on target host getent group saslauth >/dev/null || /usr/sbin/groupadd -g %gid -r saslauth
commit 583c7ed00b9d1f9bb416a7cdbb4d55012bdaecaa Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 12:00:25 2017 -0500
Missed two {} cleanups.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 19fa146..974bb77 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -299,7 +299,7 @@ install -m 644 master/conf/*.conf doc/conf/ # Generate db config file ( grep '^{' lib/imapoptions | grep _db | cut -d'"' -f 2,4 | \ sed -e 's/^ *//' -e 's/-nosync//' -e 's/ *$//' -e 's/"/=/' - echo sieve_version=2.2.3 ) | sort > %{buildroot}%{_datadir}/%{name}/rpm/db.cfg + echo sieve_version=2.2.3 ) | sort > %buildroot/%_datadir/%name/rpm/db.cfg
# create the ghost pem file touch %buildroot/%ssl_pem_file @@ -312,7 +312,7 @@ mv %buildroot/%_mandir/man8/master.8 %buildroot/%_mandir/man8/cyrus-master.8 mv %buildroot/%cyrexecdir/fetchnews %buildroot/%cyrexecdir/cyrfetchnews mv %buildroot/%_mandir/man8/fetchnews.8 %buildroot/%_mandir/man8/cyrfetchnews.8 perl -pi -e 's|fetchnews|cyrfetchnews|g;s|Fetchnews|Cyrfetchnews|g;s/FETCHNEWS/CYRFETCHNEWS/g' \ - %{buildroot}%{_mandir}/man8/cyrfetchnews.8 + %buildroot/%_mandir/man8/cyrfetchnews.8
# Rename 'httpd' manpage to avoid clash with Apache mv %buildroot/%_mandir/man8/httpd.8 %buildroot/%_mandir/man8/cyrhttpd.8
commit f98fbbdac052729317782fc9d635ada2e32e663b Author: Jason Tibbitts tibbs@math.uh.edu Date: Mon May 22 11:59:16 2017 -0500
Initial work to update to 3.0.1.
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 1b679ad..19fa146 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -1,6 +1,10 @@ +# Cassandane doesn't have releases often. This was fetched on 20170412. +%global cmt1 9fed6232e4bf202987b5b8a57bac018797fbb6c6 +%define scmt(l:) %(c=%1; echo ${c:0:%{-l:%{-l*}}%{!-l:7}}) + Name: cyrus-imapd -Version: 2.5.10 -Release: 3%{?dist} +Version: 3.0.1 +Release: 1%{?dist}
%define ssl_pem_file /etc/pki/%name/%name.pem
@@ -10,38 +14,46 @@ Release: 3%{?dist}
%define cyrususer cyrus %define cyrusgroup mail +# RF hardcoded-library-path in %%_prefix/lib/%%name %define cyrexecdir %_prefix/lib/%name
-Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support +Summary: A high-performance email, contacts and calendar server License: BSD URL: http://www.cyrusimap.org/ Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz -Source1: cyrus-imapd.logrotate -Source2: cyrus-imapd.imap-2.5.x-conf -Source3: cyrus-imapd.pam-config -Source7: cyrus-imapd.sysconfig -Source8: cyrus-imapd.cvt_cyrusdb_all -Source9: cyrus-imapd.magic -Source10: cyrus-imapd.cron-daily -Source11: README.rpm -Source12: cyrus-imapd.service -Source13: cyrus-imapd-init.service -Source14: cyr_systemd_helper - -# There is a conflict between the sched_param structure defined in the source -# and one defined by a system header. Fixed upstream as -# https://github.com/cyrusimap/cyrus-imapd/commit/a288b4fea15f843e309dcdf7039a... -# but was not fixed on the 2.5 branch -Patch0: fix-sched_param.patch +Source1: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%%7... %cmt1}.tar.gz + +Source11: cyrus-imapd.logrotate +Source13: cyrus-imapd.pam-config +Source17: cyrus-imapd.sysconfig +Source18: cyrus-imapd.cvt_cyrusdb_all +Source19: cyrus-imapd.magic +Source20: cyrus-imapd.cron-daily +Source21: README.rpm +Source22: cyrus-imapd.service +Source23: cyrus-imapd-init.service +Source24: cyr_systemd_helper
BuildRequires: autoconf automake bison flex groff libtool BuildRequires: pkgconfig systemd tcp_wrappers transfig
BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) perl(Pod::Html)
-BuildRequires: cyrus-sasl-devel glib2-devel jansson-devel krb5-devel -BuildRequires: libical-devel libxml2-devel net-snmp-devel openldap-devel -BuildRequires: openssl-devel sqlite-devel +BuildRequires: clamav-devel CUnit-devel cyrus-sasl-devel glib2-devel + +BuildRequires: jansson-devel krb5-devel libical-devel libnghttp2-devel +BuildRequires: libxml2-devel mariadb-devel net-snmp-devel openldap-devel +BuildRequires: openssl-devel postgresql-devel shapelib-devel sqlite-devel +BuildRequires: xapian-core-devel + +# Perl modules required for cassandane to function +BuildRequires: perl(AnyEvent) perl(BSD::Resource) perl(Clone) +BuildRequires: perl(File::chdir) perl(IO::Socket::INET6) perl(Mail::IMAPTalk) +BuildRequires: perl(Config::IniFiles) perl(Mail::JMAPTalk) perl(Math::Int64) +BuildRequires: perl(Net::CalDAVTalk) perl(Net::CardDAVTalk) +BuildRequires: perl(News::NNTPClient) perl(String::CRC32) perl(Sys::Syslog) +BuildRequires: perl(Test::Unit::TestRunner) perl(Time::HiRes) perl(XML::DOM) +BuildRequires: perl(XML::Generator)
Requires(pre): shadow-utils Requires(post): /sbin/ldconfig @@ -56,32 +68,27 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %{?perl_default_filter}
%description -The cyrus-imapd package contains the core of the Cyrus IMAP server. -It is a scaleable enterprise mail system designed for use from -small to large enterprise environments using standards-based -internet mail technologies. - -A full Cyrus IMAP implementation allows a seamless mail and bulletin -board environment to be set up across multiple servers. It differs from -other IMAP server implementations in that it is run on "sealed" -servers, where users are not normally permitted to log in and have no -system account on the server. The mailbox database is stored in parts -of the file system that are private to the Cyrus IMAP server. All user -access to mail is through software using the IMAP, POP3 or KPOP -protocols. It also includes support for virtual domains, NNTP, -mailbox annotations, and much more. The private mailbox database design -gives the server large advantages in efficiency, scalability and -administratability. Multiple concurrent read/write connections to the -same mailbox are permitted. The server supports access control lists on -mailboxes and storage quotas on mailbox hierarchies. - -The Cyrus IMAP server supports the IMAP4rev1 protocol described -in RFC 3501. IMAP4rev1 has been approved as a proposed standard. -It supports any authentication mechanism available from the SASL -library, imaps/pop3s/nntps (IMAP/POP3/NNTP encrypted using SSL and -TLSv1) can be used for security. The server supports single instance -store where possible when an email message is addressed to multiple -recipients, SIEVE provides server side email filtering. +The Cyrus IMAP (Internet Message Access Protocol) server provides access to +personal mail, system-wide bulletin boards, news-feeds, calendar and contacts +through the IMAP, JMAP, NNTP, CalDAV and CardDAV protocols. The Cyrus IMAP +server is a scalable enterprise groupware system designed for use from small to +large enterprise environments using technologies based on well-established Open +Standards. + +A full Cyrus IMAP implementation allows a seamless mail and bulletin board +environment to be set up across one or more nodes. It differs from other IMAP +server implementations in that it is run on sealed nodes, where users are not +normally 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 software using the IMAP, IMAPS, JMAP, POP3, POP3S, KPOP, CalDAV +and/or CardDAV protocols. + +The private mailbox database design gives the Cyrus IMAP server large +advantages in efficiency, scalability, and administratability. Multiple +concurrent read/write connections to the same mailbox are permitted. The server +supports access control lists on mailboxes and storage quotas on mailbox +hierarchies. +
%package vzic Summary: Utilities to convert timezone database files @@ -123,45 +130,69 @@ one running the server.
%prep %autosetup -p1 -install -m 644 %SOURCE11 doc/ +tar xf %SOURCE1 +ln -s cassandane-%cmt1 cassandane + +install -m 644 %SOURCE21 doc/
# Modify the documentation to change master --> cyrus-master -sed -i -e "s/master(8)/cyrus-master(8)/" man/*5 man/*8 lib/imapoptions -sed -i -e 's|([^-])master|\1cyrus-master|g' \ - -e 's|^master|cyrus-master|g' \ - -e 's|Master|Cyrus-master|g' \ - -e 's|MASTER|CYRUS-MASTER|g' \ - man/master.8 doc/man.html +#sed -i -e "s/master(8)/cyrus-master(8)/" man/*5 man/*8 lib/imapoptions +#sed -i -e 's|([^-])master|\1cyrus-master|g' \ +# -e 's|^master|cyrus-master|g' \ +# -e 's|Master|Cyrus-master|g' \ +# -e 's|MASTER|CYRUS-MASTER|g' \ +# man/master.8 doc/man.html
# modify lmtp socket path in .conf files -sed -i -e "s@/var/imap/@/var/lib/imap/@" master/conf/*.conf doc/cyrusv2.mc +#sed -i -e "s@/var/imap/@/var/lib/imap/@" master/conf/*.conf doc/cyrusv2.mc
# enable idled in .conf files to prevent error messages -sed -i -e "s/# idled/ idled/" master/conf/*.conf +#sed -i -e "s/# idled/ idled/" master/conf/*.conf
# Fix permissions on perl programs -find . -type f -name "*.pl" -exec chmod 755 {} ; +#find . -type f -name "*.pl" -exec chmod 755 {} ;
%build + +# This is the test suite, which doesn't build much but does verify its dependencies. +# If this is done after the configure call, the one thing it does build fails +# because the configure macro puts some hardening flags into the environment. +pushd cassandane +make +popd + +# Options not enabled: +# --enable-objectstore +# It's experimental, and it doesn't appear that either openio or caringo are +# in Fedora. + +# XXX --with-cyrus-prefix and --with-service-path went away. + autoreconf -vi %{configure} \ - --with-bdb-incdir=%_includedir/libdb \ - --with-cyrus-prefix=%cyrexecdir \ + --disable-silent-rules \ + \ --with-extraident="Fedora-RPM-%version-%release" \ --with-krbimpl=mit \ --with-ldap=/usr \ + --with-mysql \ + --with-pgsql \ --with-perl=%__perl \ - --with-service-path=%cyrexecdir \ --with-snmp \ --with-syslogfacility=MAIL \ + \ --enable-autocreate \ + --enable-backup \ + --enable-calalarmd \ --enable-http \ --enable-idled \ + --enable-jmap \ --enable-murder \ - --enable-netscapehack \ --enable-nntp \ --enable-replication \ --enable-unit-tests \ + --enable-xapian \ +#
# The configure script will set up the Perl makefiles, but not in the way # Fedora needs them. So regenerate them manually. @@ -182,6 +213,7 @@ make -C tools/vzic #make -C man -f Makefile.dist #make -C doc -f Makefile.dist
+ %install make install DESTDIR=%buildroot
@@ -195,8 +227,10 @@ install -d \ %buildroot/var/lib/imap/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup,meta} \ %buildroot/var/lib/imap/ptclient \ %buildroot/%_datadir/%name/rpm \ + %buildroot/%cyrexecdir \ %buildroot/etc/pki/%name
+ # Some tools which aren't installed by the makefile which we want install -m 755 notifyd/notifytest %buildroot%_bindir/ install -m 755 perl/imap/cyradm %buildroot%_bindir/ @@ -211,24 +245,37 @@ for i in vzic vzic-test.pl vzic-merge.pl vzic-dump.pl; do done
# Install additional files -install -m 755 %{SOURCE8} %{buildroot}%{cyrexecdir}/cvt_cyrusdb_all -install -m 644 %{SOURCE9} %{buildroot}%{_datadir}/%{name}/rpm/magic -install -p -m 644 master/conf/prefork.conf %{buildroot}/etc/cyrus.conf -install -p -m 644 %{SOURCE2} %{buildroot}/etc/imapd.conf -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/pop -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/imap -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/sieve -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/mupdate -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/lmtp -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/nntp -install -p -m 644 %{SOURCE3} %{buildroot}/etc/pam.d/csync -install -p -m 644 %{SOURCE1} %{buildroot}/etc/logrotate.d/%{name} -install -p -m 644 %{SOURCE7} %{buildroot}/etc/sysconfig/%{name} -install -p -m 755 %{SOURCE10} %{buildroot}/etc/cron.daily/%{name} - -install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/cyrus-imapd.service -install -p -D -m 644 %{SOURCE13} %{buildroot}%{_unitdir}/cyrus-imapd-init.service -install -p -D -m 755 %{SOURCE14} %{buildroot}%{cyrexecdir}/cyr_systemd_helper +install -m 755 %SOURCE18 %buildroot/%cyrexecdir/cvt_cyrusdb_all +install -m 644 %SOURCE19 %buildroot/%_datadir/%name/rpm/magic + + +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/pop +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/imap +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/sieve +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/mupdate +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/lmtp +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/nntp +install -p -m 644 %SOURCE13 %buildroot/etc/pam.d/csync + +install -p -m 644 %SOURCE11 %buildroot/etc/logrotate.d/%name +install -p -m 644 %SOURCE17 %buildroot/etc/sysconfig/%name +install -p -m 755 %SOURCE20 %buildroot/etc/cron.daily/%name + +install -p -m 644 doc/examples/cyrus_conf/prefork.conf %buildroot/etc/cyrus.conf +install -p -m 644 doc/examples/imapd_conf/normal.conf %buildroot/etc/imapd.conf + +cat >> %buildroot/etc/imapd.conf <<END + +# These three files will automatically be generated by the systemd unit when +# the service starts for the first time. +tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem +tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd-key.pem +tls_ca_file: /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem +END + +install -p -D -m 644 %SOURCE22 %buildroot/%_unitdir/cyrus-imapd.service +install -p -D -m 644 %SOURCE23 %buildroot/%_unitdir/cyrus-imapd-init.service +install -p -D -m 755 %SOURCE24 %buildroot/%cyrexecdir/cyr_systemd_helper
# Cleanup of doc dir find doc perl -name CVS -type d -prune -exec rm -rf {} ; @@ -239,11 +286,11 @@ rm -f doc/text/Makefile rm -rf doc/man
# fix permissions on perl .so files -find %{buildroot}%{_libdir}/perl5/ -type f -name "*.so" -exec chmod 755 {} ; +find %buildroot/%_libdir/perl5/ -type f -name "*.so" -exec chmod 755 {} ;
# fix conflicts with uw-imap -mv %{buildroot}%{_mandir}/man8/imapd.8 %{buildroot}%{_mandir}/man8/imapd.8cyrus -mv %{buildroot}%{_mandir}/man8/pop3d.8 %{buildroot}%{_mandir}/man8/pop3d.8cyrus +mv %buildroot/%_mandir/man8/imapd.8 %buildroot/%_mandir/man8/imapd.8cyrus +mv %buildroot/%_mandir/man8/pop3d.8 %buildroot/%_mandir/man8/pop3d.8cyrus
# Install templates install -m 755 -d doc/conf @@ -367,6 +414,10 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %{_mandir}/man1/*
%changelog +* Thu Apr 20 2017 Jason L Tibbitts III tibbs@math.uh.edu - 3.0.1-1 +- Initial attempt at importing 3.0. Many new dependencies. +- Use a stock sample imapd.conf file instead of a Fedora-provided one. + * Fri Feb 10 2017 Fedora Release Engineering releng@fedoraproject.org - 2.5.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
arch-excludes@lists.fedoraproject.org