Browse Source

Packaging cleanup

* Replace gcc-7 patch with upstream version
* No longer ship a -dbg package
* Bump debhelper compat level to 10
* Bump to Standards-Version: 4.1.1, no changes
* Fix ambiguity in debian/copyright
* Use secure Vcs-* URLs
* Enable full hardening build
* Remove obsolete versioned dependencies
* Several formatting
Christoph Biedl 6 years ago
parent
commit
7d2f68e649

+ 1 - 1
debian/compat

@@ -1 +1 @@
-9
+10

+ 15 - 28
debian/control

@@ -1,31 +1,20 @@
 Source: http-parser
-Priority: extra
 Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Build-Depends: debhelper (>= 9), dh-exec (>=0.3), dpkg-dev (>= 1.16.1~)
-Standards-Version: 3.9.4
-Section: libs
 Homepage: https://github.com/joyent/http-parser
-Vcs-Git: git://anonscm.debian.org/collab-maint/http-parser.git
-Vcs-Browser: http://anonscm.debian.org/gitweb?p=collab-maint/http-parser.git;a=summary
-
-Package: libhttp-parser-dev
-Section: libdevel
-Architecture: any
-Depends: libhttp-parser2.7.1 (= ${binary:Version}), ${misc:Depends}
-Description: parser for HTTP messages: development libraries and header files
- It parses both requests and responses. The parser is designed to be used in
- performance HTTP applications. It does not make any syscalls nor allocations,
- it does not buffer data, it can be interrupted at anytime. Depending on your
- architecture, it only requires about 40 bytes of data per message stream (in
- a web server that is per connection).
- .
- This package contains development libraries and header files.
+Standards-Version: 4.1.1
+Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/http-parser.git
+Vcs-Git: https://anonscm.debian.org/git/collab-maint/http-parser.git
+Build-Depends: debhelper (>= 10~),
+    dh-exec,
+Priority: optional
+Section: libs
 
 Package: libhttp-parser2.7.1
 Architecture: any
+Pre-Depends:
+    ${misc:Pre-Depends},
+Depends: ${misc:Depends}, ${shlibs:Depends},
 Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: parser for HTTP messages written in C
  It parses both requests and responses. The parser is designed to be used in
  performance HTTP applications. It does not make any syscalls nor allocations,
@@ -33,18 +22,16 @@ Description: parser for HTTP messages written in C
  architecture, it only requires about 40 bytes of data per message stream (in
  a web server that is per connection).
 
-Package: libhttp-parser2.7.1-dbg
+Package: libhttp-parser-dev
 Architecture: any
-Multi-Arch: same
-Section: debug
-Depends:
+Depends: ${misc:Depends},
     libhttp-parser2.7.1 (= ${binary:Version}),
-    ${misc:Depends}
-Description: debugging symbols for libhttp-parser2.7.1
+Section: libdevel
+Description: parser for HTTP messages: development libraries and header files
  It parses both requests and responses. The parser is designed to be used in
  performance HTTP applications. It does not make any syscalls nor allocations,
  it does not buffer data, it can be interrupted at anytime. Depending on your
  architecture, it only requires about 40 bytes of data per message stream (in
  a web server that is per connection).
  .
- This package contains the debugging symbols for libhttp-parser2.7.1.
+ This package contains development libraries and header files.

+ 13 - 8
debian/copyright

@@ -1,11 +1,20 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: http-parser
 Source: https://github.com/joyent/http-parser
 
 Files: *
 Copyright: Igor Sysoev
-           2009-2013 Joyent, Inc. and other Node contributors
+ 2009-2013 Joyent, Inc. and other Node contributors
+License: Expat-nginx
+
+Files:
+ debian/*
+Copyright:
+ 2013 Praveen Arimbrathodiyil <praveen@debian.org>
+ 2017 Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 License: Expat
+
+License: Expat-nginx
  http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
  Igor Sysoev.
  .
@@ -30,10 +39,6 @@ License: Expat
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-Files: debian/*
-Copyright: 2013 Praveen Arimbrathodiyil <praveen@debian.org>
-License: Expat
-
 License: Expat
  Permission is hereby granted, free of charge, to any person obtaining a
  copy of this software and associated documentation files (the "Software"),
@@ -49,6 +54,6 @@ License: Expat
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 2 - 2
debian/libhttp-parser-dev.install

@@ -1,4 +1,4 @@
 #!/usr/bin/dh-exec
 
-http_parser.h usr/include
-libhttp_parser.a usr/lib/${DEB_HOST_MULTIARCH}/
+http_parser.h       usr/include/
+libhttp_parser.a    usr/lib/${DEB_HOST_MULTIARCH}/

+ 2 - 2
debian/libhttp-parser-dev.links

@@ -1,4 +1,4 @@
 #!/usr/bin/dh-exec
 
-usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2.7.1 usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2
-usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2 usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so
+usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2       usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so
+usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2.7.1   usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2

+ 0 - 15
debian/patches/add-missing-fallthrough.patch

@@ -1,15 +0,0 @@
-Subject: Add missing/fix misspelt FALLTHROUGH marker
-Author:  Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Forwarded: https://github.com/nodejs/http-parser/issues/395
-
---- a/http_parser.c
-+++ b/http_parser.c
-@@ -1815,7 +1815,7 @@
- 
-             case 2:
-               parser->upgrade = 1;
--
-+              /* FALLTHROUGH */
-             case 1:
-               parser->flags |= F_SKIPBODY;
-               break;

+ 27 - 0
debian/patches/cherry-pick.v2.7.1-8-g0852bea.fix-fallthrough-warning-in-switch-of-gcc7.patch

@@ -0,0 +1,27 @@
+Subject: Fix FALLTHROUGH warning in switch of GCC7
+Origin: v2.7.1-8-g0852bea
+Upstream-Author: André Klitzing <aklitzing@gmail.com>
+Date: Thu Mar 9 15:54:39 2017 +0100
+
+    PR-URL: https://github.com/nodejs/http-parser/pull/357
+    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
+
+--- a/http_parser.c
++++ b/http_parser.c
+@@ -1816,6 +1816,7 @@
+             case 2:
+               parser->upgrade = 1;
+ 
++            /* FALLTHROUGH */
+             case 1:
+               parser->flags |= F_SKIPBODY;
+               break;
+@@ -2375,7 +2376,7 @@
+       case s_req_server_with_at:
+         found_at = 1;
+ 
+-      /* FALLTROUGH */
++      /* FALLTHROUGH */
+       case s_req_server:
+         uf = UF_HOST;
+         break;

+ 0 - 16
debian/patches/fix-misspelt-fallthrough.patch

@@ -1,16 +0,0 @@
-Subject: Add missing/fix misspelt FALLTHROUGH marker
-Author: Hilko Bengen <bengen@debian.org>
-Bug-Debian: https://bugs.debian.org/853446
-Forwarded: https://github.com/nodejs/http-parser/issues/381
-
---- a/http_parser.c
-+++ b/http_parser.c
-@@ -2375,7 +2375,7 @@
-       case s_req_server_with_at:
-         found_at = 1;
- 
--      /* FALLTROUGH */
-+      /* FALLTHROUGH */
-       case s_req_server:
-         uf = UF_HOST;
-         break;

+ 1 - 2
debian/patches/series

@@ -1,2 +1 @@
-fix-misspelt-fallthrough.patch
-add-missing-fallthrough.patch
+cherry-pick.v2.7.1-8-g0852bea.fix-fallthrough-warning-in-switch-of-gcc7.patch

+ 2 - 10
debian/rules

@@ -1,12 +1,9 @@
 #!/usr/bin/make -f
 
-export DH_VERBOSE=1
-
+export DEB_BUILD_MAINT_OPTIONS := hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-
 %:
 	dh $@
 
@@ -15,9 +12,4 @@ override_dh_auto_build:
 	dh_auto_build -- library
 
 override_dh_makeshlibs:
-	dh_makeshlibs -V 'libhttp-parser2.7.1 (>=2.7.1)'
-
-override_dh_strip:
-	dh_strip --dbg-package=libhttp-parser2.7.1-dbg
-
-.PHONY: override_dh_strip override_dh_makeshlibs override_dh_auto_build
+	dh_makeshlibs -V 'libhttp-parser2.7.1 (>= 2.7.1)'