summaryrefslogtreecommitdiff
path: root/build-tools/kleaf_internal_do_not_use_path
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2024-05-07 22:12:55 -0700
committerYifan Hong <elsk@google.com>2024-05-13 16:56:21 -0700
commitcb67cfc5870c2d0c2b5f13313c4717a7d6665148 (patch)
tree2b0e502f33a7cd4b69f1b228b4b96a458abf02fd /build-tools/kleaf_internal_do_not_use_path
parent5dae65a58d7a523c89adb7a92caf4a109e2bfc55 (diff)
downloadbuild-cb67cfc5870c2d0c2b5f13313c4717a7d6665148.tar.gz
kleaf: Wrap hermetic tools with C++ binary.
Instead of symlinking to a script that uses ${0%/*}, use a native binary that executes $(readlink /proc/self/exe) $@ <hermetic_tools.extra_args> This way, the tool can be executed anywhere even when $0 is clobbered, e.g. when another symlink is created against the tool. The only remaining requirement is that this other symlink must have the same tool_name. In particular, this allows using PATH={hermetic_tools} to run integration tests. Bug: 338263410 Change-Id: If0ec635ef0c0bc7cfa4cf3758a5d6a8eedd8f556
Diffstat (limited to 'build-tools/kleaf_internal_do_not_use_path')
-rwxr-xr-xbuild-tools/kleaf_internal_do_not_use_path/linux-x86/rsync3
-rwxr-xr-xbuild-tools/kleaf_internal_do_not_use_path/linux-x86/tar8
2 files changed, 0 insertions, 11 deletions
diff --git a/build-tools/kleaf_internal_do_not_use_path/linux-x86/rsync b/build-tools/kleaf_internal_do_not_use_path/linux-x86/rsync
deleted file mode 100755
index 5abcde96..00000000
--- a/build-tools/kleaf_internal_do_not_use_path/linux-x86/rsync
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-${0%/*}/kleaf_internal_do_not_use/rsync "$@" --no-group
diff --git a/build-tools/kleaf_internal_do_not_use_path/linux-x86/tar b/build-tools/kleaf_internal_do_not_use_path/linux-x86/tar
deleted file mode 100755
index 46c7d65a..00000000
--- a/build-tools/kleaf_internal_do_not_use_path/linux-x86/tar
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-${0%/*}/kleaf_internal_do_not_use/tar "$@" \
- --mtime=@0 \
- --owner=0 \
- --group=0 \
- --numeric-owner \
- --sort=name