[techtalk] Re: rpms r bad? (was Linux-Mandrake)

Daniel Manrique roadmr at entropia.com.mx
Fri May 25 17:09:01 EST 2001


> Does anyone have any insight in taking an rpm, modifying a couple files,
> and repackaging the rpm?  I've been reading the rpm man page as I get
> time, but it's huge, and I'm not interested in rebuilding rpms from
> source, i'd just like to incorporate our site-specific configurations for
> stuff like yp, printers, fonts, etc when i install a new host....
> 
> Has anyone done anything like that with rpm before?

Sure, and that's one of the aims of RPM.

Grab the source RPM (ends in src.rpm), and install it as usual:

rpm -ivh package.src.rpm

stuff gets unpacked in /usr/src/redhat.

it will unpack a spec file with instructions on how to actually build and
package the RPM in the SPECS subdirectory.

And all the sources and patch files required for your package in the
SOURCES subdirectory.

Now, if you just want to modify the steps and commands the package manager
takes to build the package, you should modify the spec file.

If you want to do actual changes to the package's source files, you should
mess with the files in SOURCES.

After you've done your changes, switch to the SPECS subdirectory and do

rpm -ba package.spec

this will produce both binary and source RPMs for your modified package.

There's an RPM-HOWTO at www.rpm.org, I think it's a bit outdated but the
basics of RPM building are there. It's not *too* difficult. :)


	- Roadmaster

----------------
*
Save a tree- use E-Mail!			roadmr at entropia.com.mx
*





More information about the Techtalk mailing list