From 4c3d89e11ad8e2810fc7916313442cdc313f0965 Mon Sep 17 00:00:00 2001 From: Matthew Torr Date: Mon, 23 Oct 2023 15:53:56 +0100 Subject: [PATCH 1/3] Add LICENSE file to RPMs --- packaging/rpm/SPECS/cri-dockerd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/rpm/SPECS/cri-dockerd.spec b/packaging/rpm/SPECS/cri-dockerd.spec index 932fc1eb6..9c98b7b9b 100644 --- a/packaging/rpm/SPECS/cri-dockerd.spec +++ b/packaging/rpm/SPECS/cri-dockerd.spec @@ -80,6 +80,7 @@ install -D -m 0644 %{_topdir}/SOURCES/cri-docker.socket $RPM_BUILD_ROOT/%{_unitd /%{_bindir}/cri-dockerd /%{_unitdir}/cri-docker.service /%{_unitdir}/cri-docker.socket +%license LICENSE %post %systemd_post cri-docker.service From 0f79cb7ef158152537f4dffcc349421913c9be3f Mon Sep 17 00:00:00 2001 From: Matthew Torr Date: Tue, 24 Oct 2023 16:55:56 +0100 Subject: [PATCH 2/3] Speculative fix for adding LICENSE as a source --- packaging/rpm/Makefile | 6 +++++- packaging/rpm/SPECS/cri-dockerd.spec | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packaging/rpm/Makefile b/packaging/rpm/Makefile index 8aa5b87ca..0ad393aaa 100644 --- a/packaging/rpm/Makefile +++ b/packaging/rpm/Makefile @@ -39,7 +39,7 @@ RPMBUILD_FLAGS?=-ba\ $(SPECS) RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS) -SOURCE_FILES=app.tgz cri-docker.service cri-docker.socket +SOURCE_FILES=app.tgz cri-docker.service cri-docker.socket LICENSE SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) FEDORA_RELEASES := fedora-36 fedora-35 @@ -89,3 +89,7 @@ rpmbuild/SOURCES/cri-docker.service: ../systemd/cri-docker.service rpmbuild/SOURCES/cri-docker.socket: ../systemd/cri-docker.socket mkdir -p $(@D) cp $< $@ + +rpmbuild/SOURCES/LICENSE: ../../LICENSE + mkdir -p $(@D) + cp $< $@ diff --git a/packaging/rpm/SPECS/cri-dockerd.spec b/packaging/rpm/SPECS/cri-dockerd.spec index 9c98b7b9b..79ba177df 100644 --- a/packaging/rpm/SPECS/cri-dockerd.spec +++ b/packaging/rpm/SPECS/cri-dockerd.spec @@ -8,6 +8,7 @@ Epoch: 3 Source0: app.tgz Source1: cri-docker.service Source2: cri-docker.socket +Source3: LICENSE Summary: A CRI interface for Docker Group: Tools/Docker License: ASL 2.0 @@ -76,6 +77,9 @@ install -D -p -m 0755 $(readlink -f app/cri-dockerd) $RPM_BUILD_ROOT/%{_bindir}/ install -D -m 0644 %{_topdir}/SOURCES/cri-docker.service $RPM_BUILD_ROOT/%{_unitdir}/cri-docker.service install -D -m 0644 %{_topdir}/SOURCES/cri-docker.socket $RPM_BUILD_ROOT/%{_unitdir}/cri-docker.socket +# install license +install -D -m 0644 %{_topdir}/SOURCES/LICENSE $RPM_BUILD_ROOT/LICENSE + %files /%{_bindir}/cri-dockerd /%{_unitdir}/cri-docker.service From 7be16a949f87171c2dde88049225079ccf0e72e9 Mon Sep 17 00:00:00 2001 From: Matthew Torr Date: Thu, 26 Oct 2023 12:41:35 +0100 Subject: [PATCH 3/3] copy LICENSE during build step install of install step --- packaging/rpm/SPECS/cri-dockerd.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packaging/rpm/SPECS/cri-dockerd.spec b/packaging/rpm/SPECS/cri-dockerd.spec index 79ba177df..a5be5a1c5 100644 --- a/packaging/rpm/SPECS/cri-dockerd.spec +++ b/packaging/rpm/SPECS/cri-dockerd.spec @@ -60,6 +60,7 @@ cri-dockerd is a lightweight implementation of the CRI specification which talks %setup -q -c -n src -a 0 %build +cp %{_topdir}/SOURCES/LICENSE /root/rpmbuild/BUILD/src/LICENSE export CRI_DOCKER_GITCOMMIT=%{_gitcommit} mkdir -p /go/src/github.com/Mirantis ln -s /root/rpmbuild/BUILD/src/app /go/src/github.com/Mirantis/cri-dockerd @@ -77,9 +78,6 @@ install -D -p -m 0755 $(readlink -f app/cri-dockerd) $RPM_BUILD_ROOT/%{_bindir}/ install -D -m 0644 %{_topdir}/SOURCES/cri-docker.service $RPM_BUILD_ROOT/%{_unitdir}/cri-docker.service install -D -m 0644 %{_topdir}/SOURCES/cri-docker.socket $RPM_BUILD_ROOT/%{_unitdir}/cri-docker.socket -# install license -install -D -m 0644 %{_topdir}/SOURCES/LICENSE $RPM_BUILD_ROOT/LICENSE - %files /%{_bindir}/cri-dockerd /%{_unitdir}/cri-docker.service