build: fix broken kernel RPM source symlink
PATCH 1/1 build: fix broken kernel RPM source symlink
Fix the 'rpm-pkg' makefile target to always generate the correct /usr/src/kernel/<ver> symlink; this fails on non-RPM-native systems eg Ubuntu.
On a non-RPM-native system, the symlink created by rpmbuild points to the source tree, so the ln -sf commands to overwrite build and source will create a new link inside the directory pointed to by the build and source symlinks. This will break the -devel.rpm, as the build and source symlinks will point to non existing directories after installing them.
Candidate for stable.
Signed-off-by Espen Carlsen <[email protected]>
--- scripts/package/mkspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/package/mkspec +2 -2
@@ -123,8 +123,8 @@ 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 -)" echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" -echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" -echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" +echo "ln -sfT /usr/src/kernels/$KERNELRELEASE build" +echo "ln -sfT /usr/src/kernels/$KERNELRELEASE source" fi echo ""
Signature · 1 line
1.9.1