From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Michael Trimarchi <michael@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] scripts/cve: Avoid to do a complete clone of cve git repository
Date: Mon, 2 Sep 2024 18:39:36 +0200 [thread overview]
Message-ID: <ZtXqSMVTSbe12Td3@landeda> (raw)
In-Reply-To: <20240902074109.50173-1-michael@amarulasolutions.com>
Michael, All,
On 2024-09-02 09:41 +0200, Michael Trimarchi spake thusly:
> Just a simple clone --depth 1 should be enough to parse the
> cve and generate the pkg-stats report. The space now does
> not take in account of the full history and only use 2.2Gb
I just did both a full clone and a depth-1 clone, and the size delta is
not that much: 2.9GiB vs. 2.2GiB, so we're still in the same league.
Still, the download size does change: from 983.55MiB down to 270.78MiB;
the remote has to compress objects specifically for the depth-1 clone,
which takes a bit of time, but there less deltas to resolve locally, so
it's a net time win too: 2m17s vs 1min7s (on a 100Mbps link).
Is it eventually worth it? I like things to be simple rather than have
complex heuristics, and storage nowadays is cheap, and bandwidth is only
really paid on the first clone, since the following calls would only
pull what's missing, which will eventually cause the local clone to grow
to a size that would not differ by much if the first clone had been a
full one.
So, I 'm a bit comnficted about that one, but would tend to say no...
Leaving pending for other maintainers to chime in.
Regards,
Yann E. MORIN.
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
> support/scripts/cve.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/scripts/cve.py b/support/scripts/cve.py
> index e25825581e..7d115a28b5 100755
> --- a/support/scripts/cve.py
> +++ b/support/scripts/cve.py
> @@ -82,7 +82,7 @@ class CVE:
> # happily clones into an empty directory.
> os.makedirs(nvd_git_dir)
> subprocess.check_call(
> - ["git", "clone", NVD_BASE_URL, nvd_git_dir],
> + ["git", "clone", "--depth", "1", NVD_BASE_URL, nvd_git_dir],
> stdout=subprocess.DEVNULL,
> stderr=subprocess.DEVNULL,
> )
> --
> 2.43.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-09-02 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 7:41 [Buildroot] [PATCH 1/2] scripts/cve: Avoid to do a complete clone of cve git repository Michael Trimarchi
2024-09-02 7:41 ` [Buildroot] [PATCH 2/2] scripts/cve: Restart the clone if the pull generate an exception Michael Trimarchi
2024-09-02 16:41 ` Yann E. MORIN
2024-09-02 16:44 ` Michael Nazzareno Trimarchi
2024-09-02 16:39 ` Yann E. MORIN [this message]
2024-09-02 16:43 ` [Buildroot] [PATCH 1/2] scripts/cve: Avoid to do a complete clone of cve git repository Michael Nazzareno Trimarchi
2024-09-02 16:53 ` 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=ZtXqSMVTSbe12Td3@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=michael@amarulasolutions.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox