Skip to content

Commit

Permalink
fix: add arg so f41 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Oct 20, 2024
1 parent 0501278 commit 40bc5d2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
7 changes: 5 additions & 2 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Containerfile.extra
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Containerfile.nvidia
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Containerfile.nvidia-open
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40bc5d2

Please sign in to comment.