You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1.5 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. buildaptarchive
  8. setupflataptarchive
  9. changetowebserver
  10. signreleasefiles
  11. aptget update -qq
  12. testnopackage newstuff
  13. PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
  14. testequal "$(cat ${PKGFILE})
  15. " aptcache show apt oldstuff
  16. cp ${PKGFILE}-new aptarchive/Packages
  17. cat aptarchive/Packages | gzip > aptarchive/Packages.gz
  18. cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2
  19. cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma
  20. rm -rf aptarchive/Packages.diff
  21. mkdir -p aptarchive/Packages.diff
  22. PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
  23. diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
  24. cat $PATCHFILE | gzip > ${PATCHFILE}.gz
  25. PATCHINDEX="aptarchive/Packages.diff/Index"
  26. echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
  27. SHA1-History:
  28. 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
  29. $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
  30. SHA1-Patches:
  31. 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28
  32. $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
  33. generatereleasefiles '+1hour'
  34. signreleasefiles
  35. find aptarchive -name 'Packages*' -type f -delete
  36. aptget update -qq
  37. testnopackage oldstuff
  38. testequal "$(cat ${PKGFILE}-new)
  39. " aptcache show apt newstuff