1 |
commit: 2b304d8ee40c38023411a3ea184c29ad5a1f8070 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 4 07:53:23 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 4 07:53:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=2b304d8e |
7 |
|
8 |
Makefile.am: don't mangle final binary with sed |
9 |
|
10 |
In bug #774861 pash found out that /bin/sh -> busybox produces |
11 |
invalid `sandbox` binary. It happens because `busybox sed` does |
12 |
not implement hex escape insertions, like: |
13 |
|
14 |
$ printf "a" | gnu-sed 's/a/\x00/' | hexdump -C |
15 |
00000000 00 |.| |
16 |
$ printf "a" | busybox sed 's/a/\x00/' | hexdump -C |
17 |
00000000 78 30 30 |x00| |
18 |
|
19 |
The change exposes `__SANDBOX_TESTING` variable to external users. |
20 |
|
21 |
Reported-by: pash |
22 |
Bug: https://bugs.gentoo.org/774861 |
23 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
24 |
|
25 |
Makefile.am | 9 --------- |
26 |
1 file changed, 9 deletions(-) |
27 |
|
28 |
diff --git a/Makefile.am b/Makefile.am |
29 |
index 5541f67..b0ea65f 100644 |
30 |
--- a/Makefile.am |
31 |
+++ b/Makefile.am |
32 |
@@ -47,12 +47,3 @@ dist-hook: |
33 |
touch "$(distdir)/ChangeLog" ; \ |
34 |
fi ; \ |
35 |
fi |
36 |
- |
37 |
-install-exec-hook: |
38 |
- set -e ; \ |
39 |
- for f in $(bindir)/sandbox $(libdir)/libsandbox.so ; do \ |
40 |
- sed -i.tmp \ |
41 |
- 's:__SANDBOX_TESTING:\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00:' \ |
42 |
- $(DESTDIR)$$f ; \ |
43 |
- rm -f $(DESTDIR)$$f.tmp ; \ |
44 |
- done |