From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126638 invoked by alias); 9 Oct 2019 00:27:48 -0000 Mailing-List: contact overseers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: overseers-owner@sourceware.org Received: (qmail 126614 invoked by uid 89); 9 Oct 2019 00:27:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,HK_OBFDOM,KAM_SHORT autolearn=ham version=3.3.1 spammy=watching, automated, gcc-cvs-wwwdocs, gcccvswwwdocs X-HELO: esa2.mentor.iphmx.com Received: from esa2.mentor.iphmx.com (HELO esa2.mentor.iphmx.com) (68.232.141.98) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2019 00:27:46 +0000 IronPort-SDR: f5sjmVDN9lgy3VbWFhxe8a1u9R+V6KTFIrJVy29uBlekRnXMkME1GJFb/LnkZSkiRUNz4dJxTG cIC5rFMt0XMac/hH230zWOuLEE1SMyC0MMzKdrYtR3ztDXsFtVgdx0lbl/aYbaSp8y4EkYQtuP N8xAULqqqX73+pnzTbPtya4RJDjOt1bfV97W7UcZkUQK1svdS43qbL0v5mMiuieZ+lDwULuWu3 6VgZQt1UPI4n08FcUy9O7zGjj3k2DlctgQ0IrS8Fi0+GVNl+nejii9XQ2OVNLbsA9/kKAp3x9j uIo= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 08 Oct 2019 16:27:44 -0800 IronPort-SDR: yRrnE/Vt+Dd4ooQnZpGKvELSvuvqqz+83KW6X/cxVnGX4vKT4oW0r9Wh2NWKONSSf+epsBG9bn 9gzEinF30NoH+iTn0069xSJ52ZGF2xDfDvWv/PFlVO5EOE8KOVMc/J8Er2MmiOQiJhJ1wUNel+ oCjRYHaW9iKMUHqH+R4kIgo2AdDMIouyMwuCPbIVOc9maJWbuN9ctvngB5gds6X7scEU/Yl1lt /mqhfy52bV3SpVp6xdrwfCxBz81S7PtyA1SGr/tXAfdOul3b6cRQncApeR7JDs+tGRqkItjj30 PsA= Date: Wed, 09 Oct 2019 00:27:00 -0000 From: Joseph Myers To: , CC: Subject: GCC wwwdocs move to git done Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-Path: joseph@codesourcery.com X-SW-Source: 2019-q4/txt/msg00005.txt.bz2 I've done the move of GCC wwwdocs to git (using the previously posted and discussed scripts), including setting up the post-receive hook to do the same things previously covered by the old CVS hooks, and minimal updates to the web pages dealing with the CVS setup for wwwdocs. Note 1: someone with the right access needs to create the symlink /sourceware/git/gcc-wwwdocs.git -> /sourceware/projects/gcc-home/wwwdocs.git (and anything else needed for anonymous git access to that repository). Once that's done I'll simplify the path given for git checkouts in about.html and restore instructions for anonymous checkout. Note 2: changes may be needed to the process for updating www.gnu.org and Gerald's validator. Note 3: I don't see any reason the automated process (see maintainer-scripts/update_web_docs_svn in the main GCC sources repository) for generating install/ documentation should be broken by this, but that will still need watching carefully to see if it works as expected. diff --git a/bin/post-receive b/bin/post-receive new file mode 100755 index 00000000..1114efcb --- /dev/null +++ b/bin/post-receive @@ -0,0 +1,55 @@ +#!/bin/bash + +# The post-receive hook receives, on standard input, a series of lines +# of the form: +# +# SP SP 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" diff --git a/bin/preprocess b/bin/preprocess index 2d09d548..56f83838 100755 --- a/bin/preprocess +++ b/bin/preprocess @@ -160,7 +160,7 @@ process_file() fi case $f in - */CVS|*\.cvsignore) + */.git|*\.gitignore) ;; *\.ihtml|*\.mhtml) ;; @@ -248,8 +248,8 @@ if [ $# -gt 0 ]; then done else # Process all files in the source tree, excluding files/directories - # called CVS. - for f in `find . \( -name CVS -prune \) -o -type f -print` ; do + # called .git. + for f in `find . \( -name .git -prune \) -o -type f -print` ; do process_file $f done fi diff --git a/htdocs/about.html b/htdocs/about.html index 19dd080c..30a5c943 100644 --- a/htdocs/about.html +++ b/htdocs/about.html @@ -19,7 +19,7 @@ many contributors .

-

The web pages are under CVS control. +

The web pages are under git control. The pages on gcc.gnu.org are updated directly after a change has been committed. www.gnu.org is updated once a day at 4:00 -0700 (PDT).

@@ -48,20 +48,16 @@ a higher chance of being implemented soon. ;-)


-

Using the CVS repository

+

Using the git repository

-

Assuming you have both CVS +

Assuming you have both git and SSH installed, you can check out the web pages as follows:

    -
  1. Set CVS_RSH in your environment to ssh.
  2. -
  3. cvs -q -d :ext:username@gcc.gnu.org:/cvs/gcc checkout --P wwwdocs where username is your user name at gcc.gnu.org
  4. +
  5. git clone git+ssh://username@gcc.gnu.org/sourceware/projects/gcc-home/wwwdocs.git + where username is your user name at gcc.gnu.org
-

For anonymous access, use --d :pserver:cvs@gcc.gnu.org:/cvs/gcc instead.

-

Validating a change

@@ -76,14 +72,14 @@ the W3 Validator. Just use the and prefer that each checkin be of a complete, single logical change.

    -
  1. Sync your sources with the master repository via "cvs -update". +
  2. Sync your sources with the master repository via "git pull". This will also identify any files in your local tree that you have modified.
  3. -
  4. We recommend reviewing the output of "cvs diff".
  5. +
  6. We recommend reviewing the output of "git diff".
  7. -
  8. Use "cvs commit" to check in the patch.
  9. +
  10. Use "git commit" and "git push origin +master" to check in the patch.
  11. Upon checkin a message will be sent to the gcc-cvs-wwwdocs mailing list.
  12. diff --git a/htdocs/contribute.html b/htdocs/contribute.html index 91fa65ad..499dfe86 100644 --- a/htdocs/contribute.html +++ b/htdocs/contribute.html @@ -152,7 +152,7 @@ validator.

    Please mark patches with the tag [wwwdocs] in the subject line.

    -

    More about our web pages.

    +

    More about our web pages.

    Submitting Patches

    diff --git a/htdocs/svn.html b/htdocs/svn.html index 5e93115e..2b90966b 100644 --- a/htdocs/svn.html +++ b/htdocs/svn.html @@ -22,7 +22,7 @@ GCC that is in our repository.

    In addition you can browse our SVN history online.

    -

    (Our web pages are managed via CVS.)

    +

    (Our web pages are managed via git.)

    Using the SVN repository

    diff --git a/htdocs/svnwrite.html b/htdocs/svnwrite.html index 057a66a9..1a22133a 100644 --- a/htdocs/svnwrite.html +++ b/htdocs/svnwrite.html @@ -12,7 +12,7 @@

    We have read/write access to the SVN repository available for maintainers and significant developers.

    -

    Our web pages are managed via CVS.

    +

    Our web pages are managed via git.


    Contents

    -- Joseph S. Myers joseph@codesourcery.com