From Fedora Project Wiki

m (1 revision(s))
(Added template header and fixed pre tags)
 
Line 1: Line 1:
{{header|anaconda}}
= build-fc =
= 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.
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.


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

Latest revision as of 08:23, 28 May 2008

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