kbuild/mkspec: avoid using brace expansion
authorAnton Tikhomirov <anton.tikhomirov@cdnetworks.com>
Tue, 25 Oct 2016 09:00:44 +0000 (18:00 +0900)
committerMichal Marek <mmarek@suse.com>
Sun, 11 Dec 2016 11:07:00 +0000 (12:07 +0100)
Brace expansion might not work properly if _buildshell RPM macro
points to a shell other than bash. Particularly, with _bulidshell
defined to /bin/dash it leads to broken build and source symlinks.

Signed-off-by: Anton Tikhomirov <anton.tikhomirov@cdnetworks.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/package/mkspec

index 57673bae5597ab9a5078fe9527825aa4456086c9..bb43f153fd8e70fd48c32a2f92fa6699242501f7 100755 (executable)
@@ -116,7 +116,8 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
 echo "%endif"
 
 if ! $PREBUILT; then
-echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
+echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build"
+echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
 echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"