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

build: T6855: make the custom APT entry and key syntax more flexible #831

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

dmbaturin
Copy link
Member

Change Summary

Right now, our custom repository and APT key options have a few shortcomings:

  • APT entries are monolithic, so Debian distribution has to be updates in all entries when we switch to a new base distro.
  • A lot of custom repos only have main component, but we force the config author to specify it.
  • Configs may only include APT key file paths, so there's no way to distribute a self-contained flavor that uses custom repos with custom keys.
  • Renames the oddly-sinfular custom_apt_key config option to custom_apt_keys.

This PR:

  • Makes custom APT entry syntax in build configs more flexible and allow specifying individual components instead of monolithic sources.list strings.
  • Allows embedding APT keys in configs.
  • Generates Debian source repository entries for all repositories.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

Build scripts and configs.

Proposed changes

[additional_repositories.some-repo]
  # Optional, no default
  architecture = "amd64"

  # Optional, defaults to "main"
  components = "main contrib"

  # Optional, defaults to false
  no_source = true

  # Optional, defaults to build_config['debian_distribution'
  distribution = 'bo'

  # Mandatory
  url = 'https://example.com/some-repo/debian'

  # Optional
  key = ''' <Base64 encoded APT key data> '''

The new APT key mechanism can also be used at the config level rather than at the repository level:

[[custom_apt_keys]]
  name = 'foo'
  key = '<Base64 data>'

How to test

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

github-actions bot commented Nov 6, 2024

👍
No issues in PR Title / Commit Title

@sever-sever sever-sever merged commit cf5caba into vyos:current Nov 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants