[openwrt/openwrt] sdk: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archives

LEDE Commits lede-commits at lists.infradead.org
Fri May 14 13:54:09 PDT 2021


zorun pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/930e9c06216079823b9b047d7643d6da2a916009

commit 930e9c06216079823b9b047d7643d6da2a916009
Author: Sven Roederer <devel-sven at geroedel.de>
AuthorDate: Fri May 7 21:35:21 2021 +0200

    sdk: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archives
    
    Using these config-options to customize the folders used at build-time makes these
    folder settings appear in generated archive. This causes the SDK to be not
    portable, as it's going to use the build-time folders on the new systems.
    The errors vary from passing the build, disk out-of-space to permission denied.
    
    The build-time settings of these folders are passed into the archive via Config.build.
    The expected behavior is that the SDK acts after unpacking like these settings have
    their defaults, using intree folders. So just filter these folders out when running
    convert-config.pl to create Config.build.
    
    This addresses the same issue that's fixed in the previous commit for the imagebuilder.
    
    Signed-off-by: Sven Roederer <devel-sven at geroedel.de>
    (cherry picked from commit 1e4b191ac8901328a726ebdc09ebe35da4363521)
---
 target/sdk/convert-config.pl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/target/sdk/convert-config.pl b/target/sdk/convert-config.pl
index f73744af09..08189df95c 100755
--- a/target/sdk/convert-config.pl
+++ b/target/sdk/convert-config.pl
@@ -9,7 +9,13 @@ while (<>) {
 	chomp;
 	next if /^CONFIG_SIGNED_PACKAGES/;
 
-	if (/^CONFIG_([^=]+)=(.*)$/) {
+	if (/^CONFIG_((BINARY)|(DOWNLOAD))_FOLDER=(.*)$/) {
+		# We don't want to preserve the build setting of
+		# BINARY_FOLDER and DOWNLOAD_FOLDER.
+		$var = "$1_FOLDER";
+		$val = '""';
+		$type = "string";
+	} elsif (/^CONFIG_([^=]+)=(.*)$/) {
 		$var = $1;
 		$val = $2;
 



More information about the lede-commits mailing list