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:
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) => UPSTREAMSee Also: (none) => https://bugzilla.redhat.com/show_bug.cgi?id=1386639
CC: (none) => marja11Assignee: bugsquad => rpmstack
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 => RESOLVEDResolution: (none) => INVALID