]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-get-download
test if TMPDIR is accessible before using
[apt.git] / test / integration / test-apt-get-download
index 58ed44f8feb2d214008de34506592366a8df7663..48086d808883cea281b8a239d848975629a71e52 100755 (executable)
@@ -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