Do not use %autochangelog

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

    %add_changelog %SOURCE3

Also install changelog to /usr/share/doc/policycoreutils/changelog
This commit is contained in:
Petr Lautrbach 2025-12-16 11:00:45 +01:00 committed by Vit Mojzis
parent f895a612fb
commit 0a35929811
2 changed files with 18 additions and 2 deletions

8
macros Normal file
View File

@ -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
}

View File

@ -17,6 +17,8 @@ License: GPL-2.0-or-later
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/selinux-%{version}.tar.gz
Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/selinux-%{version}.tar.gz.asc
Source2: https://github.com/bachradsusi.gpg
Source3: changelog
Source4: macros
URL: https://github.com/SELinuxProject/selinux
Source13: system-config-selinux.png
Source14: sepolicy-icons.tgz
@ -50,6 +52,9 @@ Patch0009: 0009-restorecon-Add-option-to-count-relabeled-files.patch
# Patch0009 ^^^ needs to also contain diff for libselinux because of updated header files
# Patch list end
# gen_changelog
%{load:%{SOURCE4}}
Obsoletes: policycoreutils < 2.0.61-2
Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138
# initscripts < 9.66 shipped fedora-autorelabel services which are renamed to selinux-relabel
@ -167,6 +172,9 @@ install -m 755 -p %{SOURCE15} %{buildroot}/%{_libexecdir}/selinux/
%find_lang selinux-gui
%find_lang selinux-sandbox
# Install changelog to %{_docdir}/%{name}
install -m 644 -p %{SOURCE3} %{buildroot}/%{_docdir}/%{name}
%package python-utils
Summary: SELinux policy core python utilities
Requires: python3-policycoreutils = %{version}-%{release}
@ -396,7 +404,7 @@ system-config-selinux is a utility for managing the SELinux environment
%{_datadir}/bash-completion/completions/setsebool
%{!?_licensedir:%global license %%doc}
%license policycoreutils/LICENSE
%doc %{_usr}/share/doc/%{name}
%doc %{_docdir}/%{name}
%package restorecond
Summary: SELinux restorecond utilities
@ -434,4 +442,4 @@ The policycoreutils-restorecond package contains the restorecond service.
%systemd_postun_with_restart restorecond.service
%changelog
%autochangelog
%add_changelog %SOURCE3