[Pkg-javascript-devel] Bug#854675: npm2deb: template for ITP should strongly encourage writing a proper package description

2017-02-09 Thread Ben Finney
On 09-Feb-2017, Praveen Arimbrathodiyil wrote:
> Add one more paragraph and sent a pull request upstream. Once
> they review and merge, I will upload a new version.

On 09-Feb-2017, Praveen Arimbrathodiyil wrote:
> Can you try to update control file template too as suggested by
> Shanavas?

Okay, I have made some more extensive changes:

* Distinguish the upstream description versus the Debian package
  description, in both the ‘debian/control’ template and the ITP
  template.

* Add paragraphs to the ITP template suggesting explanations that are
  commonly needed.

These are attached to this message as patches.

-- 
 \   “I like to go to art museums and name the untitled paintings. |
  `\‘Boy With Pail’. ‘Kitten On Fire’.” —Steven Wright |
_o__)  |
Ben Finney 
From 03cd5adac01c51077cff3edacad1fc9f4ee562c3 Mon Sep 17 00:00:00 2001
From: Ben Finney 
Date: Fri, 10 Feb 2017 04:37:45 +1100
Subject: [PATCH 1/2] Distinguish upstream description from Debian package
 description.

---
 npm2deb/__init__.py  | 13 +++--
 npm2deb/templates.py | 27 ++-
 2 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/npm2deb/__init__.py b/npm2deb/__init__.py
index 0ac807bb..1aa9ad28 100644
--- a/npm2deb/__init__.py
+++ b/npm2deb/__init__.py
@@ -29,7 +29,7 @@ class Npm2Deb(object):
 self.json = None
 self.args = args
 self.homepage = None
-self.description = None
+self.upstream_description = None
 self.upstream_author = None
 self.upstream_license = None
 self.upstream_version = None
@@ -295,8 +295,8 @@ and may not include tests.\n""")
   % self.debian_name
 args['Package'] = self.debian_name
 args['Depends'] = self._get_Depends()
-args['Description'] = self.description
-args['Description_Long'] = 'FIX_ME long description'
+args['Description'] = 'FIX_ME write the Debian package description'
+args['upstream_description'] = self.upstream_description
 template = utils.get_template('control')
 utils.create_debian_file('control', template % args)
 
@@ -451,7 +451,8 @@ and may not include tests.\n""")
 args['debian_name'] = self.debian_name
 args['upstream_author'] = self.upstream_author
 args['homepage'] = self.homepage
-args['description'] = self.description
+args['description'] = 'FIX_ME write the Debian package description'
+args['upstream_description'] = self.upstream_description
 args['version'] = self.upstream_version
 args['license'] = self.upstream_license
 content = utils.get_template('wnpp')
@@ -485,9 +486,9 @@ and may not include tests.\n""")
 
 def _get_json_description(self):
 if 'description' in self.json:
-self.description = self.json['description']
+self.upstream_description = self.json['description']
 else:
-self.description = 'FIX_ME description'
+self.upstream_description = 'FIX_ME no upstream package description'
 
 def _get_json_author(self):
 if self.upstream_author:
diff --git a/npm2deb/templates.py b/npm2deb/templates.py
index 9bda4ee3..f88861e6 100644
--- a/npm2deb/templates.py
+++ b/npm2deb/templates.py
@@ -6,6 +6,20 @@ CHANGELOG = """%(debian_name)s (%(version)s-1) UNRELEASED; urgency=low
 
 """
 
+description_template = """
+ Write the short and long descriptions for the Debian package as
+ explained in the Developer's Reference, §6.2.1 – §6.2.3.
+ .
+ You can start with the short upstream package description,
+ “%(upstream_description)s”.
+ .
+ Be aware that most upstream package descriptions are not written to
+ conform with Debian package guidelines. You need to explain the role
+ of this package for a Debian audience.
+ .
+ Node.js is an event-based server-side JavaScript engine.
+"""
+
 CONTROL = """Source: %(Source)s
 Section: web
 Priority: optional
@@ -26,10 +40,7 @@ Depends:
  ${misc:Depends}
  , %(Depends)s
 Description: %(Description)s
- %(Description_Long)s
- .
- Node.js is an event-based server-side JavaScript engine.
-"""
+""" + description_template
 
 RULES = """#!/usr/bin/make -f
 # -*- makefile -*-
@@ -80,11 +91,9 @@ X-Debbugs-CC: debian-de...@lists.debian.org
   Programming Lang: JavaScript
   Description : %(description)s
 
- FIX_ME bug long description
- .
- Node.js is an event-based server-side JavaScript engine.
-
-"""
+ FIX_ME: This ITP report is not ready for submission, until you are
+ confident this package description is ready for Debian.
+ .""" + description_template
 
 LICENSES = {}
 
-- 
2.11.0

From 020478164b46cac3b69836be897967c138de18f9 Mon Sep 17 00:00:00 2001
From: Ben Finney 
Date: Fri, 10 Feb 2017 04:38:29 +1100
Subject: [PATCH 2/2] Add suggestions to improve the ITP report.

---
 

[Pkg-javascript-devel] Bug#854675: npm2deb: template for ITP should strongly encourage writing a proper package description

2017-02-09 Thread Praveen Arimbrathodiyil
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Praveen Arimbrathodiyil  wrote:
> https://github.com/LeoIannacone/npm2deb/pull/51

Can you try to update control file template too as suggested by
Shanavas?

-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEKnl0ri/BUtd4Z9pKzh+cZ0USwioFAlicdn8ACgkQzh+cZ0US
wipGxQ/+L6o1Y7eP0nS+cnnh5HQNm/29wvL+x1lvElaFF+h2kUqwuUru4SR726rw
yrmMctaxmWRWw0U2AVQMobqvAbZVF9cU16DzP1S15OccONGnt5IY2G0naRCQYg4H
aauthNFkziZ4fRIS4Dh+XlUm14mUB1EnivFV48+IgPGUjUpymwkYZv1ZXJMZdV0Q
ji3SqUiX+3tMN0nF5uwKSjfUr676y/Hd8AGCeKag5tJwOxNe+EPuOlqYxE5ghoSB
hwyjdH+jJxOdD/oiZLI+n+MzZ0TunBcMP2yshvU+L3kZlWi2jpIz37h8eGTwJvEi
MscRoG3oeV6kS7ctMpOjoTk8N8GJFxitiDYDXjWbNfbi0e2E7aVW6Bs1JZ5B4F9B
CpCoBEqwkO+Rh6cAxyTRerMkJt+O3GSIakgrat2QVSQEfbKLMkD2dzlNhuuW0XMI
83dCM6G0O3i6i9Iws5M4GsFz3XNU/V3S3VizFrkweDI4AKlgoCrl97mFssc922iR
xPJI/eXQPRWNyt7Rv82MZ9WJ/32a01dOLXR4X7gmUXkonfp+SVF6DsWsOlTZKqpl
fCYwJdCpuNMEavHv5sWTA4AaKco0Gbq9RF/AmvPRmBHEgswgHa9r+uxPbDtIG0eC
T/x7bgw1GfCIIAAJjM23+jShH5F0sl9Biao4ULZgBS/ROf9mwW8=
=yhSM
-END PGP SIGNATURE-
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

[Pkg-javascript-devel] Bug#854675: npm2deb: template for ITP should strongly encourage writing a proper package description

2017-02-09 Thread Praveen Arimbrathodiyil
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Control: forwarded -1
https://github.com/LeoIannacone/npm2deb/pull/51

Ben Finney  wrote:
> Attached is my suggested patch for this.

Add one more paragraph and sent a pull request upstream. Once
they review and merge, I will upload a new version.

-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEKnl0ri/BUtd4Z9pKzh+cZ0USwioFAlicaBMACgkQzh+cZ0US
wioGnw//cRVcnUXJh1BO2QnzcAuTyKOhDd9ScBY989gqN2xGsZpY+PwJ8RiyhRrb
VKGUR5r8uH0GFJp1yltqv7GrAsPUHqNzXLIJv0IMWDQ0H59ZwIqQ87Xsy/I2LN25
52CYw6rmluZXbvy8ByO4T75Tb5WTV0H9jEayq37szmkW1MwgWDJXB/Nk8HgJqChR
wLRx7+J5Mz77mZnSfIVAgsGRthG3yEoK7DtBFTtUkXD8//Vw8ad1v4S9patqKrY4
puDZXkSP2c+tWV6fTMTOYD/WXq2GZ/ByGWvsIImVkoYblyU1LmTn0mp5WI/UmhsA
cMMd75JXDeJSfXX4HkYA2WQEYjkEHRBMIMQaPaIMZPdzcToKaMUm9btOBnRJo7Eb
Db7hhudFq7UURtMt0+ZzlElvd5uv5R4pcV0nfNbSBnqGS+VNsFF3IbOu0Sg46M4y
rXHSv6P90T2S3wquc2E4JM5HiAkzO9X7N7MBbELPQ+MxeaeOa8hY+A8fEPXcykFG
XuScKjpAhdY3gKPNFKpyyIatEFYRpdnMOK2WstU9CTGt/A+bhU3aV63e/IWMqbk4
BIsfkt3B4q1QYjs89Ia+oUWXbmWDPbG7v8JPQjnbh/G8Z7gqn+9hebpFavx+X4Ya
nxKSfqenXSFNW5dfBov24OsibBHEg1iTkNH5Y5qNBQc6wMYiodE=
=zDPK
-END PGP SIGNATURE-
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

[Pkg-javascript-devel] Bug#854675: npm2deb: template for ITP should strongly encourage writing a proper package description

2017-02-09 Thread Ben Finney
Package: npm2deb
Version: 0.2.6-1
Severity: normal
Tags: patch

The ‘npm2deb’ tool can automatically generate an ITP report. One field
that it automatically generates is the package description.

This unfortunately makes it very easy to submit *bad* ITP reports,
with package descriptions that are quite unsuitable for Debian ITPs.

Please make the ITP template produce a document that strongly
encourages the maintainer to manually edit the description, to meet
Developer's Reference guidelines in §6.2.1 – §6.2.3.

Attached is my suggested patch for this.

-- 
 \ “For man, as for flower and beast and bird, the supreme triumph |
  `\   is to be most vividly, most perfectly alive” —D.H. Lawrence |
_o__)  |
Ben Finney 
diff --git i/npm2deb/templates.py w/npm2deb/templates.py
index 9bda4ee3..a3a06f7a 100644
--- i/npm2deb/templates.py
+++ w/npm2deb/templates.py
@@ -78,9 +78,18 @@ X-Debbugs-CC: debian-de...@lists.debian.org
 * URL : %(homepage)s
 * License : %(license)s
   Programming Lang: JavaScript
-  Description : %(description)s
+  Description : FIX_ME write the Debian package description
 
- FIX_ME bug long description
+ FIX_ME: Write the description for the Debian package according to the
+ Developer's Reference, §6.2.1 – §6.2.3.
+ .
+ This ITP report should not be submitted until you are confident the
+ package description is ready for Debian.
+ .
+ You can start with the upstream package description,
+ “%(description)s”.
+ Be aware that many upstream package descriptions do not meet
+ Debian package guidelines.
  .
  Node.js is an event-based server-side JavaScript engine.
 


signature.asc
Description: PGP signature
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel