public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/exim] rawhide: fix(sysusers): create exim user on CentOS/RHEL systems lacking native sysusers
Date: Mon, 20 Jul 2026 08:18:11 GMT	[thread overview]
Message-ID: <178453549143.1.5063059514218964324.rpms-exim-5933bea87423@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/exim
            Branch : rawhide
            Commit : 5933bea874231f0b8cbfd6ffd2aacc3da90bb21d
            Author : Rénich Bon Ćirić <renich@woralelandia.com>
            Date   : 2026-07-14T23:21:37-06:00
            Stats  : +8/-6 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/exim/c/5933bea874231f0b8cbfd6ffd2aacc3da90bb21d?branch=rawhide

            Log:
            fix(sysusers): create exim user on CentOS/RHEL systems lacking native sysusers

Add compatibility sysusers macros to exim.spec and make the
exim.sysusers.conf a static Source file. This allows %sysusers_create_compat
to expand at parse time and generate pre-install scriptlets to pre-create
the exim user on systems like CentOS Stream 10 where native RPM sysusers
is disabled, ensuring /var/spool/exim is created with correct permissions.

Co-developed-by: Gemini AI <renich+gemini@woralelandia.com>
Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>

---
diff --git a/exim.spec b/exim.spec
index 34dd80f..f1075df 100644
--- a/exim.spec
+++ b/exim.spec
@@ -21,6 +21,7 @@ Provides: MTA smtpd smtpdaemon server(smtp)
 Requires(post): %{_sbindir}/restorecon %{_sbindir}/alternatives systemd
 Requires(preun): %{_sbindir}/alternatives systemd
 Requires(postun): %{_sbindir}/alternatives systemd
+%{?sysusers_requires_compat}
 %if %{with clamav}
 BuildRequires: clamd
 %endif
@@ -41,6 +42,7 @@ Source23: trusted-configs
 Source24: exim.service
 Source25: exim-gen-cert
 Source26: clamd.exim.service
+Source30: exim.sysusers.conf
 
 Patch: exim-4.99-config.patch
 Patch: exim-4.94-libdir.patch
@@ -81,6 +83,7 @@ BuildRequires: libSM-devel
 BuildRequires: libICE-devel
 BuildRequires: libXpm-devel
 BuildRequires: libXt-devel
+BuildRequires: systemd-rpm-macros
 BuildRequires: systemd-units
 BuildRequires: libgsasl-devel
 # Workaround for NIS removal from glibc, bug 1534920
@@ -201,11 +204,7 @@ for f in $(ls -dp cve-* | grep -v '/\|\(\.txt\)$'); do
 done
 popd
 
-# Create a sysusers.d config file
-cat >exim.sysusers.conf <<EOF
-u exim 93 - %{_var}/spool/exim -
-m exim mail
-EOF
+# exim.sysusers.conf is now a static Source file (Source30)
 
 %build
 # https://bugs.exim.org/show_bug.cgi?id=3135
@@ -341,12 +340,13 @@ install -m755 %{SOURCE22} $RPM_BUILD_ROOT/%_sysconfdir/cron.daily/greylist-tidy.
 install -m644 %{SOURCE23} $RPM_BUILD_ROOT/%_sysconfdir/exim/trusted-configs
 touch $RPM_BUILD_ROOT/%_var/spool/exim/db/greylist.db
 
-install -m0644 -D exim.sysusers.conf %{buildroot}%{_sysusersdir}/exim.conf
+install -m0644 -D %{SOURCE30} %{buildroot}%{_sysusersdir}/exim.conf
 
 %check
 build-`scripts/os-type`-`scripts/arch-type`/exim -C src/configure.default -bV
 
 %pre
+%sysusers_create_compat %{SOURCE30}
 # Copy TLS certs from old location to new -- don't move them, because the
 # config file may be modified and may be pointing to the old location.
 if [ ! -f /etc/pki/tls/certs/exim.pem -a -f %{_datadir}/ssl/certs/exim.pem ] ; then

diff --git a/exim.sysusers.conf b/exim.sysusers.conf
new file mode 100644
index 0000000..97fe307
--- /dev/null
+++ b/exim.sysusers.conf
@@ -0,0 +1,2 @@
+u exim 93 - /var/spool/exim -
+m exim mail

                 reply	other threads:[~2026-07-20  8:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178453549143.1.5063059514218964324.rpms-exim-5933bea87423@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox