Skip to contentSkip to conversation

can support for "rpm"-based package building just be dropped?

DISCUSSION Robert P. J. Day 4 participants 12 messages Nov 26, 2007 – Nov 27, 2007

lore
Share & tools
lore
#0 lore raw

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
========================================================================

#1 lore raw
Quoted 8 lines · Robert P. J. Day

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.

#2 lore raw
Quoted 10 lines · Ray Lee
Quoted 8 lines · Robert P. J. Day

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?

Quoted 8 lines

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
========================================================================

#3 lore raw
Quoted 17 lines · Robert P. J. Day
Quoted 15 lines · Ray Lee
Quoted 8 lines · Robert P. J. Day

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.

Quoted 7 lines
Quoted 3 lines

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
========================================================================

#4 lore raw
Quoted 25 lines · Robert P. J. Day
Quoted 23 lines · Robert P. J. Day
Quoted 10 lines · Ray Lee
Quoted 8 lines · Robert P. J. Day

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?

Quoted 8 lines

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.

Quoted 8 lines
Quoted 1 line

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.

#5 lore raw
In reply to Ray Lee
Quoted 4 lines · Ray Lee
Quoted 3 lines · Robert P. J. Day

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

Quoted 8 lines
Quoted 5 lines

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.

#6 lore raw
Quoted 9 lines · Jan Engelhardt
Quoted 7 lines · Ray Lee
Quoted 6 lines · Robert P. J. Day

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

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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
========================================================================

#7 lore raw
Quoted 10 lines · Robert P. J. Day
Quoted 6 lines
Quoted 3 lines

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.

Quoted 14 lines

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.

#8 lore raw
Quoted 14 lines · Jan Engelhardt
Quoted 11 lines · Robert P. J. Day
Quoted 6 lines
Quoted 3 lines

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".

Quoted 4 lines

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
========================================================================

#9 lore raw
Quoted 11 lines · Robert P. J. Day
Quoted 11 lines
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

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".

Quoted 6 lines
Quoted 1 line

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.

Quoted 3 lines

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

#10 lore raw
Quoted 15 lines · Jan Engelhardt
Quoted 13 lines · Robert P. J. Day
Quoted 12 lines
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

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?

Quoted 8 lines
Quoted 4 lines

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
========================================================================

#11 lore raw
In reply to Jan Engelhardt
Quoted 3 lines · Jan Engelhardt

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.