RE: need to know if packaging our application stack as an rpm is the right way to go

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

 



On Tue, 8 Feb 2011, mark meyer wrote:

> > > our application stack is mostly jar and .swf files that are generated
> > > from a large "top level" build (using ant).  the final part of the build
> > > creates a large tar (or zip) file that we use distribute.  our custom
> > > installation process then just un-archives and lays down the files on the
> > > box in the appropriate locations, then fires several perl scripts that do
> > > all sorts of things.
> > 
> > The RPM SPEC file has several sections.
> > 
> > The %prep section of your SPEC file extracts the source you are building
> > into a clean directory tree.
> > 
> > The %build section has your ant command for the top level build within
> > the clean directory tree.
> > 
> 
> you lost me here.
> 
> are you saying that i have rpm build the distribution ??

rpm runs ant in the %build section (just like it would run "make", "cake",
or similar for C/C++ programs).  The point is that it has just extracted
pristine sources, and now does a build in a clean directory.  This
goes a long way toward avoiding the kind of gotchas where you build it,
install it, it works, but 2 years later you can't recreate that build
(with a fix) because some forgotten feature of the build environment made it
work.

> i was thinking that i would have ant fire my top level build - (to create the
> distribution) then wrap the distribution in an rpm.

Rpm fires ant to do the top level build, then wraps the result.  The Source RPM
(SRPM) contains the SPEC file and source archives needed to recreate the
package (even without VCS).  Plus, the binary RPM has URLs and versions
sufficient to recreate the package with help from source repositories or VCS.

It actually is possible to just wrap the binaries in an RPM.  This is done
with empty %prep and %build sections.  Similary, to wrap a firefox binary
tarball (to install multiple versions of firefox for web testing), just extract
the tar in %build, and repackage it in %install.  HOWEVER, you don't want
to do this for your own stuff.  You REALLY want to build from pristine
tagged sources.

One nice thing about the SPEC file is that it documents exactly how to
build a package (at least for command line builds).  There are so many build
systems, and so many idiosyncratic ways to invoke them, it is hard to remember
all the details.

-- 
	      Stuart D. Gathman <stuart@xxxxxxxx>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/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