Hi, this is the third version of my patch series that introduces compatibility checks for the CGit/JGit refatble implementations. Changes compared to v2: - Adjusted commit subject for the skipping-sudo patch. - Broken an overly long line in "install-dependencies.sh". - Fixed tests that depend on custom binaries not running on GitLab CI due to the unprivileged-user setup. - Fixed some typos. CI jobs for this version: - https://gitlab.com/gitlab-org/git/-/pipelines/1248875682 - https://github.com/git/git/actions/runs/8643984413 Thanks for all the feedback! Patrick Patrick Steinhardt (13): ci: rename "runs_on_pool" to "distro" ci: expose distro name in dockerized GitHub jobs ci: skip sudo when we are already root ci: drop duplicate package installation for "linux-gcc-default" ci: convert "install-dependencies.sh" to use "/bin/sh" ci: merge custom PATH directories ci: fix setup of custom path for GitLab CI ci: merge scripts which install dependencies ci: make Perforce binaries executable for all users ci: install JGit dependency t06xx: always execute backend-specific tests t0610: fix non-portable variable assignment t0612: add tests to exercise Git/JGit reftable compatibility .github/workflows/main.yml | 8 +- .gitlab-ci.yml | 6 +- ci/install-dependencies.sh | 101 +++++++++++++------ ci/install-docker-dependencies.sh | 46 --------- ci/lib.sh | 14 +-- t/t0600-reffiles-backend.sh | 8 +- t/t0601-reffiles-pack-refs.sh | 9 +- t/t0610-reftable-basics.sh | 15 ++- t/t0612-reftable-jgit-compatibility.sh | 132 +++++++++++++++++++++++++ 9 files changed, 229 insertions(+), 110 deletions(-) delete mode 100755 ci/install-docker-dependencies.sh create mode 100755 t/t0612-reftable-jgit-compatibility.sh Range-diff against v2: 1: 89723b6812 = 1: 46502bbe22 ci: rename "runs_on_pool" to "distro" 2: e60a40bd65 = 2: d076ed9857 ci: expose distro name in dockerized GitHub jobs 3: 16603d40fd ! 3: cc0c29052f ci: allow skipping sudo on dockerized jobs @@ Metadata Author: Patrick Steinhardt <ps@xxxxxx> ## Commit message ## - ci: allow skipping sudo on dockerized jobs + ci: skip sudo when we are already root Our "install-dependencies.sh" script is executed by non-dockerized jobs to install dependencies. These jobs don't run with "root" permissions, 4: b4f6d6d3bf = 4: 803f5020e0 ci: drop duplicate package installation for "linux-gcc-default" 5: 6abc53bf51 ! 5: d2745e9438 ci: convert "install-dependencies.sh" to use "/bin/sh" @@ ci/install-dependencies.sh: ubuntu-*) - cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs . - popd + wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -+ tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" ++ tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \ ++ -C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ;; macos-*) 6: d9be4db56f ! 6: 61f108d954 ci: merge custom PATH directories @@ ci/install-dependencies.sh: ubuntu-*) - mkdir --parents "$GIT_LFS_PATH" wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -- tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" -+ tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \ +- -C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" ++ -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ;; macos-*) -: ---------- > 7: ef61b578da ci: fix setup of custom path for GitLab CI 7: 4a90c003d1 ! 8: 7748f87f8c ci: merge scripts which install dependencies @@ .github/workflows/main.yml: jobs: if: failure() && env.FAILED_TEST_ARTIFACTS != '' ## .gitlab-ci.yml ## -@@ .gitlab-ci.yml: workflow: - test:linux: - image: $image +@@ .gitlab-ci.yml: test:linux: + variables: + CUSTOM_PATH: "/custom" before_script: - - ./ci/install-docker-dependencies.sh + - ./ci/install-dependencies.sh @@ ci/install-dependencies.sh: then mkdir --parents "$CUSTOM_PATH" wget --quiet --directory-prefix="$CUSTOM_PATH" \ @@ ci/install-dependencies.sh: ubuntu-*) - tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ;; +ubuntu32-*) 8: 5240046a0f ! 9: f7399382f2 ci: make Perforce binaries executable for all users @@ ci/install-dependencies.sh: ubuntu-*) + chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" - tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \ 9: 29ceb623b9 ! 10: b835ff8b78 ci: install JGit dependency @@ ci/install-dependencies.sh: ubuntu-*) libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \ ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE @@ ci/install-dependencies.sh: ubuntu-*) - wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" - tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \ + -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" + + wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit" 10: fc3472cdf3 = 11: 7136c8b6c2 t06xx: always execute backend-specific tests 11: cedf5929d1 ! 12: cf4ee9c427 t0610: fix non-portable variable assignment @@ Commit message Such an assignment has been introduced in t0610. The issue wasn't detected for a while because this test used to only run when the - GIT_TEST_DEFAULT_REF_FORMAT environment variable was set to "refatble". + GIT_TEST_DEFAULT_REF_FORMAT environment variable was set to "reftable". We have dropped that requirement now though, meaning that it runs - unconditionally, inclluding on jobs which use such older versions of + unconditionally, including on jobs which use such older versions of Ubuntu. We have worked around such issues in the past, e.g. in ebee5580ca 12: 160b026e69 ! 13: a9cd20eebc t0612: add tests to exercise Git/JGit reftable compatibility @@ t/t0612-reftable-jgit-compatibility.sh (new) + +if ! test_have_prereq JGIT +then -+ skip_all='skipping reftable JGit tests' ++ skip_all='skipping reftable JGit tests; JGit is not present in PATH' + test_done +fi + -- 2.44.GIT
Attachment:
signature.asc
Description: PGP signature