mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Starr <shawn.starr@rogers.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH][BUILD] Force check for rpm-build where package is not installed
Date: Sat, 12 Oct 2013 15:39:05 -0400	[thread overview]
Message-ID: <13301057.7X5ko0dHEr@segfault.sh0n.net> (raw)
In-Reply-To: <2492370.jKSlzuQ6pe@segfault.sh0n.net>

On Saturday, October 12, 2013 03:03:32 PM Shawn Starr wrote:
> Hello folks,
> 
> My usual approach to testing git snapshots of Linus's tree (with custom
> patches applied on top) is to make rpm and install this into my system for a
> clean add/remove of test kernels.
> 
> However,  the developers of rpm removed the --target and -ta options, so I
> can't take tarball and build into RPM anymore.
> 
> Since I last built custom RPM builds of Linus's tree was likely Fedora 18,
> it seems the option target got removed by 19.
> 
> Any ideas, fixes?
> 
> Thanks,
> Shawn

Sorry for noise,  I was missing rpm-build. That said, here's a patch to force check for rpm-build as any modern RPM distribution should be be using a newer rpm release.

Thanks,
Shawn

Signed-off-by: Shawn Starr <shawn.starr@rogers.com>
---
 scripts/package/Makefile               | 8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)
	
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index a4f31c9..aac24de 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -23,7 +23,7 @@
 
 # Do we have rpmbuild, otherwise fall back to the older rpm
 RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
-                  else echo rpm; fi)
+                  else echo none; fi)
 
 # Remove hyphens since they have special meaning in RPM filenames
 KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
@@ -51,6 +51,12 @@ rpm-pkg rpm: FORCE
        rm -f $(objtree)/.scmversion
        $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
        mv -f $(objtree)/.tmp_version $(objtree)/.version
+       @if test "$(RPM)" != "rpmbuild"; then \
+               echo "To build the kernel you must install the rpm-build package from your distri
+               echo "aborting package creation." ; \
+               false; \
+       fi
+
        $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
        rm $(KERNELPATH).tar.gz kernel.spec
 


  reply	other threads:[~2013-10-12 19:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12 19:03 No longer able to build kernel into RPM on Fedora Shawn Starr
2013-10-12 19:39 ` Shawn Starr [this message]
2013-10-12 19:42   ` resend [PATCH][BUILD] Force check for rpm-build where package is not installed Shawn Starr
2013-10-13  0:35 ` No longer able to build kernel into RPM on Fedora Chris Jones
2013-10-13  1:12   ` Shawn Starr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13301057.7X5ko0dHEr@segfault.sh0n.net \
    --to=shawn.starr@rogers.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®