summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Gordon <assafgordon@gmail.com>2014-10-20 03:12:46 (GMT)
committerA. Gordon <assafgordon@gmail.com>2014-10-20 03:12:46 (GMT)
commite8f382a148b85d381e3160b3e2937fd9b995e5af (patch)
tree8d0d0a1ff215ae88579ddba62ce39dc5f8a28cc5
parent58aabac391d944bf2fa219201b1d091c013e1368 (diff)
downloadgnu-sv-gitweb-dev/webserver.zip
gnu-sv-gitweb-dev/webserver.tar.gz
gnu-sv-gitweb-dev/webserver.tar.bz2
Webserver: add all filesdev/webserver
-rw-r--r--webserver/README-webserver.md73
-rw-r--r--webserver/apache-conf/010-www.gnu.org39
-rw-r--r--webserver/apache-conf/025-www.nongnu.org52
-rw-r--r--webserver/apache-conf/030-star.nongnu.org43
-rw-r--r--webserver/apache-conf/www.gnu.org-common366
-rwxr-xr-xwebserver/home-wwwcvs/update-gnu-rewritemaps282
-rwxr-xr-xwebserver/home-wwwcvs/update-symlinks-xargs.py122
-rwxr-xr-xwebserver/home-wwwcvs/update-symlinks.sh72
-rwxr-xr-xwebserver/update-scripts/create-gnu-sv-www-repo.sh138
-rwxr-xr-xwebserver/update-scripts/update-all-gnu-sv-www-repo.sh56
-rwxr-xr-xwebserver/update-scripts/update-recent-gnu-sv-www-repo.sh94
-rw-r--r--webserver/wwwcvs-orig-files/COPYING661
-rw-r--r--webserver/wwwcvs-orig-files/README16
-rw-r--r--webserver/wwwcvs-orig-files/Vagrantfile137
-rw-r--r--webserver/wwwcvs-orig-files/manifests/site.pp9
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/new.py72
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/star.nongnu.org36
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-cvs.sh58
-rwxr-xr-xwebserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-gnu-rewritemaps280
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks-xargs.py122
-rwxr-xr-xwebserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks.sh72
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org32
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org-common366
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.nongnu.org45
-rw-r--r--webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/manifests/init.pp240
25 files changed, 3483 insertions, 0 deletions
diff --git a/webserver/README-webserver.md b/webserver/README-webserver.md
new file mode 100644
index 0000000..3c30859
--- /dev/null
+++ b/webserver/README-webserver.md
@@ -0,0 +1,73 @@
+# GNU Savannah Git-WWW project - WebServer Configuration
+
+The Web-Server is the public facing 'http://gnu.org' and 'http://nongnu.org'.
+
+To minimize the amount of work required from FSF sys-admins,
+most of the existing configuration stays the same:
+ /etc/apache2/sites-enabled/*.conf
+ /etc/apache2/symlinks
+ /home/wwwcvs/update-* scripts (to update/generate symlinks)
+ /var/www/
+ /var/www/savannah-checkouts/gnu - projects under gnu.org/software/XXX
+ /var/www/savannah-checkouts/non-gnu - projects under nongnu.org/XXX
+ /var/www/savannah-checkouts/translations - translation web files.
+
+The files in `./webserver/wwwcvs-orig-files` are the configuration files
+that are currently being used for gnu.org (to the best of my knowledge),
+see: <https://savannah.gnu.org/task/?13200> .
+
+The files in `./webserver/home-wwwcvs` are the same original update scripts
+with very minor changes (e.g. adding '-L' to the `find` command).
+
+The files in `./webserver/apache-conf` are the same original apache configuration
+files, with minor changes (e.g. working on 'gnu.housegordon.org' instead of 'gnu.org').
+
+TODO:
+One major difference is the mechanism to notify the webserver about new projects.
+The current server uses a 'new.py' hack.
+In the new setup there's no established method yet,
+but since the wwwgit server has a page with recently updated projects,
+The update scripts on this server can simply create new project when they see one.
+
+
+## Manual configuration
+
+ # Create wwwcvs user
+ sudo adduser wwwcvs
+ # TODO: make it member of www-data group ?
+
+ # Apache configuration
+ sudo a2enmod vhost_alias
+ sudo cp ./apache-conf/* /etc/apache2/sites-available/
+ sudo a2ensite 010-www.gnu.org
+ sudo a2ensite 025-www.nongnu.org
+ sudo a2ensite 030-star.nongnu.org
+
+ # Copy and setup symlink-update scripts
+ sudo mkdir /etc/apache2/symlinks
+ sudo chown wwwcvs:wwwcvs /etc/apache2/symlinks
+ sudo cp ./home-wwwcvs/update-* /home/wwwcvs
+ sudo chown wwwcvs:wwwcvs /home/wwwcvs/update-*
+
+ # create important directories
+ # TODO: which user should own these? wwwcvs probably...
+ sudo mkdir /var/lib/savannah-checkouts/
+
+ # Create a project list file on 'internal.sv.gnu.org',
+ # Using `create-projects-list.sh` script (see `savannah` directory).
+ # Copy the file to this server.
+ # TODO: where to store it? perhaps /home/wwwcvs ?
+
+ # TODO: copy these update scripts to /home/wwwcvs ?
+ # Fetch all projects for the first time.
+ # NOTE: this will take some time...
+ ./update-scripts/create-gnu-sv-www-repo.sh
+
+
+ # Test project updates:
+
+ # Update all repositories:
+ update-all-gnu-sv-www-repo.sh
+
+ # Or update only recently changed repositories:
+ update-recent-gnu-sv-www-repo.sh
diff --git a/webserver/apache-conf/010-www.gnu.org b/webserver/apache-conf/010-www.gnu.org
new file mode 100644
index 0000000..e6bd293
--- /dev/null
+++ b/webserver/apache-conf/010-www.gnu.org
@@ -0,0 +1,39 @@
+<VirtualHost *:80>
+# ServerName for the Mockup Server "www.gnu.org" server
+ ServerName gnu.housegordon.org
+ ServerAdmin agn@gnu.org
+
+# Real name of the server
+# ServerName www.gnu.org
+# ServerAdmin webmasters@gnu.org
+
+
+
+ # Temporary for IPv6: we'll assign the AAAA record directly to
+ # www.gnu.org when we're 100% confident about its reliability
+ ServerAlias www.ipv6.gnu.org
+ ServerAlias www6.gnu.org
+
+ DocumentRoot /var/www/
+
+ # The super secret RMS webxfer script that used to run on
+ # https://www.gnu.org/software/goodbye and got nadesico compromised now has its
+ # own private VM: goodbye.gnu.org.
+ # See also #658521
+ # Ward, 2011-02-02
+ RewriteEngine on
+ RewriteCond %{REQUEST_URI} ^/software/goodbye.*$
+ RewriteRule ^(.*)$ https://goodbye.gnu.org$1
+
+ ErrorLog /var/log/apache2/gnu.org-error.log
+ CustomLog /var/log/apache2/gnu.org-access.log combined
+
+ # Enable this to get compression ratio and other interesting details
+ #LogLevel debug
+
+ Include /etc/apache2/sites-available/www.gnu.org-common
+
+# LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
+# CustomLog /var/log/apache2/deflate.log deflate
+
+</VirtualHost>
diff --git a/webserver/apache-conf/025-www.nongnu.org b/webserver/apache-conf/025-www.nongnu.org
new file mode 100644
index 0000000..2295c49
--- /dev/null
+++ b/webserver/apache-conf/025-www.nongnu.org
@@ -0,0 +1,52 @@
+<VirtualHost *:80>
+# ServerName for the Mockup Server "nongnu.org" server
+ ServerName www.nongnu.housegordon.org
+ ServerAlias nongnu.housegordon.org
+ ServerAdmin agn@gnu.org
+
+## Mockup: real server name
+# ServerAdmin webmasters@gnu.org
+# ServerName www.nongnu.org
+# ServerAlias nongnu.org
+
+
+
+ # Temporary for IPv6: we'll assign the AAAA record directly to
+ # www.gnu.org when we're 100% confident about its reliability
+ #ServerALias www.ipv6.nongnu.org
+ #ServerAlias www6.nongnu.org
+
+ DocumentRoot /var/www/savannah-checkouts/non-gnu/
+
+ <Directory /var/www/savannah-checkouts/non-gnu>
+ # Turn on SSI processing
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ # AllowOverride FileInfo so that people can use .htaccess to redirect subdirectories elsewhere
+ # Cf. RT #738350. Ward, 2012-05-18
+ AllowOverride FileInfo
+ </Directory>
+
+ ErrorDocument 404 /nongnu-404.html
+
+ RewriteEngine on
+ #RewriteLog "/var/log/apache2/nongnu-rewrite.log"
+ #RewriteLogLevel 3
+ RedirectMatch ^/$ http://savannah.nongnu.org/
+ # automatically handle projects that have migrated from non-gnu to gnu
+ RewriteCond /var/www/savannah-checkouts/gnu/$1 -d
+ RewriteRule ^/([^/]+)(.*)$ http://www.gnu.org/software/$1$2 [R,L]
+ # and finally handle packages whose names have changed:
+ RewriteRule ^/auctex/$ http://www.gnu.org/software/auctex/ [R]
+ RewriteRule ^/auctex$ http://www.gnu.org/software/auctex/ [R]
+ RewriteRule ^/qadsl(.*)$ http://www.gnu.org/software/alive$1 [R,L]
+ RewriteRule ^/hotp-toolkit(.*)$ http://www.nongnu.org/oath-toolkit$1 [R,L]
+ RewriteRule ^/fenfire(.*)$ http://fenfire.org/ [R,L]
+
+ AddHandler server-parsed .html .shtml
+
+ # Include nongnu/* symlinks
+ Include /etc/apache2/symlinks/symlinks-nongnu.conf
+
+ ErrorLog /var/log/apache2/nongnu-error.log
+ CustomLog /var/log/apache2/nongnu-access.log combined
+</VirtualHost>
diff --git a/webserver/apache-conf/030-star.nongnu.org b/webserver/apache-conf/030-star.nongnu.org
new file mode 100644
index 0000000..b0a4347
--- /dev/null
+++ b/webserver/apache-conf/030-star.nongnu.org
@@ -0,0 +1,43 @@
+<VirtualHost *:80>
+
+# 2005.08.20 - 2005.08.23
+#
+# This is a somewhat "clever" way of working around the ugliness of
+# providing *.nongnu.org, and supercedes the original rewrite
+# mess.
+#
+# The idea here is to work with .symlinks (and the generated
+# symlinks.conf) but without as little redirection or rewriting as
+# possible. Rewriting based on %{HTTP_HOST} was incredibly
+# problematic because of the later rewrites that may occur from
+# .symlinks. We give the server a fake name and then alias everything
+# *.nongnu.org to it. Since www.nongnu.org is canonically defined
+# above as a ServerName, it takes precedence - only project hosts
+# are caught by this net.
+#
+# - baughj
+
+# ServerName for the Mockup Server "nongnu.org" server
+ServerName foobar.nongnu.housegordon.org
+ServerAlias *.nongnu.housegordon.org
+ServerAlias nongnu.housegordon.org
+ServerAdmin agn@gnu.org
+
+## Mockup: real server name
+## ServerName foobar.nongnu.org
+## ServerAlias *.nongnu.org
+
+<Directory /var/www/savannah-checkouts/non-gnu>
+ Options +Indexes
+</Directory>
+
+VirtualDocumentRoot /var/www/savannah-checkouts/non-gnu/%1
+CustomLog /var/log/apache2/nongnu-projects.log combined
+ErrorLog /var/log/apache2/nongnu-projects-error.log
+UseCanonicalName Off
+
+# Include vhost symlinks
+
+Include /etc/apache2/symlinks/symlinks-nongnu-vhost.conf
+
+</VirtualHost>
diff --git a/webserver/apache-conf/www.gnu.org-common b/webserver/apache-conf/www.gnu.org-common
new file mode 100644
index 0000000..f0545d9
--- /dev/null
+++ b/webserver/apache-conf/www.gnu.org-common
@@ -0,0 +1,366 @@
+
+ AddHandler server-parsed .html .shtml
+ #DirectoryIndex index.html index.shtml index.xhtml home.html home.shtml
+ DirectoryIndex index.html home.html
+ <Directory /var/www/>
+ # Turn on SSI processing
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ AllowOverride Indexes FileInfo Limit
+ </Directory>
+
+ <Directory /var/www/software>
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ </Directory>
+
+ <Directory /var/www/savannah-checkouts>
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ AllowOverride Indexes FileInfo Limit
+ </Directory>
+
+ # The clisp project has old SSI commands in their html files, but they are
+ # broken. They asked us to disable SSI on their pages. See #656741. I've asked
+ # them to clean up their pages, in the mean time we have the following.
+ # 2011-01-18, Ward.
+ <Directory /var/www/savannah-checkouts/gnu/clisp>
+ Options Indexes -IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ AllowOverride Indexes FileInfo Limit
+ </Directory>
+
+ # Cf RT #703015; we need apache 2.2.15 for this... Ward, 2011-11-07
+ #SSILastModified off
+
+
+ # Timeout: The number of seconds before receives and sends time out.
+ # Defaults to 300; new.py in new-savannah-project sometimes takes (much) longer.
+ # I wish there was a way to set this just for one directory, this is a bit scary.
+ # Ward, 2012-09-26.
+ TimeOut 3000
+
+ # Probably better hidden. Cf. RT #835581. Ward, 2013-06-12
+ <Directory /var/www/CVS>
+ Order Deny,Allow
+ Deny from all
+ </Directory>
+
+ <Directory /var/www/new-savannah-project>
+ Order Deny,Allow
+ Deny from all
+
+ # Savannah IPs
+ Allow from 140.186.70.70
+ Allow from 140.186.70.71
+ Allow from 140.186.70.72
+ Allow from 140.186.70.73
+ Allow from 140.186.70.74
+ Allow from 140.186.70.75
+
+ Allow from 208.118.235.70
+ Allow from 208.118.235.71
+ Allow from 208.118.235.72
+ Allow from 208.118.235.73
+ Allow from 208.118.235.74
+ Allow from 208.118.235.75
+
+ # Office dsl
+ Allow from 74.94.156.210
+
+ # localhost
+ Allow from 127.0.0.1
+
+ AddHandler python-program .py
+ PythonHandler new
+ PythonDebug on
+ </Directory>
+
+ <Directory /var/www/new-savannah-project2>
+ Order Deny,Allow
+ Deny from all
+
+ # Savannah IPs
+ Allow from 140.186.70.70
+ Allow from 140.186.70.71
+ Allow from 140.186.70.72
+ Allow from 140.186.70.73
+ Allow from 140.186.70.74
+ Allow from 140.186.70.75
+
+ Allow from 208.118.235.70
+ Allow from 208.118.235.71
+ Allow from 208.118.235.72
+ Allow from 208.118.235.73
+ Allow from 208.118.235.74
+ Allow from 208.118.235.75
+
+ # Office dsl
+ Allow from 74.94.156.210
+
+ # localhost
+ Allow from 127.0.0.1
+
+ AddHandler python-program .py
+ PythonHandler new2
+ PythonDebug on
+ </Directory>
+
+
+ <FilesMatch "\.(ico|pdf|jpe?g|png|gif|js|css)$">
+ ExpiresActive On
+ ExpiresDefault "access plus 1 month"
+ </FilesMatch>
+
+ # jag: RT#363702
+ ExpiresActive On
+ ExpiresByType text/html M600
+
+ #rt#486596
+ #ExpiresByType image/gif A86400
+ #ExpiresByType image/png A86400
+ #ExpiresByType image/jpg A86400
+ #ExpiresByType text/css A86400
+ #ExpiresByType text/javascript A86400
+
+ # jag: Switched 404 from CGI to a mod_python script
+ # ErrorDocument 404 /cgi-bin/404.cgi
+ # disabled this abomination. too slow. ward, 2008-09-02
+ #ErrorDocument 404 /mp404/404.py
+ ErrorDocument 404 /gnu-404.html
+
+ # added as per RT #326793. Ward, 2007-01-08.
+ <Files *.php>
+ ForceType text/html
+ </Files>
+
+ # Rewrite rules take precedence over ScriptAlias, so we set up the equivalent
+ # of
+ # ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+ # by means of a Directory block and a few rewrite rules (ending in 'L' so no
+ # other rewrite rules will be processed).
+ # Ward, 2011-12-23
+
+ <Directory /usr/lib/cgi-bin >
+ Options ExecCGI SymLinksIfOwnerMatch
+ SetHandler cgi-script
+ </Directory>
+
+ RewriteCond %{REQUEST_FILENAME} /cgi-bin/
+ RewriteRule ^/cgi-bin(/.*)$ /usr/lib/cgi-bin$1 [L]
+
+ # For the new directory.
+ # Ward, 2011-09-29
+ RewriteRule ^/rss/quagga.rss$ http://directory.fsf.org/wiki?title=Special:RecentChanges&feed=atom [R=301]
+
+ # Cf #708151. Ward, 2011-09-14
+ RewriteRule ^/doc/termsofsale.html$ http://shop.fsf.org/termsofsale/ [R=301]
+
+ # Cf #697032. Ward, 2011-06-09
+ RewriteRule ^/doc/expanding.html$ http://www.fsf.org/campaigns/gnu-press/book-stores/expanding [R=301]
+ RewriteRule ^/doc/gnupresspub.html$ http://www.fsf.org/campaigns/gnu-press [R=301]
+ RewriteRule ^/doc/contact.html$ http://www.fsf.org/campaigns/gnu-press/contact [R=301]
+ RewriteRule ^/doc/potentialauthors.html$ http://www.fsf.org/campaigns/gnu-press/authors [R=301]
+ RewriteRule ^/doc/teachingprofessionals.html$ http://www.fsf.org/campaigns/gnu-press/teachers [R=301]
+ RewriteRule ^/doc/gnupresslogo.jpg$ http://static.fsf.org/nosvn/gnupresslogo.png [R=301]
+ RewriteRule ^/doc/small-gnupress.png$ http://static.fsf.org/nosvn/gnupresslogo.png [R=301]
+ RewriteRule ^/doc/GNU-Press-styleguide.texi$ http://www.fsf.org/campaigns/gnu-press/GNU-Press-styleguide.texi [R=301]
+ RewriteRule ^/doc/GNU-Press-styleguide.pdf$ http://www.fsf.org/campaigns/gnu-press/GNU-Press-styleguide.pdf [R=301]
+ RewriteRule ^/doc/bibliography.html$ http://www.fsf.org/campaigns/gnu-press/gpl-biblio [R=301]
+
+ # RT# 364396 -- with new FSF store, take gnu pages for it offline
+ RewriteRule ^/gear/.* http://shop.fsf.org/category/gnu-gear/ [R]
+ RewriteRule ^/order/ftp.html http://www.gnu.org/prep/ftp.html [R]
+ RewriteRule ^/order/.* http://shop.fsf.org/ [R]
+
+ # RT#791315
+ RewriteRule ^/software/consensus(/?.*)$ http://gnu.org/consensus$1 [R,L]
+ RewriteRule ^/consensus(/?)$ /software/consensus/consensus.html
+ RewriteRule ^/consensus(/?.*)$ /software/consensus$1
+
+ # See the freesoftware.fsf.org virtual host entry for information
+ RewriteRule ^/non-gnu/(.*)$ http://www.freesoftware.fsf.org/$1 [R,L]
+
+ # Make sure Georg Greve home page is still reachable
+ RewriteRule ^/people/greve/ http://gnuhh.org/ [R,L]
+
+ # Online ordering
+ RewriteRule ^/donate((/.*)?)$ https://www.fsf.org/donate$1 [R,L]
+ RewriteRule ^/prep/mailinglists\.html$ https://lists.gnu.org/mailman/listinfo [R,L]
+ RewriteRule ^/prep/service\.html$ http://www.fsf.org/resources/service [R,L]
+
+ # jag: rt#332934
+ RewriteRule ^/help/donate\.(es\.)?html$ http://donate.fsf.org/ [R,L]
+
+ # Jobs page moved to fsf.org
+ # updated to go to /resources/jobs as per RT #335330 (ward)
+ RewriteRule ^/jobs((/.*)?)$ http://www.fsf.org/resources/jobs$1 [R,L]
+
+ # Redirect fsf pages to the FSF site
+ RewriteRule ^/fsf(/.*)?$ http://www.fsf.org/ [R,L]
+
+ RewriteEngine on
+ RewriteLogLevel 9
+ RewriteLog "/var/log/apache2/gnu.org-rewrite.log"
+
+ # Redirect /software/www to www.gnu.org (RT #604511)
+ RewriteRule ^/software/www/$ http://www.gnu.org/ [R=301]
+ RewriteRule ^/software/www$ http://www.gnu.org/ [R=301]
+
+ # Speedx was renamed gnukart
+ RewriteRule ^/software/speedx(.*)$ http://www.gnu.org/software/gnukart$1 [R=301]
+
+ # tell wget scripts to go away
+ RewriteCond %{HTTP_USER_AGENT} ^Wget.*
+ RewriteRule ^/directory/(.*)$ - [G]
+
+ RewriteRule ^/directory/(.*)$ http://directory.fsf.org/wiki/$1 [R=301]
+ RewriteRule ^/directory$ http://directory.fsf.org/ [R=301]
+ RewriteRule ^/licenses/info/(.*)\.html$ http://directory.fsf.org/license/$1/ [R=301]
+
+ RewriteRule ^/assembly/(.*)$ http://assembly.gnu.org/$1 [R=301]
+ RewriteRule ^/assembly$ http://assembly.gnu.org/ [R=301]
+
+ # DO A BARREL^WRICK ROLL
+
+ RewriteRule ^/usenet/rms-gnusenet.html http://www.internetisseriousbusiness.com/ [R=301]
+ # Special cases for savannah checkouts:
+ RewriteRule ^/brave-gnu-world(.*)$ /software/bravegw$1
+ RewriteRule ^/projects/dotgnu(.*)$ /software/dotgnu$1
+ RewriteRule ^/software/GNUnet(.*)$ /software/gnunet$1 [R=301]
+ # Removed as per RT #369398. Ward, 2008-08-18
+ #RewriteRule ^/education(.*)$ /savannah-checkouts/gnu/education$1
+ RewriteRule ^/software/cp-tools(.*)$ /software/classpath/cp-tools$1 [R=301]
+ RewriteRule ^/software/ac-archive/(.*)$ http://autoconf-archive.cryp.to/$1 [R=301]
+ # jag: RT#255833
+ RewriteRule ^/software/emacs/elisp/(.*)$ /software/emacs/elisp-manual/$1
+ # jag: RT#358525
+ RewriteRule ^/ghm(/?.*)$ /software/ghm$1
+
+ # This has been broken for a long time, apparently. Ward, 2010-11-28
+ RewriteRule ^/copyleft(/.*rdf)$ /licenses/$1
+
+ # This is a weird VLC bug. Ward, 2011-12-21
+ RewriteRule ^/licenses/gpl-2.0.txt/udp/.*$ /licenses/gpl-2.0.txt [R=301]
+
+ ## Removed redirects - RT #535429. Ward, 2010-05-27
+ ##RewriteCond %{REMOTE_ADDR} !74.94.156.210
+ #RewriteRule ^/software/gcc(/.*)$ http://gcc.gnu.org$1
+
+ # At the request of Matt Lee. Ward, 2010-12-05
+ # Removed cf. RT #764846. Ward, 2012-07-09
+ #RewriteRule ^/software/social(.*)$ http://social.foocorp.net/software/social$1
+
+ # This is a consequence of the madness described at
+ # http://cluestick/wiki/Nadesico.gnu.org#.2Fvar.2Fwww.2Fsoftware.2Fgcc and in #535429
+ RewriteRule ^/software/gcc/wiki(/.*)$ http://gcc.gnu.org/wiki$1
+ RewriteRule ^/software/gcc/viewcvs(/.*)$ http://gcc.gnu.org/viewcvs$1
+ RewriteRule ^/software/gcc/onlinedocs(/.*)$ http://gcc.gnu.org/onlinedocs$1
+ RewriteRule ^/software/gcc/ml(/.*)$ http://gcc.gnu.org/ml$1
+ RewriteRule ^/software/gcc/install(/.*)$ http://gcc.gnu.org/install$1
+
+ # Redirect octave ML archives to velveeta.che.wisc.edu (RT #276337)
+
+ RewriteRule ^/software/octave/mailing-lists(.*) http://velveeta.che.wisc.edu/octave/lists$1
+
+ # This redirects every other project to the corresponding cvs checkout
+ RewriteCond /var/www/savannah-checkouts/gnu/$1 -d
+ RewriteRule ^/software/([^/]+)(.*)$ /savannah-checkouts/gnu/$1$2
+
+ # For the translation project webspace (RT #348523). Ward, 2008-08-18
+ RewriteCond /var/www/savannah-checkouts/translations/www-$1 -d
+ RewriteRule ^/server/standards/translations/([^/]+)(.*)$ /savannah-checkouts/translations/www-$1$2
+
+ # Classpath exception wiki. Used to be proxied from
+ RewriteRule ^/licensing/classpath(.*)$ http://developer.classpath.org/licensing$1 [R]
+
+ # Redirect /software/cvs to nongnu.org/cvs (RT #247259)
+ RewriteRule ^/software/cvs((/.*)?)$ http://www.nongnu.org/cvs$1 [R,L]
+
+ RewriteRule ^/events.html$ http://www.fsf.org/events
+
+ # Do not gzip images and files that are already gzipped. See #706271. Ward, 2011-09-28
+ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|gz)$ no-gzip dont-vary
+
+ # Multiview support - cf. RT #690688. Ward, 2011-12-21
+
+ # Remap MultiViews-conformant requests to the names of files in a
+ # CVS working copy, namely foo.html for English and foo.${lang}.html
+ # for translations, despite that Apache does not want to support that
+ # by default.
+ #
+ # In the end, http://gnu.org/provide.html and provide.en.html and
+ # provide.html.en should all get the English (actual file: provide.html).
+ # While http://gnu.org/provide.de.html and provide.html.de should get
+ # German (actual file: provide.de.html).
+ #
+ # Convenient command for testing that German is found first:
+ # wget -nv --header "Accept-Language: de;q=0.8, en;q=0.7" \
+ # http://testvhost.org/provide.html
+
+ # Enable SSI for .html one way or another. This is one way:
+ ## Ward - disabled; we do this more selectively above.
+ ##AddOutputFilter INCLUDES .html
+
+ # Because our web site has always used file.LANG.html instead of
+ # file.html.LANG, standard MultiViews does not do what we need.
+ # We have to use mod_rewrite to remap names so MultiViews will
+ # negotiate languages and yet still serve our existing files.
+ # http://httpd.apache.org/docs/current/mod/mod_rewrite.html
+
+ # The *-map.txt files used in these RewriteMap and Include directives are
+ # generated by the update-gnu-rewritemaps script.
+
+ # Apply redirections for external links and directories.
+ # This is an Include instead of a Map because we want things like
+ # www.gnu.org/g to be visibly rewritten to www.gnu.org/graphics.
+ Include /etc/apache2/symlinks/dir-map.txt
+
+ # Redirect requests for non-HTML files (.texi, etc.) whose translations
+ # we don't need to be automatically selected with MultiViews.
+ RewriteMap nonhtml_symlinks txt:/etc/apache2/symlinks/nonhtml-map.txt
+ RewriteRule (.*) ${nonhtml_symlinks:$1|$1}
+
+ # Redirect requests for HTML files (one link fits all translations).
+ RewriteMap html_symlinks txt:/etc/apache2/symlinks/html-map.txt
+ RewriteRule ^(.*)\.en\.html$ ${html_symlinks:$1|$1}.en.html [S=2]
+ RewriteRule ^(.*?)(((\...(-..)?)?\.html)|(\.html(\...(-..)?)))$ \
+ ${html_symlinks:$1|$1}$2 [S=1]
+ # Redirect also extensionless requests.
+ RewriteRule ^(.*)$ ${html_symlinks:$1|$1}
+
+ # Don't localize included files, e.g., the fragments under /server.
+ # This file is generated by the script /server/source/gen-include-file-list.
+ RewriteMap pass_includes txt:/var/www/server/include-file-list.txt
+ RewriteRule ^(.*)\.html$ ${pass_includes:$1|$1}.html
+
+ # Skip MultiViews rewriting if a gzipped file, or ...
+ RewriteCond %{REQUEST_URI} \.gz$ [OR]
+
+ # ... if the file is in a package-specific checkout from savannah.
+ # This includes the gnu.org translation team pages (/translations),
+ # the GNU package pages handled by the maintainers (/gnu),
+ # and the non-GNU packages (/non-gnu).
+ RewriteCond %{REQUEST_FILENAME} /savannah-checkouts/ [OR]
+
+ # ... if the file is in /prep/. We don't translate documentation
+ # there, and some files from /prep/ have the same names as directories.
+ # That would result in Error 404 File Not Found.
+ RewriteCond %{REQUEST_FILENAME} /prep/
+
+ # This no-op rule ends processing if either of the above
+ # RewriteConds are satisfied.
+ RewriteRule (.*) $1 [L]
+
+ # Redirect foo.html.${lang} to foo.${lang}.html,
+ # where ${lang} might have the form aa, or aa-BB.
+ RewriteRule ^(.*)\.html\.(..(-..)?)$ $1.$2.html
+
+ # Redirect foo.en.html to foo.html and skip the next rule for
+ # MultiViews (S=1), since we now know what file we want.
+ RewriteRule ^(.*)\.en\.html$ $1.html [S=1]
+
+ # Redirect foo.html to foo.
+ # After this redirection, MultiViews should take over.
+ RewriteCond %{REQUEST_FILENAME} !(\...(-..)?\.html)$
+ RewriteRule ^(.*)\.html$ $1
+
+ # Prevent Apache from interpreting the result
+ # as a local filesystem path, e.g., "/home".
+ RewriteRule ^(/.*)$ %{DOCUMENT_ROOT}$1
diff --git a/webserver/home-wwwcvs/update-gnu-rewritemaps b/webserver/home-wwwcvs/update-gnu-rewritemaps
new file mode 100755
index 0000000..8e2cb61
--- /dev/null
+++ b/webserver/home-wwwcvs/update-gnu-rewritemaps
@@ -0,0 +1,282 @@
+#! /bin/bash
+# Create plain text maps for mod_rewrite from .symlinks files.
+# Main control is at the end.
+#
+# Originally written by Ineiev <ineiev@gmail.com>, feb 2011.
+# Ineiev <ineiev@gmail.com>, Mar 2012: fix links to absolute paths.
+
+# 18-Oct-2014,agn - add "-L" to 'find' command
+
+web_root=${1-/srv/data/www-mirror}
+www_maps_dir=${2-~}
+verbose=${3-no}
+
+# The fancy /%\// here removes any trailing / that might have been
+# specified in the above variables, since we re-insert the / below.
+# Maybe not 100% necessary, but cleaner.
+web_root=${web_root/%\//}
+www_maps_dir=${www_maps_dir/%\//}
+
+max_link_depth=17
+
+# These file names are used in the vhost configuration.
+html_map_name=html-map.txt
+nonhtml_map_name=nonhtml-map.txt
+dir_map_name=dir-map.txt
+
+SED=sed
+FIND=find
+
+# function to filter out from file "$1" any
+# empty lines, comments, trailing spaces, invalid lines;
+# and replace multiple spaces with single one;
+# and prefix the line with its number if "$2" is "-n".
+cleanup-symlinks () {
+ ${SED} "s/#.*//;s/[[:blank:]]\+/ /g;\
+ s/[[:blank:]]$//;s/^[[:blank:]]//" "$1" \
+ | grep $2 ".[[:blank:]]." | grep -v "[[:blank:]].*[[:blank:]]"
+}
+
+# check if the file or directory exists,
+# assign the "type" variable accordignly
+get-file-type () {
+ if test -f "$1"; then
+ type=file
+ if test ${verbose} = yes; then
+ echo found $1 file
+ fi
+ return 0;
+ fi
+ if test -d "$1"; then
+ type=directory
+ if test ${verbose} = yes; then
+ echo found $1 directory
+ fi
+ return 0;
+ fi
+ type=
+ return 1;
+}
+
+# sed programs to normalize paths
+simplify_path=":cycle;s%/[^/]*/\.\./%/%;t cycle"
+normalize_link="${simplify_path};"
+# should we add something like
+# "s%\(^\| \)/savannah-checkouts/gnu%\1/software%g"
+# to normalize_link?
+
+# function used to subsitute software <-> savannah-checkouts/gnu in paths
+substitute-path () {
+ aliased_path=$(echo $1 | ${SED} "s%^/$2%/$3%;${simplify_path}")
+ if test ${verbose} = yes; then
+ echo "$1 is absent; I'll look in /$3"
+ fi
+}
+
+substitute-software () {
+ substitute-path "$1" software savannah-checkouts/gnu
+}
+
+substitute-checkouts () {
+ substitute-path "$1" savannah-checkouts/gnu software
+}
+
+# output the common part for diagnostic messages
+show-current-line () {
+ printf "%s" "${web_root}${symlinks_directory}.symlinks:$lineno: "
+ echo ${current_line} | ${SED} "s/[[:blank:]]\+/ <- /"
+}
+
+# function to process a single .symlinks file.
+append-symlinks () {
+
+ if test ${verbose} = yes; then
+ echo processing file "$1":
+ fi
+ symlinks_directory=$(echo $1 \
+ | ${SED} "s ^${web_root}/\(.*\)\.symlinks$ /\1 ")
+ cleanup-symlinks "$1" -n | while read current_line; do
+ lineno=$(echo ${current_line} | ${SED} "s/:.*//")
+ current_line=$(echo ${current_line} | ${SED} "s/^[^:]*://")
+
+ link=$(echo ${current_line} | ${SED} "s/^.*[[:blank:]]//")
+ target=$(echo ${current_line} | ${SED} "s/[[:blank:]].*$//")
+ target_directory=${symlinks_directory}
+
+ if test ${verbose} = yes; then
+ echo line ${lineno}: ${current_line}
+ fi
+
+ link_depth=0
+ type=none
+ # follow subsequent links until we get the real thing or find an error
+ while true; do
+ case "x${target}" in
+ # external link
+ x*://*)
+ full_target="${target}"
+ type=external
+ break
+ ;;
+ # absolute link
+ x/*)
+ target_directory=
+ ;;
+ esac
+ # check if the target exists
+ if get-file-type "${web_root}${target_directory}${target}"; then
+ full_target="${target_directory}${target}"
+ break
+ fi
+ case "x${target_directory}${target}" in
+ # look for /software files in /savannah-checkouts/gnu
+ x/software/*)
+ substitute-software "${target_directory}${target}"
+ if get-file-type "${web_root}${aliased_path}"; then
+ full_target="${aliased_path}"
+ break
+ fi
+ ;;
+ # look for /savannah-checkouts/gnu files in /software
+ x/savannah-checkouts/gnu*)
+ substitute-checkouts "${target_directory}${target}"
+ if get-file-type "${web_root}${aliased_path}"; then
+ full_target="${aliased_path}"
+ break
+ fi
+ ;;
+ esac
+ target_directory=$(echo ${target_directory}${target} \
+ | ${SED} "s%[^/]*$%%")
+ target_symlinks=${target_directory}.symlinks
+ if test ! -f "${web_root}${target_symlinks}"; then
+ # no .symlinks file found: try alternative places
+ # (/software for /savannah-checkouts/gnu and vice versa
+ case "x${target_symlinks}" in
+ x/software/*)
+ substitute-software "${target_symlinks}"
+ target_symlinks="$aliased_path"
+ if test ! -f "${web_root}${target_symlinks}"; then
+ type=no-symlinks
+ break
+ fi
+ target_directory=${target_symlinks/%.symlinks/}
+ ;;
+ x/savannah-checkouts/gnu*)
+ substitute-checkouts "${target_symlinks}"
+ target_symlinks="$aliased_path"
+ if test ! -f "${web_root}${target_symlinks}"; then
+ type=no-symlinks
+ break
+ fi
+ target_directory=${target_symlinks/%.symlinks/}
+ ;;
+ *)
+ type=no-symlinks
+ break
+ ;;
+ esac
+ fi
+
+ escaped_target=$(echo ${target} | ${SED} "s%.*/%%;s/\./\\\\./g")
+ if ! cleanup-symlinks "${web_root}${target_symlinks}" \
+ | grep -q "[[:blank:]]${escaped_target}$"; then
+ type=no-subsequent-link
+ break
+ fi
+ target=$(cleanup-symlinks "${web_root}${target_symlinks}" \
+ | ${SED} -n "s/[[:blank:]]${escaped_target}$//p")
+ link_depth=$(expr ${link_depth} + 1)
+ if test ${link_depth} -gt ${max_link_depth}; then
+ type=deep-link
+ break
+ fi
+ if test ${verbose} = yes; then
+ echo "go to the next target (depth ${link_depth}): ${target}"
+ fi
+ done # while true
+
+ # output the results of our link analysis
+ case ${type} in
+ file)
+ if (echo ${target} | grep -q "\.html$") \
+ && (echo ${link} | grep -q "\.html$"); then
+ echo ${symlinks_directory}${link} ${full_target} \
+ | ${SED} "s/\.html[[:blank:]]*/ /;s/\.html$//;\
+ ${normalize_link}" >> "${html_map_name}"
+ if test ${verbose} = yes; then
+ echo link to a HTML file found
+ fi
+ else
+ echo ${symlinks_directory}${link} ${full_target} \
+ | ${SED} "${normalize_link}" >> "${nonhtml_map_name}"
+ if test ${verbose} = yes; then
+ echo link to a non-HTML file found
+ fi
+ fi
+ ;;
+ directory | external)
+ echo ${symlinks_directory}${link} ${full_target} \
+ | ${SED} "${normalize_link}" >> "${dir_map_name}"
+ if test ${verbose} = yes; then
+ echo ${type} link found
+ fi
+ ;;
+ no-symlinks)
+ show-current-line
+ echo " ${target_symlinks} list"
+ echo " and ${target} file/directory are absent."
+ ;;
+ no-subsequent-link)
+ show-current-line
+ echo " ${target} file/directory is absent,"
+ echo " and no subsequent link in ${target_directory}.symlinks found."
+ ;;
+ deep-link)
+ show-current-line
+ echo " link depth limit ${max_link_depth} has been reached."
+ ;;
+ *)
+ show-current-line
+ echo " an unclassified error occurred."
+ exit 1
+ ;;
+ esac # case ${type} in
+ done # cleanup-symlinks "$1" -n | while read current_line; do
+}
+
+# Main program.
+
+if test "x${verbose}" != xyes; then
+ verbose=no
+fi
+
+html_map_name="${www_maps_dir}/${html_map_name}"
+nonhtml_map_name="${www_maps_dir}/${nonhtml_map_name}"
+dir_map_name="${www_maps_dir}/${dir_map_name}"
+
+# Initialize the output files.
+WARNING="# DO NOT EDIT, GENERATED by $0 `date`"
+echo ${WARNING} > "${html_map_name}"
+echo "# links to HTML files" >> "${html_map_name}"
+echo ${WARNING} > "${nonhtml_map_name}"
+echo "# links to non-HTML files" >> "${nonhtml_map_name}"
+echo ${WARNING} > "${dir_map_name}"
+echo "# links to directories and external links" >> "${dir_map_name}"
+
+# Scan every .symlinks file except
+# in non-gnu projects (they are managed with another script).
+${FIND} -L "${web_root}" -type f -name '.symlinks' \
+ ! -path "${web_root}/savannah-checkouts/non-gnu/*" \
+ -print \
+| while read next_file; do
+ append-symlinks ${next_file}
+ done
+
+# transform directory and external links into rewriterules
+${SED} -i '/^[^#]/ { h; s/ .*//;s/\./\\./g;
+ x; s/.* //; H; x; s/\n/ /;
+ s/ /((\/.*)?)$ /;
+ s/^/RewriteRule ^/;
+ s/ *$/$1 [R=302,L]/
+ }' "${dir_map_name}"
diff --git a/webserver/home-wwwcvs/update-symlinks-xargs.py b/webserver/home-wwwcvs/update-symlinks-xargs.py
new file mode 100755
index 0000000..206fac6
--- /dev/null
+++ b/webserver/home-wwwcvs/update-symlinks-xargs.py
@@ -0,0 +1,122 @@
+#!/usr/bin/python
+# Use mod_rewrite as opposed to creating real symlinks.
+# (c) 2003, 2011, Free Software Foundation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# ChangeLog
+#
+# 2011.03.01 - Escape dots for Apache regexps. Exclude links for gnu
+# projects (they are regenerated with another script).
+#
+# 2007.11.08 - Change the script to accept more than one file at a time
+# as a commandline argument. This requires changing the order of the args
+# and I'm changing the calling shell script to reflect this
+#
+# 2005.08.23 - Change the script to support a command line argument of
+# {gnu|nongnu|nongnu-vhost}. These arguments change the form of the rewrite
+# rules output (and if they are output).
+# - baughj
+
+import sys
+import re
+from string import *
+from urllib import quote
+from os import lstat
+from stat import *
+from os.path import basename,dirname
+import os.path
+
+# escape dots in regexps
+def escape (str):
+ new_str = ''
+ for x in str:
+ if x == '.':
+ new_str = "%s\%s" % (new_str, x)
+ else:
+ new_str = "%s%s" % (new_str, x)
+ return new_str
+
+def create_rewrite_rule (links, cwd, type):
+ if len(links) != 2 or links[0][0] == '#':
+ return
+
+ # This is an ugly, horrid mess.
+
+ # Also, hilarity: We need to check for the existence of :// so we don't
+ # screw up offsite links that should Just Work.
+
+ external_link = re.compile('://').search(links[0])
+
+ if (type == 'nongnu-vhost'):
+ base = replace(cwd, '/var/www/savannah-checkouts/non-gnu/', '')
+ basedir = dirname(base)
+ if basedir:
+ relativepath = replace(base,basedir,'')
+ else:
+ relativepath = None
+
+ if ((links[1] == "index.html") or
+ (links[1] == "index.shtml") or
+ (links[1] == "index.xhtml")):
+ if (type == 'nongnu' or external_link):
+ print "RewriteRule ^[\./]*$ %s [L]" % (links[0],)
+ else:
+ if relativepath:
+ print "RewriteRule ^[\./]*$ %s/%s [L]" % (relativepath, links[0],)
+ else:
+ print "RewriteRule ^[\./]*$ /%s [L]" % (links[0])
+
+ if (type == 'nongnu' or external_link):
+ print "RewriteRule ^%s$ %s [L]" % (escape (links[1]), links[0])
+ print "RewriteRule ^%s/(.*)$ %s/$1 [L]" % (escape (links[1]), links[0])
+ else:
+ if relativepath:
+ print "RewriteRule ^%s$ %s/%s [L]" % (escape(links[1]), relativepath, links[0])
+ print "RewriteRule ^%s(.*)$ %s/%s/$1 [L]" % (escape(links[1]), relativepath, links[0])
+ else:
+ print "RewriteRule ^%s$ /%s [L]" % (escape (links[1]), links[0])
+ print "RewriteRule ^%s/(.*)$ /%s/$1 [L]" % (escape (links[1]), links[0])
+
+def main():
+ symlink_group = sys.argv[1]
+ for filename in sys.argv[2:]:
+ # print 'filename is ', filename
+ f = open(filename,'r')
+ cwd = os.path.split(filename)[0]
+ # print 'cwd is', cwd
+ nongnu = cwd.startswith('/var/www/savannah-checkouts/non-gnu/')
+ gnu = cwd.startswith('/var/www/savannah-checkouts/gnu/')
+ try:
+ if ((symlink_group == 'gnu') or gnu or \
+ (symlink_group == 'nongnu' and not nongnu) or \
+ (symlink_group == 'nongnu-vhost' and not nongnu)):
+ continue
+ except IndexError:
+ print "usage: update-symlinks.py <symlink file> [gnu|nongnu|nongnu-vhost]"
+ sys.exit(0)
+ # this is a nasty hack
+
+ print "<Directory %s>" % (cwd,)
+ print "RewriteEngine on"
+
+ for line in f.readlines():
+ create_rewrite_rule (split(line.strip()), cwd, symlink_group)
+
+ f.close ()
+ print "</Directory>"
+
+if __name__ == '__main__':
+ main()
diff --git a/webserver/home-wwwcvs/update-symlinks.sh b/webserver/home-wwwcvs/update-symlinks.sh
new file mode 100755
index 0000000..c733e12
--- /dev/null
+++ b/webserver/home-wwwcvs/update-symlinks.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+if [ -e /var/tmp/update-symlinks.pid ]; then
+ # See if the process is still running
+ pid=`cat /var/tmp/update-symlinks.pid`
+ if [ -e /proc/$pid ]; then
+ # send a warning mail and abort
+ mail -s "[wildebeest] update-symlinks warning: pid $pid still active" sysadmin@gnu.org < /dev/null > /dev/null
+ exit -1
+ else
+ # Stale file, overwrite it, onwards and upwards
+ echo $$ > /var/tmp/update-symlinks.pid
+ fi
+else
+ # Output our PID to the pid file
+ echo $$ > /var/tmp/update-symlinks.pid
+fi
+
+exec >> /var/log/wwwcvs/update-symlinks.log 2>&1
+
+echo "Regenerating symlinks..."
+
+WARNING="# GENERATED BY /home/wwwcvs/update-symlinks.sh DO NOT EDIT"
+TMPFILE=`/bin/mktemp /tmp/hourly-website-update.XXXXXX || exit -1`
+/usr/bin/find /var/www -type f -name '.symlinks' >> $TMPFILE
+
+/home/wwwcvs/update-gnu-rewritemaps /var/www /home/wwwcvs/symlinks > /dev/null
+
+printf "${WARNING}\n\n" > /home/wwwcvs/symlinks-nongnu-vhost.conf
+cat $TMPFILE | xargs /home/wwwcvs/update-symlinks-xargs.py nongnu-vhost >> /home/wwwcvs/symlinks-nongnu-vhost.conf
+
+printf "${WARNING}\n\n" > /home/wwwcvs/symlinks-nongnu.conf
+cat $TMPFILE | xargs /home/wwwcvs/update-symlinks-xargs.py nongnu >> /home/wwwcvs/symlinks-nongnu.conf
+
+CHANGED=0
+
+dir1=/etc/apache2/symlinks
+dir2=/home/wwwcvs/symlinks
+
+# these need the -I to ignore comments.
+for file in dir-map.txt html-map.txt nonhtml-map.txt; do
+ diff -I "^#" -q {$dir1,$dir2}/$file
+ if [[ "$?" != "0" ]]; then
+ cp -f {$dir2,$dir1}/$file
+ CHANGED=1
+ fi
+done
+
+# nongnu files lack the comments and are in the top-level dir.
+dir2=/home/wwwcvs
+for file in symlinks-nongnu.conf symlinks-nongnu-vhost.conf; do
+ diff -q {$dir1,$dir2}/$file
+ if [[ "$?" != "0" ]]; then
+ cp -f {$dir2,$dir1}/$file
+ CHANGED=1
+ fi
+done
+
+rm -f $TMPFILE
+echo "Regeneration complete."
+
+if [ "$CHANGED" == "1" ]; then
+ echo "Restarting apache...."
+ sudo /usr/sbin/apache2ctl graceful && echo "Restart successful."
+else
+ echo "No changes, no apache restart necessary"
+fi
+
+# Remove our lock/pid file
+
+rm -f /var/tmp/update-symlinks.pid && echo "update-symlinks finished `date`" && exit 0
+
diff --git a/webserver/update-scripts/create-gnu-sv-www-repo.sh b/webserver/update-scripts/create-gnu-sv-www-repo.sh
new file mode 100755
index 0000000..8c2ea2c
--- /dev/null
+++ b/webserver/update-scripts/create-gnu-sv-www-repo.sh
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# Copyright (C) 2014 Assaf Gordon (assafgordon@gmail.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+##
+## Git-Clones new projects from the 'wwwgit' server,
+## and setups the correct symlinks under /var/www/savannah-checkouts/
+##
+## If a project/repository is already cloned, this script silently ignores it,
+## so it's safe to run it again and again (i.e. even to clone just one more
+## new project).
+##
+
+die()
+{
+ BASE=$(basename "$0")
+ echo "$BASE: error: $@" >&2
+ exit 1
+}
+
+log()
+{
+ DATE=$(date +%F-%H%M%S)
+ echo "$DATE: $@" >&2
+}
+
+# Git Repositories Server
+GITURL=git://gnueval.housegordon.org
+# Directory containing detached ".git" content (but not a bare repository).
+GITDIR=/var/lib/savannah-checkouts/
+WWWDIR=/var/www/savannah-checkouts/
+
+PROJ_LIST=gnu-sv-projects-list.txt
+test -e "$PROJ_LIST" \
+ || die "Project-List file ($PROJ_LIST) not found"
+
+##
+## Clone the WWW project, with special settings
+##
+test -d "$GITDIR/www" \
+ || git clone "$GITURL/www" "$GITDIR/www" \
+ || die "git-clone failed, src='$GITURL/www' " \
+ " dst='$GITDIR/www'"
+test -d "$GITDIR/www/www" \
+ || die "invalid Web repository for project (www) "\
+ "- does not contain sub-directory named 'www' " \
+ "(gitdir='$GITDIR/www')"
+## Special Hack:
+## The 'www/www' directory must be in '/var/www' .
+## But this should not be done as the non-root user?
+test -h "/var/www" \
+ || ln -s "$GITDIR/www/www" /var/www \
+ || die "failed to create symlink '/var/www' to '$GITDIR/www/www'"
+
+
+##
+## Clone all other projects
+##
+
+## Ensure sub-directories exist in the 'www' project
+for TYPE in gnu nongnu translation ;
+do
+ mkdir -p "$WWWDIR/$TYPE" \
+ || die "failed to create directory '$WWWDIR/$TYPE'"
+done
+
+cat "$PROJ_LIST" \
+ | while read PROJ TYPE ;
+do
+ ## The 'www' project is special, and was handled above
+ test "x$PROJ" = "xwww" && continue
+
+ expr "$PROJ" : '^[A-Za-z0-9_\-][A-Za-z0-9_\-]*$' >/dev/null \
+ || die "invalid repository/project name ($PROJ) found in '$PROJ_LIST'"
+
+ case "$TYPE" in
+ gnu) LINKDIR="$WWWDIR/gnu" ;;
+ nongnu) LINKDIR="$WWWDIR/non-gnu" ;;
+ translation) LINKDIR="$WWWDIR/translation" ;;
+ *) die "invalid type ($TYPE) for project '$PROJ' found " \
+ "in '$PROJ_LIST" ;;
+ esac
+
+ ## Sanity checks:
+ ## A valid (already-cloned) project need three things:
+ ## 1. a 'git' repository
+ ## 2. a sub-directory named the same as the project
+ ## (e.g. 'datamash/datamash') in which the HTML files are stored.
+ ## This is a hack from the CVS checkout method days.
+ ## 3. a symlink for the directory in the ./savannah-checkouts/{gnu,nongnu}'
+ ## directory - the Apache rules will look there for each project's files.
+
+ ## Clone the repository
+ if ! test -d "$GITDIR/$PROJ" ; then
+ log "cloning new repository '$PROJ'"
+ git clone --quiet "$GITURL/$PROJ" "$GITDIR/$PROJ" \
+ || die "git-clone failed, src='$GITURL/$PROJ' " \
+ " dst='$GITDIR/$PROJ'"
+ fi
+
+ ## Empty repository?
+ ## don't link directory
+ if ! git --git-dir "$GITDIR/$PROJ/.git" rev-parse HEAD 1>/dev/null 2>&1 ;
+ then
+ log "skipping empty web repository for project ($PROJ) "
+ continue
+ fi
+
+ ## Verify it has a properly named sub-directory
+ ## NOTE: instead of die() with failure, ignore this repository -
+ ## could be just an empty repository.
+ test -d "$GITDIR/$PROJ/$PROJ" \
+ || log "skipping invalid web repository for project ($PROJ) "\
+ "- does not contain sub-directory named '$PROJ' " \
+ "(gitdir='$GITDIR/$PROJ')"
+
+ ## Create a symlink to this directory
+ test -h "$LINKDIR/$PROJ" \
+ || ln -s "$GITDIR/$PROJ/$PROJ" "$LINKDIR/$PROJ" \
+ || die "failed to create symlink in '$LINKDIR/$PROJ'"
+done
+
+## vim: set shiftwidth=4:
+## vim: set tabstop=4:
+## vim: set expandtab:
diff --git a/webserver/update-scripts/update-all-gnu-sv-www-repo.sh b/webserver/update-scripts/update-all-gnu-sv-www-repo.sh
new file mode 100755
index 0000000..350e9cb
--- /dev/null
+++ b/webserver/update-scripts/update-all-gnu-sv-www-repo.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# Copyright (C) 2014 Assaf Gordon (assafgordon@gmail.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+##
+## This script pulls updates for all WWW-GIT repositories,
+## regardless of whether they were recently updated or not.
+##
+
+die()
+{
+ BASE=$(basename "$0")
+ echo "$BASE: error: $@" >&2
+ exit 1
+}
+
+log()
+{
+ DATE=$(date +%F-%H%M%S)
+ echo "$DATE: $@" >&2
+}
+
+# Directory containing each repository
+GITDIR=/var/lib/savannah-checkouts/
+
+for PROJ in $(find "$GITDIR" -maxdepth 1 -type d | sed 1d | sort) ;
+do
+ cd "$PROJ"
+
+ git fetch --quiet \
+ || log "failed to git-fetch in '$PROJ'"
+
+ ## Empty repository? don't try to pull
+ git rev-parse HEAD 1>/dev/null 2>&1 \
+ || continue
+
+ git pull --quiet \
+ || log "failed to git-pull in '$PROJ'"
+done
+
+## vim: set shiftwidth=4:
+## vim: set tabstop=4:
+## vim: set expandtab:
diff --git a/webserver/update-scripts/update-recent-gnu-sv-www-repo.sh b/webserver/update-scripts/update-recent-gnu-sv-www-repo.sh
new file mode 100755
index 0000000..65d6bf3
--- /dev/null
+++ b/webserver/update-scripts/update-recent-gnu-sv-www-repo.sh
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+# Copyright (C) 2014 Assaf Gordon (assafgordon@gmail.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+##
+## This script checks which projects were recently updated,
+## by visiting http://gitweb.housegordon.org/recent/ ,
+## and comparing the timestamp of the listed projects to the cached
+## timestamp in '/var/run/savannah-checkouts/recent.timestamp'
+##
+## Project with newer timestamp (or all listed projects, if no timestamp file
+## exists) will be git-pulled .
+##
+
+die()
+{
+ BASE=$(basename "$0")
+ echo "$BASE: error: $@" >&2
+ exit 1
+}
+
+log()
+{
+ DATE=$(date +%F-%H%M%S)
+ echo "$DATE: $@" >&2
+}
+
+# Directory containing each repository
+GITDIR=/var/lib/savannah-checkouts/
+
+# URL of a CGI script reporting the recently updated projects
+RECENT_URL=http://gitweb.housegordon.org/recent/
+
+# Timestamp file
+TIMESTAMP_FILE=/var/run/savannah-checkouts/recent.timestamp
+
+# Fetch The list of recently updated projects
+LIST=$(wget --quiet -O - "$RECENT_URL") \
+ || die "failed to fetch recently updated projects from '$RECENT_URL'"
+LIST=$(echo "$LIST" | sort -k2n,2)
+
+# Check if we have a record of the last timestamp we've updated.
+# If so, don't fetch older updates
+TIMESTAMP=0
+if test -e "$TIMESTAMP_FILE" ; then
+ TIMESTAMP=$(cat "$TIMESTAMP_FILE")
+ expr "$TIMESTAMP" : "^[0-9][0-9]*$" >/dev/null || TIMESTAMP=0
+ LIST=$(echo "$LIST" | awk -v TS="$TIMESTAMP" '$2>TS') \
+ || die "failed to filter recent entries with awk"
+fi
+
+# No projects are newer than the latest timestamp, exit
+test -z "$LIST" && exit 0
+
+echo "$LIST" \
+ | while read PROJ TS DATE TIME ; do
+
+ # Input validation
+ expr "$PROJ" : '^[A-Za-z0-9_\-][A-Za-z0-9_\-]*$' >/dev/null \
+ || die "invalid repository/project name ($PROJ) in recent-updates list"
+ expr "$TS" : "^[0-9][0-9]*$" >/dev/null \
+ || die "invalid timesramp ($TS) for repository ($PROJ) in recent-updates list"
+
+ # TOOD: auto-create new projects?
+ test -d "$GITDIR/$PROJ" \
+ || die "Found update record for non existing repository ($PROJ) " \
+ "consider creating the project setup."
+
+ cd "$GITDIR/$PROJ" \
+ || die "failed to CD to $GITDIR/$PROJ"
+
+ git pull --quiet \
+ || die "failed to git-pull in '$GITDIR/$PROJ'"
+
+ echo "$TS" > "$TIMESTAMP_FILE" \
+ || die "failed to update timestamp file $TIMESTAMP_FILE"
+done
+
+## vim: set shiftwidth=4:
+## vim: set tabstop=4:
+## vim: set expandtab:
diff --git a/webserver/wwwcvs-orig-files/COPYING b/webserver/wwwcvs-orig-files/COPYING
new file mode 100644
index 0000000..dba13ed
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/COPYING
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
diff --git a/webserver/wwwcvs-orig-files/README b/webserver/wwwcvs-orig-files/README
new file mode 100644
index 0000000..1a9ec1d
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/README
@@ -0,0 +1,16 @@
+Savannah -> WWW update
+----------------------
+
+vagrant up
+vagrant provision
+vagrant ssh -- -l root
+su - wwwcvs -s /bin/bash
+
+curl -H'Host: www.gnu.org' http://127.0.0.1/new-savannah-project/new.py -F type=gnu -F project=hello
+/usr/local/bin/update-cvs.sh # or wait 2 minutes
+curl -H'Host: www.gnu.org' http://127.0.0.1/software/hello/
+
+curl -H'Host: www.gnu.org' http://127.0.0.1/new-savannah-project/new.py -F type=non-gnu -F project=debian-sf
+/usr/local/bin/update-cvs.sh # or wait 2 minutes
+curl -H'Host: specialk.nongnu.org' http://127.0.0.1/
+curl -H'Host: www.nongnu.org' http://127.0.0.1/specialk/
diff --git a/webserver/wwwcvs-orig-files/Vagrantfile b/webserver/wwwcvs-orig-files/Vagrantfile
new file mode 100644
index 0000000..0e6fd43
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/Vagrantfile
@@ -0,0 +1,137 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ # All Vagrant configuration is done here. The most common configuration
+ # options are documented and commented below. For a complete reference,
+ # please see the online documentation at vagrantup.com.
+
+ # Every Vagrant virtual environment requires a box to build off of.
+ config.vm.box = "debian-puppet"
+
+ # The url from where the 'config.vm.box' box will be fetched if it
+ # doesn't already exist on the user's system.
+ config.vm.box_url = "http://dl.gna.org/admin/debian-puppet.box"
+
+ # Create a forwarded port mapping which allows access to a specific port
+ # within the machine from a port on the host machine. In the example below,
+ # accessing "localhost:8080" will access port 80 on the guest machine.
+ config.vm.network :forwarded_port, guest: 80, host: 8080
+
+ # Create a private network, which allows host-only access to the machine
+ # using a specific IP.
+ # config.vm.network :private_network, ip: "192.168.33.10"
+
+ # Create a public network, which generally matched to bridged network.
+ # Bridged networks make the machine appear as another physical device on
+ # your network.
+ # config.vm.network :public_network
+
+ # If true, then any SSH connections made will enable agent forwarding.
+ # Default value: false
+ # config.ssh.forward_agent = true
+
+ # Share an additional folder to the guest VM. The first argument is
+ # the path on the host to the actual folder. The second argument is
+ # the path on the guest to mount the folder. And the optional third
+ # argument is a set of non-required options.
+ # config.vm.synced_folder "../data", "/vagrant_data"
+
+ # Provider-specific configuration so you can fine-tune various
+ # backing providers for Vagrant. These expose provider-specific options.
+ # Example for VirtualBox:
+ #
+ # config.vm.provider :virtualbox do |vb|
+ # # Don't boot with headless mode
+ # vb.gui = true
+ #
+ # # Use VBoxManage to customize the VM. For example to change memory:
+ # vb.customize ["modifyvm", :id, "--memory", "1024"]
+ # end
+ #
+ # View the documentation for the provider you're using for more
+ # information on available options.
+
+ # Enable provisioning with Puppet stand alone. Puppet manifests
+ # are contained in a directory path relative to this Vagrantfile.
+ # You will need to create the manifests directory and a manifest in
+ # the file debian-puppet.pp in the manifests_path directory.
+ #
+ # An example Puppet manifest to provision the message of the day:
+ #
+ # # group { "puppet":
+ # # ensure => "present",
+ # # }
+ # #
+ # # File { owner => 0, group => 0, mode => 0644 }
+ # #
+ # # file { '/etc/motd':
+ # # content => "Welcome to your Vagrant-built virtual machine!
+ # # Managed by Puppet.\n"
+ # # }
+ #
+ # config.vm.provision :puppet do |puppet|
+ # puppet.manifests_path = "manifests"
+ # puppet.manifest_file = "site.pp"
+ # end
+
+ # Enable provisioning with chef solo, specifying a cookbooks path, roles
+ # path, and data_bags path (all relative to this Vagrantfile), and adding
+ # some recipes and/or roles.
+ #
+ # config.vm.provision :chef_solo do |chef|
+ # chef.cookbooks_path = "../my-recipes/cookbooks"
+ # chef.roles_path = "../my-recipes/roles"
+ # chef.data_bags_path = "../my-recipes/data_bags"
+ # chef.add_recipe "mysql"
+ # chef.add_role "web"
+ #
+ # # You may also specify custom JSON attributes:
+ # chef.json = { :mysql_password => "foo" }
+ # end
+
+ # Enable provisioning with chef server, specifying the chef server URL,
+ # and the path to the validation key (relative to this Vagrantfile).
+ #
+ # The Opscode Platform uses HTTPS. Substitute your organization for
+ # ORGNAME in the URL and validation key.
+ #
+ # If you have your own Chef Server, use the appropriate URL, which may be
+ # HTTP instead of HTTPS depending on your configuration. Also change the
+ # validation key to validation.pem.
+ #
+ # config.vm.provision :chef_client do |chef|
+ # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
+ # chef.validation_key_path = "ORGNAME-validator.pem"
+ # end
+ #
+ # If you're using the Opscode platform, your validator client is
+ # ORGNAME-validator, replacing ORGNAME with your organization name.
+ #
+ # If you have your own Chef Server, the default validation client name is
+ # chef-validator, unless you changed the configuration.
+ #
+ # chef.validation_client_name = "ORGNAME-validator"
+
+ config.vm.provision "shell",
+ inline: '# For obnoxious "facter fqdn"
+grep -q "domain internal" /etc/resolv.conf || echo "domain internal" >> /etc/resolv.conf
+# Install vagrant modules - if necessary, otherwise provisionning fails
+[ -d /etc/puppet/modules/stdlib/ ] || puppet module install puppetlabs/stdlib
+cat <<EOF > /etc/puppet/hiera.yaml
+---
+:yaml:
+ :datadir: /vagrant/
+EOF
+'
+
+ # Config mounted Puppet paths manually to avoid messing with --modulepath above:
+ config.vm.synced_folder "./modules/", "/etc/puppet/modules/"
+ config.vm.hostname='www.internal'
+ config.vm.provision "puppet" do |puppet|
+ puppet.manifest_file = "site.pp"
+ end
+end
diff --git a/webserver/wwwcvs-orig-files/manifests/site.pp b/webserver/wwwcvs-orig-files/manifests/site.pp
new file mode 100644
index 0000000..4967dce
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/manifests/site.pp
@@ -0,0 +1,9 @@
+File {
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+}
+
+node www {
+ include wwwgnu-nongnu
+}
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/new.py b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/new.py
new file mode 100644
index 0000000..dd455a6
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/new.py
@@ -0,0 +1,72 @@
+import os,sys
+import string
+from mod_python import apache, util
+from syslog import *
+import stat
+
+# baughj, 2007.07.06 - add logging, usage of subprocess
+# baughj, 2007.07.16 - make sure to chgrp/chmod checked out directory so that
+# it can be updated by wwwcvs user later - why doesn't everything (cron job,
+# etc) run as one user?
+# add new 'translation' type for translation team webspace, see RT #348523.
+# ward, 2008-08-18
+
+# Stripped out actual cvs update, this script now just requests an update.
+# See /usr/local/bin/update-cvs.sh for the actual cvs update code (and that
+# script is run from cron)
+# ward, 2012-09-26
+
+CHECKOUT = "/var/www/savannah-checkouts/"
+LOGFILE = "/var/log/wwwcvs/new-savannah-project.log"
+
+def touch(fname, times=None):
+ with file(fname, 'a'):
+ os.utime(fname, times)
+ os.chmod(fname, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IROTH | stat.S_IWOTH)
+
+def request_update (type, project=''):
+ if type == 'www':
+ touch('/usr/local/to-update/www')
+ syslog(LOG_INFO, "Update requested for type: %s" % type)
+ return
+ touch('/usr/local/to-update/%s___%s' % (type, project))
+ syslog(LOG_INFO, "Update requested for type: %s (project %s)" % (type,project))
+ return
+
+def handler (req):
+ openlog('savannah-update', 0, LOG_LOCAL6)
+ form = util.FieldStorage (req)
+
+ req.content_type = 'text/html'
+ req.send_http_header ()
+
+ type = None
+ project = None
+ if form.has_key('type'):
+ type = form['type']
+ if form.has_key('project'):
+ project = form['project']
+
+ if (type == 'www'):
+ request_update('www')
+ req.content_type = 'text/html'
+ req.send_http_header ()
+ return apache.OK
+
+ if not (type and project):
+ syslog(LOG_ERR, 'Error: missing type or project. Aborting.')
+ return apache.HTTP_NOT_FOUND
+
+ if (type != 'gnu') and (type != 'non-gnu') and (type != 'translations'):
+ syslog(LOG_ERR, "Error: Type unknown, was %s. Aborting." % type)
+ return apache.HTTP_NOT_FOUND
+
+ if string.find (project, "/") != -1:
+ syslog(LOG_ERR, "Error: / found in project name %s" % project)
+ return apache.HTTP_NOT_FOUND
+
+ request_update(type,project)
+ req.content_type = 'text/html'
+ req.send_http_header ()
+
+ return apache.OK
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/star.nongnu.org b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/star.nongnu.org
new file mode 100644
index 0000000..aaaccc1
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/star.nongnu.org
@@ -0,0 +1,36 @@
+<VirtualHost *:80>
+
+# 2005.08.20 - 2005.08.23
+#
+# This is a somewhat "clever" way of working around the ugliness of
+# providing *.nongnu.org, and supercedes the original rewrite
+# mess.
+#
+# The idea here is to work with .symlinks (and the generated
+# symlinks.conf) but without as little redirection or rewriting as
+# possible. Rewriting based on %{HTTP_HOST} was incredibly
+# problematic because of the later rewrites that may occur from
+# .symlinks. We give the server a fake name and then alias everything
+# *.nongnu.org to it. Since www.nongnu.org is canonically defined
+# above as a ServerName, it takes precedence - only project hosts
+# are caught by this net.
+#
+# - baughj
+
+ServerName foobar.nongnu.org
+ServerAlias *.nongnu.org
+
+<Directory /var/www/savannah-checkouts/non-gnu>
+ Options +Indexes
+</Directory>
+
+VirtualDocumentRoot /var/www/savannah-checkouts/non-gnu/%1
+CustomLog /var/log/apache2/nongnu-projects.log combined
+ErrorLog /var/log/apache2/nongnu-projects-error.log
+UseCanonicalName Off
+
+# Include vhost symlinks
+
+Include /etc/apache2/symlinks/symlinks-nongnu-vhost.conf
+
+</VirtualHost>
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-cvs.sh b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-cvs.sh
new file mode 100644
index 0000000..62ac513
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-cvs.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+# Handle cvs updates. This script looks at
+# /usr/local/to-update/
+# where the
+# /var/www/new-savannah-project/new.py
+# script creates empty files if there is work to do.
+#
+# Ward Vandewege, 2012-09-26
+
+DIR="/usr/local/to-update/"
+RUNUSER="wwwcvs"
+
+CHECKOUT="/var/www/savannah-checkouts"
+LOGFILE="/var/log/wwwcvs/update-cvs.log"
+
+if [[ "$(whoami)" != "$RUNUSER" ]]; then
+ echo "Script must be run as user: $RUNUSER"
+ exit -1
+fi
+
+if [[ -e $DIR/www ]]; then
+ cd /var/www
+ echo `date` >> $LOGFILE
+ echo "www: Beginning checkout" >> $LOGFILE
+ /usr/bin/cvs update -Pd . >> $LOGFILE 2>&1
+ rm -f $DIR/www
+ echo "www: CVS checkout completed" >> $LOGFILE
+fi
+
+for f in `ls $DIR`; do
+ NEXT=`expr index "$f" '___'`
+ if [[ "$NEXT" == "0" ]]; then
+ continue
+ fi
+
+ arr=`echo $f | tr -s "___" ' '`
+ T=''
+ for x in $arr; do
+ if [[ "$T" == '' ]]; then
+ T=$x
+ else
+ P=$x
+ fi
+ done
+
+ cd $CHECKOUT/$T
+ echo `date` >> $LOGFILE
+ echo "$P: Beginning checkout (type $T)" >> $LOGFILE
+ if [[ ! -d $P ]]; then
+ # Cf. RT #816041. This is lunacy. Ward, 2013-03-28.
+ mkdir $P
+ fi
+ /usr/bin/cvs -d :pserver:anoncvs@cvs.savannah.gnu.org:/webcvs/$P checkout -P $P >> $LOGFILE 2>&1
+ echo "$P: CVS checkout completed (type $T)" >> $LOGFILE
+ rm -f $DIR/$f
+
+done
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-gnu-rewritemaps b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-gnu-rewritemaps
new file mode 100755
index 0000000..96b78ef
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-gnu-rewritemaps
@@ -0,0 +1,280 @@
+#! /bin/bash
+# Create plain text maps for mod_rewrite from .symlinks files.
+# Main control is at the end.
+#
+# Originally written by Ineiev <ineiev@gmail.com>, feb 2011.
+# Ineiev <ineiev@gmail.com>, Mar 2012: fix links to absolute paths.
+
+web_root=${1-/srv/data/www-mirror}
+www_maps_dir=${2-~}
+verbose=${3-no}
+
+# The fancy /%\// here removes any trailing / that might have been
+# specified in the above variables, since we re-insert the / below.
+# Maybe not 100% necessary, but cleaner.
+web_root=${web_root/%\//}
+www_maps_dir=${www_maps_dir/%\//}
+
+max_link_depth=17
+
+# These file names are used in the vhost configuration.
+html_map_name=html-map.txt
+nonhtml_map_name=nonhtml-map.txt
+dir_map_name=dir-map.txt
+
+SED=sed
+FIND=find
+
+# function to filter out from file "$1" any
+# empty lines, comments, trailing spaces, invalid lines;
+# and replace multiple spaces with single one;
+# and prefix the line with its number if "$2" is "-n".
+cleanup-symlinks () {
+ ${SED} "s/#.*//;s/[[:blank:]]\+/ /g;\
+ s/[[:blank:]]$//;s/^[[:blank:]]//" "$1" \
+ | grep $2 ".[[:blank:]]." | grep -v "[[:blank:]].*[[:blank:]]"
+}
+
+# check if the file or directory exists,
+# assign the "type" variable accordignly
+get-file-type () {
+ if test -f "$1"; then
+ type=file
+ if test ${verbose} = yes; then
+ echo found $1 file
+ fi
+ return 0;
+ fi
+ if test -d "$1"; then
+ type=directory
+ if test ${verbose} = yes; then
+ echo found $1 directory
+ fi
+ return 0;
+ fi
+ type=
+ return 1;
+}
+
+# sed programs to normalize paths
+simplify_path=":cycle;s%/[^/]*/\.\./%/%;t cycle"
+normalize_link="${simplify_path};"
+# should we add something like
+# "s%\(^\| \)/savannah-checkouts/gnu%\1/software%g"
+# to normalize_link?
+
+# function used to subsitute software <-> savannah-checkouts/gnu in paths
+substitute-path () {
+ aliased_path=$(echo $1 | ${SED} "s%^/$2%/$3%;${simplify_path}")
+ if test ${verbose} = yes; then
+ echo "$1 is absent; I'll look in /$3"
+ fi
+}
+
+substitute-software () {
+ substitute-path "$1" software savannah-checkouts/gnu
+}
+
+substitute-checkouts () {
+ substitute-path "$1" savannah-checkouts/gnu software
+}
+
+# output the common part for diagnostic messages
+show-current-line () {
+ printf "%s" "${web_root}${symlinks_directory}.symlinks:$lineno: "
+ echo ${current_line} | ${SED} "s/[[:blank:]]\+/ <- /"
+}
+
+# function to process a single .symlinks file.
+append-symlinks () {
+
+ if test ${verbose} = yes; then
+ echo processing file "$1":
+ fi
+ symlinks_directory=$(echo $1 \
+ | ${SED} "s ^${web_root}/\(.*\)\.symlinks$ /\1 ")
+ cleanup-symlinks "$1" -n | while read current_line; do
+ lineno=$(echo ${current_line} | ${SED} "s/:.*//")
+ current_line=$(echo ${current_line} | ${SED} "s/^[^:]*://")
+
+ link=$(echo ${current_line} | ${SED} "s/^.*[[:blank:]]//")
+ target=$(echo ${current_line} | ${SED} "s/[[:blank:]].*$//")
+ target_directory=${symlinks_directory}
+
+ if test ${verbose} = yes; then
+ echo line ${lineno}: ${current_line}
+ fi
+
+ link_depth=0
+ type=none
+ # follow subsequent links until we get the real thing or find an error
+ while true; do
+ case "x${target}" in
+ # external link
+ x*://*)
+ full_target="${target}"
+ type=external
+ break
+ ;;
+ # absolute link
+ x/*)
+ target_directory=
+ ;;
+ esac
+ # check if the target exists
+ if get-file-type "${web_root}${target_directory}${target}"; then
+ full_target="${target_directory}${target}"
+ break
+ fi
+ case "x${target_directory}${target}" in
+ # look for /software files in /savannah-checkouts/gnu
+ x/software/*)
+ substitute-software "${target_directory}${target}"
+ if get-file-type "${web_root}${aliased_path}"; then
+ full_target="${aliased_path}"
+ break
+ fi
+ ;;
+ # look for /savannah-checkouts/gnu files in /software
+ x/savannah-checkouts/gnu*)
+ substitute-checkouts "${target_directory}${target}"
+ if get-file-type "${web_root}${aliased_path}"; then
+ full_target="${aliased_path}"
+ break
+ fi
+ ;;
+ esac
+ target_directory=$(echo ${target_directory}${target} \
+ | ${SED} "s%[^/]*$%%")
+ target_symlinks=${target_directory}.symlinks
+ if test ! -f "${web_root}${target_symlinks}"; then
+ # no .symlinks file found: try alternative places
+ # (/software for /savannah-checkouts/gnu and vice versa
+ case "x${target_symlinks}" in
+ x/software/*)
+ substitute-software "${target_symlinks}"
+ target_symlinks="$aliased_path"
+ if test ! -f "${web_root}${target_symlinks}"; then
+ type=no-symlinks
+ break
+ fi
+ target_directory=${target_symlinks/%.symlinks/}
+ ;;
+ x/savannah-checkouts/gnu*)
+ substitute-checkouts "${target_symlinks}"
+ target_symlinks="$aliased_path"
+ if test ! -f "${web_root}${target_symlinks}"; then
+ type=no-symlinks
+ break
+ fi
+ target_directory=${target_symlinks/%.symlinks/}
+ ;;
+ *)
+ type=no-symlinks
+ break
+ ;;
+ esac
+ fi
+
+ escaped_target=$(echo ${target} | ${SED} "s%.*/%%;s/\./\\\\./g")
+ if ! cleanup-symlinks "${web_root}${target_symlinks}" \
+ | grep -q "[[:blank:]]${escaped_target}$"; then
+ type=no-subsequent-link
+ break
+ fi
+ target=$(cleanup-symlinks "${web_root}${target_symlinks}" \
+ | ${SED} -n "s/[[:blank:]]${escaped_target}$//p")
+ link_depth=$(expr ${link_depth} + 1)
+ if test ${link_depth} -gt ${max_link_depth}; then
+ type=deep-link
+ break
+ fi
+ if test ${verbose} = yes; then
+ echo "go to the next target (depth ${link_depth}): ${target}"
+ fi
+ done # while true
+
+ # output the results of our link analysis
+ case ${type} in
+ file)
+ if (echo ${target} | grep -q "\.html$") \
+ && (echo ${link} | grep -q "\.html$"); then
+ echo ${symlinks_directory}${link} ${full_target} \
+ | ${SED} "s/\.html[[:blank:]]*/ /;s/\.html$//;\
+ ${normalize_link}" >> "${html_map_name}"
+ if test ${verbose} = yes; then
+ echo link to a HTML file found
+ fi
+ else
+ echo ${symlinks_directory}${link} ${full_target} \
+ | ${SED} "${normalize_link}" >> "${nonhtml_map_name}"
+ if test ${verbose} = yes; then
+ echo link to a non-HTML file found
+ fi
+ fi
+ ;;
+ directory | external)
+ echo ${symlinks_directory}${link} ${full_target} \
+ | ${SED} "${normalize_link}" >> "${dir_map_name}"
+ if test ${verbose} = yes; then
+ echo ${type} link found
+ fi
+ ;;
+ no-symlinks)
+ show-current-line
+ echo " ${target_symlinks} list"
+ echo " and ${target} file/directory are absent."
+ ;;
+ no-subsequent-link)
+ show-current-line
+ echo " ${target} file/directory is absent,"
+ echo " and no subsequent link in ${target_directory}.symlinks found."
+ ;;
+ deep-link)
+ show-current-line
+ echo " link depth limit ${max_link_depth} has been reached."
+ ;;
+ *)
+ show-current-line
+ echo " an unclassified error occurred."
+ exit 1
+ ;;
+ esac # case ${type} in
+ done # cleanup-symlinks "$1" -n | while read current_line; do
+}
+
+# Main program.
+
+if test "x${verbose}" != xyes; then
+ verbose=no
+fi
+
+html_map_name="${www_maps_dir}/${html_map_name}"
+nonhtml_map_name="${www_maps_dir}/${nonhtml_map_name}"
+dir_map_name="${www_maps_dir}/${dir_map_name}"
+
+# Initialize the output files.
+WARNING="# DO NOT EDIT, GENERATED by $0 `date`"
+echo ${WARNING} > "${html_map_name}"
+echo "# links to HTML files" >> "${html_map_name}"
+echo ${WARNING} > "${nonhtml_map_name}"
+echo "# links to non-HTML files" >> "${nonhtml_map_name}"
+echo ${WARNING} > "${dir_map_name}"
+echo "# links to directories and external links" >> "${dir_map_name}"
+
+# Scan every .symlinks file except
+# in non-gnu projects (they are managed with another script).
+${FIND} "${web_root}" -type f -name '.symlinks' \
+ ! -path "${web_root}/savannah-checkouts/non-gnu/*" \
+ -print \
+| while read next_file; do
+ append-symlinks ${next_file}
+ done
+
+# transform directory and external links into rewriterules
+${SED} -i '/^[^#]/ { h; s/ .*//;s/\./\\./g;
+ x; s/.* //; H; x; s/\n/ /;
+ s/ /((\/.*)?)$ /;
+ s/^/RewriteRule ^/;
+ s/ *$/$1 [R=302,L]/
+ }' "${dir_map_name}"
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks-xargs.py b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks-xargs.py
new file mode 100644
index 0000000..206fac6
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks-xargs.py
@@ -0,0 +1,122 @@
+#!/usr/bin/python
+# Use mod_rewrite as opposed to creating real symlinks.
+# (c) 2003, 2011, Free Software Foundation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# ChangeLog
+#
+# 2011.03.01 - Escape dots for Apache regexps. Exclude links for gnu
+# projects (they are regenerated with another script).
+#
+# 2007.11.08 - Change the script to accept more than one file at a time
+# as a commandline argument. This requires changing the order of the args
+# and I'm changing the calling shell script to reflect this
+#
+# 2005.08.23 - Change the script to support a command line argument of
+# {gnu|nongnu|nongnu-vhost}. These arguments change the form of the rewrite
+# rules output (and if they are output).
+# - baughj
+
+import sys
+import re
+from string import *
+from urllib import quote
+from os import lstat
+from stat import *
+from os.path import basename,dirname
+import os.path
+
+# escape dots in regexps
+def escape (str):
+ new_str = ''
+ for x in str:
+ if x == '.':
+ new_str = "%s\%s" % (new_str, x)
+ else:
+ new_str = "%s%s" % (new_str, x)
+ return new_str
+
+def create_rewrite_rule (links, cwd, type):
+ if len(links) != 2 or links[0][0] == '#':
+ return
+
+ # This is an ugly, horrid mess.
+
+ # Also, hilarity: We need to check for the existence of :// so we don't
+ # screw up offsite links that should Just Work.
+
+ external_link = re.compile('://').search(links[0])
+
+ if (type == 'nongnu-vhost'):
+ base = replace(cwd, '/var/www/savannah-checkouts/non-gnu/', '')
+ basedir = dirname(base)
+ if basedir:
+ relativepath = replace(base,basedir,'')
+ else:
+ relativepath = None
+
+ if ((links[1] == "index.html") or
+ (links[1] == "index.shtml") or
+ (links[1] == "index.xhtml")):
+ if (type == 'nongnu' or external_link):
+ print "RewriteRule ^[\./]*$ %s [L]" % (links[0],)
+ else:
+ if relativepath:
+ print "RewriteRule ^[\./]*$ %s/%s [L]" % (relativepath, links[0],)
+ else:
+ print "RewriteRule ^[\./]*$ /%s [L]" % (links[0])
+
+ if (type == 'nongnu' or external_link):
+ print "RewriteRule ^%s$ %s [L]" % (escape (links[1]), links[0])
+ print "RewriteRule ^%s/(.*)$ %s/$1 [L]" % (escape (links[1]), links[0])
+ else:
+ if relativepath:
+ print "RewriteRule ^%s$ %s/%s [L]" % (escape(links[1]), relativepath, links[0])
+ print "RewriteRule ^%s(.*)$ %s/%s/$1 [L]" % (escape(links[1]), relativepath, links[0])
+ else:
+ print "RewriteRule ^%s$ /%s [L]" % (escape (links[1]), links[0])
+ print "RewriteRule ^%s/(.*)$ /%s/$1 [L]" % (escape (links[1]), links[0])
+
+def main():
+ symlink_group = sys.argv[1]
+ for filename in sys.argv[2:]:
+ # print 'filename is ', filename
+ f = open(filename,'r')
+ cwd = os.path.split(filename)[0]
+ # print 'cwd is', cwd
+ nongnu = cwd.startswith('/var/www/savannah-checkouts/non-gnu/')
+ gnu = cwd.startswith('/var/www/savannah-checkouts/gnu/')
+ try:
+ if ((symlink_group == 'gnu') or gnu or \
+ (symlink_group == 'nongnu' and not nongnu) or \
+ (symlink_group == 'nongnu-vhost' and not nongnu)):
+ continue
+ except IndexError:
+ print "usage: update-symlinks.py <symlink file> [gnu|nongnu|nongnu-vhost]"
+ sys.exit(0)
+ # this is a nasty hack
+
+ print "<Directory %s>" % (cwd,)
+ print "RewriteEngine on"
+
+ for line in f.readlines():
+ create_rewrite_rule (split(line.strip()), cwd, symlink_group)
+
+ f.close ()
+ print "</Directory>"
+
+if __name__ == '__main__':
+ main()
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks.sh b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks.sh
new file mode 100755
index 0000000..c733e12
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/update-symlinks.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+if [ -e /var/tmp/update-symlinks.pid ]; then
+ # See if the process is still running
+ pid=`cat /var/tmp/update-symlinks.pid`
+ if [ -e /proc/$pid ]; then
+ # send a warning mail and abort
+ mail -s "[wildebeest] update-symlinks warning: pid $pid still active" sysadmin@gnu.org < /dev/null > /dev/null
+ exit -1
+ else
+ # Stale file, overwrite it, onwards and upwards
+ echo $$ > /var/tmp/update-symlinks.pid
+ fi
+else
+ # Output our PID to the pid file
+ echo $$ > /var/tmp/update-symlinks.pid
+fi
+
+exec >> /var/log/wwwcvs/update-symlinks.log 2>&1
+
+echo "Regenerating symlinks..."
+
+WARNING="# GENERATED BY /home/wwwcvs/update-symlinks.sh DO NOT EDIT"
+TMPFILE=`/bin/mktemp /tmp/hourly-website-update.XXXXXX || exit -1`
+/usr/bin/find /var/www -type f -name '.symlinks' >> $TMPFILE
+
+/home/wwwcvs/update-gnu-rewritemaps /var/www /home/wwwcvs/symlinks > /dev/null
+
+printf "${WARNING}\n\n" > /home/wwwcvs/symlinks-nongnu-vhost.conf
+cat $TMPFILE | xargs /home/wwwcvs/update-symlinks-xargs.py nongnu-vhost >> /home/wwwcvs/symlinks-nongnu-vhost.conf
+
+printf "${WARNING}\n\n" > /home/wwwcvs/symlinks-nongnu.conf
+cat $TMPFILE | xargs /home/wwwcvs/update-symlinks-xargs.py nongnu >> /home/wwwcvs/symlinks-nongnu.conf
+
+CHANGED=0
+
+dir1=/etc/apache2/symlinks
+dir2=/home/wwwcvs/symlinks
+
+# these need the -I to ignore comments.
+for file in dir-map.txt html-map.txt nonhtml-map.txt; do
+ diff -I "^#" -q {$dir1,$dir2}/$file
+ if [[ "$?" != "0" ]]; then
+ cp -f {$dir2,$dir1}/$file
+ CHANGED=1
+ fi
+done
+
+# nongnu files lack the comments and are in the top-level dir.
+dir2=/home/wwwcvs
+for file in symlinks-nongnu.conf symlinks-nongnu-vhost.conf; do
+ diff -q {$dir1,$dir2}/$file
+ if [[ "$?" != "0" ]]; then
+ cp -f {$dir2,$dir1}/$file
+ CHANGED=1
+ fi
+done
+
+rm -f $TMPFILE
+echo "Regeneration complete."
+
+if [ "$CHANGED" == "1" ]; then
+ echo "Restarting apache...."
+ sudo /usr/sbin/apache2ctl graceful && echo "Restart successful."
+else
+ echo "No changes, no apache restart necessary"
+fi
+
+# Remove our lock/pid file
+
+rm -f /var/tmp/update-symlinks.pid && echo "update-symlinks finished `date`" && exit 0
+
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org
new file mode 100644
index 0000000..2538442
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org
@@ -0,0 +1,32 @@
+<VirtualHost *:80>
+ ServerName www.gnu.org
+ ServerAdmin webmasters@gnu.org
+
+ # Temporary for IPv6: we'll assign the AAAA record directly to
+ # www.gnu.org when we're 100% confident about its reliability
+ ServerAlias www.ipv6.gnu.org
+ ServerAlias www6.gnu.org
+
+ DocumentRoot /var/www/
+
+ # The super secret RMS webxfer script that used to run on
+ # https://www.gnu.org/software/goodbye and got nadesico compromised now has its
+ # own private VM: goodbye.gnu.org.
+ # See also #658521
+ # Ward, 2011-02-02
+ RewriteEngine on
+ RewriteCond %{REQUEST_URI} ^/software/goodbye.*$
+ RewriteRule ^(.*)$ https://goodbye.gnu.org$1
+
+ ErrorLog /var/log/apache2/gnu.org-error.log
+ CustomLog /var/log/apache2/gnu.org-access.log combined
+
+ # Enable this to get compression ratio and other interesting details
+ #LogLevel debug
+
+ Include /etc/apache2/sites-available/www.gnu.org-common
+
+# LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
+# CustomLog /var/log/apache2/deflate.log deflate
+
+</VirtualHost>
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org-common b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org-common
new file mode 100644
index 0000000..7937796
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.gnu.org-common
@@ -0,0 +1,366 @@
+
+ AddHandler server-parsed .html .shtml
+ #DirectoryIndex index.html index.shtml index.xhtml home.html home.shtml
+ DirectoryIndex index.html home.html
+ <Directory /var/www/>
+ # Turn on SSI processing
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ AllowOverride Indexes FileInfo Limit
+ </Directory>
+
+ <Directory /var/www/software>
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ </Directory>
+
+ <Directory /var/www/savannah-checkouts>
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ AllowOverride Indexes FileInfo Limit
+ </Directory>
+
+ # The clisp project has old SSI commands in their html files, but they are
+ # broken. They asked us to disable SSI on their pages. See #656741. I've asked
+ # them to clean up their pages, in the mean time we have the following.
+ # 2011-01-18, Ward.
+ <Directory /var/www/savannah-checkouts/gnu/clisp>
+ Options Indexes -IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ AllowOverride Indexes FileInfo Limit
+ </Directory>
+
+ # Cf RT #703015; we need apache 2.2.15 for this... Ward, 2011-11-07
+ #SSILastModified off
+
+
+ # Timeout: The number of seconds before receives and sends time out.
+ # Defaults to 300; new.py in new-savannah-project sometimes takes (much) longer.
+ # I wish there was a way to set this just for one directory, this is a bit scary.
+ # Ward, 2012-09-26.
+ TimeOut 3000
+
+ # Probably better hidden. Cf. RT #835581. Ward, 2013-06-12
+ <Directory /var/www/CVS>
+ Order Deny,Allow
+ Deny from all
+ </Directory>
+
+ <Directory /var/www/new-savannah-project>
+ Order Deny,Allow
+ Deny from all
+
+ # Savannah IPs
+ Allow from 140.186.70.70
+ Allow from 140.186.70.71
+ Allow from 140.186.70.72
+ Allow from 140.186.70.73
+ Allow from 140.186.70.74
+ Allow from 140.186.70.75
+
+ Allow from 208.118.235.70
+ Allow from 208.118.235.71
+ Allow from 208.118.235.72
+ Allow from 208.118.235.73
+ Allow from 208.118.235.74
+ Allow from 208.118.235.75
+
+ # Office dsl
+ Allow from 74.94.156.210
+
+ # localhost
+ Allow from 127.0.0.1
+
+ AddHandler python-program .py
+ PythonHandler new
+ PythonDebug on
+ </Directory>
+
+ <Directory /var/www/new-savannah-project2>
+ Order Deny,Allow
+ Deny from all
+
+ # Savannah IPs
+ Allow from 140.186.70.70
+ Allow from 140.186.70.71
+ Allow from 140.186.70.72
+ Allow from 140.186.70.73
+ Allow from 140.186.70.74
+ Allow from 140.186.70.75
+
+ Allow from 208.118.235.70
+ Allow from 208.118.235.71
+ Allow from 208.118.235.72
+ Allow from 208.118.235.73
+ Allow from 208.118.235.74
+ Allow from 208.118.235.75
+
+ # Office dsl
+ Allow from 74.94.156.210
+
+ # localhost
+ Allow from 127.0.0.1
+
+ AddHandler python-program .py
+ PythonHandler new2
+ PythonDebug on
+ </Directory>
+
+
+ <FilesMatch "\.(ico|pdf|jpe?g|png|gif|js|css)$">
+ ExpiresActive On
+ ExpiresDefault "access plus 1 month"
+ </FilesMatch>
+
+ # jag: RT#363702
+ ExpiresActive On
+ ExpiresByType text/html M600
+
+ #rt#486596
+ #ExpiresByType image/gif A86400
+ #ExpiresByType image/png A86400
+ #ExpiresByType image/jpg A86400
+ #ExpiresByType text/css A86400
+ #ExpiresByType text/javascript A86400
+
+ # jag: Switched 404 from CGI to a mod_python script
+ # ErrorDocument 404 /cgi-bin/404.cgi
+ # disabled this abomination. too slow. ward, 2008-09-02
+ #ErrorDocument 404 /mp404/404.py
+ ErrorDocument 404 /gnu-404.html
+
+ # added as per RT #326793. Ward, 2007-01-08.
+ <Files *.php>
+ ForceType text/html
+ </Files>
+
+ # Rewrite rules take precedence over ScriptAlias, so we set up the equivalent
+ # of
+ # ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+ # by means of a Directory block and a few rewrite rules (ending in 'L' so no
+ # other rewrite rules will be processed).
+ # Ward, 2011-12-23
+
+ <Directory /usr/lib/cgi-bin >
+ Options ExecCGI SymLinksIfOwnerMatch
+ SetHandler cgi-script
+ </Directory>
+
+ RewriteCond %{REQUEST_FILENAME} /cgi-bin/
+ RewriteRule ^/cgi-bin(/.*)$ /usr/lib/cgi-bin$1 [L]
+
+ # For the new directory.
+ # Ward, 2011-09-29
+ RewriteRule ^/rss/quagga.rss$ http://directory.fsf.org/wiki?title=Special:RecentChanges&feed=atom [R=301]
+
+ # Cf #708151. Ward, 2011-09-14
+ RewriteRule ^/doc/termsofsale.html$ http://shop.fsf.org/termsofsale/ [R=301]
+
+ # Cf #697032. Ward, 2011-06-09
+ RewriteRule ^/doc/expanding.html$ http://www.fsf.org/campaigns/gnu-press/book-stores/expanding [R=301]
+ RewriteRule ^/doc/gnupresspub.html$ http://www.fsf.org/campaigns/gnu-press [R=301]
+ RewriteRule ^/doc/contact.html$ http://www.fsf.org/campaigns/gnu-press/contact [R=301]
+ RewriteRule ^/doc/potentialauthors.html$ http://www.fsf.org/campaigns/gnu-press/authors [R=301]
+ RewriteRule ^/doc/teachingprofessionals.html$ http://www.fsf.org/campaigns/gnu-press/teachers [R=301]
+ RewriteRule ^/doc/gnupresslogo.jpg$ http://static.fsf.org/nosvn/gnupresslogo.png [R=301]
+ RewriteRule ^/doc/small-gnupress.png$ http://static.fsf.org/nosvn/gnupresslogo.png [R=301]
+ RewriteRule ^/doc/GNU-Press-styleguide.texi$ http://www.fsf.org/campaigns/gnu-press/GNU-Press-styleguide.texi [R=301]
+ RewriteRule ^/doc/GNU-Press-styleguide.pdf$ http://www.fsf.org/campaigns/gnu-press/GNU-Press-styleguide.pdf [R=301]
+ RewriteRule ^/doc/bibliography.html$ http://www.fsf.org/campaigns/gnu-press/gpl-biblio [R=301]
+
+ # RT# 364396 -- with new FSF store, take gnu pages for it offline
+ RewriteRule ^/gear/.* http://shop.fsf.org/category/gnu-gear/ [R]
+ RewriteRule ^/order/ftp.html http://www.gnu.org/prep/ftp.html [R]
+ RewriteRule ^/order/.* http://shop.fsf.org/ [R]
+
+ # RT#791315
+ RewriteRule ^/software/consensus(/?.*)$ http://gnu.org/consensus$1 [R,L]
+ RewriteRule ^/consensus(/?)$ /software/consensus/consensus.html
+ RewriteRule ^/consensus(/?.*)$ /software/consensus$1
+
+ # See the freesoftware.fsf.org virtual host entry for information
+ RewriteRule ^/non-gnu/(.*)$ http://www.freesoftware.fsf.org/$1 [R,L]
+
+ # Make sure Georg Greve home page is still reachable
+ RewriteRule ^/people/greve/ http://gnuhh.org/ [R,L]
+
+ # Online ordering
+ RewriteRule ^/donate((/.*)?)$ https://www.fsf.org/donate$1 [R,L]
+ RewriteRule ^/prep/mailinglists\.html$ https://lists.gnu.org/mailman/listinfo [R,L]
+ RewriteRule ^/prep/service\.html$ http://www.fsf.org/resources/service [R,L]
+
+ # jag: rt#332934
+ RewriteRule ^/help/donate\.(es\.)?html$ http://donate.fsf.org/ [R,L]
+
+ # Jobs page moved to fsf.org
+ # updated to go to /resources/jobs as per RT #335330 (ward)
+ RewriteRule ^/jobs((/.*)?)$ http://www.fsf.org/resources/jobs$1 [R,L]
+
+ # Redirect fsf pages to the FSF site
+ RewriteRule ^/fsf(/.*)?$ http://www.fsf.org/ [R,L]
+
+ #RewriteEngine on
+ #RewriteLogLevel 3
+ #RewriteLog "/var/log/apache2/rewrite.log"
+
+ # Redirect /software/www to www.gnu.org (RT #604511)
+ RewriteRule ^/software/www/$ http://www.gnu.org/ [R=301]
+ RewriteRule ^/software/www$ http://www.gnu.org/ [R=301]
+
+ # Speedx was renamed gnukart
+ RewriteRule ^/software/speedx(.*)$ http://www.gnu.org/software/gnukart$1 [R=301]
+
+ # tell wget scripts to go away
+ RewriteCond %{HTTP_USER_AGENT} ^Wget.*
+ RewriteRule ^/directory/(.*)$ - [G]
+
+ RewriteRule ^/directory/(.*)$ http://directory.fsf.org/wiki/$1 [R=301]
+ RewriteRule ^/directory$ http://directory.fsf.org/ [R=301]
+ RewriteRule ^/licenses/info/(.*)\.html$ http://directory.fsf.org/license/$1/ [R=301]
+
+ RewriteRule ^/assembly/(.*)$ http://assembly.gnu.org/$1 [R=301]
+ RewriteRule ^/assembly$ http://assembly.gnu.org/ [R=301]
+
+ # DO A BARREL^WRICK ROLL
+
+ RewriteRule ^/usenet/rms-gnusenet.html http://www.internetisseriousbusiness.com/ [R=301]
+ # Special cases for savannah checkouts:
+ RewriteRule ^/brave-gnu-world(.*)$ /software/bravegw$1
+ RewriteRule ^/projects/dotgnu(.*)$ /software/dotgnu$1
+ RewriteRule ^/software/GNUnet(.*)$ /software/gnunet$1 [R=301]
+ # Removed as per RT #369398. Ward, 2008-08-18
+ #RewriteRule ^/education(.*)$ /savannah-checkouts/gnu/education$1
+ RewriteRule ^/software/cp-tools(.*)$ /software/classpath/cp-tools$1 [R=301]
+ RewriteRule ^/software/ac-archive/(.*)$ http://autoconf-archive.cryp.to/$1 [R=301]
+ # jag: RT#255833
+ RewriteRule ^/software/emacs/elisp/(.*)$ /software/emacs/elisp-manual/$1
+ # jag: RT#358525
+ RewriteRule ^/ghm(/?.*)$ /software/ghm$1
+
+ # This has been broken for a long time, apparently. Ward, 2010-11-28
+ RewriteRule ^/copyleft(/.*rdf)$ /licenses/$1
+
+ # This is a weird VLC bug. Ward, 2011-12-21
+ RewriteRule ^/licenses/gpl-2.0.txt/udp/.*$ /licenses/gpl-2.0.txt [R=301]
+
+ ## Removed redirects - RT #535429. Ward, 2010-05-27
+ ##RewriteCond %{REMOTE_ADDR} !74.94.156.210
+ #RewriteRule ^/software/gcc(/.*)$ http://gcc.gnu.org$1
+
+ # At the request of Matt Lee. Ward, 2010-12-05
+ # Removed cf. RT #764846. Ward, 2012-07-09
+ #RewriteRule ^/software/social(.*)$ http://social.foocorp.net/software/social$1
+
+ # This is a consequence of the madness described at
+ # http://cluestick/wiki/Nadesico.gnu.org#.2Fvar.2Fwww.2Fsoftware.2Fgcc and in #535429
+ RewriteRule ^/software/gcc/wiki(/.*)$ http://gcc.gnu.org/wiki$1
+ RewriteRule ^/software/gcc/viewcvs(/.*)$ http://gcc.gnu.org/viewcvs$1
+ RewriteRule ^/software/gcc/onlinedocs(/.*)$ http://gcc.gnu.org/onlinedocs$1
+ RewriteRule ^/software/gcc/ml(/.*)$ http://gcc.gnu.org/ml$1
+ RewriteRule ^/software/gcc/install(/.*)$ http://gcc.gnu.org/install$1
+
+ # Redirect octave ML archives to velveeta.che.wisc.edu (RT #276337)
+
+ RewriteRule ^/software/octave/mailing-lists(.*) http://velveeta.che.wisc.edu/octave/lists$1
+
+ # This redirects every other project to the corresponding cvs checkout
+ RewriteCond /var/www/savannah-checkouts/gnu/$1 -d
+ RewriteRule ^/software/([^/]+)(.*)$ /savannah-checkouts/gnu/$1$2
+
+ # For the translation project webspace (RT #348523). Ward, 2008-08-18
+ RewriteCond /var/www/savannah-checkouts/translations/www-$1 -d
+ RewriteRule ^/server/standards/translations/([^/]+)(.*)$ /savannah-checkouts/translations/www-$1$2
+
+ # Classpath exception wiki. Used to be proxied from
+ RewriteRule ^/licensing/classpath(.*)$ http://developer.classpath.org/licensing$1 [R]
+
+ # Redirect /software/cvs to nongnu.org/cvs (RT #247259)
+ RewriteRule ^/software/cvs((/.*)?)$ http://www.nongnu.org/cvs$1 [R,L]
+
+ RewriteRule ^/events.html$ http://www.fsf.org/events
+
+ # Do not gzip images and files that are already gzipped. See #706271. Ward, 2011-09-28
+ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|gz)$ no-gzip dont-vary
+
+ # Multiview support - cf. RT #690688. Ward, 2011-12-21
+
+ # Remap MultiViews-conformant requests to the names of files in a
+ # CVS working copy, namely foo.html for English and foo.${lang}.html
+ # for translations, despite that Apache does not want to support that
+ # by default.
+ #
+ # In the end, http://gnu.org/provide.html and provide.en.html and
+ # provide.html.en should all get the English (actual file: provide.html).
+ # While http://gnu.org/provide.de.html and provide.html.de should get
+ # German (actual file: provide.de.html).
+ #
+ # Convenient command for testing that German is found first:
+ # wget -nv --header "Accept-Language: de;q=0.8, en;q=0.7" \
+ # http://testvhost.org/provide.html
+
+ # Enable SSI for .html one way or another. This is one way:
+ ## Ward - disabled; we do this more selectively above.
+ ##AddOutputFilter INCLUDES .html
+
+ # Because our web site has always used file.LANG.html instead of
+ # file.html.LANG, standard MultiViews does not do what we need.
+ # We have to use mod_rewrite to remap names so MultiViews will
+ # negotiate languages and yet still serve our existing files.
+ # http://httpd.apache.org/docs/current/mod/mod_rewrite.html
+
+ # The *-map.txt files used in these RewriteMap and Include directives are
+ # generated by the update-gnu-rewritemaps script.
+
+ # Apply redirections for external links and directories.
+ # This is an Include instead of a Map because we want things like
+ # www.gnu.org/g to be visibly rewritten to www.gnu.org/graphics.
+ Include /etc/apache2/symlinks/dir-map.txt
+
+ # Redirect requests for non-HTML files (.texi, etc.) whose translations
+ # we don't need to be automatically selected with MultiViews.
+ RewriteMap nonhtml_symlinks txt:/etc/apache2/symlinks/nonhtml-map.txt
+ RewriteRule (.*) ${nonhtml_symlinks:$1|$1}
+
+ # Redirect requests for HTML files (one link fits all translations).
+ RewriteMap html_symlinks txt:/etc/apache2/symlinks/html-map.txt
+ RewriteRule ^(.*)\.en\.html$ ${html_symlinks:$1|$1}.en.html [S=2]
+ RewriteRule ^(.*?)(((\...(-..)?)?\.html)|(\.html(\...(-..)?)))$ \
+ ${html_symlinks:$1|$1}$2 [S=1]
+ # Redirect also extensionless requests.
+ RewriteRule ^(.*)$ ${html_symlinks:$1|$1}
+
+ # Don't localize included files, e.g., the fragments under /server.
+ # This file is generated by the script /server/source/gen-include-file-list.
+ RewriteMap pass_includes txt:/var/www/server/include-file-list.txt
+ RewriteRule ^(.*)\.html$ ${pass_includes:$1|$1}.html
+
+ # Skip MultiViews rewriting if a gzipped file, or ...
+ RewriteCond %{REQUEST_URI} \.gz$ [OR]
+
+ # ... if the file is in a package-specific checkout from savannah.
+ # This includes the gnu.org translation team pages (/translations),
+ # the GNU package pages handled by the maintainers (/gnu),
+ # and the non-GNU packages (/non-gnu).
+ RewriteCond %{REQUEST_FILENAME} /savannah-checkouts/ [OR]
+
+ # ... if the file is in /prep/. We don't translate documentation
+ # there, and some files from /prep/ have the same names as directories.
+ # That would result in Error 404 File Not Found.
+ RewriteCond %{REQUEST_FILENAME} /prep/
+
+ # This no-op rule ends processing if either of the above
+ # RewriteConds are satisfied.
+ RewriteRule (.*) $1 [L]
+
+ # Redirect foo.html.${lang} to foo.${lang}.html,
+ # where ${lang} might have the form aa, or aa-BB.
+ RewriteRule ^(.*)\.html\.(..(-..)?)$ $1.$2.html
+
+ # Redirect foo.en.html to foo.html and skip the next rule for
+ # MultiViews (S=1), since we now know what file we want.
+ RewriteRule ^(.*)\.en\.html$ $1.html [S=1]
+
+ # Redirect foo.html to foo.
+ # After this redirection, MultiViews should take over.
+ RewriteCond %{REQUEST_FILENAME} !(\...(-..)?\.html)$
+ RewriteRule ^(.*)\.html$ $1
+
+ # Prevent Apache from interpreting the result
+ # as a local filesystem path, e.g., "/home".
+ RewriteRule ^(/.*)$ %{DOCUMENT_ROOT}$1
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.nongnu.org b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.nongnu.org
new file mode 100644
index 0000000..f8b3226
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/files/www.nongnu.org
@@ -0,0 +1,45 @@
+<VirtualHost *:80>
+ ServerAdmin webmasters@gnu.org
+ ServerName www.nongnu.org
+
+ ServerAlias nongnu.org
+
+ # Temporary for IPv6: we'll assign the AAAA record directly to
+ # www.gnu.org when we're 100% confident about its reliability
+ ServerALias www.ipv6.nongnu.org
+ ServerAlias www6.nongnu.org
+
+ DocumentRoot /var/www/savannah-checkouts/non-gnu/
+
+ <Directory /var/www/savannah-checkouts/non-gnu>
+ # Turn on SSI processing
+ Options Indexes IncludesNoExec MultiViews SymLinksIfOwnerMatch
+ # AllowOverride FileInfo so that people can use .htaccess to redirect subdirectories elsewhere
+ # Cf. RT #738350. Ward, 2012-05-18
+ AllowOverride FileInfo
+ </Directory>
+
+ ErrorDocument 404 /nongnu-404.html
+
+ RewriteEngine on
+ #RewriteLog "/var/log/apache2/nongnu-rewrite.log"
+ #RewriteLogLevel 3
+ RedirectMatch ^/$ http://savannah.nongnu.org/
+ # automatically handle projects that have migrated from non-gnu to gnu
+ RewriteCond /var/www/savannah-checkouts/gnu/$1 -d
+ RewriteRule ^/([^/]+)(.*)$ http://www.gnu.org/software/$1$2 [R,L]
+ # and finally handle packages whose names have changed:
+ RewriteRule ^/auctex/$ http://www.gnu.org/software/auctex/ [R]
+ RewriteRule ^/auctex$ http://www.gnu.org/software/auctex/ [R]
+ RewriteRule ^/qadsl(.*)$ http://www.gnu.org/software/alive$1 [R,L]
+ RewriteRule ^/hotp-toolkit(.*)$ http://www.nongnu.org/oath-toolkit$1 [R,L]
+ RewriteRule ^/fenfire(.*)$ http://fenfire.org/ [R,L]
+
+ AddHandler server-parsed .html .shtml
+
+ # Include nongnu/* symlinks
+ Include /etc/apache2/symlinks/symlinks-nongnu.conf
+
+ ErrorLog /var/log/apache2/nongnu-error.log
+ CustomLog /var/log/apache2/nongnu-access.log combined
+</VirtualHost>
diff --git a/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/manifests/init.pp b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/manifests/init.pp
new file mode 100644
index 0000000..c6e50a2
--- /dev/null
+++ b/webserver/wwwcvs-orig-files/modules/wwwgnu-nongnu/manifests/init.pp
@@ -0,0 +1,240 @@
+# gnu.org/nongnu.org webpages hosting system
+# Copyright (C) 2014 Sylvain Beucler
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+class wwwgnu-nongnu {
+ ensure_packages(['apache2', 'libapache2-mod-python'])
+ service { 'apache2': require => Package['apache2'] }
+ file {
+ '/etc/apache2/sites-enabled/000-default':
+ ensure => absent,
+ require => Package['apache2'],
+ notify => Service['apache2'];
+ }
+
+ exec { 'a2enmod include':
+ provider => shell,
+ creates => '/etc/apache2/mods-enabled/include.load',
+ require => Package['apache2'],
+ notify => Service['apache2'],
+ }
+ exec { 'a2enmod rewrite':
+ provider => shell,
+ creates => '/etc/apache2/mods-enabled/rewrite.load',
+ require => Package['apache2'],
+ notify => Service['apache2'],
+ }
+ exec { 'a2enmod expires':
+ provider => shell,
+ creates => '/etc/apache2/mods-enabled/expires.load',
+ require => Package['apache2'],
+ notify => Service['apache2'],
+ }
+ exec { 'a2enmod vhost_alias':
+ provider => shell,
+ creates => '/etc/apache2/mods-enabled/vhost_alias.load',
+ require => Package['apache2'],
+ notify => Service['apache2'],
+ }
+
+ file {
+ '/etc/apache2/sites-available/www.gnu.org':
+ ensure => file,
+ source => 'puppet:///modules/wwwgnu-nongnu/www.gnu.org',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+ '/etc/apache2/sites-available/www.gnu.org-common':
+ ensure => file,
+ source => 'puppet:///modules/wwwgnu-nongnu/www.gnu.org-common',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+ '/etc/apache2/sites-enabled/www.gnu.org':
+ ensure => symlink,
+ target => '../sites-available/www.gnu.org',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+
+ '/etc/apache2/sites-available/www.nongnu.org':
+ ensure => file,
+ source => 'puppet:///modules/wwwgnu-nongnu/www.nongnu.org',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+ '/etc/apache2/sites-enabled/001-www.nongnu.org':
+ ensure => symlink,
+ target => '../sites-available/www.nongnu.org',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+
+ '/etc/apache2/sites-available/star.nongnu.org':
+ ensure => file,
+ source => 'puppet:///modules/wwwgnu-nongnu/star.nongnu.org',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+ '/etc/apache2/sites-enabled/002-star.nongnu.org':
+ ensure => symlink,
+ target => '../sites-available/star.nongnu.org',
+ require => Package['apache2'],
+ notify => Service['apache2'];
+
+ '/var/www/gnu-404.html':
+ ensure => file,
+ content => "404\n",
+ require => Package['apache2'];
+ }
+
+ # .symlinks handling
+ # https://www.gnu.org/server/standards/README.webmastering.html#symlinks
+ user { 'wwwcvs':
+ ensure => present,
+ managehome => true; # install skel files
+ }
+ file {
+ '/home/wwwcvs/':
+ ensure => directory,
+ mode => 0700,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/home/wwwcvs/update-symlinks.sh':
+ ensure => file,
+ mode => '0755',
+ source => 'puppet:///modules/wwwgnu-nongnu/update-symlinks.sh';
+ '/home/wwwcvs/update-symlinks-xargs.py':
+ ensure => file,
+ mode => '0755',
+ source => 'puppet:///modules/wwwgnu-nongnu/update-symlinks-xargs.py';
+ '/etc/sudoers.d/wwwcvs':
+ ensure => file,
+ mode => '0600',
+ content => "wwwcvs ALL= NOPASSWD: /usr/sbin/apache2ctl graceful\n";
+ # TODO: requires '/srv/data/www-mirror/'?
+ '/home/wwwcvs/update-gnu-rewritemaps':
+ ensure => file,
+ mode => '0755',
+ source => 'puppet:///modules/wwwgnu-nongnu/update-gnu-rewritemaps';
+ '/home/wwwcvs/symlinks/':
+ ensure => directory,
+ mode => '0755',
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/':
+ ensure => directory,
+ mode => '0775',
+ owner => root,
+ group => wwwcvs;
+ }
+ # Populate those from prod's /etc/apache2/symlinks/:
+ file {
+ '/home/wwwcvs/symlinks/dir-map.txt':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/home/wwwcvs/symlinks/html-map.txt':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/home/wwwcvs/symlinks/nonhtml-map.txt':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/dir-map.txt':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/html-map.txt':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/nonhtml-map.txt':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/symlinks-gnu.conf':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/symlinks-nongnu.conf':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ '/etc/apache2/symlinks/symlinks-nongnu-vhost.conf':
+ ensure => present,
+ owner => wwwcvs,
+ group => wwwcvs;
+ }
+ # Used by www.gnu.org-common
+ # TODO: locate and bundle "gen-include-file-list" ?
+ ensure_packages(['cvs'])
+ exec { '/var/www/server/include-file-list.txt':
+ provider => shell,
+ command => 'cd / && cvs -d:pserver:anonymous@cvs.savannah.gnu.org:/web/www co -d var/www/server/ www/server/include-file-list.txt',
+ creates => '/var/www/server/include-file-list.txt',
+ require => Package['apache2', 'cvs'],
+ notify => Service['apache2'];
+ }
+
+ # Update webpages from CVS repo
+ file {
+ '/var/www/savannah-checkouts/':
+ ensure => directory,
+ mode => '0755';
+ '/var/www/savannah-checkouts/gnu/':
+ ensure => directory,
+ mode => '0775',
+ owner => 'root',
+ group => 'wwwcvs';
+ '/var/www/savannah-checkouts/non-gnu/':
+ ensure => directory,
+ mode => '0775',
+ owner => 'root',
+ group => 'wwwcvs';
+ '/var/log/wwwcvs/':
+ ensure => directory,
+ mode => '0775',
+ owner => 'root',
+ group => 'wwwcvs';
+ # http://www.gnu.org/new-savannah-project/new.py
+ '/var/www/new-savannah-project/':
+ ensure => directory,
+ mode => '0755';
+ '/var/www/new-savannah-project/new.py':
+ ensure => file,
+ source => 'puppet:///modules/wwwgnu-nongnu/new.py';
+ # # 'new.py' seems to conflict sometimes with /usr/lib/python2.7/new.py ?
+ # '/var/www/new-savannah-project2/':
+ # ensure => directory,
+ # mode => '0755';
+ # '/var/www/new-savannah-project2/new2.py':
+ # ensure => file,
+ # source => 'puppet:///modules/wwwgnu-nongnu/new.py';
+ # dir where new will specify which dirs to update
+ '/usr/local/to-update/':
+ ensure => directory,
+ mode => '0775',
+ owner => wwwcvs,
+ group => www-data;
+ }
+ file {
+ '/usr/local/bin/update-cvs.sh':
+ ensure => file,
+ mode => '0755',
+ source => 'puppet:///modules/wwwgnu-nongnu/update-cvs.sh';
+ }
+ cron { 'update-cvs.sh':
+ ensure => present,
+ user => 'wwwcvs',
+ minute => '*/2',
+ command => '/usr/bin/flock -w5 -x /tmp/update-cvs.lock /usr/local/bin/update-cvs.sh',
+ }
+}