A version of the conversion using @gcc.gnu.org addresses is now available:
git clone git+ssh://gcc.gnu.org/home/gccadmin/wwwdocs-test2.git
My current versions of the conversion scripts / proposed hook are
attached. The rest of the description of the first test conversion still
applies.
--
Joseph S. Myers
j...@polyomino.org.uk
#!/bin/bash
set -e
TOP=$(cd $(dirname "$0") && pwd)
REPO=$TOP/wwwdocs.git
mkdir $REPO
cd $REPO
git init --bare --shared
DOWNLOAD=$TOP/download
cd "$DOWNLOAD/cvs-fast-export"
make -j cvs-fast-export
grep -a = $DOWNLOAD/gcc-conversion/gcc.map | sed -e 's/^\([^=]*\) = \([^<]*\)
<.*/\1 = \2 <\1...@gcc.gnu.org>/' > $TOP/gcc.map
# dje specially handled for GCC conversion because of ambiguity with
# gcc2 repository. dimitar, shorne postdate GCC conversion map; not
# needed once that is updated. Others not needed in GCC conversion
# map, as only committed to wwwdocs not to main sources repository.
cat >> $TOP/gcc.map <<EOF
dje = David Edelsohn <d...@gcc.gnu.org>
dimitar = Dimitar Dimitrov <dimi...@gcc.gnu.org>
shorne = Stafford Horne <sho...@gcc.gnu.org>
angela = Angela Marie Thomas <ang...@gcc.gnu.org>
brads = Bradley Schatz <br...@gcc.gnu.org>
gumby = David Henkel-Wallace <gu...@gcc.gnu.org>
kingdon = Jim Kingdon <king...@gcc.gnu.org>
htdigid = htdigid automatic commit <htdi...@gcc.gnu.org>
www = www user <w...@gcc.gnu.org>
EOF
cd "$DOWNLOAD/wwwdocs"
find . -name '*,v' | sort | ../cvs-fast-export/cvs-fast-export -A $TOP/gcc.map
| (cd "$REPO" && git fast-import)
cd "$REPO"
# CVS branches and tags are accidents from whole-CVS-repository
# branching / tagging, remove.
for ref in $(git for-each-ref --format='%(refname)'); do
if [ "$ref" != "refs/heads/master" ]; then
echo "Removing $ref"
git update-ref -d "$ref"
fi
done
git gc --aggressive --prune=all
#!/bin/bash
set -e
TOP=$(cd $(dirname "$0") && pwd)
DOWNLOAD=$TOP/download
mkdir "$DOWNLOAD"
cd "$DOWNLOAD"
git clone https://gitlab.com/esr/cvs-fast-export.git
git clone https://gitlab.com/esr/gcc-conversion.git
rsync -a gcc.gnu.org::gcc-cvs/wwwdocs .
#!/bin/bash
# The post-receive hook receives, on standard input, a series of lines
# of the form:
#
# <old-value> SP <new-value> SP <ref-name> LF
#
# describing ref updates that have just occurred. In the case of this
# repository, only updates to refs/heads/master are expected, and only
# such updates should result in automatic website updates.
TOP_DIR=/www/gcc
exec >> "$TOP_DIR/updatelog" 2>&1
export QMAILHOST=gcc.gnu.org
tmp=$(mktemp)
cat > "$tmp"
# Send commit emails. Appropriate config values should be set in the
# git repository for this.
/sourceware/libre/infra/bin/post-receive-email < "$tmp"
# Update web page checkouts, if applicable.
while read old_value new_value ref_name; do
if [ "$ref_name" != "refs/heads/master" ]; then
continue
fi
unset GIT_DIR
unset GIT_WORK_TREE
cd "$TOP_DIR/wwwdocs-checkout"
git pull --quiet
# $TOP_DIR/bin, $TOP_DIR/cgi-bin and $TOP_DIR/htdocs-preformatted
# should be symlinks into wwwdocs-checkout.
git diff --name-only "$old_value..$new_value" | while read file; do
case "$file" in
(htdocs/*)
;;
(*)
continue
;;
esac
dir="${file%/*}"
if ! [ -d "$TOP_DIR/$dir" ]; then
mkdir "$TOP_DIR/$dir"
chmod 2775 "$TOP_DIR/$dir"
fi
if [ -f "$file" ]; then
/www/gcc/bin/preprocess "${file#htdocs/}"
fi
done
done < "$tmp"
rm "$tmp"