[Asterisk-code-review] install_prereq: Remove sudo dependency. (testsuite[20])
N A
asteriskteam at digium.com
Fri Sep 2 06:58:44 CDT 2022
N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/testsuite/+/19064 )
Change subject: install_prereq: Remove sudo dependency.
......................................................................
install_prereq: Remove sudo dependency.
Removes the use of sudo to run commands as root.
The regular Asterisk install_prereq is expected
to be run as root and does not require sudo, so
we do the same to increase portability.
ASTERISK-30202 #close
Change-Id: I72f61cc779c868a312085f4913c03213e90943ca
---
M contrib/scripts/install_prereq
1 file changed, 26 insertions(+), 10 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/64/19064/1
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index e957d03..46970a6 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -85,23 +85,23 @@
install_debian() {
if ! [ -x "$(command -v aptitude)" ]; then
if in_test_mode; then
- echo sudo apt-get install aptitude
+ echo apt-get install aptitude
echo "$0: Please install aptitude and try again. Aborting."
exit 1
fi
- sudo apt-get install aptitude
+ apt-get install aptitude
fi
- $testcmd sudo aptitude update
+ $testcmd aptitude update
extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
if [ x"$extra_packs" != "x" ] ; then
- $testcmd sudo aptitude install -y $extra_packs
+ $testcmd aptitude install -y $extra_packs
fi
}
install_rh() {
extra_packs=`check_installed_rpms $PACKAGES_RH`
if [ x"$extra_packs" != "x" ] ; then
- $testcmd sudo yum install -y $extra_packs
+ $testcmd yum install -y $extra_packs
fi
}
@@ -144,7 +144,7 @@
install_asttest() {
$testcmd cd asttest
$testcmd make
- $testcmd sudo make install
+ $testcmd make install
$testcmd cd ..
}
@@ -155,7 +155,7 @@
PROJECT_DIR=sipp
- $testcmd sudo rm -rf $PROJECT_DIR
+ $testcmd rm -rf $PROJECT_DIR
$testcmd git clone https://github.com/SIPp/sipp $PROJECT_DIR
$testcmd cd $PROJECT_DIR
@@ -163,7 +163,7 @@
$testcmd git checkout v3.5.2
$testcmd ./build.sh --with-openssl --with-pcap --with-rtpstream --with-sctp
- $testcmd sudo make install
+ $testcmd make install
$testcmd cd $SAVE_DIR
}
@@ -175,7 +175,7 @@
PROJECT_DIR=pjsua
- $testcmd sudo rm -rf pjsua
+ $testcmd rm -rf pjsua
$testcmd git clone https://github.com/asterisk/pjproject $PROJECT_DIR
$testcmd cd $PROJECT_DIR
@@ -193,7 +193,7 @@
$testcmd make
# The testsuite only cares about pjsua from what we have built.
- $testcmd sudo cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu $MY_BIN/pjsua
+ $testcmd cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu $MY_BIN/pjsua
$testcmd cd $SAVE_DIR
}
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/19064
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 20
Gerrit-Change-Id: I72f61cc779c868a312085f4913c03213e90943ca
Gerrit-Change-Number: 19064
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220902/ecc93215/attachment.html>
More information about the asterisk-code-review
mailing list