2007-11-26 08:57:01

by Robert P. J. Day

[permalink] [raw]
Subject: can support for "rpm"-based package building just be dropped?


by that, i mean *requiring* the "rpmbuild" command, and not
accepting "rpm" as a subsititute, as you can read in
scripts/package/Makefile:

# 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)

on current systems, "rpm" no longer has build capability and will
fail thusly:

rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
--target: unknown option

so it would make more sense to just require "rpmbuild" on the
machine, would it not?

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================


2007-11-26 14:58:33

by Ray Lee

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Nov 26, 2007 12:54 AM, Robert P. J. Day <[email protected]> wrote:
> on current systems, "rpm" no longer has build capability and will
> fail thusly:
>
> rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
> --target: unknown option
>
> so it would make more sense to just require "rpmbuild" on the
> machine, would it not?

Only on current machines. You'd break building kernel RPMs on older
systems that don't have rpmbuild installed. So the change wouldn't fix
anything, and would break some non-zero number of setups that are
currently working, making the change a guaranteed net loss.

A patch that added version checks against rpm and whinged
appropriately about needing rpmbuild would likely be accepted, though.

2007-11-26 15:10:31

by Robert P. J. Day

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Mon, 26 Nov 2007, Ray Lee wrote:

> On Nov 26, 2007 12:54 AM, Robert P. J. Day <[email protected]> wrote:
> > on current systems, "rpm" no longer has build capability and will
> > fail thusly:
> >
> > rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
> > --target: unknown option
> >
> > so it would make more sense to just require "rpmbuild" on the
> > machine, would it not?
>
> Only on current machines. You'd break building kernel RPMs on older
> systems that don't have rpmbuild installed. So the change wouldn't
> fix anything, and would break some non-zero number of setups that
> are currently working, making the change a guaranteed net loss.
>
> A patch that added version checks against rpm and whinged
> appropriately about needing rpmbuild would likely be accepted,
> though.

yes, i suspect that's the right answer.

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

2007-11-26 15:14:47

by Robert P. J. Day

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Mon, 26 Nov 2007, Robert P. J. Day wrote:

> On Mon, 26 Nov 2007, Ray Lee wrote:
>
> > On Nov 26, 2007 12:54 AM, Robert P. J. Day <[email protected]> wrote:
> > > on current systems, "rpm" no longer has build capability and will
> > > fail thusly:
> > >
> > > rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
> > > --target: unknown option
> > >
> > > so it would make more sense to just require "rpmbuild" on the
> > > machine, would it not?
> >
> > Only on current machines. You'd break building kernel RPMs on older
> > systems that don't have rpmbuild installed. So the change wouldn't
> > fix anything, and would break some non-zero number of setups that
> > are currently working, making the change a guaranteed net loss.
> >
> > A patch that added version checks against rpm and whinged
> > appropriately about needing rpmbuild would likely be accepted,
> > though.
>
> yes, i suspect that's the right answer.
>
> rday

BTW, is there someone who knows what the relevant version is of "rpm"
that stopped incorporating the packaging functionality? i'm a bit
swamped today but if someone wants to whip up a patch and get it in
before the next major release, that would be useful, i would think.

in short, can someone else handle this? :-)

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

2007-11-26 15:20:09

by Ray Lee

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Nov 26, 2007 7:12 AM, Robert P. J. Day <[email protected]> wrote:
> On Mon, 26 Nov 2007, Robert P. J. Day wrote:
>
> > On Mon, 26 Nov 2007, Ray Lee wrote:
> >
> > > On Nov 26, 2007 12:54 AM, Robert P. J. Day <[email protected]> wrote:
> > > > on current systems, "rpm" no longer has build capability and will
> > > > fail thusly:
> > > >
> > > > rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
> > > > --target: unknown option
> > > >
> > > > so it would make more sense to just require "rpmbuild" on the
> > > > machine, would it not?
> > >
> > > Only on current machines. You'd break building kernel RPMs on older
> > > systems that don't have rpmbuild installed. So the change wouldn't
> > > fix anything, and would break some non-zero number of setups that
> > > are currently working, making the change a guaranteed net loss.
> > >
> > > A patch that added version checks against rpm and whinged
> > > appropriately about needing rpmbuild would likely be accepted,
> > > though.
> >
> > yes, i suspect that's the right answer.
> >
> > rday
>
> BTW, is there someone who knows what the relevant version is of "rpm"
> that stopped incorporating the packaging functionality? i'm a bit
> swamped today but if someone wants to whip up a patch and get it in
> before the next major release, that would be useful, i would think.
>
> in short, can someone else handle this? :-)

I'm afraid I'm all .deb here, so no go for me.

2007-11-26 15:23:19

by Jan Engelhardt

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?


On Nov 26 2007 06:58, Ray Lee wrote:
>On Nov 26, 2007 12:54 AM, Robert P. J. Day <[email protected]> wrote:
>> on current systems, "rpm" no longer has build capability and will
>> fail thusly:
>>
>> rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
>> --target: unknown option
>>
>> so it would make more sense to just require "rpmbuild" on the
>> machine, would it not?
>
>Only on current machines. You'd break building kernel RPMs on older
>systems that don't have rpmbuild installed.

Those old machines probably do not even run a distro-fabricated gcc that
would compile a git head kernel.

2007-11-26 15:55:25

by Robert P. J. Day

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Mon, 26 Nov 2007, Jan Engelhardt wrote:

>
> On Nov 26 2007 06:58, Ray Lee wrote:
> >On Nov 26, 2007 12:54 AM, Robert P. J. Day <[email protected]> wrote:
> >> on current systems, "rpm" no longer has build capability and will
> >> fail thusly:
> >>
> >> rpm --target i386 -ta ../kernel-2.6.24rc3g2ffbb837dirty.tar.gz
> >> --target: unknown option
> >>
> >> so it would make more sense to just require "rpmbuild" on the
> >> machine, would it not?
> >
> >Only on current machines. You'd break building kernel RPMs on older
> >systems that don't have rpmbuild installed.
>
> Those old machines probably do not even run a distro-fabricated gcc that
> would compile a git head kernel.

well, in a nutshell, the problem scenario is that it's entirely
possible to have a modern distro (say, fedora 8, like i'm using) on
which you have the latest "rpm" package installed, but not "rpmbuild".
at which point scripts/package/Makefile, based on this:

RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
else echo rpm; fi)

will select "rpm" as the value of the variable RPM, at which point
things go south in a hurry as soon as you try to build an rpm package
using $(RPM) aka "rpm".

perhaps a solution would be to have two variables -- RPM and RPMBUILD
-- and set them appropriately based on what the Makefile finds. and,
of course, whine incessantly if you have an unworkable setup.

anyway, have at it.

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

2007-11-26 16:06:00

by Jan Engelhardt

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?


On Nov 26 2007 10:53, Robert P. J. Day wrote:
>
>>>Only on current machines. You'd break building kernel RPMs on older
>>>systems that don't have rpmbuild installed.
>>
>> Those old machines probably do not even run a distro-fabricated gcc that
>> would compile a git head kernel.
>
>well, in a nutshell, the problem scenario is that it's entirely
>possible to have a modern distro (say, fedora 8, like i'm using) on
>which you have the latest "rpm" package installed, but not "rpmbuild".

What, modern and no rpmbuild?

AFAIR, it had rpmbuild back to at least FC6, it's not that new this rpmbuild.

>at which point scripts/package/Makefile, based on this:
>
>RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
> else echo rpm; fi)
>
>will select "rpm" as the value of the variable RPM, at which point
>things go south in a hurry as soon as you try to build an rpm package
>using $(RPM) aka "rpm".
>
>perhaps a solution would be to have two variables -- RPM and RPMBUILD
>-- and set them appropriately based on what the Makefile finds. and,
>of course, whine incessantly if you have an unworkable setup.
>
>anyway, have at it.

2007-11-26 16:15:47

by Robert P. J. Day

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Mon, 26 Nov 2007, Jan Engelhardt wrote:

>
> On Nov 26 2007 10:53, Robert P. J. Day wrote:
> >
> >>>Only on current machines. You'd break building kernel RPMs on older
> >>>systems that don't have rpmbuild installed.
> >>
> >> Those old machines probably do not even run a distro-fabricated
> >> gcc that would compile a git head kernel.
> >
> >well, in a nutshell, the problem scenario is that it's entirely
> >possible to have a modern distro (say, fedora 8, like i'm using) on
> >which you have the latest "rpm" package installed, but not
> >"rpmbuild".
>
> What, modern and no rpmbuild?
>
> AFAIR, it had rpmbuild back to at least FC6, it's not that new this
> rpmbuild.

i didn't say it *wouldn't* have rpmbuild, i said it *might not*. at
the moment, on my f8 system, the only package that requires the
rpm-build package is rpmdevtools, and it's entirely possible that
there's no need for *that* package. so all i'm suggesting is that the
build procedure take into account the possibility that rpm-build is
not installed.

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

2007-11-26 16:17:28

by Jan Engelhardt

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?


On Nov 26 2007 11:13, Robert P. J. Day wrote:
>> >>>Only on current machines. You'd break building kernel RPMs on older
>> >>>systems that don't have rpmbuild installed.
>> >>
>> >> Those old machines probably do not even run a distro-fabricated
>> >> gcc that would compile a git head kernel.
>> >
>> >well, in a nutshell, the problem scenario is that it's entirely
>> >possible to have a modern distro (say, fedora 8, like i'm using) on
>> >which you have the latest "rpm" package installed, but not
>> >"rpmbuild".
>>
>> What, modern and no rpmbuild?
>
>i didn't say it *wouldn't* have rpmbuild, i said it *might not*. at
>the moment, on my f8 system, the only package that requires the
>rpm-build package is rpmdevtools, and it's entirely possible that
>there's no need for *that* package.

rpm -b does not work in opensuse anymore (redirects you to use rpmbuild), and I
bet fedora will do the same, so if you don't have rpm-build, tough luck for
make rpm.

>so all i'm suggesting is that the
>build procedure take into account the possibility that rpm-build is
>not installed.

2007-11-27 13:39:58

by Robert P. J. Day

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Mon, 26 Nov 2007, Jan Engelhardt wrote:

>
> On Nov 26 2007 11:13, Robert P. J. Day wrote:
> >> >>>Only on current machines. You'd break building kernel RPMs on older
> >> >>>systems that don't have rpmbuild installed.
> >> >>
> >> >> Those old machines probably do not even run a distro-fabricated
> >> >> gcc that would compile a git head kernel.
> >> >
> >> >well, in a nutshell, the problem scenario is that it's entirely
> >> >possible to have a modern distro (say, fedora 8, like i'm using) on
> >> >which you have the latest "rpm" package installed, but not
> >> >"rpmbuild".
> >>
> >> What, modern and no rpmbuild?
> >
> >i didn't say it *wouldn't* have rpmbuild, i said it *might not*.
> >at the moment, on my f8 system, the only package that requires the
> >rpm-build package is rpmdevtools, and it's entirely possible that
> >there's no need for *that* package.
>
> rpm -b does not work in opensuse anymore (redirects you to use
> rpmbuild), and I bet fedora will do the same, so if you don't have
> rpm-build, tough luck for make rpm.

i know that that's the case *now*, but we're considering the
possibility that someone is using an older system on which "rpm" is
*still* the builder. in the end, all i'm suggesting is that the build
should work under all possible scenarios.

rday

p.s. i'm not *trying* to make this issue more obfuscated or
convoluted than it has to be -- i am merely succeeding.

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

2007-11-27 13:46:58

by Olivier Galibert

[permalink] [raw]
Subject: Re: can support for "rpm"-based package building just be dropped?

On Mon, Nov 26, 2007 at 05:17:18PM +0100, Jan Engelhardt wrote:
> rpm -b does not work in opensuse anymore (redirects you to use rpmbuild), and I
> bet fedora will do the same, so if you don't have rpm-build, tough luck for
> make rpm.

The point, if I understand it correctly, was that when rpmbuild is not
install and rpm is not building-capable not to fall back to rpm and
instead yell loudly that rpmbuild is missing.

To which some said that right now "do not fall back, ever, just
require rpmbuild" may just be the best.

I have no opinion though.

OG.