On Wed, Aug 11, 2021 at 4:08 PM Michael J Gruber <m...@fedoraproject.org> wrote:
>
> Hi there
>
> When trying to switch to rpmautospec I noticed some surprises in how autospec 
> computes the next release. Environment: I run "rpmautospec" on Fedora 34 as a 
> check before committing to dist-git. I converted one spec file so far, but 
> IIUC "rpmautospec calculate-release" does not depend on the conversion at 
> all. Comparing the release field in the spec, the output of "fedpkg verrel" 
> and that of "rpmautospec calculate-release" (on the rawhide branch) indicates 
> more than 1 problem:
>
> spec: Release: 4%{?dist} verrel: BibTool-2.68-4.fc36 calculate_release 
> release: 6
> spec: Release: %autorelease (was 25!) verrel: adf-accanthis-fonts-1.8-4.fc36 
> calculate_release release: 4
> spec: Release: 2%{?dist} verrel: adf-gillius-fonts-1.009-2.fc36 
> calculate_release release: 4
> spec: Release: 5%{?dist} verrel: dblatex-0.3.12-5.fc36 calculate_release 
> release: 5
> spec: Release: 15%{?dist} verrel: flickcurl-1.26-15.fc36 calculate_release 
> release: 17
> spec: Release: 0.9.%{timestamp}svn%{svnversion}%{?dist} verrel: 
> impressive-0.13.0-0.9.20210612svn311.fc36 calculate_release release: 9
> spec: Release: 10%{?dist} verrel: luckybackup-0.4.9-10.fc36 calculate_release 
> release: 13
> spec: Release: 2%{?dist} verrel: notmuch-0.32.2-2.fc36 calculate_release 
> release: 2
> spec: Release: 41%{?dist} verrel: portmidi-217-41.fc36 calculate_release 
> release: 30
> spec: Release: 2%{?dist} verrel: sil-gentium-basic-fonts-1.102-2.fc36 
> calculate_release release: 2
> spec: Release: 26%{?dist} verrel: tetex-elsevier-0.1.20090917-26.fc36 
> calculate_release release: 32
>
> I know that the (inherited) font package changelogs are special), but next 
> release coming out at a value less than verrel (portmidi, 
> adf-accanthis-fonts) makes me nervous before committing to this. Are the F34 
> commands lacking?

I think these can be split into a different cases:

- BibTool: spec: Release: 4%{?dist} verrel: BibTool-2.68-4.fc36
calculate_release release: 6
- adf-gillius-fonts: spec: Release: 2%{?dist} verrel:
adf-gillius-fonts-1.009-2.fc36 calculate_release release: 4
- flickcurl: spec: Release: 15%{?dist} verrel: flickcurl-1.26-15.fc36
calculate_release release: 17
- luckybackup: spec: Release: 10%{?dist} verrel:
luckybackup-0.4.9-10.fc36 calculate_release release: 13
- tetex-elsevier: spec: Release: 26%{?dist} verrel:
tetex-elsevier-0.1.20090917-26.fc36 calculate_release release: 32
These are correct (or at least, expected).
rpmautospec makes the simple assumption of incrementing Release by 1
for every commit, and adding a changelog entry for every commit
message.
Looking at BibTool, there's two commits in there which didn't bump
Release (adding BR: make and the second F35 Mass rebuild commit),
which didn't count previously, but do count now.
This is the reason why I only converted my packages if I also had a
version update at the same time, so that it definitely lines up to
Release: 1.

- adf-accanthis-fonts: spec: Release: %autorelease (was 25!) verrel:
adf-accanthis-fonts-1.8-4.fc36 calculate_release release: 4
This looks like a bug. I see no obvious reason why the new calculated
Release number would be 4, but it's possible that the %forge macros
interfere with the calculation somehow, since they inject all sorts of
weird stuff.

- dblatex: spec: Release: 5%{?dist} verrel: dblatex-0.3.12-5.fc36
calculate_release release: 5
- impressive: spec: Release: 0.9.%{timestamp}svn%{svnversion}%{?dist}
verrel: impressive-0.13.0-0.9.20210612svn311.fc36 calculate_release
release: 9
- notmuch: spec: Release: 2%{?dist} verrel: notmuch-0.32.2-2.fc36
calculate_release release: 2
- sil-gentium-basic-fonts: spec: Release: 2%{?dist} verrel:
sil-gentium-basic-fonts-1.102-2.fc36 calculate_release release: 2
What's wrong here? The tools all agree. Note that for "impressive",
you'd need to use "%autorelease -p -e %{timestamp}svn%{svnversion}" to
keep the snapshot info in the same format (see the rpmautospec docs
for details).

- portmidi: spec: Release: 41%{?dist} verrel: portmidi-217-41.fc36
calculate_release release: 30
This shouldn't happen, unless there are commit(s) that bumped Release
by more than 1 - in which case you could specify a positive offset for
the %autorelease macro to take this into account. Maybe the git
history is a bit messed up, it looks like the last version update
happened way back before the cvs -> git conversion?

The only thing I am concerned about is "fedpkg verrel" not printing
the same number as "calculate_release". I think "fedpkg srpm" etc.
have been adapted to get the release number from rpmautospec, but it
looks like "fedpkg verrel" did not receive the same treatment. This
should probably be reported as a bug against fedpkg / rpkg.

Fabio
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to