Skip to content

Commit 85cfb7f

Browse files
committed
Update rpm package to have 256bit digests
This change uses fpm to update the built rpm packages to have 256bit digests without changing their contents. Signed-off-by: Evan Lezar <[email protected]>
1 parent 8a85cad commit 85cfb7f

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.git
22
/shared-*
3+
release-v*/**

deployments/container/Dockerfile

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,35 @@ ARG VERSION="N/A"
5353
ARG GIT_COMMIT="unknown"
5454
RUN make PREFIX=/artifacts/bin cmd-nvidia-ctk-installer
5555

56+
# The rpmdigests stage updates the existing rpm packages to have 256bit digests.
57+
# This is done using fpm.
58+
FROM nvcr.io/nvidia/cuda:13.0.1-base-ubi9 AS rpmdigests
59+
60+
RUN dnf install -y \
61+
rubygems \
62+
ruby-devel \
63+
yum-utils \
64+
rpm-build \
65+
&& gem install --no-document fpm
66+
67+
ARG ARTIFACTS_ROOT
68+
COPY ${ARTIFACTS_ROOT}/centos7 /artifacts/packages/centos7-src
69+
70+
WORKDIR /artifacts/packages/centos7
71+
72+
# For each architecture from the source we find all packages and update the
73+
# digests.
74+
RUN for arch in $(ls /artifacts/packages/centos7-src/); do \
75+
mkdir -p /artifacts/packages/centos7/${arch}; \
76+
cd /artifacts/packages/centos7/${arch}; \
77+
# For each package in the source folder we recreate a package to update
78+
# the digests to 256-bit since we're running in a ubi9 container.
79+
for src_package in $(ls /artifacts/packages/centos7-src/${arch}/*.rpm); do \
80+
fpm -s rpm -t rpm ${src_package}; \
81+
done; \
82+
done; \
83+
rm -rf /artifacts/packages/centos7-src
84+
5685
# The packaging stage collects the deb and rpm packages built for
5786
# supported architectures.
5887
FROM nvcr.io/nvidia/distroless/go:v3.2.0-dev AS packaging
@@ -62,9 +91,8 @@ SHELL ["/busybox/sh", "-c"]
6291
RUN ln -s /busybox/sh /bin/sh
6392

6493
ARG ARTIFACTS_ROOT
65-
COPY ${ARTIFACTS_ROOT} /artifacts/packages/
66-
67-
WORKDIR /artifacts
94+
COPY ${ARTIFACTS_ROOT}/ubuntu18.04 /artifacts/packages/ubuntu18.04
95+
COPY --from=rpmdigests /artifacts/packages/centos7 /artifacts/packages/centos7
6896

6997
# build-args are added to the manifest.txt file below.
7098
ARG PACKAGE_VERSION

0 commit comments

Comments
 (0)