Skip to content

Commit 3e6ad82

Browse files
committed
Move from wget to curl only rely on one tool
Instead of using wget and curl for different installation tasks, move all usages to curl to only rely on one tool. Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 47a07c1 commit 3e6ad82

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

.cirrus.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ task:
8383
image_family: freebsd-14-2
8484
cpu: 1
8585
memory: 2G
86-
reqinstall_script: pkg install -y bash wget gmake dejagnu py311-sphinx gzip tcl86 tcl-wrapper autoconf ksh93 zsh fish perl5 python311 ruby cmake R readline
86+
reqinstall_script: pkg install -y bash curl gmake dejagnu py311-sphinx gzip tcl86 tcl-wrapper autoconf ksh93 zsh fish perl5 python311 ruby cmake R readline
8787
configure_script:
8888
- ./configure
8989
<< : *BUILD_INSTALL_TEST_TEMPLATE
@@ -130,7 +130,7 @@ task:
130130
yes | unminimize || true
131131
# install requirements
132132
apt-get update
133-
apt-get -y install curl wget expect-dev dejagnu python3-sphinx gzip man-db bash tcsh ksh zsh fish tcl tcl8.6 perl python3 ruby cmake r-base-core
133+
apt-get -y install curl expect-dev dejagnu python3-sphinx gzip man-db bash tcsh ksh zsh fish tcl tcl8.6 perl python3 ruby cmake r-base-core
134134
# libtclenvmodules build requirements
135135
apt-get -y install gcc autoconf tcl8.6-dev
136136
# requirements for source-sh extra tests
@@ -193,7 +193,7 @@ task:
193193
# another one from EPEL (as dependency for R-core) on recent RockyLinux 8
194194
yum install -y environment-modules
195195
yum install -y epel-release
196-
yum install -y tcsh zsh ksh tcl perl python36 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel emacs
196+
yum install -y tcsh zsh ksh tcl perl python36 gzip ruby cmake R-core make curl perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel emacs
197197
yum install -y which xorg-x11-server-utils xorg-x11-server-Xvfb
198198
yum install -y fish
199199
configure_script:
@@ -217,7 +217,7 @@ task:
217217
reqinstall_script: |
218218
dnf install -y dnf-plugins-core epel-release
219219
dnf config-manager --set-enabled crb
220-
dnf install -y tcsh zsh ksh fish tcl perl python3 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel procps-ng emacs
220+
dnf install -y tcsh zsh ksh fish tcl perl python3 gzip ruby cmake R-core make perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel procps-ng emacs
221221
configure_script:
222222
- ./configure --with-bashcompletiondir=/usr/share/bash-completion/completions --with-fishcompletiondir=/usr/share/fish/vendor_completions.d --with-zshcompletiondir=/usr/share/zsh/site-functions
223223
# also enable a display on this test case to validate x-resource behavior
@@ -234,7 +234,7 @@ task:
234234
cpu: 1
235235
memory: 2G
236236
reqinstall_script: |
237-
zypper install -y tcsh zsh ksh fish tcl perl python3 ruby cmake R-core R-core-packages make wget python3-Sphinx gzip git dejagnu man net-tools autoconf gcc tcl-devel util-linux-systemd procps
237+
zypper install -y tcsh zsh ksh fish tcl perl python3 ruby cmake R-core R-core-packages make curl python3-Sphinx gzip git dejagnu man net-tools autoconf gcc tcl-devel util-linux-systemd procps
238238
zypper install -y which xrdb xvfb-run
239239
configure_script:
240240
- ./configure --enable-versioning --with-loadedmodules=null:dot --with-quarantine-vars='LD_LIBRARY_PATH LD_PRELOAD'

.github/workflows/windows_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
# of python39-sphinx package is regularly broken
128128
# precise liblapack0 package needed by R package (missing dependency
129129
# since R-4.2.1-1)
130-
packages: make sed git autoconf automake libtool tcl dejagnu python39 python39-sphinx gzip ruby zsh tcsh mksh fish cmake R liblapack0 tcl-devel gcc-core wget python39-sphinxcontrib-applehelp python39-sphinxcontrib-devhelp python39-sphinxcontrib-htmlhelp python39-sphinxcontrib-jsmath python39-sphinxcontrib-qthelp python39-sphinxcontrib-serializinghtml python39-sphinxcontrib-websupport python39-alabaster python39-sqlalchemy
130+
packages: make sed git autoconf automake libtool tcl dejagnu python39 python39-sphinx gzip ruby zsh tcsh mksh fish cmake R liblapack0 tcl-devel gcc-core curl python39-sphinxcontrib-applehelp python39-sphinxcontrib-devhelp python39-sphinxcontrib-htmlhelp python39-sphinxcontrib-jsmath python39-sphinxcontrib-qthelp python39-sphinxcontrib-serializinghtml python39-sphinxcontrib-websupport python39-alabaster python39-sqlalchemy
131131
- name: Configure Git safe.directory
132132
run: |
133133
bash -lc 'git config --global --add safe.directory $(cygpath -u "$GITHUB_WORKSPACE")'
@@ -171,7 +171,7 @@ jobs:
171171
- name: Install system packages
172172
shell: msys2 {0}
173173
run: |
174-
pacman --noconfirm --noprogressbar -S tcl tcl-devel dejagnu python ruby cmake zsh tcsh mksh fish gcc autoconf make git wget gzip
174+
pacman --noconfirm --noprogressbar -S tcl tcl-devel dejagnu python ruby cmake zsh tcsh mksh fish gcc autoconf make git curl gzip
175175
- name: Build Modules
176176
shell: msys2 {0}
177177
run: |

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ INSTALL_DATA = $(INSTALL) -m 644
1313
INSTALL_PROGRAM = $(INSTALL) -m 755
1414

1515
# download command and its options
16-
WGET := wget --retry-connrefused --waitretry=20 --timeout=20 --tries=3
16+
CURL := curl --location --remote-name --retry 3 --retry-connrefused \
17+
--retry-delay 20 --max-time 20
1718

1819
# definitions for code coverage
1920
NAGELFAR_DLSRC1 := http://downloads.sourceforge.net/nagelfar/
@@ -1017,14 +1018,14 @@ testlint: initdir modulecmd.tcl $(NAGELFAR) script/add.modules script/modulecmd
10171018

10181019
# install enhanced diff tool (to review test results)
10191020
icdiff:
1020-
$(WGET) $(ICDIFF_DLSRC)$@ || true
1021+
$(CURL) $(ICDIFF_DLSRC)$@
10211022
echo "$(ICDIFF_CHECKSUM) $@" | md5sum --status -c - || \
10221023
md5 -c $(ICDIFF_CHECKSUM) $@
10231024
chmod +x $@
10241025

10251026
# install old Tcl interpreter (for code coverage purpose)
10261027
tclsh83:
1027-
$(WGET) $(TCL_DLSRC)$(TCL_DIST83) || true
1028+
$(CURL) $(TCL_DLSRC)$(TCL_DIST83)
10281029
echo "$(TCL_DISTSUM83) $(TCL_DIST83)" | md5sum --status -c - || \
10291030
md5 -c $(TCL_DISTSUM83) $@ || (rm -f $(TCL_DIST83) && false)
10301031
tar xzf $(TCL_DIST83)
@@ -1041,7 +1042,7 @@ spack:
10411042

10421043
# install Conda (for source-sh test purpose)
10431044
miniconda3:
1044-
$(WGET) $(MINICONDA_DLSRC)$(MINICONDA_DIST) || true
1045+
$(CURL) $(MINICONDA_DLSRC)$(MINICONDA_DIST)
10451046
echo "$(MINICONDA_DISTSUM) $(MINICONDA_DIST)" | md5sum --status -c - || \
10461047
md5 -c $(MINICONDA_DISTSUM) $@ || (rm -f $(MINICONDA_DIST) && false)
10471048
bash $(MINICONDA_DIST) -b -s -p ./miniconda3
@@ -1054,7 +1055,7 @@ OpenFOAM-dev:
10541055
# install code coverage tool
10551056
# download from alt. source if correct tarball not retrieved from primary location
10561057
$(NAGELFAR):
1057-
$(WGET) $(NAGELFAR_DLSRC1)$(NAGELFAR_DIST) || true
1058+
$(CURL) $(NAGELFAR_DLSRC1)$(NAGELFAR_DIST)
10581059
echo "$(NAGELFAR_DISTSUM) $(NAGELFAR_DIST)" | md5sum --status -c - || \
10591060
(rm -f $(NAGELFAR_DIST) && false)
10601061
tar xzf $(NAGELFAR_DIST)

script/mpub

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ file delete mpubbatch
179179

180180
file mkdir dlcheck
181181
cd dlcheck
182-
runcmd 2>@$logfid wget -O $distgz $dlurl/$distgz
183-
runcmd 2>@$logfid wget -O $distbz $dlurl/$distbz
184-
runcmd 2>@$logfid wget -O $distwin $dlurl/$distwin
182+
runcmd 2>@$logfid curl -LJO $dlurl/$distgz
183+
runcmd 2>@$logfid curl -LJO $dlurl/$distbz
184+
runcmd 2>@$logfid curl -LJO $dlurl/$distwin
185185
runcmd md5sum --check ../mpub.ok
186186

187187
file delete $distgz $distbz $distwin

script/mrel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ extractflist $relver-win log-win distfiles-win
258258
# fetch previous dists
259259
set prevdistgz modules-$prevver.tar.gz
260260
set prevdistwin modules-$prevver-win.zip
261-
runcmd 2>@$logfid wget -O $prevdistgz $dlurl/$prevtag/$prevdistgz
262-
runcmd 2>@$logfid wget -O $prevdistwin $dlurl/$prevtag/$prevdistwin
261+
runcmd 2>@$logfid curl -LO $dlurl/$prevtag/$prevdistgz
262+
runcmd 2>@$logfid curl -LO $dlurl/$prevtag/$prevdistwin
263263

264264
# prepare previous version dist file list to compare to previous dist
265265
runcmd >log-prev-gz tar tfz $prevdistgz
@@ -347,7 +347,7 @@ runcmd 2>@$logfid make uninstall
347347
runcmd make clean
348348

349349
cd /tmp/mods+test-export
350-
runcmd 2>@$logfid wget -O $reltag.tar.gz $ghexporturl
350+
runcmd 2>@$logfid curl -LO $ghexporturl
351351
runcmd tar xfz $reltag.tar.gz
352352
cd modules-$relver
353353
reportInfo "Moved into '[pwd]' directory"
@@ -436,8 +436,8 @@ while {[array size koji_tasks]} {
436436
# ---------------------------------------------------------
437437

438438
reportInfo "Checking CI tests status on $ghstatusurl"
439-
while {[set cistatus [lindex [split [string range [exec wget -q -O -\
440-
$ghstatusurl] 0 30] \"] 3]] eq {pending}} {
439+
while {[set cistatus [lindex [split [string range [exec curl -s $ghstatusurl]\
440+
0 30] \"] 3]] eq {pending}} {
441441
reportInfo "CI tests still in progress"
442442
# wait 30 seconds before next check loop
443443
after 30000

0 commit comments

Comments
 (0)