From 8fac144b1ff8960b788b60a883cfce1e85ef3a16 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 16 Feb 2024 10:24:36 +0100 Subject: [PATCH 1/9] fix description of `backup-modules` The documentation is wrong as it doesn't apply to `--module-only` but rather to `--rebuild` or `--force`. Also the auto-enabling is not mentioned. --- easybuild/tools/options.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/options.py b/easybuild/tools/options.py index 554775be20..0ea04c7672 100644 --- a/easybuild/tools/options.py +++ b/easybuild/tools/options.py @@ -357,7 +357,8 @@ def override_options(self): None, 'store_true', False), 'allow-use-as-root-and-accept-consequences': ("Allow using of EasyBuild as root (NOT RECOMMENDED!)", None, 'store_true', False), - 'backup-modules': ("Back up an existing module file, if any. Only works when using --module-only", + 'backup-modules': ("Back up an existing module file, if any. " + "Auto-enabled when using --module-only or --skip", None, 'store_true', None), # default None to allow auto-enabling if not disabled 'backup-patched-files': ("Create a backup (*.orig) file when applying a patch", None, 'store_true', False), From d57c251c8145ff080529038f00505951eaee6983 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:34:10 +0000 Subject: [PATCH 2/9] replace `'` with `"` for `printf` to have bash replace a variable --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ec98f9df03..c79b515e42 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -178,7 +178,7 @@ jobs: echo "Not testing with '${module_syntax}' as module syntax with '${EASYBUILD_MODULES_TOOL}' as modules tool" continue fi - printf '\n\n=====================> Using $module_syntax module syntax <=====================\n\n' + printf "\n\n=====================> Using $module_syntax module syntax <=====================\n\n" export EASYBUILD_MODULE_SYNTAX="${module_syntax}" export TEST_EASYBUILD_MODULE_SYNTAX="${EASYBUILD_MODULE_SYNTAX}" From 3a7b3eb109c8933c68ef2a89f71391b1c243e6a7 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Fri, 23 Feb 2024 16:38:36 +0100 Subject: [PATCH 3/9] Use cp -dR instead of cp -a for shell script extraction cp -a will try to copy attributes, when the copy is from a file system type with attributes that doesn't work on the target file system this will fail --- easybuild/tools/filetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 5a2f724bc8..bc938f4210 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -161,7 +161,7 @@ # tar.Z: using compress (LZW), but can be handled with gzip so use 'z' '.tar.z': "tar xzf %(filepath)s", # shell scripts don't need to be unpacked, just copy there - '.sh': "cp -a %(filepath)s .", + '.sh': "cp -dR %(filepath)s .", } ZIPPED_PATCH_EXTS = ('.bz2', '.gz', '.xz') From 17f4b1dff887fc69e0fec73c8919335878ec4edf Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Mon, 26 Feb 2024 09:36:19 +0800 Subject: [PATCH 4/9] fix link to documentation in close_pr message --- easybuild/tools/github.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/tools/github.py b/easybuild/tools/github.py index 8100c8613b..96ed4d6492 100644 --- a/easybuild/tools/github.py +++ b/easybuild/tools/github.py @@ -1370,8 +1370,7 @@ def close_pr(pr, motivation_msg=None): if not reopen: msg += "\nPlease don't hesitate to reopen this PR or add a comment if you feel this contribution is still " msg += "relevant.\nFor more information on our policy w.r.t. closing PRs, see " - msg += "https://easybuild.readthedocs.io/en/latest/Contributing.html" - msg += "#why-a-pull-request-may-be-closed-by-a-maintainer" + msg += "https://docs.easybuild.io/contributing/#contributing_review_process_why_pr_closed_by_maintainer" post_comment_in_issue(pr, msg, account=pr_target_account, repo=pr_target_repo, github_user=github_user) if dry_run: From 0f18f73c8207f8172efa7dda07aed9aaadd4b070 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 26 Feb 2024 07:45:37 +0100 Subject: [PATCH 5/9] tests: Adjust test of EXTRACT_CMDS for .sh files to match the change from cp -a to cp -dR --- test/framework/filetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/framework/filetools.py b/test/framework/filetools.py index 3b879bef85..8ee6b2c917 100644 --- a/test/framework/filetools.py +++ b/test/framework/filetools.py @@ -104,7 +104,7 @@ def test_extract_cmd(self): ('test.txz', "unset TAPE; unxz test.txz --stdout | tar x"), ('test.iso', "7z x test.iso"), ('test.tar.Z', "tar xzf test.tar.Z"), - ('test.foo.bar.sh', "cp -a test.foo.bar.sh ."), + ('test.foo.bar.sh', "cp -dR test.foo.bar.sh ."), # check whether extension is stripped correct to determine name of target file # cfr. https://github.com/easybuilders/easybuild-framework/pull/3705 ('testbz2.bz2', "bunzip2 -c testbz2.bz2 > testbz2"), From 07d06af44eeb3cbc70879a25b6dc28f4433cf195 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 1 Mar 2024 17:23:14 +0100 Subject: [PATCH 6/9] fix test_github_merge_pr by using more recent easyconfigs PR --- test/framework/options.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/framework/options.py b/test/framework/options.py index 26daa0cc7a..a491936d78 100644 --- a/test/framework/options.py +++ b/test/framework/options.py @@ -4806,26 +4806,29 @@ def test_github_merge_pr(self): self.assertEqual(stderr.strip(), expected_stderr) self.assertTrue(stdout.strip().endswith(expected_stdout), "'%s' ends with '%s'" % (stdout, expected_stdout)) - # full eligible merged PR, default target branch + # full eligible merged PR, default target branch; + # note: we frequently need to change to a more recent PR here, + # to avoid that this test starts failing because commit status is set to None for old commits del args[-1] - args[1] = '17065' + # easyconfig PR for EasyBuild v4.8.2 + args[1] = '19105' stdout, stderr = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False) expected_stdout = '\n'.join([ - "Checking eligibility of easybuilders/easybuild-easyconfigs PR #17065 for merging...", + "Checking eligibility of easybuilders/easybuild-easyconfigs PR #19105 for merging...", "* targets develop branch: OK", "* test suite passes: OK", "* last test report is successful: OK", "* no pending change requests: OK", "* approved review: OK (by SebastianAchilles)", - "* milestone is set: OK (4.7.1)", + "* milestone is set: OK (4.9.0)", "* mergeable state is clean: PR is already merged", '', "Review OK, merging pull request!", '', - "[DRY RUN] Adding comment to easybuild-easyconfigs issue #17065: 'Going in, thanks @boegel!'", - "[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #17065", + "[DRY RUN] Adding comment to easybuild-easyconfigs issue #19105: 'Going in, thanks @boegel!'", + "[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #19105", ]) expected_stderr = '' self.assertEqual(stderr.strip(), expected_stderr) From cb6905601739d6f3437a29777a861eefc90ac96c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 1 Mar 2024 17:43:32 +0100 Subject: [PATCH 7/9] add workaround for 404 error when installing packages in CI workflow for testing Apptainer integration --- .github/workflows/container_tests_apptainer.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index 35c26c26c9..137b297379 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -29,10 +29,18 @@ jobs: - name: install OS & Python packages run: | # for building CentOS 7 container images - sudo apt-get install rpm - sudo apt-get install dnf + APT_PKGS="rpm dnf" # for modules tool - sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev + APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + + # Avoid apt-get update, as we don't really need it, + # and it does more harm than good (it's fairly expensive, and it results in flaky test runs) + if ! sudo apt-get install $APT_PKGS; then + # Try to update cache, then try again to resolve 404s of old packages + sudo apt-get update -yqq || true + sudo apt-get install $APT_PKGS + fi + # fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082 # needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then From 2266b7166ccffd5826396955ca2b485657cca663 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:04:16 +0000 Subject: [PATCH 8/9] append to `APT_PKGS` instead of overwriting it --- .github/workflows/container_tests_apptainer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index 137b297379..b7fc2a8418 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -31,7 +31,7 @@ jobs: # for building CentOS 7 container images APT_PKGS="rpm dnf" # for modules tool - APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS+="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" # Avoid apt-get update, as we don't really need it, # and it does more harm than good (it's fairly expensive, and it results in flaky test runs) From 05ab883213870c7cf86d97d2be2fa05792063aba Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:06:45 +0000 Subject: [PATCH 9/9] missing space --- .github/workflows/container_tests_apptainer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index b7fc2a8418..77d2a4a395 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -31,7 +31,7 @@ jobs: # for building CentOS 7 container images APT_PKGS="rpm dnf" # for modules tool - APT_PKGS+="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" # Avoid apt-get update, as we don't really need it, # and it does more harm than good (it's fairly expensive, and it results in flaky test runs)