Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbbF3LsP (ORCPT ); Tue, 30 Jun 2015 07:48:15 -0400 Received: from numascale.com ([213.162.240.84]:57676 "EHLO numascale.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbbF3LsI (ORCPT ); Tue, 30 Jun 2015 07:48:08 -0400 From: Espen Carlsen To: Michal Marek Cc: Espen Carlsen , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel J Blueman , Steffen Persvold Subject: [PATCH, resend] build: fix broken kernel RPM source symlink Date: Tue, 30 Jun 2015 13:47:22 +0200 Message-Id: <1435664842-17908-1-git-send-email-ec@numascale.com> X-Mailer: git-send-email 1.9.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel21.proisp.no X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - numascale.com X-Get-Message-Sender-Via: cpanel21.proisp.no: authenticated_id: ec@numascale.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1761 Lines: 40 Fix the 'rpm-pkg' makefile target to always generate the correct /usr/src/kernel/ 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 --- scripts/package/mkspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index d9ab94b..2d28d48 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -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 "" -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/