public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/postsrsd] epel10: use the %%ghot feature as recommended by Andreas Thienemann
Date: Thu, 04 Jun 2026 09:44:55 GMT	[thread overview]
Message-ID: <178056629530.1.5226365591053070977.rpms-postsrsd-fd5d6ed68fbc@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-06-04  9:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178056629530.1.5226365591053070977.rpms-postsrsd-fd5d6ed68fbc@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox