<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15217</bug_id>
          
          <creation_ts>2023-09-19 10:58:53 +0000</creation_ts>
          <short_desc>Need to document sstate signing</short_desc>
          <delta_ts>2026-07-01 06:45:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</component>
          <version>0.0.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Antonin Godard">antonin.godard</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ptsneves</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>96516</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-09-19 10:58:53 +0000</bug_when>
    <thetext>sstate signing is technically supported but not documented. The best pointers I have to how it works are our test case:

meta/lib/oeqa/selftest/cases/signing.py:test_signing_sstate_archive

Where it appears you&apos;d need to set:

SSTATE_SIG_KEY
SSTATE_SIG_PASSPHRASE
SSTATE_VERIFY_SIG

all of which are not documented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96564</commentid>
    <comment_count>1</comment_count>
    <who name="Paulo Neves">ptsneves</who>
    <bug_when>2023-09-24 09:27:56 +0000</bug_when>
    <thetext>Sstate cache signature verification is enabled by setting SSTATE_VERIFY_SIG to a boolean true as per bb.utils.to_boolean (which i did not find documented)

SSTATE_SIG_KEY = GnuPG key ID (The private key part is necessary for singning, and public part is for verification)
SSTATE_SIG_PASSPHRASE = GnuPG passphrase for signing
SSTATE_VALID_SIGS: A space separated list with the GPG signature ID that are allowed for signed file verification. If this variable is empty any installed public key will be used to validate the signature (I need to verify if this understanding is correct locally), otherwise only the specified one will be considered. 

* If SSTATE_SIG_KEY is not set signature files will not be created.
* If a signature file already exists, the previous one will be removed.
* If SSTATE_SKIP_CREATION is &quot;1&quot; no signing operations will occur.

Adapted from the RPM signing documentation:

For signed sstate cache feeds, the passphrase should be should be specified in a   separate file configuration file like local.conf or calling with `bitbake -R &lt;credentials.conf&gt;`.

The signing program used by default is gpg. If GPG is not in the path or a gpg home directory is required the following variables apply

GPG_BIN: Specifies a gpg binary/wrapper that is executed when a sstate cache file is signed.
GPG_PATH: Specifies the gpg home directory used when the sstate cache file is signed.

From my understanding there is currently no support for gpg-agent while signing sstate cache files</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96565</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Opdenacker">michael.opdenacker</who>
    <bug_when>2023-09-24 10:23:35 +0000</bug_when>
    <thetext>Many thanks Paulo, very helpful!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100009</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-10-24 15:03:59 +0000</bug_when>
    <thetext>Bulk move of 5.1 M4 to 5.2 M2 as approved by AlexB.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102178</commentid>
    <comment_count>4</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-06-06 07:42:30 +0000</bug_when>
    <thetext>Bulk move of bugs I am assigned to from Milestone 5.2M4 to 5.3M1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106056</commentid>
    <comment_count>5</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-07-01 06:45:04 +0000</bug_when>
    <thetext>Now documented with https://git.yoctoproject.org/yocto-docs/commit/?id=f3d78e68f74f2b37d5e7207e01e723ce4dae6441</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>