poky.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Mauduit" <bmauduit@beneth.fr>
To: poky@lists.yoctoproject.org
Cc: "Benoît Mauduit" <bmauduit@beneth.fr>
Subject: [PATCH 1/1] lib/oe/reproducible: Use git log without gpg signature
Date: Thu, 12 Jan 2023 12:11:02 +0100	[thread overview]
Message-ID: <4415ab7387d6c4466b693b4fc7c2dd4438c1d6aa.1673521664.git.bmauduit@beneth.fr> (raw)
In-Reply-To: <cover.1673521664.git.bmauduit@beneth.fr>

Previously, if "showSignature" is present in user gitconfig, parsing
of the timestamp will fail.

Ideally we should replace this command with a git plumbing command.

Signed-off-by: Benoît Mauduit <bmauduit@beneth.fr>
---
 meta/lib/oe/reproducible.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index 04a1810d4f2..9ac75c02e38 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -115,7 +115,8 @@ def get_source_date_epoch_from_git(d, sourcedir):
         return None
 
     bb.debug(1, "git repository: %s" % gitpath)
-    p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE)
+    p = subprocess.run(['git', '-c', 'log.showSignature=false', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'],
+                       check=True, stdout=subprocess.PIPE)
     return int(p.stdout.decode('utf-8'))
 
 def get_source_date_epoch_from_youngest_file(d, sourcedir):
-- 
2.39.0


       reply	other threads:[~2023-01-12 11:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1673521664.git.bmauduit@beneth.fr>
2023-01-12 11:11 ` Benoît Mauduit [this message]
2023-01-12 11:22   ` [poky] [PATCH 1/1] lib/oe/reproducible: Use git log without gpg signature Alexander Kanavin

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=4415ab7387d6c4466b693b4fc7c2dd4438c1d6aa.1673521664.git.bmauduit@beneth.fr \
    --to=bmauduit@beneth.fr \
    --cc=poky@lists.yoctoproject.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;
as well as URLs for NNTP newsgroup(s).