Zbigniew Jędrzejewski-Szmek venit, vidit, dixit 2025-11-04 13:34:02:
> The %setup/%autosetup macros require the top-level directory of the tarball
> to be manually specific (if it is not the default of %name-%release). This
> requires twiddling with the spec when switching between release and
> snapshot builds, or reusing the spec for CI, etc. Over the years, this has
> caused counteless builds to fail and soaked up immesurable maintainer time.
>
> After being bitten by this again (CI failing), we figured out a relatively
> simple way to handle this [1]:
>
> %autosetup -n %(tar -tf %{SOURCE0} | head -n1) -p1
>
> (this is the PSA part).
>
> It'd really be great if the macros could do this automatically.
> (this is the RFE part ;))
>
> [1]
> https://src.fedoraproject.org/rpms/systemd/c/8e2833a5b64f7e2ce62ea0a2d0ec9e393e718dfa
I agree those things are a nuisance and could be more automatic.
OTOH: If "you" (a maintainer) do not even notice a top-level directory
change then which changes in a tarball do you notice at all?
I admit being guilty of following upstreams' git source repos and
relying on tarballs' contents to be equivalent, and someone tinkering
with the tarball woldn't be as stupid as changing the toplevel dir. But
still I'm wondering if this change is going in the right direction.
Switching beteen release and snapshot typically requires more than just
a toplevel change, so this could be covered by existing ifdefery.
I don't understand the CI part - is your CI not using the built rpm for
which the tarball doesn't matter? Or automatic spec rebuilds? rpkg from
git source to the rescue ;-)
Michael
--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue