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: <1257315285-6782-1-git-send-email-akinobu.mita@gmail.com>
Date:	Wed,  4 Nov 2009 15:14:45 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Akinobu Mita <akinobu.mita@...il.com>,
	Sam Ravnborg <sam@...nborg.org>, Frans Pop <elendil@...net.nl>
Subject: [PATCH] kbuild: let make O=dir rpm-pkg fail

make rpm-pkg with setting KBUILD_OUTPUT is not possible and
it will print the good message since the commit
db9038c89d129383a9db2afcb72b504fe54f6edf

$ KBUILD_OUTPUT=dir make rpm-pkg
...
Building source + binary RPM is not possible outside the
kernel source tree. Don't set KBUILD_OUTPUT, or use the
binrpm-pkg target instead.
...

make O=dir should have the same effect of KBUILD_OUTPUT, but
it won't print that message.

This fixes it by exporting KBUILD_OUTPUT if O= is set so that
the rpm-pkg target in scripts/package/Makefile can find it.

Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
Cc: Sam Ravnborg <sam@...nborg.org>
Cc: Frans Pop <elendil@...net.nl>
---
 Makefile                 |    2 +-
 scripts/package/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b4c04f7..cfee468 100644
--- a/Makefile
+++ b/Makefile
@@ -93,7 +93,7 @@ ifeq ($(KBUILD_SRC),)
 # OK, Make called in directory where kernel src resides
 # Do we want to locate output files in a separate directory?
 ifeq ("$(origin O)", "command line")
-  KBUILD_OUTPUT := $(O)
+  export KBUILD_OUTPUT := $(O)
 endif
 
 # That's our default target when none is given on the command line
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index f67cc88..5db03d7 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -19,7 +19,7 @@
 # - Use /. to avoid tar packing just the symlink
 
 # Note that the rpm-pkg target cannot be used with KBUILD_OUTPUT,
-# but the binrpm-pkg target can; for some reason O= gets ignored.
+# but the binrpm-pkg target can.
 
 # Do we have rpmbuild, otherwise fall back to the older rpm
 RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
-- 
1.6.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ