Skip to content

Commit

Permalink
Merge pull request #671 from amazonlinux/more-licenses
Browse files Browse the repository at this point in the history
Add attributions and license files for non-Rust upstream packages
  • Loading branch information
iliana authored Jan 24, 2020
2 parents 4193aae + e94a912 commit 4b09828
Show file tree
Hide file tree
Showing 62 changed files with 197 additions and 77 deletions.
21 changes: 12 additions & 9 deletions macros/shared
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
%_cross_sysusersdir %{_cross_rootdir}%{_sysusersdir}
%_cross_sysctldir %{_cross_rootdir}%{_sysctldir}
%_cross_templatedir %{_cross_datadir}/templates

%_defaultlicensedir %{_cross_datadir}/licenses
%_cross_licensedir %{_cross_datadir}/licenses
%_defaultlicensedir %{_cross_licensedir}

%set_cross_build_flags \
CFLAGS="${CFLAGS:-%{_cross_cflags}}" ; export CFLAGS ; \
Expand Down Expand Up @@ -177,12 +177,14 @@ CROSS_COMPILATION_CONF_EOF\
%set_cross_go_flags \
cd GOPATH/src/%1 ; \

%_cross_attribution_file %{_licensedir}/%{name}/attribution.txt
%_cross_attribution_file %{_cross_licensedir}/%{name}/attribution.txt
%cross_generate_attribution \
mkdir -p %{buildroot}%{_licensedir}/%{name} \
echo "%{name} - %{url}" >> %{buildroot}%{_cross_attribution_file} \
echo "SPDX-License-Identifier: %{license}" >> %{buildroot}%{_cross_attribution_file}
%_cross_attribution_vendor_dir %{_licensedir}/%{name}/vendor
if [ 0%{?_cross_first_party} -eq 0 ]; then \
mkdir -p %{buildroot}%{_cross_licensedir}/%{name} \
echo "%{name} - %{url}" >> %{buildroot}%{_cross_attribution_file} \
echo "SPDX-License-Identifier: %{license}" >> %{buildroot}%{_cross_attribution_file} \
fi
%_cross_attribution_vendor_dir %{_cross_licensedir}/%{name}/vendor
%cross_scan_attribution \
thar-license-scan --spdx-data /usr/libexec/tools/spdx-data --out-dir %{buildroot}%{_cross_attribution_vendor_dir}

Expand Down Expand Up @@ -210,5 +212,6 @@ CROSS_COMPILATION_CONF_EOF\
%__brp_mangle_shebangs /bin/true

%__arch_install_post \
/usr/lib/rpm/check-rpaths \
/usr/lib/rpm/check-buildroot
/usr/lib/rpm/check-rpaths \
/usr/lib/rpm/check-buildroot \
%cross_generate_attribution
4 changes: 3 additions & 1 deletion packages/acpid/acpid.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}acpid
Version: 2.0.32
Release: 1%{?dist}
Summary: ACPI event daemon
License: GPLv2+
License: GPL-2.0-or-later
URL: http://sourceforge.net/projects/acpid2/
Source0: http://downloads.sourceforge.net/acpid2/acpid-%{version}.tar.xz
Source1: acpid.service
Expand Down Expand Up @@ -30,6 +30,8 @@ install -d %{buildroot}%{_cross_libdir}/acpid/events
install -p -m 0644 %{S:2} %{buildroot}%{_cross_libdir}/acpid/events/power

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_sbindir}/acpid
%{_cross_unitdir}/acpid.service
%{_cross_libdir}/acpid/
Expand Down
1 change: 0 additions & 1 deletion packages/aws-iam-authenticator/aws-iam-authenticator.spec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ go build -buildmode pie -tags="${BUILDTAGS}" -o aws-iam-authenticator %{goimport
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 aws-iam-authenticator %{buildroot}%{_cross_bindir}

%cross_generate_attribution
%cross_scan_attribution go-vendor vendor

%files
Expand Down
4 changes: 3 additions & 1 deletion packages/bash/bash.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}bash
Version: 5.0
Release: 1%{?dist}
Summary: The GNU Bourne Again shell
License: GPLv3+
License: GPL-3.0-or-later
URL: https://www.gnu.org/software/bash
Source0: https://ftp.gnu.org/gnu/bash/bash-%{version}.tar.gz

Expand Down Expand Up @@ -78,6 +78,8 @@ make "CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='\"/usr/local/
ln -s bash %{buildroot}%{_cross_bindir}/sh

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_bindir}/bash
%{_cross_bindir}/sh
%exclude %{_cross_bindir}/bashbug
Expand Down
3 changes: 2 additions & 1 deletion packages/ca-certificates/ca-certificates.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}ca-certificates
Version: 2019.11.27
Release: 1%{?dist}
Summary: CA certificates extracted from Mozilla
License: MPL 2.0
License: MPL-2.0
# Note: You can see changes here:
# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
URL: https://curl.haxx.se/docs/caextract.html
Expand All @@ -24,6 +24,7 @@ install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:1} %{buildroot}%{_cross_tmpfilesdir}/ca-certificates.conf

%files
%{_cross_attribution_file}
%dir %{_cross_factorydir}%{_cross_sysconfdir}/pki
%dir %{_cross_factorydir}%{_cross_sysconfdir}/pki/tls
%dir %{_cross_factorydir}%{_cross_sysconfdir}/pki/tls/certs
Expand Down
4 changes: 3 additions & 1 deletion packages/chrony/chrony.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}chrony
Version: 3.5
Release: 1%{?dist}
Summary: A versatile implementation of the Network Time Protocol
License: GPLv2
License: GPL-2.0-only
URL: https://chrony.tuxfamily.org
Source0: https://download.tuxfamily.org/chrony/chrony-3.5.tar.gz
Source1: chronyd.service
Expand Down Expand Up @@ -45,6 +45,8 @@ install -d %{buildroot}%{_cross_sysusersdir}
install -p -m 0644 %{SOURCE3} %{buildroot}%{_cross_sysusersdir}/chrony.conf

%files
%license COPYING
%{_cross_attribution_file}
%dir %{_cross_templatedir}
%{_cross_bindir}/chronyc
%{_cross_sbindir}/chronyd
Expand Down
1 change: 0 additions & 1 deletion packages/cni-plugins/cni-plugins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ done
install -d %{buildroot}%{_cross_factorydir}/opt/cni/bin
install -p -m 0755 bin/* %{buildroot}%{_cross_factorydir}/opt/cni/bin

%cross_generate_attribution
%cross_scan_attribution go-vendor vendor

%files
Expand Down
4 changes: 3 additions & 1 deletion packages/cni/cni.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name: %{_cross_os}%{gorepo}
Version: %{rpmver}
Release: 1%{?dist}
Summary: Plugins for container networking
License: ASL 2.0
License: Apache-2.0
URL: https://%{goimport}
Source0: https://%{goimport}/archive/v%{gover}/%{gorepo}-%{gover}.tar.gz
BuildRequires: git
Expand All @@ -35,6 +35,8 @@ install -d %{buildroot}%{_cross_factorydir}/opt/cni/bin
install -p -m 0755 bin/cnitool %{buildroot}%{_cross_factorydir}/opt/cni/bin

%files
%license LICENSE
%{_cross_attribution_file}
%dir %{_cross_factorydir}/opt/cni/bin
%{_cross_factorydir}/opt/cni/bin/cnitool

Expand Down
5 changes: 4 additions & 1 deletion packages/conntrack-tools/conntrack-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Name: %{_cross_os}conntrack-tools
Version: 1.4.5
Release: 1%{?dist}
Summary: Tools for managing Linux kernel connection tracking
License: GPLv2
# src/utils.c contains GPLv2-only code from linux
License: GPL-2.0-or-later AND GPL-2.0-only
URL: http://conntrack-tools.netfilter.org/
Source0: https://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-%{version}.tar.bz2
Patch1: 0001-disable-RPC-helper.patch
Expand Down Expand Up @@ -44,6 +45,8 @@ autoreconf -fi
%make_install

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_sbindir}/conntrack
%exclude %{_cross_sbindir}/conntrackd
%exclude %{_cross_sbindir}/nfct
Expand Down
1 change: 0 additions & 1 deletion packages/containerd/containerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ install -p -m 0644 %{S:2} %{S:3} %{buildroot}%{_cross_templatedir}
install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:4} %{buildroot}%{_cross_tmpfilesdir}/containerd.conf

%cross_generate_attribution
%cross_scan_attribution --clarify %{S:1000} go-vendor vendor

%files
Expand Down
4 changes: 3 additions & 1 deletion packages/coreutils/coreutils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}coreutils
Version: 8.31
Release: 1%{?dist}
Summary: A set of basic GNU tools
License: GPLv3+
License: GPL-3.0-or-later
URL: https://www.gnu.org/software/coreutils/
Source0: https://ftp.gnu.org/gnu/coreutils/coreutils-%{version}.tar.xz
BuildRequires: %{_cross_os}glibc-devel
Expand Down Expand Up @@ -39,6 +39,8 @@ Requires: %{_cross_os}libxcrypt
%make_install

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_bindir}/[
%{_cross_bindir}/b2sum
%{_cross_bindir}/base32
Expand Down
4 changes: 3 additions & 1 deletion packages/dbus-broker/dbus-broker.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}dbus-broker
Version: 21
Release: 1%{?dist}
Summary: D-BUS message broker
License: ASL 2.0
License: Apache-2.0
URL: https://github.com/bus1/dbus-broker
Source0: https://github.com/bus1/dbus-broker/releases/download/v%{version}/dbus-broker-%{version}.tar.xz
Source1: dbus.socket
Expand Down Expand Up @@ -49,6 +49,8 @@ install -d %{buildroot}%{_cross_sysusersdir}
install -p -m 0644 %{S:3} %{buildroot}%{_cross_sysusersdir}/dbus.conf

%files
%license LICENSE
%{_cross_attribution_file}
%{_cross_bindir}/dbus-broker
%{_cross_bindir}/dbus-broker-launch
%dir %{_cross_datadir}/dbus-1
Expand Down
1 change: 0 additions & 1 deletion packages/docker-cli/docker-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ go build -buildmode pie -tags="${BUILDTAGS}" -o docker %{goimport}/cmd/docker
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 docker %{buildroot}%{_cross_bindir}

%cross_generate_attribution
%cross_scan_attribution --clarify %{S:1000} go-vendor vendor

%files
Expand Down
1 change: 0 additions & 1 deletion packages/docker-engine/docker-engine.spec
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ install -p -m 0644 %{S:4} %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/d
install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:5} %{buildroot}%{_cross_tmpfilesdir}/docker.conf

%cross_generate_attribution
%cross_scan_attribution --clarify %{S:1000} go-vendor vendor

%files
Expand Down
2 changes: 2 additions & 0 deletions packages/docker-init/docker-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 tini-static %{buildroot}%{_cross_bindir}/docker-init

%files
%license LICENSE
%{_cross_attribution_file}
%{_cross_bindir}/docker-init

%changelog
1 change: 0 additions & 1 deletion packages/docker-proxy/docker-proxy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ go build -buildmode pie -tags="${BUILDTAGS}" -o docker-proxy %{goimport}/cmd/pro
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 docker-proxy %{buildroot}%{_cross_bindir}

%cross_generate_attribution
%cross_scan_attribution --clarify %{S:1000} go-vendor vendor

%files
Expand Down
4 changes: 3 additions & 1 deletion packages/filesystem/filesystem.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
%global _cross_first_party 1

Name: %{_cross_os}filesystem
Version: 1.0
Release: 1%{?dist}
Summary: The basic directory layout
License: Public Domain
License: LicenseRef-Pending
BuildArch: noarch

%description
Expand Down
4 changes: 3 additions & 1 deletion packages/findutils/findutils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}findutils
Version: 4.7.0
Release: 1%{?dist}
Summary: A set of GNU tools for finding
License: GPLv3+
License: GPL-3.0-or-later
URL: http://www.gnu.org/software/findutils/
Source0: https://ftp.gnu.org/pub/gnu/findutils/findutils-%{version}.tar.xz
BuildRequires: %{_cross_os}glibc-devel
Expand All @@ -23,6 +23,8 @@ Requires: %{_cross_os}libselinux
%make_install

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_bindir}/find
%{_cross_bindir}/xargs
%exclude %{_cross_bindir}/locate
Expand Down
4 changes: 3 additions & 1 deletion packages/glibc/glibc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}glibc
Version: 2.30
Release: 1%{?dist}
Summary: The GNU libc libraries
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL
License: LGPL-2.1-or-later AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND GPL-2.0-or-later AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND ISC
URL: http://www.gnu.org/software/glibc/
Source0: https://ftp.gnu.org/gnu/glibc/glibc-%{version}.tar.xz
Source1: glibc-tmpfiles.conf
Expand Down Expand Up @@ -73,6 +73,8 @@ truncate -s 0 %{buildroot}%{_cross_datadir}/locale/locale.alias
chmod 644 %{buildroot}%{_cross_datadir}/locale/locale.alias

%files
%license COPYING COPYING.LIB LICENSES
%{_cross_attribution_file}
%{_cross_tmpfilesdir}/glibc.conf
%exclude %{_cross_sysconfdir}/rpc

Expand Down
5 changes: 4 additions & 1 deletion packages/grub/grub.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Name: %{_cross_os}grub
Version: 2.04
Release: 1%{?dist}
Summary: Bootloader with support for Linux and more
License: GPLv3+
License: GPL-3.0-or-later AND Unicode-DFS-2015
URL: https://www.gnu.org/software/grub/
Source0: https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
Source1: core.cfg
Expand Down Expand Up @@ -75,6 +75,7 @@ Summary: Tools for the bootloader with support for Linux and more

%prep
%autosetup -n grub-%{version} -p1
cp unicode/COPYING COPYING.unicode

%global grub_cflags -pipe -fno-stack-protector -fno-strict-aliasing
%global grub_ldflags -static
Expand Down Expand Up @@ -129,6 +130,8 @@ install -m 0644 ./grub-core/boot.img \
%endif

%files
%license COPYING COPYING.unicode
%{_cross_attribution_file}
%dir %{_cross_grubdir}
%if %{_cross_arch} == x86_64
%{_cross_grubdir}/boot.img
Expand Down
5 changes: 2 additions & 3 deletions packages/host-ctr/host-ctr.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
%global _cross_first_party 1
%global workspace_name host-ctr

Name: %{_cross_os}%{workspace_name}
Version: 0.0
Release: 0%{?dist}
Summary: Thar host container runner
License: FIXME
License: LicenseRef-Pending
BuildRequires: %{_cross_os}glibc-devel
Requires: %{_cross_os}containerd

Expand Down Expand Up @@ -37,11 +38,9 @@ install -p -m 0644 %{S:11} %{buildroot}%{_cross_tmpfilesdir}/host-containerd.con
install -d %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/host-containerd
install -p -m 0644 %{S:12} %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/host-containerd/config.toml

#%%cross_generate_attribution FIXME
%cross_scan_attribution go-vendor vendor

%files
#%%{_cross_attribution_file} FIXME
%{_cross_attribution_vendor_dir}
%{_cross_bindir}/host-ctr
%{_cross_unitdir}/host-containerd.service
Expand Down
4 changes: 3 additions & 1 deletion packages/iproute/iproute.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}iproute
Version: 4.19.0
Release: 1%{?dist}
Summary: Tools for advanced IP routing and network device configuration
License: GPLv2+ and Public Domain
License: GPL-2.0-or-later AND GPL-2.0-only
URL: http://kernel.org/pub/linux/utils/net/iproute2/
Source0: http://kernel.org/pub/linux/utils/net/iproute2/iproute2-%{version}.tar.xz
Patch1: 0001-skip-libelf-check.patch
Expand Down Expand Up @@ -54,6 +54,8 @@ for f in %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/iproute2/* ; do
done

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_sbindir}/bridge
%{_cross_sbindir}/ctstat
%{_cross_sbindir}/devlink
Expand Down
4 changes: 3 additions & 1 deletion packages/iptables/iptables.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: %{_cross_os}iptables
Version: 1.8.4
Release: 1%{?dist}
Summary: Tools for managing Linux kernel packet filtering capabilities
License: GPLv2
License: GPL-2.0-or-later AND GPL-2.0-only
URL: http://www.netfilter.org/
Source0: http://www.netfilter.org/projects/iptables/files/iptables-%{version}.tar.bz2
Patch1: 0001-iptables-apply-Use-mktemp-instead-of-tempfile.patch
Expand Down Expand Up @@ -51,6 +51,8 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_install

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_sbindir}/xtables-legacy-multi
%{_cross_sbindir}/iptables
%{_cross_sbindir}/iptables-legacy
Expand Down
Loading

0 comments on commit 4b09828

Please sign in to comment.