Hi, Alexander, I saw your question about integrating the hash equivalence
server setup into Bitbake Setup. I've have actually tinkered with the basic
hash equivalence setup, and after diving into the documentation for the
hash equivalence looks like we could share hash equivalence data through
following the "Hash Equivalence Server Setup" instructions here:
https://docs.yoctoproject.org/dev/_sources/dev-manual/hashequivserver.rst.txt
.
Look at the `bind` and `database` options used when starting `
bitbake-hashserv`. Then, on the client side, the configuration would look
something like this:
```
BB_HASHSERVE = "<bind address of the running BitBake hash server>"
BB_SIGNATURE_HANDLER = "OEEquivHash"
```
So, in that scenario the site.conf for Bitbake Setup could enable a bind
address of `unix://${TOPDIR}/../hashserv.sock` to the BB_HASHSERVE.
And the server can be started with something like:
`bitbake-hashserv --bind unix://${TOPDIR}/../hashserv.sock --database
${TOPDIR}/../hashserv.db`
Hope that helps.
Regards
Daniel
RidgeRun Embedded SW Engineer
Contact us: [email protected]
Developers wiki: https://developer.ridgerun.com/
Website: https://www.ridgerun.com
On Wed, Nov 26, 2025 at 10:53 AM Alexander Kanavin via
lists.openembedded.org <[email protected]>
wrote:
> On Wed, 26 Nov 2025 at 17:41, Richard Purdie
> <[email protected]> wrote:
> linked into every build.
> > >
> > > I quickly hacked bitbake's cooker.py to try this out:
> > >
> > > - dbfile = (self.data.getVar("PERSISTENT_DIR") or
> > > self.data.getVar("CACHE")) + "/hashserv.db"
> > > + dbfile = "/home/alex" + "/hashserv.db"
> > >
> > >
> > > And then made two build directories with shared SSTATE_DIR.
> > >
> > > TL;DR: everything ran smoothly and as expected.
> > >
> > > I ran overlapping builds, added no-ops to gnu-config recipe to 'force'
> > > hash equivalency, and there were no errors or crashes, and sstate was
> > > reused as expected.
> > >
> > > So I think we should do it like this, subject to 'shared-sstate'
> > > setting in bitbake-setup, on by default.
> >
> > PERSISTENT_DIR is *not* designed to be shared between builds. it might
> > happen to work but is a really bad idea. Personally, I think those
> > cache directory variables and cache layout need redesigning so we
> > should probably take the opportunity to do that.
>
> I am not sharing PERSISTENT_DIR. Only the hash equivalency database in
> hashserv.db, which I believe is fine because sqlite has locking
> mechanisms and is explicitly designed for it.
>
> Alex
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#66096): https://lists.yoctoproject.org/g/yocto/message/66096
Mute This Topic: https://lists.yoctoproject.org/mt/116641652/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-