X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tools%2Fnd_build_testrdepends;h=28a820d88d4ebd77ee45828db68fa341043fbc8d;hb=HEAD;hp=cef0ab1008543382b475ffb74198a89afa3d3847;hpb=d9478dd0666ea2f674aac55eba8cc05439d5ea1e;p=neurodebian.git diff --git a/tools/nd_build_testrdepends b/tools/nd_build_testrdepends index cef0ab1..28a820d 100755 --- a/tools/nd_build_testrdepends +++ b/tools/nd_build_testrdepends @@ -21,19 +21,58 @@ pkg=${dscfile%_*} #? TODO -- should be a parameter as well? testdir=${dscfilef_base}_$arch.testrdepends.$family-$dist +secdir=${dscfilef_base}_$arch.testrdepends.$family-$dist.secure bindir=$testdir/bin debdir=$testdir/debs srcdir=$testdir/srcs oldbuildsdir=$srcdir/old newbuildsdir=$srcdir/new -echo "I: Building the new package for $pkg" +echo "I: Updating target chroot $family $dist" +$CMD nd_updatedist $family $dist $arch + +mkdir -p $debdir $srcdir $bindir $secdir -mkdir -p $debdir $srcdir $bindir +echo "I: Building the new package for $pkg" $CMD nd_build $family $dist $arch $dscfile --buildresult=$debdir +echo "I: Initiating the repository" cd $debdir dpkg-scanpackages . >| Packages +apt-ftparchive release . >| Release + +gpgargs="--no-default-keyring --secret-keyring $secdir/keyring.sec --keyring $secdir/keyring.pub" +if [ ! -e $secdir/keyring.sec ]; then + # Generate a key to sign the Release file + cat >| $secdir/keyring.gen < /dev/null @@ -41,12 +80,13 @@ cd - > /dev/null echo "I: Fetching all bdepends for $pkgs in $family $dist under $arch" # need first to provide the necessary scripts out there cp -p $(dirname $0)/nd_fetch_bdepends $bindir -$CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $srcdir $pkgs +$CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $dist $srcdir $pkgs echo "I: preparing the hook" cat << EOF >| $bindir/D00add_custom_repo echo 'deb file://$debdir ./' >| /etc/apt/sources.list.d/custom.list -apt-get update +echo "$pubkey" | apt-key add - +apt-get update || /bin/bash < /dev/tty > /dev/tty 2> /dev/tty EOF chmod a+x $bindir/D00add_custom_repo