[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 61c427f 5/6: Detect whether gnu.org is, bizar
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 61c427f 5/6: Detect whether gnu.org is, bizarrely, blocked |
Date: |
Wed, 26 Feb 2020 17:43:36 -0500 (EST) |
branch: master
commit 61c427f7f4a4d0c078c3b3bab70389580d7cc22d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Detect whether gnu.org is, bizarrely, blocked
It is better to test dynamically whether gnu.org is reachable than to
embed that information in a configuration file that must be edited.
'curl' seems to be the best tool for this, and it deserves to be made
generally available. It might even be handy for cygwin, though there
is no need to update a cygwin installation now just to get 'curl', and
it is hoped that cygwin support can be withdrawn in favor of either
"WSL" or GNU/Linux.
---
install_cygwin.bat | 2 +-
install_msw.sh | 2 +-
lmi_setup_20.sh | 8 ++++++--
lmi_setup_inc.sh | 10 +++++++---
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/install_cygwin.bat b/install_cygwin.bat
index 79f823d..79efc07 100644
--- a/install_cygwin.bat
+++ b/install_cygwin.bat
@@ -32,7 +32,7 @@ START "Installing Cygwin" /WAIT setup-x86_64 ^
--wait --quiet-mode ^
--site http://mirrors.kernel.org/sourceware/cygwin/ ^
--root C:/cygwin64_lmi --packages ^
-
"autoconf,automake,bc,bsdtar,dos2unix,doxygen,gdb,git,libtool,make,openssh,patch,pkg-config,rsync,unzip,vim,wget,zip,zsh"
+
"autoconf,automake,bc,bsdtar,curl,dos2unix,doxygen,gdb,git,libtool,make,openssh,patch,pkg-config,rsync,unzip,vim,wget,zip,zsh"
cd C:\cygwin64_lmi\etc
echo # >> fstab
echo C:/opt/lmi /opt/lmi lmi_specific binary,user 0 0 >>
fstab
diff --git a/install_msw.sh b/install_msw.sh
index fa9f01c..237c7a6 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -138,7 +138,7 @@ fi
if [ "WSL" = "$platform" ]
then
# Install/update packages.
- packages_list='autoconf automake bsdtar dos2unix doxygen
+ packages_list='autoconf automake bsdtar curl dos2unix doxygen
gdb git libtool make patch pkg-config rsync unzip wget
zip zsh g++-mingw-w64-i686'
diff --git a/lmi_setup_20.sh b/lmi_setup_20.sh
index a718291..20a5cf7 100755
--- a/lmi_setup_20.sh
+++ b/lmi_setup_20.sh
@@ -91,7 +91,7 @@ mount -t proc -o rw,nosuid,nodev,noexec,relatime proc /proc
# If a 'directory' chroot is to be configured, bind mounts may not be
# shown clearly in /etc/mtab ; use 'findmnt' to see them.
-# Notes on various distros' package names.
+# Historical notes on various distros' package names.
#
# redhat names some packages differently:
# pkgconfig ShellCheck libxml2 libxslt
@@ -101,12 +101,16 @@ mount -t proc -o rw,nosuid,nodev,noexec,relatime proc
/proc
# It provides 'xsltproc' as part of libxslt, though not as a
# separate package:
# https://bugzilla.redhat.com/show_bug.cgi?id=965996
+#
+# Instead of worrying about such gratuitous differences, this suite
+# of scripts installs a debian chroot on any host system, and builds
+# only in that chroot.
apt-get update
apt-get --assume-yes install wget g++-mingw-w64 automake libtool make \
pkg-config git cvs zsh bzip2 unzip sudo wine default-jre jing trang \
g++-multilib libxml2-utils libxslt1-dev vim-gtk vim-doc shellcheck \
- bc libarchive-tools xsltproc rsync \
+ bc libarchive-tools xsltproc rsync curl \
>"${CHRTNAME}"-apt-get-log 2>&1
# This command should produce little output:
diff --git a/lmi_setup_inc.sh b/lmi_setup_inc.sh
index bbd2196..ff6c8f4 100755
--- a/lmi_setup_inc.sh
+++ b/lmi_setup_inc.sh
@@ -37,9 +37,13 @@ NORMAL_USER=greg
NORMAL_USER_UID=1000
NORMAL_GROUP=greg
NORMAL_GROUP_GID=1000
-GIT_URL_BASE=https://git.savannah.nongnu.org/cgit/lmi.git/plain
-# For a server that, bizarrely, blocks gnu.org but allows github.com:
-# GIT_URL_BASE=https://github.com/vadz/lmi/raw/master
+# A known corporate firewall blocks gnu.org even on a GNU/Linux
+# server, yet allows github.com:
+if curl https://git.savannah.nongnu.org:443 >/dev/null 2>&1 ; then
+ GIT_URL_BASE=https://git.savannah.nongnu.org/cgit/lmi.git/plain
+else
+ GIT_URL_BASE=https://github.com/vadz/lmi/raw/master
+fi
set +vx
- [lmi-commits] [lmi] master updated (1d72971 -> 3618602), Greg Chicares, 2020/02/26
- [lmi-commits] [lmi] master 135b344 2/6: Diagnose and correct defective umask, Greg Chicares, 2020/02/26
- [lmi-commits] [lmi] master d7bcdbf 3/6: Improve documentation, Greg Chicares, 2020/02/26
- [lmi-commits] [lmi] master 3618602 6/6: Determine chroot parameters dynamically, Greg Chicares, 2020/02/26
- [lmi-commits] [lmi] master 61c427f 5/6: Detect whether gnu.org is, bizarrely, blocked,
Greg Chicares <=
- [lmi-commits] [lmi] master 2efaa10 1/6: Suppress a debian nuisance, Greg Chicares, 2020/02/26
- [lmi-commits] [lmi] master 1786dd1 4/6: Copy another chroot log file to host, Greg Chicares, 2020/02/26