From 044746d8d92944aa65bb5057f5f5353a7961abba Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 30 Nov 2022 18:29:31 +1100 Subject: [PATCH] remove more akpm/mmotm stuff --- check_left | 5 -- do_clean | 2 +- fetch_trees | 19 -------- import-akpm | 108 ------------------------------------------ merge_akpm | 133 ---------------------------------------------------- to_ozlabs | 1 - 6 files changed, 1 insertion(+), 267 deletions(-) delete mode 100755 import-akpm delete mode 100755 merge_akpm diff --git a/check_left b/check_left index 20601c8..524d979 100755 --- a/check_left +++ b/check_left @@ -11,11 +11,6 @@ total=0 for h in $heads; do base=origin/master - case "$h" in - akpm/*) - base=akpm/master-base - ;; - esac # echo "$h" # mb=$(git merge-base origin/master "$h") # rh=$(git rev-parse "$h") diff --git a/do_clean b/do_clean index 054edc4..4d11166 100755 --- a/do_clean +++ b/do_clean @@ -1,7 +1,7 @@ #!/bin/bash RM_FILES="last_msg.bak merge.debug merge.log" -OTHER_RM_FILES="mails/* akpm-import.log" +OTHER_RM_FILES="mails/*" MV_FILES="summ" # check for files that should exist before we delete anything diff --git a/fetch_trees b/fetch_trees index d7139e1..f93d3d3 100755 --- a/fetch_trees +++ b/fetch_trees @@ -39,25 +39,6 @@ fetch_git() git fetch "$1" } -fetch_mmotm() -( - if ! cd ../mmotm; then - printf 'Cannot chdir to ../mmotm\n' 1>&2 - return - fi - if ! rsync -4 -az --partial --exclude '.git*' \ - --exclude broken-out.tar.gz --delete \ - gandalf.ozlabs.org::akpm/mmotm/. .; then - git reset --hard - printf 'Fetcing mmotm failed\n' 1>&2 - return - fi - git add -A . - if [ "$(git status --porcelain)" ]; then - git commit -m "$(head -n 1 .DATE)" - fi -) - trees="$*" if ! [ "$trees" ]; then trees=$(awk -F '\t' '/^[^#]/ && $2 != "branch" { print $3 }' "$CTRL_FILE") diff --git a/import-akpm b/import-akpm deleted file mode 100755 index 235ab70..0000000 --- a/import-akpm +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -export LOG_FILE=../akpm-import.log - -# shellcheck source=./common.sh -. "$(dirname "$0")/common.sh" '' - -log() -{ - echo "$@" | tee -a $LOG_FILE -} - -execute() -{ - log '$' "$@" - "$@" 2>&1 | tee -a $LOG_FILE - return ${PIPESTATUS[0]} -} - -mmotm="../mmotm" -sfile="$mmotm/series" -cpwd=$(pwd) - -[ -f "$mmotm/broken-out/origin.patch" ] && - base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch") -[ "$base" ] || { - base=$(tail -n 1 "$mmotm/.DATE") - base=${base#v} - base="v${base}" -} -nbase=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/linux-next.patch") -git rev-parse --verify "$base" >/dev/null || { - log "Unknown origin BASE $base" - exit 1 -} -git rev-parse --verify "$nbase" >/dev/null || { - log "Unknown linux-next BASE $nbase" - exit 1 -} -db=$(git describe "$base") -dnb=$(git describe --contains "$nbase") -log "Importing akpm based on $db/$dnb" - -[ -d "../tmp-akpm" ] && { - log "akpm import directory already exists" - exit 1 -} - -execute git worktree add -b tmp-akpm/master ../tmp-akpm "$db" || - $SHELL -i || exit - -log '$' cd ../tmp-akpm -cd ../tmp-akpm -execute git branch tmp-akpm/current-base || - $SHELL -i || exit - -sed_exp=' -s/\r$// -/NEXT_PATCHES_START/,/NEXT_PATCHES_END/{ - s/[ \t]*#.*$// - /^[ \t]*$/!p -} -/^linux-next.patch/p' -patches=$(sed -n "$sed_exp" "$sfile") - -for f in $patches; do - case "$f" in - origin.patch) - ;; - linux-next.patch) - execute git branch tmp-akpm/current || - $SHELL -i || exit - execute git merge --no-edit --no-stat "$dnb" || { - check_unmerged_files akpm-current - - git diff 2>&1 | grep -E -q '<<<<<|^\*' && { - $SHELL -i || exit - } - GIT_EDITOR=: execute git commit -v -a - } - [ -f "../merge-fixes/akpm-current" ] && { - for p in $(cat "../merge-fixes/akpm-current"); do - $(dirname $0)/merge_fix -n "$p" || - $SHELL -i || exit - done - } - execute git branch tmp-akpm/master-base || - $SHELL -i || exit - ;; - *) - execute git am -s --patch-format=mbox "$mmotm/broken-out/$f" || - $SHELL -i || exit - ;; - esac -done - -log '$' cd $cpwd -cd $cpwd - -execute rm -rf ../tmp-akpm -execute git worktree prune - -for i in akpm/current akpm/current-base akpm/master akpm/master-base; do - execute git branch -f $i tmp-$i - execute git branch -D tmp-$i -done - -exit 0 diff --git a/merge_akpm b/merge_akpm deleted file mode 100755 index e8163c8..0000000 --- a/merge_akpm +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash - -today="$(date '+%Y%m%d')" - -no_build=false - -[ "$1" = "-n" ] && { - shift - no_build=true -} - -. "$(dirname $0)/common.sh" - -log() -{ - echo "$@" | tee -a $LOG_FILE -} - -execute() -{ - log "$" $@ - $@ 2>&1 | tee -a $LOG_FILE - return ${PIPESTATUS[0]} -} - -cpwd=../next - -#git branch -f akpm-current/current akpm/current - -git branch -f akpm/base HEAD - -#old_head=$(git rev-parse HEAD) -#hlog=$(git log -1 --oneline akpm-current/current) 2>/dev/null -#log Merging akpm-current/current "($hlog)" -#execute git merge --no-ff akpm-current/current || { -# echo Merge failed 1>&2 -# echo $h >>../merge.debug -# git diff >>../merge.debug 2>&1 -# -# check_unmerged_files akpm-current -# -# git diff 2>&1 | egrep -q '<<<<<|^\*' && { -# bash -i || exit -# } -# GIT_EDITOR=: execute git commit -v -a -# execute git diff -M --stat --summary 'HEAD^..' -#} -#printf "%s\t%s\n" akpm-current $(git show-ref --hash akpm-current/current) >> $SHA1_FILE -# -#[ -f "../merge-fixes/akpm-current" ] && { -# for p in $(cat "../merge-fixes/akpm-current"); do -# $(dirname $0)/merge_fix -n "$p" || { -# bash -i || exit -# } -# done -#} -# -#new_head=$(git rev-parse HEAD) -# -#$no_build || -# [ "$old_head" = "$new_head" ] || -# [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || { -# -# git push -f "${build_host}${build_host:+:}${build_dir}" master:refs/heads/next || { -# echo git push failed 1>&2 -# bash -i || exit -# } -# "$bin_dir/do_build" akpm-current || { -# echo Build failed 1>&2 -# bash -i || exit -# } -#} - -execute git clone -s -l -n -q . ../rebase-tmp || { - echo Clone failed 1>&2 - bash -i || exit -} -log '$' cd ../rebase-tmp -cd ../rebase-tmp -execute git checkout -b akpm remotes/origin/akpm/master || { - echo Checkout of remotes/origin/akpm/master failed 1>&2 - bash -i || exit -} -execute git rebase --onto master remotes/origin/akpm/master-base || { - echo Rebase failed 1>&2 - bash -i || exit -} -echo "fix up?" -linux-next-notify "Waiting for akpm fix up" -bash -i -log '$' cd $cpwd -cd $cpwd -execute git fetch -f ../rebase-tmp akpm:akpm/master || { - echo Fetch of akpm/master failed 1>&2 - bash -i || exit -} -execute rm -rf ../rebase-tmp - -git branch -f akpm/master-base HEAD - -old_head=$(git rev-parse HEAD) -log Merging akpm/master '('$(git log -1 --oneline akpm/master)')' -execute git merge --no-ff akpm/master || { - echo Merge failed 1>&2 - bash -i || exit -} -printf "%s\t\t%s\n" akpm $(git show-ref --hash akpm/master) >> $SHA1_FILE - -[ -f "../merge-fixes/akpm" ] && { - for p in $(cat "../merge-fixes/akpm"); do - $(dirname $0)/merge_fix -n "$p" || { - bash -i || exit - } - done -} - -new_head=$(git rev-parse HEAD) - -$no_build || - [ "$old_head" = "$new_head" ] || - [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || { - - git push -f "${build_host}${build_host:+:}${build_dir}" master:refs/heads/next || { - echo git push failed 1>&2 - bash -i || exit - } - "$bin_dir/do_build" akpm || { - echo Build failed 1>&2 - bash -i || exit - } -} - -exit 0 diff --git a/to_ozlabs b/to_ozlabs index 9c8dd42..7822c68 100755 --- a/to_ozlabs +++ b/to_ozlabs @@ -25,7 +25,6 @@ done - gitk.cache - /merge.debug - /merge.log -- /akpm-import.log - /summ - /patch-*-next-2* - /next-2*/ -- 2.39.5