From bb9e69988d9234ad8e7f7aee2785ade5265f78fb Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 17 Jun 2020 10:21:35 -0400 Subject: [PATCH] manylinux.crosstool: Fix use of sudo removing sudo provided by devtoolset This commit removes sudo provided by devtoolset since it doesn't work with our sudo wrapper calling gosu. It fixes error like the following: /opt/rh/devtoolset-9/root/usr/bin/sudo: line 41: /usr/bin/sudo: No such file or directory Adapted from e513a26 (manylinux: Remove rh devtoolset sudo) Co-authored-by: odidev --- common-manylinux.crosstool | 5 ++++- common.manylinux | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common-manylinux.crosstool b/common-manylinux.crosstool index 2110eb3..dbcf80c 100644 --- a/common-manylinux.crosstool +++ b/common-manylinux.crosstool @@ -57,7 +57,10 @@ RUN \ /dockcross/install-crosstool-ng-toolchain.sh \ -p "${XCC_PREFIX}" \ -c /dockcross/crosstool-ng.config && \ - rm -rf /dockcross/crosstool /dockcross/install-crosstool-ng-toolchain.sh + rm -rf /dockcross/crosstool /dockcross/install-crosstool-ng-toolchain.sh && \ + # Remove sudo provided by devtoolset since it doesn't work with + # our sudo wrapper calling gosu. + rm -f /opt/rh/devtoolset-9/root/usr/bin/sudo # Restore our default workdir (from "dockcross/base"). WORKDIR /work diff --git a/common.manylinux b/common.manylinux index bb3e5b9..7775800 100644 --- a/common.manylinux +++ b/common.manylinux @@ -20,7 +20,7 @@ RUN \ yum clean all && \ /buildscripts/install-gosu-binary.sh && \ /buildscripts/install-gosu-binary-wrapper.sh && \ - # Remove sudo provided by "devtoolset-2" and "devtoolset-8" since it doesn't work with + # Remove sudo provided by devtoolset since it doesn't work with # our sudo wrapper calling gosu. rm -f /opt/rh/devtoolset-2/root/usr/bin/sudo && \ rm -f /opt/rh/devtoolset-7/root/usr/bin/sudo && \