-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn %prep into a normal build script #2205
Comments
There are some "interesting" gotchas in this direction. I have draft patches to turn %patch and %setup into actual macros so they get processed with the normal spec readLine() machinery but as long as the macro engine cannot handle multiple options of the same type, this is a no-go. The other, ahem, specialty is that |
👀 This is new to me. Could there be warning that |
Yes, and there will be. I actually planned one for 4.18 already but withdrew it, didn't have the energy to fight that battle just now 😅 For some stats, out of 22000+ packages in Fedora, about 6300 have Patch declarations, of which roughly 3500 are still using the |
Doesn't help that the only example (end of that section) of Guidelines examples can be corrected easily enough, of course, if the updated syntax is universally preferred/correct. How long has e.g. |
Hey, wait... those numbers don't add up. If there are 6300 Or is ~8700 the total number of (If so, that's also depressing: After all this time, only 39.54% of packages are using |
The %autosetup number is indeed total packages using it, whether they currently have patches or not (because that's a situation that can and does change release by release). This ticket is about %prep though, lets keep the %patch discussion in #2209 (the compat info is already there btw) |
Instead of treating `%patch` with no options and errors the same as `%patch 0`, just raise an error. There will be folks who have missed the warning-only phase, but we don't want to wait another ten years to finally rid ourselves of these legacy quirks. Related: rpm-software-management#2205
Instead of treating `%patch` with no options and errors the same as `%patch 0`, just raise an error. There will be folks who have missed the warning-only phase, but we don't want to wait another ten years to finally rid ourselves of these legacy quirks. Related: #2205
(this is "handsfree" item because the aforementioned, ah, specialty prevents all sorts of interesting developements) |
It is possible to utilize both %autosetup and %patch (admittedly somewhat unusual):
|
Allows %build, %install, %check, %clean and %generate_depends to be augmented arbitrary number of times by appending or prepending to them. The main use-case is to support automatic population of these sections (declarative builds) while still allowing packagers to easily tweak them, but could also be useful for complicated conditional specs and such. %prep is missing from the list because it's way too special at the moment, it'll gain this capability when rpm-software-management#2205 is fixed. Related: rpm-software-management#1087
Allows %build, %install, %check, %clean and %generate_depends to be augmented arbitrary number of times by appending or prepending to them. The main use-case is to support automatic population of these sections (declarative builds) while still allowing packagers to easily tweak them, but could also be useful for complicated conditional specs and such. %prep is missing from the list because it's way too special at the moment, it'll gain this capability when rpm-software-management#2205 is fixed. Related: rpm-software-management#1087
Now that we can, implement %setup and %patch as auxiliary macros that are defined only during %prep parsing. And voila, %prep is no longer special at all. Not much anyhow. Notably rpmspec --parse now emits %build where it belongs. The error message on %patchN is now very much an ugly hack, but at least it's something we can drop one sunny day. Fixes: rpm-software-management#2205
Now that we can, implement %setup and %patch as auxiliary macros that are defined only during %prep parsing. And voila, %prep is no longer special at all. Not much anyhow. Notably rpmspec --parse now emits %build where it belongs. The error message on %patchN is now very much an ugly hack, but at least it's something we can drop one sunny day. Fixes: #2205
Instead of treating `%patch` with no options and errors the same as `%patch 0`, just raise an error. There will be folks who have missed the warning-only phase, but we don't want to wait another ten years to finally rid ourselves of these legacy quirks. Related: rpm-software-management#2205 (cherry picked from commit b3adc8c)
%prep is very special. It is first parsed completely and only then are
%setup
and%patch
replaced. While these two need to do special things they should still be internal macros that are processed right when they are encountered.One side effect of this is #1870
The text was updated successfully, but these errors were encountered: