X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/48f3f1b24b48066cfc23342a5c6470ddf5e0fa6a..0d303f1764645284b33924c9be8bf29f0a32ca5c:/test/integration/test-apt-get-download diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download index 58ed44f8f..48086d808 100755 --- a/test/integration/test-apt-get-download +++ b/test/integration/test-apt-get-download @@ -11,7 +11,26 @@ buildsimplenativepackage 'apt' 'all' '1.0' 'stable' buildsimplenativepackage 'apt' 'all' '2.0' 'unstable' insertinstalledpackage 'vrms' 'all' '1.0' -setupaptarchive +OLD_UMASK="$(umask)" +umask 0027 +setupaptarchive --no-update +umask "$OLD_UMASK" + +# directories should be readable by everyone +find aptarchive/dists -type d | while read dir; do + chmod o+rx "$dir" +done +# apt-ftparchive knows how to chmod files +find aptarchive/dists -name '*Packages*' -type f | while read file; do + testaccessrights "$file" '644' + chmod 640 "$file" +done +# created by the framework without special care +find aptarchive/dists -name '*Release*' -type f | while read file; do + testaccessrights "$file" '640' +done + +testsuccess aptget update testdownload() { local APT="$2" @@ -65,6 +84,7 @@ testsuccess aptget update # test with already stored deb testsuccess aptget install -d apt testsuccess test -s rootdir/var/cache/apt/archives/apt_2.0_all.deb +testaccessrights 'aptarchive/pool/apt_2.0_all.deb' '644' mv aptarchive/pool/apt_2.0_all.deb aptarchive/pool/apt_2.0_all.deb.gone testdownload apt_2.0_all.deb apt mv aptarchive/pool/apt_2.0_all.deb.gone aptarchive/pool/apt_2.0_all.deb