[openssl-commits] [web] master update

Rich Salz rsalz at openssl.org
Sat Aug 15 19:27:59 UTC 2015


The branch master has been updated
       via  39107644a019885ccdef15ae1033550d45e5e932 (commit)
      from  177bf95046063c83c2e0fca944acde7da178824d (commit)


- Log -----------------------------------------------------------------
commit 39107644a019885ccdef15ae1033550d45e5e932
Author: Rich Salz <rsalz at akamai.com>
Date:   Sat Aug 15 15:26:02 2015 -0400

    Create "latest" links
    
    And the last of WML is gone gone gone!

-----------------------------------------------------------------------

Summary of changes:
 .gitignore           |  2 +-
 Makefile             |  9 +++++----
 bin/mk-latest        | 48 ++++++++++++++++++++++++++++++++++++++++++++++
 source/.htaccess.wml | 54 ----------------------------------------------------
 4 files changed, 54 insertions(+), 59 deletions(-)
 create mode 100755 bin/mk-latest
 delete mode 100644 source/.htaccess.wml

diff --git a/.gitignore b/.gitignore
index f448120..2c89231 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@ docs/faq.txt
 news/changelog.txt
 news/vulnerabilities.html
 source/license.txt
-docs/HOWTO/*.txt
+source/.htaccess
 source/*.gz*
 source/*.patch
 source/old/*/*.tar.gz*
diff --git a/Makefile b/Makefile
index 23d0275..ab069ec 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ SIMPLE = newsflash.inc sitemap.txt \
 	 news/changelog.inc news/changelog.txt \
 	 news/newsflash.inc \
 	 news/vulnerabilities.inc \
+	 source/.htaccess \
 	 source/license.txt \
 	 source/index.inc
 SRCLISTS = \
@@ -36,11 +37,8 @@ relupd: all
 	git pull $(QUIET)
 	$(MAKE)
 
-# To be fixed.
-hack-source_htaccess:
-	exit 1;
-
 # Legacy targets
+hack-source_htaccess: all
 simple: all
 generated: all
 manpages: all
@@ -81,6 +79,9 @@ docs/fips.inc:
 	@rm -f $@
 	./bin/mk-filelist docs/fips fips/ '*' >$@
 
+source/.htaccess:
+	@rm -f @?
+	./bin/mk-latest >$@
 source/license.txt: $(SNAP)/LICENSE
 	@rm -f $@
 	cp $? $@
diff --git a/bin/mk-latest b/bin/mk-latest
new file mode 100755
index 0000000..519c353
--- /dev/null
+++ b/bin/mk-latest
@@ -0,0 +1,48 @@
+#! /usr/bin/perl -w
+use strict;
+
+my @tarballs =
+	sort grep /openssl-\d+\.\d+\.\d+[a-z]*\.tar\.gz$/, glob("openssl-*.tar.gz");
+my %series = ();
+foreach(@tarballs) {
+	my ($version, $serie) = /^openssl-((\d+\.\d+\.\d+)[a-z]*)\./;
+	$series{$serie} = $_;
+}
+my $latest = $series{ (reverse sort keys %series)[0] };
+
+print "RewriteEngine on\n";
+print "RewriteBase /source\n";
+print "# First, rewrite all the 'latest' URLs\n";
+print "RewriteRule ^latest.tar.gz\$ $latest [L,R=302,NC]\n";
+
+foreach (sort keys %series) {
+	my $rule = "openssl-$_-latest.tar.gz";
+	#don't bother: $rule =~ s|\.|\\.|g;
+	my $target = $series{$_};
+	print "RewriteRule ^$rule\$ $target [L,R=302,NC]\n";
+}
+
+print <<\EOF
+
+# Old distro's are in subdirs.
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule (openssl-0\.9\.8.*) old/0.9.x/$1 [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule openssl-(1\.0\.0.*) old/1.0.0/openssl-$1 [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule openssl-(1\.0\.1.*) old/1.0.1/openssl-$1 [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule openssl-(1\.0\.2.*) old/1.0.1/openssl-$1 [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule openssl-(fips.*)  old/fips/openssl-$1 [L]
+
+<Files *.gz.asc>
+    RemoveEncoding .gz
+</Files>
+<Files *.gz.md5>
+    RemoveEncoding .gz
+</Files>
+<Files *.gz.sha1>
+    RemoveEncoding .gz
+</Files>
+EOF
diff --git a/source/.htaccess.wml b/source/.htaccess.wml
deleted file mode 100644
index 23ccfd7..0000000
--- a/source/.htaccess.wml
+++ /dev/null
@@ -1,54 +0,0 @@
-<protect>##
-##  .htaccess -- Apache per-dir config
-##
-
-RewriteEngine on
-
-RewriteBase /source
-
-# First, rewrite all the 'latest' URLs</protect>
-<:{
-    my @tarballs =
-        sort grep /openssl-\d+\.\d+\.\d+[a-z]*\.tar\.gz$/, glob("openssl-*.tar.gz");
-    my %series = ();
-    foreach(@tarballs) {
-        my ($version, $serie) = /^openssl-((\d+\.\d+\.\d+)[a-z]*)\./;
-	$series{$serie} = $_;
-    }
-
-    my $latest = $series{ (reverse sort keys %series)[0] };
-    print "RewriteRule ^latest\\.tar\\.gz\$ $latest [L,R=302,NC]\n";
-
-    foreach (sort keys %series) {
-        my $rule = "openssl-$_-latest.tar.gz"; $rule =~ s|\.|\\.|g;
-	my $target = $series{$_};
-        print "RewriteRule ^$rule\$ $target [L,R=302,NC]\n";
-    }
-}:>
-<protect>
-# Old distro's are in subdirs.
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule (openssl-0\.9\.8.*) old/0.9.x/$1 [L]
-
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(1\.0\.0.*) old/1.0.0/openssl-$1 [L]
-
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(1\.0\.1.*) old/1.0.1/openssl-$1 [L]
-
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(1\.0\.2.*) old/1.0.1/openssl-$1 [L]
-
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(fips.*)  old/fips/openssl-$1 [L]
-
-<Files *.gz.asc>
-    RemoveEncoding .gz
-</Files>
-<Files *.gz.md5>
-    RemoveEncoding .gz
-</Files>
-<Files *.gz.sha1>
-    RemoveEncoding .gz
-</Files>
-</protect>


More information about the openssl-commits mailing list