From 80b05b8a6e94c903f876fdd9698130ab74850420 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:25:56 +0100 Subject: [PATCH 1/4] point people to other install methods than the boostrap --- easybuild/scripts/bootstrap_eb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/scripts/bootstrap_eb.py b/easybuild/scripts/bootstrap_eb.py index 1ccc317466..abc848283b 100644 --- a/easybuild/scripts/bootstrap_eb.py +++ b/easybuild/scripts/bootstrap_eb.py @@ -854,6 +854,8 @@ def main(): self_txt = open(__file__).read() if IS_PY3: self_txt = self_txt.encode('utf-8') + info("DEPRECATED: Use of the EasyBuild boostrap script is deprecated and may not work.") + info("Recommended install methods: https://docs.easybuild.io/en/latest/Installation.html\n"). info("EasyBuild bootstrap script (version %s, MD5: %s)" % (EB_BOOTSTRAP_VERSION, md5(self_txt).hexdigest())) info("Found Python %s\n" % '; '.join(sys.version.split('\n'))) From 28c9de2b1c09f8c5b4304356d4f722fc51e7570f Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:30:04 +0100 Subject: [PATCH 2/4] typo --- easybuild/scripts/bootstrap_eb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/scripts/bootstrap_eb.py b/easybuild/scripts/bootstrap_eb.py index abc848283b..1b2422e831 100644 --- a/easybuild/scripts/bootstrap_eb.py +++ b/easybuild/scripts/bootstrap_eb.py @@ -855,7 +855,7 @@ def main(): if IS_PY3: self_txt = self_txt.encode('utf-8') info("DEPRECATED: Use of the EasyBuild boostrap script is deprecated and may not work.") - info("Recommended install methods: https://docs.easybuild.io/en/latest/Installation.html\n"). + info("Recommended install methods: https://docs.easybuild.io/en/latest/Installation.html\n") info("EasyBuild bootstrap script (version %s, MD5: %s)" % (EB_BOOTSTRAP_VERSION, md5(self_txt).hexdigest())) info("Found Python %s\n" % '; '.join(sys.version.split('\n'))) From 4257628704580e4fdb4168dd435e5ea4739c4a97 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 18 Jun 2021 10:53:13 +0200 Subject: [PATCH 3/4] require that $EASYBUILD_BOOTSTRAP_DEPRECATED is defined to run EasyBuild bootstrap script --- .github/workflows/bootstrap_script.yml | 3 ++- easybuild/scripts/bootstrap_eb.py | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bootstrap_script.yml b/.github/workflows/bootstrap_script.yml index e46f5cb41e..3eddc7dcf3 100644 --- a/.github/workflows/bootstrap_script.yml +++ b/.github/workflows/bootstrap_script.yml @@ -107,11 +107,12 @@ jobs: EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g') EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ') EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM" - EB_BOOTSTRAP_EXPECTED="20210106.01 c2d93de0dd91123eb4f51cfc16d1f5efb80f1d238b3d6cd100994086887a1ae0" + EB_BOOTSTRAP_EXPECTED="20210618.01 e5d477d717c6d3648ba2027ab735713ba5804fbf52f4b4adcca0bc1379b44618" test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1) # test bootstrap script export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap + export EASYBUILD_BOOTSTRAP_DEPRECATED=1 python easybuild/scripts/bootstrap_eb.py $PREFIX # unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module unset PYTHONPATH diff --git a/easybuild/scripts/bootstrap_eb.py b/easybuild/scripts/bootstrap_eb.py index 1b2422e831..ed3390ea93 100644 --- a/easybuild/scripts/bootstrap_eb.py +++ b/easybuild/scripts/bootstrap_eb.py @@ -62,7 +62,7 @@ import urllib.request as std_urllib -EB_BOOTSTRAP_VERSION = '20210106.01' +EB_BOOTSTRAP_VERSION = '20210618.01' # argparse preferrred, optparse deprecated >=2.7 HAVE_ARGPARSE = False @@ -82,6 +82,9 @@ STAGE1_SUBDIR = 'eb_stage1' +# the EasyBuild bootstrap script is deprecated, and will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined +EASYBUILD_BOOTSTRAP_DEPRECATED = os.environ.pop('EASYBUILD_BOOTSTRAP_DEPRECATED', None) + # set print_debug to True for detailed progress info print_debug = os.environ.pop('EASYBUILD_BOOTSTRAP_DEBUG', False) @@ -854,8 +857,17 @@ def main(): self_txt = open(__file__).read() if IS_PY3: self_txt = self_txt.encode('utf-8') - info("DEPRECATED: Use of the EasyBuild boostrap script is deprecated and may not work.") - info("Recommended install methods: https://docs.easybuild.io/en/latest/Installation.html\n") + + url = 'https://docs.easybuild.io/en/latest/Installation.html' + info("Use of the EasyBuild boostrap script is DEPRECATED (since June 2021).") + info("It is strongly recommended to use one of the installation methods outlined at %s instead!\n" % url) + if not EASYBUILD_BOOTSTRAP_DEPRECATED: + error("The EasyBuild bootstrap script will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined.") + else: + msg = "You have opted to continue with the EasyBuild bootstrap script by defining " + msg += "$EASYBUILD_BOOTSTRAP_DEPRECATED. Good luck!\n" + info(msg) + info("EasyBuild bootstrap script (version %s, MD5: %s)" % (EB_BOOTSTRAP_VERSION, md5(self_txt).hexdigest())) info("Found Python %s\n" % '; '.join(sys.version.split('\n'))) From 2cea28e6f255a6fb37b4e955c862b9498a56f17e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 18 Jun 2021 10:59:40 +0200 Subject: [PATCH 4/4] need to unset $EASYBUILD_BOOTSTRAP_DEPRECATED or EasyBuild gets upset about not knowing this configuration option --- .github/workflows/bootstrap_script.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bootstrap_script.yml b/.github/workflows/bootstrap_script.yml index 3eddc7dcf3..c0ade9843b 100644 --- a/.github/workflows/bootstrap_script.yml +++ b/.github/workflows/bootstrap_script.yml @@ -114,6 +114,7 @@ jobs: export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap export EASYBUILD_BOOTSTRAP_DEPRECATED=1 python easybuild/scripts/bootstrap_eb.py $PREFIX + unset EASYBUILD_BOOTSTRAP_DEPRECATED # unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module unset PYTHONPATH # simple sanity check on bootstrapped EasyBuild module