On 4/12/22 11:22, Petr Pisar wrote: > V Tue, Apr 12, 2022 at 04:04:35PM +0200, Zbigniew Jędrzejewski-Szmek napsal(a): >> On Fri, Apr 08, 2022 at 11:16:59AM +0200, Petr Pisar wrote: >>> Where should autoreconf be placed? %pre or %conf? >> >> For me the important distinction is that %prep should *not* execute the >> code from the package: it should just unpack, apply patches and fixups, change >> permissions, etc. This all should be done using external tools, and not >> scripts from the package itself. This way it is possible do 'fedpkg prep' >> or equivalent and view the sources without executing any commands from >> the package. So even if the package does not want to run on a given architecture, >> or upstream does something stupid or hostile, %prep remains reliable. >> (This also means that %prep should rather do less than more.) >> >> If autoreconf is done using the external 'autoreconf' command, then >> %prep seems appropriate. Some packages have ./autogen.sh or similar, and >> that I'd put in one of the later sections. >> > That's a good point. However, autoreconf tool expands m4 macros in > configure.ac and whatever aclocal macro directory or file provided with the > sources. I'm not an expert in m4, but according to a documentation m4 has > recursion and conditions, hence you can have an infinite loop. Thus, in the > the manner of your classification, I'd consider autoreconf not to be suitable > for %prep. > > -- Petr M4 can also execute arbitrary shell commands. -- Sincerely, Demi Marie Obenour (she/her/hers)
Attachment:
OpenPGP_0xB288B55FFF9C22C1.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure