aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-11-14 23:58:14 -0600
committerChris Buechler <cmb@pfsense.org>2015-11-14 23:58:14 -0600
commit8e9c2c3e8a9ffec1ba405810338f36e1d0d9637b (patch)
treea539482962ac263e3fc36a8b2bae01cebbcc82b2
parent679a7ba5a82d9457d8b94eec47d9ff43a7415131 (diff)
parentc4d1b15c9dc1703b332a63443c60a1ba42a4590e (diff)
downloadpfsense-packages-8e9c2c3e8a9ffec1ba405810338f36e1d0d9637b.tar.gz
pfsense-packages-8e9c2c3e8a9ffec1ba405810338f36e1d0d9637b.tar.bz2
pfsense-packages-8e9c2c3e8a9ffec1ba405810338f36e1d0d9637b.zip
Merge pull request #1156 from doktornotor/patch-12
-rw-r--r--config/systempatches/patches.inc15
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml4
-rw-r--r--pkg_config.8.xml.amd644
4 files changed, 19 insertions, 6 deletions
diff --git a/config/systempatches/patches.inc b/config/systempatches/patches.inc
index 2298e170..92825799 100644
--- a/config/systempatches/patches.inc
+++ b/config/systempatches/patches.inc
@@ -29,6 +29,7 @@
*/
require_once("globals.inc");
require_once("util.inc");
+require_once("pfsense-utils.inc");
global $git_root_url, $patch_suffix, $patch_dir, $patch_cmd;
$git_root_url = "https://github.com/pfsense/pfsense/commit/";
@@ -88,8 +89,20 @@ function patch_test_revert($patch, $fulldetail=false) {
/* Fetch a patch from a URL or github */
function patch_fetch(& $patch) {
+ global $g;
$url = patch_fixup_url($patch['location']);
- $text = @file_get_contents($url);
+ $temp_filename = tempnam("{$g['tmp_path']}/", "system_patches");
+ /*
+ * Backwards compatibility with older 2.1.x pfSense versions
+ * that did not contain download_file() function in pfsense-utils.inc
+ */
+ if (!function_exists("download_file")) {
+ download_file_with_progress_bar($url, $temp_filename);
+ } else {
+ download_file($url, $temp_filename);
+ }
+ $text = @file_get_contents($temp_filename);
+ unlink($temp_filename);
if (empty($text)) {
return false;
} else {
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 5dae028d..1ad74e80 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1436,7 +1436,7 @@
<internal_name>System_Patches</internal_name>
<descr>A package to apply and maintain custom system patches.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.0.6</version>
+ <version>1.0.7</version>
<category>System</category>
<status>RELEASE</status>
<config_file>https://packages.pfsense.org/packages/config/systempatches/systempatches.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index f683c27f..cc1ece85 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1525,12 +1525,12 @@
<name>System Patches</name>
<descr>A package to apply and maintain custom system patches.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.0.3</version>
+ <version>1.0.7</version>
<category>System</category>
<status>RELEASE</status>
<config_file>https://packages.pfsense.org/packages/config/systempatches/systempatches.xml</config_file>
<pkginfolink></pkginfolink>
- <required_version>2.0</required_version>
+ <required_version>2.1</required_version>
<configurationfile>systempatches.xml</configurationfile>
</package>
<package>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 9658b52f..d99edb50 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1512,12 +1512,12 @@
<name>System Patches</name>
<descr>A package to apply and maintain custom system patches.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.0.3</version>
+ <version>1.0.7</version>
<category>System</category>
<status>RELEASE</status>
<config_file>https://packages.pfsense.org/packages/config/systempatches/systempatches.xml</config_file>
<pkginfolink></pkginfolink>
- <required_version>2.0</required_version>
+ <required_version>2.1</required_version>
<configurationfile>systempatches.xml</configurationfile>
</package>
<package>