Wednesday, May 14, 2008
HorniX - Part 1
I have rolled out the initial ISO of the installer/distro that I have spinned for the company I'm working for. Here are the steps (from my patchy memory) in customizing/spinning.
If you have a defined set of RPMs, put it in one group in comps.xml, this will save you some time, rather than editing the supplied comps.xml. How do we implement that? On the machine where the RPMs are installed, issue rpm -qa > rpms.txt. Have a comps.xml that is something like this:
Place all the RPMs in one directory (e.g. /path/to/build/RPMS/). To copy only the defined RPMS, execute this line:
rpm -qa --queryformat "%{name}-%{version}-%{release}.%{arch}.rpm\n" | sort > packages.txt
Have a simple script to copy the unmodified RPMs from the original ISO/DVD:
#!/bin/bash
for file in `cat packages.txt`
do
cp /media/cdrom/Server/$file /path/to/build/RPMS/
done
Then copy the rebuilt/custom RPMs from /usr/src/redhat/RPMS/{arch}/ to /path/to/build/RPMS/
Copy the xml file inside the directory where the rpms are located (e.g. /path/to/build/RPMS/), cd to the directory and issue:
createrepo -c comps.xml .
This will produce a directory named repodata with the following files:
comps.xml filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml
That's it for now :) Too sleepy and a bit drunk to type :)
If you have a defined set of RPMs, put it in one group in comps.xml, this will save you some time, rather than editing the supplied comps.xml. How do we implement that? On the machine where the RPMs are installed, issue rpm -qa > rpms.txt. Have a comps.xml that is something like this:
customdistro
CustomDistro
My Custom Distro.
true
false
package-name
......
customdistro
System
Base System
Various core pieces of the system.
99
Place all the RPMs in one directory (e.g. /path/to/build/RPMS/). To copy only the defined RPMS, execute this line:
rpm -qa --queryformat "%{name}-%{version}-%{release}.%{arch}.rpm\n" | sort > packages.txt
Have a simple script to copy the unmodified RPMs from the original ISO/DVD:
#!/bin/bash
for file in `cat packages.txt`
do
cp /media/cdrom/Server/$file /path/to/build/RPMS/
done
Then copy the rebuilt/custom RPMs from /usr/src/redhat/RPMS/{arch}/ to /path/to/build/RPMS/
Copy the xml file inside the directory where the rpms are located (e.g. /path/to/build/RPMS/), cd to the directory and issue:
createrepo -c comps.xml .
This will produce a directory named repodata with the following files:
comps.xml filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml
That's it for now :) Too sleepy and a bit drunk to type :)
Labels: build, HorniX, installer, rpm