From 40bc5d25cdc685e97957b8eb358416cc9ea60565 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 17:30:23 +0200 Subject: [PATCH] fix: add arg so f41 builds --- Containerfile.common | 7 +++++-- Containerfile.extra | 7 +++++-- Containerfile.nvidia | 7 +++++-- Containerfile.nvidia-open | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Containerfile.common b/Containerfile.common index 5c6b88e3..af22b5af 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -63,10 +63,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch diff --git a/Containerfile.extra b/Containerfile.extra index 2fcc02ab..5e3e0012 100644 --- a/Containerfile.extra +++ b/Containerfile.extra @@ -63,10 +63,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch diff --git a/Containerfile.nvidia b/Containerfile.nvidia index 63da8f21..be15ec0a 100644 --- a/Containerfile.nvidia +++ b/Containerfile.nvidia @@ -60,10 +60,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch diff --git a/Containerfile.nvidia-open b/Containerfile.nvidia-open index f869bcd0..bf6b7184 100644 --- a/Containerfile.nvidia-open +++ b/Containerfile.nvidia-open @@ -60,10 +60,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch