From aca4f62fd39e0ebe440775db9ec9aa30f52b5904 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 8 Nov 2023 14:20:11 +0300 Subject: [PATCH] import cyrus-imapd-3.4.1-10.el9 --- .cyrus-imapd.metadata | 1 - .gitignore | 1 - SOURCES/README.rpm | 34 ++++++++++++++++++++++++++++++++++ SOURCES/cyrus-imapd.sysusers | 5 +++++ SPECS/cyrus-imapd.spec | 32 ++++++++++++++++++++++++-------- 5 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 SOURCES/README.rpm create mode 100644 SOURCES/cyrus-imapd.sysusers diff --git a/.cyrus-imapd.metadata b/.cyrus-imapd.metadata index 5e8519a..d7327fe 100644 --- a/.cyrus-imapd.metadata +++ b/.cyrus-imapd.metadata @@ -1,4 +1,3 @@ -e39754f688d98ac0040df85e8850a2e330c6235d SOURCES/README.rpm 616efd5bc85d00486a80c78a4d6cc12ebe07565f SOURCES/cassandane-693da61.tar.gz fd08427d105d2306e95528eff407ab1723b31c69 SOURCES/cassandane-testdata-ca669d4b.tar.gz 8edfa3bca1f914ca30856e6f73d07e4de66173ed SOURCES/cyrus-imapd-3.4.1.tar.gz diff --git a/.gitignore b/.gitignore index 7a922cc..21158a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -SOURCES/README.rpm SOURCES/cassandane-693da61.tar.gz SOURCES/cassandane-testdata-ca669d4b.tar.gz SOURCES/cyrus-imapd-3.4.1.tar.gz diff --git a/SOURCES/README.rpm b/SOURCES/README.rpm new file mode 100644 index 0000000..1ed8fa0 --- /dev/null +++ b/SOURCES/README.rpm @@ -0,0 +1,34 @@ +--------------- +Cyrus IMAPd RPM +--------------- + +This is a _very_ 'quick and dirty' install howto. + +The following steps should lead you to a running Cyrus IMAP server: + +1) Install on a distribution which is supported by this RPM. Don't install + on a dirty system, where you have previously installed from source. +2) Don't install if you have a previous Cyrus IMAPd installation <=2.1.x on + your box. Upgrading any Invoca rpm based installation should be fine. +3) Make sure you understand that this RPM installs in FHS compliant + directories, like /var/lib/imap and /var/spool/imap +4) Make sure cyrus-sasl is installed. +5) Make sure saslauthd is running. If not, edit /etc/sysconfig/saslauthd as + needed and do 'chkconfig saslauthd on ; service saslauthd start' +6) Install the cyrus-imapd RPMs. +7) If it's your first install of Cyrus IMAPd, then set a password for the + cyrus user in whatever database you are using to authenticate. When + using a local account, this should be 'passwd cyrus'. +8) Make sure your MTA delivers to Cyrus IMAPd, I recommend LMTP for this. +9) Start Cyrus IMAPd with 'service cyrus-imapd start' +10) Run cyradm and create a user. Usually it's something like this: + 'cyradm --user=cyrus --auth=login localhost' +11) If you're using sendmail, be aware that cyrusv2.m4 included in standard + sendmail distribution uses socket /var/imap/socket/lmtp while this rpm + uses /var/lib/imap/socket/lmtp. +12) Check your syslog configuration. This RPM uses the mail facility to log + messages. On busy sites you may want to limit the mail facility to the + info priority with something like 'mail.info /var/log/maillog' in + /etc/syslog.conf. + +Enjoy! diff --git a/SOURCES/cyrus-imapd.sysusers b/SOURCES/cyrus-imapd.sysusers new file mode 100644 index 0000000..589008b --- /dev/null +++ b/SOURCES/cyrus-imapd.sysusers @@ -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 diff --git a/SPECS/cyrus-imapd.spec b/SPECS/cyrus-imapd.spec index f86be90..822b451 100644 --- a/SPECS/cyrus-imapd.spec +++ b/SPECS/cyrus-imapd.spec @@ -14,7 +14,7 @@ Name: cyrus-imapd Version: 3.4.1 -Release: 7%{?dist} +Release: 10%{?dist} %define ssl_pem_file_prefix /etc/pki/%name/%name @@ -70,6 +70,7 @@ Source15: README.rpm Source16: cyrus-imapd.service Source17: cyrus-imapd-init.service Source18: cyrus-imapd.tmpfiles.conf +Source19: cyrus-imapd.sysusers # Source files for running the Cassandane test suite at build time. Source80: https://github.com/cyrusimap/cassandane/archive/%cocas/cassandane-${cocas_short}.tar.gz#/cassandane-%{scmt %cocas}.tar.gz @@ -109,6 +110,8 @@ BuildRequires: python3-sphinx # Miscellaneous modules needed for 'make check' to function: BuildRequires: cyrus-sasl-plain cyrus-sasl-md5 +BuildRequires: systemd-rpm-macros + %if %{with cassandane} # Additional packages required for cassandane to function BuildRequires: imaptest net-tools words @@ -155,8 +158,10 @@ BuildRequires: make Requires(pre): shadow-utils %{?systemd_requires} +%{?sysusers_requires_compat} -Requires: %name-utils = %version-%release +Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release} +Requires: cyrus-imapd-utils = %{version}-%{release} Requires: file sscg Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) @@ -187,7 +192,7 @@ hierarchies. %package devel Summary: Cyrus IMAP server development files -Requires: %name%{?_isa} = %version-%release +Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release} Requires: pkgconfig %description devel @@ -215,7 +220,8 @@ and the its utilities. %package utils Summary: Cyrus IMAP server administration utilities -Requires: cyrus-imapd = %{version}-%{release} +Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release} +Requires: perl-Cyrus = %{version}-%{release} %description utils The cyrus-imapd-utils package contains administrative tools for the @@ -225,6 +231,7 @@ one running the server. %package virusscan Summary: Cyrus virus scanning utility +Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release} %description virusscan The cyrus-imapd-virusscan package contains the cyr_virusscan utility. It @@ -410,6 +417,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 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd-init.service 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 find doc perl -name CVS -type d -prune -exec rm -rf {} \; @@ -548,10 +557,7 @@ exclude+=("!Master.maxforkrate") %pre -# Create 'cyrus' user on target host -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 +%sysusers_create_compat %{SOURCE19} %post %systemd_post cyrus-imapd.service @@ -593,6 +599,7 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %_unitdir/cyrus-imapd.service %_unitdir/cyrus-imapd-init.service %_tmpfilesdir/cyrus-imapd.conf +%{_sysusersdir}/cyrus-imapd.conf %dir %cyrexecdir/ %cyrexecdir/[a-uw-z]* @@ -664,6 +671,15 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %changelog +* Tue Aug 01 2023 Martin Osvald - 3.4.1-10 +- Resolves: #2095381 - Use systemd-sysusers for cyrus user and group + +* Tue Aug 01 2023 Martin Osvald - 3.4.1-9 +- Resolves: #2228035 - Fix rpminspect CI errors + +* Sun Jul 23 2023 Martin Osvald - 3.4.1-8 +- Resolves: #2169709 - Remove utils dependency on main package + * Wed Aug 17 2022 Martin Osvald - 3.4.1-7 - Resolves: #2096149 - Fatal error when running "squatter -r user" - Resolves: #2096885 - Enhanced TMT testing for centos-stream