CI: avoid issues with Ubuntu patched git by adding safe.directory (#30042)
Ubuntu patched git v2.25.1 with a security fix that also introduced a breaking change, so v2.25.1 behaves like v2.35.2 with respect to the use cases in CVE-2022-24765
This commit is contained in:
32
.github/workflows/bootstrap.yml
vendored
32
.github/workflows/bootstrap.yml
vendored
@@ -59,6 +59,14 @@ jobs:
|
|||||||
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
|
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
|
||||||
make patch unzip xz-utils python3 python3-dev tree \
|
make patch unzip xz-utils python3 python3-dev tree \
|
||||||
cmake bison
|
cmake bison
|
||||||
|
- name: Work around CVE-2022-24765
|
||||||
|
run: |
|
||||||
|
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
|
||||||
|
# a breaking behavior. See:
|
||||||
|
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
||||||
|
# - https://github.com/actions/checkout/issues/760
|
||||||
|
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
|
||||||
|
git config --global --add safe.directory /__w/spack/spack
|
||||||
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # @v2
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # @v2
|
||||||
- name: Setup repo and non-root user
|
- name: Setup repo and non-root user
|
||||||
run: |
|
run: |
|
||||||
@@ -171,7 +179,15 @@ jobs:
|
|||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
bzip2 curl file g++ gcc patchelf gfortran git gzip \
|
bzip2 curl file g++ gcc patchelf gfortran git gzip \
|
||||||
make patch unzip xz-utils python3 python3-dev tree
|
make patch unzip xz-utils python3 python3-dev tree
|
||||||
- uses: actions/checkout@v2
|
- name: Work around CVE-2022-24765
|
||||||
|
run: |
|
||||||
|
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
|
||||||
|
# a breaking behavior. See:
|
||||||
|
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
||||||
|
# - https://github.com/actions/checkout/issues/760
|
||||||
|
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
|
||||||
|
git config --global --add safe.directory /__w/spack/spack
|
||||||
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
- name: Setup repo and non-root user
|
- name: Setup repo and non-root user
|
||||||
run: |
|
run: |
|
||||||
git --version
|
git --version
|
||||||
@@ -200,7 +216,15 @@ jobs:
|
|||||||
bzip2 curl file g++ gcc patchelf gfortran git gzip \
|
bzip2 curl file g++ gcc patchelf gfortran git gzip \
|
||||||
make patch unzip xz-utils python3 python3-dev tree \
|
make patch unzip xz-utils python3 python3-dev tree \
|
||||||
gawk
|
gawk
|
||||||
- uses: actions/checkout@v2
|
- name: Work around CVE-2022-24765
|
||||||
|
run: |
|
||||||
|
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
|
||||||
|
# a breaking behavior. See:
|
||||||
|
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
||||||
|
# - https://github.com/actions/checkout/issues/760
|
||||||
|
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
|
||||||
|
git config --global --add safe.directory /__w/spack/spack
|
||||||
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
- name: Setup repo and non-root user
|
- name: Setup repo and non-root user
|
||||||
run: |
|
run: |
|
||||||
git --version
|
git --version
|
||||||
@@ -225,7 +249,7 @@ jobs:
|
|||||||
brew install tree
|
brew install tree
|
||||||
# Remove GnuPG since we want to bootstrap it
|
# Remove GnuPG since we want to bootstrap it
|
||||||
sudo rm -rf /usr/local/bin/gpg
|
sudo rm -rf /usr/local/bin/gpg
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
- name: Bootstrap GnuPG
|
- name: Bootstrap GnuPG
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
@@ -241,7 +265,7 @@ jobs:
|
|||||||
brew install gawk tree
|
brew install gawk tree
|
||||||
# Remove GnuPG since we want to bootstrap it
|
# Remove GnuPG since we want to bootstrap it
|
||||||
sudo rm -rf /usr/local/bin/gpg
|
sudo rm -rf /usr/local/bin/gpg
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
- name: Bootstrap GnuPG
|
- name: Bootstrap GnuPG
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
|
Reference in New Issue
Block a user