diff --git a/recipes-openxt/manager/updatemgr/updatemgr-verify-packages.patch b/recipes-openxt/manager/updatemgr/updatemgr-verify-packages.patch new file mode 100644 index 0000000000..20f8f25643 --- /dev/null +++ b/recipes-openxt/manager/updatemgr/updatemgr-verify-packages.patch @@ -0,0 +1,13 @@ +--- a/UpdateMgr/Logic.hs ++++ b/UpdateMgr/Logic.hs +@@ -346,8 +346,8 @@ verifyUpdateMetadataSignature :: Update + verifyUpdateMetadataSignature = void $ + handleError failed . safeShellExecuteAndLogOutput . cmd =<< allowDevRepoCert + where +- cmd False = "verify-repo-metadata " ++ updateDirCurrent +- cmd True = "verify-repo-metadata -d " ++ updateDirCurrent ++ cmd False = "verify-repo-metadata -p " ++ updateDirCurrent ++ cmd True = "verify-repo-metadata -d -p " ++ updateDirCurrent + failed _ = throwError $ localE FailedSignatureVerification + + handleError = flip catchError diff --git a/recipes-openxt/manager/updatemgr_git.bb b/recipes-openxt/manager/updatemgr_git.bb index 9c8eb04789..3689f1481c 100644 --- a/recipes-openxt/manager/updatemgr_git.bb +++ b/recipes-openxt/manager/updatemgr_git.bb @@ -29,6 +29,7 @@ require manager.inc SRC_URI += " \ file://updatemgr.initscript \ + file://updatemgr-verify-packages.patch \ " S = "${WORKDIR}/git/updatemgr" diff --git a/recipes-openxt/xenclient-repo-certs/xenclient-repo-certs/verify-repo-metadata b/recipes-openxt/xenclient-repo-certs/xenclient-repo-certs/verify-repo-metadata index f0ba9333ec..ea2b3e0066 100755 --- a/recipes-openxt/xenclient-repo-certs/xenclient-repo-certs/verify-repo-metadata +++ b/recipes-openxt/xenclient-repo-certs/xenclient-repo-certs/verify-repo-metadata @@ -5,15 +5,22 @@ PROD_CERT_FILE="/usr/share/xenclient/repo-certs/prod/cert.pem" DEV_CERT_FILE="/usr/share/xenclient/repo-certs/dev/cert.pem" +VERIFY_PACKAGES=0 + parse_args() { ALLOW_DEV_KEY=0 - if [ "$1" = "-d" ] ; then - ALLOW_DEV_KEY=1 - shift - fi + while getopts "dp" opt ; do + case "$opt" in + d) ALLOW_DEV_KEY=1 ;; + p) VERIFY_PACKAGES=1 ;; + \?) die "unknown option" ;; + *) die "getopts error" ;; + esac + done + shift "$(( OPTIND - 1 ))" if [ $# -ne 1 ] ; then usage exit 2 @@ -29,7 +36,7 @@ parse_args() usage() { cat <