]> git.pld-linux.org Git - packages/anaconda.git/commitdiff
- updated
authorPatryk Zawadzki <patrys@room-303.com>
Tue, 3 May 2005 18:03:18 +0000 (18:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    anaconda-mk-images -> 1.2
    anaconda-mk-images.i386 -> 1.1
    anaconda-scrubtree -> 1.1
    anaconda-upd-instroot -> 1.2
    anaconda.spec -> 1.5

anaconda-mk-images
anaconda-mk-images.i386 [new file with mode: 0644]
anaconda-scrubtree [new file with mode: 0644]
anaconda-upd-instroot
anaconda.spec

index db0a704d41d9d5e1279b52d4b7a2e47fd9819775..b11110f841dc66316088c53408d39c43694dc4b2 100644 (file)
@@ -474,12 +474,12 @@ EOF
     chmod 600 $MBD_DIR/etc/ssh/sshd_config
 
     # copy in the binaries
-    cp -f $IMGPATH/usr/bin/login $MBD_DIR/sbin/login
+    cp -f $IMGPATH/login $MBD_DIR/sbin/login
     cp -f $IMGPATH/usr/sbin/sshd $MBD_DIR/sbin/sshd
     cp -f $IMGPATH/usr/sbin/xinetd $MBD_DIR/sbin/xinetd
     cp -f $IMGPATH/usr/sbin/in.telnetd $MBD_DIR/sbin/in.telnetd
-    cp -f $IMGPATH/usr/bin/bash $MBD_DIR/sbin/bash
-    cp -f $IMGPATH/usr/bin/busybox $MBD_DIR/sbin/busybox
+    cp -f $IMGPATH/bin/bash $MBD_DIR/sbin/bash
+    cp -f $IMGPATH/bin/busybox $MBD_DIR/sbin/busybox
     
     # make some symlinks
     ln -sf bash $MBD_DIR/bin/sh
diff --git a/anaconda-mk-images.i386 b/anaconda-mk-images.i386
new file mode 100644 (file)
index 0000000..1e06217
--- /dev/null
@@ -0,0 +1,230 @@
+SYSLINUX=$IMGPATH/usr/bin/syslinux-nomtools
+
+if [ ! -f $SYSLINUX ]; then
+  echo "Warning: nomtools syslinux doesn't exist"
+  SYSLINUX=$IMGPATH/usr/bin/syslinux
+  if [ ! -f $SYSLINUX ]; then
+    echo "$SYSLINUX doesn't exist"
+    exit 1
+  fi
+fi
+
+prepareBootImage() {
+        dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=/$MBD_TMPIMAGE 2>/dev/null
+       mkdosfs -r 32 -C $MBD_TMPIMAGE $BOOTDISKSIZE >/dev/null
+       $SYSLINUX $MBD_TMPIMAGE
+       mount -o loop -t msdos $MBD_TMPIMAGE $MBD_BOOTTREE
+
+       prepareBootTree
+}
+
+# prepare a directory with the kernel, initrd, and various message files
+# used to populate a boot image
+prepareBootTree() {
+       (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
+       
+       cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
+       cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
+
+       pngtopnm $BOOTDISKDIR/syslinux-splash.png | ppmtolss16 \#000000=0 \#cdcfd5=7 \#c90000=2 \#ffffff=15 \#5b6c93=9 > $BOOTDISKDIR/splash.lss
+       if [ $? != 0 ]; then
+          echo $0: Failed to create splash.lss
+          exit 1
+       fi      
+       cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
+       rm -f $MBD_BOOTTREE/syslinux-splash.png
+       rm -f $MBD_BOOTTREE/memtest*
+       for file in $BOOTDISKDIR/*.msg; do
+           filename=`basename $file`
+           sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename
+       done
+       if [ $? != 0 ]; then
+          echo $0: Failed to copy messages from $BOOTDISKDIR to $MBD_BOOTTREE.
+          umount $MBD_BOOTTREE
+          rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE
+          exit 1
+       fi
+}
+
+mkdir -p $TOPDESTPATH/images
+cat > $TOPDESTPATH/images/README <<EOF
+This directory contains image files that can be used to create media
+capable of starting the $PRODUCT installation process.
+
+The boot.iso file is an ISO 9660 image of a bootable CD-ROM.  It is useful
+in cases where the CD-ROM installation method is not desired, but the
+CD-ROM's boot speed would be an advantage.
+
+To use this image file, burn the file onto CD-R (or CD-RW) media as you
+normally would.
+
+The diskboot.img file is a VFAT filesystem image that can be written to a
+USB pendrive or other bootable media larger than a floppy.  Note that
+booting via USB is dependent on your BIOS supporting this.  It should
+be written to the device using dd.
+EOF
+
+# LATEUSBMODS go in the second stage.  
+# FIXME: bleah, have to include sd_mod, sr_mod for usb-storage
+USBMODS="usbcore ohci-hcd uhci-hcd hid usb-storage sd_mod sr_mod"
+# usb-storage goes on both so we can reload it.  *sigh*
+LATEUSBMODS="usb-storage"
+IDEMODS="cdrom ide-cd"
+SCSIMODS="cdrom scsi_mod sd_mod sg sr_mod st"
+
+FSMODS="fat msdos vfat ext3 reiserfs jfs xfs"
+LVMMODS="dm-mod dm-zero dm-snapshot dm-mirror"
+RAIDMODS="md raid0 raid1 raid5 raid6"
+SECSTAGE="agpgart $RAIDMODS $LVMMODS $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport"
+
+BTERMMODULES="vga16fb vgastate"
+COMMONMODULES="fat vfat nfs sunrpc lockd floppy cramfs loop edd $USBMODS $BTERMMODULES"
+LOCALMODULES="$COMMONMODULES aic7xxx megaraid_mbox sym53c8xx $IDEMODS $SCSIMODS"
+NETWORKMODULES="$COMMONMODULES 3c59x 
+              e100 tulip 8139too"
+#             sis900 e100 hp100 natsemi pcnet32"
+
+PCMCIAMAINMODULES="$COMMONMODULES nfs $IDEMODS $SCSIMODS"
+
+# images we only want on the CD (usually for space reasons)
+ISOLINUXMODULES="usbcore ehci-hcd ieee1394 ohci1394 sbp2"
+
+# XXX hack hack
+PCMCIAMODULES_EXCLUDED="
+       apa1480_cb
+       iflash2+_mtd
+       iflash2_mtd
+       memory_cb
+       memory_cs
+       parport_cs
+       parport_pc
+       parport
+       serial_cs
+       serial_cb
+       sram_mtd
+"
+PCMCIAMODULES_EXCLUDED_SED="sed"
+for m in $PCMCIAMODULES_EXCLUDED
+do
+   PCMCIAMODULES_EXCLUDED_SED="$PCMCIAMODULES_EXCLUDED_SED -e 's/$m//g'"
+done
+BOOTPCMCIAMODULES=`echo $PCMCIAMODULES | eval "$PCMCIAMODULES_EXCLUDED_SED"`
+
+# need to make sure the base modules are included
+BOOTPCMCIAMODULES="$BOOTPCMCIAMODULES yenta_socket i82365 tcic pcmcia_core pcmcia"
+
+makeBootImages() {
+ if [ "$KERNELARCH" = "i386" ]; then
+    echo "Building $KERNELARCH $TOPDESTPATH/images/pxeboot/initrd.img"
+    makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \
+       --pcmcia --nobogl \
+       --initrdsize 4750 \
+       --loaderbin loader \
+       --modules "$COMMONMODULES"
+
+    echo "Building $KERNELARCH bootdisk.img"
+    makebootdisk --kernelto $TOPDESTPATH/images/pxeboot/vmlinuz  \
+       --bootdisksize 1440 \
+       --imagename $BOOTDIR/bootdisk.img \
+       --initrd $TOPDESTPATH/images/pxeboot/initrd.img
+    [ $? = 0 ] || exit 1
+
+    rm -f $TOPDESTPATH/images/pxeboot/initrd.img
+
+  fi
+
+  # FIXME: this is so that we can switch back and forth.  if we want both
+  # on the CD, then more needs to be done, esp for things like isolinux.cfg
+  # Right now, last one wins
+  if [ "$KERNELARCH" = "i686" -o "$KERNELARCH" = "i586" -o "$KERNELARCH" = "athlon" ]; then
+    echo "Building $KERNELARCH initrd-everything.img"
+    makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd-everything.img \
+       --pcmcia \
+       --initrdsize 10000 \
+       --loaderbin loader \
+       --modules "$LOCALMODULES $NETWORKMODULES $PCMCIAMAINMODULES $BOOTPCMCIAMODULES $PCMCIAMODULES $ISOLINUXMODULES =scsi =net"
+    [ $? = 0 ] || exit 1
+
+    if [ -f $IMGPATH/usr/lib/syslinux/isolinux.bin ]; then
+       echo "Building isolinux directory"
+       MBD_BOOTTREE=$TOPDESTPATH/isolinux
+       MBD_FSIMAGE=$TOPDESTPATH/images/pxeboot/initrd-everything.img
+       mkdir $MBD_BOOTTREE 2>/dev/null
+       cp $IMGPATH/usr/lib/syslinux/isolinux.bin $MBD_BOOTTREE/isolinux.bin
+
+       prepareBootTree
+
+       # isolinux needs the config file to be isolinux.cfg
+       mv $MBD_BOOTTREE/syslinux.cfg $MBD_BOOTTREE/isolinux.cfg
+
+       # copy in memtest if present
+       if [ -f $IMGPATH/usr/lib/anaconda-runtime/boot/memtest* ]; then
+           cp $IMGPATH/usr/lib/anaconda-runtime/boot/memtest* $MBD_BOOTTREE/memtest
+           echo -e "label memtest86\n  kernel memtest\n  append -\n" >> $MBD_BOOTTREE/isolinux.cfg
+       fi
+
+    else
+       echo "No isolinux binaries.  Skipping isolinux creation"
+    fi
+
+    # clean up time -- being very explicit about what's linked
+    if [ -f $TOPDESTPATH/isolinux/vmlinuz -a -f $TOPDESTPATH/isolinux/initrd.img ] ;then
+       echo "Cleaning up images"
+       # links for the pxeboot bits
+       rm -f $TOPDESTPATH/images/pxeboot/*
+       ln $TOPDESTPATH/isolinux/vmlinuz $TOPDESTPATH/images/pxeboot/vmlinuz
+       ln $TOPDESTPATH/isolinux/initrd.img $TOPDESTPATH/images/pxeboot/initrd.img
+
+       # links for the autoboot bits
+       if [ -f $TOPDESTPATH/dosutils/loadlin.exe ]; then
+               rm -f $TOPDESTPATH/dosutils/autoboot/*
+               mkdir -p $TOPDESTPATH/dosutils/autoboot/
+               ln $TOPDESTPATH/isolinux/vmlinuz $TOPDESTPATH/dosutils/autoboot/vmlinuz
+               ln $TOPDESTPATH/isolinux/initrd.img $TOPDESTPATH/dosutils/autoboot/initrd.img
+       fi
+    fi
+
+    # now make a boot iso
+    mkdir -p $TOPDESTPATH/images/isopath
+    cp -rl $TOPDESTPATH/isolinux $TOPDESTPATH/images/isopath
+    mkisofs -quiet -o $TOPDESTPATH/images/boot.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -V "$PRODUCT" -T $TOPDESTPATH/images/isopath
+    rm -rf $TOPDESTPATH/images/isopath
+    
+    # now make a boot pendrive image
+    mkdir -p $TOPDESTPATH/images/fobpath
+    dd if=/dev/zero of=$TOPDESTPATH/images/diskboot.img bs=1M count=8 2>/dev/null
+    mkdosfs $TOPDESTPATH/images/diskboot.img
+    $SYSLINUX $TOPDESTPATH/images/diskboot.img
+    mount -o loop $TOPDESTPATH/images/diskboot.img $TOPDESTPATH/images/fobpath
+    cp -r $TOPDESTPATH/isolinux/* $TOPDESTPATH/images/fobpath/
+    grep -v local $TOPDESTPATH/images/fobpath/isolinux.cfg > $TOPDESTPATH/images/fobpath/syslinux.cfg
+    rm -f $TOPDESTPATH/images/fobpath/isolinux.cfg
+    umount -f $TOPDESTPATH/images/fobpath
+    rmdir $TOPDESTPATH/images/fobpath
+    
+    cat > $TOPDESTPATH/images/pxeboot/README <<EOF
+The files in this directory are useful for booting a machine via PXE.  
+
+The following files are available:
+vmlinuz - the BOOT kernel used for the installer
+initrd.img - an initrd with support for all install methods and
+    drivers supported for installation of $PRODUCT
+EOF
+  fi
+}
+
+makeSecondStage() {
+    echo "Building main moduleball"
+    makemainmodules "=scsi =net $SECSTAGE"
+    [ $? = 0 ] || exit 1
+
+    echo "Building netstg.img"
+    makeinstimage "netstg" "=scsi $SECSTAGE"
+    [ $? = 0 ] || exit 1
+    echo "Building hdstg.img"
+    makeinstimage "hdstg" "=net $SECSTAGE"
+    [ $? = 0 ] || exit 1
+    echo "Building stage2.img"
+    makemainimage "stage2" "cramfs"
+    [ $? = 0 ] || exit 1
+}
diff --git a/anaconda-scrubtree b/anaconda-scrubtree
new file mode 100644 (file)
index 0000000..e21fa94
--- /dev/null
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+DEBUG=""
+
+if [ "$1" == "--debug" ]; then
+    DEBUG="--debug"
+    shift
+fi
+
+if [ -z "$1" ]; then
+    echo "Usage: $0 /path/to/tree"
+    exit 1
+fi
+
+p=$1
+
+STRIP=strip
+ARCH=`uname -m | sed -e 's/i.86/i386/'`
+
+if [ $ARCH = ia64 ]; then
+    STRIP="strip --strip-debug"
+fi
+
+if [ $ARCH = x86_64 -o $ARCH = s390x ]; then
+    LIBDIR=lib64
+else
+    LIBDIR=lib
+fi
+
+# Must create ld.so.conf, because ldconfig does not cache
+# dirs specified on the command line.
+touch $p/etc/ld.so.conf
+mkdir $p/proc
+mount -t proc proc $p/proc
+[ -d $p/usr/X11R6/$LIBDIR ] && echo /usr/X11R6/$LIBDIR > $p/etc/ld.so.conf
+echo /usr/kerberos/$LIBDIR > $p/etc/ld.so.conf
+(cd $p; /usr/sbin/chroot $p usr/sbin/ldconfig )
+
+if [ $ARCH != s390 -a $ARCH != s390x ]; then
+    rm -f $p/usr/sbin/ldconfig 
+fi
+rm $p/etc/ld.so.conf
+
+#
+# make sure we have links for programs supplied by busybox
+#
+# HOWEVER dont clobber existing programs supplied by other packages if exist
+#
+mv $p/sbin/busybox.anaconda $p/usr/bin/busybox
+(cd $p/usr/bin;
+set $(./busybox 2>&1| awk '/^\t([[:alnum:]_\[]+,)+/' | sed 's/,//g' | sed 's/ +//');
+dontclobber=(sh busybox reboot shutdown poweroff)
+while [ -n "$1" ]; do
+    save=
+    for n in ${dontclobber[@]} ; do
+       if [ "$1" == "$n" ]; then
+           save=$n
+       fi
+    done
+    # if it's not in our list and it doesn't exist, link to busybox
+    if [ -z "$save" -a ! -f "$1" ]; then
+       ln -sf ./busybox $1
+    else
+       [ -n "$DEBUG" ] && echo "Overriding busybox version of $1"
+    fi
+    shift
+done
+)
+
+umount $p/proc
+
+for l in `find $p -type f -perm +100 | grep -v "usr/X11R6/$LIBDIR/modules" | xargs file | sed -n 's/^\([^:]*\):.*ELF.*$/\1/p'`; do
+    $STRIP $l -R .comment -R .note `objdump -h $l | \
+       sed -n 's/^.*\(\.gnu\.warning\.[^ ]*\) .*$/-R \1/p'`
+done
index 229078ca64445057f68405960c2e0e1a20f1740a..b1a52996f4575ed6d03bd4044b167bff4d11cb5d 100644 (file)
@@ -1104,7 +1104,7 @@ for p in $DEST $DESTGR; do
        fi    
 
        # copy bootloader files for i386/x86_64
-       if [ $ARCH = i386 -o $ARCH = x86_64 ]; then
+       if [ $ARCH = i386 -o $ARCH = i686 -o $ARCH = x86_64 ]; then
            if [ $p = $DESTGR ]; then
                mkdir -p $p/usr/lib/anaconda-runtime/boot
                cp -af $p/boot/memtest* $p/usr/lib/anaconda-runtime/boot
index ecaa7204d84cfcb440fc76963f303db2e5477dfd..64f62befc122b8d6a2217b90fb24cf2e6ba66fcb 100644 (file)
@@ -10,6 +10,7 @@ Source0:      %{name}-%{version}.tar.bz2
 Source1:       %{name}-mk-images
 Source2:       %{name}-upd-instroot
 Source3:       %{name}-mk-images.i386
+Source4:       %{name}-scrubtree
 Patch0:                %{name}-pld.patch
 URL:           http://fedora.redhat.com/projects/anaconda-installer/
 BuildRequires: X11-devel
@@ -97,6 +98,7 @@ rm Makefile.old
 cp %{SOURCE1} scripts/mk-images
 cp %{SOURCE2} scripts/upd-instroot
 cp %{SOURCE3} scripts/mk-images.i386
+cp %{SOURCE4} scripts/scrubtree
 %{__make} depend
 %{__make} \
        RPM_OPT_FLAGS="%{rpmcflags}"
@@ -133,7 +135,10 @@ rm -rf $RPM_BUILD_ROOT
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log: anaconda.spec,v $
-Revision 1.4  2005-04-29 16:38:04  qboosh
+Revision 1.5  2005-05-03 18:03:18  patrys
+- updated
+
+Revision 1.4  2005/04/29 16:38:04  qboosh
 - locales cleanup
 
 Revision 1.3  2005/04/29 16:22:41  qboosh
This page took 0.061128 seconds and 4 git commands to generate.