AnacondaBuildFc

From FedoraProject

Jump to: navigation, search
Anaconda.png


build-fc

This is the script that I use to build the discs. It runs asks if you want to check the RPMs, installs the latest anaconda, and runs genhdlist, buildinstall, etc. I put this file in /fedora (or /dvd), and run it from there.


diff -urN anaconda-9.2.orig/scripts/build-fc1 anaconda-9.2/scripts/build-fc1
--- anaconda-9.2.orig/scripts/build-fc1   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2/scripts/build-fc1       2003-01-22 16:20:45.000000000 -0800
@@ -0,0 +1,62 @@
+# This will build the Fedora CDs.  This assumes that you have the contents of
+# all CDs in /fedora/i386
+export PATH=$PATH:/usr/lib/anaconda-runtime
+
+echo "Would you like to check the rpms (ENTER means no)?"
+read ARPM
+ if [<nop>[ -z $ARPM ] <nop> ;then
+   echo
+ else
+   echo Running the rpm check...
+   rpm -K /fedora/i386/Fedora/RPMS/* | grep "NOT OK"
+ fi
+
+echo Removing the old anaconda packages...
+rpm -e --nodeps anaconda anaconda-runtime
+echo Installing the new anaconda packages...
+rpm -ivh i386/Fedora/RPMS/anaconda-*fedora*.rpm
+
+echo Running genhdlist...
+genhdlist --withnumbers /fedora/i386 ## Must have full path
+
+echo Building the placeholder comps...
+rpmbuild -ba /usr/src/redhat/SPECS/comps-fedora.spec
+mv /fedora/i386/Fedora/RPMS/comps-1-0.* /fedora/
+
+cp /usr/src/redhat/SRPMS/comps-1-0.date +%<nop>Y%m%d.fedora.src.rpm /fedora/SRPMS
+cp /usr/src/redhat/RPMS/i386/comps-1-0.date +%<nop>Y%m%d.fedora.i386.rpm /fedora/i386/Fedora/RPMS/
+cp /usr/src/redhat/RPMS/i386/comps-1-0.date +%<nop>Y%m%d.fedora.i386.rpm /fedora/i386/Fedora/base/comps.rpm
+
+echo Running genhdlist again to include the new comps rpm...
+genhdlist --withnumbers /fedora/i386 ## Must have full path
+
+# buildinstall seems to run pkgorder if --pkgorder is specified
+buildinstall --pkgorder pkgfile --version 1 --product 'Fedora Core' --release 'Fedora Core 1' i386/
+
+# FIX-ME fix pkgfile before running genhdlist with --fileorder
+grep -v file$ pkgfile | grep -v <nop>file:/// > pkgfile.date +%Y-%m-%d
+
+# Remove i386-disc[123456] , or splittree will complain
+rm -rf i386-disc[1-9] 
+splittree.py --arch=i386 --total-discs=3 --bin-discs=3 --src-discs=1 --release-string="Fedora Core 1" --pkgorderfile=pkgfile.date +%Y-%m-%d --distdir=i386 --srcdir=SRPMS --productpath=Fedora
+
+echo Running genhdlist for the final time to include the .discinfo and pkgfile.
+genhdlist --withnumbers --fileorder pkgfile.date +%Y-%m-%d /fedora/i386-disc[123456] 
+
+# And now for the real comps...  Build comps the second time after splittree
+echo "Rebuilding the real comps after .discinfo, genhdlist and pkgfile"
+rpmbuild -ba /usr/src/redhat/SPECS/comps-fedora.spec
+rm /fedora/i386/Fedora/RPMS/comps-1-0.*
+cp /usr/src/redhat/SRPMS/comps-1-0.date +%<nop>Y%m%d.fedora.src.rpm /fedora/SRPMS
+cp /usr/src/redhat/RPMS/i386/comps-1-0.date +%<nop>Y%m%d.fedora.i386.rpm /fedora/i386/Fedora/RPMS/
+cp /usr/src/redhat/RPMS/i386/comps-1-0.date +%<nop>Y%m%d.fedora.i386.rpm /fedora/i386/Fedora/base/comps.rpm
+
+echo "Would you like to make the discs now (ENTER means no)?"
+read ANS
+ if [<nop>[ -z $ANS ] <nop> ;then
+   echo Not making discs...
+   echo
+ else
+   echo Making Discs...
+   mkfedora-cd
+ fi