Skip to content

Commit

Permalink
fix issue openSUSE#3073
Browse files Browse the repository at this point in the history
  • Loading branch information
gyr committed Apr 18, 2024
1 parent 58b3d97 commit 5b22ea8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/osrt-slsa-user.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Type Name ID GECOS [HOME]
u osrt-slsa - "User for openSUSE SLSA release tool" /var/lib/osrt-slsa
9 changes: 6 additions & 3 deletions dist/package/openSUSE-release-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,18 @@ OSC plugin for the staging workflow, see `osc staging --help`.

%build
%make_build
%sysusers_generate_pre config/osrt-slsa-user.conf %{name} %{name}-user.conf

%install
%make_install \
grafana_provisioning_dir="%{_sysconfdir}/grafana/provisioning" \
oscplugindir="%{osc_plugin_dir}" \
VERSION="%{version}"

install -Dpm0644 config/osrt-slsa-user.conf %{buildroot}%{_sysusersdir}/%{name}-user.conf

%pre -f %{name}.pre

%pre announcer
getent passwd osrt-announcer > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-announcer" osrt-announcer
Expand Down Expand Up @@ -370,9 +375,6 @@ exit 0

%pre slsa-build-service
%service_add_pre %{services}
getent passwd osrt-slsa > /dev/null || \
useradd -r -d /var/lib/osrt-slsa -s /sbin/nologin -c "user for openSUSE-release-tools-slsa-build-service" osrt-slsa
exit 0

%post slsa-build-service
%service_add_post %{services}
Expand Down Expand Up @@ -469,6 +471,7 @@ exit 0
%{_datadir}/%{source_dir}/verify-build-and-generatelists
%{_datadir}/%{source_dir}/verify-repo-built-successful.py
%{_sysconfdir}/openSUSE-release-tools/ibsapi
%{_sysusersdir}/%{name}-user.conf
%{_unitdir}/[email protected]
%{_unitdir}/[email protected]
%{_unitdir}/[email protected]
Expand Down

0 comments on commit 5b22ea8

Please sign in to comment.