Changeset 235 for branches/2.05


Ignore:
Timestamp:
Dec 19, 2005, 7:27:54 PM (14 years ago)
Author:
bcornec
Message:
  • fix bug in install process of parted2fdisk (Wolfgang Rosenauer)
  • remove superfluous extraction of symlinks in install.sh (Wolfgang Rosenauer)
  • no specific busybox binaries for x86_64 for the moment (Wolfgang Rosenauer)
  • some cleanup done better (Wolfgang Rosenauer)
  • fix bugs in install.sh using /usr/local PREFIX and modes (Jeff Vian)
Location:
branches/2.05/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.05/mindi/Makefile.parted2fdisk

    r30 r235  
    1818
    1919install: $(PRG)
    20     cp -a $(PRG) $(DEST)$(SUB)/$(PRG)-$(ARCH)
     20    cp -a $(PRG) $(DEST)/$(SUB)/$(PRG)-$(ARCH)
  • branches/2.05/mindi/install.sh

    r200 r235  
    77
    88if [ "_$PREFIX" != "_" ]; then
    9     local=$PREFIX/usr
     9    local=$PREFIX
    1010    if [ -f /usr/local/sbin/mindi ]; then
    1111        echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove it !"
    1212    fi
    13     conf=$PREFIX/etc/mindi
     13    conf=$CONFDIR/mindi
    1414    echo $PATH | grep /usr/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add /usr/sbin to your PATH."
    1515else
     
    2020    conf=$local/etc/mindi
    2121    echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH."
    22 
    2322fi
    2423
     
    3130
    3231echo "Creating target directories ..."
    33 mkdir -p $local/lib/mindi
    34 mkdir -p $local/share/man/man8
    35 mkdir -p $local/sbin
    36 mkdir -p $conf
     32install -g root -o root -m 755 -d $conf $local/lib/mindi $local/share/man/man8 $local/sbin $local/doc/mindi
    3733
    3834echo "Copying files ..."
    39 cp -a deplist.txt $conf
    40 cp -af rootfs aux-tools isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg parted2fdisk.pl syslinux.cfg syslinux-H.cfg dev.tgz Mindi $local/lib/mindi
     35install -g root -o root -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $local/lib/mindi
     36install -g root -o root -m 644 deplist.txt $conf
     37
     38cp -a rootfs aux-tools Mindi $local/lib/mindi
    4139chmod 755 $local/lib/mindi/rootfs/bin/*
    4240chmod 755 $local/lib/mindi/rootfs/sbin/*
    4341chmod 755 $local/lib/mindi/aux-tools/sbin/*
     42chown -R root:root $local/lib/mindi
    4443
    45 cp -af analyze-my-lvm parted2fdisk.pl $local/sbin
    4644if [ "$RPMBUILDMINDI" = "true" ]; then
    4745    sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=/usr~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=/etc/mindi~" mindi > $local/sbin/mindi
     
    5048fi
    5149chmod 755 $local/sbin/mindi
    52 chmod 755 $local/sbin/analyze-my-lvm
    53 chmod 755 $local/sbin/parted2fdisk.pl
     50chown root:root $local/sbin/mindi
     51install -g root -o root -m 755 analyze-my-lvm parted2fdisk.pl $local/sbin
    5452
    55 cp -a mindi.8 $local/share/man/man8
    56 cp -a CHANGES COPYING README README.busybox README.ia64 README.pxe TODO INSTALL $local/lib/mindi
    57 
    58 echo "Extracting symlinks ..."
    59 ( cd $local/lib/mindi/rootfs && tar -xzf symlinks.tgz )
     53install -g root -o root -m 644 mindi.8 $local/share/man/man8
     54install -g root -o root -m 644 CHANGES COPYING README README.busybox README.ia64 README.pxe TODO INSTALL $local/doc/mindi
    6055
    6156ARCH=`/bin/arch`
    6257echo $ARCH | grep -x "i[0-9]86" &> /dev/null && ARCH=i386
     58# For the moment, we don't build specific x86_64 busybox binaries
     59echo $ARCH | grep -x "x86_64" &> /dev/null && ARCH=i386
    6360export ARCH
    6461
     62# Managing busybox
    6563if [ -f $local/lib/mindi/rootfs/bin/busybox-$ARCH ]; then
    6664        echo "Installing busybox ..."
    67         mv $local/lib/mindi/rootfs/bin/busybox-$ARCH $local/lib/mindi/rootfs/bin/busybox
     65        install -s -g root -o root -m 755 $local/lib/mindi/rootfs/bin/busybox-$ARCH $local/lib/mindi/rootfs/bin/busybox
    6866else
    6967        echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)"
    7068fi
    71 
    7269if [ "$ARCH" = "i386" ] ; then
    73     # FHS requires fdisk under /sbin
    74     (cd $local/sbin && ln -s /sbin/fdisk parted2fdisk)
    7570    if [ -f $local/lib/mindi/rootfs/bin/busybox-$ARCH.net ]; then
    7671        echo "Installing busybox.net ..."
    77         mv $local/lib/mindi/rootfs/bin/busybox-$ARCH.net $local/lib/mindi/rootfs/bin/busybox.net
     72        install -s -g root -o root -m 755 $local/lib/mindi/rootfs/bin/busybox-$ARCH.net $local/lib/mindi/rootfs/bin/busybox.net
    7873    else
    7974        echo "WARNING: no busybox.net found, mindi will not work on this arch ($ARCH) with network"
    8075    fi
    8176fi
     77# Remove left busybox
     78rm -f $local/lib/mindi/rootfs/bin/busybox-*
    8279
     80# Managing parted2fdisk
    8381if [ "$ARCH" = "ia64" ] ; then
    84     (cd $local/sbin && ln -s parted2fdisk.pl parted2fdisk)
     82    (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
    8583    make -f Makefile.parted2fdisk DEST=$local/lib/mindi install
    8684    if [ -f $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then
    8785        echo "Installing parted2fdisk ..."
    88         mv $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/lib/mindi/rootfs/sbin/parted2fdisk
     86        install -s -g root -o root -m 755 $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/lib/mindi/rootfs/sbin/parted2fdisk
     87        install -s -g root -o root -m 755 $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/sbin/parted2fdisk
    8988    else
    9089        echo "WARNING: no parted2fdisk found, mindi will not work on this arch ($ARCH)"
    9190    fi
    9291else
     92    # FHS requires fdisk under /sbin
     93    (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk)
    9394    echo "Symlinking fdisk to parted2fdisk"
    9495    ( cd $local/lib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
    9596fi
     97# Remove left parted2fdisk
     98rm -f $local/lib/mindi/rootfs/sbin/parted2fdisk-*
    9699
    97100exit 0
  • branches/2.05/mindi/mindi

    r232 r235  
    222222    mappath=$1
    223223    KBDEPTH=$(($KBDEPTH+1))
    224     [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 1170, approx.)"
     224    [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 2160, approx.)"
    225225    if [ -e "$bigdir/$mappath" ] ; then
    226226    echo "$mappath already added" >> $LOGFILE
     
    422422    while [ "$diskno" -le "$noof_disks" ] ; do
    423423    echo -en "#$diskno..."
    424     cp -f $tardir/$diskno.tar.gz $outdir || LogIt "[line 250] Cannot copy $tardir/$diskno.tar.gz to $outdir"
     424    cp -f $tardir/$diskno.tar.gz $outdir || LogIt "[line 424] Cannot copy $tardir/$diskno.tar.gz to $outdir"
    425425        CreateOneDataDiskImage $tardir/$diskno.tar.gz $outdir/mindi-data-$diskno.img $diskno $noof_disks
    426426        diskno=$(($diskno+1))
     
    32583258if [ "$imagesdir" != "/root/images/mindi" ] ; then
    32593259    for i in `find $imagesdir -maxdepth 1 -name "*.iso" -o -name "*.img"` ; do
    3260     cp -f $i /root/images/mindi || LogIt "[line 1613] Cannot copy $i to /root/images/mindi"
     3260    cp -f $i /root/images/mindi || LogIt "[line 3260] Cannot copy $i to /root/images/mindi"
    32613261    done
    32623262fi
  • branches/2.05/mindi/mindi.spec

    r233 r235  
    6868
    6969%{__rm} -rf $RPM_BUILD_ROOT
    70 MINDIDIR=$RPM_BUILD_ROOT%{_libdir}/mindi
    71 export PREFIX=${RPM_BUILD_ROOT}
     70export PREFIX=${RPM_BUILD_ROOT}%{_exec_prefix}
     71export CONFDIR=${RPM_BUILD_ROOT}%{_sysconfdir}
    7272export RPMBUILDMINDI="true"
    7373
    7474./install.sh
    75 
    76 %{__rm} -f $MINDIDIR/rootfs/bin/busybox-ia64 $MINDIDIR/rootfs/sbin/parted2fdisk-ia64 $MINDIDIR/rootfs/bin/busybox-i386 $MINDIDIR/rootfs/bin/busybox-i386.net
    7775
    7876%clean
     
    9189%{_mandir}
    9290%{_libdir}/mindi
    93 #%attr(755,root,root) %{_libdir}/mindi/aux-tools/sbin/*
    94 #%attr(755,root,root) %{_libdir}/mindi/rootfs/bin/*
    95 #%attr(755,root,root) %{_libdir}/mindi/rootfs/sbin/*
    9691%attr(755,root,root) %{_sbindir}/*
    9792
Note: See TracChangeset for help on using the changeset viewer.