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

Making RPMs from Anywhere (more like Irix 'gendist')



PROBLEM: Trying to get RPM to behave a little more generally and be less
         reliant on a central installation point or a single user.

SYSTEM: Solaris. Generating packages for Linux/PPC

DETAILS:

I am working on a system in which there will be a combination of both
open-source and proprietary software.

Were the system not highly-embedded, I could just use Redhat RPMs for the
open-source software; however, many of the RPMs contain a lot of files
not needed on the target system. Hence, I've decided that I need to build
and package the open-source and proprietary software myself.

The source tree:

	dist/			# Target for RPMs / tarballs
	custom/			# Proprietary software
		subsys1/
		app1/
		subsys2/
		subsys3/
		app2/
		...
	oss/			# Open-source software
		bash/
		less/
		modutils/
		net-tools/
		netkit-base/
		util-linux/
		...
	linux/			# Linux kernel

The build steps:

        1. Check out source code from CVS

        2. make [all]

           - Build the software in the tree

        3. make dist

           - Build packages ready for installation or external release.

           - RPM doesn't seem willing to readily support this step.

At the end of the 'make dist' step, a particular developer's dist
directory would contain:

        dist/
		base-2.4-1.ppc.rpm
                less-3.4.0-1.ppc.rpm
                custom-app1-x.y-1.ppc.rpm
                custom-subsys2-x.y-1.ppc.rpm
                custom-app2-x.y-1.ppc.rpm
                modutils-2.3.19-1.ppc.rpm
                ...

My experience in packaging software to date has been limited to some very
simple RPMs of existing open-source software and some full-blown releases
using SGI's gendist/swpkg and inst/smmgr tools under IRIX (very nice
stuff).

With gendist/swpkg, thing were driven by two files: an '.idb' file, which
listed the source, destination, and attributes of installed files (similar
to the RPM %files section), and a '.spec' file which listed subsystems,
versions, prerequisites, etc (similar to the rest of an RPM '.spec'
file).

The real limitations of 'rpm' seem to be:

        1. That I have to stage everything in a subdirectories of the
           sort:

                BUILD
                SOURCE
                SPEC
                RPMS
                SRPMS

           - I already have a source tree, so I don't need 'SOURCE' or
             'BUILD' or 'SPEC'

           - I already have a dist tree, so I don't need 'RPMS'.

           - I'm not building source RPMs, so I don't need 'SRPMS'.

        2. I have to install all the software somewhere first before I
           can generate the RPM because the destination of an installed
           file is the same as its source.

           - What I'd like to do is specify that ./less gets installed
             in /usr/bin/less, or ../../syslogd get installed in
             /sbin/syslog.

	   I'd like* to see the %files directive work like:

	   %files -n subsys1

	   /usr/bin/less	oss/less/less
	   /usr/man/man1/less.1	oss/less/less.man
	   ...

           Where the left is the target destination when installed
           and the right is the source, relative to buildroot/top/root (I
           haven't clarified the different on these fully yet), when
	   the binary RPM is built.

	   After gorking the 3.0.4 source code last night, this doesn't
           look possible w/o some heavy modifications.

Can I work around these limitations with RPM? Is any of this possible with
RPM? Any documentation I can find seems to indicate I cannot. Any other
tools or sources of reference you can recommend?

Best regards,

Grant







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