don't use partimage on 64-bit machines

ubuntu/precise
LaMont Jones 20 years ago
parent 1de1d754a1
commit de54b7e334

7
debian/changelog vendored

@ -1,3 +1,10 @@
livecd-rootfs (0.11) hoary; urgency=low
* apt-get update in the final chroot
* Change partimage depend to be [ !64-bit ], use partimage conditionally
-- LaMont Jones <lamont@debian.org> Fri, 21 Jan 2005 22:47:46 -0700
livecd-rootfs (0.10) hoary; urgency=low livecd-rootfs (0.10) hoary; urgency=low
* Actually run /usr/sbin/locale-gen to generate the locales. * Actually run /usr/sbin/locale-gen to generate the locales.

2
debian/control vendored

@ -7,7 +7,7 @@ Standards-Version: 3.6.1.0
Package: livecd-rootfs Package: livecd-rootfs
Architecture: all Architecture: all
Depends: sudo, debootstrap, rsync, cloop-utils, python-minimal|python, partimage Depends: sudo, debootstrap, rsync, cloop-utils, python-minimal|python, partimage [!ia64 !alpha !amd64]
Description: construction script for the livecd rootfs Description: construction script for the livecd rootfs
livecd-rootfs provides the script used to create the root filesystem livecd-rootfs provides the script used to create the root filesystem
on the livecd. on the livecd.

@ -61,8 +61,7 @@ debootstrap --exclude=udev,ubuntu-base $STE $ROOT $MIRROR
DIVERTS="usr/sbin/mkinitrd usr/sbin/invoke-rc.d sbin/udevd" DIVERTS="usr/sbin/mkinitrd usr/sbin/invoke-rc.d sbin/udevd"
for file in $DIVERTS; do for file in $DIVERTS; do
mkdir -p ${ROOT}${file%/*} mkdir -p ${ROOT}${file%/*}
sudo chroot $ROOT dpkg-divert --add --local \ sudo chroot $ROOT dpkg-divert --add --local --divert /${file}.livecd --rename /${file}
--divert /${file}.livecd --rename /${file}
cp /bin/true ${ROOT}$file cp /bin/true ${ROOT}$file
done done
@ -70,7 +69,6 @@ done
cat << @@EOF > ${ROOT}/usr/sbin/mkinitrd cat << @@EOF > ${ROOT}/usr/sbin/mkinitrd
#!/usr/bin/python #!/usr/bin/python
import sys import sys
for i in range(len(sys.argv)): for i in range(len(sys.argv)):
if sys.argv[i]=='-o': if sys.argv[i]=='-o':
open(sys.argv[i+1],"w") open(sys.argv[i+1],"w")
@ -103,16 +101,16 @@ mount -tproc none ${ROOT}proc
cp ${ROOT}etc/apt/trusted.gpg ${ROOT}etc/apt/trusted.gpg.$$ cp ${ROOT}etc/apt/trusted.gpg ${ROOT}etc/apt/trusted.gpg.$$
cat /etc/apt/trusted.gpg >> ${ROOT}etc/apt/trusted.gpg cat /etc/apt/trusted.gpg >> ${ROOT}etc/apt/trusted.gpg
OTHER="xresprobe laptop-detect" LIST="ubuntu-base ubuntu-desktop xresprobe laptop-detect"
case $(dpkg --print-architecture) in case $(dpkg --print-architecture) in
amd64) OTHER="$OTHER linux-amd64-generic";; amd64) LIST="$LIST linux-amd64-generic";;
i386) OTHER="$OTHER linux-386";; i386) LIST="$LIST linux-386";;
ia64) OTHER="$OTHER linux-itanium-smp linux-mckinley-smp";; ia64) LIST="$LIST linux-itanium-smp linux-mckinley-smp";;
powerpc) OTHER="$OTHER linux-powerpc linux-power3 linux-power4";; powerpc) LIST="$LIST linux-powerpc linux-power3 linux-power4";;
# and the bastard stepchildren # and the bastard stepchildren
hppa) OTHER="$OTHER linux-hppa32-smp linux-hppa64-smp";; hppa) LIST="$LIST linux-hppa32-smp linux-hppa64-smp";;
sparc*) OTHER="$OTHER linux-sparc64";; sparc*) LIST="$LIST linux-sparc64";;
*) echo "Unknown architecture: no kernel."; exit 1;; *) echo "Unknown architecture: no kernel."; exit 1;;
esac esac
@ -120,7 +118,7 @@ esac
echo deb $MIRROR $STE main restricted > ${ROOT}etc/apt/sources.list echo deb $MIRROR $STE main restricted > ${ROOT}etc/apt/sources.list
#echo deb http://rockhopper.warthogs.hbd.com/~lamont/lrm / >> ${ROOT}etc/apt/sources.list #echo deb http://rockhopper.warthogs.hbd.com/~lamont/lrm / >> ${ROOT}etc/apt/sources.list
chroot $ROOT apt-get update chroot $ROOT apt-get update
chroot $ROOT apt-get -y install ubuntu-base ubuntu-desktop $OTHER </dev/null chroot $ROOT apt-get -y install $LIST </dev/null
chroot $ROOT /etc/cron.daily/slocate chroot $ROOT /etc/cron.daily/slocate
chroot $ROOT /etc/cron.daily/man-db chroot $ROOT /etc/cron.daily/man-db
chroot $ROOT /usr/sbin/locale-gen chroot $ROOT /usr/sbin/locale-gen
@ -157,6 +155,7 @@ mv ${ROOT}etc/apt/trusted.gpg.$$ ${ROOT}etc/apt/trusted.gpg
chroot ${ROOT} apt-get clean chroot ${ROOT} apt-get clean
rm -f ${ROOT}var/lib/apt/lists/*_* rm -f ${ROOT}var/lib/apt/lists/*_*
rm -f ${ROOT}var/spool/postfix/maildrop/* rm -f ${ROOT}var/spool/postfix/maildrop/*
chroot $ROOT apt-get update || true # give them fresh lists, but don't fail
mkdir -p livecd.mnt mkdir -p livecd.mnt
MOUNTS="$MOUNTS $(pwd)/livecd.mnt" MOUNTS="$MOUNTS $(pwd)/livecd.mnt"
@ -185,8 +184,10 @@ for fsbs in 1024:65536; do
rsync -a --delete --inplace --no-whole-file ${ROOT} livecd.mnt rsync -a --delete --inplace --no-whole-file ${ROOT} livecd.mnt
umount $DEV umount $DEV
rm -rf partimg-${IMGNAME}.* rm -rf partimg-${IMGNAME}.*
partimage -b -z0 --nodesc -f3 -c -o -y save $DEV partimg-${IMGNAME} if [ -x /usr/sbin/partimage ]; then
cat partimg-${IMGNAME}.*|partimage -b -z0 --nodesc -e -f3 -c -o -y restore $DEV stdin partimage -b -z0 --nodesc -f3 -c -o -y save $DEV partimg-${IMGNAME}
cat partimg-${IMGNAME}.*|partimage -b -z0 --nodesc -e -f3 -c -o -y restore $DEV stdin
fi
losetup -d $DEV losetup -d $DEV
mv new-${IMGNAME} ${IMGNAME} mv new-${IMGNAME} ${IMGNAME}
cp ${IMGNAME} old-${IMGNAME} cp ${IMGNAME} old-${IMGNAME}

Loading…
Cancel
Save