Skip to content

Commit

Permalink
Add LICENSE file to RPMs (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewtorr-msft authored Oct 26, 2023
1 parent 5ebb8cd commit 05006ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packaging/rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $< $@
3 changes: 3 additions & 0 deletions packaging/rpm/SPECS/cri-dockerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -59,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
Expand All @@ -80,6 +82,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
Expand Down

0 comments on commit 05006ab

Please sign in to comment.