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

Re: How to build comps.rpm

Toralf wrote:
Taylor, ForrestX wrote:

Toralf Lund wrote:

To repeat a question from one of my other threads:

How exactly do I build RedHat/base/comps.rpm for a custom dist?

Note: The question is not how to build an RPM (I know that), but whether or not there are special tools, spec files etc. for this particular one.

All the necessary files are in comps-9.tar.gz (for Red Hat Linux 9). Check out http://fedora.redhat.com/projects/anaconda-installer/comps.html
under Generating the full comps file.

Yes, that information is useful, as I never noticed there was a tool for generating the package section; I've been editing it by hand.

However, what I was asking about was primarily the comps *RPM*, not the XML file itself. I find no information about that...

In the tarball, there is a comps-redhat.spec file for building the rpm. I edit update-comps and rebuild it there. Just place the comps-redhat.spec file in /usr/src/redhat/SPECS, patch update-comps with this patch and run it.

I run update-comps after running buildinstall/genhdlist/etc., but before I create the discs.

I put my distribution in /dvd, so you may have to change it in the patch.


--- comps.orig/comps/update-comps	2002-10-02 08:31:23.000000000 -0700
+++ update-comps	2003-11-05 13:38:23.000000000 -0800
@@ -1,9 +1,10 @@
 if [ -z "$COMPSFILE" ]; then
-    echo "Usage: $0 <compsfile>"
+    echo "You need a $COMPSFILE file."
     exit 1
@@ -19,3 +20,17 @@
 cd ..
 LANG=C intltool-merge -x -u po/ $COMPSFILE.in $COMPSFILE
+echo "Running getfullcomps.  This will take a while..."
+/usr/share/comps-extras/getfullcomps.py comps.xml /dvd i386 > bottomcomps.tmp
+echo Building the comps file...
+cat comps-gingin.xml |grep -v "</comps>" > topcomps.tmp
+cat bottomcomps.tmp >> topcomps.tmp
+echo "</comps>" >> topcomps.tmp
+cp topcomps.tmp /dvd/i386/RedHat/base/comps.xml
+echo Done
+echo Rebuilding the comps rpm...
+rpmbuild -ba /usr/src/redhat/SPECS/comps-redhat.spec
+cp /usr/src/redhat/SRPMS/comps-9-0.`date +%Y%m%d`.src.rpm /dvd/SRPMS
+cp /usr/src/redhat/RPMS/i386/comps-9-0.`date +%Y%m%d`.i386.rpm /dvd/i386/RedHat/base/comps.rpm

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