Skip to content

redhat/kernel.spec.template: avoid process substitution

Wang Yugui reports that the process substitution construct doesn't work in old environments (e.g. rhel7 + devtoolsets-8): /var/tmp/rpm-tmp.mVZU4h: line 696: syntax error near unexpected token `<'

      while read -r kmod; do
          local target_file="$RPM_BUILD_ROOT/lib/modules/$KernelVer/$subdir_name/$kmod"
          local target_dir="${target_file%/*}"
          mkdir -p "$target_dir"
          mv "$RPM_BUILD_ROOT/lib/modules/$KernelVer/kernel/$kmod" "$target_dir"

L696: done < <(sed -e 's|^kernel/||' "$module_list") set -x

Simplify it using a temp file.

Fixes: ad0b8a85 ("spec: rework filter-mods and mod-denylist") Reported-by: Wang Yugui wangyugui@e16-tech.com Signed-off-by: Jan Stancek jstancek@redhat.com

Merge request reports