Bug 1482192
| Summary: | rpmbuild's new macro evaluation is causing nil to disapear | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | jiri vanek <jvanek> |
| Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | urgent | Docs Contact: | |
| Priority: | high | ||
| Version: | 27 | CC: | ignatenko, kardos.lubos, mjw, packaging-team-maint, pmatilai, vmukhame |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-18 18:26:23 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1443076 | ||
If you need to pass unexpanded macros as arguments, just escape them as usual: %%{nil}. That's the simplest fix for the cases where macro argument expansion is breaking things.
Alternatively you can use %{?1} inside the %files_jre macro, in which case it'd work with both %{nil} and entirely without it.
I realize this is a bit of a pain because forces changing some long working macros, but I think it's worth a bit of pain as it makes the macro language saner.
Also this case is killed:
What I have is:
for suffix in %{build_loop} ; do
mkdir -p %{buildoutputdir $suffix}
pushd %{buildoutputdir $suffix}
....
done
On top of stopping new package, it stopped any jdk8 updates Erm, how is that for-loop case "killed"? I don't see anything special about that. What's the output you're getting and what are you expecting? As explained in upstream tracker, https://github.com/rpm-software-management/rpm/issues/127, all cases can be workarounded when used proper rpm techniques. |
I guess teh change "Expand parametric macro arguments before processing (#127, RhBug:1397209)" have caused following issue(s): lets have macro: %global files_jre() %{expand: %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png %{_datadir}/applications/*policytool%1.desktop %{_jvmdir}/%{sdkdir %%1}/lib/libjsoundalsa.so %{_jvmdir}/%{sdkdir %%1}/lib/libsplashscreen.so %{_jvmdir}/%{sdkdir %%1}/lib/libawt_xawt.so %{_jvmdir}/%{sdkdir %%1}/lib/libjawt.so %{_jvmdir}/%{sdkdir %%1}/bin/policytool } I was used to use it as: %files %{files_jre %{nil}} and %files debug %{files_jre -- %{debug_suffix_unquoted}} where %global debug_suffix_unquoted -debug Now with rpm 4.13 i really god two nice subpackages which directories differs by suffix. With rpm 4.14 pre (f27+) it is facing issues: The "debug" usage, is complaining for "unknow switch -d" this gave sense, and imho can be (correctly) fixed by adding --: %{files_jre -- %{debug_suffix_unquoted}} However, the nil is causing more severe issue I dont know how to fix. It expand isteslf first, so the expansion is not aware of any parameter. and %1 will always remain %1. I would consider this as showstopper for F27.