[arch-commits] Commit in libproxy/repos (12 files)

Evangelos Foutras foutrelis at archlinux.org
Sun Jun 14 15:26:32 UTC 2015


    Date: Sunday, June 14, 2015 @ 17:26:32
  Author: foutrelis
Revision: 240760

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  libproxy/repos/staging-i686/
  libproxy/repos/staging-i686/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
    (from rev 240759, libproxy/trunk/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch)
  libproxy/repos/staging-i686/PKGBUILD
    (from rev 240759, libproxy/trunk/PKGBUILD)
  libproxy/repos/staging-i686/dont_segfault_on_exit.patch
    (from rev 240759, libproxy/trunk/dont_segfault_on_exit.patch)
  libproxy/repos/staging-i686/libproxy-0.4.11-crash.patch
    (from rev 240759, libproxy/trunk/libproxy-0.4.11-crash.patch)
  libproxy/repos/staging-i686/libproxy-0.4.11-fdleak.patch
    (from rev 240759, libproxy/trunk/libproxy-0.4.11-fdleak.patch)
  libproxy/repos/staging-x86_64/
  libproxy/repos/staging-x86_64/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
    (from rev 240759, libproxy/trunk/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch)
  libproxy/repos/staging-x86_64/PKGBUILD
    (from rev 240759, libproxy/trunk/PKGBUILD)
  libproxy/repos/staging-x86_64/dont_segfault_on_exit.patch
    (from rev 240759, libproxy/trunk/dont_segfault_on_exit.patch)
  libproxy/repos/staging-x86_64/libproxy-0.4.11-crash.patch
    (from rev 240759, libproxy/trunk/libproxy-0.4.11-crash.patch)
  libproxy/repos/staging-x86_64/libproxy-0.4.11-fdleak.patch
    (from rev 240759, libproxy/trunk/libproxy-0.4.11-fdleak.patch)

-------------------------------------------------------------------+
 staging-i686/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch   |   90 ++++++++++
 staging-i686/PKGBUILD                                             |   59 ++++++
 staging-i686/dont_segfault_on_exit.patch                          |   14 +
 staging-i686/libproxy-0.4.11-crash.patch                          |   41 ++++
 staging-i686/libproxy-0.4.11-fdleak.patch                         |   20 ++
 staging-x86_64/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch |   90 ++++++++++
 staging-x86_64/PKGBUILD                                           |   59 ++++++
 staging-x86_64/dont_segfault_on_exit.patch                        |   14 +
 staging-x86_64/libproxy-0.4.11-crash.patch                        |   41 ++++
 staging-x86_64/libproxy-0.4.11-fdleak.patch                       |   20 ++
 10 files changed, 448 insertions(+)

Copied: libproxy/repos/staging-i686/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch (from rev 240759, libproxy/trunk/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch)
===================================================================
--- staging-i686/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch	                        (rev 0)
+++ staging-i686/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,90 @@
+From cccc44ce0c8a251d987d0d83f05e93d31aa659d7 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters at verbum.org>
+Date: Mon, 3 Jun 2013 17:09:25 -0400
+Subject: [PATCH] pacrunner_mozjs: Also support mozjs-17.0
+
+GNOME 3.10 is moving to hard require mozjs-17.0, so we should support
+it too.  See also:
+
+https://bugs.freedesktop.org/show_bug.cgi?id=59830
+https://bugzilla.gnome.org/show_bug.cgi?id=690982
+---
+ libproxy/cmake/modules/pacrunner_mozjs.cmk |    8 +++++++-
+ libproxy/modules/pacrunner_mozjs.cpp       |   16 +++++++++++++---
+ 2 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
+index 21072db..49856a6 100644
+--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
++++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
+@@ -14,7 +14,13 @@ elseif(NOT APPLE)
+       include_directories(${MOZJS_INCLUDE_DIRS})
+       link_directories(${MOZJS_LIBRARY_DIRS})
+     else()
+-      set(MOZJS_FOUND 0)
++      pkg_search_module(MOZJS mozjs-17.0)
++      if(MOZJS_FOUND)
++        include_directories(${MOZJS_INCLUDE_DIRS})
++        link_directories(${MOZJS_LIBRARY_DIRS})
++      else()
++        set(MOZJS_FOUND 0)
++      endif()
+     endif()
+   else()
+     set(MOZJS_FOUND 0)
+diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
+index abb4b9d..f5e678c 100644
+--- a/libproxy/modules/pacrunner_mozjs.cpp
++++ b/libproxy/modules/pacrunner_mozjs.cpp
+@@ -19,6 +19,7 @@
+ 
+ #include <cstring> // ?
+ #include <unistd.h> // gethostname
++#include <stdint.h>
+ 
+ #include "../extension_pacrunner.hpp"
+ using namespace libproxy;
+@@ -76,12 +77,12 @@ static JSBool dnsResolve_(JSContext *cx, jsval hostname, jsval *vp) {
+ 		return true;
+ }
+ 
+-static JSBool dnsResolve(JSContext *cx, uintN /*argc*/, jsval *vp) {
++static JSBool dnsResolve(JSContext *cx, uint32_t /*argc*/, jsval *vp) {
+ 	jsval *argv = JS_ARGV(cx, vp);
+ 	return dnsResolve_(cx, argv[0], vp);
+ }
+ 
+-static JSBool myIpAddress(JSContext *cx, uintN /*argc*/, jsval *vp) {
++static JSBool myIpAddress(JSContext *cx, uint32_t /*argc*/, jsval *vp) {
+ 	char *hostname = (char *) JS_malloc(cx, 1024);
+ 	if (!gethostname(hostname, 1023)) {
+ 		JSString *myhost = JS_NewStringCopyN(cx, hostname, strlen(hostname));
+@@ -98,7 +99,12 @@ static JSBool myIpAddress(JSContext *cx, uintN /*argc*/, jsval *vp) {
+ static JSClass cls = {
+ 		"global", JSCLASS_GLOBAL_FLAGS,
+ 		JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
+-		JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
++		JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub,
++#if JS_VERSION == 186      
++		NULL,
++#else
++		JS_FinalizeStub,
++#endif
+ 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ };
+ 
+@@ -117,7 +123,11 @@ public:
+ 	    //JS_SetOptions(this->jsctx, JSOPTION_VAROBJFIX);
+ 	    //JS_SetVersion(this->jsctx, JSVERSION_LATEST);
+ 	    //JS_SetErrorReporter(cx, reportError);
++#if JS_VERSION == 186
++		if (!(this->jsglb = JS_NewGlobalObject(this->jsctx, &cls, NULL))) goto error;
++#else
+ 		if (!(this->jsglb = JS_NewCompartmentAndGlobalObject(this->jsctx, &cls, NULL))) goto error;
++#endif
+ 		if (!JS_InitStandardClasses(this->jsctx, this->jsglb))            goto error;
+ 
+ 		// Define Javascript functions
+-- 
+1.7.1
+

Copied: libproxy/repos/staging-i686/PKGBUILD (from rev 240759, libproxy/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=libproxy
+pkgver=0.4.11
+pkgrel=6
+pkgdesc="A library that provides automatic proxy configuration management"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gcc-libs')
+optdepends=('networkmanager: NetworkManager configuration module'
+            'perl: Perl bindings'
+            'python2: Python bindings'
+            'glib2: gsettings configuration module'
+            'js17: PAC proxy support - Mozilla based pacrunner'
+            'webkitgtk: PAC proxy support - Webkit based pacrunner')
+makedepends=('cmake' 'networkmanager' 'python2' 'perl' 'js17' 'webkitgtk')
+url="http://libproxy.googlecode.com"
+source=(http://libproxy.googlecode.com/files/${pkgname}-${pkgver}.tar.gz
+        0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
+        libproxy-0.4.11-crash.patch
+        libproxy-0.4.11-fdleak.patch
+        dont_segfault_on_exit.patch)
+md5sums=('3cd1ae2a4abecf44b3f24d6639d2cd84'
+         '16cb8ad1292f04279108a80f36434c7b'
+         'a45f2195c164a48639e963e8341f5d93'
+         '6302b995c570e42691007f3b09953a59'
+         '0a4980304ee93764162dbdbd0eb5e519')
+
+prepare() {
+  mkdir build
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
+  patch -Np1 -i ../libproxy-0.4.11-crash.patch
+  patch -Np1 -i ../libproxy-0.4.11-fdleak.patch
+  patch -Np1 -i ../dont_segfault_on_exit.patch
+}
+
+build() {
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIBEXEC_INSTALL_DIR=/usr/lib/libproxy \
+    -DCMAKE_SKIP_RPATH=ON \
+    -DPERL_VENDORINSTALL=yes \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DWITH_WEBKIT3=ON \
+    -DWITH_MOZJS=ON \
+    -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
+    -DCMAKE_C_FLAGS="${CFLAGS}" \
+    -DWITH_KDE4=OFF \
+    -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+}

Copied: libproxy/repos/staging-i686/dont_segfault_on_exit.patch (from rev 240759, libproxy/trunk/dont_segfault_on_exit.patch)
===================================================================
--- staging-i686/dont_segfault_on_exit.patch	                        (rev 0)
+++ staging-i686/dont_segfault_on_exit.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,14 @@
+--- libproxy-0.4.11/libproxy/modules/pxgsettings.cpp.orig	2013-05-30 13:18:11.597138996 +0200
++++ libproxy-0.4.11/libproxy/modules/pxgsettings.cpp	2013-05-30 13:18:19.801139269 +0200
+@@ -156,10 +156,7 @@
+ 
+ 	g_main_loop_run(loop);
+ 
+-	// Cleanup
+-	while (G_IS_OBJECT(client)) {
+-		g_object_unref(client);
+-	}
++	g_object_unref(client);
+ 	g_io_channel_shutdown(inchan,  FALSE, NULL);
+ 	g_io_channel_shutdown(outchan, FALSE, NULL);
+ 	g_io_channel_unref(inchan);

Copied: libproxy/repos/staging-i686/libproxy-0.4.11-crash.patch (from rev 240759, libproxy/trunk/libproxy-0.4.11-crash.patch)
===================================================================
--- staging-i686/libproxy-0.4.11-crash.patch	                        (rev 0)
+++ staging-i686/libproxy-0.4.11-crash.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,41 @@
+diff -up libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash libproxy-0.4.11/libproxy/extension_pacrunner.cpp
+--- libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash	2010-07-29 08:14:59.000000000 -0400
++++ libproxy-0.4.11/libproxy/extension_pacrunner.cpp	2013-11-11 15:23:56.987266457 -0500
+@@ -22,20 +22,10 @@ using namespace libproxy;
+ 
+ pacrunner::pacrunner(string, const url&) {}
+ 
+-pacrunner_extension::pacrunner_extension() {
+-	this->pr = NULL;
+-}
++pacrunner_extension::pacrunner_extension() {}
+ 
+-pacrunner_extension::~pacrunner_extension() {
+-	if (this->pr) delete this->pr;
+-}
++pacrunner_extension::~pacrunner_extension() {}
+ 
+ pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) {
+-	if (this->pr) {
+-		if (this->last == pac)
+-			return this->pr;
+-		delete this->pr;
+-	}
+-
+-	return this->pr = this->create(pac, pacurl);
++	return this->create(pac, pacurl);
+ }
+diff -up libproxy-0.4.11/libproxy/proxy.cpp.crash libproxy-0.4.11/libproxy/proxy.cpp
+--- libproxy-0.4.11/libproxy/proxy.cpp.crash	2013-11-11 15:25:27.309271353 -0500
++++ libproxy-0.4.11/libproxy/proxy.cpp	2013-11-11 15:25:31.569271584 -0500
+@@ -416,7 +416,9 @@ void proxy_factory::run_pac(url &realurl
+ 
+ 		/* Run the PAC, but only try one PACRunner */
+ 		if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl;
+-		string pacresp = pacrunners[0]->get(this->pac, this->pacurl->to_string())->run(realurl);
++		pacrunner* runner = pacrunners[0]->get(this->pac, this->pacurl->to_string());
++		string pacresp = runner->run(realurl);
++		delete runner;
+ 		if (debug) cerr << "Pacrunner returned: " << pacresp << endl;
+ 		format_pac_response(pacresp, response);
+ 	}

Copied: libproxy/repos/staging-i686/libproxy-0.4.11-fdleak.patch (from rev 240759, libproxy/trunk/libproxy-0.4.11-fdleak.patch)
===================================================================
--- staging-i686/libproxy-0.4.11-fdleak.patch	                        (rev 0)
+++ staging-i686/libproxy-0.4.11-fdleak.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,20 @@
+diff -up libproxy-0.4.11/libproxy/url.cpp.fdleak libproxy-0.4.11/libproxy/url.cpp
+--- libproxy-0.4.11/libproxy/url.cpp.fdleak	2013-09-19 08:45:48.718145364 -0400
++++ libproxy-0.4.11/libproxy/url.cpp	2013-09-19 08:46:31.374147676 -0400
+@@ -403,6 +403,7 @@ char* url::get_pac() {
+ 				buffer = NULL;
+ 			}
+ 		}
++		close (sock);
+ 		return buffer;
+ 	}
+ 
+@@ -495,7 +496,7 @@ char* url::get_pac() {
+ 	}
+ 
+ 	// Clean up
+-	shutdown(sock, SHUT_RDWR);
++	close(sock);
+ 	return buffer;
+ }
+ 

Copied: libproxy/repos/staging-x86_64/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch (from rev 240759, libproxy/trunk/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch)
===================================================================
--- staging-x86_64/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch	                        (rev 0)
+++ staging-x86_64/0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,90 @@
+From cccc44ce0c8a251d987d0d83f05e93d31aa659d7 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters at verbum.org>
+Date: Mon, 3 Jun 2013 17:09:25 -0400
+Subject: [PATCH] pacrunner_mozjs: Also support mozjs-17.0
+
+GNOME 3.10 is moving to hard require mozjs-17.0, so we should support
+it too.  See also:
+
+https://bugs.freedesktop.org/show_bug.cgi?id=59830
+https://bugzilla.gnome.org/show_bug.cgi?id=690982
+---
+ libproxy/cmake/modules/pacrunner_mozjs.cmk |    8 +++++++-
+ libproxy/modules/pacrunner_mozjs.cpp       |   16 +++++++++++++---
+ 2 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
+index 21072db..49856a6 100644
+--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
++++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
+@@ -14,7 +14,13 @@ elseif(NOT APPLE)
+       include_directories(${MOZJS_INCLUDE_DIRS})
+       link_directories(${MOZJS_LIBRARY_DIRS})
+     else()
+-      set(MOZJS_FOUND 0)
++      pkg_search_module(MOZJS mozjs-17.0)
++      if(MOZJS_FOUND)
++        include_directories(${MOZJS_INCLUDE_DIRS})
++        link_directories(${MOZJS_LIBRARY_DIRS})
++      else()
++        set(MOZJS_FOUND 0)
++      endif()
+     endif()
+   else()
+     set(MOZJS_FOUND 0)
+diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
+index abb4b9d..f5e678c 100644
+--- a/libproxy/modules/pacrunner_mozjs.cpp
++++ b/libproxy/modules/pacrunner_mozjs.cpp
+@@ -19,6 +19,7 @@
+ 
+ #include <cstring> // ?
+ #include <unistd.h> // gethostname
++#include <stdint.h>
+ 
+ #include "../extension_pacrunner.hpp"
+ using namespace libproxy;
+@@ -76,12 +77,12 @@ static JSBool dnsResolve_(JSContext *cx, jsval hostname, jsval *vp) {
+ 		return true;
+ }
+ 
+-static JSBool dnsResolve(JSContext *cx, uintN /*argc*/, jsval *vp) {
++static JSBool dnsResolve(JSContext *cx, uint32_t /*argc*/, jsval *vp) {
+ 	jsval *argv = JS_ARGV(cx, vp);
+ 	return dnsResolve_(cx, argv[0], vp);
+ }
+ 
+-static JSBool myIpAddress(JSContext *cx, uintN /*argc*/, jsval *vp) {
++static JSBool myIpAddress(JSContext *cx, uint32_t /*argc*/, jsval *vp) {
+ 	char *hostname = (char *) JS_malloc(cx, 1024);
+ 	if (!gethostname(hostname, 1023)) {
+ 		JSString *myhost = JS_NewStringCopyN(cx, hostname, strlen(hostname));
+@@ -98,7 +99,12 @@ static JSBool myIpAddress(JSContext *cx, uintN /*argc*/, jsval *vp) {
+ static JSClass cls = {
+ 		"global", JSCLASS_GLOBAL_FLAGS,
+ 		JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
+-		JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
++		JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub,
++#if JS_VERSION == 186      
++		NULL,
++#else
++		JS_FinalizeStub,
++#endif
+ 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ };
+ 
+@@ -117,7 +123,11 @@ public:
+ 	    //JS_SetOptions(this->jsctx, JSOPTION_VAROBJFIX);
+ 	    //JS_SetVersion(this->jsctx, JSVERSION_LATEST);
+ 	    //JS_SetErrorReporter(cx, reportError);
++#if JS_VERSION == 186
++		if (!(this->jsglb = JS_NewGlobalObject(this->jsctx, &cls, NULL))) goto error;
++#else
+ 		if (!(this->jsglb = JS_NewCompartmentAndGlobalObject(this->jsctx, &cls, NULL))) goto error;
++#endif
+ 		if (!JS_InitStandardClasses(this->jsctx, this->jsglb))            goto error;
+ 
+ 		// Define Javascript functions
+-- 
+1.7.1
+

Copied: libproxy/repos/staging-x86_64/PKGBUILD (from rev 240759, libproxy/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=libproxy
+pkgver=0.4.11
+pkgrel=6
+pkgdesc="A library that provides automatic proxy configuration management"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gcc-libs')
+optdepends=('networkmanager: NetworkManager configuration module'
+            'perl: Perl bindings'
+            'python2: Python bindings'
+            'glib2: gsettings configuration module'
+            'js17: PAC proxy support - Mozilla based pacrunner'
+            'webkitgtk: PAC proxy support - Webkit based pacrunner')
+makedepends=('cmake' 'networkmanager' 'python2' 'perl' 'js17' 'webkitgtk')
+url="http://libproxy.googlecode.com"
+source=(http://libproxy.googlecode.com/files/${pkgname}-${pkgver}.tar.gz
+        0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
+        libproxy-0.4.11-crash.patch
+        libproxy-0.4.11-fdleak.patch
+        dont_segfault_on_exit.patch)
+md5sums=('3cd1ae2a4abecf44b3f24d6639d2cd84'
+         '16cb8ad1292f04279108a80f36434c7b'
+         'a45f2195c164a48639e963e8341f5d93'
+         '6302b995c570e42691007f3b09953a59'
+         '0a4980304ee93764162dbdbd0eb5e519')
+
+prepare() {
+  mkdir build
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
+  patch -Np1 -i ../libproxy-0.4.11-crash.patch
+  patch -Np1 -i ../libproxy-0.4.11-fdleak.patch
+  patch -Np1 -i ../dont_segfault_on_exit.patch
+}
+
+build() {
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIBEXEC_INSTALL_DIR=/usr/lib/libproxy \
+    -DCMAKE_SKIP_RPATH=ON \
+    -DPERL_VENDORINSTALL=yes \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DWITH_WEBKIT3=ON \
+    -DWITH_MOZJS=ON \
+    -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
+    -DCMAKE_C_FLAGS="${CFLAGS}" \
+    -DWITH_KDE4=OFF \
+    -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+}

Copied: libproxy/repos/staging-x86_64/dont_segfault_on_exit.patch (from rev 240759, libproxy/trunk/dont_segfault_on_exit.patch)
===================================================================
--- staging-x86_64/dont_segfault_on_exit.patch	                        (rev 0)
+++ staging-x86_64/dont_segfault_on_exit.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,14 @@
+--- libproxy-0.4.11/libproxy/modules/pxgsettings.cpp.orig	2013-05-30 13:18:11.597138996 +0200
++++ libproxy-0.4.11/libproxy/modules/pxgsettings.cpp	2013-05-30 13:18:19.801139269 +0200
+@@ -156,10 +156,7 @@
+ 
+ 	g_main_loop_run(loop);
+ 
+-	// Cleanup
+-	while (G_IS_OBJECT(client)) {
+-		g_object_unref(client);
+-	}
++	g_object_unref(client);
+ 	g_io_channel_shutdown(inchan,  FALSE, NULL);
+ 	g_io_channel_shutdown(outchan, FALSE, NULL);
+ 	g_io_channel_unref(inchan);

Copied: libproxy/repos/staging-x86_64/libproxy-0.4.11-crash.patch (from rev 240759, libproxy/trunk/libproxy-0.4.11-crash.patch)
===================================================================
--- staging-x86_64/libproxy-0.4.11-crash.patch	                        (rev 0)
+++ staging-x86_64/libproxy-0.4.11-crash.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,41 @@
+diff -up libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash libproxy-0.4.11/libproxy/extension_pacrunner.cpp
+--- libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash	2010-07-29 08:14:59.000000000 -0400
++++ libproxy-0.4.11/libproxy/extension_pacrunner.cpp	2013-11-11 15:23:56.987266457 -0500
+@@ -22,20 +22,10 @@ using namespace libproxy;
+ 
+ pacrunner::pacrunner(string, const url&) {}
+ 
+-pacrunner_extension::pacrunner_extension() {
+-	this->pr = NULL;
+-}
++pacrunner_extension::pacrunner_extension() {}
+ 
+-pacrunner_extension::~pacrunner_extension() {
+-	if (this->pr) delete this->pr;
+-}
++pacrunner_extension::~pacrunner_extension() {}
+ 
+ pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) {
+-	if (this->pr) {
+-		if (this->last == pac)
+-			return this->pr;
+-		delete this->pr;
+-	}
+-
+-	return this->pr = this->create(pac, pacurl);
++	return this->create(pac, pacurl);
+ }
+diff -up libproxy-0.4.11/libproxy/proxy.cpp.crash libproxy-0.4.11/libproxy/proxy.cpp
+--- libproxy-0.4.11/libproxy/proxy.cpp.crash	2013-11-11 15:25:27.309271353 -0500
++++ libproxy-0.4.11/libproxy/proxy.cpp	2013-11-11 15:25:31.569271584 -0500
+@@ -416,7 +416,9 @@ void proxy_factory::run_pac(url &realurl
+ 
+ 		/* Run the PAC, but only try one PACRunner */
+ 		if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl;
+-		string pacresp = pacrunners[0]->get(this->pac, this->pacurl->to_string())->run(realurl);
++		pacrunner* runner = pacrunners[0]->get(this->pac, this->pacurl->to_string());
++		string pacresp = runner->run(realurl);
++		delete runner;
+ 		if (debug) cerr << "Pacrunner returned: " << pacresp << endl;
+ 		format_pac_response(pacresp, response);
+ 	}

Copied: libproxy/repos/staging-x86_64/libproxy-0.4.11-fdleak.patch (from rev 240759, libproxy/trunk/libproxy-0.4.11-fdleak.patch)
===================================================================
--- staging-x86_64/libproxy-0.4.11-fdleak.patch	                        (rev 0)
+++ staging-x86_64/libproxy-0.4.11-fdleak.patch	2015-06-14 15:26:32 UTC (rev 240760)
@@ -0,0 +1,20 @@
+diff -up libproxy-0.4.11/libproxy/url.cpp.fdleak libproxy-0.4.11/libproxy/url.cpp
+--- libproxy-0.4.11/libproxy/url.cpp.fdleak	2013-09-19 08:45:48.718145364 -0400
++++ libproxy-0.4.11/libproxy/url.cpp	2013-09-19 08:46:31.374147676 -0400
+@@ -403,6 +403,7 @@ char* url::get_pac() {
+ 				buffer = NULL;
+ 			}
+ 		}
++		close (sock);
+ 		return buffer;
+ 	}
+ 
+@@ -495,7 +496,7 @@ char* url::get_pac() {
+ 	}
+ 
+ 	// Clean up
+-	shutdown(sock, SHUT_RDWR);
++	close(sock);
+ 	return buffer;
+ }
+ 



More information about the arch-commits mailing list