Bug#775180: analysis

2015-01-31 Thread Daniel Pocock


On 30/01/15 16:20, Christophe Siraut wrote:
> Hi Daniel,
> 
>> If my proposed solution seems reasonable I'll go ahead and code it
>> (...) 
> 
> It seems perfectly reasonable to me. I just want to mention that while
> we started refactoring DMD in order to provide RSS, YAML and JSON, we
> did not finish isolating the data from the presentation. In consequence
> you might end up with HTML code in calendar tasks, please fix or fill
> bugs if it happens. (There should be no HTML in dmd-data.rb nor in
> dmd.cgi; data should be parsed in dmd-data.rb only; dmd.cgi should be a
> lot simpler)
> 

I've done the following:

- initial implementation using the feeditems array

- requested to join collab-qa on alioth so I can push this, otherwise
somebody else can apply it

- sent an RT request (#5713) to DSA to install the vpim package on ullmann

- updated the wiki to include the extra dependency

Please let me know if any other action is needed to get this deployed.

There are other potential improvements but they can be made later:

- setting the priority field of the VTODO to a higher value for RC bugs,
I think the prioritization logic should be somewhere else in the UDD
code and the iCalendar code should only translate the UDD priority value
into the format for iCalendar (1=High, etc).  Is anything like this
already available or on the roadmap?

- setting the email of the bug reporter as task creator, currently it
just uses debian-qa as the creator for all tasks

- setting an ID on each task based on the Debian bug ID or some other
unique ID (Lightning appears to consume the VTODO feed without any ID
being present)

- setting the created and modified dates where applicable
>From e8901fd530b344b4b6a24fe0c78a222709417d7d Mon Sep 17 00:00:00 2001
From: Daniel Pocock 
Date: Sat, 31 Jan 2015 10:47:51 +0100
Subject: [PATCH] Initial iCalendar support. (Closes: #775180)

---
 web/inc/cal.rb| 32 
 web/inc/page.rb   |  3 +++
 web/templates/dmd.erb |  1 +
 3 files changed, 36 insertions(+)
 create mode 100755 web/inc/cal.rb

diff --git a/web/inc/cal.rb b/web/inc/cal.rb
new file mode 100755
index 000..da0d941
--- /dev/null
+++ b/web/inc/cal.rb
@@ -0,0 +1,32 @@
+#!/usr/bin/ruby
+require 'vpim/icalendar'
+require 'vpim/vtodo'
+require 'date'
+
+# Note:
+#
+# Requires the vpim package.
+#
+# The VTODO support in the Vpim code is not quite as polished
+# as the VEVENT support.  For example, there is a convenient
+# add_event() method for VEVENT but there is no add_todo()
+# so we have to create the VTODO using the create() method.
+# Rendering of the required VTODO fields appears to work fine.
+
+class TodoCalendar
+def initialize(items, title)
+cal = Vpim::Icalendar.create2
+
+items.each do |e|
+  t = Vpim::Icalendar::Vtodo.create(
+'SUMMARY' => e[:title],
+'DESCRIPTION' => e[:title],
+'URL' => e[:link],
+'ORGANIZER' => 'debian-qa@lists.debian.org')
+  cal.push(t)
+end
+puts "Content-type: text/calendar\n"
+puts "Content-Disposition: attachment; filename=\"dmd.ics\"\n\n"
+puts cal.encode
+end
+end
diff --git a/web/inc/page.rb b/web/inc/page.rb
index 601d798..45e5842 100644
--- a/web/inc/page.rb
+++ b/web/inc/page.rb
@@ -3,6 +3,7 @@ require "erb"
 require 'oj'
 require 'yaml'
 require File.expand_path(File.dirname(__FILE__))+'/feed'
+require File.expand_path(File.dirname(__FILE__))+'/cal'
 
 class Page
   attr_accessor :data, :format, :template, :title, :feeditems
@@ -28,6 +29,8 @@ class Page
   puts Oj.load(Oj.dump(@data)).to_yaml
 elsif @format == 'rss'
   TodoFeed.new(@feeditems, @title)
+elsif @format == 'ics'
+  TodoCalendar.new(@feeditems, @title)
 else
   content = File.read(File.expand_path(@template))
   t = ERB.new(content)
diff --git a/web/templates/dmd.erb b/web/templates/dmd.erb
index 559d81c..338d5b7 100644
--- a/web/templates/dmd.erb
+++ b/web/templates/dmd.erb
@@ -86,6 +86,7 @@
   JSON
   YAML
   RSS
+  iCalendar
 
 
 
-- 
2.1.4



Bug#776521: marked as done (UDD can think removed packages are still in testing/unstable)

2015-01-31 Thread Debian Bug Tracking System
Your message dated Sat, 31 Jan 2015 11:41:01 -0500
with message-id 

and subject line Re: Bug#776521: UDD can think removed packages are still in 
testing/unstable
has caused the Debian Bug report #776521,
regarding UDD can think removed packages are still in testing/unstable
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 ow...@bugs.debian.org
immediately.)


-- 
776521: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776521
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: qa.debian.org
Severity: normal
User: qa.debian@packages.debian.org
Usertags: udd

UDD thinks src:eglibc is still in testing/unstable, but it's been
removed for a while, so it shouldn't show up in the RC bug list:
https://udd.debian.org/bugs/bugs/?release=jessie_and_sid&patch=ign&merged=ign&done=ign&rc=1

The old PTS also thinks the same:
http://packages.qa.debian.org/eglibc

But the new PTS doesn't:
http://tracker.debian.org/pkg/eglibc

Best wishes,
Mike
--- End Message ---
--- Begin Message ---
On Thu, Jan 29, 2015 at 1:36 AM, Adam D. Barratt wrote:
> This is (yet) another instance of the fact that the Sources file for
> unstable and testing does include eglibc, but tagged as
> Extra-Source-Only:yes. That's due to the fact that the version of
> debian-installer-netboot-images currently in those suites declares a
> Built-Using relationship on eglibc (as they were built on wheezy and
> then propagated during a point release).

In the meantime eglibc was removed from unstable's Sources file, and I
suppose that will transition to jessie's Sources soon too, so it's
really no longer an issue.

Best wishes,
Mike--- End Message ---