Re: Build bash 3.2 rpm package

On 09/23/2010 04:00 PM, Sam Varshavchik wrote:
Bruno Galindro da Costa writes:

   When you mean 'nuke all other files' what do you want to mean?
Delete all other files?
  If I download the source package (e.g. bash-3.2-24.el5.src.rpm
for Red Hat 5), install it, grab only the spec file and put it in
/usr/src/redhat/SPECS/ directory, put all other files in
/usr/src/redhat/SOURCES/ directory and try to do a rpmbuild -ba
/usr/src/redhat/SPECS/bash.spec, could it work?

Yes. And you will end up with a perfectly valid bash rpm package.

Unfortunately, you will not be able to install it. That's because the
package will install /bin/bash, and you already have this file installed
by your existing bash rpm. This is the fundamental function of rpm: to
prevent different packages from installing conflicting files and
overwriting each other.

And not just /bin/bash, but also the corresponding man page, the locale
files, and all other files that you seen when you run "rpm -q -l bash".

That's why I told you that you need to modify the spec file so that the
final bash binary gets installed as /bin/bash3, so as to not conflict
with your existing bash interpreter, as well as remove all other files
from your bash 3 rpm package, so that the only thing that your
newly-built bash rpm would install is /bin/bash3.

If all he wants is the binary and source RPMS, don't bugger the spec
file to change the name. Just specify the "--buildroot" option to
rpmbuild, e.g.:

rpmbuild -ba --buildroot=/tmp/BUILDROOT --target=...

That will build the lot, but instead of installing the binaries and
such in the system directories before the binary RPMs are built,
they'll be put into /tmp/BUILDROOT.

When the RPMs are all built, /tmp/BUILDROOT will be deleted by
rpmbuild. The resulting source RPM will show up in
"~/buildroot/SRPMS" and the binary RPMs (docs, debug, etc.) will be in
"~/buildroot/RPMS/(architecture)" (where "(architecture)" is "i386",
"x86_64", etc.).

No harm, no foul, no mucking up your live system.
- Rick Stevens, Systems Engineer, C2 Hosting ricks@xxxxxxxx -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- "If you can't fix it...duct tape it!" -- Tim Allen -
users mailing list
To unsubscribe or change subscription options:

Relevant Pages

  • Re: RPM build error
    ... I am trying to build an RPM for sylfilter available at ... You need to change your spec file to look sorta like: ... %doc INSTALL AUTHORS ChangeLog README COPYING ... To unsubscribe or change subscription options: ...
  • Re: Totem=noshow
    ... I believe it was my trying to install their rpm package, ... Ok, that unpacked, now where can I find a .spec file so that I can ... The .bin installer I have, ...
  • Re: Creating RPMs
    ... and now I need to build a simple RPM package to install the ... The %install section of your spec file will normally do a 'make ...
  • Re: Totem=noshow
    ... do not tell you what it can't play. ... My current theory is that while rpm thinks there is a java installed, ... I believe it was my trying to install their rpm package, ... Ok, that unpacked, now where can I find a .spec file so that I can ...
  • Re: rsync progress
    ... rpm was also installed. ... I don't think you /can/ install rpm on Ubuntu. ... Package management systems are one of the deepest divides between Linux distros. ... The first distro, pretty much, was the Softlanding Linux System, SLS. ...