* [PATCH] fix for RPM build target under newer versions
@ 2002-12-17 10:40 peter
2002-12-17 10:44 ` Henning P. Schmiedehausen
0 siblings, 1 reply; 2+ messages in thread
From: peter @ 2002-12-17 10:40 UTC (permalink / raw)
To: linux-kernel, Keith Owens, Michael E Chastain, kbuild-devel,
Linus Torvalds
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
Hi all,
I notice there's an "rpm" target in the Makefile, which seems broken
under RH 8.0. This may also apply to some "bleeding-edge" versions of
Mandrake and Suse. Specifically, RH "split" the RPM build process into a
separate utility from the old style rpm command. This could be fixed
with a few aliases to keep backwards compatibility a bit easier. I
wonder why an RH install doesn't already do this?
The reason why I'm sending this is because it's in the Makefile itself.
If it wasn't for that, I'd just use the aliases mentioned above.
[-- Attachment #2: Makefile.patch --]
[-- Type: text/plain, Size: 697 bytes --]
--- /usr/src/linux-2.4.19/Makefile 2002-12-15 19:04:20.000000000 -0500
+++ /home/pete/Makefile.new 2002-12-17 04:36:49.000000000 -0500
@@ -567,5 +567,16 @@
rm $(KERNELPATH) ; \
cd $(TOPDIR) ; \
. scripts/mkversion > .version ; \
- rpmbuild -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
+
+# RedHat split the RPM build process into a separate
+# utility called "rpmbuild", leading to a broken
+# "make rpm" target in the kernel Makefile;
+# this patch fixes that.
+
+ if [ `rpm --version | cut -b 12-15 | tr -d .` -ge '41' ] ;
+ then
+ rpmbuild -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
+ else
+ rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
+ fi ; \
rm $(TOPDIR)/../$(KERNELPATH).tar.gz
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix for RPM build target under newer versions
2002-12-17 10:40 [PATCH] fix for RPM build target under newer versions peter
@ 2002-12-17 10:44 ` Henning P. Schmiedehausen
0 siblings, 0 replies; 2+ messages in thread
From: Henning P. Schmiedehausen @ 2002-12-17 10:44 UTC (permalink / raw)
To: linux-kernel
peter <pvant67@wnyip.net> writes:
>--- /usr/src/linux-2.4.19/Makefile 2002-12-15 19:04:20.000000000 -0500
>+++ /home/pete/Makefile.new 2002-12-17 04:36:49.000000000 -0500
>@@ -567,5 +567,16 @@
> rm $(KERNELPATH) ; \
> cd $(TOPDIR) ; \
> . scripts/mkversion > .version ; \
>- rpmbuild -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
>+
>+# RedHat split the RPM build process into a separate
>+# utility called "rpmbuild", leading to a broken
>+# "make rpm" target in the kernel Makefile;
>+# this patch fixes that.
>+
>+ if [ `rpm --version | cut -b 12-15 | tr -d .` -ge '41' ] ;
>+ then
>+ rpmbuild -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
>+ else
>+ rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
>+ fi ; \
Ugh. How about
--- cut ---
RPM=`which rpmbuild`
if [ -z "$RPM" ]; then
RPM=rpm
fi
$RPM -ta $(TOPDIR)/../$(KERNELPATH).tar.gz
--- cut ---
Looks less fragile. On RH 7.3 (and RH 6.x with upgrades) you also have
a rpmbuild binary (but rpm still does building, this got deprecated
and later removed on 8.0).
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-17 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-17 10:40 [PATCH] fix for RPM build target under newer versions peter
2002-12-17 10:44 ` Henning P. Schmiedehausen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.