aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-18 10:50:15 -0300
committerRenato Botelho <renato@netgate.com>2015-09-18 10:50:15 -0300
commit28909627356ebbd5930939f08450b8315313885f (patch)
treef15fcc4a81bfebd430f980e4772ab5a4acdbf24b
parent1233f9e1e4f35c0034352a148715ffd15387f760 (diff)
downloadpfsense-packages-28909627356ebbd5930939f08450b8315313885f.tar.gz
pfsense-packages-28909627356ebbd5930939f08450b8315313885f.tar.bz2
pfsense-packages-28909627356ebbd5930939f08450b8315313885f.zip
Fixes #5000:
- Detect new pfSense repo structure, where files that were present on / in the past now lie in /src, and automatically set pathstrip to 2 - Bump package version to 1.0.6
-rw-r--r--config/systempatches/patches.inc6
-rw-r--r--config/systempatches/systempatches.xml2
-rw-r--r--pkg_config.10.xml2
3 files changed, 8 insertions, 2 deletions
diff --git a/config/systempatches/patches.inc b/config/systempatches/patches.inc
index 0aa37fb8..2298e170 100644
--- a/config/systempatches/patches.inc
+++ b/config/systempatches/patches.inc
@@ -94,6 +94,12 @@ function patch_fetch(& $patch) {
return false;
} else {
$patch['patch'] = base64_encode($text);
+ // Detect pfSense move from / to /src and fix pathstrip
+ if (is_github_url($patch['location']) &&
+ $patch['pathstrip'] == 1 &&
+ preg_match('/\n--- a\/src\//', $text)) {
+ $patch['pathstrip'] = 2;
+ }
write_config("Fetched patch {$patch['descr']}");
return true;
}
diff --git a/config/systempatches/systempatches.xml b/config/systempatches/systempatches.xml
index 06f024a8..61f3df84 100644
--- a/config/systempatches/systempatches.xml
+++ b/config/systempatches/systempatches.xml
@@ -43,7 +43,7 @@
</copyright>
<description>System Patches applies patches supplied by the user to the firewall.</description>
<name>System Patches</name>
- <version>1.0.5</version>
+ <version>1.0.6</version>
<title>System: Patches</title>
<include_file>/usr/local/pkg/patches.inc</include_file>
<menu>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index bf6a4a44..cc48c7ac 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1383,7 +1383,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.5</version>
+ <version>1.0.6</version>
<category>System</category>
<status>RELEASE</status>
<config_file>https://packages.pfsense.org/packages/config/systempatches/systempatches.xml</config_file>