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

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

 



Thank you to everyone who replied. It seems the main takeaway so far is that what goes into the different stages is more in the order of SHOULD, rather than MUST or MUST NOT.

In other words, if one can argue why certain steps are executed in a certain stage and it doesn't violate the packaging guidelines, it is permissible.

On 30-10-2023 16:52, Jason L Tibbitts III wrote:
2. It would be (needlessly?) more complicated to do that in %build
Certainly you have to do what is required to build the package; if RPM
ordering oddities make it so much easier to do that in %prep then I
guess you have to do what you have to do.  I think this situation is why
%conf was created, but I don't know if the ordering works out and I
don't know if it is present on all the releases where you would like to
have the package (it was added in RPM 4.18).

I tried moving the execution of `ant` and the clean up of the sources into %conf (before I looked at the RPM documentation).

The result was a failure in %generate_buildrequires, which, as the RPM docs confirm, is ordered before %conf. So, unfortunately, using %conf is not an option. It would have been too easy, I guess. The change is literally splitting %prep:

diff --git a/python-ebcdic.spec b/python-ebcdic.spec
index 0b3fb5b..8dde457 100644
--- a/python-ebcdic.spec
+++ b/python-ebcdic.spec
@@ -48,6 +48,8 @@ Summary:        %{summary}
 %prep
 %forgeautosetup -p1

+
+%conf
 # Generate codecs with local python3
 sed -i 's|value=".*python"|value="python3"|' build.xml
 ant ebcdic

So, with %build and %conf not being an option, I guess I have to do it in %prep. Or I could ask upstream to ship all the extracted codecs. Not sure if that's an option, though.

-- 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