Browse Source

Adjust for new upstream version

* SONAME bump
* Drop fix-soname and use-ldflags patches, went upstream
* Add another fallthrough mark
* Update symbols file
Christoph Biedl 6 years ago
parent
commit
2e6f5fbce4

+ 1 - 1
debian/clean

@@ -1 +1 @@
-libhttp_parser.so.2.1
+libhttp_parser.so.2.7.1

+ 6 - 6
debian/control

@@ -11,7 +11,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb?p=collab-maint/http-parser.git;a=s
 Package: libhttp-parser-dev
 Section: libdevel
 Architecture: any
-Depends: libhttp-parser2.1 (= ${binary:Version}), ${misc:Depends}
+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,
@@ -21,7 +21,7 @@ Description: parser for HTTP messages: development libraries and header files
  .
  This package contains development libraries and header files.
 
-Package: libhttp-parser2.1
+Package: libhttp-parser2.7.1
 Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
@@ -33,18 +33,18 @@ 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.1-dbg
+Package: libhttp-parser2.7.1-dbg
 Architecture: any
 Multi-Arch: same
 Section: debug
 Depends:
-    libhttp-parser2.1 (= ${binary:Version}),
+    libhttp-parser2.7.1 (= ${binary:Version}),
     ${misc:Depends}
-Description: debugging symbols for libhttp-parser2.1
+Description: debugging symbols for libhttp-parser2.7.1
  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.1.
+ This package contains the debugging symbols for libhttp-parser2.7.1.

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

@@ -1,4 +1,4 @@
 #!/usr/bin/dh-exec
 
-usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2.1 usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2
+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

+ 0 - 2
debian/libhttp-parser2.1-dbg.lintian-overrides

@@ -1,2 +0,0 @@
-# Upstread does not provide a changelog
-libhttp-parser2.1-dbg: no-upstream-changelog

+ 0 - 3
debian/libhttp-parser2.1.install

@@ -1,3 +0,0 @@
-#!/usr/bin/dh-exec
-
-libhttp_parser.so.2.1 usr/lib/${DEB_HOST_MULTIARCH}/

+ 0 - 2
debian/libhttp-parser2.1.lintian-overrides

@@ -1,2 +0,0 @@
-# Upstread does not provide a changelog
-libhttp-parser2.1: no-upstream-changelog

+ 2 - 0
debian/libhttp-parser2.7.1-dbg.lintian-overrides

@@ -0,0 +1,2 @@
+# Upstread does not provide a changelog
+libhttp-parser2.7.1-dbg: no-upstream-changelog

debian/libhttp-parser2.1.docs → debian/libhttp-parser2.7.1.docs


+ 3 - 0
debian/libhttp-parser2.7.1.install

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

+ 2 - 0
debian/libhttp-parser2.7.1.lintian-overrides

@@ -0,0 +1,2 @@
+# Upstread does not provide a changelog
+libhttp-parser2.7.1: no-upstream-changelog

+ 4 - 1
debian/libhttp-parser2.1.symbols

@@ -1,4 +1,4 @@
-libhttp_parser.so.2.1 libhttp-parser2.1 #MINVER#
+libhttp_parser.so.2.7.1 libhttp-parser2.7.1 #MINVER#
  http_body_is_final@Base 2.1
  http_errno_description@Base 2.1
  http_errno_name@Base 2.1
@@ -8,4 +8,7 @@ libhttp_parser.so.2.1 libhttp-parser2.1 #MINVER#
  http_parser_init@Base 2.1
  http_parser_parse_url@Base 2.1
  http_parser_pause@Base 2.1
+ http_parser_settings_init@Base 2.7.1
+ http_parser_url_init@Base 2.7.1
+ http_parser_version@Base 2.7.1
  http_should_keep_alive@Base 2.1

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

@@ -0,0 +1,15 @@
+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;

+ 0 - 13
debian/patches/bug-853446-fix-ftbfs-gcc-7.patch

@@ -1,13 +0,0 @@
-Index: http-parser/http_parser.c
-===================================================================
---- http-parser.orig/http_parser.c
-+++ http-parser/http_parser.c
-@@ -2092,7 +2092,7 @@ http_parser_parse_url(const char *buf, s
-       case s_req_server_with_at:
-         found_at = 1;
- 
--      /* FALLTROUGH */
-+      /* FALLTHROUGH */
-       case s_req_server:
-         uf = UF_HOST;
-         break;

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

@@ -0,0 +1,16 @@
+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;

+ 0 - 83
debian/patches/fix-soname.patch

@@ -1,83 +0,0 @@
-Description: set SONAME in shared object file
-Author: Ben Noordhuis <info@bnoordhuis.nl>
-Bug: https://github.com/joyent/http-parser/issues/151
-Origin: https://github.com/joyent/http-parser/commit/1b96c76.patch
-Last-Update: 2013-06-13
- 
----
- .gitignore    |  2 +-
- Makefile      | 34 ++++++++++++++++++++++++++++++++--
- http_parser.h |  1 +
- 3 files changed, 34 insertions(+), 3 deletions(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,3 +1,26 @@
-+# Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a copy
-+# of this software and associated documentation files (the "Software"), to
-+# deal in the Software without restriction, including without limitation the
-+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+# sell copies of the Software, and to permit persons to whom the Software is
-+# furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included in
-+# all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 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 SOFTWARE OR THE USE OR OTHER DEALINGS
-+# IN THE SOFTWARE.
-+
-+PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
-+SONAME ?= libhttp_parser.so.2.1
-+
- CC?=gcc
- AR?=ar
- 
-@@ -12,6 +35,13 @@
- CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
- CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
- 
-+LDFLAGS_LIB = -shared
-+
-+ifneq (darwin,$(PLATFORM))
-+# TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
-+LDFLAGS_LIB += -Wl,-soname=$(SONAME)
-+endif
-+
- test: test_g test_fast
- 	./test_g
- 	./test_fast
-@@ -44,7 +74,7 @@
- 	$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
- 
- library: libhttp_parser.o
--	$(CC) -shared -o libhttp_parser.so libhttp_parser.o
-+	$(CC) $(LDFLAGS_LIB) -o $(SONAME) $<
- 
- package: http_parser.o
- 	$(AR) rcs libhttp_parser.a http_parser.o
-@@ -66,7 +96,7 @@
- 
- clean:
- 	rm -f *.o *.a tags test test_fast test_g \
--		http_parser.tar libhttp_parser.so \
-+		http_parser.tar libhttp_parser.so.* \
- 		url_parser url_parser_g parsertrace parsertrace_g
- 
- contrib/url_parser.c:	http_parser.h
---- a/http_parser.h
-+++ b/http_parser.h
-@@ -24,6 +24,7 @@
- extern "C" {
- #endif
- 
-+/* Also update SONAME in the Makefile whenever you change these. */
- #define HTTP_PARSER_VERSION_MAJOR 2
- #define HTTP_PARSER_VERSION_MINOR 1
- 

+ 2 - 3
debian/patches/series

@@ -1,3 +1,2 @@
-fix-soname.patch
-use-ldflags.patch
-bug-853446-fix-ftbfs-gcc-7.patch
+fix-misspelt-fallthrough.patch
+add-missing-fallthrough.patch

+ 0 - 15
debian/patches/use-ldflags.patch

@@ -1,15 +0,0 @@
-Description: Use hardened LDFLAGS
- Add "read-only relocation" link flag when building library
-Author: Praveen Arimbrathodiyil <praveen@debian.org>
-Last-Update: 2013-06-13
-
---- a/Makefile
-+++ b/Makefile
-@@ -36,6 +36,7 @@
- CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
- 
- LDFLAGS_LIB = -shared
-+LDFLAGS_LIB += $(LDFLAGS)
- 
- ifneq (darwin,$(PLATFORM))
- # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...

+ 3 - 3
debian/rules

@@ -8,16 +8,16 @@ include /usr/share/dpkg/buildflags.mk
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 %:
-	dh $@ 
+	dh $@
 
 override_dh_auto_build:
 	dh_auto_build -- package
 	dh_auto_build -- library
 
 override_dh_makeshlibs:
-	dh_makeshlibs -V 'libhttp-parser2.1 (>=2.1)'
+	dh_makeshlibs -V 'libhttp-parser2.7.1 (>=2.7.1)'
 
 override_dh_strip:
-	dh_strip --dbg-package=libhttp-parser2.1-dbg
+	dh_strip --dbg-package=libhttp-parser2.7.1-dbg
 
 .PHONY: override_dh_strip override_dh_makeshlibs override_dh_auto_build