| Summary: | rpm %license is expanded as License: variable within %{expand:.. } in spec top section | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Barry Jackson <zen25000> |
| Component: | RPM Packages | Assignee: | RPM stack maintainers <rpmstack> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | marja11, thierry.vignaud |
| Version: | Cauldron | Keywords: | UPSTREAM |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| See Also: | https://bugzilla.redhat.com/show_bug.cgi?id=1386639 | ||
| Whiteboard: | |||
| Source RPM: | rpm-4.13.0-0.rc1.10.mga6.src.rpm | CVE: | |
| Status comment: | |||
|
Barry Jackson
2015-09-24 02:00:29 CEST
CC:
(none) =>
thierry.vignaud You'd better report this upstream at: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=rpm It would be better if you could provides a small spec file showing the issue. Reported upstream at https://bugzilla.redhat.com/show_bug.cgi?id=1386639 Keywords:
(none) =>
UPSTREAM
Marja Van Waes
2016-10-28 20:20:30 CEST
CC:
(none) =>
marja11 From upstream bug report: Panu Matilainen 2016-12-16 04:19:02 EST All you need is enough escapes to avoid it actually getting expanded inside %expand() because in the spec preamble %license is a macro referring to the contents of the license tag whereas inside %files %license is a spec directive/file attribute, not a macro. This gets the job done (dont ask): %%%%license LICENSE_1_0.txt So closing as invalid! Status:
NEW =>
RESOLVED |
Description of problem: This snippet from the boost-1.58 (soon to be in 1.59 too) spec works as expected: %{expand:%(for lib in %boostlibs; do lib2=${lib/-/_}; cat <<EOF %%files -n %%{libname$lib2} %%doc LICENSE_1_0.txt %{_libdir}/libboost_$lib*.so.%{version} EOF done)} However if %doc is replaced with %license: %{expand:%(for lib in %boostlibs; do lib2=${lib/-/_}; cat <<EOF %%files -n %%{libname$lib2} %%license LICENSE_1_0.txt %{_libdir}/libboost_$lib*.so.%{version} EOF done)} then %license is replaced with the content of the License: variable and the generated %files section is garbage. This Red Hat bug describes a similar (but different related) issue: https://bugzilla.redhat.com/show_bug.cgi?id=1200761 and possibly related to: https://github.com/rpm-software-management/rpm/commit/5d4d5e40c5a2634960385731743dc891ce9f1253 Why on earth did they decide on "%license" when %lic would have caused none of these issues? Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Reproducible: Steps to Reproduce: