upgrades: Don't ship apt backport preferences file

- Don't ship the file preferences file as this is a violation of the Debian
policy. Lintian throws a hard error that can't be overridden. Remove the lintian
override. Remove this file using maintainer scripts when upgrading from all
version below 20.5.

- The preferences file is now renamed to 50freedombox4.pref.

- Instead write the file when the app is getting setup (on each new version).

- Don't run the setup code on daily timer, instead run the code when the app
upgrades. This ensures that as soon as freedombox package is upgraded and run,
the new preferences file is created instead of waiting for the daily timer to
run.

- From now on when the preferences change, we will increment the version number
of the upgrades app. Change the setup() for the app so that it does not
re-enable automatic upgrades every time setup() is run.

Closes: #1673.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2020-03-20 13:59:58 -04:00
1 parent fcc69bdc06
commit 6179d98a07
6 files changed
+59 -33

No files matched your search

-3
View File
@@ -15,6 +15,3 @@ freedombox binary: non-standard-apache2-configuration-name *
# web servers. At some point we would like to work with other web servers but
# that requires significant effort.
freedombox binary: web-application-should-not-depend-unconditionally-on-apache2
# FreedomBox takes over local administration of a system.
freedombox binary: package-installs-apt-preferences etc/apt/preferences.d/50freedombox3.pref
+1
View File
@@ -9,3 +9,4 @@ rm_conffile /etc/plinth/modules-enabled/disks 0.15.3+ds-1~
rm_conffile /etc/plinth/modules-enabled/udiskie 0.39.0~
rm_conffile /etc/plinth/modules-enabled/restore 20.1~
rm_conffile /etc/plinth/modules-enabled/repro 20.1~
rm_conffile /etc/apt/preferences.d/50freedombox3.pref 20.5~
+4
View File
@@ -25,6 +25,10 @@ purge)
if [ -e '/etc/apt/preferences.d/50freedombox2.pref' ]; then
rm -f /etc/apt/preferences.d/50freedombox2.pref
fi
if [ -e '/etc/apt/preferences.d/50freedombox4.pref' ]; then
rm -f /etc/apt/preferences.d/50freedombox4.pref
fi
;;
esac