How to preserve installed packages during upgrade?

I'm on hnyman's r7800 19.07 build, how do I preserve my additional packages during each upgrade to the latest version? I'm looking to keep a few apps from being removed each time. How can I do this for luci-app-https-dns-proxy including the settings?

I don't think that is possible. I keep a text file with the packages I add as well as a manual backup of any config file. Someone can correct me if I am mistaken. In my case, crude notes:

opkg update
opkg install kmod-usb-storage kmod-fs-f2fs block-mount rsyncd luci-app-sqm

## for dnssec
opkg install dnsmasq-full --download-only
opkg remove dnsmasq odhcpd-ipv6only 
opkg install dnsmasq-full --cache .
rm *.ipk

## edit /etc/config/dhcp and under the config dnsmasq section, added:
option dnssec '1'
option dnsseccheckunsigned '1'

reboot

cp rsyncd.secrets /etc
/etc/init.d/rsyncd restart

cd /www
ln -s /mnt/sda1/web/ repo

cd /root
ln -s /mnt/sda1/dotprofile .profile
ln -s /mnt/sda1/dotvimrc .vimrc
ln -s /mnt/sda1/inputrc .inputrc
ln -s /mnt/sda1/bin bin
1 Like

There is a way for opkg to show what packages have been installed after the firmware itself was flashed (check opkg itself). You can save that list and read it in after upgrade to reinstall all those.

@darksky If you'd like to script all that, you can use uci set to add the DNSSEC bits. The exact settings can be found by grepping uci show output.

(As for linking, you can link using absolute paths I think, which would save you the cd as well, and loop over the last batch of links for further optimisation).

From my own experience I say the easiest way is to use Image Builder, ie. you build an image for both your device and application of the device. See documentation: https://openwrt.org/start?id=docs/guide-user/additional-software/imagebuilder.

However there is a catch. I can't say, how the Image Builder can be used with binaries built by hnyman. A hint to try: In the image builder root folder in file ./repositories.conf one can set repositories to fetch binaries from different sources than OpenWRT's repositories. If hnyman has published usable repositories for the Image Builder to fetch binaries he has built, then the Image Builder may be the solution.

By saving the command line to a file to recreate the image and possibly all the further steps to final upgrade the Image Builder is a life saver.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.