Rename quota and restore; fix perl-related FTBFS
Rename quota and restore to have a "cyr_" prefix, and fix testsuite hardcoding of those names. Fix FTBFS related to a change in the way perl compiles XS modules. Re-enable some tests on 32-bit rawhide because perl there now supports quad types. But leave them disabled for F26. Fix the location of cyr_fetchnews More cleanup and commenting of the spec. Bump to release 6.
This commit is contained in:
parent
20773f689a
commit
77cd74be01
@ -9,7 +9,7 @@
|
||||
|
||||
Name: cyrus-imapd
|
||||
Version: 3.0.1
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
|
||||
%define ssl_pem_file /etc/pki/%name/%name.pem
|
||||
|
||||
@ -26,13 +26,22 @@ License: BSD
|
||||
URL: http://www.cyrusimap.org/
|
||||
Source0: http://www.cyrusimap.org/releases/%name-%version.tar.gz
|
||||
|
||||
# Patches to fix some test suite issues
|
||||
# Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1993
|
||||
Patch0: patch-cyrus-testsuite-endianness
|
||||
Patch1: patch-cyrus-testsuite-endianness2
|
||||
Patch2: patch-cyrus-testsuite-endianness3
|
||||
Patch3: patch-cyrus-testsuite-endianness4
|
||||
Patch4: patch-cyrus-testsuite-timeout
|
||||
Patch5: patch-cyrus-autoreconf-keep-version
|
||||
Patch6: patch-cyrus-fix-endianness-checks
|
||||
Patch4: patch-cyrus-fix-endianness-checks
|
||||
|
||||
# Adapt a timeout to handle our slower builders
|
||||
Patch5: patch-cyrus-testsuite-timeout
|
||||
|
||||
# Upstream https://github.com/cyrusimap/cyrus-imapd/issues/1994
|
||||
Patch6: patch-cyrus-autoreconf-keep-version
|
||||
|
||||
# Upstream https://github.com/cyrusimap/cyrus-imapd/issues/2026
|
||||
Patch7: patch-cyrus-managesieve-linking
|
||||
|
||||
Source10: cyrus-imapd.logrotate
|
||||
Source11: cyrus-imapd.pam-config
|
||||
@ -65,9 +74,18 @@ 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.
|
||||
|
||||
# Prevent cassandane from trying to syslog things
|
||||
Source91: patch-cassandane-no-syslog
|
||||
|
||||
# Tell the annotator script to run as the current user/group
|
||||
# Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1995
|
||||
Source92: patch-cassandane-fix-annotator
|
||||
|
||||
# Change hardcoded names from 'quota' to 'cyr_quota'
|
||||
# Upstream ticket https://github.com/cyrusimap/cassandane/issues/26
|
||||
Source93: patch-cassandane-rename-quota
|
||||
|
||||
# Dependency notes:
|
||||
# * clamav-devel and mariadb-devel removed because they both depend on
|
||||
# compat-openssl.
|
||||
@ -208,6 +226,7 @@ tar xf %SOURCE81
|
||||
|
||||
patch -p1 < %SOURCE91
|
||||
patch -p1 < %SOURCE92
|
||||
patch -p1 < %SOURCE93
|
||||
cp %SOURCE82 cassandane.ini
|
||||
# RF rpm-buildroot-usage
|
||||
sed -i \
|
||||
@ -271,6 +290,7 @@ autoreconf -vi
|
||||
# Fedora needs them. So regenerate them manually.
|
||||
for i in perl/annotator perl/imap perl/sieve/managesieve; do
|
||||
pushd $i
|
||||
rm -f Makefile
|
||||
perl Makefile.PL INSTALLDIRS=vendor # NO_PERLOCAL=1 NO_PACKLIST=1
|
||||
popd
|
||||
done
|
||||
@ -371,9 +391,17 @@ touch %buildroot/%ssl_pem_file
|
||||
|
||||
# Actual binary conflicts
|
||||
# Rename 'fetchnews' binary and manpage to avoid clash with leafnode
|
||||
mv %buildroot/%_sbindir/fetchnews %buildroot/%cyrexecdir/cyr_fetchnews
|
||||
mv %buildroot/%_sbindir/fetchnews %buildroot/%_sbindir/cyr_fetchnews
|
||||
mv %buildroot/%_mandir/man8/fetchnews.8 %buildroot/%_mandir/man8/cyr_fetchnews.8
|
||||
|
||||
# Fix conflict with dump
|
||||
mv %buildroot/%_sbindir/restore %buildroot/%_sbindir/cyr_restore
|
||||
mv %buildroot/%_mandir/man8/restore.8 %buildroot/%_mandir/man8/cyr_restore.8
|
||||
|
||||
# Fix conceptual conflict with quota
|
||||
mv %buildroot/%_sbindir/quota %buildroot/%_sbindir/cyr_quota
|
||||
mv %buildroot/%_mandir/man8/quota.8 %buildroot/%_mandir/man8/cyr_quota.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
|
||||
@ -517,9 +545,19 @@ exclude+=("!Master.maxforkrate")
|
||||
|
||||
%ifarch i686 armv7hl
|
||||
# Some additional failures only on 32-bit machines.
|
||||
# 14 failures are due to Fedora's perl not supporting quad types in unpack.
|
||||
# This is due to be fixed in rawhide soon, so some of these can go away but
|
||||
# only on rawhide, not F26.
|
||||
# Reported upstream as https://github.com/cyrusimap/cassandane/issues/21
|
||||
tests=(
|
||||
Reconstruct.reconstruct_removedfile
|
||||
Reconstruct.reconstruct_truncated
|
||||
Reconstruct.reconstruct_zerouid
|
||||
Quota.reconstruct
|
||||
Quota.reconstruct_orphans
|
||||
)
|
||||
for i in ${tests[@]}; do exclude+=("!$i"); done
|
||||
|
||||
%if 0%{?fedora} <= 26
|
||||
# For F26 and older, 32-bit Perl doesn't support the quad types in unpack. The
|
||||
# following tests use those, and so they fail on those releases.
|
||||
tests=(
|
||||
JMAPContacts.setcontacts_importance_later
|
||||
Metadata.expunge_messages
|
||||
@ -536,14 +574,10 @@ tests=(
|
||||
Metadata.msg_replication_mod_bot_msh
|
||||
Metadata.msg_replication_new_bot_mse_guh
|
||||
Metadata.msg_replication_mod_rep
|
||||
Reconstruct.reconstruct_removedfile
|
||||
Reconstruct.reconstruct_truncated
|
||||
Reconstruct.reconstruct_zerouid
|
||||
Quota.reconstruct
|
||||
Quota.reconstruct_orphans
|
||||
)
|
||||
for i in ${tests[@]}; do exclude+=("!$i"); done
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Add -vvv for too much output
|
||||
./testrunner.pl %{?_smp_mflags} --cleanup -f pretty ${exclude[@]} 2>&1
|
||||
@ -640,6 +674,13 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 15 2017 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.0.1-6
|
||||
- Rename two commands: quota -> cyr_quota, restore -> cyr_restore.
|
||||
- Fix Cassandane to handle those renames.
|
||||
- Fix location of cyr_fetchnews.
|
||||
- Fix Perl 5.26-related module linking issue which caused a test failure.
|
||||
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1461669
|
||||
|
||||
* Tue Jun 06 2017 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.0.1-5
|
||||
- Use proper path to ctl_mboxlist in cron file.
|
||||
- Add patch to increase individual test timeout. Sometimes armv7hl can't
|
||||
|
120
patch-cassandane-rename-quota
Normal file
120
patch-cassandane-rename-quota
Normal file
@ -0,0 +1,120 @@
|
||||
diff --git a/Cassandane/Cyrus/Quota.pm b/Cassandane/Cyrus/Quota.pm
|
||||
index b231eda..893e141 100644
|
||||
--- a/Cassandane/Cyrus/Quota.pm
|
||||
+++ b/Cassandane/Cyrus/Quota.pm
|
||||
@@ -1000,7 +1000,7 @@ sub test_quota_f_unixhs
|
||||
my @data = $self->{instance}->run_command({
|
||||
cyrus => 1,
|
||||
redirects => { stdout => $self->{instance}{basedir} . '/quota.out' },
|
||||
- }, 'quota', '-f');
|
||||
+ }, 'cyr_quota', '-f');
|
||||
|
||||
open(FH, "<", $self->{instance}{basedir} . '/quota.out');
|
||||
local $/ = undef;
|
||||
@@ -1095,7 +1095,7 @@ sub test_quota_f
|
||||
);
|
||||
|
||||
xlog "find and add the quota";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
|
||||
|
||||
xlog "check usages";
|
||||
$self->_check_usages(
|
||||
@@ -1112,7 +1112,7 @@ sub test_quota_f
|
||||
);
|
||||
|
||||
xlog "re-run the quota utility";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
|
||||
|
||||
xlog "check usages";
|
||||
$self->_check_usages(
|
||||
@@ -1165,7 +1165,7 @@ sub test_quota_f_vs_update
|
||||
$self->{instance}->quota_Z_go("$basefolder.a");
|
||||
$self->{instance}->quota_Z_go("$basefolder.b");
|
||||
my (@bits) = $self->{instance}->run_command({ cyrus => 1, background => 1 },
|
||||
- 'quota', '-Z', '-f', $basefolder);
|
||||
+ 'cyr_quota', '-Z', '-f', $basefolder);
|
||||
|
||||
# waiting for quota -f to ensure that
|
||||
# a) the -Z mechanism is working and
|
||||
@@ -1248,14 +1248,14 @@ sub test_quota_f_nested_qr
|
||||
$self->_check_usages(quotaroot => "$inbox.nnn", storage => 0);
|
||||
|
||||
xlog "run quota -f to find and add the quota";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
|
||||
|
||||
xlog "check that STORAGE quota is restored for both roots";
|
||||
$self->_check_usages(quotaroot => $inbox, storage => int($ex1/1024));
|
||||
$self->_check_usages(quotaroot => "$inbox.nnn", storage => int($ex2/1024));
|
||||
|
||||
xlog "run quota -f again";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
|
||||
|
||||
xlog "check that STORAGE quota is still correct for both roots";
|
||||
$self->_check_usages(quotaroot => $inbox, storage => int($ex1/1024));
|
||||
@@ -1330,7 +1330,7 @@ sub test_quota_f_prefix
|
||||
storage => int($exp_baseplus/1024));
|
||||
|
||||
xlog "Run quota -f";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
|
||||
|
||||
xlog "Check that the quotas were unchanged by quota -f";
|
||||
$self->_check_usages(quotaroot => 'user.base',
|
||||
@@ -1353,7 +1353,7 @@ sub test_quota_f_prefix
|
||||
storage => int($bogus_baseplus/1024));
|
||||
|
||||
xlog "Run quota -f with no prefix";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
|
||||
|
||||
xlog "Check that the quotas were all fixed";
|
||||
$self->_check_usages(quotaroot => 'user.base',
|
||||
@@ -1374,7 +1374,7 @@ sub test_quota_f_prefix
|
||||
storage => int($bogus_baseplus/1024));
|
||||
|
||||
xlog "Run quota -f on user.base only";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f', 'user.base');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f', 'user.base');
|
||||
|
||||
xlog "Check that only the user.base and user.baseplus quotas were fixed";
|
||||
$self->_check_usages(quotaroot => 'user.base',
|
||||
@@ -1395,7 +1395,7 @@ sub test_quota_f_prefix
|
||||
storage => int($bogus_baseplus/1024));
|
||||
|
||||
xlog "Run quota -f on user.baseplus only";
|
||||
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f', 'user.baseplus');
|
||||
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f', 'user.baseplus');
|
||||
|
||||
xlog "Check that only the user.baseplus quotas were fixed";
|
||||
$self->_check_usages(quotaroot => 'user.base',
|
||||
@@ -2384,7 +2384,7 @@ sub test_reconstruct
|
||||
'reconstruct', 'user.cassandane');
|
||||
xlog "Running quota -f";
|
||||
$self->{instance}->run_command({ cyrus => 1 },
|
||||
- 'quota', '-f', "user.cassandane");
|
||||
+ 'cyr_quota', '-f', "user.cassandane");
|
||||
|
||||
$talk = $store->get_client();
|
||||
|
||||
@@ -2520,7 +2520,7 @@ sub test_reconstruct_orphans
|
||||
'reconstruct', 'user.cassandane');
|
||||
xlog "Running quota -f";
|
||||
$self->{instance}->run_command({ cyrus => 1 },
|
||||
- 'quota', '-f', "user.cassandane");
|
||||
+ 'cyr_quota', '-f', "user.cassandane");
|
||||
|
||||
$talk = $store->get_client();
|
||||
|
||||
@@ -2566,7 +2566,7 @@ sub test_bug3735
|
||||
$self->{instance}->run_command({
|
||||
cyrus => 1,
|
||||
redirects => { stdout => $filename },
|
||||
- }, 'quota', "user.a");
|
||||
+ }, 'cyr_quota', "user.a");
|
||||
|
||||
open RESULTS, '<', $filename
|
||||
or die "Cannot open $filename for reading: $!";
|
26
patch-cyrus-managesieve-linking
Normal file
26
patch-cyrus-managesieve-linking
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/perl/sieve/managesieve/Makefile.PL b/perl/sieve/managesieve/Makefile.PL
|
||||
index d817ce3..870cb7e 100644
|
||||
--- a/perl/sieve/managesieve/Makefile.PL
|
||||
+++ b/perl/sieve/managesieve/Makefile.PL
|
||||
@@ -69,7 +69,7 @@ WriteMakefile(
|
||||
'ABSTRACT' => 'Cyrus Sieve management interface',
|
||||
'VERSION_FROM' => "../../../perl/sieve/managesieve/managesieve.pm", # finds $VERSION
|
||||
'MYEXTLIB' => '../lib/.libs/libisieve.a ../../../perl/.libs/libcyrus.a ../../../perl/.libs/libcyrus_min.a',
|
||||
- 'LIBS' => ["$LIB_SASL -lssl -lcrypto -lssl -lcrypto -luuid -lz"],
|
||||
+ 'LIBS' => ["$LIB_SASL -lssl -lcrypto -lssl -lcrypto -luuid -lz -lsqlite3 -lpq"],
|
||||
'CCFLAGS' => '',
|
||||
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
|
||||
'INC' => "-I../../../lib -I../../../perl/sieve -I../../../perl/sieve/lib ",
|
||||
diff --git a/perl/sieve/managesieve/Makefile.PL.in b/perl/sieve/managesieve/Makefile.PL.in
|
||||
index 45ae8ea..9fd0b12 100644
|
||||
--- a/perl/sieve/managesieve/Makefile.PL.in
|
||||
+++ b/perl/sieve/managesieve/Makefile.PL.in
|
||||
@@ -69,7 +69,7 @@ WriteMakefile(
|
||||
'ABSTRACT' => 'Cyrus Sieve management interface',
|
||||
'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
|
||||
'MYEXTLIB' => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
|
||||
- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"],
|
||||
+ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ -lsqlite3 -lpq"],
|
||||
'CCFLAGS' => '@GCOV_CFLAGS@',
|
||||
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
|
||||
'INC' => "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",
|
Loading…
Reference in New Issue
Block a user