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 af7a1ae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ install:
cp -R config/* $(DESTDIR)$(sysconfdir)/$(package_name)
rm $(DESTDIR)$(sysconfdir)/$(package_name)/logrotate
install -Dpm0644 config/logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/$(package_name)
rm $(DESTDIR)$(sysconfdir)/$(package_name)/osrt-slsa-user.conf
install -Dpm0644 config/osrt-slsa-user.conf $(DESTDIR)$(sysusersdir)/$(package_name)-user.conf
for dir in dashboards datasources ; do ln -s $(pkgdatadir)/metrics/grafana/provisioning/$$dir.yaml \
$(DESTDIR)$(grafana_provisioning_dir)/$$dir/$(package_name).yaml ; done
sed -i "s|OSRT_DATA_DIR|$(pkgdatadir)|" \
Expand Down
1 change: 1 addition & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ apachevhostsdir=$(sysconfdir)/apache2/vhosts.d
tmpfilesdir=$(prefix)/lib/tmpfiles.d
logdir=/var/log
varlibdir=/var/lib
sysusersdir=$(prefix)/lib/sysusers.d
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
7 changes: 4 additions & 3 deletions dist/package/openSUSE-release-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,16 @@ 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}"

%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 +373,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 +469,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 af7a1ae

Please sign in to comment.