RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/libproxy#9ba40fc85f32f7992588486ea880042a839f85cd
This commit is contained in:
Petr Šabata 2020-10-15 16:59:59 +02:00
parent 00f8676f4f
commit 5d4543555c
14 changed files with 1344 additions and 0 deletions

5
.gitignore vendored
View File

@ -0,0 +1,5 @@
/libproxy-0.*.tar.gz
/0.4.12.tar.gz
/0.4.13.tar.gz
/libproxy-0.4.14.tar.xz
/0.4.15.tar.gz

View File

@ -0,0 +1,177 @@
From 6f6d2dd74e6a1bd0e356e9290d733672afcf8f70 Mon Sep 17 00:00:00 2001
From: David Woodhouse <David.Woodhouse@intel.com>
Date: Wed, 8 Dec 2010 12:13:43 +0000
Subject: [PATCH] =?UTF-8?q?Add=20config=20module=20for=20querying=20PacRun?=
=?UTF-8?q?ner=20d=C3=A6mon?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
libproxy/cmake/modules.cmk | 2 +
libproxy/cmake/modules/config_pacrunner.cmk | 3 +
libproxy/modules/config_pacrunner.cpp | 122 ++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
create mode 100644 libproxy/cmake/modules/config_pacrunner.cmk
create mode 100644 libproxy/modules/config_pacrunner.cpp
diff --git a/libproxy/cmake/modules.cmk b/libproxy/cmake/modules.cmk
index 68ff898..2593d29 100644
--- a/libproxy/cmake/modules.cmk
+++ b/libproxy/cmake/modules.cmk
@@ -8,6 +8,7 @@ endif()
# Do module determination
include(cmake/pxmodule.cmk)
include(cmake/pkgconfig.cmk)
+include(cmake/modules/config_pacrunner.cmk)
include(cmake/modules/config_envvar.cmk)
include(cmake/modules/config_sysconfig.cmk)
include(cmake/modules/config_gnome.cmk)
@@ -28,6 +29,7 @@ endif()
## Module definition
#
message("MODULES TO BUILD:")
+px_module(config_pacrunner "${DBUS_FOUND}" 0 ${DBUS_LIBRARIES})
px_module(config_envvar "${ENVVAR_FOUND}" 1)
px_module(config_sysconfig "${SYSCONFIG_FOUND}" 1)
px_module(config_gnome "${GNOME2_FOUND}" 0)
diff --git a/libproxy/cmake/modules/config_pacrunner.cmk b/libproxy/cmake/modules/config_pacrunner.cmk
new file mode 100644
index 0000000..11dde89
--- /dev/null
+++ b/libproxy/cmake/modules/config_pacrunner.cmk
@@ -0,0 +1,3 @@
+if (NOT WIN32 AND NOT APPLE)
+ px_check_modules(DBUS dbus-1)
+endif()
diff --git a/libproxy/modules/config_pacrunner.cpp b/libproxy/modules/config_pacrunner.cpp
new file mode 100644
index 0000000..b4cf723
--- /dev/null
+++ b/libproxy/modules/config_pacrunner.cpp
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * libproxy - A library for proxy configuration
+ * Copyright (C) 2010 Intel Corporation
+ *
+ * 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 "../extension_config.hpp"
+using namespace libproxy;
+
+#include <string.h>
+#include <dbus/dbus.h>
+
+class pacrunner_config_extension : public config_extension {
+public:
+ pacrunner_config_extension() {
+ this->conn = NULL;
+ }
+
+ ~pacrunner_config_extension() {
+ if (this->conn) dbus_connection_close(this->conn);
+ }
+
+ class scoped_dbus_message {
+ public:
+ scoped_dbus_message(DBusMessage *msg) {
+ this->msg = msg;
+ }
+
+ ~scoped_dbus_message() {
+ if (this->msg)
+ dbus_message_unref(msg);
+ }
+
+ private:
+ DBusMessage *msg;
+ };
+
+ vector<url> get_config(const url &dest) throw (runtime_error) {
+ // Make sure we have a valid connection with a proper match
+ DBusConnection *conn = this->conn;
+ vector<url> response;
+
+ if (!conn || !dbus_connection_get_is_connected(conn))
+ {
+ // If the connection was disconnected,
+ // close it an clear the queue
+ if (conn)
+ {
+ dbus_connection_close(conn);
+ dbus_connection_read_write(conn, 0);
+ for (DBusMessage *msg=NULL ; (msg = dbus_connection_pop_message(conn)) ; dbus_message_unref(msg)) {};
+ }
+
+ // Create a new connections
+ conn = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL);
+ this->conn = conn;
+ if (!conn)
+ throw runtime_error("Unable to set up DBus connection");
+
+ // If connection was successful, set it up
+ dbus_connection_set_exit_on_disconnect(conn, false);
+ }
+
+ DBusMessage *msg, *reply;
+
+ msg = dbus_message_new_method_call("org.pacrunner",
+ "/org/pacrunner/client",
+ "org.pacrunner.Client",
+ "FindProxyForURL");
+ if (!msg)
+ throw runtime_error("Unable to create PacRunner DBus call");
+
+ string dest_str = dest.to_string();
+ string dest_host = dest.get_host();
+ const char *dest_cstr = dest_str.c_str();
+ const char *dest_host_cstr = dest_host.c_str();
+
+ dbus_message_append_args(msg, DBUS_TYPE_STRING, &dest_cstr,
+ DBUS_TYPE_STRING, &dest_host_cstr,
+ DBUS_TYPE_INVALID);
+
+ reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, NULL);
+
+ dbus_message_unref(msg);
+
+ if (!reply)
+ throw runtime_error("Failed to get DBus response from PacRunner");
+
+ scoped_dbus_message smsg(reply);
+ char *str = NULL;
+ dbus_message_get_args(reply, NULL, DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID);
+
+ if (!str || !strlen(str) || !::strcmp(str, "DIRECT"))
+ response.push_back(url("direct://"));
+ else if (!strncmp(str, "PROXY ", 6))
+ response.push_back(url("http://" + string(str + 6)));
+ else if (!strncmp(str, "SOCKS ", 6))
+ response.push_back(url("socks://" + string(str + 6)));
+ else {
+ throw runtime_error("Unrecognised proxy response from PacRunner: " + string(str));
+ }
+ return response;
+ }
+
+private:
+ DBusConnection *conn;
+};
+
+MM_MODULE_INIT_EZ(pacrunner_config_extension, true, NULL, NULL);
--
1.8.2.1

View File

@ -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);
}

View File

@ -0,0 +1,57 @@
From a83dae404feac517695c23ff43ce1e116e2bfbe0 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Wed, 9 Sep 2020 11:12:02 -0500
Subject: [PATCH] Rewrite url::recvline to be nonrecursive
This function processes network input. It's semi-trusted, because the
PAC ought to be trusted. But we still shouldn't allow it to control how
far we recurse. A malicious PAC can cause us to overflow the stack by
sending a sufficiently-long line without any '\n' character.
Also, this function failed to properly handle EINTR, so let's fix that
too, for good measure.
Fixes #134
---
libproxy/url.cpp | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/libproxy/url.cpp b/libproxy/url.cpp
index ee776b2..68d69cd 100644
--- a/libproxy/url.cpp
+++ b/libproxy/url.cpp
@@ -388,16 +388,24 @@ string url::to_string() const {
return m_orig;
}
-static inline string recvline(int fd) {
- // Read a character.
- // If we don't get a character, return empty string.
- // If we are at the end of the line, return empty string.
- char c = '\0';
-
- if (recv(fd, &c, 1, 0) != 1 || c == '\n')
- return "";
-
- return string(1, c) + recvline(fd);
+static string recvline(int fd) {
+ string line;
+ int ret;
+
+ // Reserve arbitrary amount of space to avoid small memory reallocations.
+ line.reserve(128);
+
+ do {
+ char c;
+ ret = recv(fd, &c, 1, 0);
+ if (ret == 1) {
+ if (c == '\n')
+ return line;
+ line += c;
+ }
+ } while (ret == 1 || (ret == -1 && errno == EINTR));
+
+ return line;
}
char* url::get_pac() {

View File

@ -0,0 +1,93 @@
From 4411b523545b22022b4be7d0cac25aa170ae1d3e Mon Sep 17 00:00:00 2001
From: Fei Li <lifeibiren@gmail.com>
Date: Fri, 17 Jul 2020 02:18:37 +0800
Subject: [PATCH] Fix buffer overflow when PAC is enabled
The bug was found on Windows 10 (MINGW64) when PAC is enabled. It turned
out to be the large PAC file (more than 102400 bytes) returned by a
local proxy program with no content-length present.
---
libproxy/url.cpp | 44 +++++++++++++++++++++++++++++++-------------
1 file changed, 31 insertions(+), 13 deletions(-)
diff --git a/libproxy/url.cpp b/libproxy/url.cpp
index ee776b2..8684086 100644
--- a/libproxy/url.cpp
+++ b/libproxy/url.cpp
@@ -54,7 +54,7 @@ using namespace std;
#define PAC_MIME_TYPE_FB "text/plain"
// This is the maximum pac size (to avoid memory attacks)
-#define PAC_MAX_SIZE 102400
+#define PAC_MAX_SIZE 0x800000
// This is the default block size to use when receiving via HTTP
#define PAC_HTTP_BLOCK_SIZE 512
@@ -478,15 +478,13 @@ char* url::get_pac() {
}
// Get content
- unsigned int recvd = 0;
- buffer = new char[PAC_MAX_SIZE];
- memset(buffer, 0, PAC_MAX_SIZE);
+ std::vector<char> dynamic_buffer;
do {
unsigned int chunk_length;
if (chunked) {
// Discard the empty line if we received a previous chunk
- if (recvd > 0) recvline(sock);
+ if (!dynamic_buffer.empty()) recvline(sock);
// Get the chunk-length line as an integer
if (sscanf(recvline(sock).c_str(), "%x", &chunk_length) != 1 || chunk_length == 0) break;
@@ -498,21 +496,41 @@ char* url::get_pac() {
if (content_length >= PAC_MAX_SIZE) break;
- while (content_length == 0 || recvd != content_length) {
- int r = recv(sock, buffer + recvd,
- content_length == 0 ? PAC_HTTP_BLOCK_SIZE
- : content_length - recvd, 0);
+ while (content_length == 0 || dynamic_buffer.size() != content_length) {
+ // Calculate length to recv
+ unsigned int length_to_read = PAC_HTTP_BLOCK_SIZE;
+ if (content_length > 0)
+ length_to_read = content_length - dynamic_buffer.size();
+
+ // Prepare buffer
+ dynamic_buffer.resize(dynamic_buffer.size() + length_to_read);
+
+ int r = recv(sock, dynamic_buffer.data() + dynamic_buffer.size() - length_to_read, length_to_read, 0);
+
+ // Shrink buffer to fit
+ if (r >= 0)
+ dynamic_buffer.resize(dynamic_buffer.size() - length_to_read + r);
+
+ // PAC size too large, discard
+ if (dynamic_buffer.size() >= PAC_MAX_SIZE) {
+ chunked = false;
+ dynamic_buffer.clear();
+ break;
+ }
+
if (r <= 0) {
chunked = false;
break;
}
- recvd += r;
}
} while (chunked);
- if (content_length != 0 && string(buffer).size() != content_length) {
- delete[] buffer;
- buffer = NULL;
+ if (content_length == 0 || content_length == dynamic_buffer.size()) {
+ buffer = new char[dynamic_buffer.size() + 1];
+ if (!dynamic_buffer.empty()) {
+ memcpy(buffer, dynamic_buffer.data(), dynamic_buffer.size());
+ }
+ buffer[dynamic_buffer.size()] = '\0';
}
}

View File

@ -0,0 +1,38 @@
From 738785214546ec5bb772886019529b2a6519deaf Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Fri, 1 May 2020 19:04:22 +0100
Subject: [PATCH] mozjs: Avoid use-after-free
If we don't assign the temporary std::string returned by
url_.to_string() to a variable, then it immediately goes out of scope
and is freed, resulting in the result of c_str() pointing into freed
memory. This works about as well as you would expect.
Signed-off-by: Simon McVittie <smcv@debian.org>
---
libproxy/modules/pacrunner_mozjs.cpp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
index ade6d0a..aac6531 100644
--- a/libproxy/modules/pacrunner_mozjs.cpp
+++ b/libproxy/modules/pacrunner_mozjs.cpp
@@ -175,14 +175,11 @@ class mozjs_pacrunner : public pacrunner {
string run(const url& url_) throw (bad_alloc) {
// Build arguments to the FindProxyForURL() function
- const char *tmpurl = url_.to_string().c_str();
- const char *tmphost = url_.get_host().c_str();
- if (!tmpurl || !tmphost) {
- throw bad_alloc();
- }
+ string tmpurl(url_.to_string());
+ string tmphost(url_.get_host());
JS::AutoValueArray<2> args(this->jsctx);
- args[0].setString(JS_NewStringCopyZ(this->jsctx, tmpurl));
- args[1].setString(JS_NewStringCopyZ(this->jsctx, tmphost));
+ args[0].setString(JS_NewStringCopyZ(this->jsctx, tmpurl.c_str()));
+ args[1].setString(JS_NewStringCopyZ(this->jsctx, tmphost.c_str()));
// Find the proxy (call FindProxyForURL())
JS::RootedValue rval(this->jsctx);

View File

@ -0,0 +1,124 @@
From f594720280b2e40d81fa6e286a0ef8868687ef7e Mon Sep 17 00:00:00 2001
From: Pierre Lejeune <superheron@gmail.com>
Date: Sat, 30 Jun 2018 21:10:06 +0200
Subject: [PATCH] Build with mozjs-52
Fixes #71
---
libproxy/cmake/modules/pacrunner_mozjs.cmk | 2 +-
libproxy/modules/pacrunner_mozjs.cpp | 19 +++++++------------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
index c2ae3db..20857fb 100644
--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
+++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
@@ -9,7 +9,7 @@ if(WIN32)
elseif(NOT APPLE)
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
- pkg_search_module(MOZJS mozjs-38)
+ pkg_search_module(MOZJS mozjs-52)
if(MOZJS_FOUND)
include_directories(${MOZJS_INCLUDE_DIRS})
link_directories(${MOZJS_LIBRARY_DIRS})
diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
index a70b2e9..ed07c69 100644
--- a/libproxy/modules/pacrunner_mozjs.cpp
+++ b/libproxy/modules/pacrunner_mozjs.cpp
@@ -35,6 +35,7 @@ using namespace libproxy;
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#include <jsapi.h>
#pragma GCC diagnostic error "-Winvalid-offsetof"
+#include <js/Initialization.h>
#include <js/CallArgs.h>
#include "pacutils.h"
@@ -111,17 +112,14 @@ class mozjs_pacrunner : public pacrunner {
mozjs_pacrunner(string pac, const url& pacurl) throw (bad_alloc) : pacrunner(pac, pacurl) {
// Set defaults
- this->jsrun = nullptr;
this->jsctx = nullptr;
JS_Init();
- // Initialize Javascript runtime environment
- if (!(this->jsrun = JS_NewRuntime(1024 * 1024))) goto error;
- if (!(this->jsctx = JS_NewContext(this->jsrun, 1024 * 1024))) goto error;
+ // Initialize Javascript context
+ if (!(this->jsctx = JS_NewContext(1024 * 1024))) goto error;
{
JS::RootedValue rval(this->jsctx);
JS::CompartmentOptions compart_opts;
- compart_opts.setVersion(JSVERSION_LATEST);
this->jsglb = new JS::Heap<JSObject*>(JS_NewGlobalObject(
this->jsctx, &cls,
@@ -139,16 +137,15 @@ class mozjs_pacrunner : public pacrunner {
JS::CompileOptions options(this->jsctx);
options.setUTF8(true);
- JS::Evaluate(this->jsctx, global, options, JAVASCRIPT_ROUTINES,
- strlen(JAVASCRIPT_ROUTINES), &rval);
+ JS::Evaluate(this->jsctx, options, JAVASCRIPT_ROUTINES,
+ strlen(JAVASCRIPT_ROUTINES), JS::MutableHandleValue(&rval));
// Add PAC to the environment
- JS::Evaluate(this->jsctx, global, options, pac.c_str(), pac.length(), &rval);
+ JS::Evaluate(this->jsctx, options, pac.c_str(), pac.length(), JS::MutableHandleValue(&rval));
return;
}
error:
if (this->jsctx) JS_DestroyContext(this->jsctx);
- if (this->jsrun) JS_DestroyRuntime(this->jsrun);
throw bad_alloc();
}
@@ -156,7 +153,6 @@ class mozjs_pacrunner : public pacrunner {
if (this->jsac) delete this->jsac;
if (this->jsglb) delete this->jsglb;
if (this->jsctx) JS_DestroyContext(this->jsctx);
- if (this->jsrun) JS_DestroyRuntime(this->jsrun);
JS_ShutDown();
}
@@ -178,7 +174,7 @@ class mozjs_pacrunner : public pacrunner {
JS::RootedObject global(this->jsctx,this->jsglb->get());
bool result = JS_CallFunctionName(this->jsctx, global, "FindProxyForURL", args, &rval);
if (!result) return "";
-
+
char * tmpanswer = JS_EncodeString(this->jsctx, rval.toString());
string answer = string(tmpanswer);
JS_free(this->jsctx, tmpanswer);
@@ -188,7 +184,6 @@ class mozjs_pacrunner : public pacrunner {
}
private:
- JSRuntime *jsrun;
JSContext *jsctx;
JS::Heap<JSObject*> *jsglb;
JSAutoCompartment *jsac;
From a9b052c6e30101fb0b702917f245a3e2a2f08366 Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bigon@bigon.be>
Date: Tue, 2 Oct 2018 10:22:56 +0200
Subject: [PATCH] Add call to JS::InitSelfHostedCode()
This is needed otherwise mozjs crashes
---
libproxy/modules/pacrunner_mozjs.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
index ed07c69..38e7d46 100644
--- a/libproxy/modules/pacrunner_mozjs.cpp
+++ b/libproxy/modules/pacrunner_mozjs.cpp
@@ -118,6 +118,8 @@ class mozjs_pacrunner : public pacrunner {
// Initialize Javascript context
if (!(this->jsctx = JS_NewContext(1024 * 1024))) goto error;
{
+ if (!JS::InitSelfHostedCode(this->jsctx)) goto error;
+
JS::RootedValue rval(this->jsctx);
JS::CompartmentOptions compart_opts;

View File

@ -0,0 +1,23 @@
From 1600c6af7ed775d4ccbb239937acd92ef7162409 Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bigon@bigon.be>
Date: Sun, 9 Dec 2018 16:07:55 +0100
Subject: [PATCH] Build with mozjs 60 instead
This seems enough to make it work with mozjs 60
---
libproxy/cmake/modules/pacrunner_mozjs.cmk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
index 20857fb..871cc85 100644
--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
+++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
@@ -9,7 +9,7 @@ if(WIN32)
elseif(NOT APPLE)
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
- pkg_search_module(MOZJS mozjs-52)
+ pkg_search_module(MOZJS mozjs-60)
if(MOZJS_FOUND)
include_directories(${MOZJS_INCLUDE_DIRS})
link_directories(${MOZJS_LIBRARY_DIRS})

View File

@ -0,0 +1,180 @@
From 6c9e48accddb90eef8412bef3ccc29594935d3b3 Mon Sep 17 00:00:00 2001
From: Iain Lane <iain@orangesquash.org.uk>
Date: Wed, 11 Mar 2020 11:54:52 +0000
Subject: [PATCH] mozjs: Port to mozjs 68
There are a number of API changes that need to be adapted to, notably
- JS_EncodeString is gone; need to use JS_EncodeStringToUTF8 now which
requires a rooted object to be passed in.
- JS_free is gone
The pkg-config file ships some flags which need to be supplied to the
build.
---
libproxy/cmake/modules/pacrunner_mozjs.cmk | 6 ++-
libproxy/modules/pacrunner_mozjs.cpp | 56 ++++++++++++++--------
2 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
index 871cc85..2cc3c51 100644
--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
+++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
@@ -9,8 +9,12 @@ if(WIN32)
elseif(NOT APPLE)
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
- pkg_search_module(MOZJS mozjs-60)
+ pkg_search_module(MOZJS mozjs-68)
if(MOZJS_FOUND)
+ foreach(OPT ${MOZJS_CFLAGS})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPT}")
+ endforeach()
+ message("mozjs is " ${CMAKE_CXX_FLAGS})
include_directories(${MOZJS_INCLUDE_DIRS})
link_directories(${MOZJS_LIBRARY_DIRS})
else()
diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
index 38e7d46..37e1b42 100644
--- a/libproxy/modules/pacrunner_mozjs.cpp
+++ b/libproxy/modules/pacrunner_mozjs.cpp
@@ -37,6 +37,9 @@ using namespace libproxy;
#pragma GCC diagnostic error "-Winvalid-offsetof"
#include <js/Initialization.h>
#include <js/CallArgs.h>
+#include <js/CompilationAndEvaluation.h>
+#include <js/MemoryFunctions.h>
+#include <js/SourceText.h>
#include "pacutils.h"
@@ -49,19 +52,21 @@ using namespace libproxy;
#endif
static void dnsResolve_(JSContext *cx, JSString *hostname, JS::CallArgs *argv) {
+ char *tmp;
// Get hostname argument
- char *tmp = JS_EncodeString(cx, hostname);
+ JS::RootedString str(cx, hostname);
+ JS::UniqueChars chars = JS_EncodeStringToUTF8(cx, str);
+ const char *val = chars.get();
// Set the default return value
argv->rval().setNull();
// Look it up
struct addrinfo *info = nullptr;
- if (getaddrinfo(tmp, NULL, NULL, &info))
+ if (getaddrinfo(val, NULL, NULL, &info))
goto out;
// Allocate the IP address
- JS_free(cx, tmp);
tmp = (char *) JS_malloc(cx, INET6_ADDRSTRLEN+1);
memset(tmp, 0, INET6_ADDRSTRLEN+1);
@@ -77,7 +82,6 @@ static void dnsResolve_(JSContext *cx, JSString *hostname, JS::CallArgs *argv) {
out:
if (info) freeaddrinfo(info);
- JS_free(cx, tmp);
}
static bool dnsResolve(JSContext *cx, unsigned argc, JS::Value *vp) {
@@ -121,29 +125,40 @@ class mozjs_pacrunner : public pacrunner {
if (!JS::InitSelfHostedCode(this->jsctx)) goto error;
JS::RootedValue rval(this->jsctx);
- JS::CompartmentOptions compart_opts;
+ JS::RealmOptions realm_opts;
this->jsglb = new JS::Heap<JSObject*>(JS_NewGlobalObject(
this->jsctx, &cls,
nullptr, JS::DontFireOnNewGlobalHook,
- compart_opts));
+ realm_opts));
if (!(this->jsglb)) goto error;
JS::RootedObject global(this->jsctx,this->jsglb->get());
- if (!(this->jsac = new JSAutoCompartment(this->jsctx, global))) goto error;
- if (!JS_InitStandardClasses(this->jsctx, global)) goto error;
+ if (!(this->jsar = new JSAutoRealm(this->jsctx, global))) goto error;
// Define Javascript functions
JS_DefineFunction(this->jsctx, global, "dnsResolve", dnsResolve, 1, 0);
JS_DefineFunction(this->jsctx, global, "myIpAddress", myIpAddress, 0, 0);
JS::CompileOptions options(this->jsctx);
- options.setUTF8(true);
- JS::Evaluate(this->jsctx, options, JAVASCRIPT_ROUTINES,
- strlen(JAVASCRIPT_ROUTINES), JS::MutableHandleValue(&rval));
+ JS::SourceText<mozilla::Utf8Unit> routines, pac_source;
+ if (!routines.init(this->jsctx,
+ JAVASCRIPT_ROUTINES,
+ strlen(JAVASCRIPT_ROUTINES),
+ JS::SourceOwnership::Borrowed))
+ goto error;
+
+ if (!pac_source.init(this->jsctx,
+ pac.c_str(),
+ pac.length(),
+ JS::SourceOwnership::Borrowed))
+ goto error;
+
+
+ JS::Evaluate(this->jsctx, options, routines, JS::MutableHandleValue(&rval));
// Add PAC to the environment
- JS::Evaluate(this->jsctx, options, pac.c_str(), pac.length(), JS::MutableHandleValue(&rval));
+ JS::Evaluate(this->jsctx, options, pac_source, JS::MutableHandleValue(&rval));
return;
}
error:
@@ -152,7 +167,7 @@ class mozjs_pacrunner : public pacrunner {
}
~mozjs_pacrunner() {
- if (this->jsac) delete this->jsac;
+ if (this->jsar) delete this->jsar;
if (this->jsglb) delete this->jsglb;
if (this->jsctx) JS_DestroyContext(this->jsctx);
JS_ShutDown();
@@ -160,11 +175,9 @@ class mozjs_pacrunner : public pacrunner {
string run(const url& url_) throw (bad_alloc) {
// Build arguments to the FindProxyForURL() function
- char *tmpurl = JS_strdup(this->jsctx, url_.to_string().c_str());
- char *tmphost = JS_strdup(this->jsctx, url_.get_host().c_str());
+ const char *tmpurl = url_.to_string().c_str();
+ const char *tmphost = url_.get_host().c_str();
if (!tmpurl || !tmphost) {
- if (tmpurl) JS_free(this->jsctx, tmpurl);
- if (tmphost) JS_free(this->jsctx, tmphost);
throw bad_alloc();
}
JS::AutoValueArray<2> args(this->jsctx);
@@ -176,10 +189,13 @@ class mozjs_pacrunner : public pacrunner {
JS::RootedObject global(this->jsctx,this->jsglb->get());
bool result = JS_CallFunctionName(this->jsctx, global, "FindProxyForURL", args, &rval);
if (!result) return "";
+ if (!rval.isString())
+ return "";
- char * tmpanswer = JS_EncodeString(this->jsctx, rval.toString());
+ JS::RootedString s(this->jsctx, rval.toString());
+ JS::UniqueChars chars = JS_EncodeStringToUTF8(this->jsctx, s);
+ const char *tmpanswer = chars.get();
string answer = string(tmpanswer);
- JS_free(this->jsctx, tmpanswer);
if (answer == "undefined") return "";
return answer;
@@ -188,7 +204,7 @@ class mozjs_pacrunner : public pacrunner {
private:
JSContext *jsctx;
JS::Heap<JSObject*> *jsglb;
- JSAutoCompartment *jsac;
+ JSAutoRealm *jsar;
};
PX_PACRUNNER_MODULE_EZ(mozjs, "JS_DefineFunction", "mozjs");

View File

@ -0,0 +1,26 @@
From 2d6da65598b90480b4a62c4633eda035ea51681f Mon Sep 17 00:00:00 2001
From: David King <amigadave@amigadave.com>
Date: Wed, 27 Jun 2018 06:36:00 +0100
Subject: [PATCH] python: support Python 3.7 and 3.8
Add 3.7 and 3.8 to the list of accepted Python 3 versions.
---
cmake/FindPython3Interp.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/FindPython3Interp.cmake b/cmake/FindPython3Interp.cmake
index c6cbe3d..8e5e409 100644
--- a/cmake/FindPython3Interp.cmake
+++ b/cmake/FindPython3Interp.cmake
@@ -39,7 +39,7 @@
unset(_Python3_NAMES)
-set(_Python3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_Python3_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(Python3Interp_FIND_VERSION)
if(Python3Interp_FIND_VERSION_COUNT GREATER 1)
--
2.17.1

View File

@ -0,0 +1,26 @@
From 869307ba7547cadef4a131581c3afdcaaec8c576 Mon Sep 17 00:00:00 2001
From: David King <amigadave@amigadave.com>
Date: Thu, 13 Feb 2020 12:24:17 +0000
Subject: [PATCH] python: support Python 3.9
Add 3.9 to the list of accepted Python 3 versions.
---
cmake/FindPython3Interp.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/FindPython3Interp.cmake b/cmake/FindPython3Interp.cmake
index 8e5e409..74398b2 100644
--- a/cmake/FindPython3Interp.cmake
+++ b/cmake/FindPython3Interp.cmake
@@ -39,7 +39,7 @@
unset(_Python3_NAMES)
-set(_Python3_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_Python3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(Python3Interp_FIND_VERSION)
if(Python3Interp_FIND_VERSION_COUNT GREATER 1)
--
2.24.1

530
libproxy.spec Normal file
View File

@ -0,0 +1,530 @@
# When we are bootstrapping, we drop some dependencies.
# Set this to 0 after bootstrapping.
%{!?_with_bootstrap: %global bootstrap 0}
Name: libproxy
Version: 0.4.15
Release: 27%{?dist}
Summary: A library handling all the details of proxy configuration
License: LGPLv2+
URL: https://libproxy.github.io/libproxy/
Source0: https://github.com/libproxy/%{name}/archive/%{version}.tar.gz
# Taken from the Debian package.
Source1: proxy.1
# http://code.google.com/p/libproxy/issues/detail?id=152
Patch0: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch
Patch1: libproxy-0.4.11-crash.patch
Patch2: libproxy-0.4.15-python3738.patch
# https://github.com/libproxy/libproxy/pull/86
# https://github.com/libproxy/libproxy/pull/87
Patch3: libproxy-0.4.15-mozjs52.patch
# https://github.com/libproxy/libproxy/pull/95
Patch4: libproxy-0.4.15-mozjs60.patch
# https://github.com/libproxy/libproxy/pull/106
Patch5: libproxy-0.4.15-python39.patch
# https://github.com/libproxy/libproxy/pull/109
Patch6: libproxy-0.4.15-mozjs68.patch
# https://github.com/libproxy/libproxy/pull/118
Patch7: libproxy-0.4.15-mozjs-use-after-free.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1880350
Patch8: libproxy-0.4.15-fix-CVE-2020-25219.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1883584
Patch9: libproxy-0.4.15-fix-pac-buffer-overflow.patch
BuildRequires: cmake >= 2.6.0
BuildRequires: gcc-c++
BuildRequires: libmodman-devel >= 2.0.1
%if ! 0%{?bootstrap}
# gnome
BuildRequires: pkgconfig(gio-2.0) >= 2.26
# NetworkManager
BuildRequires: pkgconfig(libnm)
# pacrunner (and NetworkManager)
BuildRequires: pkgconfig(dbus-1)
# webkit (gtk3)
BuildRequires: pkgconfig(javascriptcoregtk-4.0)
# kde
BuildRequires: /usr/bin/kreadconfig5
# Python
BuildRequires: python3-devel
%else
# Obsoletes of disabled subpackages.
Provides: %{name}-mozjs = %{version}-%{release}
Obsoletes: %{name}-mozjs < %{version}-%{release}
Provides: %{name}-webkitgtk4 = %{version}-%{release}
Obsoletes: %{name}-webkitgtk4 < %{version}-%{release}
%endif
# The Python 2 subpackage was removed. Remove in F32.
Obsoletes: python2-libproxy < %{version}-%{release}
%description
libproxy offers the following features:
* extremely small core footprint (< 35K)
* no external dependencies within libproxy core
(libproxy plugins may have dependencies)
* only 3 functions in the stable external API
* dynamic adjustment to changing network topology
* a standard way of dealing with proxy settings across all scenarios
* a sublime sense of joy and accomplishment
%package bin
Summary: Binary to test %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description bin
The %{name}-bin package contains the proxy binary for %{name}
%if ! 0%{?bootstrap}
%package -n python3-%{name}
Summary: Binding for %{name} and python3
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name}
The python3 binding for %{name}
%package gnome
Summary: Plugin for %{name} and gnome
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gnome
The %{name}-gnome package contains the %{name} plugin for gnome.
%package kde
Summary: Plugin for %{name} and kde
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: /usr/bin/kreadconfig5
%description kde
The %{name}-kde package contains the %{name} plugin for kde.
%package networkmanager
Summary: Plugin for %{name} and networkmanager
Requires: %{name}%{?_isa} = %{version}-%{release}
%description networkmanager
The %{name}-networkmanager package contains the %{name} plugin
for networkmanager.
%package webkitgtk4
Summary: Plugin for %{name} and webkitgtk3
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-pac = %{version}-%{release}
Obsoletes: %{name}-mozjs <= %{version}-%{release}
%description webkitgtk4
The %{name}-webkitgtk4 package contains the %{name} plugin for
webkitgtk3.
%package pacrunner
Summary: Plugin for %{name} and PacRunner
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-pac = %{version}-%{release}
Requires: pacrunner
%description pacrunner
The %{name}-pacrunner package contains the %{name} plugin for
PacRunner.
%endif
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -p1
%build
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
%{cmake} \
-DMODULE_INSTALL_DIR=%{_libdir}/%{name}/%{version}/modules \
-DBIPR=OFF \
-DWITH_PERL=OFF \
%if ! 0%{?bootstrap}
-DWITH_GNOME3=ON \
-DWITH_PYTHON2=OFF \
-DWITH_PYTHON3=ON \
-DWITH_WEBKIT3=ON \
-DWITH_MOZJS=OFF \
%else
-DWITH_PYTHON2=OFF \
-DWITH_PYTHON3=OFF \
%endif
.
%cmake_build
%install
%cmake_install
#In case all modules are disabled
mkdir -p %{buildroot}%{_libdir}/%{name}/%{version}/modules
# Man page.
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1
%check
%ctest
%ldconfig_scriptlets
%files
%doc AUTHORS README
%license COPYING
%{_libdir}/*.so.*
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{version}
%dir %{_libdir}/%{name}/%{version}/modules
%files bin
%{_bindir}/proxy
%{_mandir}/man1/proxy.1*
%if ! 0%{?bootstrap}
%files -n python3-%{name}
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{name}.*
%files gnome
%{_libdir}/%{name}/%{version}/modules/config_gnome3.so
%{_libexecdir}/pxgsettings
%files kde
%{_libdir}/%{name}/%{version}/modules/config_kde.so
%files networkmanager
%{_libdir}/%{name}/%{version}/modules/network_networkmanager.so
%files webkitgtk4
%{_libdir}/%{name}/%{version}/modules/pacrunner_webkit.so
%files pacrunner
%{_libdir}/%{name}/%{version}/modules/config_pacrunner.so
%endif
%files devel
%{_includedir}/proxy.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%{_datadir}/cmake/Modules/Findlibproxy.cmake
%changelog
* Tue Oct 06 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.4.15-27
- Disable mozjs backend by default, obsolete it by webkit subpackage
* Tue Sep 29 2020 David King <amigadave@amigadave.com> - 0.4.15-26
- Fix PAC buffer overflow (#1883584)
* Fri Sep 18 2020 David King <amigadave@amigadave.com> - 0.4.15-25
- Fix CVE-2020-25219 (#1880350)
* Tue Aug 18 2020 Jeff Law <law@redhat.com> - 0.4.15-24
- Force C++14 as this code is not C++17 ready
* Tue Aug 04 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.4.15-23
- build with mozjs68
- backport use after free fix for mozjs backend
* Tue Aug 04 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.4.15-22
- Fix build by switching to cmake macros instead of make
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-21
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4.15-19
- Rebuilt for Python 3.9
* Thu Feb 13 2020 David King <amigadave@amigadave.com> - 0.4.15-18
- Fix build against Python 3.9 (#1791942)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.15-16
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.15-15
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 08 2019 Kalev Lember <klember@redhat.com> - 0.4.15-13
- Build with mozjs60
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Nov 22 2018 David King <amigadave@amigadave.com> - 0.4.15-11
- Add Obsoletes on old Python 2 subpackage (#1634211)
* Thu Sep 20 2018 David King <amigadave@amigadave.com> - 0.4.15-10
- Remove Python 2 subpackage (#1631331)
* Sun Aug 26 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.4.15-9
- Add patch and build against mozjs 52
* Fri Jul 20 2018 David King <amigadave@amigadave.com> - 0.4.15-8
- Provide direct path to Python 2 (#1604646)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.15-7
- Rebuilt for Python 3.7
* Fri May 04 2018 David King <amigadave@amigadave.com> - 0.4.15-6
- Resurrect an old patch (#1459779)
- Add BuildRequires on gcc-c++
- Switch to %%ldconfig_scriptlets
- Remove obsolete Group tags
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.15-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jul 13 2017 David King <amigadave@amigadave.com> - 0.4.15-2
- Use pkgconfig for BuildRequires
- Fix crash in pacrunner module (#1459779)
* Tue May 16 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.4.15-1
- Update to 0.4.15
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 09 2017 David King <amigadave@amigadave.com> - 0.4.14-1
- Update to 0.4.14
* Sun Jan 01 2017 David King <amigadave@amigadave.com> - 0.4.13-1
- Update to 0.4.13
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4.12-5
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Mon Apr 04 2016 David King <amigadave@amigadave.com> - 0.4.12-3
- Install bindings for both Python 2 and 3 (#1323251)
* Fri Mar 04 2016 David King <amigadave@amigadave.com> - 0.4.12-2
- Fix a Python bindings crash on 64-bit systems (#1296817)
* Mon Feb 29 2016 David King <amigadave@amigadave.com> - 0.4.12-1
- Update to 0.4.12
- Simplify conditional macros
- Use isa macro when requiring base package
- Use license macro for COPYING
- Use pkgconfig for BuildRequires
- Use javascriptcoregtk-4.0
- Apply an upstream patch to pair new[] with delete[]
- Fix slowdown in KDE plugin
- Make the pacrunner subpackage depend on pacrunner (#1171679)
- Install man page from Debian
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.11-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.4.11-11
- Rebuilt for GCC 5 C++11 ABI change
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.11-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.11-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Nov 11 2013 Dan Winship <danw@redhat.com> - 0.4.11-8
- Really fix the JS_AbortIfWrongThread crash (#998232)
* Thu Sep 19 2013 Dan Winship <danw@redhat.com> - 0.4.11-7
- Fix file descriptor leak (#911066)
- Fix crash when pacrunner fails (probably because of EMFILE...) (#998232)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Jul 18 2013 David Woodhouse <David.Woodhouse@intel.com> - 0.4.11-5
- Add PacRunner module now that Fedora has PacRunner
* Mon Jun 03 2013 Colin Walters <walters@redhat.com> - 0.4.11-4
- Add patch to build with mozjs17, use it by default
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jan 3 2013 Dan Winship <danw@redhat.com> - 0.4.11-2
- Minor dependency fixes
* Mon Dec 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 0.4.11-1
- Update to 0.4.11 - CVE-2012-5580
* Tue Oct 16 2012 Nicolas Chauvet <kwizart@gmail.com> - 0.4.10-1
- Update to 0.4.10
- Fix CVE-2012-4504
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Feb 27 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-4
- Add upstream patches to use js rather than xulrunner
- Add patch to fix FTBFS on gcc 4.7
- Cleanup spec for latest updates and remove obsolete bits
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.4.7-2
- Rebuild for new libpng
* Tue Jun 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.4.7-1
- Update to 0.4.7
- libproxy-1.0.pc is now reliable starting with 0.4.7
* Tue Apr 12 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.4.7-0.1svn20110412
- Update to 0.4.7 svn20110412
- Add support for webkitgtk3
- Add support for xulrunner 2.0
- fix #683015 - libproxy fails with autoconfiguration
- fix #683018 - libproxy needs BR: NetworkManager-glib-devel (f14)
- Manually fix libproxy-1.0.pc version field - #664781 / #674854
* Wed Nov 24 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.6-3
- Fix mozjs/webkit obsoletion - rhbz#656849
- Workaround unreliable Version field in pkg-config - rhbz#656484
* Sun Nov 07 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.6-1
- Update to 0.4.6
- Fix python module not arch dependant
* Mon Sep 06 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.5-2
- Update to 0.4.5
- Disable mozjs on fedora >= 15
- Disable webkit
- Add libproxy bootstrap option to disable modules.
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.4.4-7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Tue Jul 13 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.4-6
- Fix libproxy-1.0.pc
* Mon Jul 05 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 0.4.4-5
- Re-enable mozjs and webkit
* Mon Jul 05 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 0.4.4-4
- Disable mozjs to get around a build error temporarily
* Mon Jul 05 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 0.4.4-3
- Disable webkit subpackage in order to resolve circular dep
* Sat Jul 03 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 0.4.4-2
- Fix missing BuildRequires: libmodman-devel
* Sun Jun 13 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 0.4.4-1
- Update to 0.4.4
- Removed install workarounds (fixed upstream)
- Removed patches (fixed upstream)
- Moved -python to noarch
- Downgrade cmake requirement (upstream change)
- Disabled perl bindings
- Run tests
* Thu Mar 11 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.3.1-4
- Add missing libXmu-devel
* Sun Feb 21 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.3.1-4
- Globalism and update gecko to 1.9.2
- Avoid rpath on _libdir
- Fix BR for kde4 to kdelibs-devel
* Sun Dec 27 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.3.1-1
- Update to 0.3.1
- Avoid dependecies on -python and -bin subpackages
- Create -networkmanager sub-package.
* Thu Sep 24 2009 kwizart < kwizart at gmail.com > - 0.3.0-1
- Update to 0.3.0
* Thu Sep 17 2009 kwizart < kwizart at gmail.com > - 0.2.3-12
- Remove Requirement of %%{name}-pac virtual provides
from the main package - #524043
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Mar 9 2009 kwizart < kwizart at gmail.com > - 0.2.3-10
- Rebuild for webkit
- Raise requirement for xulrunner to 1.9.1
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Jan 22 2009 kwizart < kwizart at gmail.com > - 0.2.3-8
- Merge NetworkManager module into the main libproxy package
- Main Requires the -python and -bin subpackage
(splitted for multilibs compliance).
* Fri Oct 24 2008 kwizart < kwizart at gmail.com > - 0.2.3-7
- Disable Gnome/KDE default support via builtin modules.
(it needs to be integrated via Gconf2/neon instead).
* Tue Oct 21 2008 kwizart < kwizart at gmail.com > - 0.2.3-6
- Disable Obsoletes.
- Requires ev instead of evr for optionnals sub-packages.
* Tue Oct 21 2008 kwizart < kwizart at gmail.com > - 0.2.3-5
- Use conditionals build.
* Mon Sep 15 2008 kwizart < kwizart at gmail.com > - 0.2.3-4
- Remove plugin- in the name of the packages
* Mon Aug 4 2008 kwizart < kwizart at gmail.com > - 0.2.3-3
- Move proxy.h to libproxy/proxy.h
This will prevent it to be included in the default include path
- Split main to libs and util and use libproxy to install all
* Mon Aug 4 2008 kwizart < kwizart at gmail.com > - 0.2.3-2
- Rename binding-python to python
- Add Requires: gecko-libs >= %%{gecko_version}
- Fix some descriptions
- Add plugin-webkit package
* Fri Jul 11 2008 kwizart < kwizart at gmail.com > - 0.2.3-1
- Convert to Fedora spec
* Fri Jun 6 2008 - dominique-rpm@leuenberger.net
- Updated to version 0.2.3
* Wed Jun 4 2008 - dominique-rpm@leuenberger.net
- Extended spec file to build all available plugins
* Tue Jun 3 2008 - dominique-rpm@leuenberger.net
- Initial spec file for Version 0.2.2

23
proxy.1 Normal file
View File

@ -0,0 +1,23 @@
.TH PROXY "1" "September 2013" "libproxy" "User Commands"
.SH NAME
proxy \- Display the proxy server that should be used to reach a given a network resource
.SH SYNOPSIS
proxy
.SH DESCRIPTION
Display the proxy server that should be used to reach a given a network resource.
.PP
libproxy is a library that provides automatic proxy configuration management
using different backends.
.SH EXAMPLE
.B echo http://www.example.com/ | proxy
http://webcache:3128 direct://
.SH AUTHOR
This manual page was written by
.MT bigon@debian.org
Laurent Bigonville
.ME ,
for the Debian GNU/Linux system (but may be used by others).
.SH SEE ALSO
.UR http://code.google.com/p/libproxy/
libproxy
.UE .

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (0.4.15.tar.gz) = 8f68bd56e44aeb3f553f4657bef82a5d14302780508dafa32454d6f724b724c884ceed6042f8df53a081d26ea0b05598cf35eab44823257c47c5ef8afb36442b