From 8e318fb44ef387e5c49725a43c4b1bf73b9a1270 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 6 Aug 2024 09:06:12 +0200 Subject: [PATCH] snaphots: import into git The snapshot web page generation was previously done outside of the normal procedures. Now, only the actual snapshot generation is left outside. This is an import and edit of the exsting content. Fixes #331 Closes #369 --- Makefile | 1 + snapshots/Makefile | 20 +++++++++++ snapshots/_index.html | 67 +++++++++++++++++++++++++++++++++++ snapshots/curl-temp.txt | 1 + snapshots/mkindex.pl | 78 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 167 insertions(+) create mode 100644 snapshots/Makefile create mode 100644 snapshots/_index.html create mode 100644 snapshots/curl-temp.txt create mode 100755 snapshots/mkindex.pl diff --git a/Makefile b/Makefile index 008e837832..f2d26022ab 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,7 @@ all: $(PAGES) cd dev && make cd windows && make cd qnx && make + cd snapshots && make cd tiny && make cd logo && make cd trurl && make diff --git a/snapshots/Makefile b/snapshots/Makefile new file mode 100644 index 0000000000..69574b68ed --- /dev/null +++ b/snapshots/Makefile @@ -0,0 +1,20 @@ +ROOT=.. + +SRCROOT=$(ROOT)/cvssource +DOCROOT=$(SRCROOT)/docs + +include $(ROOT)/mainparts.mk +include $(ROOT)/setup.mk + +PAGES=index.html + +all: $(PAGES) + +index.html: _index.html $(MAINPARTS) files.gen + $(ACTION) + +files.gen: mkindex.pl curl-* + ./mkindex.pl >$@ + +clean: + rm -f $(PAGES) *.gen diff --git a/snapshots/_index.html b/snapshots/_index.html new file mode 100644 index 0000000000..c653a69005 --- /dev/null +++ b/snapshots/_index.html @@ -0,0 +1,67 @@ +#include "_doctype.html" + + daily curl snapshots +#include "css.t" + + +#define CURL_URL /snapshots + +#include "_menu.html" +#include "setup.t" + +WHERE2(Download, "/download.html", Daily Snapshots) + +TITLE(Daily curl snapshots) +
+Related: +
Autobuilds +
Browse git +
Changelog +
Dev Release Notes +
Support +
+

+ WARNING, these packages are built daily and automatically straight + from git. They may be broken, crashing, working or whatever. Don\'t assume + anything else! + +SUBTITLE(Binary snapshots) +

+ +
+SUBTITLE(Source tarballs) +

+#include "files.gen" +

+ +SUBTITLE(Contents) +

+ These snapshots are generated straight from git every euro morning. Snapshots + are kept a few weeks before deleted. + +

+ The docs/RELEASE-TOOLS.md document is bundled in every snapshot, + showing the tooling needed to reproduce the snapshot tarball. This is not + necessarily the same set of tools+versions as official curl releases use, + because these snapshots are generated automatically on a different host. + +

Since August 2024, every snapshot contains a file named + docs/tarball-commit.txt that contains the commit hash that was the + HEAD at the time the tarball is made. + +SUBTITLE(Extensions) +

+

+ +#include "_footer.html" + + diff --git a/snapshots/curl-temp.txt b/snapshots/curl-temp.txt new file mode 100644 index 0000000000..9ce06a81ea --- /dev/null +++ b/snapshots/curl-temp.txt @@ -0,0 +1 @@ +# dummy diff --git a/snapshots/mkindex.pl b/snapshots/mkindex.pl new file mode 100755 index 0000000000..e13dc4eee1 --- /dev/null +++ b/snapshots/mkindex.pl @@ -0,0 +1,78 @@ +#!/usr/bin/perl + +my $dir="."; +opendir(DIR, $dir) || die "can't opendir $dir: $!"; +my @files = readdir(DIR); +closedir DIR; + +sub filesize { + my ($filename)=@_; + + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat($filename); + + return $size; +} + +for(@files) { + my $file = $_; + if($file =~ /^curl-([0-9.]*)-([0-9]*)\.(.*)/) { + my ($version, $date, $ext)=($1, $2, $3); + $dates{$date}=$date; + $exts{$date}.="$ext,"; + $allext{$ext}++; + $file{$date.$ext}=$file; + $version{$date}=$version; + } +} + +my $ae; +for(keys %allext) { + $ae .= "$_ "; +} + +print < +date +MOO + ; +for(sort split(" ", $ae)) { + print "$_\n"; +} +print "\n"; + +my $i; +for(reverse sort keys %dates) { + my $date=$_; + $finedate = $date; + if($date =~ /(\d\d\d\d)(\d\d)(\d\d)/) { + $finedate = sprintf("%04d-%02d-%02d", $1, $2, $3); + } + + printf "$finedate ", + $i++&1?"odd":"even"; + for(sort split(" ", $ae)) { + my $ext=$_; + my $file = $file{$date.$ext}; + + if(-f "$dir/$file" ) { + if(!$bestfile{$ext}) { + print "\n"; + $bestfile{$ext}=1; + } + + + printf "%.2fMB", + $file, filesize("$dir/$file")/(1024*1024); + } + else { + print " \n"; + } + } + + print "\n"; +} +print "\n";