diff options
author | Niels Thykier <niels@thykier.net> | 2019-07-13 19:13:12 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2019-07-13 19:13:12 +0000 |
commit | 8409cddde729ace6dbebabcc6c01d7519154307e (patch) | |
tree | 80b85984edc53463c0ea39a6aa6ceee6c1e9e6fb /lib/Debian | |
parent | 57c745932c720f86eb7caa659df1e8fc0e7e7370 (diff) | |
download | debhelper-8409cddde729ace6dbebabcc6c01d7519154307e.tar.gz |
dh_{shlibdeps,strip}: Pass --no-sandbox to file under fakeroot
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'lib/Debian')
-rw-r--r-- | lib/Debian/Debhelper/Dh_Lib.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm index c707197c..bfd00bb1 100644 --- a/lib/Debian/Debhelper/Dh_Lib.pm +++ b/lib/Debian/Debhelper/Dh_Lib.pm @@ -2676,4 +2676,23 @@ sub dbgsym_tmpdir { } } +{ + my $_disable_file_seccomp; + sub _internal_optional_file_args { + if (not defined($_disable_file_seccomp)) { + my $consider_disabling_seccomp = 0; + if ($ENV{'FAKEROOTKEY'} or ($ENV{'LD_PRELOAD'}//'') =~ m/fakeroot/) { + $consider_disabling_seccomp = 1; + } + if ($consider_disabling_seccomp) { + my $has_no_sandbox = (qx_cmd('file', '--help') // '') =~ m/--no-sandbox/; + $consider_disabling_seccomp = 0 if not $has_no_sandbox; + } + $_disable_file_seccomp = $consider_disabling_seccomp; + } + return ('--no-sandbox') if $_disable_file_seccomp; + return; + } +} + 1 |