From a4d716b8e97d218b6533a97c1e686e80747e1473a805736c6d1a10eb6d5310b4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 15 Aug 2020 23:05:51 +0000 Subject: [PATCH 1/3] - update to 2.9.4: * use optflags for building * Remove NULL sentinels from test runner * Reject interior blanks in Content-Length * Disallow empty Content-Length * Speed up http_parser loop * Fix bad pointer arithmetic * Support multi-coding Transfer-Encoding - remove makefile.patch: we want to build with -Werror OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/http-parser?expand=0&rev=13 --- baselibs.conf | 2 +- http-parser-2.7.1.tar.gz | 3 -- http-parser-2.9.4.tar.gz | 3 ++ http-parser.changes | 14 ++++++++++ http-parser.spec | 21 +++++++------- makefile.patch | 59 +++------------------------------------- 6 files changed, 32 insertions(+), 70 deletions(-) delete mode 100644 http-parser-2.7.1.tar.gz create mode 100644 http-parser-2.9.4.tar.gz diff --git a/baselibs.conf b/baselibs.conf index 625dd8b..6c1789a 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -libhttp_parser2_7_1 +libhttp_parser2_9 diff --git a/http-parser-2.7.1.tar.gz b/http-parser-2.7.1.tar.gz deleted file mode 100644 index 3948dd6..0000000 --- a/http-parser-2.7.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70409ad324e5de2da6a0f39e859e566d497c1ff0a249c0c38a5012df91b386b3 -size 48578 diff --git a/http-parser-2.9.4.tar.gz b/http-parser-2.9.4.tar.gz new file mode 100644 index 0000000..63b9ae4 --- /dev/null +++ b/http-parser-2.9.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f +size 52056 diff --git a/http-parser.changes b/http-parser.changes index 48c137b..a4f8e5a 100644 --- a/http-parser.changes +++ b/http-parser.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sat Aug 15 23:03:50 UTC 2020 - Dirk Mueller + +- update to 2.9.4: + * use optflags for building + * Remove NULL sentinels from test runner + * Reject interior blanks in Content-Length + * Disallow empty Content-Length + * Speed up http_parser loop + * Fix bad pointer arithmetic + * Support multi-coding Transfer-Encoding + +- remove makefile.patch: we want to build with -Werror + ------------------------------------------------------------------- Fri Nov 3 10:01:08 UTC 2017 - mimi.vx@gmail.com diff --git a/http-parser.spec b/http-parser.spec index f09a28a..4461bce 100644 --- a/http-parser.spec +++ b/http-parser.spec @@ -1,7 +1,7 @@ # # spec file for package http-parser # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,22 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define soname 2_7_1 +%define soname 2_9 %define libname libhttp_parser%{soname} Name: http-parser -Version: 2.7.1 +Version: 2.9.4 Release: 0 Summary: HTTP request/response parser for C License: MIT Group: Development/Libraries/C and C++ -Url: https://github.com/nodejs/http-parser +URL: https://github.com/nodejs/http-parser Source0: https://github.com/nodejs/http-parser/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf -Patch0: makefile.patch BuildRequires: gcc-c++ %description @@ -72,23 +71,23 @@ Development headers and libraries for http-parser. %prep %setup -q -%patch0 -p1 %build -make %{?_smp_mflags} PREFIX=%{_prefix} library +%make_build PREFIX=%{_prefix} CFLAGS_FAST_EXTRA="%{optflags}" library %install -make PREFIX=%{_prefix} DESTDIR=%{buildroot} LIBDIR=%{_libdir} install +%make_install PREFIX=%{_prefix} DESTDIR=%{buildroot} LIBDIR=%{_libdir} chmod a-x %{buildroot}/%{_includedir}/*.h %check -make %{?_smp_mflags} test +%make_build test %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -n %{libname} -%doc AUTHORS LICENSE-MIT README.md +%license LICENSE-MIT +%doc README.md %{_libdir}/libhttp_parser.so.* %files devel diff --git a/makefile.patch b/makefile.patch index 411202e..8c1f197 100644 --- a/makefile.patch +++ b/makefile.patch @@ -1,8 +1,8 @@ -Index: http-parser-2.7.1/Makefile +Index: http-parser-2.9.4/Makefile =================================================================== ---- http-parser-2.7.1.orig/Makefile -+++ http-parser-2.7.1/Makefile -@@ -46,7 +46,6 @@ CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSE +--- http-parser-2.9.4.orig/Makefile ++++ http-parser-2.9.4/Makefile +@@ -52,7 +52,6 @@ CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSE CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA) CPPFLAGS_BENCH = $(CPPFLAGS_FAST) @@ -10,54 +10,3 @@ Index: http-parser-2.7.1/Makefile CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA) CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) CFLAGS_BENCH = $(CFLAGS_FAST) -Wno-unused-parameter -@@ -55,7 +54,7 @@ CFLAGS_LIB = $(CFLAGS_FAST) -fPIC - LDFLAGS_LIB = $(LDFLAGS) -shared - - INSTALL ?= install --PREFIX ?= $(DESTDIR)/usr/local -+PREFIX ?= /usr/local - LIBDIR = $(PREFIX)/lib - INCLUDEDIR = $(PREFIX)/include - -@@ -102,7 +101,7 @@ libhttp_parser.o: http_parser.c http_par - $(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o - - library: libhttp_parser.o -- $(CC) $(LDFLAGS_LIB) -o $(SONAME) $< -+ $(CC) $(CFLAGS_LIB) $(LDFLAGS_LIB) -o $(SONAME) $< - - package: http_parser.o - $(AR) rcs libhttp_parser.a http_parser.o -@@ -122,20 +121,20 @@ parsertrace_g: http_parser_g.o contrib/p - tags: http_parser.c http_parser.h test.c - ctags $^ - --install: library -- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h -- $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME) -- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) -- --install-strip: library -- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h -- $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME) -- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) -+install: $(SONAME) -+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" -+ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" -+ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" -+ -+install-strip: $(SONAME) -+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" -+ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" -+ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" - - uninstall: -- rm $(INCLUDEDIR)/http_parser.h -- rm $(LIBDIR)/$(SONAME) -- rm $(LIBDIR)/libhttp_parser.so -+ rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" -+ rm "$(DESTDIR)$(LIBDIR)/$(SONAME)" -+ rm "$(DESTDIR)$(LIBDIR)/libhttp_parser.so" - - clean: - rm -f *.o *.a tags test test_fast test_g \ From a43901bc3dd5c7fc8d39f68822a07f492401b4b45e81307de2947698eb3722ad Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 15 Aug 2020 23:06:01 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/http-parser?expand=0&rev=14 --- makefile.patch | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 makefile.patch diff --git a/makefile.patch b/makefile.patch deleted file mode 100644 index 8c1f197..0000000 --- a/makefile.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: http-parser-2.9.4/Makefile -=================================================================== ---- http-parser-2.9.4.orig/Makefile -+++ http-parser-2.9.4/Makefile -@@ -52,7 +52,6 @@ CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSE - CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA) - CPPFLAGS_BENCH = $(CPPFLAGS_FAST) - --CFLAGS += -Wall -Wextra -Werror - CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA) - CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) - CFLAGS_BENCH = $(CFLAGS_FAST) -Wno-unused-parameter From 1183c6c0390a329bdafb404e1f85c01f768dfc422be5cf18cbecec60bc88a9c6 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 15 Aug 2020 23:07:37 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/http-parser?expand=0&rev=15 --- http-parser.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-parser.spec b/http-parser.spec index 4461bce..17b3b6b 100644 --- a/http-parser.spec +++ b/http-parser.spec @@ -91,7 +91,7 @@ chmod a-x %{buildroot}/%{_includedir}/*.h %{_libdir}/libhttp_parser.so.* %files devel -%{_includedir}/* +%{_includedir}/http_parser.h %{_libdir}/libhttp_parser.so %changelog