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.
 
 
 
 
 
 

52 lines
1.8 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 | lzma > aptarchive/Packages.lzma
  20. rm -rf aptarchive/Packages.diff
  21. aptftparchive release aptarchive/ > aptarchive/Release
  22. mkdir -p aptarchive/Packages.diff
  23. PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
  24. diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
  25. cat $PATCHFILE | gzip > ${PATCHFILE}.gz
  26. PATCHINDEX="aptarchive/Packages.diff/Index"
  27. echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
  28. SHA1-History:
  29. 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
  30. $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
  31. SHA1-Patches:
  32. 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28
  33. $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
  34. sed -i aptarchive/Release \
  35. -e "/^MD5Sum:/ a\
  36. \ $(md5sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" \
  37. -e "/^SHA1:/ a\
  38. \ $(sha1sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" \
  39. -e "/^SHA256:/ a\
  40. \ $(sha256sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index"
  41. signreleasefiles
  42. aptget update -qq
  43. testnopackage oldstuff
  44. testequal "$(cat ${PKGFILE}-new)
  45. " aptcache show apt newstuff