[{"id":4800,"web_url":"https://patchwork.libcamera.org/comment/4800/","msgid":"<20200512162854.GE5861@pendragon.ideasonboard.com>","date":"2020-05-12T16:28:54","subject":"Re: [libcamera-devel] [PATCH] libcamera: Skip IPA signing if there\n\tis no IPA built","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomasz,\n\nThank you for the patch.\n\nOn Tue, May 12, 2020 at 02:11:01PM +0000, Tomasz Figa wrote:\n> Fix a build error when there is no IPA in the target path.\n> \n> Regenerating IPA modules signatures\n> Can't open /build/soraka/tmp/portage/media-libs/libcamera-9999/image//usr/lib64/libcamera/*.so.sign for writing, No such file or directory\n> 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\n> o.sign','wb')\n> 139813074323264:error:2006D080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:76:\n> FAILED: meson-install\n> /usr/lib64/python-exec/python3.6/meson install --no-rebuild\n> ninja: build stopped: subcommand failed.\n> \n> Signed-off-by: Tomasz Figa <tfiga@chromium.org>\n> Change-Id: I71c664fa5c8fc9a252634cb9569abe21eef9bea1\n> ---\n>  src/ipa/ipa-sign-install.sh | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/src/ipa/ipa-sign-install.sh b/src/ipa/ipa-sign-install.sh\n> index 5317a8a..f101970 100755\n> --- a/src/ipa/ipa-sign-install.sh\n> +++ b/src/ipa/ipa-sign-install.sh\n> @@ -13,6 +13,10 @@ ipa_sign=$(dirname \"$0\")/ipa-sign.sh\n>  \n>  echo \"Regenerating IPA modules signatures\"\n>  \n> +if [[ ! -e \"${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}\" ]]; then\n> +\texit 0\n> +fi\n> +\n>  for module in \"${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}\"/*.so ; do\n>  \t\"${ipa_sign}\" \"${key}\" \"${module}\" \"${module}.sign\"\n>  done\n\nWe'll still have a problem is ${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}\nexists but doesn't contain any .so file. Is it worth considering ?\nShould we use\n\nfor module in $(find \"${MESON_INSTALL_DESTDIR_PREFIX}/${libdir}\"/ -maxdepth 1 -type f -name '*.so') ; do\n\t\"${ipa_sign}\" \"${key}\" \"${module}\" \"${module}.sign\"\ndone\n\nor is that overkill ? Ideally we should even pass the list of IPA\nmodules to this script, to avoid signing modules that were already\npresent in the install directory. I've sent an alternative proposal\n(\"[PATCH] ipa: Only sign IPA modules that are being installed\") to the\nlist to implement that, would it work for you ?","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 05ACF603E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 May 2020 18:29:02 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6606251F;\n\tTue, 12 May 2020 18:29:01 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dZ1hJJY9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1589300941;\n\tbh=ZuJdVVPP0Jiz1R+sC1Y4bIOpl1mHoj+E62oCO/piU5Q=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dZ1hJJY9EDR2yqv7UpuZo9sIjloiuvWLq1y+nMP8MwMGE4JMZNLNBA27hY4U5r9cJ\n\tReUGVt4osUwwKUti1kPZEAGtTymR0FmY+vRp5NwMGhYasbMhTJjYdfkUaDJ4Yw8zuK\n\t6hAF4ApAlrIXRhLwAg+kCx//8/f3XcfismRhcWLw=","Date":"Tue, 12 May 2020 19:28:54 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Tomasz Figa <tfiga@chromium.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200512162854.GE5861@pendragon.ideasonboard.com>","References":"<20200512141101.246262-1-tfiga@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200512141101.246262-1-tfiga@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: Skip IPA signing if there\n\tis no IPA built","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 12 May 2020 16:29:02 -0000"}}]