diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb index 22d1d45..ccb655a 100644 --- a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb +++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb @@ -12,7 +12,13 @@ SRC_URI += " \ file://tpm2-abrmd_git.default \ " -SRCREV = "${AUTOREV}" +def version_git(d): + version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN')) + if version is not None and "git" in version: + return d.getVar("AUTOREV") + else: + return "cceb6c12ebb335aacb49207ee13d2f2fc833580a" +SRCREV ?= '${@version_git(d)}' S = "${WORKDIR}/${BPN}" diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb index c566526..7661623 100644 --- a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb +++ b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb @@ -9,7 +9,13 @@ PV = "${PVBASE}.${SRCPV}" SRC_URI = "git://github.com/tpm2-software/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}" -SRCREV = "${AUTOREV}" +def version_git(d): + version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN')) + if version is not None and "git" in version: + return d.getVar("AUTOREV") + else: + return "e105149f07c9b944f69599ab67cd8b018ad880d2" +SRCREV ?= '${@version_git(d)}' S = "${WORKDIR}/${BPN}" diff --git a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb index eaeaec2..75683a4 100644 --- a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb +++ b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb @@ -13,7 +13,13 @@ PV = "${PVBASE}.${SRCPV}" SRC_URI = "git://github.com/tpm2-software/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}" -SRCREV = "${AUTOREV}" +def version_git(d): + version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN')) + if version is not None and "git" in version: + return d.getVar("AUTOREV") + else: + return "35ab16e1d328f709d6146221a371b7341b84b670" +SRCREV ?= '${@version_git(d)}' S = "${WORKDIR}/${BPN}"