On 30/11/2023 00:14, Michal Schorm wrote:
I've stumbled upon this piece of code in my package:
# Define license macro if not present
%{!?_licensedir:%global license %doc}
https://src.fedoraproject.org/rpms/mariadb/blob/rawhide/f/mariadb.spec#_322
Git blame points out 7 year old commit:
https://src.fedoraproject.org/rpms/mariadb/c/e3d4b2f14e5e0cb7b42b468ffb9d...
The RPM docs says the %license 'Virtual File Attribute' was added in
version 4.11, which has been added to Fedora years before the commit
above:
https://src.fedoraproject.org/rpms/rpm/c/2970ed07c98c8929eca0bdfebda389af...
I tried to remove the line and I haven't noticed any differences in
output of "rpm -q -d <rpm>" and "rpm -q -L <rpm>" before
and after.
I'm not even sure what the line is trying to do - I read it as "under
some condition, create %license global macro with value %doc".
It's just making %license an alias for %doc if your building
for a release old enough that %license isn't supported, as
detected by checking if %licensedir is defined.
It hasn't been needed for a long time.
Tom
--
Tom Hughes (tom(a)compton.nu)
http://compton.nu/