We should probably investigate if it's possible to shift those into
do_fetch eventually. Contacting upstream during do_configure is not kosher.

On Fri, May 25, 2018 at 5:52 AM Niko Mauno <[email protected]> wrote:

> Update cmake_do_configure() to export a set SSH_AUTH_SOCK variable
> before calling cmake.
>
> Otherwise, if cmake call during cmake_do_configure() resorts to
> ExternalProject directive containing a GIT_REPOSITORY entry, and git
> authentication scheme is based on SSH agent forwarding, it fails
> followingly
>
>   | Cloning into 'foo'...
>   | Permission denied (publickey).
>   | fatal: Could not read from remote repository.
>   |
>   | Please make sure you have the correct access rights
>   | and the repository exists.
>   |
>   | ...
>   |
>   | CMake Error at .../tmp/foo-gitclone.cmake:66 (message):
>   |   Failed to clone repository: 'ssh://...
>
> Signed-off-by: Niko Mauno <[email protected]>
> ---
>  meta/classes/cmake.bbclass | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index fcfd5dda4f..82d36be8ff 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -137,6 +137,11 @@ cmake_do_configure() {
>                 oecmake_sitefile=
>         fi
>
> +       # Allow cmake to perform eg. git clone in context where
> authentication relies on SSH agent forwarding
> +       if [ "${SSH_AUTH_SOCK}" ] ; then
> +               export SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
> +       fi
> +
>         cmake \
>           ${OECMAKE_GENERATOR_ARGS} \
>           $oecmake_sitefile \
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to