<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/19062">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">install_prereq: Remove sudo dependency.<br><br>Removes the use of sudo to run commands as root.<br>The regular Asterisk install_prereq is expected<br>to be run as root and does not require sudo, so<br>we do the same to increase portability.<br><br>ASTERISK-30202 #close<br><br>Change-Id: I72f61cc779c868a312085f4913c03213e90943ca<br>---<br>M contrib/scripts/install_prereq<br>1 file changed, 26 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/62/19062/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq</span><br><span>index e957d03..46970a6 100755</span><br><span>--- a/contrib/scripts/install_prereq</span><br><span>+++ b/contrib/scripts/install_prereq</span><br><span>@@ -85,23 +85,23 @@</span><br><span> install_debian() {</span><br><span> if ! [ -x "$(command -v aptitude)" ]; then</span><br><span> if in_test_mode; then</span><br><span style="color: hsl(0, 100%, 40%);">- echo sudo apt-get install aptitude</span><br><span style="color: hsl(120, 100%, 40%);">+ echo apt-get install aptitude</span><br><span> echo "$0: Please install aptitude and try again. Aborting."</span><br><span> exit 1</span><br><span> fi</span><br><span style="color: hsl(0, 100%, 40%);">- sudo apt-get install aptitude</span><br><span style="color: hsl(120, 100%, 40%);">+ apt-get install aptitude</span><br><span> fi</span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo aptitude update</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd aptitude update</span><br><span> extra_packs=`check_installed_debs $PACKAGES_DEBIAN`</span><br><span> if [ x"$extra_packs" != "x" ] ; then</span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo aptitude install -y $extra_packs</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd aptitude install -y $extra_packs</span><br><span> fi</span><br><span> }</span><br><span> </span><br><span> install_rh() {</span><br><span> extra_packs=`check_installed_rpms $PACKAGES_RH`</span><br><span> if [ x"$extra_packs" != "x" ] ; then</span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo yum install -y $extra_packs</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd yum install -y $extra_packs</span><br><span> fi</span><br><span> }</span><br><span> </span><br><span>@@ -144,7 +144,7 @@</span><br><span> install_asttest() {</span><br><span> $testcmd cd asttest</span><br><span> $testcmd make</span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo make install</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd make install</span><br><span> $testcmd cd ..</span><br><span> }</span><br><span> </span><br><span>@@ -155,7 +155,7 @@</span><br><span> </span><br><span> PROJECT_DIR=sipp</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo rm -rf $PROJECT_DIR</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd rm -rf $PROJECT_DIR</span><br><span> $testcmd git clone https://github.com/SIPp/sipp $PROJECT_DIR</span><br><span> $testcmd cd $PROJECT_DIR</span><br><span> </span><br><span>@@ -163,7 +163,7 @@</span><br><span> $testcmd git checkout v3.5.2</span><br><span> </span><br><span> $testcmd ./build.sh --with-openssl --with-pcap --with-rtpstream --with-sctp</span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo make install</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd make install</span><br><span> </span><br><span> $testcmd cd $SAVE_DIR</span><br><span> }</span><br><span>@@ -175,7 +175,7 @@</span><br><span> </span><br><span> PROJECT_DIR=pjsua</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo rm -rf pjsua</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd rm -rf pjsua</span><br><span> $testcmd git clone https://github.com/asterisk/pjproject $PROJECT_DIR</span><br><span> $testcmd cd $PROJECT_DIR</span><br><span> </span><br><span>@@ -193,7 +193,7 @@</span><br><span> $testcmd make</span><br><span> </span><br><span> # The testsuite only cares about pjsua from what we have built.</span><br><span style="color: hsl(0, 100%, 40%);">- $testcmd sudo cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu $MY_BIN/pjsua</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu $MY_BIN/pjsua</span><br><span> </span><br><span> $testcmd cd $SAVE_DIR</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/19062">change 19062</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/testsuite/+/19062"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I72f61cc779c868a312085f4913c03213e90943ca </div>
<div style="display:none"> Gerrit-Change-Number: 19062 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>