From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Michael Trimarchi <michael@amarulasolutions.com>
Cc: linux-amarula@amarulasolutions.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH V2 1/2] scripts/cve: Avoid to do a complete clone of cve git repository
Date: Thu, 12 Sep 2024 12:44:41 +0200 [thread overview]
Message-ID: <20240912124441.1893644c@windsurf> (raw)
In-Reply-To: <20240903085745.2594893-1-michael@amarulasolutions.com>
Hello Michael,
On Tue, 3 Sep 2024 10:57:44 +0200
Michael Trimarchi <michael@amarulasolutions.com> wrote:
> Just a simple clone and pull with --depth 1 should be enough to parse the
> cve and generate the pkg-stats report.
>
> From a full clone and a depth-1 clone, and the size delta is 2.9GiB vs. 2.2GiB.
> The download size does change: from 983.55MiB down to 270.78MiB.
> it's a net time win too: 2m17s vs 1min7s (on a 100Mbps link).
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
> V1->V2:
> - Add statistics from Yann E. Morin
> - Use git pull --depth 1 for update the repo
I am sorry, but I had to revert this commit... as it doesn't work:
Updating from https://github.com/fkie-cad/nvd-json-data-feeds/
Traceback (most recent call last):
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 1346, in <module>
__main__()
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 1335, in __main__
check_package_cves(args.nvd_path, packages)
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 660, in check_package_cves
for cve in cvecheck.CVE.read_nvd_dir(nvd_path):
File "/home/buildroot/buildroot-stats/support/scripts/cve.py", line 105, in read_nvd_dir
CVE.download_nvd(nvd_git_dir)
File "/home/buildroot/buildroot-stats/support/scripts/cve.py", line 74, in download_nvd
subprocess.check_call(
File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'pull', '--depth', '1']' returned non-zero exit status 128.
if I go to the machine in question:
buildroot@buildroot:~/nvd/git$ git pull --depth 1
remote: Enumerating objects: 164, done.
remote: Counting objects: 100% (140/140), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 63 (delta 54), reused 44 (delta 36), pack-reused 0 (from 0)
Unpacking objects: 100% (63/63), 18.15 KiB | 26.00 KiB/s, done.
From https://github.com/fkie-cad/nvd-json-data-feeds
+ 51b091a6a4...7b69235976 main -> origin/main (forced update)
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
I had already done a git reset --hard, and see if it was just a
one-time issue, but nope. So there's something that doesn't work here.
In case that matters, this machine has:
$ git --version
git version 2.39.2
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-09-12 10:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 8:57 [Buildroot] [PATCH V2 1/2] scripts/cve: Avoid to do a complete clone of cve git repository Michael Trimarchi
2024-09-03 8:57 ` [Buildroot] [PATCH V2 2/2] scripts/cve: Restart the clone if the pull generate an exception Michael Trimarchi
2024-09-03 18:52 ` Thomas Petazzoni via buildroot
2024-09-03 18:55 ` Michael Nazzareno Trimarchi
2024-09-03 18:50 ` [Buildroot] [PATCH V2 1/2] scripts/cve: Avoid to do a complete clone of cve git repository Thomas Petazzoni via buildroot
2024-09-03 19:24 ` Yann E. MORIN
2024-09-03 19:34 ` Michael Nazzareno Trimarchi
2024-09-12 10:44 ` Thomas Petazzoni via buildroot [this message]
2024-09-12 10:48 ` Michael Nazzareno Trimarchi
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=20240912124441.1893644c@windsurf \
--to=buildroot@buildroot.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=michael@amarulasolutions.com \
--cc=thomas.petazzoni@bootlin.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.