From f00747ea0f411b6df88619fc32f93df08d3088cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 16:44:37 +0100 Subject: [PATCH] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. --- sqlgrey.spec | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sqlgrey.spec b/sqlgrey.spec index c87372b..0f7e59b 100644 --- a/sqlgrey.spec +++ b/sqlgrey.spec @@ -1,6 +1,6 @@ Name: sqlgrey Version: 1.8.0 -Release: 31%{?dist} +Release: 32%{?dist} Summary: Postfix grey-listing policy service # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later @@ -13,7 +13,6 @@ BuildArch: noarch Requires: postfix Requires: perl(DBD::SQLite) -Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -34,6 +33,11 @@ to 90% of junk mails (spam and virus) before they reach your Postfix server %patch -P0 -p1 %patch -P1 -p1 +# Create a sysusers.d config file +cat >sqlgrey.sysusers.conf </dev/null || groupadd -r sqlgrey -getent passwd sqlgrey >/dev/null || \ - useradd -r -g sqlgrey -d /var/lib/sqlgrey -s /sbin/nologin \ - -c "SQLgrey server" sqlgrey -exit 0 %post %systemd_post sqlgrey.service @@ -81,6 +82,9 @@ exit 0 %systemd_postun_with_restart sqlgrey.service %changelog +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 1.8.0-32 +- Add sysusers.d config file to allow rpm to create users/groups automatically + * Sat Feb 08 2025 Kevin Fenzi - 1.8.0-31 - Adjust to sbin/bin consolidation. Fixes FTBFS rhbz#2341376