Hi,
Why when i fedpkg import a SRPM in a new repo, this is added to the resulting imported spec file:
## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec
and the autochangelog is removed:
%changelog * Wed Feb 16 2022 Robert-André Mauchin <zebob.m@gmail.com> 0.1.0-1 - Initial release
Sorry for the late response.
This is intentional: With rpmautospec macros, an unprocessed spec file isn't valid as is, Therefore, fedpkg srpm (I assume that's what you did, or something similar) expands the %autorelease macro and %autochangelog placeholder when building the SRPM which can then be built anywhere and yield the same release and changelog.
rpmautospec
fedpkg srpm
%autorelease
%autochangelog
I imagine fedpkg srpm could support a command line flag to skip this preprocessing step, taking in the spec file verbatim, but the resulting SRPM would not contain the changelog file, i.e. lose all changelog information about release before the switch to %autochangelog.
changelog
Metadata Update from @nphilipp: - Issue close_status updated to: Invalid - Issue status updated to: Closed (was: Open)