public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/postsrsd] epel10: use the %%ghot feature as recommended by Andreas Thienemann
@ 2026-06-04  9:44 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-04  9:44 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/postsrsd
Branch : epel10
Commit : fd5d6ed68fbc0ab9621189c3acdfc92ec3b50e4d
Author : Marc Dequènes (Duck) <duck@redhat.com>
Date   : 2017-10-04T15:55:20+00:00
Stats  : +11/-4 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/postsrsd/c/fd5d6ed68fbc0ab9621189c3acdfc92ec3b50e4d?branch=epel10

Log:
use the %%ghot feature as recommended by Andreas Thienemann

---
diff --git a/postsrsd.spec b/postsrsd.spec
index ca22558..b7a6b1b 100644
--- a/postsrsd.spec
+++ b/postsrsd.spec
@@ -5,7 +5,7 @@
 
 Name:           postsrsd
 Version:        1.4
-Release:        8.%{commitdate}git%{shortcommit0}%{?dist}
+Release:        9.%{commitdate}git%{shortcommit0}%{?dist}
 Summary:        Sender Rewriting Scheme (SRS) provider
 
 License:        GPLv2+
@@ -41,6 +41,9 @@ cd build && %cmake .. -DGENERATE_SRS_SECRET=OFF -DUSE_SELINUX=ON
 %install
 %make_install -C build
 
+# %%ghost file requires it is present in the build root
+touch %{buildroot}/%{_sysconfdir}/postsrsd.secret
+
 # proper location for systemd config
 mkdir -p %{buildroot}/%{_unitdir}
 mv %{buildroot}/%{_sysconfdir}/systemd/system/postsrsd.service %{buildroot}/%{_unitdir}/postsrsd.service
@@ -55,6 +58,7 @@ sed -ri -e 's/postsrsd\/default/postsrsd.default/' \
 
 %files
 %license LICENSE
+%ghost %{_sysconfdir}/postsrsd.secret
 %{_sysconfdir}/default/%{name}
 %{_unitdir}/postsrsd.service
 %{_sbindir}/postsrsd
@@ -87,12 +91,15 @@ semodule -i %{_datadir}/selinux/packages/%{name}/postsrsd.pp || true
 fixfiles -R %{name} restore || true
 fi
 %systemd_postun_with_restart %{name}.service
-if [ "$1" -eq "0" ] ; then  # final removal
-rm -f %{_sysconfdir}/postsrsd.secret
-fi
+#if [ "$1" -eq "0" ] ; then  # final removal
+#fi
 
 
 %changelog
+* Thu Oct 04 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-9.20170118gita77bf99
+- use the %%ghost feature to ensure the secret file is owned by the package
+- it is then not necessary to handle its removal in %%postun
+
 * Thu Sep 28 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-8.20170118gita77bf99
 - Thanks Matthias Runge Mauchin for the review
 - break description line too long

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

only message in thread, other threads:[~2026-06-04  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04  9:44 [rpms/postsrsd] epel10: use the %%ghot feature as recommended by Andreas Thienemann 

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