Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LICENSE file to RPMs #267

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
nwneisen marked this conversation as resolved.
Show resolved Hide resolved

%post
%systemd_post cri-docker.service
Expand Down
Loading