Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use deb822 APT sources #7790

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: Use deb822 APT sources #7790

wants to merge 1 commit into from

Conversation

blieque
Copy link
Contributor

@blieque blieque commented Feb 7, 2025

This PR and the related PRs will require discussion or RFC before merging, particularly around handling migration of existing installations.

Replace armbian.list with armbian.sources. This holds the same information in a newer format, deb822. APT has supported this format since version 1.1, released in 2015.

This follows the migration of the APT configuration for armbian-configarmbian-config.list to armbian-config.sources.

There are some things to note:

  • HTTP has been replaced with HTTPS for Armbian repositories since it was used for armbian-config.

  • The previous configuration included commented-out deb-src lines. This PR effectively removes them, but one of the following equivalents could be added:

    Types: deb
    #Types: deb deb-src
    
    # Add " deb-src" to this line to include source packages.
    Types: deb
    

    As I interpret the documentation, the deb822 format only allows comments beginning at the start of a line, so the following is not valid.

    Types: deb #deb-src
    
  • What was sources.list has been renamed to debian.sources or ubuntu.sources. Alternatively, this could be something more generic like upstream.sources.

  • The new upstream repository configuration uses Signed-By to refer to signing keys:

    • Debian: /usr/share/keyrings/debian-archive-keyring.gpg from package debian-archive-keyring.

    • Ubuntu: /usr/share/keyrings/ubuntu-archive-keyring.gpg from package ubuntu-keyring.

  • When generating a build for Debian "unstable", the APT configuration will now reference "unstable" rather than "sid" in the Suites field.

  • The Architectures field is used for riscv64-specific packages in debian.sources. I think this means that the architecture check in the build script could be omitted at the cost of a bit of clutter in non-riscv64 images.

  • I've made use of shell variables in call_extension_method in distro-specific.sh. Will this variable substitution work, or is this text extracted by reflection somehow?

References to armbian.list also exist in other repositories:

Related documentation: deb822

Related PRs:

Testing

The following script can be saved in ./lib/functions/rootfs/. Running it will generate a directory called test containing .list or .sources files, depending on whether this PR has been applied or not. Uncomment the second ARCH line to test the riscv64-specific configuration.

Important: Add return before image-early line in distro-specific.sh before running this script.

# test-create_sources_list_and_deploy_repo_key.sh

source distro-specific.sh

DEBIAN_MIRROR="deb.debian.org/debian"
DEBIAN_SECURTY="security.debian.org/"
UBUNTU_MIRROR="archive.ubuntu.com/ubuntu/"
ARCH="amd64"
# ARCH="riscv64"

mkdir -p ./test

for release in buster bullseye bookworm trixie sid unstable focal jammy noble oracular plucky; do
  mkdir -p ./test/$release/etc/apt
  create_sources_list_and_deploy_repo_key "" "$release" ./test/$release
  mv ./test/$release/etc/apt/*.list ./test/$release.list \
    || true > /dev/null
  mv ./test/$release/etc/apt/*.sources ./test/$release.sources \
    || true > /dev/null
done

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

- Replace `armbian.list` with `armbian.sources`. This holds the same
  information in a newer format, deb822.
- Replace HTTP with HTTPS for Armbian repositories.
@blieque blieque requested review from amazingfate, a team and igorpecovnik as code owners February 7, 2025 00:11
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Framework Framework components labels Feb 7, 2025
@rpardini
Copy link
Member

rpardini commented Feb 7, 2025

  • I've made use of shell variables in call_extension_method in distro-specific.sh. Will this variable substitution work, or is this text extracted by reflection somehow?

This will "work", but might have unintended effects. The text passed to call_extension_method is the "help text" for the method. The docs are generated by enabling the gen-sample-extension-docs extension (how very meta). Only the hooks actually called during that execution are actually included, so it's far from perfect.

In this case, the documentation will vary depending on the "distro" one is building during the doc generation -- which makes little sense. It's not the end of the world but it's both easier and the result better to simply use a generic term, sans-variables.

@igorpecovnik igorpecovnik added the 05 Milestone: Second quarter release label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
05 Milestone: Second quarter release Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

3 participants