From 389c37659e1ccf43090f6f125bf81f344164561e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 14 Jun 2023 15:47:17 -0400 Subject: [PATCH] Refresh more licensing material in genesis rpm --- genesis/buildgenesis.sh | 3 +++ genesis/getlicenses.py | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/genesis/buildgenesis.sh b/genesis/buildgenesis.sh index 27f0a22f..cb21bbaf 100644 --- a/genesis/buildgenesis.sh +++ b/genesis/buildgenesis.sh @@ -25,6 +25,7 @@ fi for lic in $(cat /tmp/tmpliclist); do lo=${lic#/usr/share/} lo=${lo#licenses/} + lo=${lo#doc/} fname=$(basename $lo) dlo=$(dirname $lo) if [[ "$dlo" == *"-lib"* ]]; then @@ -47,6 +48,8 @@ done mkdir -p licenses/ipmitool cp /usr/share/doc/ipmitool/COPYING licenses/ipmitool echo %license /opt/confluent/genesis/%{arch}/licenses/ipmitool/COPYING >> confluent-genesis-out.spec +ln -s /opt/confluent/genesis/%{arch}/licenses/kernel-core /opt/confluent/genesis/%{arch}/licenses/libbpf +echo %file /opt/confluent/genesis/%{arch}/licenses/libbpf >> confluent-genesis-out.spec cp -f /boot/vmlinuz-$(uname -r) boot/kernel cp /boot/efi/EFI/BOOT/BOOTX64.EFI boot/efi/boot find /boot/efi -name grubx64.efi -exec cp {} boot/efi/boot/grubx64.efi \; diff --git a/genesis/getlicenses.py b/genesis/getlicenses.py index 18d6943d..5aa43a8a 100644 --- a/genesis/getlicenses.py +++ b/genesis/getlicenses.py @@ -36,6 +36,8 @@ for rpm in rpmlist: if srpm.startswith('linux-firmware'): continue for relrpm in srpmtorpm[srpm]: + if relrpm.startswith('libss-'): + continue liclist = runcmd(f'rpm -qL {relrpm}') for lic in liclist: if not lic: @@ -53,15 +55,24 @@ manualrpms = [ 'hwdata', 'snmp', 'libnl3', - 'libbpf', # this is covered by kernel + 'libbpf', # this is covered by kernel, but need to make a directory explaining. libbpf is literally just a copy of the kernel source rpm 'sqlite', # public domain 'linux-firmware', #all pertinent licenses are stripped out 'xfsprogs', # manually added by hand below (not in rpm) 'tmux', # use the extracttmuxlicenses on the source to generate NOTICE below ] manuallicenses = [ + '/usr/share/licenses/lz4/LICENSE.BSD', + # cp /usr/share/doc/lz4-libs/LICENSE /usr/share/licenses/lz4/LICENSE.BSD + #'lz4-1.8.3]# cp LICENSE /usr/share/licenses/lz4/LICENSE' + # net-snmp has a bundled openssl, but the build does not avail itself of that copy + '/usr/share/licenses/perl-libs/LICENSE', # ./dist/ExtUtils-CBuilder/LICENSE from perl srpm + '/usr/share/licenses/lz4/LICENSE', + '/usr/share/licenses/lm_sensors/COPYING', + '/usr/share/doc/libunistring/README', '/usr/share/doc/hostname/COPYRIGHT', '/usr/share/doc/hwdata/COPYING', + '/usr/share/doc/zstd/README.md', '/usr/share/doc/hwdata/LICENSE', '/usr/share/doc/ipmitool/COPYING', '/usr/share/doc/libaio/COPYING', @@ -85,6 +96,15 @@ manuallicenses = [ '/usr/share/licenses/kernel-extra/preferred/LGPL-2.0', '/usr/share/licenses/kernel-extra/preferred/LGPL-2.1', '/usr/share/licenses/kernel-extra/preferred/MIT', + '/usr/share/licenses/util-linux/COPYING.GPLv3', # extract from parse-date.c, from srpm + '/usr/share/licenses/kmod/tools/COPYING', # GPL not LGPL, must extract from kmod srpm + '/usr/share/licenses/krb5/NOTICE', # copy it verbatim from LICENSE, exact same file + '/usr/share/doc/less/README', + '/usr/share/licenses/libcap-ng-utils/COPYING', + '/usr/share/licenses/libdb/copyright', # from libdb, db-5.3.28, lang/sql/odbc/debian/copyright + '/usr/share/licenses/libgcrypt/LICENSES.ppc-aes-gcm', # libgcrypt license to carry forward + '/usr/share/licenses/libgcrypt/LICENSES', # OCB is covered by several.. OCB license + '/usr/share/licenses/libgcrypt/README' ] for lic in manuallicenses: print(lic)