build: miniupnpc 2.2.2

Creating the dll subdir is no-longer required.
We can also drop our wingen patch.
pull/20421/head
fanquake 4 years ago
parent c46f1ce751
commit 180dc3c886
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -1,9 +1,9 @@
package=miniupnpc package=miniupnpc
$(package)_version=2.0.20180203 $(package)_version=2.2.2
$(package)_download_path=https://miniupnp.tuxfamily.org/files/ $(package)_download_path=https://miniupnp.tuxfamily.org/files/
$(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 $(package)_sha256_hash=888fb0976ba61518276fe1eda988589c700a3f2a69d71089260d75562afd3687
$(package)_patches=dont_use_wingen.patch $(package)_patches=dont_leak_info.patch
define $(package)_set_vars define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)" $(package)_build_opts=CC="$($(package)_cc)"
@ -13,9 +13,7 @@ $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$
endef endef
define $(package)_preprocess_cmds define $(package)_preprocess_cmds
mkdir dll && \ patch -p1 < $($(package)_patch_dir)/dont_leak_info.patch
sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \
patch -p1 < $($(package)_patch_dir)/dont_use_wingen.patch
endef endef
define $(package)_build_cmds define $(package)_build_cmds

@ -0,0 +1,32 @@
commit 8815452257437ba36607d0e2381c01142d1c7bb0
Author: fanquake <fanquake@gmail.com>
Date: Thu Nov 19 10:51:19 2020 +0800
Don't leak OS and miniupnpc version info in User-Agent
diff --git a//minisoap.c b/minisoap.c
index 7860667..775580b 100644
--- a/minisoap.c
+++ b/minisoap.c
@@ -90,7 +90,7 @@ int soapPostSubmit(SOCKET fd,
headerssize = snprintf(headerbuf, sizeof(headerbuf),
"POST %s HTTP/%s\r\n"
"Host: %s%s\r\n"
- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+ "User-Agent: " UPNP_VERSION_STRING "\r\n"
"Content-Length: %d\r\n"
"Content-Type: text/xml\r\n"
"SOAPAction: \"%s\"\r\n"
diff --git a/miniwget.c b/miniwget.c
index d5b7970..05aeb9c 100644
--- a/miniwget.c
+++ b/miniwget.c
@@ -444,7 +444,7 @@ miniwget3(const char * host,
"GET %s HTTP/%s\r\n"
"Host: %s:%d\r\n"
"Connection: Close\r\n"
- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+ "User-Agent: " UPNP_VERSION_STRING "\r\n"
"\r\n",
path, httpversion, host, port);

@ -1,26 +0,0 @@
commit e8077044df239bcf0d9e9980b0e1afb9f1f5c446
Author: fanquake <fanquake@gmail.com>
Date: Tue Aug 18 20:50:19 2020 +0800
Don't use wingenminiupnpcstrings when generating miniupnpcstrings.h
The wingenminiupnpcstrings tool is used on Windows to generate version
information. This information is irrelevant for us, and trying to use
wingenminiupnpcstrings would cause builds to fail, so just don't use it.
We should be able to drop this once we are using 2.1 or later. See
upstream commit: 9663c55c61408fdcc39a82987d2243f816b22932.
diff --git a/Makefile.mingw b/Makefile.mingw
index 574720e..fcc17bb 100644
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -74,7 +74,7 @@ wingenminiupnpcstrings: wingenminiupnpcstrings.o
wingenminiupnpcstrings.o: wingenminiupnpcstrings.c
-miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings
+miniupnpcstrings.h: miniupnpcstrings.h.in
wingenminiupnpcstrings $< $@
minixml.o: minixml.c minixml.h

@ -17,7 +17,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
| libnatpmp | git commit [4536032...](https://github.com/miniupnp/libnatpmp/tree/4536032ae32268a45c073a4d5e91bbab4534773a) | | No | | | | libnatpmp | git commit [4536032...](https://github.com/miniupnp/libnatpmp/tree/4536032ae32268a45c073a4d5e91bbab4534773a) | | No | | |
| libpng | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) | | libpng | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
| librsvg | | | | | | | librsvg | | | | | |
| MiniUPnPc | [2.0.20180203](https://miniupnp.tuxfamily.org/files) | | No | | | | MiniUPnPc | [2.2.2](https://miniupnp.tuxfamily.org/files) | | No | | |
| PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) | | PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
| Python (tests) | | [3.6](https://www.python.org/downloads) | | | | | Python (tests) | | [3.6](https://www.python.org/downloads) | | | |
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | | | qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |

Loading…
Cancel
Save