El mar., 4 nov. 2025 13:43, Neal Gompa <[email protected]> escribió:

> On Tue, Nov 4, 2025 at 7:34 AM Zbigniew Jędrzejewski-Szmek
> <[email protected]> wrote:
> >
> > 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
>
> This has been a thing already since RPM 4.20.
>
> You can use %setup/%autosetup -C to have it automatically handle the
> directory for you.
>

Nice. What happens if this option is processed by an older release? Is it
ignored?

Iñaki



> See the notes here: https://rpm.org/releases/4.20.0#spec--package-building
>
>
> --
> 真実はいつも一つ!/ Always, there's only one truth!
> --
> _______________________________________________
> 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
>
-- 
_______________________________________________
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

Reply via email to