armbian-next: add Debian Ports keyring hostdep to strap Debian riscv64 from ports

- rpardini: actually use ports keyring for Debian Risc-V
- `risc-v`: correctly include `debian-ports-archive-keyring` in Risc-V CLI packages
  - include in debootstrap list, via `config/optional/architectures/riscv64/_config/cli/_all_distributions/main/packages`
  - can't have two `--include` in debootstrap call
- riscv64: move `debian-ports-archive-keyring` from main to debootstrap; also only for `sid`
This commit is contained in:
Ricardo Pardini
2023-01-27 17:42:21 +01:00
parent d8016c49b6
commit 2c9582f9ba
4 changed files with 30 additions and 3 deletions

View File

@@ -342,6 +342,11 @@ function do_extra_configuration() {
fi
fi
# Debian needs the ports repo when strapping riscv64 - revise after bookworm release
if [[ "${ARCH}" == "riscv64" ]] && [[ $DISTRIBUTION == Debian ]]; then
DEBIAN_MIRROR='deb.debian.org/debian-ports'
fi
# Control aria2c's usage of ipv6.
[[ -z $DISABLE_IPV6 ]] && DISABLE_IPV6="true"

View File

@@ -302,7 +302,8 @@ function adaptative_prepare_host_dependencies() {
fi
if [[ "${wanted_arch}" == "riscv64" || "${wanted_arch}" == "all" ]]; then
host_dependencies+=("gcc-riscv64-linux-gnu") # crossbuild-essential-riscv64 is not even available "yet"
host_dependencies+=("gcc-riscv64-linux-gnu") # crossbuild-essential-riscv64 is not even available "yet"
host_dependencies+=("debian-ports-archive-keyring") # Debian Ports keyring needed, as riscv64 is not released yet
fi
if [[ "${wanted_arch}" != "amd64" ]]; then

View File

@@ -125,8 +125,23 @@ function create_new_rootfs_cache() {
deboostrap_arguments+=("--cache-dir=${apt_cache_host_dir}/archives") # cache .deb's used
fi
# This always last, positional arguments.
deboostrap_arguments+=("--foreign" "${RELEASE}" "${SDCARD}/" "${debootstrap_apt_mirror}") # path and mirror
deboostrap_arguments+=("--foreign") # release name
# Debian does not carry riscv64 in their main repo, needs ports, which needs a specific keyring in the host.
# that's done in prepare-host.sh when by adding debian-ports-archive-keyring hostdep, but there's an if anyway.
# debian-ports-archive-keyring is also included in-image by: config/optional/architectures/riscv64/_config/cli/_all_distributions/main/packages
# Revise this after bookworm release.
# @TODO: rpardini: this clearly shows a need for hooks for debootstrap
if [[ "${ARCH}" == "riscv64" ]] && [[ $DISTRIBUTION == Debian ]]; then
if [[ -f /usr/share/keyrings/debian-ports-archive-keyring.gpg ]]; then
display_alert "Adding ports keyring for Debian debootstrap" "riscv64" "info"
deboostrap_arguments+=("--keyring" "/usr/share/keyrings/debian-ports-archive-keyring.gpg")
else
exit_with_error "Debian debootstrap for riscv64 needs debian-ports-archive-keyring hostdep"
fi
fi
deboostrap_arguments+=("${RELEASE}" "${SDCARD}/" "${debootstrap_apt_mirror}") # release, path and mirror; always last, positional arguments.
run_host_command_logged debootstrap "${deboostrap_arguments[@]}" || {
exit_with_error "Debootstrap first stage failed" "${RELEASE} ${DESKTOP_APPGROUPS_SELECTED} ${DESKTOP_ENVIRONMENT} ${BUILD_MINIMAL}"

View File

@@ -215,4 +215,10 @@ with open(output_file, "w") as bash, SummarizedMarkdownWriter("aggregation.md",
# PACKAGE_LIST_UNINSTALL="$(cleanup_list aggregated_content)"
# unset aggregated_content
# Debug potential paths:
all_potentials = util.get_all_potential_paths_packages()
md.write(f"## Potential paths \n")
for potential in all_potentials:
md.write(f"- `{potential}`\n")
log.debug(f"Done. Output written to {output_file}")