Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/bullseye-aarch64-sysroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
name: bullseye-aarch64 sysroot
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create sysroot
run: ./sysroot/sysroot-creator.sh build arm64

- name: Upload sysroot
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: debian_bullseye_aarch64_sysroot.tar.xz
path: sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz

- uses: bazelbuild/setup-bazelisk@v2
- uses: bazel-contrib/setup-bazel@0.15.0

- name: Mount bazel cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
Expand All @@ -42,7 +42,7 @@ jobs:

- name: Release sysroot
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v1-release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "sysroot/out/sysroot-build/bullseye/debian_bullseye_arm64_sysroot.tar.xz"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/bullseye-x86_64-sysroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
name: bullseye-x86_64 sysroot
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create sysroot
run: ./sysroot/sysroot-creator.sh build amd64

- name: Upload sysroot
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: debian_bullseye_x86_64_sysroot.tar.xz
path: sysroot/out/sysroot-build/bullseye/debian_bullseye_amd64_sysroot.tar.xz

- uses: bazelbuild/setup-bazelisk@v2
- uses: bazel-contrib/setup-bazel@0.15.0

- name: Mount bazel cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
Expand All @@ -42,7 +42,7 @@ jobs:

- name: Release sysroot
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v1-release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "sysroot/out/sysroot-build/bullseye/debian_bullseye_amd64_sysroot.tar.xz"
Expand Down
6 changes: 3 additions & 3 deletions sysroot/generated_package_lists/bullseye.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/l
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libgcc-s1_10.2.1-6_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libstdc++-10-dev_10.2.1-6_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libstdc++6_10.2.1-6_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6_2.31-13+deb11u5_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6-dev_2.31-13+deb11u5_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas3_3.9.0-3_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6_2.31-13+deb11u5_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas-dev_3.9.0-3_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack3_3.9.0-3_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas3_3.9.0-3_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack-dev_3.9.0-3_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack3_3.9.0-3_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/linux/linux-libc-dev_6.1.12-1~bpo11+1_amd64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/u/util-linux/uuid-dev_2.36.1-8+deb11u1_amd64.deb
6 changes: 3 additions & 3 deletions sysroot/generated_package_lists/bullseye.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/l
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libgcc-s1_10.2.1-6_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libstdc++-10-dev_10.2.1-6_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/gcc-10/libstdc++6_10.2.1-6_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6_2.31-13+deb11u5_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6-dev_2.31-13+deb11u5_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas3_3.9.0-3_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/g/glibc/libc6_2.31-13+deb11u5_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas-dev_3.9.0-3_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack3_3.9.0-3_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/libblas3_3.9.0-3_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack-dev_3.9.0-3_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/lapack/liblapack3_3.9.0-3_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/l/linux/linux-libc-dev_6.1.12-1~bpo11+1_arm64.deb
https://snapshot.debian.org/archive/debian/20230329T085712Z/pool/main/u/util-linux/uuid-dev_2.36.1-8+deb11u1_arm64.deb
40 changes: 26 additions & 14 deletions sysroot/sysroot-creator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#@ {amd64,i386,armhf,arm64,armel,mipsel,mips64el}
#@

# partially synced with https://chromium.googlesource.com/chromium/src/+/e8df45bfd5386216b9b6ff178b26461902c7ae3a/build/linux/sysroot_scripts/sysroot-creator.sh


######################################################################
# Config
######################################################################
Expand Down Expand Up @@ -450,35 +453,44 @@ InstallIntoSysroot() {

CleanupJailSymlinks() {
Banner "Jail symlink cleanup"

SAVEDPWD=$(pwd)
cd ${INSTALL_ROOT}
local libdirs="lib usr/lib"
if [ -d lib64 ]; then
libdirs="${libdirs} lib64"
fi

find $libdirs -type l -printf '%p %l\n' | while read link target; do
# skip links with non-absolute paths
echo "${target}" | grep -qs ^/ || continue
echo "${link}: ${target}"
# Relativize the symlink.
prefix=$(echo "${link}" | sed -e 's/[^/]//g' | sed -e 's|/|../|g')
ln -snfv "${prefix}${target}" "${link}"
case "${link}" in
usr/lib/gcc/*-linux-gnu/4.*/* | usr/lib/gcc/arm-linux-gnueabihf/4.*/* | \
usr/lib/gcc/aarch64-linux-gnu/4.*/*)
# Relativize the symlink.
ln -snfv "../../../../..${target}" "${link}"
;;
usr/lib/*-linux-gnu/* | usr/lib/arm-linux-gnueabihf/*)
# Relativize the symlink.
ln -snfv "../../..${target}" "${link}"
;;
usr/lib/*)
# Relativize the symlink.
ln -snfv "../..${target}" "${link}"
;;
lib64/* | lib/*)
# Relativize the symlink."
ln -snfv "..${target}" "${link}"
;;
esac
done

failed=0
while read link target; do
find $libdirs -type l -printf '%p %l\n' | while read link target; do
# Make sure we catch new bad links.
if [ ! -r "${link}" ]; then
echo "ERROR: FOUND BAD LINK ${link}"
ls -l ${link}
failed=1
#exit 1
fi
done < <(find $libdirs -type l -printf '%p %l\n')
if [ $failed -eq 1 ]; then
exit 1
fi
done
cd "$SAVEDPWD"
}

Expand Down Expand Up @@ -513,7 +525,7 @@ BuildSysroot() {
StripChecksumsFromPackageList "$package_file"
InstallIntoSysroot ${files_and_sha256sums}
HacksAndPatches
# CleanupJailSymlinks
CleanupJailSymlinks
# VerifyLibraryDeps
CreateTarBall
}
Expand Down