New version 3.8.0 (rhbz#2169331)

Remove attribute always_inline for buf_len to fix compilation error
Use systemd-sysusers for cyrus user and group (rhbz#2139054)
This commit is contained in:
Martin Osvald 2023-07-21 14:25:48 +02:00
parent e38d276f83
commit 6b9850d1a9
6 changed files with 73 additions and 58 deletions

3
.gitignore vendored
View File

@ -12,4 +12,5 @@
/cyrus-imapd-3.4.4.tar.gz /cyrus-imapd-3.4.4.tar.gz
/cyrus-imapd-3.6.0.tar.gz /cyrus-imapd-3.6.0.tar.gz
/cyrus-imapd-3.6.0.tar.gz.sig /cyrus-imapd-3.6.0.tar.gz.sig
/ellie-pub.key /cyrus-imapd-3.8.0.tar.gz
/cyrus-imapd-3.8.0.tar.gz.sig

View File

@ -7,8 +7,8 @@
%bcond_with cassandane %bcond_with cassandane
Name: cyrus-imapd Name: cyrus-imapd
Version: 3.6.0 Version: 3.8.0
Release: 9%{?dist} Release: 1%{?dist}
%define ssl_pem_file_prefix /etc/pki/%name/%name %define ssl_pem_file_prefix /etc/pki/%name/%name
@ -29,28 +29,6 @@ URL: http://www.cyrusimap.org/
Source0: https://github.com/cyrusimap/cyrus-imapd/releases/download/cyrus-imapd-%version/cyrus-imapd-%version.tar.gz Source0: https://github.com/cyrusimap/cyrus-imapd/releases/download/cyrus-imapd-%version/cyrus-imapd-%version.tar.gz
Source1: https://github.com/cyrusimap/cyrus-imapd/releases/download/cyrus-imapd-%version/cyrus-imapd-%version.tar.gz.sig Source1: https://github.com/cyrusimap/cyrus-imapd/releases/download/cyrus-imapd-%version/cyrus-imapd-%version.tar.gz.sig
Source2: ellie-pub.key Source2: ellie-pub.key
# Adapt a timeout to handle our slower builders
Patch0: patch-cyrus-testsuite-timeout
# Fedora-specific patch for the default configuration file
Patch1: patch-cyrus-default-configs
# We rename quota to cyr_quota to avoid a conflict with /usr/bin/quota; one
# place in the source must be patched to match.
Patch2: patch-cyrus-rename-quota
# Workaround for some compiled Perl modules not being linked against
# libpcreposix, which causes them to fail to load.
# https://bugzilla.redhat.com/show_bug.cgi?id=1668723
# https://github.com/cyrusimap/cyrus-imapd/issues/2629#issuecomment-456925909
Patch3: patch-cyrus-perl-linking
# https://github.com/cyrusimap/cyrus-imapd/pull/3892
Patch4: patch-cyrus-squatter-assert-crash
Source10: cyrus-imapd.logrotate Source10: cyrus-imapd.logrotate
Source11: cyrus-imapd.pam-config Source11: cyrus-imapd.pam-config
Source12: cyrus-imapd.sysconfig Source12: cyrus-imapd.sysconfig
@ -61,37 +39,50 @@ Source15: README.rpm
Source16: cyrus-imapd.service Source16: cyrus-imapd.service
Source17: cyrus-imapd-init.service Source17: cyrus-imapd-init.service
Source18: cyrus-imapd.tmpfiles.conf Source18: cyrus-imapd.tmpfiles.conf
Source19: cyrus-imapd.sysusers
%if %{with cassandane}
# Source files for running the Cassandane test suite at build time. # Source files for running the Cassandane test suite at build time.
Source80: https://github.com/brong/Net-CalDAVTalk/archive/%{testdata_commit}/cassandane-testdata-%{testdata_short}.tar.gz Source80: https://github.com/brong/Net-CalDAVTalk/archive/%{testdata_commit}/cassandane-testdata-%{testdata_short}.tar.gz
# A template config file for cassandane; we will substitute in varions values. # A template config file for cassandane; we will substitute in varions values.
Source81: cassandane.ini Source81: cassandane.ini
# These are source files and not patches because you can't use autosetup to # These are source files and not patches because you can't use autosetup to
# apply patches to secondary unpacked source files. # apply patches to secondary unpacked source files.
# Prevent cassandane from trying to syslog things # Prevent cassandane from trying to syslog things
Source91: patch-cassandane-no-syslog Source91: patch-cassandane-no-syslog
# Tell the annotator script to run as the current user/group # Tell the annotator script to run as the current user/group
# Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1995 # Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1995
Source92: patch-cassandane-fix-annotator Source92: patch-cassandane-fix-annotator
# TODO libexec/cyrus-imapd path element got into upstream: # TODO libexec/cyrus-imapd path element got into upstream:
# https://github.com/cyrusimap/cyrus-imapd/commit/9233f70bf7a2872ab0b456ea294ce36e0e01e182 # https://github.com/cyrusimap/cyrus-imapd/commit/9233f70bf7a2872ab0b456ea294ce36e0e01e182
# try to get fixed the below upstream to work on Fedora: # try to get fixed the below upstream to work on Fedora:
# https://github.com/cyrusimap/cyrus-imapd/commit/f10eee167313418d84e63d215310477d4fe68e94 # https://github.com/cyrusimap/cyrus-imapd/commit/f10eee167313418d84e63d215310477d4fe68e94
Source93: patch-cassandane-xapian-delve-path Source93: patch-cassandane-xapian-delve-path
%endif
# Adapt a timeout to handle our slower builders
Patch0: patch-cyrus-testsuite-timeout
# Fedora-specific patch for the default configuration file
Patch1: patch-cyrus-default-configs
# We rename quota to cyr_quota to avoid a conflict with /usr/bin/quota; one
# place in the source must be patched to match.
Patch2: patch-cyrus-rename-quota
# Workaround for some compiled Perl modules not being linked against
# libpcreposix, which causes them to fail to load.
# https://bugzilla.redhat.com/show_bug.cgi?id=1668723
# https://github.com/cyrusimap/cyrus-imapd/issues/2629#issuecomment-456925909
Patch3: patch-cyrus-perl-linking
# Remove attribute always_inline to fix compilation error:
# https://bugzilla.redhat.com/show_bug.cgi?id=2223951
# TODO: report upstream with patch
Patch4: patch-cyrus-remove-always-inline-for-buf-len
BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en
BuildRequires: groff libtool make pkgconfig rsync systemd transfig BuildRequires: groff libtool make pkgconfig rsync systemd transfig
BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker)
BuildRequires: perl(Pod::Html) BuildRequires: perl(Pod::Html)
%if 0%{?fedora} && 0%{?fedora} >= 0 %if 0%{?fedora} && 0%{?fedora} >= 0
BuildRequires: clamav-devel shapelib-devel BuildRequires: clamav-devel shapelib-devel
%endif %endif
@ -104,6 +95,8 @@ BuildRequires: sqlite-devel xapian-core-devel
# Miscellaneous modules needed for 'make check' to function: # Miscellaneous modules needed for 'make check' to function:
BuildRequires: cyrus-sasl-plain cyrus-sasl-md5 BuildRequires: cyrus-sasl-plain cyrus-sasl-md5
BuildRequires: systemd-rpm-macros
%if %{with cassandane} %if %{with cassandane}
# Additional packages required for cassandane to function # Additional packages required for cassandane to function
BuildRequires: imaptest net-tools words BuildRequires: imaptest net-tools words
@ -140,12 +133,14 @@ BuildRequires: perl(HTTP::Daemon) perl(DBI) perl(Net::LDAP::Constant)
BuildRequires: perl(Net::LDAP::Server) BuildRequires: perl(Net::LDAP::Server)
BuildRequires: perl(Module::Load::Conditional) BuildRequires: perl(Module::Load::Conditional)
BuildRequires: cpan cld2-devel BuildRequires: cpan cld2-devel
BuildRequires: perl(Plack::Loader) perl(Test::TCP) perl(Data::GUID) perl(Digest::CRC) perl(Moo) perl(Types::Standard)
# These were only for JMAP-Tester # These were only for JMAP-Tester
# perl(Moo), perl(Moose), perl(MooseX::Role::Parameterized) perl(Throwable), perl(Safe::Isa) # perl(Moo), perl(Moose), perl(MooseX::Role::Parameterized) perl(Throwable), perl(Safe::Isa)
%endif %endif
Requires(pre): shadow-utils Requires(pre): shadow-utils
%{?sysusers_requires_compat}
%{?systemd_requires} %{?systemd_requires}
Requires: %name-utils = %version-%release Requires: %name-utils = %version-%release
@ -175,7 +170,6 @@ concurrent read/write connections to the same mailbox are permitted. The server
supports access control lists on mailboxes and storage quotas on mailbox supports access control lists on mailboxes and storage quotas on mailbox
hierarchies. hierarchies.
%package devel %package devel
Summary: Cyrus IMAP server development files Summary: Cyrus IMAP server development files
Requires: %name%{?_isa} = %version-%release Requires: %name%{?_isa} = %version-%release
@ -185,7 +179,6 @@ Requires: pkgconfig
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. necessary for developing applications which use the imclient library.
%package doc-extra %package doc-extra
Summary: Extra documentation for the Cyrus IMAP server Summary: Extra documentation for the Cyrus IMAP server
BuildArch: noarch BuildArch: noarch
@ -195,7 +188,6 @@ 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 as some legacy and internal documentation not useful for normal operation of
the server. the server.
%package libs %package libs
Summary: Runtime libraries for cyrus-imapd Summary: Runtime libraries for cyrus-imapd
@ -203,7 +195,6 @@ Summary: Runtime libraries for cyrus-imapd
The cyrus-imapd-libs package contains libraries shared by the Cyrus IMAP server The cyrus-imapd-libs package contains libraries shared by the Cyrus IMAP server
and the its utilities. and the its utilities.
%package utils %package utils
Summary: Cyrus IMAP server administration utilities Summary: Cyrus IMAP server administration utilities
Requires: cyrus-imapd = %{version}-%{release} Requires: cyrus-imapd = %{version}-%{release}
@ -213,7 +204,6 @@ The cyrus-imapd-utils package contains administrative tools for the
Cyrus IMAP server. It can be installed on systems other than the Cyrus IMAP server. It can be installed on systems other than the
one running the server. one running the server.
%package virusscan %package virusscan
Summary: Cyrus virus scanning utility Summary: Cyrus virus scanning utility
@ -225,14 +215,12 @@ the clamav suite don't have to.
Install this package if you wish to use the internal cyrus virus scanning Install this package if you wish to use the internal cyrus virus scanning
utility. utility.
%package -n perl-Cyrus %package -n perl-Cyrus
Summary: Perl libraries for interfacing with Cyrus IMAPd Summary: Perl libraries for interfacing with Cyrus IMAPd
%description -n perl-Cyrus %description -n perl-Cyrus
This package contains Perl libraries used to interface with Cyrus IMAPd. This package contains Perl libraries used to interface with Cyrus IMAPd.
%prep %prep
%if 0%{?fedora} %if 0%{?fedora}
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
@ -298,7 +286,6 @@ sed -i \
# cyrus-imapd-*/tools/mkimap - fixed # cyrus-imapd-*/tools/mkimap - fixed
# cyrus-imapd-*/tools/translatesieve - still contains shabang # cyrus-imapd-*/tools/translatesieve - still contains shabang
%build %build
%if %{with cassandane} %if %{with cassandane}
# This module is not available in Fedora: # This module is not available in Fedora:
@ -376,7 +363,6 @@ done
# This isn't built by default, but this package has always installed it. # This isn't built by default, but this package has always installed it.
make notifyd/notifytest make notifyd/notifytest
%install %install
make install DESTDIR=%buildroot make install DESTDIR=%buildroot
@ -427,6 +413,8 @@ install -p -m 644 doc/examples/imapd_conf/normal.conf %buildroot/etc/imapd.conf
install -p -D -m 644 %SOURCE16 %buildroot/%_unitdir/cyrus-imapd.service install -p -D -m 644 %SOURCE16 %buildroot/%_unitdir/cyrus-imapd.service
install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd-init.service install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd-init.service
install -p -D -m 644 %SOURCE18 %buildroot/%_tmpfilesdir/cyrus-imapd.conf install -p -D -m 644 %SOURCE18 %buildroot/%_tmpfilesdir/cyrus-imapd.conf
# systemd-sysusers
install -p -D -m 644 %{SOURCE19} %{buildroot}%{_sysusersdir}/cyrus-imapd.conf
# Cleanup of doc dir # Cleanup of doc dir
find doc perl -name CVS -type d -prune -exec rm -rf {} \; find doc perl -name CVS -type d -prune -exec rm -rf {} \;
@ -502,7 +490,6 @@ find %buildroot -name ".packlist" -exec rm {} \;
# And this one gets installed with executable permission # And this one gets installed with executable permission
chmod -x %buildroot/%perl_vendorlib/Cyrus/Annotator/Daemon.pm chmod -x %buildroot/%perl_vendorlib/Cyrus/Annotator/Daemon.pm
%check %check
export LD_LIBRARY_PATH=%buildroot/%_libdir export LD_LIBRARY_PATH=%buildroot/%_libdir
@ -586,12 +573,8 @@ exclude+=("!Master.maxforkrate")
# Add -vvv for too much output # Add -vvv for too much output
./testrunner.pl %{?_smp_mflags} -v -f pretty ${exclude[@]} 2>&1 ./testrunner.pl %{?_smp_mflags} -v -f pretty ${exclude[@]} 2>&1
%pre %pre
# Create 'cyrus' user on target host %sysusers_create_compat %{SOURCE19}
getent group saslauth >/dev/null || /usr/sbin/groupadd -g %gid -r saslauth
getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /var/lib/imap -g %cyrusgroup \
-G saslauth -s /sbin/nologin -u %uid -r %cyrususer
%post %post
%systemd_post cyrus-imapd.service %systemd_post cyrus-imapd.service
@ -602,7 +585,6 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%postun %postun
%systemd_postun_with_restart cyrus-imapd.service %systemd_postun_with_restart cyrus-imapd.service
%files %files
%doc README.md doc/README.* doc/examples doc/text %doc README.md doc/README.* doc/examples doc/text
@ -617,7 +599,6 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
# RF hardcoded-library-path in /usr/lib/cyrus-imapd # RF hardcoded-library-path in /usr/lib/cyrus-imapd
/usr/lib/cyrus-imapd/ /usr/lib/cyrus-imapd/
%dir /etc/pki/cyrus-imapd %dir /etc/pki/cyrus-imapd
%attr(0644,root,%cyrusgroup) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %ssl_pem_file_prefix-ca.pem %attr(0644,root,%cyrusgroup) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %ssl_pem_file_prefix-ca.pem
%attr(0644,root,%cyrusgroup) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %ssl_pem_file_prefix.pem %attr(0644,root,%cyrusgroup) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %ssl_pem_file_prefix.pem
@ -633,6 +614,7 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%_unitdir/cyrus-imapd.service %_unitdir/cyrus-imapd.service
%_unitdir/cyrus-imapd-init.service %_unitdir/cyrus-imapd-init.service
%_tmpfilesdir/cyrus-imapd.conf %_tmpfilesdir/cyrus-imapd.conf
%{_sysusersdir}/cyrus-imapd.conf
%dir %cyrexecdir/ %dir %cyrexecdir/
%cyrexecdir/[a-uw-z]* %cyrexecdir/[a-uw-z]*
@ -665,33 +647,27 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%attr(0700,%cyrususer,%cyrusgroup) /run/cyrus/proc/ %attr(0700,%cyrususer,%cyrusgroup) /run/cyrus/proc/
%attr(0750,%cyrususer,%cyrusgroup) /run/cyrus/socket/ %attr(0750,%cyrususer,%cyrusgroup) /run/cyrus/socket/
%files devel %files devel
%_includedir/cyrus/ %_includedir/cyrus/
%_libdir/libcyrus*.so %_libdir/libcyrus*.so
%_libdir/pkgconfig/*.pc %_libdir/pkgconfig/*.pc
%_mandir/man3/imclient.3* %_mandir/man3/imclient.3*
%files doc-extra %files doc-extra
%doc doc/html doc/internal doc/legacy %doc doc/html doc/internal doc/legacy
%files libs %files libs
%license COPYING %license COPYING
%_libdir/libcyrus*.so.* %_libdir/libcyrus*.so.*
%files utils %files utils
%{_bindir}/* %{_bindir}/*
%_mandir/man1/* %_mandir/man1/*
%files virusscan %files virusscan
%_sbindir/cyr_virusscan %_sbindir/cyr_virusscan
%_mandir/man8/cyr_virusscan.8* %_mandir/man8/cyr_virusscan.8*
%files -n perl-Cyrus %files -n perl-Cyrus
%license COPYING %license COPYING
%doc perl/imap/README %doc perl/imap/README
@ -702,8 +678,12 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%perl_vendorlib/Cyrus %perl_vendorlib/Cyrus
%_mandir/man3/*.3pm* %_mandir/man3/*.3pm*
%changelog %changelog
* Thu Jul 20 2023 Martin Osvald <mosvald@redhat.com> - 3.8.0-1
- New version 3.8.0 (rhbz#2169331)
- Remove attribute always_inline for buf_len to fix compilation error
- Use systemd-sysusers for cyrus user and group (rhbz#2139054)
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-9 * Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

5
cyrus-imapd.sysusers Normal file
View File

@ -0,0 +1,5 @@
#Type Name ID GECOS Home directory Shell
g saslauth 76
g mail 12
u cyrus 76:mail "Cyrus IMAP Server" /var/lib/imap /sbin/nologin
m cyrus saslauth

17
ellie-pub.key Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFU5pZUBCAC+m05W9nJnBkrfFO9I+iimF1WCsSZNFoASJ3WEeZxIkOQO9BZj
aKf8EP/nK7nEfNGZ2m+OrAtQU/+I8Sk1ppHuwZgENLvRzLsBGbv80kDKBw31Nd1f
sCpVQs4b8zlohXjq0UN8tT5NcGJnGE7ahoOHzJk/0Ll76oVmOZvSw+WHBp1945m2
Q8CbIbfmyuv7NF6GtGDVilPeIPsDnh5w5usjpKsxjYHKpy6Rtf4MbcCLtkRbHFra
KJD+xum0PgPdCAEEbQsSXQgwOd0TZ59avRVVef674PjWqIuudUGUhJ/f9OWOj7LG
6QgJR6yvCy7Bc2eAN4RnIIzaUZGaJDKDCNozABEBAAG0ImVsbGllIHRpbW9uZXkg
PGVsbGllQGZhc3RtYWlsLmNvbT6JATgEEwECACIFAlU5pZUCGwMGCwkIBwMCBhUI
AgkKCwQWAgMBAh4BAheAAAoJEFVPBP6zY3jgb9gH/3GPDLGybo7SYZMtBmfe+Udf
tcRkTtH+o2pf2rh6KwPhhEDuOXWVCIUPWXsWIVU2K5Y8AdBIHOEoSUp3n8juV57I
u9CfDI718/WaHgEpYrq5DqyROAFr+sGahcb6C40+V/CeUSAmKVhFGniuALUSAQ+B
XVj/i2EAFNg/5ALkPYDnDYDqm7Ak6odDbktYQz987y38sg3EMC/2wi2EoOG1VWeG
twFD8HKmXZw+u6cYtFh9K1hOBZm+PhLHr3h1MHTuWYeBKkT3YqaGtXMwi704LlNr
HU8beOHSNBSsVYJ61B4kgBA7p+qnx6xIpU2KfAJl8cgjCYwrq8yo+Lm9TazagfM=
=dIwC
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -0,0 +1,13 @@
diff --git a/lib/util.c b/lib/util.c
index a2eae15..ef8c25b 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -1188,7 +1188,7 @@ EXPORTED int buf_getline(struct buf *buf, FILE *fp)
#ifdef HAVE_DECLARE_OPTIMIZE
EXPORTED inline size_t buf_len(const struct buf *buf)
- __attribute__((always_inline, optimize("-O3")));
+ __attribute__((optimize("-O3")));
#endif
EXPORTED inline size_t buf_len(const struct buf *buf)
{

View File

@ -1,4 +1,3 @@
SHA512 (cyrus-imapd-3.6.0.tar.gz) = d2b21117e7d0dd93212a43ca42098dc8b59613cb45ed2287d381c8c363026ac29386dfd90f07fa2ce8a77f56dddd19f2cc5b80d9c60c400d65cbb1d52a8db93c SHA512 (cyrus-imapd-3.8.0.tar.gz) = e218639447c56a3608a1d02fbe23033fd38b8805fe672771e5e92477168d877374d0b7cbfaa3b6fcb1272c54f2b791729e24e20c16fb984675ac0632c2fc2073
SHA512 (cyrus-imapd-3.6.0.tar.gz.sig) = 190cc2f1ec43ccd18500855346249dbb1aca834ced862dc601c7c5fd91e3f161a633166969da48b1c185e690b02c6e8c55e2cca06bf4e9bc0c110f2e086bdf5d SHA512 (cyrus-imapd-3.8.0.tar.gz.sig) = 7fb7fa9cb1fd1ab73e2699f35f5237fade8eb64fb444cef190def223769cc705d7eb353a352c3d569bf5c18769e849d6a5142bf84fb7229d7575a1b012e8d611
SHA512 (cassandane-testdata-ca669d4b.tar.gz) = c153ab0a57d04d9deeabc5ef724eaecc05030c23b170abaa44eaea2e7df409efcdeb24871f7896759e85d64193fb9f289a470b0af9a593a740ffcc45c80033ff SHA512 (cassandane-testdata-ca669d4b.tar.gz) = c153ab0a57d04d9deeabc5ef724eaecc05030c23b170abaa44eaea2e7df409efcdeb24871f7896759e85d64193fb9f289a470b0af9a593a740ffcc45c80033ff
SHA512 (ellie-pub.key) = af6e01f004d57c3f68106a572a62ba8b340d5158e2877c27343bbbab32c23b6df5c4e88ac883dc64388aff276d4c317821ddf90c213a88a295a8e69be781c01c