Add support for CLI PPA (#3605)

* Cleanup PPA related in desktop / deboostrap

* Add Nala, a front-end for apt

Bullseye, Sid, Focal, Jammy

* Reduce duplication

* Remove duplicate message
This commit is contained in:
Igor Pečovnik 2022-04-01 19:45:43 +02:00 committed by GitHub
parent 68999dba79
commit 28d5c93bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 17 additions and 17 deletions

View File

@ -7,6 +7,7 @@ dialog
fake-hwclock
figlet
fping
nala
ncurses-term
nocache
openssh-server

Binary file not shown.

View File

@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/nala.gpg] http://deb.volian.org/volian/ scar main

View File

@ -8,6 +8,7 @@ fake-hwclock
figlet
fping
ncurses-term
nala
nocache
openssh-server
parted

Binary file not shown.

View File

@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/nala.gpg] http://deb.volian.org/volian/ scar main

View File

@ -0,0 +1 @@
../../focal/main/sources

View File

@ -7,6 +7,7 @@ dialog
fake-hwclock
figlet
fping
nala
ncurses-term
nocache
openssh-server

View File

@ -0,0 +1 @@
../../../../bullseye/main/sources/apt/nala.gpg

View File

@ -0,0 +1 @@
../../../../bullseye/main/sources/apt/nala.source

View File

@ -275,6 +275,9 @@ create_rootfs_cache()
# this should fix resolvconf installation failure in some cases
chroot $SDCARD /bin/bash -c 'echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections'
# TODO change name of the function from "desktop" and move to appropriate location
add_desktop_package_sources
# stage: update packages list
display_alert "Updating package list" "$RELEASE" "info"
eval 'LC_ALL=C LANG=C chroot $SDCARD /bin/bash -e -c "apt-get -q -y $apt_extra update"' \
@ -292,12 +295,6 @@ create_rootfs_cache()
${OUTPUT_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Upgrading base packages..." $TTY_Y $TTY_X'} \
${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'} ';EVALPIPE=(${PIPESTATUS[@]})'
# Myy: Dividing the desktop packages installation steps into multiple
# ones. We first install the "ADDITIONAL_PACKAGES" in order to get
# access to software-common-properties installation.
# THEN we add the APT sources and install the Desktop packages.
# TODO : Find a way to add APT sources WITHOUT software-common-properties
[[ ${EVALPIPE[0]} -ne 0 ]] && display_alert "Upgrading base packages" "failed" "wrn"
# stage: install additional packages
@ -311,12 +308,6 @@ create_rootfs_cache()
[[ ${EVALPIPE[0]} -ne 0 ]] && exit_with_error "Installation of Armbian main packages for ${BRANCH} ${BOARD} ${RELEASE} ${DESKTOP_APPGROUPS_SELECTED} ${DESKTOP_ENVIRONMENT} ${BUILD_MINIMAL} failed"
if [[ $BUILD_DESKTOP == "yes" ]]; then
# FIXME Myy : Are we keeping this only for Desktop users,
# or should we extend this to CLI users too ?
# There might be some clunky boards that require Debian packages from
# specific repos...
display_alert "Adding apt sources for Desktop packages"
add_desktop_package_sources
local apt_desktop_install_flags=""
if [[ ! -z ${DESKTOP_APT_FLAGS_SELECTED+x} ]]; then

View File

@ -202,7 +202,7 @@ add_apt_sources() {
get_all_potential_paths "${DESKTOP_ENVIRONMENTS_SEARCH_RELATIVE_DIRS}" "." "sources/apt"
get_all_potential_paths "${DESKTOP_APPGROUPS_SEARCH_RELATIVE_DIRS}" "${DESKTOP_APPGROUPS_SELECTED}" "sources/apt"
display_alert "ADDING ADDITIONAL APT SOURCES"
display_alert "Adding additional apt sources"
for apt_sources_dirpath in ${potential_paths}; do
if [[ -d "${apt_sources_dirpath}" ]]; then
@ -218,11 +218,11 @@ add_apt_sources() {
display_alert "Adding APT Source ${new_apt_source}"
if [[ "${new_apt_source}" == ppa* ]] ; then
# ppa with software-common-properties
run_on_sdcard "add-apt-repository -y -n \"${new_apt_source}\""
# add list with apt-add
# -y -> Assumes yes to all queries
# -n -> Do not update package cache after adding
run_on_sdcard "add-apt-repository -y -n \"${new_apt_source}\""
if [[ -f "${apt_source_gpg_filepath}" ]]; then
display_alert "Adding GPG Key ${apt_source_gpg_filepath}"
cp "${apt_source_gpg_filepath}" "${SDCARD}/tmp/${apt_source_gpg_filename}"
@ -230,7 +230,7 @@ add_apt_sources() {
echo "APT Key returned : $?"
fi
else
# copy list if its not ppa
# installation without software-common-properties, sources.list + key.gpg
echo "${new_apt_source}" > "${SDCARD}/etc/apt/sources.list.d/${apt_source_filename}"
if [[ -f "${apt_source_gpg_filepath}" ]]; then
display_alert "Adding GPG Key ${apt_source_gpg_filepath}"
@ -254,8 +254,9 @@ add_desktop_package_sources() {
# Myy : I see Snap and Flatpak coming up in the next releases
# so... let's prepare for that
add_apt_sources
run_on_sdcard "apt -y update" >> "${DEST}"/${LOG_SUBPATH}/install.log
ls -l "${SDCARD}/usr/share/keyrings" >> "${DEST}"/${LOG_SUBPATH}/install.log
ls -l "${SDCARD}/etc/apt/sources.list.d" >> "${DEST}"/${LOG_SUBPATH}/install.log
cat "${SDCARD}/etc/apt/sources.list" >> "${DEST}"/${LOG_SUBPATH}/install.log