[libcamera-devel] [PATCH] libcamera: Skip IPA signing if there is no IPA built
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue May 12 18:28:54 CEST 2020
Hi Tomasz,
Thank you for the patch.
On Tue, May 12, 2020 at 02:11:01PM +0000, Tomasz Figa wrote:
> Fix a build error when there is no IPA in the target path.
>
> Regenerating IPA modules signatures
> Can't open /build/soraka/tmp/portage/media-libs/libcamera-9999/image//usr/lib64/libcamera/*.so.sign for writing, No such file or directory
> 139813074323264:error:02001002:system library:fopen:No such file or directory:crypto/bio/bss_file.c:69:fopen('/build/soraka/tmp/portage/media-libs/libcamera-9999/image//usr/lib64/libcamera/*.s
> o.sign','wb')
> 139813074323264:error:2006D080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:76:
> FAILED: meson-install
> /usr/lib64/python-exec/python3.6/meson install --no-rebuild
> ninja: build stopped: subcommand failed.
>
> Signed-off-by: Tomasz Figa <tfiga at chromium.org>
> Change-Id: I71c664fa5c8fc9a252634cb9569abe21eef9bea1
> ---
> src/ipa/ipa-sign-install.sh | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/ipa/ipa-sign-install.sh b/src/ipa/ipa-sign-install.sh
> index 5317a8a..f101970 100755
> --- a/src/ipa/ipa-sign-install.sh
> +++ b/src/ipa/ipa-sign-install.sh
> @@ -13,6 +13,10 @@ ipa_sign=$(dirname "$0")/ipa-sign.sh
>
> echo "Regenerating IPA modules signatures"
>
> +if [[ ! -e "${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}" ]]; then
> + exit 0
> +fi
> +
> for module in "${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}"/*.so ; do
> "${ipa_sign}" "${key}" "${module}" "${module}.sign"
> done
We'll still have a problem is ${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}
exists but doesn't contain any .so file. Is it worth considering ?
Should we use
for module in $(find "${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}"/ -maxdepth 1 -type f -name '*.so') ; do
"${ipa_sign}" "${key}" "${module}" "${module}.sign"
done
or is that overkill ? Ideally we should even pass the list of IPA
modules to this script, to avoid signing modules that were already
present in the install directory. I've sent an alternative proposal
("[PATCH] ipa: Only sign IPA modules that are being installed") to the
list to implement that, would it work for you ?
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list