add proxy support

This commit is contained in:
Your Name 2021-07-31 12:15:32 +00:00
parent 532a0475bf
commit e1cae5872e
7 changed files with 113 additions and 15 deletions

View File

@ -37,26 +37,26 @@ for current_file in $(cat $PATCH_LIST); do
echo "Adding $current_file" echo "Adding $current_file"
echo "Executing bash ~/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH" echo "Executing bash ~/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH"
bash ~/buildtools/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH bash ~/bromite-buildtools/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH
echo "Press return" #echo "Press return"
read -n 1 #read -n 1
elif [[ $current_file =~ ^1.* ]]; then elif [[ $current_file =~ ^1.* ]]; then
echo "Using new path $current_file" echo "Using new path $current_file"
bash ~/buildtools/apply-single-patch.sh $PATCH_NEW_PATH/${current_file:1} $PATCH_NEW_PATH bash ~/bromite-buildtools/apply-single-patch.sh $PATCH_NEW_PATH/${current_file:1} $PATCH_NEW_PATH
echo "" echo ""
LAST_COMMIT=$(git rev-parse HEAD) LAST_COMMIT=$(git rev-parse HEAD)
echo "Last Commit " $LAST_COMMIT echo "Last Commit " $LAST_COMMIT
bash ~/buildtools/export-single-patch.sh $LAST_COMMIT bash ~/bromite-buildtools/export-single-patch.sh $LAST_COMMIT
else else
bash ~/buildtools/apply-single-patch.sh $PATCH_OLD_PATH/$current_file $PATCH_NEW_PATH bash ~/bromite-buildtools/apply-single-patch.sh $PATCH_OLD_PATH/$current_file $PATCH_NEW_PATH
echo $current_file >>$DESTINATION echo $current_file >>$DESTINATION
echo $PATCH_FILE echo $PATCH_FILE
@ -64,7 +64,7 @@ for current_file in $(cat $PATCH_LIST); do
echo "" echo ""
LAST_COMMIT=$(git rev-parse HEAD) LAST_COMMIT=$(git rev-parse HEAD)
echo "Last Commit " $LAST_COMMIT echo "Last Commit " $LAST_COMMIT
bash ~/buildtools/export-single-patch.sh $LAST_COMMIT bash ~/bromite-buildtools/export-single-patch.sh $LAST_COMMIT
#cp -r ~/bromite/build/patches-new/* ~/br2/bromite/build/patches/ #cp -r ~/bromite/build/patches-new/* ~/br2/bromite/build/patches/
#git -C ~/br2/bromite/ add . #git -C ~/br2/bromite/ add .

View File

@ -14,12 +14,16 @@ echo "Applying patch $PATCH" | tee -a ${LOG_FILE}
git apply --reject --whitespace=fix $PATCH && OK=1 git apply --reject --whitespace=fix $PATCH && OK=1
if [[ OK -eq 0 ]]; then if [[ OK -eq 0 ]]; then
for file in $(find . -name *.rej); do OK=1
echo " -> Check $file" | tee -a ${LOG_FILE}; for file in $(grep '+++ b/' $PATCH | sed -e 's#+++ [ab]/##'); do
wiggle --no-ignore --replace ${file::-4} $file && rm $file && rm ${file::-4}.porig && echo " OK"; test -f $file || OK=0
done
for file in $(find . -name *.rej); do
echo " -> Check $file" | tee -a ${LOG_FILE};
wiggle --no-ignore --replace ${file::-4} $file && rm $file && rm ${file::-4}.porig && echo " OK" || OK=0
done done
OK=1
for file in $(find . -name *.rej); do for file in $(find . -name *.rej); do
echo "---Found: $file" | tee -a ${LOG_FILE}; echo "---Found: $file" | tee -a ${LOG_FILE};
git add ${file::-4} git add ${file::-4}
@ -64,5 +68,5 @@ if [[ OK -eq 0 ]]; then
fi fi
if [[ DOEXPORT -eq 1 ]]; then if [[ DOEXPORT -eq 1 ]]; then
bash ~/buildtools/create-from-patch.sh $PATCH $2 bash ~/bromite-buildtools/create-from-patch.sh $PATCH $2
fi fi

41
clone-src.sh Normal file
View File

@ -0,0 +1,41 @@
#!/bin/bash
VERSION=$(cat ~/bromite/build/RELEASE)
CURRENT_RELEASE=$(git -C ~/chromium/src/ rev-parse --verify refs/tags/$VERSION)
for file in $(git -C ~/chromium/src/ show --pretty="" --name-only $CURRENT_RELEASE...HEAD); do
DIRNAME=$(dirname $file)
mkdir -p ~/mytests/$DIRNAME
git -C ~/chromium/src/ show $CURRENT_RELEASE:$file > ~/mytests/$file
done
git -C ~/mytests/ add .
git -C ~/mytests/ commit -m "$VERSION"
ALLPATCHS_E=$(git -C ~/chromium/src/ rev-list --reverse $CURRENT_RELEASE...HEAD)
for patch in $ALLPATCHS_E; do
for file in $(git -C ~/chromium/src/ show --pretty="" --name-only $patch); do
DIRNAME=$(dirname $file)
mkdir -p ~/mytests/$DIRNAME
#cp ~/chromium/src/$file ~/mytests/$file
#echo $file
OK=0
git -C ~/chromium/src/ show $patch:$file > ~/mytests/$file && OK=1
if [[ OK -eq 0 ]]; then
echo " Removing ~/mytests/$file"
rm ~/mytests/$file
fi
done
#echo $ALLFILES_E
#read -n 1
MESSAGE=$(git -C ~/chromium/src/ log --pretty=format:%s -n 1 $patch)
git -C ~/mytests/ add .
git -C ~/mytests/ commit -m "$MESSAGE"
#read -n 1
done

View File

@ -40,11 +40,17 @@ echo "FILE:$(basename $PATCH)" >>$PATCH_FILE
echo "---" >>$PATCH_FILE echo "---" >>$PATCH_FILE
echo "$CONTENT" >>$PATCH_FILE echo "$CONTENT" >>$PATCH_FILE
#echo press return echo press return
#read -n 1 read -n 1
git reset --hard git reset --hard
git clean -f -d git clean -f -d
echo " Applying new patch" echo " Applying new patch"
git am $PATCH_FILE OK=1
git am $PATCH_FILE || OK=0
if [[ OK -eq 0 ]]; then
echo "---> Failed to apply. Press return"
read -n 1
fi

View File

@ -25,6 +25,6 @@ for patch in $ALLPATCHS_E; do
read -n 1 read -n 1
fi fi
bash ~/buildtools/export-single-patch.sh $patch $PATCH_FILE bash ~/bromite-buildtools/export-single-patch.sh $patch $PATCH_FILE
done done

View File

@ -0,0 +1 @@
REMOTEEXEC_ADDR=<ip-address>:50051

View File

@ -1,6 +1,38 @@
version: "3.9" version: "3.9"
services: services:
runner-proxy:
image: uazo/privoxy
networks:
- bridge-ext
env_file:
- buildstack.env
volumes:
- /tmp/proxy:/tmp/proxy:rw
- /tmp/forward-proxy:/tmp/forward-proxy:rw
deploy:
mode: global
placement:
max_replicas_per_node: 1
constraints: [node.labels.githubrunner == 1]
# githubrunner:
# image: uazo/github-runner
# runtime: sysbox-runc
# depends_on:
# - runner-proxy
# networks:
# - bridge-int
# volumes:
# - /tmp/proxy:/tmp/proxy:rw
# - /tmp/forward-proxy:/tmp/forward-proxy:rw
# - /tmp/docker-inner:/var/lib/docker:rw
# deploy:
# mode: global
# placement:
# max_replicas_per_node: 1
# constraints: [node.labels.githubrunner == 1]
buildboxcasd: buildboxcasd:
image: uazo/buildboxcasd image: uazo/buildboxcasd
networks: networks:
@ -28,6 +60,20 @@ services:
max_replicas_per_node: 8 max_replicas_per_node: 8
constraints: [node.labels.gomarunners == 8] constraints: [node.labels.gomarunners == 8]
buildboxrunner-6:
image: uazo/buildboxrunner
networks:
- bridge-int
depends_on:
- buildboxcasd
volumes:
- /tmp/cache:/wrk-cache:rw
deploy:
replicas: 20
placement:
max_replicas_per_node: 6
constraints: [node.labels.gomarunners == 6]
buildboxrunner-4: buildboxrunner-4:
image: uazo/buildboxrunner image: uazo/buildboxrunner
networks: networks: