[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#736072: marked as done (qa.debian.org: debian/watch redirector for puppet modules from forge.puppetlabs.com)



Your message dated Mon, 20 Jan 2014 02:05:42 +0000
with message-id <E1W54FC-0001kQ-Fk@moszumanska.debian.org>
and subject line qa.debian.org bug fixed in revision 3103
has caused the Debian Bug report #736072,
regarding qa.debian.org: debian/watch redirector for puppet modules from forge.puppetlabs.com
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
736072: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736072
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: qa.debian.org
Severity: wishlist
Tags: patch

Dear QA team,

I'm the maintainer of some puppet modules and a couple of days ago the
debian/watch files are no longer working because puppetlabs changed the
way howto get the information about available versions.

It's now possible to get the available versions in json format. ie on

https://forgeapi.puppetlabs.com/v3/modules/puppetlabs-firewall

for the module firewall from the user puppetlabs. I have written a patch
(see attachment) for a puppetlabs redirector. The patch can be applied
on top of svn.debian.org/svn/qa/trunk/cgi-bin/fakeupstream.cgi

I tested the patch locally with the following debian/watch file:

version=3
http://localhost/cgi-bin/fakeupstream.cgi?upstream=forge.puppetlabs/puppetlabs/firewall \
.*/puppetlabs-firewall-(.+)\.tar\.gz

Can you review and apply the patch to fakeupstream.cgi if you are happy
with it? And what's the procedure to get this patch rolled out so the
debian/watch files can use the new redirector?


TIA

Tom



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Index: fakeupstream.cgi
===================================================================
--- fakeupstream.cgi	(revision 3102)
+++ fakeupstream.cgi	(working copy)
@@ -565,6 +565,32 @@
 	exit 0;
 }
 
+# http://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=forge.puppetlabs/puppetlabs/stdlib
+if( undef2empty( $q->param('upstream') ) =~ m%^forge.puppetlabs/($project_char_re+)/($project_char_re+)$% )
+{
+	my $user = $1;
+	my $project = $2;
+	my $url = "https://forgeapi.puppetlabs.com/v3/modules/$user-$project";;
+	my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } );
+	my $response = $ua->get( $url );
+	my $refs_page = $response->decoded_content;
+	return_error( "failed to read $url : $response->status_line" ) if( not $response->is_success );
+	my $json_ref = JSON::decode_json( $refs_page );
+        print $q->header;
+        print $q->start_html;
+        print $q->start_ul;
+        foreach my $release ( @{$json_ref->{"releases"}} )
+        {
+	    my $basename = join "", $user, "-", $project, "-", $release->{version}, ".tar.gz";
+	    print "<li>";
+	    print "<a href='https://forgeapi.puppetlabs.com/v3/files/";, $basename, "'>", $basename, "</a>\n";
+	    print "</li>";
+        }
+        print $q->end_ul;
+        print $q->end_html;
+	exit 0;
+}
+
 my %upstream_info_per_package =
 (
 	'stopwatch' =>

--- End Message ---
--- Begin Message ---
Version: 3103

This bug was closed by Paul Wise (pabs) in SVN revision 3103.
Note that it might take some time until the qa.debian.org code has
been updated and cronjobs have picked up changed data.

Commit message:

Add a fake upstream for puppet modules from forge.puppetlabs.com

Patch-by: Thomas Bechtold <toabctl@debian.org>
Closes: #736072

--- End Message ---

Reply to: