On Mon, May 15, 2023 at 11:35 PM Orion Poplawski orion@nwra.com wrote:
I've got the following:
%global goipath github.com/dustin/gomemcached %global commit a2284a01c143e355985d192edf3b62a053747c70 %global shortcommit %(c=%{commit}; echo ${c:0:7})
%gometa -f
%global common_description %{expand: A memcached binary protocol toolkit for go.}
%global golicenses LICENSE %global godocs README.markdown example
Name: %{goname} Version: 0 Release: %autorelease -p Summary: A memcached binary protocol toolkit for go
Which gives me:
Release: 0.1.20230224gita2284a0.fc39
Looks like 20230224 is coming from the date of the tarball. I want to set the date to the date of the last upstream commit - 20160816.
https://docs.pagure.org/Fedora-Infra.rpmautospec/autorelease.html#traditiona...
indicates that I should be able to use -s to set the <snapinfo> part of the release tag, so I do:
Release: %autorelease -p -s 20160816git%{shortcommit}
but that gives me:
Release: 0.1.20160816gita2284a0.20230224gita2284a0.fc39
So, how do I override the SCM date?
You don't. Don't use those features in %autorelease and put them in Version: instead.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snaps...