test-run.sh (flatpak-1.8.2.tar.xz) | : | test-run.sh (flatpak-1.8.3.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 284 | skipping to change at line 284 | |||
echo "a" > ${DIR}/files/a/data | echo "a" > ${DIR}/files/a/data | |||
mkdir -p ${DIR}/files/b | mkdir -p ${DIR}/files/b | |||
echo "b" > ${DIR}/files/b/data | echo "b" > ${DIR}/files/b/data | |||
mkdir -p ${DIR}/files/c | mkdir -p ${DIR}/files/c | |||
echo "c" > ${DIR}/files/c/data | echo "c" > ${DIR}/files/c/data | |||
mkdir -p ${DIR}/files/d | mkdir -p ${DIR}/files/d | |||
echo "d" > ${DIR}/files/d/data | echo "d" > ${DIR}/files/d/data | |||
echo "nope" > ${DIR}/files/nope | echo "nope" > ${DIR}/files/nope | |||
${FLATPAK} build-finish --command=hello.sh ${DIR} | ${FLATPAK} build-finish --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
update_repo | update_repo | |||
${FLATPAK} ${U} install -y test-repo org.test.Split --subpath=/a --subpath=/b -- subpath=/nosuchdir stable | ${FLATPAK} ${U} install -y test-repo org.test.Split --subpath=/a --subpath=/b -- subpath=/nosuchdir stable | |||
COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Split` | COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Split` | |||
if [ x${USE_SYSTEMDIR-} != xyes ] ; then | if [ x${USE_SYSTEMDIR-} != xyes ] ; then | |||
# Work around bug in ostree: local pulls don't do commitpartials | # Work around bug in ostree: local pulls don't do commitpartials | |||
assert_has_file $FL_DIR/repo/state/${COMMIT}.commitpartial | assert_has_file $FL_DIR/repo/state/${COMMIT}.commitpartial | |||
fi | fi | |||
skipping to change at line 310 | skipping to change at line 310 | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/nosuchd ir | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/nosuchd ir | |||
echo "aa" > ${DIR}/files/a/data2 | echo "aa" > ${DIR}/files/a/data2 | |||
rm ${DIR}/files/a/data | rm ${DIR}/files/a/data | |||
mkdir -p ${DIR}/files/e | mkdir -p ${DIR}/files/e | |||
echo "e" > ${DIR}/files/e/data | echo "e" > ${DIR}/files/e/data | |||
mkdir -p ${DIR}/files/f | mkdir -p ${DIR}/files/f | |||
echo "f" > ${DIR}/files/f/data | echo "f" > ${DIR}/files/f/data | |||
rm -rf ${DIR}/files/b | rm -rf ${DIR}/files/b | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
update_repo | update_repo | |||
${FLATPAK} ${U} update -y --subpath=/a --subpath=/b --subpath=/e --subpath=/nosu chdir org.test.Split | ${FLATPAK} ${U} update -y --subpath=/a --subpath=/b --subpath=/e --subpath=/nosu chdir org.test.Split | |||
COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Split` | COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Split` | |||
if [ x${USE_SYSTEMDIR-} != xyes ] ; then | if [ x${USE_SYSTEMDIR-} != xyes ] ; then | |||
# Work around bug in ostree: local pulls don't do commitpartials | # Work around bug in ostree: local pulls don't do commitpartials | |||
assert_has_file $FL_DIR/repo/state/${COMMIT}.commitpartial | assert_has_file $FL_DIR/repo/state/${COMMIT}.commitpartial | |||
fi | fi | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/a/data | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/a/data | |||
assert_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/a/data2 | assert_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/a/data2 | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/b | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/b | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/c | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/c | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/d | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/d | |||
assert_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/e/data | assert_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/e/data | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/f | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/f | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/nope | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/nope | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
update_repo | update_repo | |||
# Test reusing the old subpath list | # Test reusing the old subpath list | |||
${FLATPAK} ${U} update -y org.test.Split | ${FLATPAK} ${U} update -y org.test.Split | |||
COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Split` | COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Split` | |||
if [ x${USE_SYSTEMDIR-} != xyes ] ; then | if [ x${USE_SYSTEMDIR-} != xyes ] ; then | |||
# Work around bug in ostree: local pulls don't do commitpartials | # Work around bug in ostree: local pulls don't do commitpartials | |||
assert_has_file $FL_DIR/repo/state/${COMMIT}.commitpartial | assert_has_file $FL_DIR/repo/state/${COMMIT}.commitpartial | |||
fi | fi | |||
skipping to change at line 358 | skipping to change at line 358 | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/f | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/f | |||
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/nope | assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/stable/active/files/nope | |||
ok "subpaths" | ok "subpaths" | |||
VERSION=`cat "$test_builddir/package_version.txt"` | VERSION=`cat "$test_builddir/package_version.txt"` | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.CurrentVersion org.test.Platform org.test. Platform stable | ${FLATPAK} build-init ${DIR} org.test.CurrentVersion org.test.Platform org.test. Platform stable | |||
${FLATPAK} build-finish --require-version=${VERSION} --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=${VERSION} --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | ${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | |||
${FLATPAK} build-finish --require-version=0.6.10 --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=0.6.10 --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.NewVersion org.test.Platform org.test.Plat form stable | ${FLATPAK} build-init ${DIR} org.test.NewVersion org.test.Platform org.test.Plat form stable | |||
${FLATPAK} build-finish --require-version=1${VERSION} --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=1${VERSION} --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
update_repo | update_repo | |||
${FLATPAK} ${U} install -y test-repo org.test.OldVersion stable | ${FLATPAK} ${U} install -y test-repo org.test.OldVersion stable | |||
${FLATPAK} ${U} install -y test-repo org.test.CurrentVersion stable | ${FLATPAK} ${U} install -y test-repo org.test.CurrentVersion stable | |||
(! ${FLATPAK} ${U} install -y test-repo org.test.NewVersion stable) | (! ${FLATPAK} ${U} install -y test-repo org.test.NewVersion stable) | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | ${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | |||
${FLATPAK} build-finish --require-version=99.0.0 --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=99.0.0 --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} sta | |||
ble | ||||
update_repo | ||||
(! ${FLATPAK} ${U} update -y org.test.OldVersion) | (! ${FLATPAK} ${U} update -y org.test.OldVersion) | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | ${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | |||
${FLATPAK} build-finish --require-version=0.1.1 --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=0.1.1 --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} sta | |||
ble | ||||
update_repo | ||||
${FLATPAK} ${U} update -y org.test.OldVersion | ${FLATPAK} ${U} update -y org.test.OldVersion | |||
# Make sure a multi-ref update succeeds even if some update requires a newer ver sion | # Make sure a multi-ref update succeeds even if some update requires a newer ver sion | |||
# Note that updates are in alphabetical order, so CurrentVersion will be pulled first | # Note that updates are in alphabetical order, so CurrentVersion will be pulled first | |||
# and should not block a successful install of OldVersion later | # and should not block a successful install of OldVersion later | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.CurrentVersion org.test.Platform org.test. Platform stable | ${FLATPAK} build-init ${DIR} org.test.CurrentVersion org.test.Platform org.test. Platform stable | |||
touch ${DIR}/files/updated | touch ${DIR}/files/updated | |||
${FLATPAK} build-finish --require-version=99.0.0 --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=99.0.0 --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab le | |||
DIR=`mktemp -d` | DIR=`mktemp -d` | |||
${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | ${FLATPAK} build-init ${DIR} org.test.OldVersion org.test.Platform org.test.Plat form stable | |||
touch ${DIR}/files/updated | touch ${DIR}/files/updated | |||
${FLATPAK} build-finish --require-version=${VERSION} --command=hello.sh ${DIR} | ${FLATPAK} build-finish --require-version=${VERSION} --command=hello.sh ${DIR} | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test ${DIR} stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test ${DIR} stab | |||
le | ||||
update_repo | ||||
if ${FLATPAK} ${U} update -y &> err_version.txt; then | if ${FLATPAK} ${U} update -y &> err_version.txt; then | |||
assert_not_reached "Should not have been able to update due to version" | assert_not_reached "Should not have been able to update due to version" | |||
fi | fi | |||
assert_file_has_content err_version.txt "needs a later flatpak version" | assert_file_has_content err_version.txt "needs a later flatpak version" | |||
assert_not_has_file $FL_DIR/app/org.test.CurrentVersion/$ARCH/stable/active/file s/updated | assert_not_has_file $FL_DIR/app/org.test.CurrentVersion/$ARCH/stable/active/file s/updated | |||
assert_has_file $FL_DIR/app/org.test.OldVersion/$ARCH/stable/active/files/update d | assert_has_file $FL_DIR/app/org.test.OldVersion/$ARCH/stable/active/files/update d | |||
ok "version checks" | ok "version checks" | |||
rm -rf app | rm -rf app | |||
flatpak build-init app org.test.Writable org.test.Platform org.test.Platform sta ble | flatpak build-init app org.test.Writable org.test.Platform org.test.Platform sta ble | |||
mkdir -p app/files/a-dir | mkdir -p app/files/a-dir | |||
chmod a+rwx app/files/a-dir | chmod a+rwx app/files/a-dir | |||
flatpak build-finish --command=hello.sh app | flatpak build-finish --command=hello.sh app | |||
# Note: not --canonical-permissions | # Note: not --canonical-permissions | |||
${FLATPAK} build-export -vv --disable-sandbox --files=files repos/test app stabl e | ${FLATPAK} build-export -vv --no-update-summary --disable-sandbox --files=files repos/test app stable | |||
ostree --repo=repos/test commit --keep-metadata=xa.metadata --owner-uid=0 --own er-gid=0 --no-xattrs ${FL_GPGARGS} --branch=app/org.test.Writable/$ARCH/stable app | ostree --repo=repos/test commit --keep-metadata=xa.metadata --owner-uid=0 --own er-gid=0 --no-xattrs ${FL_GPGARGS} --branch=app/org.test.Writable/$ARCH/stable app | |||
update_repo | update_repo | |||
# In the system-helper case this fails to install due to the permission canonica lization happening in the | # In the system-helper case this fails to install due to the permission canonica lization happening in the | |||
# child-repo making objects get the wrong checksum, whereas in the user case we successfully import it, but | # child-repo making objects get the wrong checksum, whereas in the user case we successfully import it, but | |||
# it will have canonicalized permissions. | # it will have canonicalized permissions. | |||
if ${FLATPAK} ${U} install -y test-repo org.test.Writable; then | if ${FLATPAK} ${U} install -y test-repo org.test.Writable; then | |||
assert_file_has_mode $FL_DIR/app/org.test.Writable/$ARCH/stable/active/files /a-dir 775 | assert_file_has_mode $FL_DIR/app/org.test.Writable/$ARCH/stable/active/files /a-dir 775 | |||
fi | fi | |||
ok "no world writable dir" | ok "no world writable dir" | |||
rm -rf app | rm -rf app | |||
flatpak build-init app org.test.Setuid org.test.Platform org.test.Platform stabl e | flatpak build-init app org.test.Setuid org.test.Platform org.test.Platform stabl e | |||
mkdir -p app/files/ | mkdir -p app/files/ | |||
touch app/files/exe | touch app/files/exe | |||
chmod u+s app/files/exe | chmod u+s app/files/exe | |||
flatpak build-finish --command=hello.sh app | flatpak build-finish --command=hello.sh app | |||
# Note: not --canonical-permissions | # Note: not --canonical-permissions | |||
${FLATPAK} build-export -vv --disable-sandbox --files=files repos/test app stabl e | ${FLATPAK} build-export -vv --no-update-summary --disable-sandbox --files=files repos/test app stable | |||
ostree -v --repo=repos/test commit --keep-metadata=xa.metadata --owner-uid=0 --o wner-gid=0 --no-xattrs ${FL_GPGARGS} --branch=app/org.test.Setuid/$ARCH/stable app | ostree -v --repo=repos/test commit --keep-metadata=xa.metadata --owner-uid=0 --o wner-gid=0 --no-xattrs ${FL_GPGARGS} --branch=app/org.test.Setuid/$ARCH/stable app | |||
update_repo | update_repo | |||
if ${FLATPAK} ${U} install -y test-repo org.test.Setuid &> err2.txt; then | if ${FLATPAK} ${U} install -y test-repo org.test.Setuid &> err2.txt; then | |||
assert_not_reached "Should not be able to install with setuid file" | assert_not_reached "Should not be able to install with setuid file" | |||
fi | fi | |||
assert_file_has_content err2.txt [Ii]nvalid | assert_file_has_content err2.txt [Ii]nvalid | |||
ok "no setuid" | ok "no setuid" | |||
rm -rf app | rm -rf app | |||
flatpak build-init app org.test.App org.test.Platform org.test.Platform stable | flatpak build-init app org.test.App org.test.Platform org.test.Platform stable | |||
mkdir -p app/files/ | mkdir -p app/files/ | |||
touch app/files/exe | touch app/files/exe | |||
flatpak build-finish --command=hello.sh --sdk=org.test.Sdk app | flatpak build-finish --command=hello.sh --sdk=org.test.Sdk app | |||
${FLATPAK} build-export ${FL_GPGARGS} repos/test app stable | ${FLATPAK} build-export --no-update-summary ${FL_GPGARGS} repos/test app stable | |||
update_repo | update_repo | |||
${FLATPAK} ${U} install -y test-repo org.test.App | ${FLATPAK} ${U} install -y test-repo org.test.App | |||
${FLATPAK} ${U} info -m org.test.App > out | ${FLATPAK} ${U} info -m org.test.App > out | |||
assert_file_has_content out "^sdk=org\.test\.Sdk/$(flatpak --default-arch)/stabl e$" | assert_file_has_content out "^sdk=org\.test\.Sdk/$(flatpak --default-arch)/stabl e$" | |||
ok "--sdk option" | ok "--sdk option" | |||
End of changes. 13 change blocks. | ||||
13 lines changed or deleted | 19 lines changed or added |