On 1/8/26 21:21, Bruce Ashfield wrote:
**
*CAUTION: This email comes from a non Wind River email account!*
Do not click links or open attachments unless you recognize the sender and know the content is safe.


On Thu, Jan 8, 2026 at 1:26 AM Changqing Li via lists.yoctoproject.org <https://urldefense.com/v3/__http://lists.yoctoproject.org__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUMGHw_79Q$> <changqing.li <https://urldefense.com/v3/__http://changqing.li__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUMuaHYLRg$>[email protected]> wrote:

    From: Changqing Li <[email protected]>

    These series of patches are mostly set buildid to empty for improving
    reproducibility, I also send a patch to oe-core with subject:
    [PATCH V3] go.bbclass: set buildid to empty string to improve
    reproducibility

    which add -buildid= in default GO_LDFLAGS, but since packages compiled
    with go may not use GO_LDFLAGS in go.bbclass, they can have their own
    Makefiles, define their own variables for passing ldflags, so change
    them one by one.


Rather than setting it to empty, I'd rather set it to a value that might
be useful to us.

Perhaps the git hash we are building ? or the checksum of another
set of files ?

Hi, Bruce

The idea is good, for the recipes changed one by one in this series patch, 
maybe we can easily give them a value one by one.

but for go.bbclass,  I have two ideas:

GO_BUILDID ?= ' -buildid="${@d.getVar('SRCREV') if d.getVar('SRCREV') != 
'INVALID' else ( d.getVar('SRCREV_%s'%${PN}) if d.getVar('SRCREV_%s'%${PN}) != '' 
else ( d.getVarFlag('SRC_URI', 'sha256sum') if d.getvarflag('sha256sum') != '' if () 
else '') )}'

This is complicated, andtheoretically speaking, not sure it always have a 
value. And do we really need this value,  how to use it?

GO_BUILDID ?= ' -buildid=d.getVar('PV')

This can ensure it always have a value, but I think this is not very useful.  usually, we 
can get version by "binray --version".


Consider above, how about set it to empty if we don't have special usage of 
this buildid?



//Sandy


Bruce


    podman also disable buildvcs

    Changqing Li (15):
      docker-compose: set go buildid to empty for improving
    reproducibility
      docker: set go buildid to empty for improving reproducibility
      kubernetes: set go buildid to empty for improving reproducibility
      nerdctl: set go buildid to empty for improving reproducibility
      runc: set go buildid to empty for improving reproducibility
      skopeo: set go buildid to empty for improving reproducibility
      umoci: set go buildid to empty for improving reproducibility
      cni: update GO_EXTRA_LDFLAGS
      oci-image-tools: set go buildid to empty for improving
    reproducibility
      docker-distribution: set go buildid to empty for improving
        reproducibility
      containerd: set go buildid to empty for improving reproducibility
      cri-o: set go buildid to empty for improving reproducibility
      cri-tools: set go buildid to empty for improving reproducibility
      oci-runtime-tools: set go buildid to empty for improving
        reproducibility
      podman: improve reproducibility

     .../containerd/containerd_git.bb
    
<https://urldefense.com/v3/__http://containerd_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUNo9zLiWA$>
                |  1 +
     recipes-containers/cri-o/cri-o_git.bb
    
<https://urldefense.com/v3/__http://cri-o_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUMs78D5Ig$>
           |  1 +
     recipes-containers/cri-tools/cri-tools_git.bb
    
<https://urldefense.com/v3/__http://cri-tools_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUMpCb2ntg$>
    |  2 +-
     .../docker-compose/docker-compose_git.bb
    
<https://urldefense.com/v3/__http://docker-compose_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUN5gCwGXw$>
        |  4 +-
     .../docker-distribution_git.bb
    
<https://urldefense.com/v3/__http://docker-distribution_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUPPOSTQ1A$>
                  |  2 +
     ...01-Makefile-remove-duplicate-ldflags.patch | 39
    +++++++++++++++++++
     recipes-containers/docker/docker.inc
    
<https://urldefense.com/v3/__http://docker.inc__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUNwIT0NzQ$>
 
            |  2 +
     .../kubernetes/kubernetes_git.bb
    
<https://urldefense.com/v3/__http://kubernetes_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUOnhKFbpA$>
                |  2 +-
     recipes-containers/nerdctl/nerdctl_git.bb
    
<https://urldefense.com/v3/__http://nerdctl_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUNO5-GgCA$>
       |  1 +
     .../0001-Makefile-add-EXTRA_LDFLAGS.patch     | 39
    +++++++++++++++++++
     .../oci-image-tools/oci-image-tools_git.bb
    
<https://urldefense.com/v3/__http://oci-image-tools_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUPoEWN6-w$>
      |  5 ++-
     .../0001-Makefile-add-EXTRA_LDFLAGS.patch     | 33 ++++++++++++++++
     .../oci-runtime-tools_git.bb
    
<https://urldefense.com/v3/__http://oci-runtime-tools_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUOHvuIx5g$>
                    |  2 +
     recipes-containers/podman/podman_git.bb
    
<https://urldefense.com/v3/__http://podman_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUN_RLh2RA$>
         |  4 +-
     recipes-containers/runc/runc.inc
    
<https://urldefense.com/v3/__http://runc.inc__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUN6fsNm5A$>
 
                |  1 +
     recipes-containers/skopeo/skopeo_git.bb
    
<https://urldefense.com/v3/__http://skopeo_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUPMeA_sbQ$>
         |  2 +-
     recipes-containers/umoci/umoci_git.bb
    
<https://urldefense.com/v3/__http://umoci_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUO9-Ps7rA$>
           |  4 +-
     recipes-networking/cni/cni_git.bb
    
<https://urldefense.com/v3/__http://cni_git.bb__;!!AjveYdw8EvQ!cbNtO-fTMjWd2OzmvTZIAie15dDo_FY3nqpvLRTvvQfXr7UevOCeAyVJRhJLLTrJW6bjrQaAFZmCsF_sHzefcUN-aL8Klg$>
               |  4 +-
     18 files changed, 138 insertions(+), 10 deletions(-)
     create mode 100644
    
recipes-containers/docker-distribution/files/0001-Makefile-remove-duplicate-ldflags.patch
     create mode 100644
    
recipes-containers/oci-image-tools/files/0001-Makefile-add-EXTRA_LDFLAGS.patch
     create mode 100644
    
recipes-containers/oci-runtime-tools/files/0001-Makefile-add-EXTRA_LDFLAGS.patch

-- 2.34.1




--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9549): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9549
Mute This Topic: https://lists.yoctoproject.org/mt/117148688/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to