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

Add Custom Repo Support For Jammy #412

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

adamperlin
Copy link
Contributor

@adamperlin adamperlin commented Oct 22, 2024

What this PR does / why we need it:
This is a follow up PR to #366. With this PR Dalec now accepts specifying dependencies from outside package repos on Jammy targets.

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):
Fixes #211

Special notes for your reviewer:

@adamperlin adamperlin changed the title Add jammy support Add Custom Repo Support For Jammy Oct 22, 2024
@adamperlin adamperlin marked this pull request as ready for review October 22, 2024 23:57
@adamperlin adamperlin requested a review from a team as a code owner October 22, 2024 23:57
@adamperlin adamperlin force-pushed the adamperlin/extra-repo-support-jammy branch from 3e6d15c to c4d58d0 Compare October 23, 2024 00:07
outPath := filepath.Join("/tmp/out", name)
keySt = worker.Run(
// dearmor key if necessary
ShArgs(fmt.Sprintf("cat '%s' | gpg --dearmor --output '%s'", inPath, outPath)),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ShArgs(fmt.Sprintf("cat '%s' | gpg --dearmor --output '%s'", inPath, outPath)),
ShArgs(fmt.Sprintf("gpg --dearmor --output '%s' < '%s'", inPath, outPath)),

This removes an extra call to cat

return dalec.WithRunOptions(withRepos, withData, keyMounts), nil
}

func installPackages(ls []string, rOpts ...llb.RunOption) llb.RunOption {
Copy link
Member

Choose a reason for hiding this comment

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

Since this is returning a RunOption does it need to accept run options?
I think we should be able to append the repo/key stuff separately.

@cpuguy83 cpuguy83 added this to the v0.10.0 milestone Oct 23, 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.

LGTM for now, the issues added are just nits in some of the code structure, we can address later.
Pulling this in to prepare for release.

@cpuguy83 cpuguy83 merged commit c63436e into Azure:main Oct 23, 2024
9 checks passed
@cpuguy83
Copy link
Member

Had to open a fix for the custom repo tests: #415
There was some non-deterministic behavior due to apt package caching.

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