6 |
6 |
7 DEBVERSION=sid |
7 DEBVERSION=sid |
8 |
8 |
9 PRISTINE=/var/local/cache/pristine/$DEBVERSION |
9 PRISTINE=/var/local/cache/pristine/$DEBVERSION |
10 |
10 |
|
11 if [ ! -e $PRISTINE ] ; then |
|
12 echo "Debian pristine image not found, try running create-source-image" |
|
13 echo $PRISTINE |
|
14 exit -1 |
|
15 fi |
|
16 |
11 TOPDIR=`pwd` |
17 TOPDIR=`pwd` |
|
18 mkdir -p $TOPDIR/build/env |
12 BACKING=$TOPDIR/build/env/backing |
19 BACKING=$TOPDIR/build/env/backing |
13 MOUNT=$TOPDIR/build/env/mount |
20 MOUNT=$TOPDIR/build/env/mount |
14 mkdir -p $TOPDIR/build/env |
21 if [ -e $MOUNT ] ; then |
|
22 echo "Removing old filesystem" |
|
23 # FIXME: evil hack! |
|
24 chroot $MOUNT /etc/init.d/ssh stop || true |
|
25 umount $MOUNT/proc || true |
|
26 umount $MOUNT || true |
|
27 rm -rf $MOUNT |
|
28 fi |
|
29 if [ -e $BACKING ] ; then |
|
30 echo "Copying deb files into cache" |
|
31 cp $BACKING/var/cache/apt/archives/* build/aptcache/$DEBVERSION || true |
|
32 echo "Deleting old filesystem backing store" |
|
33 rm -rf $BACKING |
|
34 fi |
15 mkdir $BACKING $MOUNT |
35 mkdir $BACKING $MOUNT |
16 |
36 |
17 touch $BACKING/please-trash-this-system |
37 touch $BACKING/please-trash-this-system |
18 mkdir -p $BACKING/etc |
38 mkdir -p $BACKING/etc |
19 echo "pristine" > $BACKING/etc/debian_chroot |
39 echo "pristine" > $BACKING/etc/debian_chroot |
20 cp -v policy-rc.d $BACKING/etc/policy-rc.d |
40 cp -v policy-rc.d $BACKING/etc/policy-rc.d |
21 |
41 |
22 mkdir -p $BACKING/var/cache/apt/archives |
42 mkdir -p $BACKING/var/cache/apt/archives |
23 cp -v build/aptcache/$DEBVERSION/* $BACKING/var/cache/apt/archives || true |
43 echo "Copying deb files out of cache" |
|
44 cp build/aptcache/$DEBVERSION/* $BACKING/var/cache/apt/archives || true |
24 |
45 |
25 cp -av action $BACKING |
46 cp -av action $BACKING |
26 #hg -R ../mercurial-server archive -r default $BACKING/action/mercurial-server |
47 #hg -R ../mercurial-server archive -r default $BACKING/action/mercurial-server |
27 ( cd ../mercurial-server && \ |
48 ( cd ../mercurial-server && \ |
28 hg st -mac0n | cpio -p -0 -d $BACKING/action/mercurial-server ) |
49 hg st -mac0n | cpio -p -0 -d $BACKING/action/mercurial-server ) |