diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-25 11:01:02 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-28 23:11:28 +0000 |
| commit | fee9be0f6573bd4b06b1693565f4099f3cd984e5 (patch) | |
| tree | 262ec6f6c56fba1cf13a59552dbfdbe38fb995e0 | |
| parent | 21f43cf89e29c223bfd4cc31b726c663a7887f86 (diff) | |
| download | poky-fee9be0f6573bd4b06b1693565f4099f3cd984e5.tar.gz | |
abi_version/sstatesig: Introduce HASHEQUIV_HASH_VERSION
We've found we need a way to cause a change in signatures and move
to a new hash 'namespace' with hashequiv. This introduces a variable
which allows us to do this.
(From OE-Core rev: 1c2d5aeae2fa2dfc16bc60b6cf0b310f826337fd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/conf/abi_version.conf | 8 | ||||
| -rw-r--r-- | meta/lib/oe/sstatesig.py | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf index 4964880108..2bdc55695b 100644 --- a/meta/conf/abi_version.conf +++ b/meta/conf/abi_version.conf | |||
| @@ -5,3 +5,11 @@ | |||
| 5 | # with general agreement from the core team. | 5 | # with general agreement from the core team. |
| 6 | # | 6 | # |
| 7 | OELAYOUT_ABI = "12" | 7 | OELAYOUT_ABI = "12" |
| 8 | |||
| 9 | # | ||
| 10 | # HASHEQUIV_HASH_VERSION is injected into the output hash calculation used by | ||
| 11 | # hashequiv. Changing this means previous hashes will no longer match, allowing | ||
| 12 | # a reset of the equivalence, for example when reproducibility issues break the | ||
| 13 | # existing match data. Distros can also append to this value for the same effect. | ||
| 14 | # | ||
| 15 | HASHEQUIV_HASH_VERSION = "1" | ||
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 4325b66a9e..d24e3738ae 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
| @@ -477,11 +477,14 @@ def OEOuthashBasic(path, sigfile, task, d): | |||
| 477 | h = hashlib.sha256() | 477 | h = hashlib.sha256() |
| 478 | prev_dir = os.getcwd() | 478 | prev_dir = os.getcwd() |
| 479 | include_owners = os.environ.get('PSEUDO_DISABLED') == '0' | 479 | include_owners = os.environ.get('PSEUDO_DISABLED') == '0' |
| 480 | extra_content = d.getVar('HASHEQUIV_HASH_VERSION') | ||
| 480 | 481 | ||
| 481 | try: | 482 | try: |
| 482 | os.chdir(path) | 483 | os.chdir(path) |
| 483 | 484 | ||
| 484 | update_hash("OEOuthashBasic\n") | 485 | update_hash("OEOuthashBasic\n") |
| 486 | if extra_content: | ||
| 487 | update_hash(extra_content + "\n") | ||
| 485 | 488 | ||
| 486 | # It is only currently useful to get equivalent hashes for things that | 489 | # It is only currently useful to get equivalent hashes for things that |
| 487 | # can be restored from sstate. Since the sstate object is named using | 490 | # can be restored from sstate. Since the sstate object is named using |
