Openembedded Core Discussions
 help / color / mirror / Atom feed
From: max.oss.09@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: bruce.ashfield@gmail.com, max.krummenacher@toradex.com,
	max.oss.09@gmail.com, richard.purdie@linuxfoundation.org
Subject: [PATCH v1] git: git-replacement-native: depend on ca-certificate
Date: Mon, 11 Mar 2024 15:36:55 +0100	[thread overview]
Message-ID: <20240311143655.1781388-1-max.oss.09@gmail.com> (raw)
In-Reply-To: <CADkTA4N5KcudMaimcs46Ph_Uk6ZQaFM-OLqSqECyT5QYJ_z_tg@mail.gmail.com>

From: Max Krummenacher <max.krummenacher@toradex.com>

git is delegating webacces for URLs using TLS to libcurl.
However our native libcurl build does not find a ca-certificate.crt
unless its curl-native work dir still exists and thus git will
fail.
If a recipe uses AUTOREV with a git repo using https as its protocol
parsing of that recipe will fail fetching the latest HEAD.

Fix that by depending on ca-certificate and give its location
to libcurl via git's envrironment variable GIT_SSL_CAINFO.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 meta/recipes-devtools/git/git_2.44.0.bb | 3 +++
 1 file changed, 3 insertions(+)

See also the ML discussion:
https://lore.kernel.org/all/20240309175750.2621579-1-max.oss.09@gmail.com/

diff --git a/meta/recipes-devtools/git/git_2.44.0.bb b/meta/recipes-devtools/git/git_2.44.0.bb
index e6d1470873..90e555eba7 100644
--- a/meta/recipes-devtools/git/git_2.44.0.bb
+++ b/meta/recipes-devtools/git/git_2.44.0.bb
@@ -4,6 +4,7 @@ DESCRIPTION = "Git is a free and open source distributed version control system
 SECTION = "console/utils"
 LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause & MIT & BSL-1.0 & LGPL-2.1-or-later"
 DEPENDS = "openssl zlib"
+DEPENDS:class-native += "ca-certificates"
 
 PROVIDES:append:class-native = " git-replacement-native"
 
@@ -95,6 +96,7 @@ perl_native_fixup () {
 
 REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
 REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
+REL_GIT_SSL_CAINFO = "${@os.path.relpath(sysconfdir, bindir)}/ssl/certs/ca-certificates.crt"
 
 do_install:append:class-target () {
 	perl_native_fixup
@@ -103,6 +105,7 @@ do_install:append:class-target () {
 do_install:append:class-native() {
 	create_wrapper ${D}${bindir}/git \
 		GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
+		GIT_SSL_CAINFO='`dirname $''realpath`'/${REL_GIT_SSL_CAINFO} \
 		GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
 }
 
-- 
2.42.0



      reply	other threads:[~2024-03-11 14:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09 17:57 [REGRESSION] linux (git/curl-native) and autorev max.oss.09
2024-03-09 21:03 ` Bruce Ashfield
2024-03-10 12:31   ` [OE-core] " Max
2024-03-10 13:20     ` Richard Purdie
     [not found]     ` <17BB69D476D2F4EF.5850@lists.openembedded.org>
2024-03-10 15:52       ` Richard Purdie
2024-03-10 16:04         ` Bruce Ashfield
2024-03-10 23:39           ` Richard Purdie
2024-03-11 12:54             ` Max Krummenacher
2024-03-11 13:57               ` Bruce Ashfield
2024-03-11 14:36                 ` max.oss.09 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240311143655.1781388-1-max.oss.09@gmail.com \
    --to=max.oss.09@gmail.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=max.krummenacher@toradex.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox