Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] scripts/cve: Avoid to do a complete clone of cve git repository
@ 2024-09-02  7:41 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:39 ` [Buildroot] [PATCH 1/2] scripts/cve: Avoid to do a complete clone of cve git repository Yann E. MORIN
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Trimarchi @ 2024-09-02  7:41 UTC (permalink / raw)
  To: buildroot; +Cc: Michael Trimarchi

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

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-02 16:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Buildroot] [PATCH 1/2] scripts/cve: Avoid to do a complete clone of cve git repository Yann E. MORIN
2024-09-02 16:43   ` Michael Nazzareno Trimarchi
2024-09-02 16:53     ` Michael Nazzareno Trimarchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox