public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/buildbot] epel10.2: Add sysusers.d config file to allow rpm to create users/groups automatically
@ 2026-10-09 14:34 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-10-09 14:34 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/buildbot
            Branch : epel10.2
            Commit : 3d55438aafba52ca0b4abb76a56883c1c3ad7461
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T14:36:20+01:00
            Stats  : +12/-9 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/buildbot/c/3d55438aafba52ca0b4abb76a56883c1c3ad7461?branch=epel10.2

            Log:
            Add sysusers.d config file to allow rpm to create users/groups automatically

See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers.

---
diff --git a/buildbot.spec b/buildbot.spec
index c3bfff4..f41908d 100644
--- a/buildbot.spec
+++ b/buildbot.spec
@@ -21,7 +21,7 @@
 
 Name:           buildbot
 Version:        4.2.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 
 Summary:        Build/test automation system
 License:        GPL-2.0-only
@@ -122,7 +122,6 @@ inconvenienced by the failure.
 
 %package master
 Summary:        Build/test automation system master
-Requires(pre):  shadow-utils
 Recommends:     %{name}-www = %{version}-%{release}
 %if ! %{with docs}
 Obsoletes:      %{name}-doc < %{version}-%{release}
@@ -138,12 +137,6 @@ inconvenienced by the failure.
 This package contains only the buildmaster implementation.
 The buildbot-worker package contains the buildworker.
 
-%pre master
-getent group buildbot-master >/dev/null || groupadd -r buildbot-master
-getent passwd buildbot-master >/dev/null || \
-    useradd -r -g buildbot-master -d %{_sharedstatedir}/buildbot/master -s /sbin/nologin \
-    -c "Service account for the Buildbot master" buildbot-master
-exit 0
 
 %post master
 for master in $(systemctl list-units 'buildbot-master@*.service' --all --plain --no-legend | cut -d '@' -f 2 | cut -d '.' -f 1); do
@@ -164,6 +157,7 @@ done
 %{_unitdir}/buildbot-master@.service
 
 # ---------------------------------------------------------------------
+%{_sysusersdir}/buildbot.conf
 
 %if %{with ec2}
 %package master-ec2
@@ -255,7 +249,6 @@ worker support.
 
 %package worker
 Summary:        Build/test automation system worker
-Requires(pre):  shadow-utils
 %if ! %{with docs}
 Obsoletes:      %{name}-doc < %{version}-%{release}
 %endif
@@ -331,6 +324,11 @@ Summary:        Buildbot documentation
 cd ..
 cd buildbot_worker-%{version}
 
+# Create a sysusers.d config file
+cat >buildbot.sysusers.conf <<EOF
+u buildbot-master - 'Service account for the Buildbot master' %{_sharedstatedir}/buildbot/master -
+EOF
+
 %build
 %py3_build
 
@@ -399,6 +397,8 @@ mkdir -p %{buildroot}%{_unitdir}
 cp -a %{S:10} %{S:11} %{buildroot}%{_unitdir}
 mkdir -p %{buildroot}%{_sharedstatedir}/buildbot/{master,worker}
 
+install -m0644 -D buildbot.sysusers.conf %{buildroot}%{_sysusersdir}/buildbot.conf
+
 
 %if %{with check}
 %check
@@ -406,6 +406,9 @@ trial buildbot.test
 %endif
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.2.1-4
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-09 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 14:34 [rpms/buildbot] epel10.2: Add sysusers.d config file to allow rpm to create users/groups automatically 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox