Skip to content
Open
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
1 change: 1 addition & 0 deletions packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ The scripts will build for this list of packages types:
* RPM packages for Fedora 30
* RPM packages for Fedora 29
* RPM packages for CentOS 7
* RPM packages for Rocky Linux 9
* TGZ and ZIP files with static binaries
10 changes: 7 additions & 3 deletions packaging/rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES))

FEDORA_RELEASES := fedora-36 fedora-35
CENTOS_RELEASES :=
ROCKYLINUX_RELEASES := rockylinux-9

.PHONY: help
help: ## show make targets
Expand All @@ -55,16 +56,19 @@ clean: ## remove build artifacts
$(RM) -r rpmbuild/

.PHONY: rpm
rpm: fedora centos ## build all rpm packages
rpm: fedora centos rockylinux ## build all rpm packages

.PHONY: fedora
fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages

.PHONY: centos
centos: $(CENTOS_RELEASES) ## build all centos rpm packages

.PHONY: $(FEDORA_RELEASES) $(CENTOS_RELEASES)
$(FEDORA_RELEASES) $(CENTOS_RELEASES): $(SOURCES)
.PHONY: rockylinux
rockylinux: $(ROCKYLINUX_RELEASES) ## build all rocky rpm packages

.PHONY: $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(ROCKYLINUX_RELEASES)
$(FEDORA_RELEASES) $(CENTOS_RELEASES) $(ROCKYLINUX_RELEASES): $(SOURCES)
@echo "${APP_DIR}"
@echo "${VERSION}"
@echo "$(shell ./gen-rpm-ver $(APP_DIR) $(VERSION))"
Expand Down
3 changes: 3 additions & 0 deletions packaging/rpm/SPECS/cri-dockerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ Requires: (iptables or nftables)
Requires: iptables
%endif
%if %{undefined suse_version}
%if %{undefined rhel} || 0%{?rhel} < 9
# Libcgroup is no longer available in RHEL/CentOS >= 9 distros.
Requires: libcgroup
%endif
%endif
Requires: containerd.io >= 1.2.2-3
Requires: tar
Requires: xz
Expand Down
25 changes: 25 additions & 0 deletions packaging/rpm/rockylinux-9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG GO_IMAGE
ARG DISTRO=rockylinux
ARG SUITE=9
ARG BUILD_IMAGE=${DISTRO}:${SUITE}

FROM ${GO_IMAGE} AS golang

FROM ${BUILD_IMAGE}
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV GOPROXY=direct
ENV GOPATH=/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
RUN yum install -y rpm-build rpmlint yum-utils
RUN dnf config-manager --set-enabled crb
COPY SPECS /root/rpmbuild/SPECS
RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]