Hello community, here is the log from the commit of package libproxy for openSUSE:Factory checked in at 2016-01-21 23:41:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libproxy (Old) and /work/SRC/openSUSE:Factory/.libproxy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libproxy" Changes: -------- --- /work/SRC/openSUSE:Factory/libproxy/libproxy-plugins.changes 2015-07-16 17:16:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libproxy.new/libproxy-plugins.changes 2016-01-21 23:41:14.000000000 +0100 @@ -1,0 +2,26 @@ +Tue Jan 12 16:46:37 UTC 2016 - dims...@opensuse.org + +- Update to version 0.4.12: + + Move development to github.com/libproxy/libproxy. + + Fix fd leak in get_pac (Bug #185). + + Detect running MATE session (Bug #186, Part1). + + Fix linking of perl bindings to pthread (Bug #182). + + Correctly detect spidermonky (mozjs185) (Bug #188). + + Stop pxgsettings from segfaulting on exit (Bug #192). + + Fix test #10 (Bug #189). + + Fix build on Mac OS X (Bug #183). + + Add a generic KDE Config module (fix crashes of Qt5 based + apps) (issue#4). +- Drop upstream fixed patches: + + libproxy-pxgsettings-crash.patch + + libproxy-no-libperl.patch + + libproxy-pxgsettings-signals.patch +- Rename libproxy1-config-kde4 subpackage to libproxy-config-kde, + following upstreams introduction of the generic config loader. +- Require libKF5ConfigCore5 from libproxy1-config-kde (we don't + really need the library, but kreadconfig5 in this package). +- Replace libkde4-devel and libqt4-devel BuildRequires with + libKF5ConfigCore5: the new KDE config parser interacts directly + with kreadconfig5 and does not link to Qt. + +------------------------------------------------------------------- libproxy.changes: same change Old: ---- libproxy-0.4.11.tar.gz libproxy-no-libperl.patch libproxy-pxgsettings-crash.patch libproxy-pxgsettings-signals.patch New: ---- 0.4.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libproxy-plugins.spec ++++++ --- /var/tmp/diff_new_pack.t96Dq4/_old 2016-01-21 23:41:16.000000000 +0100 +++ /var/tmp/diff_new_pack.t96Dq4/_new 2016-01-21 23:41:16.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libproxy-plugins # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,7 +31,7 @@ Summary: Libproxy provides consistent proxy configuration to applications License: GPL-2.0+ and LGPL-2.1+ Group: System/Libraries -Version: 0.4.11 +Version: 0.4.12 Release: 0 # FIXME: verify if test suite works - 0.4.10 has weird behavior in some cases, where the internal server times out. %if 0%{?build_snapshot} @@ -39,16 +39,10 @@ %else %define _sourcename %{_name}-%{version} %endif -Source: http://libproxy.googlecode.com/files/%{_name}-%{version}.tar.gz +Source: https://github.com/libproxy/%{_name}/archive/%{version}.tar.gz # Script used for automatic snapshot updates Source98: update-from-svn.sh Source99: baselibs.conf -# PATCH-FIX-UPSTREAM libproxy-pxgsettings-crash.patch bnc#836576 dims...@opensuse.org -- Fix crash when pxgsettings is closing, taken from svn. -Patch0: libproxy-pxgsettings-crash.patch -# PATCH-FIX-UPSTREAM libproxy-no-libperl.patch m...@suse.de -- Do not link against libperl. Submitted upstream. -Patch1: libproxy-no-libperl.patch -# PATCH-FIX-UPSTREAM libproxy-pxgsettings-signals.patch dims...@opensuse.org -- Due to changes in glib, signals are not emited on settings that are not read AFTER connecting the signal -Patch2: libproxy-pxgsettings-signals.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: gcc-c++ @@ -74,8 +68,7 @@ BuildRequires: pkgconfig(webkitgtk-3.0) %endif BuildRequires: NetworkManager-devel -BuildRequires: libkde4-devel -BuildRequires: libqt4-devel +BuildRequires: libKF5ConfigCore5 %if %{build_mozjs} BuildRequires: pkgconfig(mozjs185) %endif @@ -188,10 +181,12 @@ A module to extend libproxy with capabilities to query GNOME about proxy settings. -%package -n libproxy1-config-kde4 +%package -n libproxy1-config-kde Summary: Libproxy module for KDE configuration Group: System/Libraries Requires: libproxy1 = %{version} +# We don't really need the library, but this package brings kreadconfig5 +Requires: libKF5ConfigCore5 %if 0%{?suse_version} Recommends: libproxy1-pacrunner = %{version} Supplements: packageand(libproxy1:libkde4) @@ -200,8 +195,10 @@ %endif Provides: libproxy-kde = %{version} Obsoletes: libproxy-kde < %{version} +# A generic KDE config loader was introduced in 0.4.12 +Obsoletes: libproxy1-config-kde4 < 0.4.12 -%description -n libproxy1-config-kde4 +%description -n libproxy1-config-kde A module to extend libproxy with capabilities to query KDE4 about proxy settings. @@ -314,9 +311,6 @@ %prep %setup -q -n %{_sourcename} -%patch0 -%patch1 -%patch2 -p1 mkdir build %build @@ -441,9 +435,9 @@ %if ! 0%{?windows} -%files -n libproxy1-config-kde4 +%files -n libproxy1-config-kde %defattr(-, root, root) -%{_libdir}/libproxy-%{version}/modules/config_kde4.so +%{_libdir}/libproxy-%{version}/modules/config_kde.so %if 0%{?favor_gtk2} ++++++ libproxy.spec ++++++ --- /var/tmp/diff_new_pack.t96Dq4/_old 2016-01-21 23:41:16.000000000 +0100 +++ /var/tmp/diff_new_pack.t96Dq4/_new 2016-01-21 23:41:16.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libproxy # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,7 +31,7 @@ Summary: Libproxy provides consistent proxy configuration to applications License: GPL-2.0+ and LGPL-2.1+ Group: System/Libraries -Version: 0.4.11 +Version: 0.4.12 Release: 0 # FIXME: verify if test suite works - 0.4.10 has weird behavior in some cases, where the internal server times out. %if 0%{?build_snapshot} @@ -39,16 +39,10 @@ %else %define _sourcename %{_name}-%{version} %endif -Source: http://libproxy.googlecode.com/files/%{_name}-%{version}.tar.gz +Source: https://github.com/libproxy/%{_name}/archive/%{version}.tar.gz # Script used for automatic snapshot updates Source98: update-from-svn.sh Source99: baselibs.conf -# PATCH-FIX-UPSTREAM libproxy-pxgsettings-crash.patch bnc#836576 dims...@opensuse.org -- Fix crash when pxgsettings is closing, taken from svn. -Patch0: libproxy-pxgsettings-crash.patch -# PATCH-FIX-UPSTREAM libproxy-no-libperl.patch m...@suse.de -- Do not link against libperl. Submitted upstream. -Patch1: libproxy-no-libperl.patch -# PATCH-FIX-UPSTREAM libproxy-pxgsettings-signals.patch dims...@opensuse.org -- Due to changes in glib, signals are not emited on settings that are not read AFTER connecting the signal -Patch2: libproxy-pxgsettings-signals.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: gcc-c++ @@ -74,8 +68,7 @@ BuildRequires: pkgconfig(webkitgtk-3.0) %endif BuildRequires: NetworkManager-devel -BuildRequires: libkde4-devel -BuildRequires: libqt4-devel +BuildRequires: libKF5ConfigCore5 %if %{build_mozjs} BuildRequires: pkgconfig(mozjs185) %endif @@ -188,10 +181,12 @@ A module to extend libproxy with capabilities to query GNOME about proxy settings. -%package -n libproxy1-config-kde4 +%package -n libproxy1-config-kde Summary: Libproxy module for KDE configuration Group: System/Libraries Requires: libproxy1 = %{version} +# We don't really need the library, but this package brings kreadconfig5 +Requires: libKF5ConfigCore5 %if 0%{?suse_version} Recommends: libproxy1-pacrunner = %{version} Supplements: packageand(libproxy1:libkde4) @@ -200,8 +195,10 @@ %endif Provides: libproxy-kde = %{version} Obsoletes: libproxy-kde < %{version} +# A generic KDE config loader was introduced in 0.4.12 +Obsoletes: libproxy1-config-kde4 < 0.4.12 -%description -n libproxy1-config-kde4 +%description -n libproxy1-config-kde A module to extend libproxy with capabilities to query KDE4 about proxy settings. @@ -314,9 +311,6 @@ %prep %setup -q -n %{_sourcename} -%patch0 -%patch1 -%patch2 -p1 mkdir build %build @@ -441,9 +435,9 @@ %if ! 0%{?windows} -%files -n libproxy1-config-kde4 +%files -n libproxy1-config-kde %defattr(-, root, root) -%{_libdir}/libproxy-%{version}/modules/config_kde4.so +%{_libdir}/libproxy-%{version}/modules/config_kde.so %if 0%{?favor_gtk2} ++++++ libproxy-0.4.11.tar.gz -> 0.4.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/NEWS new/libproxy-0.4.12/NEWS --- old/libproxy-0.4.11/NEWS 2012-11-30 23:31:17.000000000 +0100 +++ new/libproxy-0.4.12/NEWS 2016-01-12 17:41:07.000000000 +0100 @@ -1,3 +1,16 @@ +New in version 0.4.12 +============================== +* Move development to github.com/libproxy/libproxy +* Fix fd leak in get_pac (Bug #185) +* Detect running MATE session (Bug #186, Part1). +* Fix linking of perl bindings to pthread (Bug #182) +* Correctly detect spidermonky (mozjs185) (Bug #188) +* Stop pxgsettings from segfaulting on exit (Bug #192) +* Fix test #10 (Bug #189) +* Fix build on Mac OS X (Bug #183) +* Add a generic KDE Config module (fix crashes of Qt5 based + apps) (issue#4) + New in version 0.4.11 ============================== * Build fixes with cmake 2.8.10+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/bindings/perl/src/CMakeLists.txt new/libproxy-0.4.12/bindings/perl/src/CMakeLists.txt --- old/libproxy-0.4.11/bindings/perl/src/CMakeLists.txt 2010-11-24 21:50:12.000000000 +0100 +++ new/libproxy-0.4.12/bindings/perl/src/CMakeLists.txt 2016-01-12 17:41:07.000000000 +0100 @@ -12,7 +12,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/perl/blib/arch/auto/Net) add_library(PLlibproxy SHARED ${Libproxy_LIB_SRCS}) -target_link_libraries(PLlibproxy ${PERL_LIBRARY} libproxy) +target_link_libraries(PLlibproxy libproxy pthread) set_target_properties(PLlibproxy PROPERTIES OUTPUT_NAME "Libproxy") set_target_properties(PLlibproxy PROPERTIES PREFIX "") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/cmake/cpack.cmk new/libproxy-0.4.12/cmake/cpack.cmk --- old/libproxy-0.4.11/cmake/cpack.cmk 2010-08-22 16:02:23.000000000 +0200 +++ new/libproxy-0.4.12/cmake/cpack.cmk 2016-01-12 17:41:07.000000000 +0100 @@ -1,6 +1,6 @@ set(CPACK_IGNORE_FILES "CMakeCache.txt;install_manifest.txt;/Testing/;/Makefile$;\\\\.tar.gz$;\\\\.so[.0-9]*$;/build/;/_CPack_Packages/;/CMakeFiles/;/CVS/;/\\\\.svn/;/\\\\.git/;\\\\.swp$;\\\\.#;/#") set(CPACK_SOURCE_IGNORE_FILES ${CPACK_IGNORE_FILES}) -set(CPACK_SOURCE_GENERATOR TGZ ZIP) +set(CPACK_SOURCE_GENERATOR TXZ ZIP) set(CPACK_SOURCE_TOPLEVEL_TAG "") function(set_project_version MAJOR MINOR PATCH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/CMakeLists.txt new/libproxy-0.4.12/libproxy/CMakeLists.txt --- old/libproxy-0.4.11/libproxy/CMakeLists.txt 2012-11-30 23:31:35.000000000 +0100 +++ new/libproxy-0.4.12/libproxy/CMakeLists.txt 2016-01-12 17:41:07.000000000 +0100 @@ -1,6 +1,6 @@ ### Project info project(libproxy) -set_project_version(0 4 11) +set_project_version(0 4 12) ### Add a global compilation stuff if (WIN32) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/Libproxy-1.0.gir new/libproxy-0.4.12/libproxy/Libproxy-1.0.gir --- old/libproxy-0.4.11/libproxy/Libproxy-1.0.gir 2011-08-11 18:12:37.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/Libproxy-1.0.gir 1970-01-01 01:00:00.000000000 +0100 @@ -1,84 +0,0 @@ -<?xml version="1.0"?> -<!-- This file was automatically generated from C sources - DO NOT EDIT! -To affect the contents of this file, edit the original C definitions, -and/or use gtk-doc annotations. --> -<repository version="1.2" - xmlns="http://www.gtk.org/introspection/core/1.0" - xmlns:c="http://www.gtk.org/introspection/c/1.0" - xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - <namespace name="Libproxy" - version="1.0" - shared-library="libproxy.so.1" - c:identifier-prefixes="px" - c:symbol-prefixes="px"> - <record name="ProxyFactory" c:type="pxProxyFactory" disguised="1"> - <method name="free" c:identifier="px_proxy_factory_free"> - <return-value transfer-ownership="none"> - <type name="none" c:type="void"/> - </return-value> - </method> - <method name="get_proxies" c:identifier="px_proxy_factory_get_proxies"> - <doc xml:whitespace="preserve">Get which proxies to use for the specified URL. -A NULL-terminated array of proxy strings is returned. -If the first proxy fails, the second should be tried, etc... -Don't forget to free the strings/array when you are done. -If an unrecoverable error occurs, this function returns NULL. -in a separate thread (is thread-safe). In most cases, the time -required to complete this function call is simply the time required -to read the configuration (i.e. from gconf, kconfig, etc). -In the case of PAC, if no valid PAC is found in the cache (i.e. -configuration has changed, cache is invalid, etc), the PAC file is -downloaded and inserted into the cache. This is the most expensive -operation as the PAC is retrieved over the network. Once a PAC exists -in the cache, it is merely a javascript invocation to evaluate the PAC. -One should note that DNS can be called from within a PAC during -javascript invocation. -In the case of WPAD, WPAD is used to automatically locate a PAC on the -network. Currently, we only use DNS for this, but other methods may -be implemented in the future. Once the PAC is located, normal PAC -performance (described above) applies. -The format of the returned proxy strings are as follows: -- http://[username:password@]proxy:port -- socks://[username:password@]proxy:port -- socks5://[username:password@]proxy:port -- socks4://[username:password@]proxy:port -- <procotol>://[username:password@]proxy:port -- direct:// -Please note that the username and password in the above URLs are optional -and should be use to authenticate the connection if present. -For SOCKS proxies, when the protocol version is specified (socks4:// or -sock5://), it is expected that only this version is used. When only -socks:// is set, the client MUST try SOCKS version 5 protocol and, on -connection failure, fallback to SOCKS version 4. -Other proxying protocols may exist. It is expected that the returned -configuration scheme shall match the network service name of the -proxy protocol or the service name of the protocol being proxied if the -previous does not exist. As an example, on Mac OS X you can configure a -RTSP streaming proxy. The expected returned configuration would be: -- rtsp://[username:password@]proxy:port</doc> - <return-value transfer-ownership="full"> - <doc xml:whitespace="preserve">A NULL-terminated array of proxy strings to use</doc> - <array c:type="char**"> - <type name="utf8"/> - </array> - </return-value> - <parameters> - <parameter name="url" transfer-ownership="none"> - <doc xml:whitespace="preserve">The URL we are trying to reach</doc> - <type name="utf8" c:type="char*"/> - </parameter> - </parameters> - </method> - </record> - <function name="proxy_factory_new" c:identifier="px_proxy_factory_new"> - <doc xml:whitespace="preserve">Creates a new pxProxyFactory instance. This instance should be kept -around as long as possible as it contains cached data to increase -performance. Memory usage should be minimal (cache is small) and the -cache lifespan is handled automatically.</doc> - <return-value transfer-ownership="none"> - <doc xml:whitespace="preserve">A new pxProxyFactory instance or NULL on error</doc> - <type name="ProxyFactory" c:type="pxProxyFactory*"/> - </return-value> - </function> - </namespace> -</repository> Files old/libproxy-0.4.11/libproxy/Libproxy-1.0.typelib and new/libproxy-0.4.12/libproxy/Libproxy-1.0.typelib differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/cmake/libproxy.cmk new/libproxy-0.4.12/libproxy/cmake/libproxy.cmk --- old/libproxy-0.4.11/libproxy/cmake/libproxy.cmk 2012-04-01 14:41:55.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/cmake/libproxy.cmk 2016-01-12 17:41:07.000000000 +0100 @@ -19,6 +19,7 @@ PROPERTY COMPILE_DEFINITIONS MODULEDIR="${MODULEDIR}";BUILTIN_MODULES=${BUILTIN_MODULES}) # When changing the SOVERSION here remember to also bump the 'favorite proxy .so' in python bindings. set_target_properties(libproxy PROPERTIES PREFIX "" VERSION 1.0.0 SOVERSION 1) +set_target_properties(libproxy PROPERTIES INTERFACE_LINK_LIBRARIES "") set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "") install(TARGETS libproxy DESTINATION ${LIB_INSTALL_DIR}) install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/cmake/modules/config_kde.cmk new/libproxy-0.4.12/libproxy/cmake/modules/config_kde.cmk --- old/libproxy-0.4.11/libproxy/cmake/modules/config_kde.cmk 1970-01-01 01:00:00.000000000 +0100 +++ new/libproxy-0.4.12/libproxy/cmake/modules/config_kde.cmk 2016-01-12 17:41:07.000000000 +0100 @@ -0,0 +1,6 @@ +find_program(KDE4_CONF kreadconfig) +find_program(KF5_CONF kreadconfig5) + +if (KDE4_CONF OR KF5_CONF) + set(KDE_FOUND 1) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/cmake/modules/config_kde4.cmk new/libproxy-0.4.12/libproxy/cmake/modules/config_kde4.cmk --- old/libproxy-0.4.11/libproxy/cmake/modules/config_kde4.cmk 2010-07-29 14:14:59.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/cmake/modules/config_kde4.cmk 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -if (NOT WIN32 AND NOT APPLE) - option(WITH_KDE4 "Search for KDE4 package" ON) - if (WITH_KDE4) - find_package(KDE4) - find_package(Qt4) - if(KDE4_FOUND AND QT4_FOUND) - include(KDE4Defaults) - set(KDE4_FOUND 1) - set(KDE4_LIBRARIES ${KDE4_KDECORE_LIBS} ${QT_LIBRARIES}) - include_directories(${KDE4_INCLUDES} ${QT_INCLUDES}) - link_directories(${KDE_LIB_DIR}) - string(REGEX REPLACE " *-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - else() - set(KDE4_FOUND 0) - endif() - else() - set(KDE4_FOUND 0) - endif() -endif() \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/cmake/modules/pacrunner_mozjs.cmk new/libproxy-0.4.12/libproxy/cmake/modules/pacrunner_mozjs.cmk --- old/libproxy-0.4.11/libproxy/cmake/modules/pacrunner_mozjs.cmk 2011-06-20 12:31:41.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/cmake/modules/pacrunner_mozjs.cmk 2016-01-12 17:41:07.000000000 +0100 @@ -9,7 +9,7 @@ elseif(NOT APPLE) option(WITH_MOZJS "Search for MOZJS package" ON) if (WITH_MOZJS) - pkg_search_module(MOZJS mozjs185>=1.8.5) + pkg_search_module(MOZJS mozjs185) if(MOZJS_FOUND) include_directories(${MOZJS_INCLUDE_DIRS}) link_directories(${MOZJS_LIBRARY_DIRS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/cmake/modules.cmk new/libproxy-0.4.12/libproxy/cmake/modules.cmk --- old/libproxy-0.4.11/libproxy/cmake/modules.cmk 2012-03-09 18:52:57.000000000 +0100 +++ new/libproxy-0.4.12/libproxy/cmake/modules.cmk 2016-01-12 17:41:07.000000000 +0100 @@ -11,7 +11,7 @@ include(cmake/modules/config_envvar.cmk) include(cmake/modules/config_sysconfig.cmk) include(cmake/modules/config_gnome.cmk) -include(cmake/modules/config_kde4.cmk) +include(cmake/modules/config_kde.cmk) include(cmake/modules/config_macosx.cmk) include(cmake/modules/network_networkmanager.cmk) include(cmake/modules/pacrunner_mozjs.cmk) @@ -32,7 +32,7 @@ px_module(config_sysconfig "${SYSCONFIG_FOUND}" 1) px_module(config_gnome "${GNOME2_FOUND}" 0) px_module(config_gnome3 "${GNOME3_FOUND}" 0) -px_module(config_kde4 "${KDE4_FOUND}" 0 ${KDE4_LIBRARIES}) +px_module(config_kde "${KDE_FOUND}" 0) px_module(config_macosx "${SC_FOUND}" 1 ${SC_LIBRARIES} ${CF_LIBRARIES}) px_module(config_w32reg "${WIN32}" 1) px_module(ignore_domain 1 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/libproxy-config.cmake.in new/libproxy-0.4.12/libproxy/libproxy-config.cmake.in --- old/libproxy-0.4.11/libproxy/libproxy-config.cmake.in 2011-06-11 23:58:39.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/libproxy-config.cmake.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,26 +0,0 @@ -# - Try to find libproxy -# Once done this will define -# -# LIBPROXY_FOUND - system has libproxy -# LIBPROXY_INCLUDE_DIR - the libproxy include directory -# LIBPROXY_LIBRARIES - libproxy library -# -# Copyright (c) 2010, Dominique Leuenberger -# -# Redistribution and use is allowed according the license terms -# of libproxy, which this file is integrated part of. - -# Find proxy.h and the corresponding library (libproxy.so) -FIND_PATH(LIBPROXY_INCLUDE_DIR proxy.h ) -FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy ) - -# Set library version -SET(LIBPROXY_VERSION @PROJECT_VERSION@) -SET(LIBPROXY_VERSION_MAJOR @PROJECT_VERSION_MAJOR@) -SET(LIBPROXY_VERSION_MINOR @PROJECT_VERSION_MINOR@) -SET(LIBPROXY_VERSION_PATCH @PROJECT_VERSION_PATCH@) - -# Give output, should this be wished (this handles also QUIET and REQUIRED -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(libproxy DEFAULT_MSG LIBPROXY_LIBRARIES LIBPROXY_INCLUDE_DIR) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/config_gnome3.cpp new/libproxy-0.4.12/libproxy/modules/config_gnome3.cpp --- old/libproxy-0.4.11/libproxy/modules/config_gnome3.cpp 2012-07-05 18:50:06.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/config_gnome3.cpp 2016-01-12 17:41:07.000000000 +0100 @@ -288,7 +288,9 @@ static bool gnome_config_extension_test() { return (getenv("GNOME_DESKTOP_SESSION_ID") || (getenv("DESKTOP_SESSION") - && string(getenv("DESKTOP_SESSION")) == "gnome")); + && string(getenv("DESKTOP_SESSION")) == "gnome") + || (getenv("DESKTOP_SESSION") + && string(getenv("DESKTOP_SESSION")) == "mate")); } MM_MODULE_INIT(gnome_config_extension, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/config_kde.cpp new/libproxy-0.4.12/libproxy/modules/config_kde.cpp --- old/libproxy-0.4.11/libproxy/modules/config_kde.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/libproxy-0.4.12/libproxy/modules/config_kde.cpp 2016-01-12 17:41:07.000000000 +0100 @@ -0,0 +1,147 @@ +/******************************************************************************* + * libproxy - A library for proxy configuration + * Copyright (C) 2006 Nathaniel McCallum <nathan...@natemccallum.com> + * Copyright (C) 2016 Fabian Vogt <fv...@suse.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ******************************************************************************/ + +#include <algorithm> +#include <cstdlib> +#include <cstdio> + +#include "../extension_config.hpp" +using namespace libproxy; + +class kde_config_extension : public config_extension { +public: + kde_config_extension() + { + try { + // Try the KF5 one first + command = "kreadconfig5"; + kde_config_val("proxyType", "-1"); + return; // Worked + } + catch(...) {} + + try { + // The KDE4 one next + command = "kreadconfig"; + kde_config_val("proxyType", "-1"); + return; // Worked + } + catch(...) {} + + // Neither worked, so throw in get_config + command = ""; + } + + vector<url> get_config(const url &dst) throw (runtime_error) { + // See constructor + if(command.empty()) + throw runtime_error("Unable to read configuration"); + + vector<url> response; + + string tmp, proxyType = kde_config_val("ProxyType", "-1"); + + // Just switch on the first byte, either a digit, '-' ("-1") or '\0' + switch(proxyType.c_str()[0]) + { + case '1': + tmp = kde_config_val(dst.get_scheme() + "Proxy", ""); + if(tmp.empty()) { + tmp = kde_config_val("httpProxy", ""); + if(tmp.empty()) { + tmp = kde_config_val("socksProxy", ""); + if(tmp.empty()) + tmp = "direct://"; + } + } + + // KDE uses "http://127.0.0.1 8080" instead of "http://127.0.0.1:8080" + replace(tmp.begin(), tmp.end(), ' ', ':'); + + response.push_back(url(tmp)); + break; + + case '2': + tmp = "pac+" + kde_config_val("Proxy Config Script", ""); + if (url::is_valid(tmp)) + { + response.push_back(url(tmp)); + break; + } + // else fallthrough + + case '3': + response.push_back(url(string("wpad://"))); + break; + + case '4': + throw runtime_error("User config_envvar"); // We'll bypass this config plugin and let the envvar plugin wor + + case '0': + default: // Not set or unknown/illegal + response.push_back(url("direct://")); + break; + } + + return response; + } + + string get_ignore(const url&) { + // See constructor + if(command.empty()) + return ""; + + string proxyType = kde_config_val("ProxyType", "-1"); + if(proxyType.c_str()[0] != '1') + return ""; // Not manual config + + string prefix = kde_config_val("ReversedException", "false") != "false" ? "-" : ""; + return prefix + kde_config_val("NoProxyFor", ""); // Already in the right format + } + +private: + // Neither key nor def must contain ' + string kde_config_val(const string &key, const string &def) throw (runtime_error) { + string cmdline = + command + " --file kioslaverc --group 'Proxy Settings' --key '" + key + "' --default '" + def + "'"; + + FILE *pipe = popen(cmdline.c_str(), "r"); + if (!pipe) + throw runtime_error("Unable to run command"); + + char buffer[128]; + string result = ""; + while (!feof(pipe)) { + if (fgets(buffer, 128, pipe) != NULL) + result += buffer; // TODO: If this throws bad_alloc, pipe is leaked + } + + pclose(pipe); + + // Trim newlines and whitespace at end + result.erase(result.begin() + (result.find_last_not_of(" \n\t")+1), result.end()); + return result; + } + + // Whether to use kreadconfig or kreadconfig5 + string command; +}; + +MM_MODULE_INIT_EZ(kde_config_extension, getenv("KDE_FULL_SESSION"), NULL, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/config_kde4.cpp new/libproxy-0.4.12/libproxy/modules/config_kde4.cpp --- old/libproxy-0.4.11/libproxy/modules/config_kde4.cpp 2012-07-05 18:50:06.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/config_kde4.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,108 +0,0 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2006 Nathaniel McCallum <nathan...@natemccallum.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ - -#include <KDE/KConfig> -#include <KDE/KConfigGroup> -#include <KDE/KGlobal> - -#include "../extension_config.hpp" -using namespace libproxy; - -static void dummyMessageHandler(QtMsgType, const char *) {} - -class kde_config_extension : public config_extension { -public: - kde_config_extension() { - /* The constructor of KConfig uses qAppName() which asumes a QApplication object to exist. - If not, an error message is written. This error message and all others seems to be disabled for - libraries, but to be sure, we can reemplace temporaly Qt's internal message handler by a - dummy implementation. */ - - // Open the config file - QtMsgHandler oldHandler = qInstallMsgHandler(dummyMessageHandler); - this->cfg = new KConfig("kioslaverc", KConfig::NoGlobals); - this->grp = new KConfigGroup(this->cfg, "Proxy Settings"); - qInstallMsgHandler(oldHandler); - } - - ~kde_config_extension() { - delete this->grp; - delete this->cfg; - } - - vector<url> get_config(const url &dst) throw (runtime_error) { - string tmp; - QString prxy; - vector<url> response; - - switch (this->grp->readEntry("ProxyType", 0)) { - case 1: // Use a manual proxy - prxy = this->grp->readEntry(QString(dst.get_scheme().c_str()) + "Proxy", ""); - if (prxy.isEmpty()) { - prxy = this->grp->readEntry("httpProxy", ""); - if (prxy.isEmpty()) { - prxy = this->grp->readEntry("socksProxy", ""); - if (prxy.isEmpty()) - prxy = "direct://"; - }; - }; - // The result of toLatin1() is undefined for non-Latin1 strings. - // However, KDE saves this entry using IDN and percent-encoding, so no problem... - response.push_back(string(prxy.toLatin1().data())); - break; - case 2: // Use a manual PAC - // The result of toLatin1() is undefined for non-Latin1 strings. - // However, KDE saves this entry using IDN and percent-encoding, so no problem... - tmp = string(this->grp->readEntry("Proxy Config Script", "").toLatin1().data()); - if (url::is_valid("pac+" + tmp)) - response.push_back(url("pac+" + tmp)); - else - response.push_back(string("wpad://")); - break; - case 3: // Use WPAD - response.push_back(string("wpad://")); - break; - case 4: // Use envvar - throw runtime_error("User config_envvar"); // We'll bypass this config plugin and let the envvar plugin work - default: - response.push_back(url("direct://")); - break; - }; - - return response; - } - - string get_ignore(const url& /*dst*/) { - // Apply ignore list only for manual proxy configuration - if (this->grp->readEntry("ProxyType", 0) == 1) { - string prefix = this->grp->readEntry("ReversedException", false) ? "-" : ""; - QStringList list = this->grp->readEntry("NoProxyFor", QStringList()); - for (int i = 0; i < list.size(); ++i) - list[i] = QUrl(list.at(i)).toEncoded(); - return prefix + string(list.join(",").toLatin1().data()); - } - return ""; - } - -private: - KConfig* cfg; - KConfigGroup* grp; -}; - -MM_MODULE_INIT_EZ(kde_config_extension, getenv("KDE_FULL_SESSION"), NULL, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/config_macosx.cpp new/libproxy-0.4.12/libproxy/modules/config_macosx.cpp --- old/libproxy-0.4.11/libproxy/modules/config_macosx.cpp 2012-07-05 18:50:06.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/config_macosx.cpp 2016-01-12 17:41:07.000000000 +0100 @@ -114,7 +114,7 @@ class macosx_config_extension : public config_extension { public: - vector<url> get_config(const url &url) throw (runtime_error) { + vector<url> get_config(const url &the_url) throw (runtime_error) { string tmp; CFDictionaryRef proxies = SCDynamicStoreCopyProxies(NULL); vector<url> response; @@ -136,8 +136,8 @@ } // http:// or socks:// (TODO: gopher:// and rtsp:// ???) - else if ((protocol_url(proxies, toupper(url.get_scheme()), tmp) && url::is_valid(tmp)) || - (protocol_url(proxies, capitalize(url.get_scheme()), tmp) && url::is_valid(tmp)) || + else if ((protocol_url(proxies, toupper(the_url.get_scheme()), tmp) && url::is_valid(tmp)) || + (protocol_url(proxies, capitalize(the_url.get_scheme()), tmp) && url::is_valid(tmp)) || (protocol_url(proxies, toupper("http"), tmp) && url::is_valid(tmp)) || (protocol_url(proxies, toupper("socks"), tmp) && url::is_valid(tmp))) { CFRelease(proxies); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/config_sysfile.cpp new/libproxy-0.4.12/libproxy/modules/config_sysfile.cpp --- old/libproxy-0.4.11/libproxy/modules/config_sysfile.cpp 2011-08-11 17:34:08.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/config_sysfile.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2010 Dominique Leuenberger <domini...@leuenberger.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ - -#include <cstdlib> - -#include "../extension_config.hpp" -// include "helper_configfile.hpp" -using namespace libproxy; - -#define SYSCONFDIR /etc -#define CFGFILE libproxy.conf - -class sysfile_config_extension : public config_extension { -public: - url get_config(url url) throw (runtime_error) { - pxConfigFile pxCFG(abolute_cfgpath); - switch case pxCFG.pxConfigType - case PX_TYPE_AUTO: - return "wpad://"; - break; - case PX_TYPE_PAC: - break; - case_PX_TYPE_MANUAL: - break; - case PX_TYPE_NONE: - return "direct://"; - break; - } - -}; - - -bool function cfg_file_exists { - struct stat stFileInfo; - return ! stat("/etc/libproxy.conf", stFileInfo); -} - -MM_MODULE_INIT_EZ(sysfile_config_extension, cfg_file_exists, NULL, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/helper_configfile.cpp new/libproxy-0.4.12/libproxy/modules/helper_configfile.cpp --- old/libproxy-0.4.11/libproxy/modules/helper_configfile.cpp 2010-09-26 15:53:35.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/helper_configfile.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2010 Dominique Leuenberger <domini...@leuenberger.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ - -Class pxConfigFile { - public: - enum pxConfigType { - PX_TYPE_NONE, - PX_TYPE_MANUAL, - PX_TYPE_PAC, - PX_TYPE_AUTO - } - - void pxConfigFile() { - // Initialize the class, read the config file and get the arrays filled - - } -}; - -pxConfigFile::pxConfigFile { - -} - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/helper_configfile.hpp new/libproxy-0.4.12/libproxy/modules/helper_configfile.hpp --- old/libproxy-0.4.11/libproxy/modules/helper_configfile.hpp 2010-09-26 15:48:00.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/helper_configfile.hpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2010 Dominique Leuenberger <domini...@leuenberger.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ - -Class pxConfigFile { - public: - enum pxConfigType { - PX_TYPE_NONE, - PX_TYPE_MANUAL, - PX_TYPE_PAC, - PX_TYPE_AUTO - } - - virtual void pxConfigFile() { - // Initialize the class, read the config file and get the arrays filled - - } -} - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/ignore_ip.cpp.orig new/libproxy-0.4.12/libproxy/modules/ignore_ip.cpp.orig --- old/libproxy-0.4.11/libproxy/modules/ignore_ip.cpp.orig 2012-07-05 20:24:05.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/ignore_ip.cpp.orig 1970-01-01 01:00:00.000000000 +0100 @@ -1,188 +0,0 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2006 Nathaniel McCallum <nathan...@natemccallum.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ - -#include <cstdio> -#include <cstring> - -#include "../extension_ignore.hpp" -using namespace libproxy; - -static inline bool -sockaddr_equals(const struct sockaddr *ip_a, const struct sockaddr *ip_b, const struct sockaddr *nm) -{ - if (!ip_a || !ip_b) return false; - if (ip_a->sa_family != ip_b->sa_family) return false; - if (nm && ip_a->sa_family != nm->sa_family) return false; - - /* Setup the arrays */ - uint8_t bytes = 0, *a_data = NULL, *b_data = NULL, *nm_data = NULL; - if (ip_a->sa_family == AF_INET) - { - bytes = 32 / 8; - a_data = (uint8_t *) &((struct sockaddr_in *) ip_a)->sin_addr; - b_data = (uint8_t *) &((struct sockaddr_in *) ip_b)->sin_addr; - nm_data = nm ? (uint8_t *) &((struct sockaddr_in *) nm)->sin_addr : NULL; - } - else if (ip_a->sa_family == AF_INET6) - { - bytes = 128 / 8; - a_data = (uint8_t *) &((struct sockaddr_in6 *) ip_a)->sin6_addr; - b_data = (uint8_t *) &((struct sockaddr_in6 *) ip_b)->sin6_addr; - nm_data = nm ? (uint8_t *) &((struct sockaddr_in6 *) nm)->sin6_addr : NULL; - } - else - return false; - - for (int i=0 ; i < bytes ; i++) - { - if (nm && (a_data[i] & nm_data[i]) != (b_data[i] & nm_data[i])) - return false; - else if (!nm && (a_data[i] != b_data[i])) - return false; - } - return true; -} - -static inline sockaddr * -sockaddr_from_string(string ip) -{ - struct sockaddr *result = NULL; - - /* Try to parse */ - struct addrinfo *info = NULL; - struct addrinfo flags; - flags.ai_family = AF_UNSPEC; - flags.ai_socktype = 0; - flags.ai_protocol = 0; - flags.ai_flags = AI_NUMERICHOST; - if (getaddrinfo(ip.c_str(), NULL, &flags, &info) != 0 || !info) return result; - - /* Copy the results into our buffer */ - result = (sockaddr *) new char[info->ai_addrlen]; - if (!result) { - freeaddrinfo(info); - return result; - } - memcpy(result, info->ai_addr, info->ai_addrlen); - freeaddrinfo(info); - return result; -} - -static inline sockaddr * -sockaddr_from_cidr(sa_family_t af, uint8_t cidr) -{ - /* IPv4 */ - if (af == AF_INET) - { - sockaddr_in *mask = new sockaddr_in; - mask->sin_family = af; - mask->sin_addr.s_addr = htonl(~0 << (32 - (cidr > 32 ? 32 : cidr))); - - return (struct sockaddr *) mask; - } - - /* IPv6 */ - else if (af == AF_INET6) - { - sockaddr_in6 *mask = new sockaddr_in6; - mask->sin6_family = af; - for (uint8_t i=0 ; i < sizeof(mask->sin6_addr) ; i++) - mask->sin6_addr.s6_addr[i] = ~0 << (8 - (8*i > cidr ? 0 : cidr-8*i < 8 ? cidr-8*i : 8) ); - - return (sockaddr *) mask; - } - - return NULL; -} - -class ip_ignore_extension : public ignore_extension { -public: - virtual bool ignore(url& url, const string &ignore) { - bool result = false; - uint16_t port = 0; - const struct sockaddr *dst_ip = url.get_ips(false) ? url.get_ips(false)[0] : NULL; - struct sockaddr *ign_ip = NULL, *net_ip = NULL; - - /* - * IPv4 - * IPv6 - */ - if ((ign_ip = sockaddr_from_string(ignore))) - goto out; - - /* - * IPv4/CIDR - * IPv4/IPv4 - * IPv6/CIDR - * IPv6/IPv6 - */ - if (ignore.find('/') != string::npos) - { - ign_ip = sockaddr_from_string(ignore.substr(0, ignore.find('/'))); - - uint32_t cidr = 0; - string mask = ignore.substr(ignore.find('/') + 1); - - if (mask.find('.') != string::npos) - { - /* A dotted netmask was used */ - net_ip = sockaddr_from_string(mask); - } - else - { - /* If CIDR notation was used, get the netmask */ - if (sscanf(mask.c_str(), "%d", &cidr) == 1) - net_ip = sockaddr_from_cidr(ign_ip->sa_family, cidr); - } - - if (ign_ip && net_ip && ign_ip->sa_family == net_ip->sa_family) - goto out; - - delete ign_ip; - delete net_ip; - ign_ip = NULL; - net_ip = NULL; - } - - /* - * IPv4:port - * [IPv6]:port - */ - if (ignore.rfind(':') != string::npos && sscanf(ignore.substr(ignore.rfind(':')).c_str(), ":%hu", &port) == 1 && port > 0) - { - ign_ip = sockaddr_from_string(ignore.substr(ignore.rfind(':')).c_str()); - - /* Make sure this really is just a port and not just an IPv6 address */ - if (ign_ip && (ign_ip->sa_family != AF_INET6 || ignore[0] == '[')) - goto out; - - delete[] ign_ip; - ign_ip = NULL; - port = 0; - } - - out: - result = sockaddr_equals(dst_ip, ign_ip, net_ip); - delete[] ign_ip; - delete[] net_ip; - return port != 0 ? (port == url.get_port() && result) : result; - } -}; - -MM_MODULE_INIT_EZ(ip_ignore_extension, true, NULL, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/ignore_ip.cpp.rej new/libproxy-0.4.12/libproxy/modules/ignore_ip.cpp.rej --- old/libproxy-0.4.11/libproxy/modules/ignore_ip.cpp.rej 2012-07-05 20:25:17.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/ignore_ip.cpp.rej 1970-01-01 01:00:00.000000000 +0100 @@ -1,31 +0,0 @@ ---- libproxy/modules/ignore_ip.cpp -+++ libproxy/modules/ignore_ip.cpp -@@ -90,7 +90,7 @@ - /* IPv4 */ - if (af == AF_INET) - { -- sockaddr_in *mask = new sockaddr_in; -+ sockaddr_in *mask = (sockaddr_in*) new char[sizeof(sockaddr_in)]; - mask->sin_family = af; - mask->sin_addr.s_addr = htonl(~0 << (32 - (cidr > 32 ? 32 : cidr))); - -@@ -100,7 +100,7 @@ - /* IPv6 */ - else if (af == AF_INET6) - { -- sockaddr_in6 *mask = new sockaddr_in6; -+ sockaddr_in6 *mask = (sockaddr_in6*) new char[sizeof(sockaddr_in6)]; - mask->sin6_family = af; - for (uint8_t i=0 ; i < sizeof(mask->sin6_addr) ; i++) - mask->sin6_addr.s6_addr[i] = ~0 << (8 - (8*i > cidr ? 0 : cidr-8*i < 8 ? cidr-8*i : 8) ); -@@ -154,8 +154,8 @@ - if (ign_ip && net_ip && ign_ip->sa_family == net_ip->sa_family) - goto out; - -- delete ign_ip; -- delete net_ip; -+ delete[] ign_ip; -+ delete[] net_ip; - ign_ip = NULL; - net_ip = NULL; - } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/modules/pxgsettings.cpp new/libproxy-0.4.12/libproxy/modules/pxgsettings.cpp --- old/libproxy-0.4.11/libproxy/modules/pxgsettings.cpp 2011-05-02 19:46:03.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/modules/pxgsettings.cpp 2016-01-12 17:41:07.000000000 +0100 @@ -143,23 +143,20 @@ g_io_add_watch(outchan, G_IO_ERR, err, NULL); g_io_add_watch(outchan, G_IO_HUP, err, NULL); - // Get GConf client - GSettings* client; + // Get GSettings obkecy + GSettings* settings; for (int i=1; i<argc; i++) { - client = g_settings_new(argv[i]); - gchar** keys = g_settings_list_keys(client); - for (int j=0; keys[j]; on_value_change(client, keys[j++],argv[i] )); - g_signal_connect(client, "changed::", (GCallback) on_value_change, argv[i]); + settings = g_settings_new(argv[i]); + gchar** keys = g_settings_list_keys(settings); + g_signal_connect(settings, "changed::", G_CALLBACK (on_value_change), argv[i]); + for (int j=0; keys[j]; on_value_change(settings, keys[j++],argv[i] )); } - g_main_loop_run(loop); // Cleanup - while (G_IS_OBJECT(client)) { - g_object_unref(client); - } + g_object_unref(settings); g_io_channel_shutdown(inchan, FALSE, NULL); g_io_channel_shutdown(outchan, FALSE, NULL); g_io_channel_unref(inchan); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/test/get-pac-test.cpp new/libproxy-0.4.12/libproxy/test/get-pac-test.cpp --- old/libproxy-0.4.11/libproxy/test/get-pac-test.cpp 2012-10-16 19:52:03.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/test/get-pac-test.cpp 2016-01-12 17:41:07.000000000 +0100 @@ -3,6 +3,8 @@ #include <sstream> #include <string> +#include <stdlib.h> // for abort() +#include <errno.h> // for EINTR #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -58,7 +60,12 @@ void stop() { - assert (write(m_pipe[1], (void*)"q", 1) == 1); + int ret; + do + { + ret = write(m_pipe[1], (void*)"q", 1); + } while (errno == EINTR); + if (ret < 0) abort(); // We could not write to the pipe anymore pthread_join (m_thread, NULL); close(m_pipe[1]); m_pipe[1] = -1; @@ -188,7 +195,8 @@ ret = send(csock, (void*)basic, strlen(basic), 0); assert(ret == strlen(basic)); ret = send(csock, (void*)buf, size, 0); - assert(ret != size); + if (!(errno == EBADF)) + abort(); // Test failed... the socket did not close on us delete[] buf; shutdown(csock, SHUT_RDWR); close(ret); @@ -235,21 +243,21 @@ server.start(); pac = basic.get_pac(); - assert(pac != NULL); - assert(strlen(pac) == 10); - assert(!strcmp("0123456789", pac)); - delete[] pac; + if (!(pac != NULL && strlen(pac) == 10 && !strcmp("0123456789", pac))) + return 1; // test failed, exit with error code + delete[] pac; // test succesful, cleanup pac = truncated.get_pac(); - assert(pac == NULL); + if (pac != NULL) + return 2; // Test failed, exit with error code pac = overflow.get_pac(); - assert(pac == NULL); + if (pac != NULL) + return 3; // Test failed, exit with error code pac = chunked.get_pac(); - assert(pac != NULL); - assert(strlen(pac) == 10); - assert(!strcmp("0123456789", pac)); + if (!(pac != NULL && strlen(pac) == 10 && !strcmp("0123456789", pac))) + return 4; // Test failed, exit with error code delete[] pac; server.stop(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy/url.cpp new/libproxy-0.4.12/libproxy/url.cpp --- old/libproxy-0.4.11/libproxy/url.cpp 2012-10-16 19:52:03.000000000 +0200 +++ new/libproxy-0.4.12/libproxy/url.cpp 2016-01-12 17:41:07.000000000 +0100 @@ -403,6 +403,7 @@ buffer = NULL; } } + close(sock); return buffer; } @@ -496,6 +497,7 @@ // Clean up shutdown(sock, SHUT_RDWR); + close(sock); return buffer; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/libproxy-CVE-2012-4504.patch new/libproxy-0.4.12/libproxy-CVE-2012-4504.patch --- old/libproxy-0.4.11/libproxy-CVE-2012-4504.patch 2012-10-10 21:25:54.000000000 +0200 +++ new/libproxy-0.4.12/libproxy-CVE-2012-4504.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -Index: libproxy/url.cpp -=================================================================== ---- libproxy/url.cpp (revision 852) -+++ libproxy/url.cpp (revision 853) -@@ -474,9 +474,10 @@ - // Add this chunk to our content length, - // ensuring that we aren't over our max size - content_length += chunk_length; -- if (content_length >= PAC_MAX_SIZE) break; - } - -+ if (content_length >= PAC_MAX_SIZE) break; -+ - while (recvd != content_length) { - int r = recv(sock, buffer + recvd, content_length - recvd, 0); - if (r < 0) break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/samples/dotnet/Makefile new/libproxy-0.4.12/samples/dotnet/Makefile --- old/libproxy-0.4.11/samples/dotnet/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/libproxy-0.4.12/samples/dotnet/Makefile 2016-01-12 17:41:07.000000000 +0100 @@ -0,0 +1,8 @@ + +all: proxy.exe + +proxy.exe: proxy.cs + gmcs -pkg:libproxy-sharp-1.0 proxy.cs + +clean: + rm proxy.exe diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/samples/libcurl/Makefile new/libproxy-0.4.12/samples/libcurl/Makefile --- old/libproxy-0.4.11/samples/libcurl/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/libproxy-0.4.12/samples/libcurl/Makefile 2016-01-12 17:41:07.000000000 +0100 @@ -0,0 +1,9 @@ + + +all: curlget + +curlget: curlget.c + gcc curlget.c -o curlget -Wall -lcurl -std=c99 $(shell pkg-config --libs libproxy-1.0) + +clean: + rm curlget diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/samples/seed/main.js new/libproxy-0.4.12/samples/seed/main.js --- old/libproxy-0.4.11/samples/seed/main.js 2011-08-11 18:10:14.000000000 +0200 +++ new/libproxy-0.4.12/samples/seed/main.js 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ - -Libproxy = imports.gi.Libproxy; -px = Libproxy.proxy_factory_new; - -print (Libproxy.get_proxies("http://www.google.com")); - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.4.11/samples/vala/Makefile new/libproxy-0.4.12/samples/vala/Makefile --- old/libproxy-0.4.11/samples/vala/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/libproxy-0.4.12/samples/vala/Makefile 2016-01-12 17:41:07.000000000 +0100 @@ -0,0 +1,7 @@ +all: sample + +sample: sample.vala + valac --pkg libproxy-1.0 sample.vala + +clean: + rm sample ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.t96Dq4/_old 2016-01-21 23:41:16.000000000 +0100 +++ /var/tmp/diff_new_pack.t96Dq4/_new 2016-01-21 23:41:16.000000000 +0100 @@ -3,7 +3,7 @@ # supplements "packageand(libproxy1-<targettype>:libproxy1-config-gnome)" libproxy1-config-gnome3 supplements "packageand(libproxy1-<targettype>:libproxy1-config-gnome3)" -libproxy1-config-kde4 +libproxy1-config-kde supplements "packageand(libproxy1-<targettype>:libproxy1-config-kde)" #libproxy1-pacrunner-mozjs # supplements "packageand(libproxy1-<targettype>:libproxy1-config-mozjs)"