Make RPM - was Re: [WBEL-users] How to recompile my kernel

bishop bishop@platypus.bc.ca
Wed, 27 Oct 2004 12:57:08 -0700


Phil Schaffner wrote:

> On Tue, 2004-10-26 at 20:01 -0700, bishop wrote:
> 
>>Phil Schaffner wrote:
>>
>>>Or, some like "make rpm" - also allows building in user space, often
>>>recommended.  See http://www.rpm.org/hintskinks/buildtree/
>>
>>Recommended by whom?  The people who haven't seen 'rpmbuild -t' yet?  Or 
>>just people who use their sun-roof to get into their car?
> 
> Recommended by people who dislike having critical system files
> overwritten due to poorly-constructed SRPM spec/makefiles.

Ah, yes.  What?

That's why you build as a user for 99.999% of the work and in a chroot 
fro the kernel modules if your packaging skills are bad.  Seems to be a 
standard policy, actually.  Aside from one distro, clobbering system 
files hasn't been a problem for years, and it's a poor excuse for laziness.

> The -t option for rpmbuild is to look for a spec inside a tarball -
> seems at best marginally relevant here.

Marginally relevant?  These 'make rpm' people tell us that this:

     wget http://some/place/tarball.tgz
     mkdir ~/temp
     cd ~/temp
     tar xzf tarball
     cd dir
     autoharder
     autocuff
     ./configure
     make
     make rpm
     mv the.{i386,src}.rpm ~/some/other/place
     cd
     rm -r ~/temp

Is better than this:

     rpmbuild -ta url://some/place/tarball.tgz

Now, I'm trying to see their point, especially because tossing the added 
work on their hordes of happy 'customers' makes less work for 
developers, but I'm just having a hard time seeing the validity of the 
point, really, when the work-per-worker is all added up.

> RPM was designed to build software packages reliably and reproducibly. Software development using RPM proceeds in strict stages from virgin sources...
> -- Jeff Johnson 

Ya know what they need to do?  They need to automate the steps above in 
that nasty procedure.  I mean, sure, some parts of it aren't really 
needed, but how are we to know which?  So, they should distribute a 
script that we can just run once we've unpacked the source tarball.

Actually, too, we should just make a temp area for all this work, to 
begin with.  I vote for a common area - maybe in my dir it can be

     ~/RPM

and then I can use certain subdirectories for the source or build areas

     ~/RPM/BUILD
     ~/RPM/SOURCES

and build it all in there.  Okay, maybe I'll have to define this Top Dir 
somewhere, but the script should react to that setting.  Yeah, and the 
script should take that into account, like it should automatically CD 
into my build area, and then

      - maybe create a subdirectory
      - usually untar the source
      - set some variables are are required (eg USE_LIBTOOL)
      - run - ./configure
            - make
            - make rpm
      - move the RPMs to a new area
      - clean up the build area

wouldn't that be cool?

Hey, I know.  Let's call it rpmbuild.

> [bishop@fishy bishop]$ which rpmbuild
> /usr/bin/rpmbuild 

Oh, someone already did that.  Should we just use that, then?

>>  - bish
>>gettin' started
> 
> Hope you manage to get off to a good start.
> 
> Phil
> 

-- 
	"What do you call the smaller ones;
	 Cabinet-Maker Ants?"  -- Kevin