lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1489276762-22280-1-git-send-email-trini@konsulko.com>
Date:   Sat, 11 Mar 2017 23:59:22 +0000
From:   Tom Rini <trini@...sulko.com>
To:     linux-kbuild@...r.kernel.org
Cc:     Michal Marek <mmarek@...e.com>, linux-kernel@...r.kernel.org,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>
Subject: [PATCH] kbuild/mkspec: Fix architectures where KBUILD_IMAGE isn't a full path

On some architectures, such as arm64, KBUILD_IMAGE is not a full path
but instead just the build target.  The builddeb script handles this
case correctly today and will try arch/$ARCH/boot/$KBUILD_IMAGE so we
can just borrow that logic and adapt it slightly for spec file syntax.

Cc: Michal Marek <mmarek@...e.com>
Cc: linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
Signed-off-by: Tom Rini <trini@...sulko.com>
---
It is currently a mixed-bag on if architectures will use a build target
(arm, arm64, arc are certainly by inspection and a few others 'may') or
a full path (x86, blackfin, s390).  Given that builddeb gets this case
correct, I think changing mkspec is the right way to go here.
---
 scripts/package/mkspec | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index bb43f153fd8e..aa5f3db43f12 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -101,7 +101,11 @@ echo "%ifarch ppc64"
 echo "cp vmlinux arch/powerpc/boot"
 echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
 echo "%else"
-echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo "if [ -e $KBUILD_IMAGE ]; then"
+echo '  cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo "else"
+echo '  cp arch/$ARCH/boot/$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo "fi"
 echo "%endif"
 echo "%endif"
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ