[Pkg-javascript-commits] [npm2deb] 04/07: remove patches applied upstream

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Wed Jun 21 11:02:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository npm2deb.

commit 410d48824904d0d905d06d58abef7a178a8d2f49
Author: Pirate Praveen <praveen at debian.org>
Date:   Wed Jun 21 16:22:42 2017 +0530

    remove patches applied upstream
---
 ...-upstream-description-from-Debian-package.patch | 104 ---------------------
 ...Add-suggestions-to-improve-the-ITP-report.patch |  30 ------
 debian/patches/0003-hint-ITP.patch                 |  10 --
 debian/patches/0004-fix-for-editorconfig.patch     |  35 -------
 debian/patches/0005-fix-for-man-array.patch        |  29 ------
 debian/patches/search-in-experimental.patch        |  73 ++-------------
 debian/patches/series                              |   5 -
 7 files changed, 6 insertions(+), 280 deletions(-)

diff --git a/debian/patches/0001-Distinguish-upstream-description-from-Debian-package.patch b/debian/patches/0001-Distinguish-upstream-description-from-Debian-package.patch
deleted file mode 100644
index 8a63938..0000000
--- a/debian/patches/0001-Distinguish-upstream-description-from-Debian-package.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 03cd5adac01c51077cff3edacad1fc9f4ee562c3 Mon Sep 17 00:00:00 2001
-From: Ben Finney <bignose at debian.org>
-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(-)
-
---- a/npm2deb/__init__.py
-+++ b/npm2deb/__init__.py
-@@ -29,7 +29,7 @@
-         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 @@
-                               % 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 @@
-         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 @@
- 
-     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:
---- a/npm2deb/templates.py
-+++ b/npm2deb/templates.py
-@@ -6,6 +6,19 @@
- 
- """
- 
-+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 +39,7 @@
-  ${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 +90,9 @@
-   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 = {}
- 
diff --git a/debian/patches/0002-Add-suggestions-to-improve-the-ITP-report.patch b/debian/patches/0002-Add-suggestions-to-improve-the-ITP-report.patch
deleted file mode 100644
index 604660e..0000000
--- a/debian/patches/0002-Add-suggestions-to-improve-the-ITP-report.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 020478164b46cac3b69836be897967c138de18f9 Mon Sep 17 00:00:00 2001
-From: Ben Finney <bignose at debian.org>
-Date: Fri, 10 Feb 2017 04:38:29 +1100
-Subject: [PATCH 2/2] Add suggestions to improve the ITP report.
-
----
- npm2deb/templates.py | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
---- a/npm2deb/templates.py
-+++ b/npm2deb/templates.py
-@@ -92,7 +92,17 @@
- 
-  FIX_ME: This ITP report is not ready for submission, until you are
-  confident this package description is ready for Debian.
-- .""" + description_template
-+ .
-+""" + description_template + """
-+FIX_ME: Explain why this package is suitable for adding to Debian. Is
-+it a dependency of some other package? What benefit does it provide
-+compared to other similar packages already in Debian?
-+
-+FIX_ME: Explain how you intend to consistently maintain this package
-+in Debian. If you are not yet a Debian member, does this package need
-+a sponsor? Do you have co-maintainers? Are you a member of the Debian
-+JavaScript maintainers team?
-+"""
- 
- LICENSES = {}
- 
diff --git a/debian/patches/0003-hint-ITP.patch b/debian/patches/0003-hint-ITP.patch
deleted file mode 100644
index 4fc3e2f..0000000
--- a/debian/patches/0003-hint-ITP.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/npm2deb/__init__.py
-+++ b/npm2deb/__init__.py
-@@ -115,6 +115,7 @@
- 
-         utils.change_dir(saved_path)
-         _call('/bin/grep --color=auto FIX_ME -r %s/*' % debian_path, shell=True)
-+        _call('/bin/grep --color=auto FIX_ME -r -H %s/*_itp.mail' % self.name, shell=True)
- 
-         if uscan_info[0] != 0:
-             print ("\nUse uscan to get orig source files. Fix debian/watch and then run\
diff --git a/debian/patches/0004-fix-for-editorconfig.patch b/debian/patches/0004-fix-for-editorconfig.patch
deleted file mode 100644
index 856b0b1..0000000
--- a/debian/patches/0004-fix-for-editorconfig.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 653009d72acf16cdd2203824199b91bfd8baee47 Mon Sep 17 00:00:00 2001
-From: Shanavas M <shanavas.m2 at gmail.com>
-Date: Fri, 28 Apr 2017 14:20:41 +0300
-Subject: [PATCH] Get tarball root directory from member filename
-
-Some packages like 'editorconfig' has tarball root directory name
-other than 'package'
-
-Fixes #61
----
- npm2deb/__init__.py | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
---- a/npm2deb/__init__.py
-+++ b/npm2deb/__init__.py
-@@ -434,11 +434,18 @@
- 
-         tarball_file = info[1].strip('\n')
-         tarball = tarfile.open(tarball_file)
-+        # get the root directory name
-+        root_dir = tarball.getnames()[0]
-+        # extract root directory name if memberfile contains '/'
-+        index_of_slash = root_dir.find('/')
-+        if index_of_slash != -1:
-+            root_dir = root_dir[:index_of_slash]
-+
-         tarball.extractall()
-         tarball.close()
- 
-         # rename extracted directory
--        _os.rename('package', self.name)
-+        _os.rename(root_dir, self.name)
-         # remove tarball file
-         _os.remove(tarball_file)
- 
diff --git a/debian/patches/0005-fix-for-man-array.patch b/debian/patches/0005-fix-for-man-array.patch
deleted file mode 100644
index 7d5aca0..0000000
--- a/debian/patches/0005-fix-for-man-array.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0a9f8b01e0fef126a0f350aa0785d56b0a882496 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Fri, 11 Nov 2016 21:27:33 +0100
-Subject: [PATCH] Check man field is not an array
-
-Fixes https://github.com/LeoIannacone/npm2deb/issues/20
----
- npm2deb/__init__.py | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
---- a/npm2deb/__init__.py
-+++ b/npm2deb/__init__.py
-@@ -174,9 +174,13 @@
-                     _os.remove(filename)
- 
-     def create_manpages(self):
--        if 'man' in self.json:
--            content = _os.path.normpath(self.json['man'])
--            utils.create_debian_file('manpages', content)
-+        if not 'man' in self.json:
-+            return
-+        mans = self.json['man']
-+        if not isinstance(mans, (list, tuple)):
-+            mans = [mans]
-+        paths = [_os.path.normpath(manpath) for manpath in mans]
-+        utils.create_debian_file('manpages', "\n".join(paths))
- 
-     def create_watch(self):
-         args = {}
diff --git a/debian/patches/search-in-experimental.patch b/debian/patches/search-in-experimental.patch
index 0a749c1..bef81d8 100644
--- a/debian/patches/search-in-experimental.patch
+++ b/debian/patches/search-in-experimental.patch
@@ -2,13 +2,13 @@
 +++ b/npm2deb/helper.py
 @@ -8,6 +8,7 @@
  from npm2deb import Npm2Deb as _Npm2Deb
- from npm2deb.utils import debug as _debug
+ from npm2deb.utils import debug as _debug, debianize_name as _debianize_name
  from npm2deb.mapper import Mapper as _Mapper
 +from npm2deb.utils import get_package_in_new as _get_package_in_new
  
  
  DO_PRINT = False
-@@ -26,6 +27,7 @@
+@@ -28,6 +29,7 @@
      found = False
      result = {}
      my_print("Looking for existing repositories:")
@@ -16,35 +16,7 @@
      for repo in repositories:
          _debug(1, "search for %s in %s" % (module, repo))
          url_base = "http://anonscm.debian.org/gitweb"
-@@ -85,21 +87,13 @@
-     _debug(1, "calling new-check")
-     found = False
-     formatted = "  {0:20} {1:>3}"
--    url = "https://api.ftp-master.debian.org/sources_in_suite/new"
--    _debug(1, "opening url %s" % url)
--    data = _urlopen(url).read().decode('utf-8')
--    data = _parseJSON(data)
--    result = []
--    for package in data:
--        name = package['source']
--        version = package['version']
--        if not module in name:
--            continue
-+    result = _get_package_in_new(module)
-+    if result:
-         found = True
--        result.append(package)
--        my_print(formatted.format(package['source'],
--                                  package['version']
--                                 ))
-+        my_print(formatted.format(result[0]['source'],
-+                                  result[0]['version']
-+                              ))
-+        
-     if not found:
-         my_print("  None")
-     return result
-@@ -199,3 +193,5 @@
+@@ -178,3 +180,5 @@
  def print_formatted_dependency(npm, debian, prefix=u''):
      formatted = u"{0:50}{1}"
      my_print(formatted.format(u"%s%s" % (prefix, npm), debian))
@@ -52,7 +24,7 @@
 +
 --- a/npm2deb/mapper.py
 +++ b/npm2deb/mapper.py
-@@ -5,7 +5,7 @@
+@@ -6,7 +6,7 @@
  
  from npm2deb.utils import debug as _debug
  from npm2deb.utils import debianize_name as _debianize_name
@@ -61,8 +33,8 @@
  
  DB_URL = 'https://wiki.debian.org/Javascript/Nodejs/Database'
  
-@@ -61,8 +61,15 @@
-             'rmadison -s sid "%s" | grep source' % result['name'])
+@@ -71,8 +71,15 @@
+             'rmadison -u debian "%s" | grep source' % result['name'])
  
          if madison[0] != 0:
 -            result['name'] = None
@@ -79,36 +51,3 @@
  
          tmp = madison[1].split('|')
          if len(tmp) >= 2:
---- a/npm2deb/utils.py
-+++ b/npm2deb/utils.py
-@@ -1,4 +1,6 @@
- from subprocess import getstatusoutput as _getstatusoutput
-+from urllib.request import urlopen as _urlopen
-+from json import loads as _parseJSON
- import codecs as _codecs
- import os as _os
- 
-@@ -110,3 +112,23 @@
- 
- def debianize_name(name):
-     return name.replace('_', '-').lower()
-+
-+def get_npmjs_homepage(name):
-+    return 'https://npmjs.com/package/' + name
-+
-+def get_package_in_new(module):
-+    """
-+    Check if package is available in NEW
-+    """
-+    content = []
-+    url = "https://api.ftp-master.debian.org/sources_in_suite/new"
-+    debug(1, "opening url %s" % url)
-+    data = _urlopen(url).read().decode('utf-8')
-+    data = _parseJSON(data)
-+    for package in data:
-+        name = package['source']
-+        version = package['version']
-+        if not module in name:
-+            continue
-+        content.append(package)
-+    return content
diff --git a/debian/patches/series b/debian/patches/series
index 61bbd2a..3aec554 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1 @@
 search-in-experimental.patch
-0001-Distinguish-upstream-description-from-Debian-package.patch
-0002-Add-suggestions-to-improve-the-ITP-report.patch
-0003-hint-ITP.patch
-0004-fix-for-editorconfig.patch
-0005-fix-for-man-array.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/npm2deb.git



More information about the Pkg-javascript-commits mailing list