Please find attached another patch that does away with svn and uses LWP
to download the `FONTLOG.txt` file from https://raw.githubusercontent.com.
This patch will:
1. resolve the current problem with the google-fonts upstream;
2. avoid having to make any configuration changes to qa.debian.org or
use unsafe settings;
3. remove the current dependency on svn.
Regards,
--
Gioele Barabucci <gio...@svario.it>
--- a/fakeupstream.cgi 2017-10-21 14:24:26.493174836 +0200
+++ b/fakeupstream.cgi 2017-10-21 17:21:18.615005794 +0200
@@ -793,19 +793,18 @@
my $font_name = $2;
my $github_repo_url = "https://github.com/google/fonts/tree/master/$font_licence/$font_name";
- my $svn_fontlog_url = "https://github.com/google/fonts/trunk/$font_licence/$font_name/FONTLOG.txt";
-
- my @command = (
- '/usr/bin/svn',
- 'cat',
- $svn_fontlog_url
- );
+ my $raw_fontlog_url = "https://raw.githubusercontent.com/google/fonts/master/$font_licence/$font_name/FONTLOG.txt";
my @versions_eng;
- open(my $svn_cat_fh, '-|', @command)
- or return_error("Can't run svn cat: $!");
- while (<$svn_cat_fh>) {
+ my $ua = LWP::UserAgent->new;
+ my $response = $ua->get( $raw_fontlog_url );
+
+ return_error("failed to read $raw_fontlog_url : $response->status_line")
+ if(not $response->is_success);
+
+ my $fontlog_content = $response->decoded_content;
+ foreach (split(/\n/, $fontlog_content)) {
chomp;
# 15 July 2011 (Author) version notes
@@ -813,7 +812,6 @@
push @versions_eng, "$1 $2 $3"
}
- close($svn_cat_fh);
return_error("no versions found for font $font_licence/$font_name")
if (scalar(@versions_eng) == 0);