AnacondaNewFilesPatch

From FedoraProject

Revision as of 14:13, 24 May 2008 by ImportUser (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

New Files Patch

This patch includes new files--those not found in anaconda. This is a conglomeration of build-fc , mkdvd , mkfedora-cd , mkfedora-cd-disc1 , mkfedora-cd-disc2 , mkfedora-cd-disc3 , mkfedora-cd-disc4 , mkfedora-cd-disc5 , mkfedora-cd-disc6 , and rpmupdates .

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 [[ -z $ARPM ]  ;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.<code>date +%Y%m%d</code>.fedora.src.rpm /fedora/SRPMS
+cp /usr/src/redhat/RPMS/i386/comps-1-0.<code>date +%Y%m%d</code>.fedora.i386.rpm /fedora/i386/Fedora/RPMS/
+cp /usr/src/redhat/RPMS/i386/comps-1-0.<code>date +%Y%m%d</code>.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 file:/// > pkgfile.<code>date +%Y-%m-%d</code>
+
+# 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.<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.
+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
+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.<code>date +%Y%m%d</code>.fedora.src.rpm /fedora/SRPMS
+cp /usr/src/redhat/RPMS/i386/comps-1-0.<code>date +%Y%m%d</code>.fedora.i386.rpm /fedora/i386/Fedora/RPMS/
+cp /usr/src/redhat/RPMS/i386/comps-1-0.<code>date +%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)?"
+read ANS
+ if [[ -z $ANS ]  ;then
+   echo Not making discs...
+   echo
+ else
+   echo Making Discs...
+   mkfedora-cd
+ fi
diff -urN anaconda-8.0.93/scripts/mkdvd anaconda-8.0.93.new/scripts/mkdvd
--- anaconda-8.0.93/scripts/mkdvd   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-8.0.93.new/scripts/mkdvd   2003-01-22 16:21:01.000000000 -0800
@@ -0,0 +1,10 @@
+mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -J -p \
+"myemail@mycompany.com" -P "Red Hat" -V "FC 1/RHL 9/8.0 updated \
+DVD" -r -T -v -A "Fedora Core Linux/i386 1" -o fedoracore1-9-80-dvd.iso \
+-no-emul-boot -boot-load-size 4 -boot-info-table -l \
+i386
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-9-80-dvd.iso
+#checkisomd5 fedoracore1-9-80-dvd.iso
+
diff -urN anaconda-9.2.orig/scripts/mkfedora-cd anaconda-9.2/scripts/mkfedora-cd
--- anaconda-9.2.orig/scripts/mkfedora-cd   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2/scripts/mkfedora-cd   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,7 @@
+echo "Creating six discs..."
+mkfedora-cd-disc1
+mkfedora-cd-disc2
+mkfedora-cd-disc3
+mkfedora-cd-disc4
+mkfedora-cd-disc5
+mkfedora-cd-disc6
diff -urN anaconda-8.0.93/scripts/mkfedora-cd-disc1 anaconda-8.0.93.new/scripts/mkfedora-cd-disc1
--- anaconda-8.0.93/scripts/mkfedora-cd-disc1   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-8.0.93.new/scripts/mkfedora-cd-disc1   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,9 @@
+mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -J -p \
+"myemail@mycompany.com" -P "Red Hat" -V "Fedora Core 1 with \
+updates disc1" -r -T -v -A "Fedora Core Linux/i386 1" -o fedoracore1-disc1.iso \
+-no-emul-boot -boot-load-size 4 -boot-info-table -l i386-disc1
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-disc1.iso
+#checkisomd5 fedoracore1-disc1.iso
+
diff -urN anaconda-9.2/scripts/mkfedora-cd-disc2 anaconda-9.2.new/scripts/mkfedora-cd-disc2
--- anaconda-9.2/scripts/mkfedora-cd-disc2   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2.new/scripts/mkfedora-cd-disc2   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,9 @@
+mkisofs -J -p \
+"myemail@mycompany.com" -P "Red Hat" -r -T -V "Fedora Core 1 with \
+updates disc2" -v -A "Fedora Core Linux/i386 1" -o fedoracore1-disc2.iso \
+i386-disc2
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-disc2.iso
+#checkisomd5 fedoracore1-disc2.iso
+
diff -urN anaconda-9.2/scripts/mkfedora-cd-disc3 anaconda-9.2.new/scripts/mkfedora-cd-disc3
--- anaconda-9.2/scripts/mkfedora-cd-disc3   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2.new/scripts/mkfedora-cd-disc3   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,9 @@
+mkisofs -J -p \
+"myemail@mycompany.com" -P "Red Hat" -r -T -V "Fedora Core 1 with \
+updates disc3" -v -A "Fedora Core Linux/i386 1" -o fedoracore1-disc3.iso \
+i386-disc3
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-disc3.iso
+#checkisomd5 fedoracore1-disc3.iso
+
diff -urN anaconda-9.2/scripts/mkfedora-cd-disc4 anaconda-9.2.new/scripts/mkfedora-cd-disc4
--- anaconda-9.2/scripts/mkfedora-cd-disc4   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2.new/scripts/mkfedora-cd-disc4   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,9 @@
+mkisofs -J -p \
+"myemail@mycompany.com" -P "Red Hat" -r -T -V "Fedora Core 1 SRPMS \
+disc4" -v -A "Fedora Core Linux/i386 1" -o fedoracore1-disc4.iso \
+i386-disc4
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-disc4.iso
+#checkisomd5 fedoracore1-disc4.iso
+
diff -urN anaconda-9.2/scripts/mkfedora-cd-disc5 anaconda-9.2.new/scripts/mkfedora-cd-disc5
--- anaconda-9.2/scripts/mkfedora-cd-disc5   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2.new/scripts/mkfedora-cd-disc5   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,9 @@
+mkisofs -J -p \
+"myemail@mycompany.com" -P "Red Hat" -r -T -V "Fedora Core 1 SRPMS \
+disc5" -v -A "Fedora Core Linux/i386 1" -o fedoracore1-disc5.iso \
+i386-disc5
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-disc5.iso
+#checkisomd5 fedoracore1-disc5.iso
+

diff -urN anaconda-9.2/scripts/mkfedora-cd-disc6 anaconda-9.2.new/scripts/mkfedora-cd-disc6
--- anaconda-9.2/scripts/mkfedora-cd-disc6   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2.new/scripts/mkfedora-cd-disc6   2003-01-22 16:21:09.000000000 -0800
@@ -0,0 +1,9 @@
+mkisofs -J -p \
+"myemail@mycompany.com" -P "Red Hat" -r -T -V "Fedora Core 1 SRPMS \
+disc6" -v -A "Fedora Core Linux/i386 1" -o fedoracore1-disc6.iso \
+i386-disc6
+echo "Done Making Image..."
+echo "Making MD5SUM..."
+implantisomd5 --supported-iso fedoracore1-disc6.iso
+#checkisomd5 fedoracore1-disc6.iso
+
diff -urN anaconda-9.2/scripts/rpmupdates anaconda-9.2.new/scripts/rpmupdates
--- anaconda-9.2/scripts/rpmupdates   1969-12-31 16:00:00.000000000 -0800
+++ anaconda-9.2.new/scripts/rpmupdates   2003-01-22 16:21:22.000000000 -0800
@@ -0,0 +1,85 @@
+#!/bin/bash
+#
+# UPDATES_DIR   The directory that contains the updates
+# RPM1DIR   The original RH tree
+# RPM2DIR   Disc 2 of the tree
+# ARCH      Arch
+# EXTRA_DIR   The directory that contains extra RPMS
+# OLDDIR   All old rpms will be dumped here
+
+RPM1DIR=i386/Fedora/RPMS
+UPDATES_DIR=new/new
+OLDDIR=olddir
+DONE_DIR=new/done
+EXTRA_DIR=extra
+# DEBUG=0
+
+    echo NOTICE: beginning to apply updated packages to ${RPM1DIR}
+    echo NOTICE: from ${UPDATES_DIR}  ### and ${EXTRA_DIR}
+    echo NOTICE: this may take a few minutes
+    echo
+
+    if [[ ! -d $OLDDIR ]   ; then
+            echo making directory $OLDDIR
+            mkdir $OLDDIR
+    fi
+
+    if [[ $DEBUG ]  
+    then
+   echo 'in update_cd'
+   echo PWD = <code>pwd</code>
+   echo RPM1DIR=$RPM1DIR
+   echo ARCH=$ARCH
+   echo UPDATES_DIR=$UPDATES_DIR
+   echo
+    fi
+    allow_null_glob_expansion=1
+
+#    for rpm in ${UPDATES_DIR}/*.rpm ${EXTRA_DIR}/*.rpm  ; do
+    for rpm in ${UPDATES_DIR}/*.rpm; do
+   RPMDIR=${RPM1DIR}
+#    NAME=<code>rpm --qf '%{NAME}' -qp $rpm --nosignature --nodigest</code> for BETAs (4x)
+        NAME=<code>rpm --qf '%{NAME}' -qp $rpm</code>
+        ARCH=<code>rpm --qf '%{ARCH}' -qp $rpm</code>
+        unset OLDNAME
+        for oldrpm in ${RPM1DIR}/${NAME}*.${ARCH}.rpm ; do
+            if [[ x<code>rpm --qf '%{NAME}' -qp $oldrpm</code> = x$NAME ]  ; then
+               if [[ x<code>rpm --qf '%{ARCH}' -qp $oldrpm</code> = x$ARCH ]  ; then
+                   OLDNAME=$oldrpm
+         RPMDIR=${RPM1DIR}
+                   break
+      fi
+            fi
+        done
+
+   if [[ ! -d $DONE_DIR ]  ;then
+      echo Making $DONE_DIR
+      mkdir $DONE_DIR
+   fi
+
+        if [[ -z $OLDNAME ]  ; then
+            echo $NAME $ARCH is new
+            cp -pv $rpm $RPMDIR
+       mv $rpm $DONE_DIR
+        else
+            if [[ x<code>basename $rpm</code> != x<code>basename $OLDNAME</code> ]  
+       then
+      if [[ $DEBUG ]  
+          then
+              echo mv $OLDNAME $OLDDIR
+                   echo cp -pv $rpm $RPMDIR
+         echo mv $rpm $DONE_DIR
+          else
+                   mv $OLDNAME $OLDDIR
+                   #echo removing $OLDNAME
+                   #rm $OLDNAME
+                   cp -pv $rpm $RPMDIR
+         mv $rpm $DONE_DIR
+      fi
+            else
+           echo NOTICE:    <code>basename $rpm</code> update already applied
+      echo NOTICE:   Now moving <code>basename $rpm</code> to new/
+      mv $rpm new
+            fi
+        fi
+    done