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