waaren wrote: ↑Monday 09 March 2020 1:04Best is to share your contribution first here so we can have a look and comment.
Okay, it is all related to Debian/Raspbian.
On thing is the APT lists location:
Code: Select all
88 PKG_CACHE="/var/lib/apt/lists/"
While this is the default, it can be different and if this is already used and it's non-existence breaks the install, it should be checked in a failsafe way:
Code: Select all
PKG_CACHE=$(apt-config --format '%v' dump 'Dir::State::lists')
[[ $PKG_CACHE == '/'* ]] || PKG_CACHE="$(apt-config --format '%v%n' dump 'Dir::State' | sed -n 1p)/$PKG_CACHE"
[[ $PKG_CACHE == '/'* ]] || PKG_CACHE="$(apt-config --format '%v%n' dump 'Dir' | sed -n 1p)/$PKG_CACHE"
PKG_CACHE=${PKG_CACHE//\/\//\/}
Could be probably done more beautiful, especially double slash prevention, but at least this will work reliable
.
The paths can be absolute or relative (without leading slash), in which case the parent path is used. Also note that the "cache" directory is a different one, where
pkgcache.bin and
srcpkgcache.bin are stored instead, while here the storage for original lists files is wanted.
Another thing is that at least when using HTTPS with the current pre-build downloads and installer,
libssl1.0.0 is required, but it is not available anymore on Debian since Stretch:
https://packages.debian.org/libssl1.0.0
It is possible to pull the package manually from the older repo or of course build it oneself, but it would be anyway good to use up-to-date libraries. Either a fresh
libssl1.1 could be done, officially dropping oldoldstable Debian Jessie support, or at least the installer should check for this library or only Debian version and print a warning in case that
libssl1.0.0 is required.
While there is already a systemd unit example present as preferred in the
wiki, the installer still only installs a sysvinit service. Would be great to have either both or a choice or an automated choice based on
[[ -d '/run/systemd/system' ]].
And yeah, I see little inconsistencies in bash coding, sometimes single square brackets, sometimes double square brackets, quotation where not required or double quotes where single quotes would be better, but this finally is a matter of taste and personal coding style as well since it does not particularly cause issues.