Re: Guidance needed regarding running `ant` in %prep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06-11-2023 12:32, Panu Matilainen wrote:
On 11/6/23 02:00, Sandro wrote:
On 05-11-2023 16:00, Sérgio Basto wrote:
During review of a package I submitted [1], the reviewer asked me to
move running an `ant` script from %prep to %build.
This is correct IMHO ,

if you run `fedpkg prep` on directory where you heave the spec file of
the package (in a git-dist), you wont be able to get "Local test
rpmbuild prep" if you haven't ant installed on the system.

And why is that an issue I should be concerned about?

It's an honest question. When running the full build with `fedpkg mockbuild`, all BRs from the spec file will be installed first, before %prep is executed.

for exemplify :
fedpkg clone eclipse-swt
cd eclipse-swt
fedpkg prep

I know plenty of Python packages that need to apply some git foo in %prep. These would also fail the exercise if git-core were not installed on the host system.

I'm not sure why `fedpkg prep` just fails, while `fedpkg install` will happily tell you what dependencies are missing.

The idea is that %prep only unpacks (which is useful to looking at the sources) so it doesn't need dependencies beyond those of rpmbuild itself. Once upon a time rpm was changed to ignore buildrequires for prep with this rationale, but it's a flawed one: technically, packages are free to use whatever tooling they need to do what they need in %prep as much as any other section. And to do that they'd must be able to express those dependencies.

Thank you, Panu. I conclude from that, that it is okay to have (justified) BRs that are needed for %prep, just like git-core is frequently required for Python packages, needing to tag trees in %prep for dynamic versioning tools like Versioneer.

-- Sandro
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-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/packaging@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux