X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b2640c0afea4c3803ab46b130c960ea3029eb14d..321213f0dcdcdaab04e01663e7a047b261400c9c:/test/integration/test-apt-get-install-deb diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb index 89b7f7299..21cd86e9d 100755 --- a/test/integration/test-apt-get-install-deb +++ b/test/integration/test-apt-get-install-deb @@ -8,25 +8,21 @@ setupenvironment configarchitecture 'amd64' 'i386' # regression test for #754904 -testfailureequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null +testfailureequal 'E: Unsupported file /dev/null given on commandline' aptget install -qq /dev/null # only consider .deb files cat > foo.rpm <> ./incoming/$PKG/DEBIAN/control + fi + echo "Package: $PKG +Version: 0 +Priority: extra +Maintainer: No Body +Architecture: all +Description: test package" >> ./incoming/$PKG/DEBIAN/control + if [ -n "$3" ]; then + echo -n "$3" >> ./incoming/$PKG/DEBIAN/control + fi + testsuccess dpkg-deb --build ./incoming/$PKG/ ./incoming + #dpkg-deb -I ./incoming/${PKG}_0_all.deb control +} +createpkg 'as-it-should-be' +createpkg 'leading-newline' ' + +' +createpkg 'trailing-newline' '' ' +' + +testsuccess aptget install ./incoming/pkg-as-it-should-be_0_all.deb +testsuccess aptget install ./incoming/pkg-leading-newline_0_all.deb +testsuccess aptget install ./incoming/pkg-trailing-newline_0_all.deb + +# see if permission dropping is checked before usage +if [ "$(id -u)" = '0' ]; then + apt clean + chmod 711 ./incoming + testsuccess aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb + chmod 710 ./incoming + testsuccesswithnotice aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb + chmod 700 ./incoming + testsuccesswithnotice aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb +fi