Skip to content

Add /opt artifact support#1142

Open
chmill-zz wants to merge 3 commits into
project-dalec:mainfrom
chmill-zz:optsupport
Open

Add /opt artifact support#1142
chmill-zz wants to merge 3 commits into
project-dalec:mainfrom
chmill-zz:optsupport

Conversation

@chmill-zz

Copy link
Copy Markdown

What this PR does / why we need it:

Adds /opt as a supported artifact destination, allowing packages to install files into layouts such as /opt//bin or /opt/bin

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 #

Special notes for your reviewer:

Signed-off-by: chmill <chmill@microsoft.com>
Copilot AI review requested due to automatic review settings July 15, 2026 21:58
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for dalec ready!

Name Link
🔨 Latest commit 0a03cdb
🔍 Latest deploy log https://app.netlify.com/projects/dalec/deploys/6a58027ffac24d000741b8d4
😎 Deploy Preview https://deploy-preview-1142--dalec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds /opt as a supported Linux artifact destination across Dalec’s package builders.

Changes:

  • Adds the artifacts.opt specification and schema.
  • Supports /opt installation, permissions, ownership, and capabilities for DEB and RPM packages.
  • Adds documentation and cross-distribution installation tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
artifacts.go Defines and validates Opt artifacts.
docs/spec.schema.json Adds Opt to the generated schema.
load_test.go Validates Opt capability configuration.
packaging/linux/deb/debroot.go Implements DEB Opt artifact handling.
packaging/linux/deb/template_rules.go Enables Opt permission overrides.
packaging/linux/rpm/template.go Implements RPM Opt artifact handling.
packaging/linux/rpm/template_test.go Tests RPM ownership and capabilities.
test/linux_target_test.go Tests installed /opt layouts.
website/docs/artifacts.md Documents Opt artifacts and examples.

@chmill-zz

Copy link
Copy Markdown
Author

The three failed checks appear to be transient infrastructure failures rather than failures caused by this change:

  • integration (Bionic)
  • integration (Focal)
  • integration (Jammy)

All three failed in the cross_platform subtest while building for ARM. apt timed out connecting to ports.ubuntu.com:80, leaving the package indexes unavailable and causing the subsequent build-dependency installation to fail with exit code 100. The other integration targets, unit tests, and lint checks passed, and these Ubuntu jobs have passed on neighboring CI runs.

Could a maintainer please rerun the failed jobs?

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you add a case for opt in integration/linux_target_test.go where we test other artifacts?

Comment thread packaging/linux/deb/debroot.go Outdated
Comment thread packaging/linux/rpm/template.go Outdated
Comment thread packaging/linux/rpm/template.go Outdated
@cpuguy83
cpuguy83 requested a review from invidian July 16, 2026 18:41
Signed-off-by: chmill <chmill@microsoft.com>

@invidian invidian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall LGTM, I have some questions/comments.

Comment thread packaging/linux/deb/debroot.go Outdated
Comment thread packaging/linux/rpm/template.go Outdated
Comment thread packaging/linux/rpm/template.go Outdated
Comment thread test/linux_target_test.go Outdated
Signed-off-by: chmill <chmill@microsoft.com>
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.

4 participants