diff mbox series

[v2,4/5] binman: Use a private directory for bintools

Message ID 20230222191449.1309107-5-sjg@chromium.org
State Accepted
Commit 932e40d0b52242454be9a7773bd2323e12358b92
Delegated to: Simon Glass
Headers show
Series binman: Tidy up the location for bintools | expand

Commit Message

Simon Glass Feb. 22, 2023, 7:14 p.m. UTC
At present binman writes tools into the ~/bin directory. This is
convenient but some may be concerned about downloading unverified
binaries and running them. Place then in a special ~/.binman-tools
directory instead.

Mention this in the documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
---

(no changes since v1)

 tools/binman/binman.rst | 2 ++
 tools/binman/bintool.py | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst
index 2bcb7d3886f..29034da92f1 100644
--- a/tools/binman/binman.rst
+++ b/tools/binman/binman.rst
@@ -1407,6 +1407,8 @@  You can also use `--fetch all` to fetch all tools or `--fetch <tool>` to fetch
 a particular tool. Some tools are built from source code, in which case you will
 need to have at least the `build-essential` and `git` packages installed.
 
+Tools are fetched into the `~/.binman-tools` directory.
+
 Bintool Documentation
 =====================
 
diff --git a/tools/binman/bintool.py b/tools/binman/bintool.py
index 302161fcb47..6ca3d886200 100644
--- a/tools/binman/bintool.py
+++ b/tools/binman/bintool.py
@@ -52,7 +52,7 @@  class Bintool:
     missing_list = []
 
     # Directory to store tools
-    tooldir = os.path.join(os.getenv('HOME'), 'bin')
+    tooldir = os.path.join(os.getenv('HOME'), '.binman-tools')
 
     def __init__(self, name, desc, version_regex=None, version_args='-V'):
         self.name = name