diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2023-06-28 21:56:09 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-06-28 13:53:12 -0700 |
| commit | 06a38187eb6fc6ee7e7bfdf361f4ce511837be5b (patch) | |
| tree | ac5d69ce3df42d38ab05f58f7fe14173c72e66f8 | |
| parent | 33c96b7ed85045e3d5bc169908fc25c03efcf9a5 (diff) | |
| download | meta-openembedded-06a38187eb6fc6ee7e7bfdf361f4ce511837be5b.tar.gz | |
gupnp: backport a fix not to use deprecated xmlReadMemory
* deprecated since libxml2-2.11 upgraded in oe-core in:
https://git.openembedded.org/openembedded-core/commit/?id=24860598ba8557ea3a145f249938ea411f1ef1d8
* fixes:
../gupnp-1.4.1/libgupnp/gupnp-service-info.c: In function 'got_scpd_url':
../gupnp-1.4.1/libgupnp/gupnp-service-info.c:595:17: error: 'xmlRecoverMemory' is deprecated [-Werror=deprecated-declarations]
595 | scpd = xmlRecoverMemory (msg->response_body->data,
| ^~~~
In file included from /OE/build/luneos-nanbield/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/gupnp/1.4.1-r0/recipe-sysroot/usr/include/libxml2/libxml/globals.h:18,
from /OE/build/luneos-nanbield/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/gupnp/1.4.1-r0/recipe-sysroot/usr/include/libxml2/libxml/threads.h:35,
from /OE/build/luneos-nanbield/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/gupnp/1.4.1-r0/recipe-sysroot/usr/include/libxml2/libxml/xmlmemory.h:222,
from /OE/build/luneos-nanbield/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/gupnp/1.4.1-r0/recipe-sysroot/usr/include/libxml2/libxml/tree.h:1310,
from ../gupnp-1.4.1/libgupnp/gupnp-service-introspection-private.h:12,
from ../gupnp-1.4.1/libgupnp/gupnp-service-info.c:26:
/OE/build/luneos-nanbield/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-webos-linux-gnueabi/gupnp/1.4.1-r0/recipe-sysroot/usr/include/libxml2/libxml/parser.h:872:17: note: declared here
872 | xmlRecoverMemory (const char *buffer,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-multimedia/recipes-connectivity/gupnp/gupnp/0001-all-Drop-xmlRecoverMemory.patch | 107 | ||||
| -rw-r--r-- | meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb | 4 |
2 files changed, 110 insertions, 1 deletions
diff --git a/meta-multimedia/recipes-connectivity/gupnp/gupnp/0001-all-Drop-xmlRecoverMemory.patch b/meta-multimedia/recipes-connectivity/gupnp/gupnp/0001-all-Drop-xmlRecoverMemory.patch new file mode 100644 index 0000000000..a3941f345f --- /dev/null +++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp/0001-all-Drop-xmlRecoverMemory.patch | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | From 46f13d9929c81ec2340a1a5d48f596b1892c5a81 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jens Georg <mail@jensge.org> | ||
| 3 | Date: Thu, 4 May 2023 19:14:29 +0200 | ||
| 4 | Subject: [PATCH] all: Drop xmlRecoverMemory | ||
| 5 | |||
| 6 | use xmlReadMemory, also use NONET flat | ||
| 7 | |||
| 8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 9 | Upstream-Status: Backport [https://github.com/GNOME/gupnp/commit/80e68995b745a5900eaaa1d0c424d3a9d354e42d] | ||
| 10 | --- | ||
| 11 | libgupnp/gupnp-control-point.c | 7 +++++-- | ||
| 12 | libgupnp/gupnp-service-info.c | 7 +++++-- | ||
| 13 | libgupnp/gupnp-service-proxy-action.c | 7 +++++-- | ||
| 14 | libgupnp/gupnp-service-proxy.c | 7 +++++-- | ||
| 15 | libgupnp/gupnp-service.c | 7 +++++-- | ||
| 16 | 5 files changed, 25 insertions(+), 10 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/libgupnp/gupnp-control-point.c b/libgupnp/gupnp-control-point.c | ||
| 19 | index dc04732..99ebda5 100644 | ||
| 20 | --- a/libgupnp/gupnp-control-point.c | ||
| 21 | +++ b/libgupnp/gupnp-control-point.c | ||
| 22 | @@ -608,8 +608,11 @@ got_description_url (SoupSession *session, | ||
| 23 | xmlDoc *xml_doc; | ||
| 24 | |||
| 25 | /* Parse response */ | ||
| 26 | - xml_doc = xmlRecoverMemory (msg->response_body->data, | ||
| 27 | - msg->response_body->length); | ||
| 28 | + xml_doc = xmlReadMemory (msg->response_body->data, | ||
| 29 | + msg->response_body->length, | ||
| 30 | + NULL, | ||
| 31 | + NULL, | ||
| 32 | + XML_PARSE_NONET | XML_PARSE_RECOVER); | ||
| 33 | if (xml_doc) { | ||
| 34 | doc = gupnp_xml_doc_new (xml_doc); | ||
| 35 | |||
| 36 | diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c | ||
| 37 | index 9a9f4de..d468801 100644 | ||
| 38 | --- a/libgupnp/gupnp-service-info.c | ||
| 39 | +++ b/libgupnp/gupnp-service-info.c | ||
| 40 | @@ -592,8 +592,11 @@ got_scpd_url (G_GNUC_UNUSED SoupSession *session, | ||
| 41 | if (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { | ||
| 42 | xmlDoc *scpd; | ||
| 43 | |||
| 44 | - scpd = xmlRecoverMemory (msg->response_body->data, | ||
| 45 | - msg->response_body->length); | ||
| 46 | + scpd = xmlReadMemory (msg->response_body->data, | ||
| 47 | + msg->response_body->length, | ||
| 48 | + NULL, | ||
| 49 | + NULL, | ||
| 50 | + XML_PARSE_NONET | XML_PARSE_RECOVER); | ||
| 51 | if (scpd) { | ||
| 52 | introspection = gupnp_service_introspection_new (scpd); | ||
| 53 | |||
| 54 | diff --git a/libgupnp/gupnp-service-proxy-action.c b/libgupnp/gupnp-service-proxy-action.c | ||
| 55 | index 4d9336c..ef8a808 100644 | ||
| 56 | --- a/libgupnp/gupnp-service-proxy-action.c | ||
| 57 | +++ b/libgupnp/gupnp-service-proxy-action.c | ||
| 58 | @@ -86,8 +86,11 @@ check_action_response (G_GNUC_UNUSED GUPnPServiceProxy *proxy, | ||
| 59 | } | ||
| 60 | |||
| 61 | /* Parse response */ | ||
| 62 | - response = xmlRecoverMemory (action->msg->response_body->data, | ||
| 63 | - action->msg->response_body->length); | ||
| 64 | + response = xmlReadMemory (action->msg->response_body->data, | ||
| 65 | + action->msg->response_body->length, | ||
| 66 | + NULL, | ||
| 67 | + NULL, | ||
| 68 | + XML_PARSE_NONET | XML_PARSE_RECOVER); | ||
| 69 | |||
| 70 | if (!response) { | ||
| 71 | if (action->msg->status_code == SOUP_STATUS_OK) { | ||
| 72 | diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c | ||
| 73 | index 25d5ef6..af2fd46 100644 | ||
| 74 | --- a/libgupnp/gupnp-service-proxy.c | ||
| 75 | +++ b/libgupnp/gupnp-service-proxy.c | ||
| 76 | @@ -1560,8 +1560,11 @@ server_handler (G_GNUC_UNUSED SoupServer *soup_server, | ||
| 77 | } | ||
| 78 | |||
| 79 | /* Parse the actual XML message content */ | ||
| 80 | - doc = xmlRecoverMemory (msg->request_body->data, | ||
| 81 | - msg->request_body->length); | ||
| 82 | + doc = xmlReadMemory (msg->request_body->data, | ||
| 83 | + msg->request_body->length, | ||
| 84 | + NULL, | ||
| 85 | + NULL, | ||
| 86 | + XML_PARSE_NONET | XML_PARSE_RECOVER); | ||
| 87 | if (doc == NULL) { | ||
| 88 | /* Failed */ | ||
| 89 | g_warning ("Failed to parse NOTIFY message body"); | ||
| 90 | diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c | ||
| 91 | index 67b3d43..0ebfb26 100644 | ||
| 92 | --- a/libgupnp/gupnp-service.c | ||
| 93 | +++ b/libgupnp/gupnp-service.c | ||
| 94 | @@ -985,8 +985,11 @@ control_server_handler (SoupServer *server, | ||
| 95 | *end = '\0'; | ||
| 96 | |||
| 97 | /* Parse action_node */ | ||
| 98 | - doc = xmlRecoverMemory (msg->request_body->data, | ||
| 99 | - msg->request_body->length); | ||
| 100 | + doc = xmlReadMemory (msg->request_body->data, | ||
| 101 | + msg->request_body->length, | ||
| 102 | + NULL, | ||
| 103 | + NULL, | ||
| 104 | + XML_PARSE_NONET | XML_PARSE_RECOVER); | ||
| 105 | if (doc == NULL) { | ||
| 106 | soup_message_set_status (msg, SOUP_STATUS_BAD_REQUEST); | ||
| 107 | |||
diff --git a/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb b/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb index 708e3844ff..c21e7a05bf 100644 --- a/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb +++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb | |||
| @@ -7,7 +7,9 @@ DEPENDS = "e2fsprogs gssdp libsoup-2.4 libxml2" | |||
| 7 | 7 | ||
| 8 | inherit meson pkgconfig vala gobject-introspection | 8 | inherit meson pkgconfig vala gobject-introspection |
| 9 | 9 | ||
| 10 | SRC_URI = "${GNOME_MIRROR}/${BPN}/1.4/${BPN}-${PV}.tar.xz" | 10 | SRC_URI = "${GNOME_MIRROR}/${BPN}/1.4/${BPN}-${PV}.tar.xz \ |
| 11 | file://0001-all-Drop-xmlRecoverMemory.patch \ | ||
| 12 | " | ||
| 11 | SRC_URI[sha256sum] = "899196b5e66f03b8e25f046a7a658cd2a6851becb83f2d55345ab3281655dc0c" | 13 | SRC_URI[sha256sum] = "899196b5e66f03b8e25f046a7a658cd2a6851becb83f2d55345ab3281655dc0c" |
| 12 | 14 | ||
| 13 | SYSROOT_PREPROCESS_FUNCS += "gupnp_sysroot_preprocess" | 15 | SYSROOT_PREPROCESS_FUNCS += "gupnp_sysroot_preprocess" |
