Skip to content

feat(fscrypt): add fscrypt component and publish to rpm-base - #18370

Open
Tobias Brick (tobiasb-ms) wants to merge 1 commit into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/add-fscrypt
Open

feat(fscrypt): add fscrypt component and publish to rpm-base#18370
Tobias Brick (tobiasb-ms) wants to merge 1 commit into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/add-fscrypt

Conversation

@tobiasb-ms

@tobiasb-ms Tobias Brick (tobiasb-ms) commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Adds the fscrypt component to AZL 4.0 and publishes it to the rpm-base channel.

fscrypt is a Go/go2rpm package producing:

  • fscrypt — the CLI for managing filesystem encryption (ext4/f2fs/UBIFS fscrypt)
  • pam_fscrypt — PAM module for unlocking encrypted directories at login
  • golang-github-google-fscrypt-devel — importable Go sources

Publish channels

  • fscrypt's binaries are statically linked Go, so the runtime closure is just libc + libpam (pam already ships in base). Only fscrypt is added to base-packages.
  • golang-github-google-fscrypt-devel (the Go source subpackage) is excepted back to rpm-sdk, matching every other golang-* source library.

Validation

  • Native (unbundled) build succeeds — all Go deps resolve from AZL's golang-* ecosystem; %check passes.
  • Mock smoke test: CLI, PAM module, config, and bash completion all install and work.
  • azldev comp render --check-only reports no drift; lock gate passes.

AB#22587

Copilot AI balanced review requested due to automatic review settings August 10, 2026 16:44

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 fscrypt to Azure Linux 4.0 and publishes its runtime packages to rpm-base.

Changes:

  • Registers and locks the upstream fscrypt component.
  • Adds rendered spec, sources, PAM configuration, and compatibility patches.
  • Keeps the Go development subpackage in rpm-sdk.

Reviewed changes

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

Show a summary per file
File Description
base/comps/components.toml Registers fscrypt.
base/comps/components-publish-channels.toml Configures base and SDK publishing.
locks/fscrypt.lock Pins upstream inputs.
specs/f/fscrypt/fscrypt.spec Defines generated RPM packaging.
specs/f/fscrypt/fscrypt.pam Provides PAM configuration.
specs/f/fscrypt/423.patch Adds Go 1.24 compatibility.
specs/f/fscrypt/426.patch Improves mount-device detection.
specs/f/fscrypt/sources Records the source checksum.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

specs/f/fscrypt/fscrypt.spec:36

  • This imports upstream PR 423, which was closed after its "path: %s" formatting was rejected because it changes errors to the awkward path: /dir: ... form. Upstream merged PR 424 instead, using errors.Wrap to satisfy Go vet while preserving the existing /dir: ... output. Backport PR 424 rather than PR 423.
Patch0:         https://github.com/google/fscrypt/pull/423.patch

Comment thread specs/f/fscrypt/fscrypt.spec Outdated
Copilot AI review requested due to automatic review settings August 10, 2026 17:42

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

specs/f/fscrypt/fscrypt.spec:36

  • Patch0 imports upstream PR #423, which was closed unmerged because it changes these errors to the awkward path: /dir: ... form. Upstream merged PR #424 instead; it uses errors.Wrap to satisfy Go 1.24 while preserving the existing /dir: ... message. Please backport #424 rather than shipping the rejected patch, then re-render the component.
Patch0:         https://github.com/google/fscrypt/pull/423.patch

Copilot AI review requested due to automatic review settings August 10, 2026 17:53

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

specs/f/fscrypt/fscrypt.spec:50

  • pam_fscrypt installs a PAM service that invokes pam_unix.so (fscrypt.pam:2), but this subpackage only requires fscrypt. Its ELF autodependencies can install pam-libs, while pam_unix.so is shipped by the separate main pam package (specs/p/pam/pam.spec:314), so installing pam_fscrypt on a minimal system can succeed and then fail authentication at runtime. Add an explicit Requires: pam%{?_isa} to this subpackage through an overlay and re-render the spec.
Requires:       %{name}%{?_isa} = %{version}-%{release}

@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

Build pam_fscrypt as c-shared so PAM can load it.

The Fedora spec builds pam_fscrypt with a plain %gobuild (-buildmode=pie).
A Go PIE binary is an ELF executable with DF_1_PIE set, which glibc >= 2.30
refuses to dlopen ("cannot dynamically load position-independent
executable"). Since PAM loads modules via dlopen, the module was
unusable. A spec overlay appends -buildmode=c-shared to that build
(matching upstream's Makefile) so it produces a real, loadable shared
library. Verified: pam_fscrypt.so is an ELF shared object with no
DF_1_PIE flag and dlopen succeeds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 10, 2026 22:04
@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@tobiasb-ms
Tobias Brick (tobiasb-ms) marked this pull request as ready for review August 10, 2026 22:04
@tobiasb-ms
Tobias Brick (tobiasb-ms) requested a review from a team as a code owner August 10, 2026 22:04
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

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.

2 participants