libcyrus-imapd-devel: provide/obsolete cyrus-imapd-devel [release 3.2.4-2mamba;Mon Dec 14 2020]

This commit is contained in:
Silvan Calarco 2024-01-05 21:37:39 +01:00
parent b97aa62a6a
commit 493048d49b
5 changed files with 235 additions and 86 deletions

View File

@ -0,0 +1,47 @@
--- cyrus-imapd-2.5.16/lib/cyrusdb_berkeley.c.orig 2020-12-13 20:54:41.613236660 +0100
+++ cyrus-imapd-2.5.16/lib/cyrusdb_berkeley.c 2020-12-13 20:55:11.088806587 +0100
@@ -456,7 +456,7 @@
return r;
}
-static int gettid(struct txn **mytid, DB_TXN **tid, const char *where)
+static int mygettid(struct txn **mytid, DB_TXN **tid, const char *where)
{
int r;
@@ -499,7 +499,7 @@
if (data) *data = NULL;
if (datalen) *datalen = 0;
- r = gettid(mytid, &tid, "myfetch");
+ r = mygettid(mytid, &tid, "myfetch");
if (r) return r;
memset(&k, 0, sizeof(k));
@@ -594,7 +594,7 @@
/* k.flags |= DB_DBT_REALLOC;
d.flags |= DB_DBT_REALLOC;*/
- r = gettid(mytid, &tid, "foreach");
+ r = mygettid(mytid, &tid, "foreach");
if (r) return r;
if (0) {
@@ -739,7 +739,7 @@
if (!data)
datalen = 0;
- r = gettid(mytid, &tid, "mystore");
+ r = mygettid(mytid, &tid, "mystore");
if (r) return r;
memset(&k, 0, sizeof(k));
@@ -852,7 +852,7 @@
assert(dbinit && db);
assert(key && keylen);
- r = gettid(mytid, &tid, "delete");
+ r = mygettid(mytid, &tid, "delete");
if (r) return r;
memset(&k, 0, sizeof(k));

12
cyrus-imapd.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Cyrus IMAP mail server
After=network.target
[Service]
Type=simple
Restart=on-failure
ExecStart=@LIBEXECDIR@/cyrus/master
ExecReload=/usr/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@ -1,42 +1,71 @@
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) %define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: cyrus-imapd Name: cyrus-imapd
Version: 2.4.17 Version: 3.2.4
Release: 2mamba Release: 2mamba
Summary: An IMAP server Summary: An IMAP server
Group: System/Servers Group: System/Servers
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://cyrusimap.org URL: http://www.cyrusimap.org/
Source0: ftp://ftp.cyrusimap.org/cyrus-imapd/cyrus-imapd-%{version}.tar.gz Source0: https://github.com/cyrusimap/cyrus-imapd.git/cyrus-imapd-%{version}/cyrus-imapd-%{version}.tar.bz2
Source1: imapd-conf Source1: imapd-conf
Source2: imapd-initscript Source2: imapd-initscript
Source3: imap-pam Source3: imap-pam
Patch: %{name}-2.2.12-gcc4.patch Source4: cyrus-imapd.service
Source5: cyrus-imapd.tmpfiles.conf
Source6: cyrus-imapd.sysusers.conf
Patch0: %{name}-2.2.12-gcc4.patch
Patch1: cyrus-imapd-2.5.16-conflicting-types-gettid.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libdb47-devel BuildRequires: ldconfig
BuildRequires: libbrotli-devel
BuildRequires: libbzip2-devel
BuildRequires: libcap-devel
BuildRequires: libclamav-devel
BuildRequires: libe2fs-devel BuildRequires: libe2fs-devel
BuildRequires: libfl-devel BuildRequires: libgcc
BuildRequires: libical-devel
BuildRequires: libicu-devel
BuildRequires: libjansson-devel
BuildRequires: libjson-c-devel
BuildRequires: libkrb5-devel BuildRequires: libkrb5-devel
BuildRequires: libnetsnmp-devel BuildRequires: libltdl-devel
BuildRequires: libnl1-devel BuildRequires: liblzma-devel
BuildRequires: libmariadb-devel
BuildRequires: libnghttp2-devel
BuildRequires: libnsl-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: libpci-devel
BuildRequires: libpcre-devel BuildRequires: libpcre-devel
BuildRequires: libpcre2-devel
BuildRequires: libperl BuildRequires: libperl
BuildRequires: libsasl-devel BuildRequires: libpostgresql-devel
BuildRequires: libsasl2-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libtirpc-devel
BuildRequires: libuuid-devel
BuildRequires: libwrap-devel BuildRequires: libwrap-devel
BuildRequires: libxapian-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel BuildRequires: libz-devel
BuildRequires: libzstd-devel
BuildRequires: perl-JSON
BuildRequires: perl-Net-Server
BuildRequires: perl-URI
BuildRequires: perl-Unix-Syslog
BuildRequires: perl-devel BuildRequires: perl-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: perl-devel >= %{perl_major_ver} BuildRequires: perl-devel >= %{perl_major_ver}
BuildRequires: libnetsnmp-devel >= 5.9
BuildRequires: net-snmp BuildRequires: net-snmp
BuildRequires: bison BuildRequires: bison
BuildRequires: flex BuildRequires: flex
#Requires: libdb2 >= 2.7.7, libkrb5 >= 1.3.6 Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
@ -49,38 +78,68 @@ All user access to mail is through the IMAP, POP3, or KPOP protocols.
Summary: Perl module for Cyrus IMAP Summary: Perl module for Cyrus IMAP
Group: Development/Libraries/Perl Group: Development/Libraries/Perl
Requires: perl >= %{perl_major_ver} Requires: perl >= %{perl_major_ver}
#Requires: libdb2 >= 2.7.7 Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n perl-Imap %description -n perl-Imap
A Perl module for Cyrus IMAP. A Perl module for Cyrus IMAP.
%package devel %package -n lib%{name}
Summary: Shared libraries provided by Cyrus IMAP
Group: System/Libraries
%description -n lib%{name}
Shared libraries provided by Cyrus IMAP.
%package -n lib%{name}-devel
Summary: Devel package for Cyrus IMAP Summary: Devel package for Cyrus IMAP
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: cyrus-imapd-devel
Obsoletes: cyrus-imapd-devel <= 2.4.17
%description devel %description -n lib%{name}-devel
IMAP (Internet Message Access Protocol) is an Internet standards-track protocol for accessing messages (mail, bboards, news, etc). Development headers and libraries for Cyrus IMAP.
The Cyrus IMAP server differs from other IMAP server implementations in that it is generally intended to be run on sealed servers, where normal users are not permitted to log in.
The mailbox database is stored in parts of the filesystem that are private to the Cyrus IMAP system.
All user access to mail is through the IMAP, POP3, or KPOP protocols.
Devel package for Cyrus IMAP. %debug_package
%prep %prep
%setup -q %setup -q
#%patch1 -p1
autoreconf -f -i
%build %build
export PERL_MM_OPT="NO_PACKLIST=true NO_PERLLOCAL=true"
%configure \ %configure \
--with-cyrus-prefix=%{_libexecdir}/cyrus \ --libexecdir=%{_libexecdir}/cyrus \
--with-bdb-incdir=%{_includedir}/db51 \ --with-bdb=db-5.3 \
--with-bdb-incdir=%{_includedir}/db53 \
--with-bdb-libdir=%{_libdir}/ \
--with-cyrus-user=imap \ --with-cyrus-user=imap \
--with-cyrus-group=imap \ --with-cyrus-group=imap \
--with-bdb=db-5.1 --enable-xapian \
--enable-autocreate \
--enable-idled \
--enable-nntp \
--enable-murder \
--enable-http \
--enable-calalarmd \
--enable-jmap \
--enable-replication \
--enable-backup \
--with-mysql=yes \
--with-pgsql=yes \
--with-ldap \
--with-libcap \
--with-pidfile=/run/cyrus-master.pid \
--with-syslogfacility=MAIL
sed -i 's|Makefile.PL PREFIX=\$(prefix)|Makefile.PL|' perl/Makefile #sed -i 's|Makefile.PL PREFIX=\$(prefix)|Makefile.PL|' perl/Makefile
sed -i 's|Makefile.PL PREFIX=\$(prefix)|Makefile.PL|' perl/sieve/Makefile #sed -i 's|Makefile.PL PREFIX=\$(prefix)|Makefile.PL|' perl/sieve/Makefile
%make -j1 %make
#-j1
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -89,12 +148,16 @@ sed -i "s|/usr/man|/var/tmp/perl-root/usr/share/man|" perl/imap/Makefile
%makeinstall %makeinstall
install -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/imapd.conf install -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/imapd.conf
install -m 755 -D %{SOURCE2} %{buildroot}%{_initrddir}/imapd
install -m 644 -D %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/imap install -m 644 -D %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/imap
install -m 644 -D %{SOURCE4} %{buildroot}%{_unitdir}/cyrus-imapd.service
install -m 644 -D %{SOURCE5} %{buildroot}%{_tmpfilesdir}/cyrus-imapd.conf
install -m 644 -D %{SOURCE6} %{buildroot}%{_sysusersdir}/cyrus-imapd.conf
install -m 644 master/conf/normal.conf %{buildroot}%{_sysconfdir}/cyrus.conf sed -i "s|@LIBEXECDIR@|%{_libexecdir}|" %{buildroot}%{_unitdir}/cyrus-imapd.service
cp tools/mkimap %{buildroot}%{_libexecdir}/cyrus/bin #install -m 644 master/conf/normal.conf %{buildroot}%{_sysconfdir}/cyrus.conf
cp tools/mkimap %{buildroot}%{_libexecdir}/cyrus/
install -d %{buildroot}/var/imap install -d %{buildroot}/var/imap
install -d %{buildroot}/var/spool/imap install -d %{buildroot}/var/spool/imap
@ -102,99 +165,119 @@ install -d %{buildroot}/var/spool/imap
%define PERL_ARCHLIB %(eval `perl -V:archlib`; echo $archlib) %define PERL_ARCHLIB %(eval `perl -V:archlib`; echo $archlib)
%define PERL_SITEARCH %(eval `perl -V:sitearch`; echo $sitearch) %define PERL_SITEARCH %(eval `perl -V:sitearch`; echo $sitearch)
rm -f %{buildroot}%{PERL_ARCHLIB}/perllocal.pod #rm -f %{buildroot}%{PERL_ARCHLIB}/perllocal.pod
#
#cat %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/IMAP/.packlist \
# %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/SIEVE/managesieve/.packlist | \
# sed "s@%{buildroot}@@g;s@.*/man/.*@&.gz@g" | \
# sort -u > perl.packlist
cat %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/IMAP/.packlist \ find %{buildroot}%{PERL_SITEARCH}/auto/Cyrus -type f -exec chmod 755 {} \;
%{buildroot}%{PERL_SITEARCH}/auto/Cyrus/SIEVE/managesieve/.packlist | \
sed "s@%{buildroot}@@g;s@.*/man/.*@&.gz@g" | \
sort -u > perl.packlist
rm %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/IMAP/.packlist
rm %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/SIEVE/managesieve/.packlist
# conflicting with postfix # conflicting with postfix
mv %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/master-imapd.8 mv %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/master-imapd.8
# conflicting with apache
mv %{buildroot}%{_mandir}/man8/httpd.8 %{buildroot}%{_mandir}/man8/httpd-imapd.8
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -f perl_Imap.filelist rm -f perl_Imap.filelist
%pre %pre
# new install %sysusers_create_package cyrus-imapd %{SOURCE6}
if [ $1 -eq 1 ]; then %tmpfiles_create_package cyrus-imapd %{SOURCE5}
/usr/sbin/groupadd imap :
/usr/sbin/useradd -u 64910 -g imap -d /sbin/false imap -s /bin/false
fi
exit 0
%post %post
# new install # new install
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
/usr/libexec/cyrus/bin/mkimap %{_libexecdir}/cyrus/bin/mkimap
/bin/chown -R imap.imap /var/imap/* /bin/chown -R imap.imap /var/imap/*
/bin/chown -R imap.imap /var/spool/imap/* /bin/chown -R imap.imap /var/spool/imap/*
/sbin/chkconfig --add imapd
service imapd start
fi fi
exit 0 %systemd_post cyrus-imapd
:
%preun %preun
# erase %systemd_preun cyrus-imapd
if [ $1 -eq 0 ]; then :
service imapd stop
/sbin/chkconfig --del imapd
/usr/sbin/userdel imap 2>/dev/null
/usr/sbin/groupdel imap 2>/dev/null
fi
exit 0
%postun %postun
# upgrade %systemd_postun cyrus-imapd
if [ $1 -eq 1 ]; then :
service imapd restart
fi
exit 0
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/imapd.conf %config(noreplace) %{_sysconfdir}/imapd.conf
%config(noreplace) %{_sysconfdir}/cyrus.conf #%config(noreplace) %{_sysconfdir}/cyrus.conf
%config(noreplace) %{_sysconfdir}/pam.d/imap %config(noreplace) %{_sysconfdir}/pam.d/imap
%attr(0755,root,root) %{_initrddir}/imapd %{_bindir}/*
%{_bindir}/imtest %{_sbindir}/*
%{_bindir}/installsieve
%{_bindir}/lmtptest
%{_bindir}/mupdatetest
%{_bindir}/nntptest
%{_bindir}/pop3test
%{_bindir}/sieveshell
%{_bindir}/sivtest
%{_bindir}/smtptest
%{_bindir}/synctest
%{_libexecdir}/cyrus/* %{_libexecdir}/cyrus/*
%{_mandir}/man1/imtest.1.gz %{_unitdir}/cyrus-imapd.service
%{_mandir}/man1/installsieve.1.gz %{_tmpfilesdir}/cyrus-imapd.conf
%{_mandir}/man1/lmtptest.1.gz %{_sysusersdir}/cyrus-imapd.conf
%{_mandir}/man1/mupdatetest.1.gz %{_mandir}/man1/cyradm.1*
%{_mandir}/man1/nntptest.1.gz %{_mandir}/man1/httptest.1*
%{_mandir}/man1/pop3test.1.gz %{_mandir}/man1/imtest.1*
%{_mandir}/man1/sieveshell.1.gz %{_mandir}/man1/installsieve.1*
%{_mandir}/man1/sivtest.1.gz %{_mandir}/man1/lmtptest.1*
%{_mandir}/man1/smtptest.1.gz %{_mandir}/man1/mupdatetest.1*
%{_mandir}/man3/imclient.3.gz %{_mandir}/man1/nntptest.1*
%{_mandir}/man1/pop3test.1*
%{_mandir}/man1/sieveshell.1*
%{_mandir}/man1/sivtest.1*
%{_mandir}/man1/smtptest.1*
%{_mandir}/man3/imclient.3*
%{_mandir}/man5/* %{_mandir}/man5/*
%{_mandir}/man8/* %{_mandir}/man8/*
%dir %attr(0750,imap,imap) %{_localstatedir}/imap %dir %attr(0750,imap,imap) %{_localstatedir}/imap
%dir %attr(0750,imap,imap) %{_localstatedir}/spool/imap %dir %attr(0750,imap,imap) %{_localstatedir}/spool/imap
%files devel %files -n lib%{name}
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/* %{_libdir}/libcyrus.so.*
%{_libdir}/*.a %{_libdir}/libcyrus_imap.so.*
%{_libdir}/libcyrus_min.so.*
%{_libdir}/libcyrus_sieve.so.*
%files -n perl-Imap -f perl.packlist %files -n lib%{name}-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/cyrus
%{_includedir}/cyrus/*
%{_libdir}/libcyrus.la
%{_libdir}/libcyrus.so
%{_libdir}/libcyrus_imap.la
%{_libdir}/libcyrus_imap.so
%{_libdir}/libcyrus_min.la
%{_libdir}/libcyrus_min.so
%{_libdir}/libcyrus_sieve.la
%{_libdir}/libcyrus_sieve.so
%{_libdir}/pkgconfig/libcyrus.pc
%{_libdir}/pkgconfig/libcyrus_imap.pc
%{_libdir}/pkgconfig/libcyrus_min.pc
%{_libdir}/pkgconfig/libcyrus_sieve.pc
%files -n perl-Imap
%defattr(-,root,root)
%dir %{perl_sitelib}/Cyrus
%dir %{perl_sitelib}/Cyrus/Annotator
%{perl_sitelib}/Cyrus/Annotator/*
%dir %{perl_sitearch}/Cyrus
%{perl_sitearch}/Cyrus/*
%dir %{perl_sitearch}/auto/Cyrus
%{perl_sitearch}/auto/Cyrus/*
%{_mandir}/man3/Cyrus::Annotator*.3pm*
%{_mandir}/man3/Cyrus::IMAP*.3pm*
%{_mandir}/man3/Cyrus::SIEVE*.3pm*
%changelog %changelog
* Mon Dec 14 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-2mamba
- libcyrus-imapd-devel: provide/obsolete cyrus-imapd-devel
* Sun Dec 13 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-1mamba
- update to 3.2.4
* Wed Nov 09 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.17-2mamba * Wed Nov 09 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.17-2mamba
- perl 5.24 mass rebuild - perl 5.24 mass rebuild
@ -253,5 +336,5 @@ exit 0
* Thu Jan 08 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.1.16-1qilnx * Thu Jan 08 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.1.16-1qilnx
- specfile updated, package updated to version 2.1.16, rebuild with perl 5.8.2 - specfile updated, package updated to version 2.1.16, rebuild with perl 5.8.2
* Tue Sep 10 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.15-1qilnx * Wed Sep 10 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.15-1qilnx
- first build - first build

View File

@ -0,0 +1,3 @@
g imap -
u imapd 64910 "Cyrus IMAP server" /var/imap
m imap imap

View File

@ -0,0 +1,4 @@
d /run/cyrus 0750 cyrus mail - -
d /run/cyrus/lock 0700 cyrus mail - -
d /run/cyrus/proc 0700 cyrus mail - -
d /run/cyrus/socket 0750 cyrus mail - -