Compare commits

...

57 Commits

Author SHA1 Message Date
uazo
f6ee667765 remove is_cfi and use_cfi_cast from windows build 2022-10-14 11:59:47 +02:00
uazo
c3eb2dcb7b fix WINDOWSSDKDIR value 2022-10-14 08:35:48 +02:00
uazo
bd3bf8e9cf Remove generate_linker_map for windows build 2022-10-14 08:11:06 +02:00
uazo
7ce76c0224 Add win crossbuild 2022-10-13 16:44:02 +02:00
uazo
37512410b0 Add rc build 2022-10-13 15:28:59 +02:00
uazo
772162a0db re-enable depot tools patch 2022-10-13 14:39:54 +02:00
uazo
3d1f8a1c0d in preparation for the build for windows 2022-10-13 12:23:20 +02:00
uazo
9832622c39 attach win_sdk folder 2022-10-05 15:26:27 +02:00
uazo
0e1c4bc71a add win_sdk folder to runner 2022-10-05 15:24:56 +02:00
uazo
c59ea691bd Update README.md 2022-10-05 09:38:03 +02:00
uazo
daca99c6c5 Update export-patch-list.sh 2022-09-07 13:39:36 +02:00
uazo
e826c60239 changed method of creating new patch name 2022-09-07 11:43:26 +02:00
uazo
50441d00bc improved replacement 2022-09-07 11:11:24 +02:00
uazo
dc0253788a fix build clangd index 2022-08-02 17:21:58 +02:00
uazo
ddc84733e9 Update prepare-build.sh 2022-08-01 14:40:13 +02:00
uazo
3d2a3fb5fd try using github as source 2022-08-01 13:10:25 +02:00
uazo
6e62f4a85d Update prepare-build.sh 2022-08-01 10:16:21 +02:00
uazo
406a5d83c2 Using github 2022-08-01 08:28:45 +02:00
uazo
963ab065f9 Update Dockerfile 2022-08-01 08:02:46 +02:00
uazo
e15c9f918b Update Dockerfile 2022-08-01 08:01:31 +02:00
uazo
aa33b64d6c Using raw.githubusercontent.com
Since original is down
2022-08-01 07:59:50 +02:00
uazo
4893074e00 Do not automatically update DEPOT_TOOLS 2022-07-15 10:10:56 +02:00
uazo
abf39d8c09 Update depot_tools.diff 2022-07-15 10:02:47 +02:00
uazo
fd177a7772 change skip_clangd_unsupported_options 2022-07-12 17:41:44 +02:00
uazo
2de67fd5af fix sudo error
fix "sudo must be owned by uid 0 and have the setuid bit set"
2022-07-12 15:14:35 +02:00
uazo
a284b224fb Update Dockerfile 2022-07-08 19:32:23 +02:00
uazo
d5b30106a5 Add prerequisite for systemwebview target 2022-07-08 19:31:21 +02:00
uazo
729ad9b695 try to disable clang_use_chrome_plugins=false 2022-04-12 10:13:51 +02:00
uazo
ffc028a0e9 Update export-all-patch.sh 2022-04-12 10:11:25 +02:00
uazo
20f617fd4a Update whitelist 2022-03-30 16:44:33 +02:00
uazo
dce1324300 Update whitelist 2022-03-30 16:25:06 +02:00
uazo
dacc20b60d Update whitelist 2022-03-30 16:20:48 +02:00
uazo
fe2587d942 Update whitelist 2022-03-30 16:15:52 +02:00
uazo
bafaa5f167 Update whitelist 2022-03-30 16:09:15 +02:00
uazo
64df7a0a73 mark the release as a prerelease 2022-03-25 11:22:15 +01:00
uazo
aede203911 Update apply-bromite-patches.sh 2022-03-25 08:58:27 +01:00
uazo
7dc817d819 Update apply-bromite-patches.sh 2022-03-25 07:26:43 +01:00
uazo
81f793ed34 fix export error 2022-03-24 20:29:25 +01:00
uazo
a716f182be Update export-all-patch.sh 2022-03-24 16:58:45 +01:00
uazo
cfbb923b0d check for changed and contrib folders 2022-03-24 16:26:38 +01:00
uazo
f12c3e78b4 fix incorrect way to set env variable 2022-03-09 08:59:27 +01:00
uazo
854b6356d5 fix pup command 2022-03-09 08:57:06 +01:00
Carmelo Messina
89497b252b Revert "Update release.yaml"
This reverts commit 58fe440996.
2022-03-09 08:50:29 +01:00
uazo
58fe440996 Update release.yaml 2022-03-09 08:45:13 +01:00
uazo
7d83b64cc9 Create export-patch-list.sh 2022-02-25 14:27:13 +01:00
uazo
45dff72f43 fix argument 2022-02-23 15:28:48 +01:00
uazo
cfabccd77f remove last empty line like upstream 2022-02-22 15:42:20 +01:00
uazo
d6bbb56bc3 remove space after "-- " like upstream 2022-02-22 15:41:54 +01:00
uazo
d184899841 fix is_cfi build error in debug 2022-02-22 14:34:51 +01:00
uazo
cc085e6ebb change upstream gnargs file 2022-02-22 10:04:33 +01:00
uazo
0978237d5c add ephemeral to runner config 2022-02-18 16:08:27 +01:00
uazo
94ad7d9a1d Update to runner v2.302.5 2022-02-18 12:52:34 +00:00
uazo
f16bbde3d2 update text "2.20.1 -> 2.25.1" 2022-02-14 08:44:14 +01:00
uazo
7d34ccc024 Change names 2022-02-03 21:44:09 +01:00
uazo
2390b1c274 temporany remove download x86_64 android image 2022-02-02 22:59:16 +01:00
uazo
33026c916b remove request 2022-02-02 20:45:37 +01:00
uazo
2c9faf66b3 Remove "Press Return" if not in building 2022-02-02 20:38:55 +01:00
18 changed files with 264 additions and 104 deletions

View File

@@ -22,6 +22,10 @@ on:
description: 'arch [arm64/x64]'
required: true
default: 'x64'
targetos:
description: 'targetos [android/win]'
required: true
default: 'android'
type:
description: 'runner? [dev/ci]'
required: true
@@ -81,7 +85,7 @@ jobs:
cd bromite-buildtools
- name: Checking build-deps for ${{ env.VERSION }}
- name: Building build-deps container ${{ env.VERSION }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/build-deps:$VERSION > /dev/null ; echo $?)
@@ -97,7 +101,7 @@ jobs:
fi
fi
- name: Checking chromium for ${{ env.VERSION }}
- name: Building chromium container ${{ env.VERSION }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/chromium:$VERSION > /dev/null ; echo $?)
@@ -112,7 +116,7 @@ jobs:
fi
fi
- name: Checking bromite for ${{ env.BROMITE_SHA }}
- name: Building bromite container ${{ env.BROMITE_SHA }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?)
@@ -127,7 +131,7 @@ jobs:
fi
fi
- name: Checking bromite-build for ${{ env.BROMITE_SHA }}
- name: Building bromite-build container ${{ env.BROMITE_SHA }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?)
@@ -181,15 +185,22 @@ jobs:
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
USEINTERNALNETWORK: true # CUSTOM RUNNER: create the docker network as internal
WORKSPACE: /home/lg/working_dir
# kythe
KYTHE_CORPUS: chromium.googlesource.com/chromium/src
KYTHE_ROOT_DIRECTORY: /home/lg/working_dir/chromium/src
KYTHE_OUTPUT_DIRECTORY: /home/lg/working_dir/chromium/src/out/bromite/kythe
# cross build
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: /win_sdk/10.0.20348.0/
WINDOWSSDKDIR: "/win_sdk/10.0.20348.0/Windows Kits/10/"
GYP_MSVS_OVERRIDE_PATH: /win_sdk/10.0.20348.0/
# compile in debug mode
TARGET_ISDEBUG: ${{ github.event.inputs.debug }}
TARGET_CPU: ${{ github.event.inputs.build }}
TARGET_OS: ${{ github.event.inputs.targetos }}
volumes:
- /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
- /storage/images/${{ github.event.inputs.targetos }}/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
- /tmp/proxy:/tmp/proxy
- /win_sdk:/win_sdk
steps:
- name: Prepare Build Container
@@ -249,10 +260,15 @@ jobs:
if [[ OUT_PRESENT -eq 0 ]]; then
echo "::group::-------- gn gen"
[[ "$USEGOMA" = "true" ]] && \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/GN_ARGS\") use_goma=true goma_dir=\"$WORKSPACE/goma\" $(cat ../../build_args.gni) " out/bromite \
|| \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/GN_ARGS\") $(cat ../../build_args.gni) " out/bromite
if [[ "$TARGET_OS" = "android" ]]
then
[[ "$USEGOMA" = "true" ]] && \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") use_goma=true goma_dir=\"$WORKSPACE/goma\" $(cat ../../build_args.gni) " out/bromite \
|| \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) " out/bromite
else
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") target_cpu = \"x64\" target_os = \"win\" $(cat ../../build_args.gni) " out/bromite
fi
echo "::endgroup::"
echo "::group::-------- gn args"
@@ -294,10 +310,15 @@ jobs:
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE/chromium/src
[[ "$USEGOMA" = "true" ]] && \
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk \
|| \
autoninja -C out/bromite chrome_public_apk
if [[ "$TARGET_OS" = "android" ]]
then
[[ "$USEGOMA" = "true" ]] && \
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk \
|| \
autoninja -C out/bromite chrome_public_apk
else
autoninja -C out/bromite chrome
fi
- name: Get ninja logs
shell: bash
@@ -363,12 +384,14 @@ jobs:
run: |
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE/chromium/src
$WORKSPACE/ninja/ninja -C $WORKSPACE/chromium/src/out/bromite -a chrome_public_apk \
-t compdb cc cxx objc objcxx >$WORKSPACE/chromium/src/out/bromite/compile_commands.json
test -f out/bromite/bromite.idx || \
/home/lg/working_dir/clangd_snapshot_20211205/bin/clangd-indexer --executor=all-TUs out/bromite/compile_commands.json >out/bromite/bromite.idx
cp -r out/bromite out/clangd && \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) skip_clangd_unsupported_options = true" out/clangd && \
$WORKSPACE/ninja/ninja -C $WORKSPACE/chromium/src/out/clangd -a chrome_public_apk \
-t compdb cc cxx objc objcxx >$WORKSPACE/chromium/src/out/clangd/compile_commands.json && \
/home/lg/working_dir/clangd_snapshot_20211205/bin/clangd-indexer --executor=all-TUs out/clangd/compile_commands.json >out/bromite/bromite.idx && \
rm -rf out/clangd
- name: Generate Supersize data
if: ${{ github.event.inputs.debug == 'false' }}

View File

@@ -45,7 +45,7 @@ jobs:
run: |
wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip
unzip pup_v0.4.0_linux_amd64.zip && rm pup_v0.4.0_linux_amd64.zip
BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$BROMITE_SHA | ./pup -p li.branch a text{})
BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$BROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
wget https://github.com/cli/cli/releases/download/v2.4.0/gh_2.4.0_linux_amd64.tar.gz
@@ -74,7 +74,7 @@ jobs:
cd bromite
VERSION=v$(cat ${{ env.OUTPUTFILE }}/RELEASE)-${{ github.event.inputs.build }}
../gh_2.4.0_linux_amd64/bin/gh release create $VERSION-$BROMITE_SHA \
../$APK --notes ""
../$APK --notes "" -p
# - name: Enable proxy on container
# shell: bash

View File

@@ -1,3 +1,42 @@
# bromite-buildtools
this repo contains my build machine and some scripts I use for Bromite development. the ci uses a modified version of the gihub runner (avaiable [here](https://github.com/uazo/runner)) and use [sysbox](https://github.com/nestybox/sysbox) to improve security. it also contains everything you need to use a self-hosted modified version of [goma](https://github.com/uazo/goma-server) for a multi-machine build
### Setting-up
1. Prepare folders
```
cd ~ && mkdir gh-runner
cd gh-runner && mkdir docker-inner
SYSBOX_UID=$(cat /etc/subuid | grep sysbox | cut -d : -f 2)
sudo chown $SYSBOX_UID:$SYSBOX_UID docker-inner/
mkdir /storage
sudo chown $SYSBOX_UID:$SYSBOX_UID /storage
```
2. Clone this repo
3. Prepare `.env`
```
cd bromite-buildtools/images/github-runner/
cp .env.example .env
```
4. Edit `.env` file
```
RUNNER_NAME=pd-gh-runner
GITHUB_PERSONAL_TOKEN=<git-token>
GITHUB_OWNER=uazo
GITHUB_REPOSITORY=bromite-buildtools
RUNNER_LABELS=dev
ALLOWEDAUTHORSLIST=uazo
```
5. Start the runner
```
cd bromite-buildtools/images/github-runner/
./start-runner.sh
```

View File

@@ -70,12 +70,11 @@ if [[ DOBUILD -eq 1 ]]; then
DOEXPORT=1
fi
if [[ OK -eq 0 ]]; then
if [ -z "$SILENT" ]; then
echo "Read to add $PATCH. Press return"
read -n 1
if [[ OK -eq 1 ]]; then
if [ -z "$SILENT" ]; then
echo "Read to add $PATCH. Press return"
read -n 1
fi
fi
fi

View File

@@ -10,7 +10,7 @@ fi
if [ -z "$2" ]
then
PATCH_NEW_PATH="~/bromite/build/patches-new"
PATCH_NEW_PATH=~/bromite/build/patches-new
else
PATCH_NEW_PATH=$2
fi

View File

@@ -18,17 +18,26 @@ for patch in $ALLPATCHS_E; do
if [ -z "$PATCH_FILE" ]
then
#git -C ~/chromium/src/ show -s $patch
PATCH_FILE=$(git -C ~/chromium/src/ show -s $patch | tail -n 1)
if [[ "$PATCH_FILE" != *".patch" ]]; then
PATCH_FILE=$NO_NAME.patch
NO_NAME=$NO_NAME.1
echo No Name ${NO_NAME}, press return
PATCH_FILE=00$(git -C ~/chromium/src/ show -s $patch | head -n 5 | tail -n 1 | xargs | tr " " - | tr [:punct:] -).patch
echo New Patch: ${PATCH_FILE}
fi
read -n 1
fi
bash ~/bromite-buildtools/export-single-patch.sh $patch $PATCH_FILE
done
PATCH_LIST=~/bromite/build/bromite_patches_list.txt
mkdir ~/bromite/build/patches-new/changed
mkdir ~/bromite/build/patches-new/contrib
for current_file in $(cat $PATCH_LIST); do
if [[ "$current_file" == *".patch" ]]; then
if [[ $current_file =~ ^changed/.* ]]; then
mv ~/bromite/build/patches-new/$(basename $current_file) ~/bromite/build/patches-new/changed
elif [[ $current_file =~ ^contrib/.* ]]; then
mv ~/bromite/build/patches-new/$(basename $current_file) ~/bromite/build/patches-new/contrib || true
fi
fi
done

28
export-patch-list.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
VERSION=$(cat ~/bromite/build/RELEASE)
CURRENT_RELEASE=$(git -C ~/chromium/src/ rev-parse --verify refs/tags/$VERSION)
ALLPATCHS_E=$(git -C ~/chromium/src/ rev-list HEAD...$CURRENT_RELEASE)
mkdir ~/bromite/build/patches-new
rm ~/bromite/build/patches-new/patch-list
NO_NAME=1
for patch in $ALLPATCHS_E; do
PATCH_FILE=$(git -C ~/chromium/src/ show -s $patch | grep FILE: | sed 's/FILE://g' | sed 's/^[ \t]*//;s/[ \t]*$//')
if [[ "$PATCH_FILE" == *"Automated-domain-substitution"* ]]; then
continue
fi
if [[ -z "$PATCH_FILE" ]]; then
PATCH_FILE=00$(git -C ~/chromium/src/ show -s $patch | head -n 5 | tail -n 1 | xargs | tr " " - | tr [:punct:] -).patch
fi
echo $PATCH_FILE >>~/bromite/build/patches-new/patch-list
done
tac ~/bromite/build/patches-new/patch-list >~/bromite/build/patches-new/zz-patch-list.txt
rm ~/bromite/build/patches-new/patch-list

View File

@@ -16,25 +16,38 @@ fi
git -C ~/chromium/src/ format-patch -1 --keep-subject --stdout --full-index --zero-commit --no-signature $patch >~/bromite/build/patches-new/$PATCH_FILE
echo " exported"
CHANGE_REF=""
while read line; do
#echo $line
if [[ "$line" == index* ]]; then
next_line=$(grep -A1 "${line}" ~/bromite/build/patches-new/$PATCH_FILE | tail -n 1 )
if [[ "$next_line" != "GIT binary patch" ]]; then
sed -i "/^$line/d" ~/bromite/build/patches-new/$PATCH_FILE
for i in {1..5}
do
if [[ "$line" == index* ]]; then
read next_line
if [[ "$next_line" != "GIT binary patch" ]]; then
CHANGE_REF=${CHANGE_REF}"/^${line}/d;"
break
else
line=$next_line
continue
fi
else
break
fi
fi
done
done <~/bromite/build/patches-new/$PATCH_FILE
if [ "$CHANGE_REF" ]
then
sed -i "$CHANGE_REF" ~/bromite/build/patches-new/$PATCH_FILE
fi
sed -i '/^From 0000000000000000000000000000000000000000/d' ~/bromite/build/patches-new/$PATCH_FILE
sed -i '/^FILE:/d' ~/bromite/build/patches-new/$PATCH_FILE
sed -i '/^ mode change/d' ~/bromite/build/patches-new/$PATCH_FILE
sed -i '/^old mode /d' ~/bromite/build/patches-new/$PATCH_FILE
sed -i '/^new mode /d' ~/bromite/build/patches-new/$PATCH_FILE
echo "-- " >> ~/bromite/build/patches-new/$PATCH_FILE
echo "2.20.1" >> ~/bromite/build/patches-new/$PATCH_FILE
echo "" >> ~/bromite/build/patches-new/$PATCH_FILE
echo "--" >> ~/bromite/build/patches-new/$PATCH_FILE
echo "2.25.1" >> ~/bromite/build/patches-new/$PATCH_FILE
#echo "" >> ~/bromite/build/patches-new/$PATCH_FILE
echo " done."
echo ""

View File

@@ -1,7 +1,6 @@
declare_args() {
_is_debug_build = ""
target_cpu = "x64"
}
_is_debug_build = getenv("TARGET_ISDEBUG")
@@ -14,16 +13,36 @@ if(getenv("TARGET_CPU") != "") {
# print("Target " + target_cpu)
enable_kythe_annotations = true
clang_use_chrome_plugins = false
# clang_use_chrome_plugins = false
if (target_os == "android") {
chrome_public_manifest_package = "org.bromite.bromite.dev"
}
if(_is_debug_build == "true") {
# print("Debug build on")
is_debug = true
is_official_build = false
dcheck_always_on = true
symbol_level = 1
if (target_os == "win") {
symbol_level = 0
use_large_pdbs = true
} else {
symbol_level = 1
}
strip_debug_info = false
generate_linker_map = false
# since is_cfi require use_thin_lto
# but not work in debug mode
is_cfi = false # disable it
use_cfi_cast = false # disable it
} else {
generate_linker_map = true
if (target_os == "android") {
generate_linker_map = true
}
if (target_os == "win") {
is_cfi = false # disable it
use_cfi_cast = false # disable it
}
}

View File

@@ -34,8 +34,8 @@ vpython -vpython-spec .vpython -vpython-root $VPYTHON_VIRTUALENV_ROOT -vpython-l
vpython3 -vpython-spec .vpython3 -vpython-root $VPYTHON_VIRTUALENV_ROOT -vpython-log-level debug -vpython-tool install
echo -e ${RED} -------- download x86_64 android image ${NC}
echo -e "\$ParanoidMode CheckIntegrity\n\nchromium/third_party/android_sdk/public/avds/android-31/google_apis/x86_64 Ur_zl6_BRKRkf_9X3SMZ3eH2auoOyJ2kLslpTZZwi3gC" | .cipd_client ensure -ensure-file - -root $WORKSPACE/chromium/src/.android
echo -e "\$ParanoidMode CheckIntegrity\n\nchromium/third_party/android_sdk/public/emulator gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC\nchromium/third_party/android_sdk/public/system-images/android-31/google_apis/x86_64 R6Jh5_P21Euu-kdb11zcNjdJKN4vV1mdQTb8t4gph4IC" | .cipd_client ensure -ensure-file - -root $WORKSPACE/chromium/src/.emulator_sdk
#echo -e "\$ParanoidMode CheckIntegrity\n\nchromium/third_party/android_sdk/public/avds/android-31/google_apis/x86_64 Ur_zl6_BRKRkf_9X3SMZ3eH2auoOyJ2kLslpTZZwi3gC" | .cipd_client ensure -ensure-file - -root $WORKSPACE/chromium/src/.android
#echo -e "\$ParanoidMode CheckIntegrity\n\nchromium/third_party/android_sdk/public/emulator gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC\nchromium/third_party/android_sdk/public/system-images/android-31/google_apis/x86_64 R6Jh5_P21Euu-kdb11zcNjdJKN4vV1mdQTb8t4gph4IC" | .cipd_client ensure -ensure-file - -root $WORKSPACE/chromium/src/.emulator_sdk
echo -e ${RED} -------- download kythe resources ${NC}
wget https://chromium.googlesource.com/chromium/tools/build/+/main/recipes/recipe_modules/codesearch/resources/add_kythe_metadata.py?format=TEXT -O ~/add_kythe_metadata.py.base64

View File

@@ -10,6 +10,7 @@ cd chromium/src
echo -e ${RED} ------- apply patchs ${NC}
for file in $(cat ../../bromite/build/bromite_patches_list.txt) ; do
if [[ "$file" == *".patch" ]]; then
#if [[ "$file" == *"Automated-domain-substitution"* ]]; then
# echo -e ${RED} " -> Excluding $file" ${NC}
# continue
@@ -17,7 +18,7 @@ for file in $(cat ../../bromite/build/bromite_patches_list.txt) ; do
echo -e ${RED} " -> Apply $file" ${NC}
REPL="0,/^---/s//FILE:"$file"\n---/"
REPL="0,/^---/s//FILE:"$(basename $file)"\n---/"
cat ../../bromite/build/patches/$file | sed $REPL | git am
if [ $? -ne 0 ]
@@ -27,4 +28,6 @@ for file in $(cat ../../bromite/build/bromite_patches_list.txt) ; do
fi
echo " "
fi
done

View File

@@ -16,13 +16,14 @@ RUN dpkg --add-architecture i386
RUN apt-get update &&\
DEBIAN_FRONTEND=noninteractive \
apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils python sed tzdata build-essential lib32gcc-9-dev
apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils python sed tzdata build-essential lib32gcc-9-dev g++-multilib
ENV user lg
RUN useradd -m -d /home/${user} ${user} && \
chown -R ${user} /home/${user} && \
adduser ${user} sudo && \
chmod 4755 /usr/bin/sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER ${user}
@@ -31,18 +32,13 @@ USER ${user}
WORKDIR /home/${user}
RUN wget https://chromium.googlesource.com/chromium/src/+/refs/tags/$VERSION/build/install-build-deps.sh?format=TEXT -O install-build-deps.sh.base64 \
RUN wget https://raw.githubusercontent.com/chromium/chromium/$VERSION/build/install-build-deps.sh \
&& \
wget https://chromium.googlesource.com/chromium/src/+/refs/tags/$VERSION/build/install-build-deps-android.sh?format=TEXT -O install-build-deps-android.sh.base64 \
wget https://raw.githubusercontent.com/chromium/chromium/$VERSION/build/install-build-deps-android.sh \
&& \
base64 -d install-build-deps.sh.base64 >install-build-deps.sh && \
base64 -d install-build-deps-android.sh.base64 >install-build-deps-android.sh && \
sed -i 's/snapcraft/wget/' install-build-deps.sh && \
chmod +x ./install-build-deps.sh && \
chmod +x ./install-build-deps-android.sh && \
sudo ./install-build-deps.sh --no-prompt --lib32 --no-chromeos-fonts && \
sudo ./install-build-deps-android.sh --no-prompt

View File

@@ -1,57 +1,60 @@
diff --git a/gclient_scm.py b/gclient_scm.py
index f58c07a8..c8409726 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -1012,28 +1012,35 @@ class GitWrapper(SCMWrapper):
gclient_utils.safe_makedirs(parent_dir)
template_dir = None
+ use_fetch = False
@@ -1137,31 +1137,29 @@ class GitWrapper(SCMWrapper):
clone_cmd.append(url)
template_dir = None
+ use_fetch = False
+
+ tmp_dir = tempfile.mkdtemp(
+ prefix='_gclient_%s_' % os.path.basename(self.checkout_path),
+ dir=parent_dir)
+ tmp_dir = tempfile.mkdtemp(
+ prefix='_gclient_%s_' % os.path.basename(self.checkout_path),
+ dir=parent_dir)
+
if hasattr(options, 'no_history') and options.no_history:
if gclient_utils.IsGitSha(revision):
# In the case of a subproject, the pinned sha is not necessarily the
# head of the remote branch (so we can't just use --depth=N). Instead,
# we tell git to fetch all the remote objects from SHA..HEAD by means of
# a template git dir which has a 'shallow' file pointing to the sha.
- template_dir = tempfile.mkdtemp(
- prefix='_gclient_gittmp_%s' % os.path.basename(self.checkout_path),
- dir=parent_dir)
- self._Run(['init', '--bare', template_dir], options, cwd=self._root_dir)
- with open(os.path.join(template_dir, 'shallow'), 'w') as template_file:
- template_file.write(revision)
- clone_cmd.append('--template=' + template_dir)
+ self._Run(['init', tmp_dir], options, cwd=self._root_dir)
if hasattr(options, 'no_history') and options.no_history:
if gclient_utils.IsGitSha(revision):
- # In the case of a subproject, the pinned sha is not necessarily the
- # head of the remote branch (so we can't just use --depth=N). Instead,
- # we tell git to fetch all the remote objects from SHA..HEAD by means
- # of a template git dir which has a 'shallow' file pointing to the
- # sha.
- template_dir = tempfile.mkdtemp(prefix='_gclient_gittmp_%s' %
- os.path.basename(self.checkout_path),
- dir=parent_dir)
- self._Run(['init', '--bare', template_dir],
- options,
- cwd=self._root_dir)
- with open(os.path.join(template_dir, 'shallow'),
- 'w') as template_file:
- template_file.write(revision)
- clone_cmd.append('--template=' + template_dir)
+ self._Run(['init', tmp_dir], options, cwd=self._root_dir)
+
+ self._Run(['-C', tmp_dir, 'remote', 'add', 'origin', url], options, cwd=self._root_dir)
+ self._Run(['-C', tmp_dir, 'remote', 'add', 'origin', url], options, cwd=self._root_dir)
+
+ clone_cmd = cfg + ['-C', tmp_dir, 'fetch', '--progress']
+ clone_cmd.append('--depth=1')
+ clone_cmd.append(url)
+ clone_cmd.append(revision)
+ use_fetch = True
else:
# Otherwise, we're just interested in the HEAD. Just use --depth.
clone_cmd.append('--depth=1')
- tmp_dir = tempfile.mkdtemp(
- prefix='_gclient_%s_' % os.path.basename(self.checkout_path),
- dir=parent_dir)
try:
+ clone_cmd = cfg + ['-C', tmp_dir, 'fetch', '--progress']
+ clone_cmd.append('--depth=1')
+ clone_cmd.append(url)
+ clone_cmd.append(revision)
+ use_fetch = True
else:
# Otherwise, we're just interested in the HEAD. Just use --depth.
clone_cmd.append('--depth=1')
- tmp_dir = tempfile.mkdtemp(prefix='_gclient_%s_' %
- os.path.basename(self.checkout_path),
- dir=parent_dir)
- clone_cmd.append(tmp_dir)
+ if use_fetch == False:
+ clone_cmd.append(tmp_dir)
+
if self.print_outbuf:
print_stdout = True
filter_fn = None
@@ -1328,6 +1335,9 @@ class GitWrapper(SCMWrapper):
try:
self._Run(clone_cmd,
@@ -1452,6 +1450,9 @@ class GitWrapper(SCMWrapper):
if refspec:
fetch_cmd.append(refspec)
+ if hasattr(options, 'no_history') and options.no_history:
+ fetch_cmd.append('--depth=1')
+

View File

@@ -22,21 +22,26 @@ echo -e ${RED} -------- download chromium repo ${NC}
mkdir ./chromium
cd ./chromium
export DEPOT_TOOLS_UPDATE=0
gclient root
mkdir ./src
cd ./src
git init
git remote add origin https://chromium.googlesource.com/chromium/src.git
#CHR_SOURCE=https://chromium.googlesource.com/chromium/src.git
CHR_SOURCE=https://github.com/chromium/chromium.git
git fetch --depth 2 https://chromium.googlesource.com/chromium/src.git +refs/tags/$VERSION:chromium_$VERSION
git init
git remote add origin $CHR_SOURCE
git fetch --depth 2 $CHR_SOURCE +refs/tags/$VERSION:chromium_$VERSION
git checkout $VERSION
VERSION_SHA=$( git show-ref -s $VERSION | head -n1 )
echo >../.gclient "solutions = ["
echo >>../.gclient " { \"name\" : 'src',"
echo >>../.gclient " \"url\" : 'https://chromium.googlesource.com/chromium/src.git@$VERSION_SHA',"
echo >>../.gclient " \"url\" : '$CHR_SOURCE@$VERSION_SHA',"
echo >>../.gclient " \"deps_file\" : 'DEPS',"
echo >>../.gclient " \"managed\" : True,"
echo >>../.gclient " \"custom_deps\" : {"
@@ -68,3 +73,16 @@ gclient runhooks
echo -e ${RED} -------- download objdump ${NC}
tools/clang/scripts/update.py --package=objdump
echo -e ${RED} -------- build rc ${NC}
cd build/toolchain/win/rc
git clone -q https://github.com/nico/hack
cd hack/res
../../../../../../third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ \
-std=c++14 rc.cc -Wall \
-Wno-c++11-narrowing -O2 -fno-rtti -fno-exceptions -DNDEBUG \
-o rc-linux64 -fuse-ld=lld -target x86_64-unknown-linux-gnu
cd ../../../../../../
cp build/toolchain/win/rc/hack/res/rc-linux64 build/toolchain/win/rc/linux64/rc

View File

@@ -77,7 +77,7 @@ RUN useradd -m runner \
# Build args
ARG TARGETPLATFORM=amd64
ARG RUNNER_VERSION=2.302.4
ARG RUNNER_VERSION=2.302.5
WORKDIR /runner
# Runner download supports amd64 as x64

View File

@@ -37,6 +37,7 @@ do
-v $GHRUNNERHOME/tmp/forward-proxy:/tmp/forward-proxy:rw \
-v $GHRUNNERHOME/redis:/redis:rw \
-v $GHRUNNERHOME/var/run:/var/run \
-v /casefold:/win_sdk \
--network none \
--device=/dev/kvm \
uazo/github-runner

View File

@@ -48,7 +48,9 @@ echo "Registering runner ${runner_id}"
--url "${registration_url}" \
--allowedauthorslist "${ALLOWEDAUTHORSLIST}" \
--unattended \
--replace
--replace \
--disableupdate \
--ephemeral
trap 'remove_runner; exit 130' SIGINT
trap 'remove_runner; exit 143' SIGTERM

View File

@@ -4,6 +4,13 @@
.githubusercontent.com
.ubuntu.com
# for .net
.dot.net
dotnet.microsoft.com
dotnetcli.azureedge.net
aka.ms
packages.microsoft.com
# for buildeps
#chromium.googlesource.com