From: Eric Fahlgren Date: Wed, 15 Apr 2026 01:50:37 +0000 (-0700) Subject: base-files: sysupgrade: exclude apk files from backup X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=038bc85849e2ee4f3f949cbd192159211822c2bc;p=thirdparty%2Fopenwrt.git base-files: sysupgrade: exclude apk files from backup Exclude more apk related files from the sysupgrade backup list when using the various options that scan /etc for changes. Ensure removal of the system generated distfeeds list, as that contains kernel- and version-specific urls and should never be retained. Also exclude any '*.apk-new' files, equivalent to the old '*-opkg' files, which may have been created during package installation. Example before $ sysupgrade -l -c | grep apk /etc/apk/keys/buildroot.pem /etc/apk/repositories.d/customfeeds.list /etc/apk/repositories.d/distfeeds.list /etc/owut.d/pre-install.sh.apk-new /etc/config/adblock.apk-new After $ sysupgrade -l -c | grep apk /etc/apk/keys/buildroot.pem /etc/apk/repositories.d/customfeeds.list Signed-off-by: Eric Fahlgren Link: https://github.com/openwrt/openwrt/pull/22937 Signed-off-by: Robert Marko --- diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 12575e0b1fa..68ab9c63b3f 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -224,8 +224,10 @@ build_list_of_backup_overlay_files() { -e '\,^/etc/board.json$,d' \ -e '\,^/etc/luci-uploads/\.placeholder,d' \ -e '\,/[^/]*-opkg$,d' \ + -e '\,/[^/]*\.apk-new$,d' \ -e '\,^/etc/urandom.seed$,d' \ -e '\,^/etc/apk/world$,d' \ + -e '\,^/etc/apk/repositories\.d/distfeeds\.list$,d' \ -e "\,^$INSTALLED_PACKAGES$,d" \ -e '\,^/usr/lib/opkg/.*,d' \ -e '\,^/lib/apk/.*,d' \