Actions
Bug #4369
closed
patch fetching doesn't work if pfsense is behind proxy
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
System Patches
Target version:
-
Start date:
02/03/2015
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:
Description
Hello,
while i was testing a patch (Bug #4238) i noted that the fetch doesn't work.
Issuing a packet caputure while fetching the patch url i noted that pfsense is trying to connect to the github site directly instead using the configured proxy.
Regards
Updated by Jim Pingle over 10 years ago
- Project changed from pfSense to pfSense Packages
- Category deleted (
Unknown) - Target version deleted (
2.2.1) - Affected Version deleted (
2.2)
Updated by Kill Bill almost 10 years ago
You can use this on pfSense 2.2 and newer:
--- a/usr/local/pkg/patches.inc 2015-11-07 01:54:53.289589099 +0100 +++ b/usr/local/pkg/patches.inc 2015-11-12 17:18:47.479996587 +0100 @@ -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,12 @@ /* 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"); + download_file($url, $temp_filename); + $text = @file_get_contents($temp_filename); + unlink($temp_filename); if (empty($text)) { return false; } else {
Updated by Kill Bill almost 10 years ago
https://github.com/pfsense/pfsense-packages/pull/1156 should work with 2.1.x as well.
Updated by Chris Buechler almost 10 years ago
- Category set to System Patches
- Status changed from New to Resolved
thanks
Updated by Kill Bill almost 10 years ago
It'd help if you actually updated the System Patches package... This has nothing to do with pfSense version.
Actions