Changeset 561 in MondoRescue for trunk/mindi
- Timestamp:
- May 20, 2006, 5:51:21 PM (18 years ago)
- Location:
- trunk/mindi
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/distributions/gentoo/mindi.ebuild
r537 r561 2 2 # Distributed under the terms of the GNU General Public License v2 3 3 # $Id$ 4 # $Header$ 4 5 5 6 DESCRIPTION="A program that creates emergency boot disks/CDs using your kernel, tools and modules." 6 7 HOMEPAGE="http://www.mondorescue.org" 7 SRC_URI="ftp://ftp.mondorescue.org/src/${P }.tgz"8 SRC_URI="ftp://ftp.mondorescue.org/src/${PVR}.tar.gz" 8 9 9 10 LICENSE="GPL-2" … … 14 15 DEPEND="virtual/libc" 15 16 RDEPEND=">=app-arch/bzip2-0.9 16 >=sys-apps/mindi-kernel-1.0-r117 17 sys-libs/ncurses 18 18 sys-devel/binutils … … 27 27 export PREFIX="/usr" 28 28 export CONFDIR="/etc" 29 export DONT_RELINK=1 29 30 export RPMBUILDMINDI="true" 30 31 ./install.sh -
trunk/mindi/distributions/mandriva/spec.m4
r388 r561 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', ` %{name}-%{version}.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-%{tag}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 define(`DDD', ` %{addreqb}, which, grep >= 2.5')dnl6 define(`DDD', `, which, grep >= 2.5')dnl 7 7 dnl GRP is replaced by the RPM group of apps 8 8 define(`GRP', `Archiving/Backup')dnl -
trunk/mindi/distributions/redhat/spec.m4
r496 r561 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', ftp://ftp.mondorescue.org/src/%{name}-%{version}.tgz)dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-%{tag}.tar.gz')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 define(`DDD', %{addreqb}, which, grep >= 2.5)dnl6 define(`DDD', `, which, grep >= 2.5')dnl 7 7 dnl GRP is replaced by the RPM group of apps 8 define(`GRP', Applications/Archiving)dnl8 define(`GRP', `Applications/Archiving')dnl -
trunk/mindi/distributions/rpm/mindi.spec
r496 r561 2 2 # $Id$ 3 3 # 4 %define name mindi5 %define version VVV6 4 %define mrel RRR 7 %define src SSS 8 %define grp GRP 9 %define addreqb bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools 10 %define addreq DDD 11 %define rel %{mrel} 5 %define tag TTT 12 6 13 7 Summary: Mindi creates emergency boot disks/CDs using your kernel, tools and modules 14 Name: %name15 Version: %version16 Release: % rel8 Name: mindi 9 Version: VVV 10 Release: %mrel 17 11 License: GPL 18 Group: %{grp}12 Group: GRP 19 13 Url: http://www.mondorescue.org 20 Source: %{src}14 Source: SSS 21 15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) 22 Requires: %{addreq} 23 Epoch: %(echo EEE | cut -d- -f1 | sed "s~M~~") 16 Requires: bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools DDD 24 17 # Not on all systems 25 18 #Conflicts: bonnie++ … … 32 25 33 26 %prep 34 %setup -n %name-%{version} 27 %setup -n %name-%{version}-%{tag} 35 28 36 29 %build -
trunk/mindi/distributions/suse/spec.m4
r403 r561 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', %{name}-%{version}.tgz)dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-%{tag}.tar.gz')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 define(`DDD', %{addreqb}, syslinux)dnl6 define(`DDD', `, syslinux')dnl 7 7 dnl GRP is replaced by the RPM group of apps 8 define(`GRP', Productivity/Archiving/Backup)dnl8 define(`GRP', `Productivity/Archiving/Backup')dnl -
trunk/mindi/mindi
r539 r561 1367 1367 if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then 1368 1368 echo -en "\rAnalyzing LVM...\r" 1369 all_partitions=`$MINDI_ SBIN/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`1369 all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32` 1370 1370 fi 1371 1371 all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`" … … 2145 2145 [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero\n" 2146 2146 return $retval 2147 } 2148 2149 2150 PrepareDataDiskImages() { 2151 local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines 2152 2153 imagesdir=$1 2154 rm -f $imagesdir/mindi-*.img $imagesdir/[0-9]*.tar.gz $imagesdir/mindi.iso 2155 needlist=$TMP_ROOT/what-we-need.txt 2156 bigdir=$TMP_ROOT/bigdir 2157 minidir_root=$TMP_ROOT/minidir 2158 mkdir -p $minidir_root 2159 mkdir -p $bigdir/usr/bin 2160 tardir=$TMP_ROOT/tardir 2161 2162 lines=`grep -vx " *#.*" $MINDI_CONF/deplist.txt | grep -vx "" | wc -l` 2163 cat $MINDI_CONF/deplist.txt | GenerateGiantDependencyList $needlist $lines 2164 res=$? 2165 if [ "$YOUR_KERNEL_SUCKS" ]; then 2166 pwd=`pwd` 2167 cd $TMP_ROOT 2168 for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do 2169 cp --parents -pRdf ./$i $bigdir || Die "PDDI can't cp $i->$bigdir" 2170 if [ "`du -sk $i | cut -f1`" -lt "$(($CHOPSIZE*2))" ] ; then 2171 cp --parents -pRdf $i $bigdir 2172 else 2173 ChopUpAndCopyFile $i $bigdir $CHOPSIZE $BIGNO 2174 BIGNO=$(($BIGNO+1)) 2175 fi 2176 done 2177 for i in $EXTRA_MODS ; do 2178 j=`find lib/modules/$FAILSAFE_KVER -name $i.*o 2> /dev/null` 2179 [ ! "$j" ] && echo "Warning - cannot find failsafe module $i.o" >> $LOGFILE 2180 for k in $j ; do 2181 if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then 2182 cp --parents -pRdf $k $bigdir 2183 else 2184 ChopUpAndCopyFile $k $bigdir $CHOPSIZE $BIGNO 2185 BIGNO=$(($BIGNO+1)) 2186 fi 2187 echo "Added failsafe module $k to ramdisk" >> $LOGFILE 2188 done 2189 done 2190 cd $pwd 2191 else 2192 ListKernelModulePaths >> $needlist 2193 fi 2194 if [ "$res" -ne "0" ] ; then 2195 Die "You have $res file`PluralOrNot $res` present in dependency list\nbut absent from filesystem." 2196 fi 2197 FindAndAddUserKeyboardMappingFile 2198 mkdir -p $bigdir/tmp 2199 if [ "`DidMondoCallMe`" ] ; then 2200 MakeMondoConfigFile $TMP_ROOT/mondo-restore.cfg 2201 cp -f $TMP_ROOT/mondo-restore.cfg $bigdir/tmp &> /dev/null 2202 cp -f $TMP_ROOT/mondo-restore.cfg $CACHE_LOC &> /dev/null 2203 fi 2204 [ -d "/mnt/.boot.d" ] && echo "Oh Jebus" > $bigdir/tmp/DUMBASS-GENTOO 2205 DropOptimizedLibraries $needlist $bigdir 2206 echo -en "Assembling dependency files" 2207 CopyDependenciesToDirectory < $needlist $bigdir 2208 2209 # also copy io.sys and msdos.sys, if we can find them 2210 for i in `mount | cut -d' ' -f3` ; do 2211 for j in io.sys msdos.sys ; do 2212 [ -e "$i/$j" ] && cp -f $i/$j $bigdir 2213 done 2214 done 2215 2216 # master boot record, too 2217 i=`cat $MONDO_TMP/BOOTLOADER.DEVICE 2> /dev/null` 2218 if [ "$i" ] ; then 2219 LogIt "Backing up $i's MBR\n" 2220 dd if=$i of=$bigdir/BOOTLOADER.MBR bs=446 count=1 >> $LOGFILE 2>> $LOGFILE 2221 # < < E O F 2222 sleep 1 2223 sync 2224 # [ "$?" -ne "0" ] && echo "Failed to save $i's MBR to bigdir" >> $LOGFILE 2225 j=$i 2226 [ -h "$j" ] && j=`ResolveSoftlink $j` 2227 LogIt "Creating /dev/boot_device ($j)\n" 2228 mkdir -p $bigdir/dev 2229 cp -pRdf $j $bigdir/dev/boot_device || Die "Unable to create /dev/boot_device on ramdisk" 2230 fi 2231 2232 # more stuff 2233 # cp -f $MINDI_LIB/embleer* $bigdir 2234 old_pwd=`pwd` 2235 cd $bigdir 2236 2237 [ -e "$MINDI_LIB/aux-tools" ] || Die "aux-tools not found in Mindi's home dir. Do you have multiple copies of Mindi lying around? Please delete them. No, don't e-mail me and ask how. ;) Use 'rm'." 2238 cp -Rdf $MINDI_LIB/aux-tools/* . 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping aux-tools\n" 2239 if [ -e "$MINDI_LIB/x11-tools.tgz" ] ; then 2240 tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping x11-tools.tgz\n" 2241 fi 2242 if [ -e "$MONDO_SHARE/restore-scripts" ] ; then 2243 cp -Rdf $MONDO_SHARE/restore-scripts/* . 2>> $LOGFILE 2244 [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" 2245 fi 2246 [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2247 cd $old_pwd 2248 echo -e "$DONE" 2249 TOTAL_BIGDIR_SIZE=`du -sk $bigdir | cut -f1` 2250 SplitDirectoryIntoMinidirs $bigdir $minidir_root 2251 noof_disks=$? 2252 [ "$noof_disks" -eq "0" ] && Die "Too much stuff!" 2253 # if [ "$noof_disks" -ge "8" ] ; then 2254 # LogIt "You are putting a ludicrously large amount of data on these disks." 2255 # LogIt "I shall therefore double EXTRA_SPACE, just in case your ramdisk is too small." 2256 # EXTRA_SPACE=$(($EXTRA_SPACE*2)) 2257 # fi 2258 MakeMountlist $TMP_ROOT/mountlist.txt 2259 mkdir -p $minidir_root/$noof_disks/tmp 2260 cp -f $TMP_ROOT/mountlist.txt $minidir_root/$noof_disks/tmp/mountlist.txt || Die "Cannot copy mountlist.txt from $TMP_ROOT to data disk" 2261 cp -f $TMP_ROOT/mountlist.txt $CACHE_LOC 2262 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MONDO_TMP/. 2263 [ -d "/proc/lvm" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2264 [ -d "/dev/mapper" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2265 cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE 2266 ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks 2267 CreateDataDiskImagesFromTarballs $tardir $imagesdir $noof_disks 2268 FRIENDLY_OUTSTRING="Boot and data disk images were created." 2269 # One 1.72MB boot disk, one 2.88MB boot disk and $noof_disks data disk images 2270 rmdir $tardir $bigdir 2271 rm -f $needlist 2272 return $noof_disks 2147 2273 } 2148 2274
Note:
See TracChangeset
for help on using the changeset viewer.