Blame SOURCES/installer-12736-no-sudo.patch

b8d0d9
From f8e115fadf6e8b392fa007e78d9b77fc64590cdd Mon Sep 17 00:00:00 2001
b8d0d9
From: Daniel Plaisted <dsplaisted@gmail.com>
b8d0d9
Date: Mon, 29 Nov 2021 20:19:30 -0800
b8d0d9
Subject: [PATCH] Don't set ulimit
b8d0d9
b8d0d9
1ES pools should now have ulimit set already now
b8d0d9
---
b8d0d9
 build.sh     | 4 +---
b8d0d9
 run-build.sh | 4 ----
b8d0d9
 2 files changed, 1 insertion(+), 7 deletions(-)
b8d0d9
b8d0d9
diff --git a/build.sh b/build.sh
b8d0d9
index 594a355fafa..7ff647c4060 100755
b8d0d9
--- a/build.sh
b8d0d9
+++ b/build.sh
b8d0d9
@@ -53,7 +53,5 @@ dockerbuild()
b8d0d9
 if [ ! -z "$BUILD_IN_DOCKER" ]; then
b8d0d9
     dockerbuild $args
b8d0d9
 else
b8d0d9
-    # Run under sudo so we can set ulimit
b8d0d9
-    # See https://github.com/dotnet/core-eng/issues/14808
b8d0d9
-    sudo -E $DIR/run-build.sh $args
b8d0d9
+    $DIR/run-build.sh $args
b8d0d9
 fi
b8d0d9
diff --git a/run-build.sh b/run-build.sh
b8d0d9
index fe839eb8009..7b98aedc0be 100755
b8d0d9
--- a/run-build.sh
b8d0d9
+++ b/run-build.sh
b8d0d9
@@ -25,10 +25,6 @@ CUSTOM_BUILD_ARGS=
b8d0d9
 # Set nuget package cache under the repo
b8d0d9
 [ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
b8d0d9
 
b8d0d9
-# Set max number of files open, helps avoid errors during NuGet restore
b8d0d9
-# See https://github.com/dotnet/core-eng/issues/14808
b8d0d9
-ulimit -n 16384
b8d0d9
-
b8d0d9
 args=( )
b8d0d9
 
b8d0d9
 while [[ $# > 0 ]]; do