On Tue, Nov 4, 2025 at 8:02 AM Panu Matilainen <[email protected]> wrote:
>
> On 11/4/25 2:55 PM, Neal Gompa wrote:
> > On Tue, Nov 4, 2025 at 7:54 AM Iñaki Ucar <[email protected]> wrote:
> >>
> >>
> >>
> >> 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 would hope it would choke, but we might not be so lucky. With %setup
> > it should fail, but I don't know about %autosetup.
> >
> > Ignoring parameters would be a horribly broken behavior.
>
> Sigh. Why are you FUD'ing like this if you don't know, and can't be
> bothered to check?
>
> Every rpm version back to the dawn of times validate both parametric
> macro options and the pseudo-macro arguments like %setup.
>

Because this behavior has been inconsistent in the past. With %setup I
know it's fine, but I have seen bugs in parametric macro handling in
the past so I cannot be totally certain. And I'm not going to check
everything just offhand like that.



-- 
真実はいつも一つ!/ 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

Reply via email to