Hi,

I am not sure how well this would work for JARs (especially if they are large).

But you may be able to drop the as-built JARs into a git repo and commit them.

Then make use of the GIT AUTOREV facility to fetch from that GIT repo.

Each time you build after your GIT repo changes, will be built on the newer rev.

If your version info used to derive PV is in that GIT repo (rather than say 
date based) so that it stays the same after each rebuild of the same GIT rev 
(and only changes when the GIT rev is changed as part of new commits), you may 
still be able to satisfy the repeatable build (at least repeatable when rebuilt 
multiple times with your GIT repo at the same revision.

I would suggest that for releases where you may want to tag your Yocto GIT 
repo, you set the SRCREV to a specific revision so that a rebuild of the 
release is based on the exact same JARs.  (i.e. just use the autorev while 
doing development).

If this doesn’t work for GIT, you could always try with an alternate revision 
control system for which Yocto has autorev support.



Regards,

Darcy

Darcy Watkins ::  Senior Staff Engineer, Firmware

Semtech | Sierra Wireless
Office  +1 604 231 1100
13811 Wireless Way  :: Richmond, BC Canada V6V 3A4
[M4]
[email protected]<mailto:[email protected]> :: 
www.semtech.com<http://www.semtech.com>

From: [email protected] <[email protected]> on behalf of 
Konstantin Kletschke via lists.yoctoproject.org 
<[email protected]>
Date: Friday, August 18, 2023 at 1:33 PM
To: Alexander Kanavin <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [yocto] Pick up ${PV} dynamically from environment or file or 
filename
Caution: This email originated outside of Sierra Wireless.


On Fri, Aug 18, 2023 at 05:30:50PM +0200, Alexander Kanavin wrote:
> You probably need to explain the use case. Why do you want to do
> something like that?

The yocto build is happening in a gitlab runner thingy.

What happens before is that inedependently from the yocto build is that
my colleauges are running a maven build which provides java jar files.

And I do not know on my side what version they are doing. It could
happen even that it alternates between X.Y.Z and X.Y.Z-SNAPSHOT.

Then my yocto comes and is picking those jars up and integrates them into
the rootfs to be started there by java. They are not processed or
executed or compiled, they are copied into the rootfs, symlinkd and
integrated into a systemd start.

Colleauges maven build: Their git tree.
Yocto build: My git tree.

> Generally, Yocto cares about build reproducibility, a lot. Thus,
> source must be stable, and verified against a checksum of some kind.

I learned to love its build reliability because of such stuff too.

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

Reply via email to