Bug 1178056 - %license macro does not expand symlinks
Summary: %license macro does not expand symlinks
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: Michael Schröder
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-23 09:29 UTC by Christian Goll
Modified: 2020-10-23 11:59 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Goll 2020-10-23 09:29:57 UTC
The %license macro from rpm does not follow symlinks, nor does it throw an error when it is used on symlink. When the %license macro is used on a symlink/softlink, a broken softlink is delivered in the binary.
Comment 1 Egbert Eich 2020-10-23 10:10:51 UTC
The %license macro seems to be one of the intrinsic macros of rpm.
Michael, could you have a look?
Comment 2 Michael Schröder 2020-10-23 10:25:32 UTC
Is that %license as file marker or %license as special file in your specfile?
Comment 3 Christian Goll 2020-10-23 11:59:51 UTC
I do not know the difference between "%license as file marker or %license as special file ", but I fixed this in the request
https://build.opensuse.org/request/show/843572
[snip]
 %files
 %defattr(-,root,root)
 -%license COPYING
 +%license LICENSE.en.txt LICENSE.fr.txt
 %doc ChangeLog README.md
 %doc ./doc/templates/
[snap]
where in the source dir I have 
lrwxrwxrwx 1 chris users    14 23. Okt 13:42 LICENSE -> LICENSE.en.txt
lrwxrwxrwx 1 chris users     9 23. Okt 13:42 INSTALL -> README.md
-rw-r--r-- 1 chris users  2047 23. Okt 13:42 .gitignore
lrwxrwxrwx 1 chris users     7 23. Okt 13:42 COPYING -> LICENSE
which gives
ls -l /usr/share/licenses/robinhood/
total 4
lrwxrwxrwx 1 root root 7 Sep 29 09:32 COPYING -> LICENSE

in the package, so here COPYING is a broken soft link.