Package: reportbug
Tags: patch

Dear Maintainer,

Currently, default desktop installs of Debian come with a non-functioning menu item for reportbug. This is because reportbug cannot sensibly depend on GUI libraries (or else all manner of GUI nonsense would be pulled in on servers!) and desktop install tasks cannot sensibly depend on seemingly-random libraries that happen to enable the reportbug GTK+ UI but would seem out of place without context.

This patch implements the solution proposed on #842018 -- namely, that the desktop file and icon be split out into a seperate package named reportbug-gtk. This package *can* sensibly depend on the needed GUI libraries, since it is not a standard priority package and will not need to be installed on servers. Additionally, desktop install tasks *can* sensibly depend on a package named reportbug-gtk, as it will be suitably clear what the purpose of the dependency is.

This is my first submission of this nature to Debian, and I may have failed to follow some established social or technical best-pracises. Please let me know if I should be going about this another way, or any other feedback you have.

--
singpolyma
From 6ad4635770a51d4d820b56fc4c02b317d0304114 Mon Sep 17 00:00:00 2001
From: Stephen Paul Weber <singpol...@singpolyma.net>
Date: Tue, 15 Aug 2017 20:21:25 -0500
Subject: [PATCH] Split out new reportbug-gtk package

This package contains the desktop file and icon, and depends on
libraries needed to have that desktop file function to launch the GTK+
UI.  This package is suitable for being included in desktop environment
install tasks.
---
 debian/changelog                                   |  4 ++++
 debian/control                                     | 25 +++++++++++++++++++++-
 debian/dirs                                        |  1 -
 debian/reportbug-gtk.dirs                          |  1 +
 .../{reportbug.install => reportbug-gtk.install}   |  1 +
 debian/{desktop => reportbug.desktop}              |  0
 debian/rules                                       |  2 --
 doc/README.Users                                   |  2 ++
 8 files changed, 32 insertions(+), 4 deletions(-)
 create mode 100644 debian/reportbug-gtk.dirs
 rename debian/{reportbug.install => reportbug-gtk.install} (56%)
 rename debian/{desktop => reportbug.desktop} (100%)

diff --git a/debian/changelog b/debian/changelog
index 68d8e1e..ec4e563 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ reportbug (7.1.8) UNRELEASED; urgency=medium
 
   * reportbug/debbugs.py
     - add `a11y` tag
+  * reporkbug-gtk package created
+    - a new package now installs the desktop file only along with the
+      dependencies to make it work; desktop install tasks should depend
+      on the new reportbug-gtk package; Closes: #842018
 
  -- Sandro Tosi <mo...@debian.org>  Tue, 04 Jul 2017 21:00:30 -0400
 
diff --git a/debian/control b/debian/control
index 9afcc7d..fd64d33 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Homepage: http://alioth.debian.org/projects/reportbug/
 Package: reportbug
 Architecture: all
 Depends: ${misc:Depends}, ${python3:Depends}, apt, python3-reportbug (= ${source:Version})
-Suggests: postfix | exim4 | mail-transport-agent, gnupg | pgp, debconf-utils (>> 1.1.0), debsums (>= 2.0.47), file (>> 1.30), dlocate, python3-urwid, python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, gir1.2-vte-2.91, python3-gtkspellcheck, xdg-utils, emacs24-bin-common | emacs25-bin-common, claws-mail (>= 3.8.0)
+Suggests: postfix | exim4 | mail-transport-agent, gnupg | pgp, debconf-utils (>> 1.1.0), debsums (>= 2.0.47), file (>> 1.30), dlocate, python3-urwid, reportbug-gtk (= ${source:Version}), xdg-utils, emacs24-bin-common | emacs25-bin-common, claws-mail (>= 3.8.0)
 Description: reports bugs in the Debian distribution
  reportbug is a tool designed to make the reporting of bugs in Debian
  and derived distributions relatively painless.  Its features include:
@@ -33,6 +33,29 @@ Description: reports bugs in the Debian distribution
  This package also includes the "querybts" script for browsing the
  Debian bug tracking system.
 
+Package: reportbug-gtk
+Architecture: all
+Depends: ${misc:Depends}, reportbug (= ${source:Version}), python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, gir1.2-vte-2.91
+Recommends: python3-gtkspellcheck
+Description: reports bugs in the Debian distribution (GTK+ UI)
+ reportbug is a tool designed to make the reporting of bugs in Debian
+ and derived distributions relatively painless.  Its features include:
+ .
+  * Integration with mutt and mh/nmh mail readers.
+  * Access to outstanding bug reports to make it easier to identify
+    whether problems have already been reported.
+  * Automatic checking for newer versions of packages.
+  * Optional automatic verification of integrity of packages via debsums.
+  * Support for following-up on outstanding reports.
+  * Optional PGP/GnuPG integration.
+ .
+ reportbug is designed to be used on systems with an installed mail
+ transport agent, like exim or sendmail; however, you can edit the
+ configuration file and send reports using any available mail server.
+ .
+ This package contains a desktop file and icon, and has dependencies
+ to enable the GTK+ UI mode of reportbug to work.
+
 Package: python3-reportbug
 Section: python
 Architecture: all
diff --git a/debian/dirs b/debian/dirs
index 84c44f4..2243553 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,4 +1,3 @@
 etc
 usr/bin
 usr/share/bug/reportbug
-usr/share/applications
diff --git a/debian/reportbug-gtk.dirs b/debian/reportbug-gtk.dirs
new file mode 100644
index 0000000..9ecda26
--- /dev/null
+++ b/debian/reportbug-gtk.dirs
@@ -0,0 +1 @@
+usr/share/applications
diff --git a/debian/reportbug.install b/debian/reportbug-gtk.install
similarity index 56%
rename from debian/reportbug.install
rename to debian/reportbug-gtk.install
index 38713f2..1021360 100644
--- a/debian/reportbug.install
+++ b/debian/reportbug-gtk.install
@@ -1 +1,2 @@
 share/debian-swirl.svg /usr/share/icons/hicolor/scalable/places/
+debian/reportbug.desktop /usr/share/applications/
diff --git a/debian/desktop b/debian/reportbug.desktop
similarity index 100%
rename from debian/desktop
rename to debian/reportbug.desktop
diff --git a/debian/rules b/debian/rules
index 66335a8..d83e6da 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,7 +25,5 @@ override_dh_auto_install:
 	chmod 0755 $(CURDIR)/debian/reportbug/usr/bin/*
 	cp -p conf/reportbug.conf $(CURDIR)/debian/reportbug/etc
 
-	cp -p debian/desktop $(CURDIR)/debian/reportbug/usr/share/applications/reportbug.desktop
-
 override_dh_installman:
 	dh_installman man/*
diff --git a/doc/README.Users b/doc/README.Users
index 5a2dbf7..e585fb6 100644
--- a/doc/README.Users
+++ b/doc/README.Users
@@ -50,6 +50,8 @@ particular:
  - gir1.2-vte-2.91
  - python3-gtkspellcheck
 
+or, install the reportbug-gtk package to get the needed dependencies.
+
 If after installing both of them still GTK+ UI doesn't show up, please
 file a report (in text ui :) ).
 
-- 
2.11.0

Attachment: signature.asc
Description: PGP signature

Reply via email to