Disable another openwrt mechanism for configuration restore

Submitted by Fabian Blaese on June 15, 2019, 9:31 p.m.

Details

Message ID 20190615213131.2963-1-fabian@blaese.de
State Rejected
Headers show

Commit Message

Fabian Blaese June 15, 2019, 9:31 p.m.
In fff firmware we previously disabled the keep.d mechanism
because all configuration is done via a few files defined
in /etc/sysupgrade.conf

There is another openwrt mechanism however, which backs up
all uci configuration files that have been modified.
With LEDE this mechanism required opkg, which isn't present
in our firmware builds, so this mechanism failed and did not
back up any files.

With newer OpenWRT versions this code section was modified to
run without opkg, therefore it now also works in our builds.

As this is unwanted behaviour and only worked as expected due to
a bug in LEDE, this mechanism is disabled in the build-patch
that also disables the keep.d backups.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
---
 ...1-Disable-openwrt-config-save-mechanisms.patch} | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
 rename build_patches/openwrt/{0001-sysupgrade-no-config-save.patch => 0001-Disable-openwrt-config-save-mechanisms.patch} (63%)

Patch hide | download patch | download mbox

diff --git a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch b/build_patches/openwrt/0001-Disable-openwrt-config-save-mechanisms.patch
similarity index 63%
rename from build_patches/openwrt/0001-sysupgrade-no-config-save.patch
rename to build_patches/openwrt/0001-Disable-openwrt-config-save-mechanisms.patch
index 1ab8987..cd48af7 100644
--- a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
+++ b/build_patches/openwrt/0001-Disable-openwrt-config-save-mechanisms.patch
@@ -1,8 +1,16 @@ 
-From e4ad344db97df356e178963cad6e517e2df92709 Mon Sep 17 00:00:00 2001
+From e728c9c9e594acd7782cd0c242a7d81fd2ae3da5 Mon Sep 17 00:00:00 2001
 From: Tim Niemeyer <tim@tn-x.org>
 Date: Sat, 8 Jul 2017 10:46:59 +0200
-Subject: [PATCH 1/4] sysupgrade no config save
+Subject: [PATCH 1/4] Disable openwrt config save mechanisms
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
+This disables all openwrt config backup mechanisms
+except for files listed in /etc/sysupgrade.conf
+
+[fabian@blaese.de: Also disable changed conffiles mechanism]
+Signed-off-by: Fabian Bläse <fabian@blaese.de>
 ---
  package/base-files/files/sbin/sysupgrade | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21,5 +29,5 @@  index b75bd097f3..ddcfcd74e4 100755
  	  list_changed_conffiles ) | sort -u > "$file"
  	return 0
 -- 
-2.11.0
+2.20.1
 

Comments

Adrian Schmutzler June 15, 2019, 9:39 p.m.
Sehe ich das falsch, oder änderst du hier nichts am Patch-Content?

Unabhängig davon bin ich der Meinung, dass das ganze MIME und Content-Type-Zeugs in nem reinen Patch fehl am Platz ist.

FYI: Bei mir sieht der Patch so aus:

https://github.com/adrianschmutzler/fff-firmware/commit/9ccaed364a6821c79201424ad847f94c3b38d7c7

Grüße

Adrian


> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
> Of Fabian Bläse
> Sent: Samstag, 15. Juni 2019 23:32
> To: franken-dev@freifunk.net
> Subject: [PATCH] Disable another openwrt mechanism for configuration
> restore
> 
> In fff firmware we previously disabled the keep.d mechanism because all
> configuration is done via a few files defined in /etc/sysupgrade.conf
> 
> There is another openwrt mechanism however, which backs up all uci
> configuration files that have been modified.
> With LEDE this mechanism required opkg, which isn't present in our firmware
> builds, so this mechanism failed and did not back up any files.
> 
> With newer OpenWRT versions this code section was modified to run
> without opkg, therefore it now also works in our builds.
> 
> As this is unwanted behaviour and only worked as expected due to a bug in
> LEDE, this mechanism is disabled in the build-patch that also disables the
> keep.d backups.
> 
> Signed-off-by: Fabian Bläse <fabian@blaese.de>
> ---
>  ...1-Disable-openwrt-config-save-mechanisms.patch} | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)  rename
> build_patches/openwrt/{0001-sysupgrade-no-config-save.patch => 0001-
> Disable-openwrt-config-save-mechanisms.patch} (63%)
> 
> diff --git a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
> b/build_patches/openwrt/0001-Disable-openwrt-config-save-
> mechanisms.patch
> similarity index 63%
> rename from build_patches/openwrt/0001-sysupgrade-no-config-
> save.patch
> rename to build_patches/openwrt/0001-Disable-openwrt-config-save-
> mechanisms.patch
> index 1ab8987..cd48af7 100644
> --- a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
> +++ b/build_patches/openwrt/0001-Disable-openwrt-config-save-
> mechanisms.
> +++ patch
> @@ -1,8 +1,16 @@
> -From e4ad344db97df356e178963cad6e517e2df92709 Mon Sep 17 00:00:00
> 2001
> +From e728c9c9e594acd7782cd0c242a7d81fd2ae3da5 Mon Sep 17 00:00:00
> 2001
>  From: Tim Niemeyer <tim@tn-x.org>
>  Date: Sat, 8 Jul 2017 10:46:59 +0200
> -Subject: [PATCH 1/4] sysupgrade no config save
> +Subject: [PATCH 1/4] Disable openwrt config save mechanisms
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> 
> +This disables all openwrt config backup mechanisms except for files
> +listed in /etc/sysupgrade.conf
> +
> +[fabian@blaese.de: Also disable changed conffiles mechanism]
> +Signed-off-by: Fabian Bläse <fabian@blaese.de>
>  ---
>   package/base-files/files/sbin/sysupgrade | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-) @@ -21,5 +29,5 @@ index
> b75bd097f3..ddcfcd74e4 100755
>   	  list_changed_conffiles ) | sort -u > "$file"
>   	return 0
>  --
> -2.11.0
> +2.20.1
> 
> --
> 2.22.0
Fabian Blaese June 15, 2019, 9:47 p.m.
Arg, da is wohl beim commit irgendwas schief gelaufen.. :-(
Die Änderung am Code sieht bei mir ziemlich gleich zu deiner aus.

Da sowieso du das Problem ausfindig gemacht hast.. Magst du einfach deine Version schicken? :-)

Gruß
Fabian

On 15.06.19 23:39, mail@adrianschmutzler.de wrote:
> Sehe ich das falsch, oder änderst du hier nichts am Patch-Content?
> 
> Unabhängig davon bin ich der Meinung, dass das ganze MIME und Content-Type-Zeugs in nem reinen Patch fehl am Platz ist.
> 
> FYI: Bei mir sieht der Patch so aus:
> 
> https://github.com/adrianschmutzler/fff-firmware/commit/9ccaed364a6821c79201424ad847f94c3b38d7c7
> 
> Grüße
> 
> Adrian
> 
> 
>> -----Original Message-----
>> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
>> Of Fabian Bläse
>> Sent: Samstag, 15. Juni 2019 23:32
>> To: franken-dev@freifunk.net
>> Subject: [PATCH] Disable another openwrt mechanism for configuration
>> restore
>>
>> In fff firmware we previously disabled the keep.d mechanism because all
>> configuration is done via a few files defined in /etc/sysupgrade.conf
>>
>> There is another openwrt mechanism however, which backs up all uci
>> configuration files that have been modified.
>> With LEDE this mechanism required opkg, which isn't present in our firmware
>> builds, so this mechanism failed and did not back up any files.
>>
>> With newer OpenWRT versions this code section was modified to run
>> without opkg, therefore it now also works in our builds.
>>
>> As this is unwanted behaviour and only worked as expected due to a bug in
>> LEDE, this mechanism is disabled in the build-patch that also disables the
>> keep.d backups.
>>
>> Signed-off-by: Fabian Bläse <fabian@blaese.de>
>> ---
>>  ...1-Disable-openwrt-config-save-mechanisms.patch} | 14 +++++++++++---
>>  1 file changed, 11 insertions(+), 3 deletions(-)  rename
>> build_patches/openwrt/{0001-sysupgrade-no-config-save.patch => 0001-
>> Disable-openwrt-config-save-mechanisms.patch} (63%)
>>
>> diff --git a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
>> b/build_patches/openwrt/0001-Disable-openwrt-config-save-
>> mechanisms.patch
>> similarity index 63%
>> rename from build_patches/openwrt/0001-sysupgrade-no-config-
>> save.patch
>> rename to build_patches/openwrt/0001-Disable-openwrt-config-save-
>> mechanisms.patch
>> index 1ab8987..cd48af7 100644
>> --- a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
>> +++ b/build_patches/openwrt/0001-Disable-openwrt-config-save-
>> mechanisms.
>> +++ patch
>> @@ -1,8 +1,16 @@
>> -From e4ad344db97df356e178963cad6e517e2df92709 Mon Sep 17 00:00:00
>> 2001
>> +From e728c9c9e594acd7782cd0c242a7d81fd2ae3da5 Mon Sep 17 00:00:00
>> 2001
>>  From: Tim Niemeyer <tim@tn-x.org>
>>  Date: Sat, 8 Jul 2017 10:46:59 +0200
>> -Subject: [PATCH 1/4] sysupgrade no config save
>> +Subject: [PATCH 1/4] Disable openwrt config save mechanisms
>> +MIME-Version: 1.0
>> +Content-Type: text/plain; charset=UTF-8
>> +Content-Transfer-Encoding: 8bit
>>
>> +This disables all openwrt config backup mechanisms except for files
>> +listed in /etc/sysupgrade.conf
>> +
>> +[fabian@blaese.de: Also disable changed conffiles mechanism]
>> +Signed-off-by: Fabian Bläse <fabian@blaese.de>
>>  ---
>>   package/base-files/files/sbin/sysupgrade | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-) @@ -21,5 +29,5 @@ index
>> b75bd097f3..ddcfcd74e4 100755
>>   	  list_changed_conffiles ) | sort -u > "$file"
>>   	return 0
>>  --
>> -2.11.0
>> +2.20.1
>>
>> --
>> 2.22.0