Re: rh-rpm] building an rpm into a virtual filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 Apr 2004 James_Martin@xxxxxxxxxxxxxxx wrote:

> I have the unfortunate task of building an RPM for some commericial 
> software (Netvault Backup software: www.bakbone.com).

no problems -- rpm does not hold grudges; it is just a simple 
packaging system coerced into doing builds   ;)
 
> First I had to figure out it's hidden feature of using a response file.. 
> that worked fine.. Now on to problem #2.. paths.
> 
> It seems parts of the binary installer and a large chunk of the install 
> scripts put things in /etc, /usr/lib, /usr/bin, and make some /dev 
> entries.  Is it possible to make the installer run in a chrooted 
> environment so I can capture all of this?  

sure -- build a chroot capable of doing rpmbuild's and have at 
it.  Sample script  
	( ftp://ftp.owlriver.com/pub/local/ORC/ORCrebuild/ORCyum-chroot-caos ) 
referred to in the materials at: http://www.herrold.com/caos/ 
in: http://www.herrold.com/caos/frontporting/

> If so, how do I refer to all 
> the necessary files (rpm support files & dirs) that are outside of the 
> chroot? 

just move them in, and have at it within the chroot: your 
.spec file will determine whenand where to make any needed 
directories, and how to move and position files.

> I don't want to have to do it that way because chroot requires 
> root, and we all know root rpm builds are bad.  I'm 
just running out of 
> options here.

   ummm -- who says it requires being root?  see the outline, 
	http://www.herrold.com/caos/frontporting/
and  code like:

10. Hand each SRPM in turn to an automated non-root, in 
pristine chroot builder see: 
	ftp://ftp.owlriver.com/pub/local/ORC/ORCrebuild/ORCbuildit 
for an example -- the section containing: 

# 
# now we build as non-root 
chroot $BUILDROOT/$TEMP sudo -u builder rpmbuild $NODEPS \
	 -ba /usr/src/$DIST/SPECS/$j \
	 >> $BUILDROOT/$TEMP/usr/src/$DIST/$NAME-build.txt \
	 2>> $BUILDROOT/$TEMP/usr/src/$DIST/$NAME-error.txt || \
	 touch $BUILDROOT/$TEMP/usr/src/$DIST/$NAME-fail.txt 

is building inside the chroot as non-root

----------------------------

These are representative of the code doing the caos-1 and 
centos-3 builds, -- see the cAos project at 
	http://www.caosity.org/

No kernel modifications needed, unlike some build approaches.  

Other approaches (Michael Jennings mezzanine, JBJ's pdr) also 
will happily build as non-root.

-- Russ Herrold


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux