[libcamera-devel] [RFC 0/2] Add new build option to override generate SHA

Naushir Patuck naush at raspberrypi.com
Tue Oct 12 17:24:08 CEST 2021


Hi,

This set of changes have come about after a discusion on an issue raised on the Pi
libcamera-apps github repo [1].  From my little understanding, various distributions
use different methods to build and package libraries.  As part of this process,
they may build these libraries outside of the upstream tree, and perhaps not
even in a git repo tree.  If this happens, the version string generated during the
libcamera build is either empty or (if it is from a downstream tree) useless.

This change allows the user to override the SHA value with a string passed into
the meson build options that would be used in-place of the one generated by the
gen-version.sh script.  This would allow out-of-tree builds to provide a sensible
sha version string based off the upstream tree.

I'm not too sure if this is the best way to do this, but it is a simple solution.
If anyone has other suggestions how we can overcome this, please do let me know.

Thanks,
Naush

[1]: https://github.com/raspberrypi/libcamera-apps/issues/122

Naushir Patuck (2):
  utils: Add an option to override SHA string in gen-version.sh
  build: Add a "version_sha" meson build option

 meson.build               |  4 +++-
 meson_options.txt         |  5 +++++
 src/libcamera/meson.build |  3 ++-
 utils/gen-version.sh      | 25 ++++++++++++++++++-------
 4 files changed, 28 insertions(+), 9 deletions(-)

-- 
2.25.1



More information about the libcamera-devel mailing list