Skip to content

Commit 184a2df

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 184a2df

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-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: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,33 @@ 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+
71+
WORKDIR /artifacts/packages/centos7
72+
73+
RUN for arch in $(ls /artifacts/packages/centos7-src/); do \
74+
mkdir -p /artifacts/packages/centos7/${arch}; \
75+
cd /artifacts/packages/centos7/${arch}; \
76+
# For each package in the source folder we recreate a package.
77+
for src_package in $(ls /artifacts/packages/centos7-src/${arch}/*.rpm); do \
78+
fpm -s rpm -t rpm ${src_package}; \
79+
done; \
80+
done; \
81+
rm -rf /artifacts/packages/centos7-src
82+
5683
# The packaging stage collects the deb and rpm packages built for
5784
# supported architectures.
5885
FROM nvcr.io/nvidia/distroless/go:v3.2.0-dev AS packaging
@@ -62,9 +89,8 @@ SHELL ["/busybox/sh", "-c"]
6289
RUN ln -s /busybox/sh /bin/sh
6390

6491
ARG ARTIFACTS_ROOT
65-
COPY ${ARTIFACTS_ROOT} /artifacts/packages/
66-
67-
WORKDIR /artifacts
92+
COPY ${ARTIFACTS_ROOT}/ubuntu18.04 /artifacts/packages/ubuntu18.04
93+
COPY --from=rpmdigests /artifacts/packages/centos7 /artifacts/packages/centos7
6894

6995
# build-args are added to the manifest.txt file below.
7096
ARG PACKAGE_VERSION

0 commit comments

Comments
 (0)