countach:/usr/local/src/debian-installer-20061102/build# fakeroot make build_sparc64_netboot-2.6 dh_testroot cd .. && dpkg-checkbuilddeps # This build cannot be restarted, because dpkg gets confused. rm -rf ./tmp/sparc64_netboot-2.6/tree # Set up the basic files [u]dpkg needs. mkdir -p ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/info touch ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/status # Create a tmp tree mkdir -p ./tmp/sparc64_netboot-2.6/tree/tmp # Only dpkg needs this stuff, so it can be removed later. mkdir -p ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/updates/ touch ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/available # Unpack the udebs with dpkg. This command must run as root # or fakeroot. echo -n > ./tmp/sparc64_netboot-2.6/diskusage.txt set -e; \ oldsize=0; oldblocks=0; oldcount=0; for udeb in udebs/*.udeb ; do \ if [ -f "$udeb" ]; then \ pkg=`basename $udeb` ; \ dpkg --force-overwrite --log=/dev/null --root=./tmp/sparc64_netboot-2.6/tree --unpack $udeb ; \ newsize=`du -bs ./tmp/sparc64_netboot-2.6/tree | awk '{print $1}'` ; \ newblocks=`du -s ./tmp/sparc64_netboot-2.6/tree | awk '{print $1}'` ; \ newcount=`find ./tmp/sparc64_netboot-2.6/tree -type f | wc -l | awk '{print $1}'` ; \ usedsize=`echo $newsize - $oldsize | bc`; \ usedblocks=`echo $newblocks - $oldblocks | bc`; \ usedcount=`echo $newcount - $oldcount | bc`; \ version=`dpkg-deb --info $udeb | grep '^ *Version:' | sed 's/^ *//' | awk '{print $2}'` ; \ echo " $usedsize B - $usedblocks blocks - $usedcount files from $pkg (version $version)" >>./tmp/sparc64_netboot-2.6/diskusage.txt;\ oldsize=$newsize ; \ oldblocks=$newblocks ; \ oldcount=$newcount ; \ fi; \ done sort -n < ./tmp/sparc64_netboot-2.6/diskusage.txt > ./tmp/sparc64_netboot-2.6/diskusage.txt.new && \ mv ./tmp/sparc64_netboot-2.6/diskusage.txt.new ./tmp/sparc64_netboot-2.6/diskusage.txt grep-dctrl -nsPackage,Version,Architecture '' ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/status | \ perl -nle '$p = $_; $v = <>; chomp $v; $a = <>; chomp $a; <>; print "$p $v $a"' | \ sort > ./tmp/sparc64_netboot-2.6/udeb.list # Clean up after dpkg. rm -rf ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/updates rm -f ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/available ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/*-old ./tmp/sparc64_netboot-2.6/tree/var/lib/dpkg/lock # Set up modules.dep, ensure there is at least one standard dir (kernel # in this case), so depmod will use its prune list for archs with no # modules. set -e; \ sysmap_name=; sysmap_opt=; if [ -n "t" ]; then [ ! -e ./tmp/sparc64_netboot-2.6/tree/boot/System.map-2.6.17-sparc64 ] || sysmap_name="./tmp/sparc64_netboot-2.6/tree/boot/System.map-2.6.17-sparc64"; else [ ! -e ./tmp/sparc64_netboot-2.6/tree/boot/System.map ] || sysmap_name="./tmp/sparc64_netboot-2.6/tree/boot/System.map"; fi; [ -z "$sysmap_name" ] || sysmap_opt="-F $sysmap_name"; if [ -d ./tmp/sparc64_netboot-2.6/tree/lib/modules/2.6.17-sparc64 ]; then mkdir -p ./tmp/sparc64_netboot-2.6/tree/lib/modules/2.6.17-sparc64/kernel; sparc64 depmod $sysmap_opt -q -a -b ./tmp/sparc64_netboot-2.6/tree/ 2.6.17-sparc64; fi; [ -z "$sysmap_name" ] || mv $sysmap_name ./tmp/sparc64_netboot-2.6; # These files depmod makes are used by hotplug, if it's being used; # otherwise, we shouldn't need them. Some files aren't even used by # hotplug, so never include them. if [ -d ./tmp/sparc64_netboot-2.6/tree/etc/udev ] || [ -d ./tmp/sparc64_netboot-2.6/tree/etc/hotplug ]; then \ find ./tmp/sparc64_netboot-2.6/tree/lib/modules/ -name 'modules*' \ -not -name modules.dep -not -name modules.alias \ -not -name 'modules.*map' \ -not -type d | xargs rm -f; \ else \ find ./tmp/sparc64_netboot-2.6/tree/lib/modules/ -name 'modules*' \ -not -name modules.dep -not -type d | xargs rm -f; \ fi find: ./tmp/sparc64_netboot-2.6/tree/lib: No such file or directory # These files are used to build special kernel images for some # subarchitectures. Move them out of the way. if [ -d ./tmp/sparc64_netboot-2.6/tree/usr/lib/kernel-image-2.6.17-sparc64 ]; then mv ./tmp/sparc64_netboot-2.6/tree/usr/lib/kernel-image-2.6.17-sparc64 ./tmp/sparc64_netboot-2.6/lib; fi; if [ -d ./tmp/sparc64_netboot-2.6/tree/usr/lib/linux-image-2.6.17-sparc64 ]; then mv ./tmp/sparc64_netboot-2.6/tree/usr/lib/linux-image-2.6.17-sparc64 ./tmp/sparc64_netboot-2.6/lib; fi; # Move the kernel image out of the way. mv -f ./tmp/sparc64_netboot-2.6/tree/boot/vmlinuz-2.6.17-sparc64 ./tmp/sparc64_netboot-2.6/vmlinuz-2.6.17-sparc64; mv: cannot stat `./tmp/sparc64_netboot-2.6/tree/boot/vmlinuz-2.6.17-sparc64': No such file or directory make[2]: *** [stamps/tree-unpack-sparc64_netboot-2.6-stamp] Error 1 make[1]: *** [_build] Error 2 make: *** [build_sparc64_netboot-2.6] Error 2