summaryrefslogtreecommitdiff
path: root/ci/flatpak-1.4.1-ostree-gpg-errors.patch
diff options
context:
space:
mode:
authorDan Nicholson <nicholson@endlessm.com>2020-01-21 15:47:01 -0700
committerDan Nicholson <nicholson@endlessm.com>2020-01-24 13:03:30 -0700
commit68a11d4eeb3800537292f2538536b6230259f5d2 (patch)
treef7d421cef28621a974576483c0b0f6bfe24b1d9a /ci/flatpak-1.4.1-ostree-gpg-errors.patch
parentb81a6b4ab2186b9521b9144b7247f2a26d9c675c (diff)
downloadostree-68a11d4eeb3800537292f2538536b6230259f5d2.tar.gz
ci/flatpak: Patch GPG error assertions from OSTree
Some of the flatpak tests assert on GPG error strings that come from OSTree. Those are being changed here, so patch the cloned flatpak 1.4.1 to accommodate the new error strings. When this work lands, I'll send a patch upstream to flatpak that will eventually trickle back here in a tagged build.
Diffstat (limited to 'ci/flatpak-1.4.1-ostree-gpg-errors.patch')
-rw-r--r--ci/flatpak-1.4.1-ostree-gpg-errors.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/ci/flatpak-1.4.1-ostree-gpg-errors.patch b/ci/flatpak-1.4.1-ostree-gpg-errors.patch
new file mode 100644
index 00000000..6b10c584
--- /dev/null
+++ b/ci/flatpak-1.4.1-ostree-gpg-errors.patch
@@ -0,0 +1,65 @@
+From 8e649d094e9dd91adbb430015b2621c66e086df7 Mon Sep 17 00:00:00 2001
+From: Dan Nicholson <nicholson@endlessm.com>
+Date: Tue, 21 Jan 2020 15:32:27 -0700
+Subject: [PATCH] tests: Accommodate new OSTree GPG error strings
+
+Recently OSTree has been updated to provide proper error strings when
+validating GPG signatures instead of a single generic string[1]. Allow
+either in the tests so they work against new or old ostree.
+
+1. https://github.com/ostreedev/ostree/pull/1877
+---
+ tests/test-p2p-security.sh | 2 +-
+ tests/test-repo.sh | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/test-p2p-security.sh b/tests/test-p2p-security.sh
+index db929dd4..9b0ca1d0 100644
+--- a/tests/test-p2p-security.sh
++++ b/tests/test-p2p-security.sh
+@@ -53,7 +53,7 @@ GPGARGS="${FL_GPGARGS2}" make_updated_app test-impostor org.test.Collection
+ if G_MESSAGES_DEBUG=all ${FLATPAK} ${U} update -y org.test.Hello >failed-p2p-update-log; then
+ assert_not_reached "Update of org.test.Hello was successful despite malicious commit"
+ fi
+-assert_file_has_content failed-p2p-update-log "GPG signatures found, but none are in trusted keyring"
++assert_file_has_content failed-p2p-update-log "\(GPG signatures found, but none are in trusted keyring\|public key not found\)"
+
+ COMMIT_AFTER_FAILED_UPDATE=$(${FLATPAK} ${U} info -c org.test.Hello)
+ if [ "x${INITIAL_COMMIT}" != "x${COMMIT_AFTER_FAILED_UPDATE}" ]; then
+diff --git a/tests/test-repo.sh b/tests/test-repo.sh
+index 01ca6a94..14cb1179 100644
+--- a/tests/test-repo.sh
++++ b/tests/test-repo.sh
+@@ -183,25 +183,25 @@ ${FLATPAK} ${U} uninstall -y org.test.Platform org.test.Hello
+ if ${FLATPAK} ${U} install -y test-missing-gpg-repo org.test.Platform 2> install-error-log; then
+ assert_not_reached "Should not be able to install with missing gpg key"
+ fi
+-assert_file_has_content install-error-log "GPG signatures found, but none are in trusted keyring"
++assert_file_has_content install-error-log "\(GPG signatures found, but none are in trusted keyring\|public key not found\)"
+
+
+ if ${FLATPAK} ${U} install test-missing-gpg-repo org.test.Hello 2> install-error-log; then
+ assert_not_reached "Should not be able to install with missing gpg key"
+ fi
+-assert_file_has_content install-error-log "GPG signatures found, but none are in trusted keyring"
++assert_file_has_content install-error-log "\(GPG signatures found, but none are in trusted keyring\|public key not found\)"
+
+ echo "ok fail with missing gpg key"
+
+ if ${FLATPAK} ${U} install test-wrong-gpg-repo org.test.Platform 2> install-error-log; then
+ assert_not_reached "Should not be able to install with wrong gpg key"
+ fi
+-assert_file_has_content install-error-log "GPG signatures found, but none are in trusted keyring"
++assert_file_has_content install-error-log "\(GPG signatures found, but none are in trusted keyring\|public key not found\)"
+
+ if ${FLATPAK} ${U} install test-wrong-gpg-repo org.test.Hello 2> install-error-log; then
+ assert_not_reached "Should not be able to install with wrong gpg key"
+ fi
+-assert_file_has_content install-error-log "GPG signatures found, but none are in trusted keyring"
++assert_file_has_content install-error-log "\(GPG signatures found, but none are in trusted keyring\|public key not found\)"
+
+ echo "ok fail with wrong gpg key"
+
+--
+2.20.1
+