From 9e06d7b0dd45ca9b2bd30ca84bc910dd50ada840 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 22 Oct 2024 14:49:39 -0500 Subject: [PATCH] make the bash subst more like original --- Containerfile.common | 2 +- Containerfile.extra | 2 +- Containerfile.nvidia | 2 +- Containerfile.nvidia-open | 2 +- Containerfile.zfs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Containerfile.common b/Containerfile.common index 6cc16736..70c26a3c 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -68,7 +68,7 @@ RUN set -e; \ kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \ for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ - name=${basename/-${kernel_version}*/}; \ + name=${basename%%-${kernel_version}*}; \ if [[ "$basename" == *"$kernel_version"* ]]; then \ fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ else \ diff --git a/Containerfile.extra b/Containerfile.extra index 652cdf58..8a3b8edd 100644 --- a/Containerfile.extra +++ b/Containerfile.extra @@ -68,7 +68,7 @@ RUN set -e; \ kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \ for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ - name=${basename/-${kernel_version}*/}; \ + name=${basename%%-${kernel_version}*}; \ if [[ "$basename" == *"$kernel_version"* ]]; then \ fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ else \ diff --git a/Containerfile.nvidia b/Containerfile.nvidia index e2d352c4..51d625ab 100644 --- a/Containerfile.nvidia +++ b/Containerfile.nvidia @@ -65,7 +65,7 @@ RUN set -e; \ kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \ for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ - name=${basename/-${kernel_version}*/}; \ + name=${basename%%-${kernel_version}*}; \ if [[ "$basename" == *"$kernel_version"* ]]; then \ fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ else \ diff --git a/Containerfile.nvidia-open b/Containerfile.nvidia-open index bd193ece..6670e78a 100644 --- a/Containerfile.nvidia-open +++ b/Containerfile.nvidia-open @@ -65,7 +65,7 @@ RUN set -e; \ kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \ for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ - name=${basename/-${kernel_version}*/}; \ + name=${basename%%-${kernel_version}*}; \ if [[ "$basename" == *"$kernel_version"* ]]; then \ fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ else \ diff --git a/Containerfile.zfs b/Containerfile.zfs index 131a0fef..5a581a38 100644 --- a/Containerfile.zfs +++ b/Containerfile.zfs @@ -42,7 +42,7 @@ RUN set -e; \ kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \ for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ - name=${basename/-${kernel_version}*/}; \ + name=${basename%%-${kernel_version}*}; \ if [[ "$basename" == *"$kernel_version"* ]]; then \ fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ else \