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

Custom repo support for AzLinux #366

Merged
merged 11 commits into from
Oct 22, 2024

Conversation

adamperlin
Copy link
Contributor

@adamperlin adamperlin commented Sep 7, 2024

What this PR does / why we need it:
This PR adds custom repo support for Azure Linux. Jammy support soon to come. This means that packages from custom imported repos outside of the built-ins for a distro may be specified as dependencies in Dalec for the Build, Install, and Test phases.

The following spec fragment gives a good example of the feature:

dependencies:
  build:
    custom-repo-package:

   # NEW PROPERTY of `dependencies`
  extra_repos:
    - envs:
         # this indicates which stage a custom repo will be available for. Other options are `test` and `install`
        - "build" 
      # list repo configs to import here
      config:
        custom.repo:
          # this must be a source which contains a single file, the contents of `custom.repo`
          http:
            url: https://mypackagecenter/custom.repo
        # add other repos here...

     # list GPG public keys to import here:
     keys:
       MY-RPM-GPG-PUBLIC-KEY: 
          http:
            url: https://anotherkeysource.url/MY-RPM-GPG-PUBLIC-KEY
     
     data: 
        - dest: /opt/repo
           spec:
             context:
               # this would have to be all repo data including packages and any metadata, essentially
               # a local repo created with `createrepo`
               name: "my-custom-repo-data"
       

Note that the keys portion of the spec would not be necessary if the repo config references a key directly via http in the gpgkey field.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Closes #211

Special notes for your reviewer:

cpuguy83 and others added 2 commits October 1, 2024 15:46
Signed-off-by: adamperlin <adamp@nanosoft.com>
…ngs are broken right now, but the general idea is to create mounts for

1. The repo config files
2. Any pgp keys that need to be imported
3. Any repo data that needs to be accessible

and then to apply those mounts as RunOptions when we tdnf install the build dependencies package. This doesn't seem to be working properly and I'm
not confident RunOptions for the mounts are threaded through exactly right.
@cpuguy83 cpuguy83 added this to the v0.10.0 milestone Oct 9, 2024
@adamperlin adamperlin force-pushed the adamperlin/extra-repo-support branch from 6e2591d to 9b8fb84 Compare October 11, 2024 22:40
@adamperlin adamperlin marked this pull request as ready for review October 16, 2024 21:53
@adamperlin adamperlin requested a review from a team as a code owner October 16, 2024 21:53
@adamperlin adamperlin changed the title [Broken] WIP draft for custom repo support Custom repo support for AzLinux Oct 16, 2024
Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor thing but otherwise this LGTM
Great work!

frontend/azlinux/handle_rpm.go Outdated Show resolved Hide resolved
@cpuguy83 cpuguy83 merged commit 19eedbc into Azure:main Oct 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] Support installing extra repos in target distro
2 participants