
6 changed files with 256 additions and 155 deletions
-
107patches/libsoup-2.65.1.patch
-
114patches/libsoup-2.74.2.patch
-
41patches/phodav-2.2.patch
-
135patches/phodav-2.5.patch
-
8patches/sources
-
6scripts/build_dependencies.sh
@ -1,107 +0,0 @@ |
|||
diff -ruN a/Makefile.in b/Makefile.in
|
|||
--- a/Makefile.in 2018-10-08 05:56:21.000000000 -0700
|
|||
+++ b/Makefile.in 2020-04-06 14:11:06.000000000 -0700
|
|||
@@ -452,7 +452,7 @@
|
|||
top_builddir = @top_builddir@ |
|||
top_srcdir = @top_srcdir@ |
|||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} |
|||
-SUBDIRS = libsoup po tests examples docs
|
|||
+SUBDIRS = libsoup
|
|||
EXTRA_DIST = \ |
|||
libsoup-2.4.pc.in \ |
|||
libsoup-gnome-2.4.pc.in \ |
|||
diff -ruN a/configure b/configure
|
|||
--- a/configure 2018-10-08 05:56:21.000000000 -0700
|
|||
+++ b/configure 2020-04-06 14:12:07.000000000 -0700
|
|||
@@ -12970,7 +12970,7 @@
|
|||
|
|||
fi |
|||
|
|||
-
|
|||
+if false; then # disable dependency checks
|
|||
|
|||
pkg_failed=no |
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML" >&5 |
|||
@@ -13251,8 +13251,7 @@
|
|||
|
|||
fi |
|||
|
|||
-
|
|||
-
|
|||
+fi
|
|||
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Win32" >&5 |
|||
$as_echo_n "checking for Win32... " >&6; } |
|||
@@ -13304,7 +13303,7 @@
|
|||
$as_echo "$USE_NLS" >&6; } |
|||
|
|||
|
|||
-
|
|||
+if false; then # disable intltool check
|
|||
|
|||
case "$am__api_version" in |
|||
1.01234) |
|||
@@ -13828,7 +13827,7 @@
|
|||
# Substitute ALL_LINGUAS so we can use it in po/Makefile |
|||
|
|||
|
|||
-
|
|||
+fi
|
|||
|
|||
|
|||
GETTEXT_PACKAGE=libsoup |
|||
diff -ruN a/libsoup/Makefile.in b/libsoup/Makefile.in
|
|||
--- a/libsoup/Makefile.in 2018-10-08 05:56:22.000000000 -0700
|
|||
+++ b/libsoup/Makefile.in 2020-04-06 14:07:04.000000000 -0700
|
|||
@@ -175,9 +175,6 @@
|
|||
libsoup_2_4_la-soup-content-sniffer-stream.lo \ |
|||
libsoup_2_4_la-soup-converter-wrapper.lo \ |
|||
libsoup_2_4_la-soup-cookie.lo \ |
|||
- libsoup_2_4_la-soup-cookie-jar.lo \
|
|||
- libsoup_2_4_la-soup-cookie-jar-db.lo \
|
|||
- libsoup_2_4_la-soup-cookie-jar-text.lo \
|
|||
libsoup_2_4_la-soup-date.lo \ |
|||
libsoup_2_4_la-soup-directory-input-stream.lo \ |
|||
libsoup_2_4_la-soup-enum-types.lo \ |
|||
@@ -211,13 +208,11 @@
|
|||
libsoup_2_4_la-soup-session-sync.lo \ |
|||
libsoup_2_4_la-soup-socket.lo \ |
|||
libsoup_2_4_la-soup-socket-properties.lo \ |
|||
- libsoup_2_4_la-soup-status.lo libsoup_2_4_la-soup-tld.lo \
|
|||
+ libsoup_2_4_la-soup-status.lo \
|
|||
libsoup_2_4_la-soup-uri.lo libsoup_2_4_la-soup-value-utils.lo \ |
|||
libsoup_2_4_la-soup-version.lo \ |
|||
libsoup_2_4_la-soup-websocket.lo \ |
|||
- libsoup_2_4_la-soup-websocket-connection.lo \
|
|||
- libsoup_2_4_la-soup-xmlrpc.lo \
|
|||
- libsoup_2_4_la-soup-xmlrpc-old.lo
|
|||
+ libsoup_2_4_la-soup-websocket-connection.lo
|
|||
libsoup_2_4_la_OBJECTS = $(am_libsoup_2_4_la_OBJECTS) |
|||
AM_V_lt = $(am__v_lt_@AM_V@) |
|||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) |
|||
@@ -733,9 +728,6 @@
|
|||
soup-converter-wrapper.h \ |
|||
soup-converter-wrapper.c \ |
|||
soup-cookie.c \ |
|||
- soup-cookie-jar.c \
|
|||
- soup-cookie-jar-db.c \
|
|||
- soup-cookie-jar-text.c \
|
|||
soup-date.c \ |
|||
soup-directory-input-stream.h \ |
|||
soup-directory-input-stream.c \ |
|||
@@ -786,14 +778,11 @@
|
|||
soup-socket-private.h \ |
|||
soup-socket-properties.c \ |
|||
soup-status.c \ |
|||
- soup-tld.c \
|
|||
soup-uri.c \ |
|||
soup-value-utils.c \ |
|||
soup-version.c \ |
|||
soup-websocket.c \ |
|||
- soup-websocket-connection.c \
|
|||
- soup-xmlrpc.c \
|
|||
- soup-xmlrpc-old.c
|
|||
+ soup-websocket-connection.c
|
|||
|
|||
@BUILD_LIBSOUP_GNOME_TRUE@libsoupgnomeincludedir = $(includedir)/libsoup-gnome-2.4/libsoup |
|||
@BUILD_LIBSOUP_GNOME_TRUE@libsoupgnomeinclude_HEADERS = \ |
@ -0,0 +1,114 @@ |
|||
From 119abc03aac8c5cf1af0845a0e64b3027ce1fa78 Mon Sep 17 00:00:00 2001 |
|||
From: osy <50960678+osy@users.noreply.github.com> |
|||
Date: Sat, 5 Mar 2022 17:02:38 -0800 |
|||
Subject: [PATCH] soup-tld: disabled when libpsl is optional |
|||
|
|||
When building without libpsl, we no longer have soup-tld.c. As a result, |
|||
we do not provide those APIs in the built library and additionally the |
|||
following change is made to soup_cookie_jar_add_cookie_full() |
|||
|
|||
1. We no longer reject cookies for public domains |
|||
2. If the accept policy is not SOUP_COOKIE_JAR_ACCEPT_ALWAYS we assume |
|||
all incoming cookie is third party and reject it. |
|||
---
|
|||
libsoup/meson.build | 4 +++- |
|||
libsoup/soup-cookie-jar.c | 6 ++++++ |
|||
meson.build | 5 ++++- |
|||
tests/meson.build | 7 ++++++- |
|||
4 files changed, 19 insertions(+), 3 deletions(-) |
|||
|
|||
diff --git a/libsoup/meson.build b/libsoup/meson.build
|
|||
index e585b3fe..ec0aca23 100644
|
|||
--- a/libsoup/meson.build
|
|||
+++ b/libsoup/meson.build
|
|||
@@ -76,7 +76,6 @@ soup_sources = [
|
|||
'soup-socket.c', |
|||
'soup-socket-properties.c', |
|||
'soup-status.c', |
|||
- 'soup-tld.c',
|
|||
'soup-uri.c', |
|||
'soup-value-utils.c', |
|||
'soup-version.c', |
|||
@@ -208,6 +207,9 @@ if brotlidec_dep.found()
|
|||
soup_headers += 'soup-brotli-decompressor.h' |
|||
endif |
|||
|
|||
+if libpsl_dep.found()
|
|||
+ soup_sources += 'soup-tld.c'
|
|||
+endif
|
|||
|
|||
includedir = join_paths(libsoup_api_name, meson.project_name()) |
|||
install_headers(soup_installed_headers, subdir : includedir) |
|||
diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
|
|||
index c8231f0e..5e35e135 100644
|
|||
--- a/libsoup/soup-cookie-jar.c
|
|||
+++ b/libsoup/soup-cookie-jar.c
|
|||
@@ -595,18 +595,24 @@ soup_cookie_jar_add_cookie_full (SoupCookieJar *jar, SoupCookie *cookie, SoupURI
|
|||
g_return_if_fail (SOUP_IS_COOKIE_JAR (jar)); |
|||
g_return_if_fail (cookie != NULL); |
|||
|
|||
+#ifdef HAVE_TLD
|
|||
/* Never accept cookies for public domains. */ |
|||
if (!g_hostname_is_ip_address (cookie->domain) && |
|||
soup_tld_domain_is_public_suffix (cookie->domain)) { |
|||
soup_cookie_free (cookie); |
|||
return; |
|||
} |
|||
+#endif
|
|||
|
|||
priv = soup_cookie_jar_get_instance_private (jar); |
|||
|
|||
if (first_party != NULL) { |
|||
+#ifdef HAVE_TLD
|
|||
if (priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_NEVER || |
|||
incoming_cookie_is_third_party (jar, cookie, first_party, priv->accept_policy)) { |
|||
+#else // no TLD, assume every cookie is third-party
|
|||
+ if (priv->accept_policy != SOUP_COOKIE_JAR_ACCEPT_ALWAYS) {
|
|||
+#endif
|
|||
soup_cookie_free (cookie); |
|||
return; |
|||
} |
|||
diff --git a/meson.build b/meson.build
|
|||
index 3cc56fb9..5865dfc7 100644
|
|||
--- a/meson.build
|
|||
+++ b/meson.build
|
|||
@@ -148,7 +148,10 @@ endif
|
|||
|
|||
libpsl_required_version = '>= 0.20' |
|||
libpsl_dep = dependency('libpsl', version : libpsl_required_version, |
|||
- fallback : ['libpsl', 'libpsl_dep'])
|
|||
+ fallback : ['libpsl', 'libpsl_dep'], required : false)
|
|||
+if libpsl_dep.found()
|
|||
+ cdata.set('HAVE_TLD', '1')
|
|||
+endif
|
|||
|
|||
if cc.has_function('gmtime_r', prefix : '#include <time.h>', args : default_source_flag) |
|||
cdata.set('HAVE_GMTIME_R', '1') |
|||
diff --git a/tests/meson.build b/tests/meson.build
|
|||
index 5482aa86..d5b32a12 100644
|
|||
--- a/tests/meson.build
|
|||
+++ b/tests/meson.build
|
|||
@@ -62,7 +62,6 @@ tests = [
|
|||
['ssl', true, []], |
|||
['streaming', true, []], |
|||
['timeout', true, []], |
|||
- ['tld', true, []],
|
|||
['uri-parsing', true, []], |
|||
['websocket', true, [libz_dep]] |
|||
] |
|||
@@ -82,6 +81,12 @@ if brotlidec_dep.found()
|
|||
endif |
|||
endif |
|||
|
|||
+if libpsl_dep.found()
|
|||
+ tests += [
|
|||
+ ['tld', true, []],
|
|||
+ ]
|
|||
+endif
|
|||
+
|
|||
if have_apache |
|||
tests += [ |
|||
['auth', false, []], |
|||
--
|
|||
2.32.0 (Apple Git-132) |
|||
|
@ -1,41 +0,0 @@ |
|||
diff -ruN a/Makefile.in b/Makefile.in
|
|||
--- a/Makefile.in 2017-02-16 08:57:28.000000000 -0800
|
|||
+++ b/Makefile.in 2020-04-06 14:21:57.000000000 -0700
|
|||
@@ -528,7 +528,7 @@
|
|||
makeflags_0 = --no-print-directory -s |
|||
makeflags_1 = |
|||
AM_MAKEFLAGS = $(makeflags_$(V)) |
|||
-SUBDIRS = . po spice libphodav doc
|
|||
+SUBDIRS = . spice libphodav
|
|||
lib_LTLIBRARIES = libphodav-2.0.la |
|||
AM_CPPFLAGS = \ |
|||
-DLOCALEDIR=\""$(localedir)"\" \ |
|||
@@ -568,7 +568,6 @@
|
|||
|
|||
libphodav_2_0_la_LDFLAGS = \ |
|||
-version-info 0:0:0 \ |
|||
- -Wl,--version-script=${srcdir}/libphodav.syms \
|
|||
-no-undefined \ |
|||
$(NULL) |
|||
|
|||
diff -ruN a/configure b/configure
|
|||
--- a/configure 2017-02-16 08:57:27.000000000 -0800
|
|||
+++ b/configure 2020-04-06 14:22:02.000000000 -0700
|
|||
@@ -13446,7 +13446,7 @@
|
|||
$as_echo "$USE_NLS" >&6; } |
|||
|
|||
|
|||
-
|
|||
+if false; then # disable intltool check
|
|||
|
|||
case "$am__api_version" in |
|||
1.01234) |
|||
@@ -13970,7 +13970,7 @@
|
|||
# Substitute ALL_LINGUAS so we can use it in po/Makefile |
|||
|
|||
|
|||
-
|
|||
+fi
|
|||
|
|||
|
|||
|
@ -0,0 +1,135 @@ |
|||
From c0d495a77c7934e982d280a33deaaa9f6595785e Mon Sep 17 00:00:00 2001 |
|||
From: osy <50960678+osy@users.noreply.github.com> |
|||
Date: Sat, 5 Mar 2022 17:40:07 -0800 |
|||
Subject: [PATCH 1/4] method: fix compile on Darwin |
|||
|
|||
On Darwin systems, removexattr() is defined with 3 arguments. |
|||
---
|
|||
libphodav/phodav-method-proppatch.c | 4 ++++ |
|||
tests/meson.build | 2 +- |
|||
2 files changed, 5 insertions(+), 1 deletion(-) |
|||
|
|||
diff --git a/libphodav/phodav-method-proppatch.c b/libphodav/phodav-method-proppatch.c
|
|||
index 4cd8211..3421e32 100644
|
|||
--- a/libphodav/phodav-method-proppatch.c
|
|||
+++ b/libphodav/phodav-method-proppatch.c
|
|||
@@ -59,7 +59,11 @@ set_attr (GFile *file, xmlNodePtr attrnode,
|
|||
return SOUP_STATUS_FORBIDDEN; |
|||
gchar *path = g_file_get_path (file); |
|||
#ifdef HAVE_SYS_XATTR_H |
|||
+#ifdef __APPLE__
|
|||
+ removexattr (path, attrname, 0);
|
|||
+#else
|
|||
removexattr (path, attrname); |
|||
+#endif
|
|||
#else |
|||
g_debug ("cannot remove xattr from %s, not supported", path); /* FIXME? */ |
|||
#endif |
|||
diff --git a/tests/meson.build b/tests/meson.build
|
|||
index aeb48e3..43e9a13 100644
|
|||
--- a/tests/meson.build
|
|||
+++ b/tests/meson.build
|
|||
@@ -1,6 +1,6 @@
|
|||
tests_sources = [] |
|||
|
|||
-if host_machine.system() != 'windows'
|
|||
+if host_machine.system() not in ['darwin', 'ios', 'windows']
|
|||
tests_sources += 'virtual-dir.c' |
|||
endif |
|||
|
|||
--
|
|||
2.32.0 (Apple Git-132) |
|||
|
|||
From 8060e63fb82baba60dee6f3360780c6e83d16472 Mon Sep 17 00:00:00 2001 |
|||
From: osy <50960678+osy@users.noreply.github.com> |
|||
Date: Sat, 5 Mar 2022 17:41:18 -0800 |
|||
Subject: [PATCH 2/4] meson: fix build on unsupported --no-undefined |
|||
|
|||
Clang on Darwin systems do not support this flag. |
|||
---
|
|||
libphodav/meson.build | 7 +++++-- |
|||
1 file changed, 5 insertions(+), 2 deletions(-) |
|||
|
|||
diff --git a/libphodav/meson.build b/libphodav/meson.build
|
|||
index 5443ce0..4ab6821 100644
|
|||
--- a/libphodav/meson.build
|
|||
+++ b/libphodav/meson.build
|
|||
@@ -30,7 +30,10 @@ if not dependency('glib-2.0', version : '>= 2.51.2', required: false).found()
|
|||
endif |
|||
|
|||
mapfile = 'libphodav.syms' |
|||
-vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
|||
+vflag = compiler.get_supported_link_arguments(
|
|||
+ '-Wl,--no-undefined',
|
|||
+ '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
|||
+)
|
|||
|
|||
libphodav = library( |
|||
'phodav-2.0', |
|||
@@ -38,7 +41,7 @@ libphodav = library(
|
|||
c_args : [ '-DG_LOG_DOMAIN="phodav"' ], |
|||
include_directories : incdir, |
|||
version: '0.0.0', |
|||
- link_args : [ '-Wl,--no-undefined', vflag ],
|
|||
+ link_args : vflag,
|
|||
link_depends : mapfile, |
|||
dependencies : deps, |
|||
install : true, |
|||
--
|
|||
2.32.0 (Apple Git-132) |
|||
|
|||
From 450361cefca48f6b8ca191a7024cad29beaa0825 Mon Sep 17 00:00:00 2001 |
|||
From: osy <50960678+osy@users.noreply.github.com> |
|||
Date: Sat, 5 Mar 2022 17:49:26 -0800 |
|||
Subject: [PATCH 3/4] spice-webdavd: support macOS port |
|||
|
|||
---
|
|||
bin/spice-webdavd.c | 4 ++++ |
|||
1 file changed, 4 insertions(+) |
|||
|
|||
diff --git a/bin/spice-webdavd.c b/bin/spice-webdavd.c
|
|||
index ee713bd..b9453ff 100644
|
|||
--- a/bin/spice-webdavd.c
|
|||
+++ b/bin/spice-webdavd.c
|
|||
@@ -655,7 +655,11 @@ run_service (ServiceData *service_data)
|
|||
|
|||
loop = g_main_loop_new (NULL, TRUE); |
|||
#ifdef G_OS_UNIX |
|||
+#ifdef __APPLE__
|
|||
+ open_mux_path ("/dev/tty.org.spice-space.webdav.0");
|
|||
+#else
|
|||
open_mux_path ("/dev/virtio-ports/org.spice-space.webdav.0"); |
|||
+#endif
|
|||
#else |
|||
open_mux_path ("\\\\.\\Global\\org.spice-space.webdav.0"); |
|||
#endif |
|||
--
|
|||
2.32.0 (Apple Git-132) |
|||
|
|||
From f5c7f192644d8f30817ab23a98425e3179a0021d Mon Sep 17 00:00:00 2001 |
|||
From: osy <50960678+osy@users.noreply.github.com> |
|||
Date: Sat, 5 Mar 2022 23:40:27 -0800 |
|||
Subject: [PATCH 4/4] meson: link statically with libsoup and libxml |
|||
|
|||
---
|
|||
meson.build | 4 ++-- |
|||
1 file changed, 2 insertions(+), 2 deletions(-) |
|||
|
|||
diff --git a/meson.build b/meson.build
|
|||
index b8ff125..7ab6da1 100644
|
|||
--- a/meson.build
|
|||
+++ b/meson.build
|
|||
@@ -34,8 +34,8 @@ else
|
|||
deps += dependency('gio-unix-2.0', version : '>= 2.44') |
|||
endif |
|||
|
|||
-deps += dependency('libsoup-2.4', version : '>= 2.48.0')
|
|||
-deps += dependency('libxml-2.0')
|
|||
+deps += dependency('libsoup-2.4', version : '>= 2.48.0', static : true)
|
|||
+deps += dependency('libxml-2.0', static : true)
|
|||
|
|||
d1 = dependency('avahi-gobject', required : get_option('avahi')) |
|||
d2 = dependency('avahi-client', required : get_option('avahi')) |
|||
--
|
|||
2.32.0 (Apple Git-132) |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue