From: Seonah Moon Date: Tue, 11 Jan 2022 07:40:31 +0000 (+0900) Subject: Upgrade to 2.72.alpha X-Git-Tag: accepted/tizen/unified/20220114.130130~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fglib-networking.git;a=commitdiff_plain;h=7bcb7212c90e2934ca29451496269e382c793d42 Upgrade to 2.72.alpha Change-Id: I3cdbf980e3dc877101717f59bfee0614b8fcc896 --- 7bcb7212c90e2934ca29451496269e382c793d42 diff --cc meson.build index c5cab77,4e921da..3612415 --- a/meson.build +++ b/meson.build @@@ -36,19 -26,18 +36,24 @@@ endi common_flags = [ '-DHAVE_CONFIG_H', '-DG_LOG_DOMAIN="GLib-Net"', + '-DG_LOG_USE_STRUCTURED', '-DLOCALE_DIR="@0@"'.format(localedir), '-DG_DISABLE_DEPRECATED', - '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46' + '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_70' ] +# TIZEN dlog +if get_option('tizen_debug') + debug_dep = dependency('dlog') + config_h.set('TIZEN_DEBUG', get_option('tizen_debug')) +endif + add_project_arguments(common_flags, language: 'c') + cflags = cc.get_supported_arguments(['-Werror=declaration-after-statement', + '-Werror=implicit-function-declaration']) + add_project_arguments(cflags, language: 'c') + symbol_map = join_paths(meson.current_source_dir(), meson.project_name() + '.map') module_ldflags = [] @@@ -99,10 -92,10 +108,11 @@@ if openssl_option.disabled( openssl_dep = [] else # XXX: https://github.com/mesonbuild/meson/issues/2945 - openssl_dep = dependency('openssl1.1', required: openssl_option.enabled() and cc.get_id() != 'msvc') - openssl_dep = dependency('openssl', version: '>= 1.0.2', required: false) ++ ++ openssl_dep = dependency('openssl1.1', version: '>= 1.0.2', required: false) if openssl_dep.found() backends += ['openssl'] - elif cc.get_id() == 'msvc' and not openssl_option.disabled() + else # MSVC builds of OpenSSL does not generate pkg-config files, # so we check for it manually here in this case, if we can't find those files # Based on the CMake check for OpenSSL in CURL's CMakeLists.txt, @@@ -197,7 -199,7 +216,7 @@@ if backends.contains('openssl' subdir('tls/openssl') endif --subdir('tls/tests') ++#subdir('tls/tests') # Will automatically pick it up from the cross file if defined gio_querymodules = find_program('gio-querymodules', required : false) diff --cc packaging/glib-networking.spec index 8ed408c,0000000..06f5ffe mode 100755,000000..100755 --- a/packaging/glib-networking.spec +++ b/packaging/glib-networking.spec @@@ -1,63 -1,0 +1,63 @@@ +%bcond_with libproxy +Name: glib-networking - Version: 2.60.1 ++Version: 2.72.alpha +Release: 0 +License: LGPL-2.1+ +Summary: Network-related GIO modules for glib +Group: System/Libraries - Source: http://download.gnome.org/sources/glib-networking/2.60/%{name}-%{version}.tar.xz ++Source: http://download.gnome.org/sources/glib-networking/2.72/%{name}-%{version}.tar.xz +Source99: baselibs.conf +Source1001: glib-networking.manifest +Url: http://www.gnome.org +BuildRequires: intltool +BuildRequires: which +BuildRequires: libgcrypt-devel +BuildRequires: meson +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(gio-2.0) >= 2.46.0 +BuildRequires: pkgconfig(openssl1.1) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(libtzplatform-config) +BuildRequires: ca-certificates-devel +Requires: ca-certificates +%if %{with libproxy} +BuildRequires: pkgconfig(libproxy-1.0) +%endif + +%description +This package contains network-related GIO modules for glib. + +Currently, there is only a proxy module based on libproxy. + +%lang_package + +%prep +%setup -q +cp %{SOURCE1001} . + +%build +meson --prefix /usr/ --libdir %{_libdir} build \ + -Dstatic_modules=false \ + -Dgnutls=disabled \ + -Dopenssl=enabled \ + -Ddefault_ca_file=%{TZ_SYS_RO_CA_BUNDLE} \ + -Dtizen_ext=true \ + -Dtizen_debug=true +ninja -C build all + +%install +export DESTDIR=%{buildroot} +ninja -C build install + +%find_lang %{name} + +%files +%manifest %{name}.manifest +%defattr(-, root, root) +%license COPYING +%{_libdir}/gio/modules/libgioopenssl.so +%if %{with libproxy} +%{_libdir}/gio/modules/libgiolibproxy.so +%{_libexecdir}/glib-pacrunner +%{_datadir}/dbus-1/services/org.gtk.GLib.PACRunner.service +%endif diff --cc tls/gnutls/gtlscertificate-gnutls.c index cc30936,11f5c5c..11f5c5c mode 100755,100644..100755 --- a/tls/gnutls/gtlscertificate-gnutls.c +++ b/tls/gnutls/gtlscertificate-gnutls.c diff --cc tls/gnutls/gtlsconnection-gnutls.c index 1163fb5,387f14d..387f14d mode 100755,100644..100755 --- a/tls/gnutls/gtlsconnection-gnutls.c +++ b/tls/gnutls/gtlsconnection-gnutls.c diff --cc tls/gnutls/gtlsdatabase-gnutls.c index 7704d56,eef1b16..eef1b16 mode 100755,100644..100755 --- a/tls/gnutls/gtlsdatabase-gnutls.c +++ b/tls/gnutls/gtlsdatabase-gnutls.c diff --cc tls/gnutls/gtlsfiledatabase-gnutls.c index 19996d8,d9a22f5..d9a22f5 mode 100755,100644..100755 --- a/tls/gnutls/gtlsfiledatabase-gnutls.c +++ b/tls/gnutls/gtlsfiledatabase-gnutls.c diff --cc tls/openssl/meson.build index 6255f97,eb242f6..120664f --- a/tls/openssl/meson.build +++ b/tls/openssl/meson.build @@@ -18,12 -19,18 +19,24 @@@ deps = glib_dep, gmodule_dep, gobject_dep, - tlsbase_dep, openssl_dep, + tlsbase_dep, ] +if get_option('tizen_debug') - deps += [debug_dep] ++ deps += [ ++ debug_dep, ++ ] ++endif ++ + if ['darwin', 'ios'].contains(host_system) + deps += [ + security_dep, + ] + elif ['windows'].contains(host_system) + deps += [ + crypt32_dep, + ] endif module = shared_module( diff --cc tls/openssl/openssl-include.h index 38729f8,6dc6516..8a04922 --- a/tls/openssl/openssl-include.h +++ b/tls/openssl/openssl-include.h @@@ -23,36 -24,15 +24,33 @@@ * Christoph Reiter */ + #pragma once + /* Due to name clashes between Windows and openssl headers we have to * make sure windows.h is included before openssl and that we undef the - * clashing macros. + * clashing macros. We also need `struct timeval` for DTLSv1_get_timeout(), + * and the following header also covers it for Windows. */ + - #ifndef __G_TLS_OPENSSL_INCLUDE_H__ - #define __G_TLS_OPENSSL_INCLUDE_H__ - - #include "glib.h" - +#ifdef TIZEN_DEBUG +#include + +#ifdef LOG_TAG +#undef LOG_TAG +#endif + +#define LOG_TAG "glib-networking" +#define TIZEN_LOGD(foramt, args...) LOGD(format, ##args) +#define TIZEN_LOGI(format, args...) LOGI(format, ##args) +#define TIZEN_LOGE(format, args...) LOGE(format, ##args) +#else +#define TIZEN_LOGD(foramt, args...) +#define TIZEN_LOGI(format, args...) +#define TIZEN_LOGE(format, args...) +#endif + + #include #ifdef G_OS_WIN32 - #define WIN32_LEAN_AND_MEAN - #include /* These are defined by the Windows headers, but clash with openssl */ #undef X509_NAME #undef X509_CERT_PAIR