public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/selinux-policy] rawhide: Do not use %autochangelog
@ 2026-07-02  7:29 Zdenek Pytela
  0 siblings, 0 replies; only message in thread
From: Zdenek Pytela @ 2026-07-02  7:29 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/selinux-policy
            Branch : rawhide
            Commit : 55fe2083b539b17d9f469997a99c21f5119aaab1
            Author : Zdenek Pytela <zpytela@redhat.com>
            Date   : 2026-07-01T15:42:34+02:00
            Stats  : +21/-3 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/selinux-policy/c/55fe2083b539b17d9f469997a99c21f5119aaab1?branch=rawhide

            Log:
            Do not use %autochangelog

It can't be used without %autorelease.
Use our own macro to add entries from SOURCE6: changelog to %changelog

%add_changelog %SOURCE3

Also install changelog to /usr/share/doc/selinux-policy/changelog

Authored-by: Petr Lautrbach <lautrbach@redhat.com>

---
diff --git a/macros b/macros
new file mode 100644
index 0000000..6463988
--- /dev/null
+++ b/macros
@@ -0,0 +1,8 @@
+%add_changelog(changelog:) %{lua:
+  local f = io.open(arg[1], 'r')
+  if f then
+    local content = f:read('*all')
+    f:close()
+    print(content)
+  end
+} 

diff --git a/selinux-policy.spec b/selinux-policy.spec
index 4757c75..1720e8c 100644
--- a/selinux-policy.spec
+++ b/selinux-policy.spec
@@ -34,6 +34,13 @@ Source3: macro-expander
 # Git repo: https://github.com/containers/container-selinux.git
 Source4: container-selinux.tgz
 
+# Provide rpm macros for packages installing SELinux modules
+Source5: rpm.macros
+# Use a separate file for changelog entries
+Source6: changelog
+# Internal macros for use in the build process
+Source7: macros
+
 # modules enabled in -minimum policy
 Source16: modules-minimum.lst
 
@@ -47,8 +54,8 @@ Source39: selinux-policy-mls.conf
 # Script to convert /usr/sbin file context entries to /usr/bin
 Source40: binsbin-convert.sh
 
-# Provide rpm macros for packages installing SELinux modules
-Source5: rpm.macros
+# add_changelog
+%{load:%{SOURCE7}}
 
 Url: %{giturl}
 BuildArch: noarch
@@ -507,6 +514,9 @@ sed -i 's@SELINUXSTOREPATH@%{_sharedstatedir}/selinux@' %{buildroot}%{_rpmconfig
 mkdir -p %{buildroot}%{_unitdir}
 install -p -m 644 %{SOURCE36} %{buildroot}%{_unitdir}
 
+# Install changelog to docdir
+install -m 644 -p %{SOURCE6} %{buildroot}/%{_docdir}/%{name}
+
 %post
 %systemd_post selinux-check-proper-disable.service
 if [ ! -s %{_sysconfdir}/selinux/config ]; then
@@ -784,4 +794,4 @@ exit 0
 %endif
 
 %changelog
-%autochangelog
+%add_changelog %SOURCE6

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

only message in thread, other threads:[~2026-07-02  7:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02  7:29 [rpms/selinux-policy] rawhide: Do not use %autochangelog Zdenek Pytela

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