Skip to content

feat(ShellCheck): add ShellCheck 0.11.0 and route it to the base repo - #18318

Merged
reuben olinsky (reubeno) merged 1 commit into
microsoft:4.0from
liunan-ms:liunan/add-shellcheck
Aug 6, 2026
Merged

feat(ShellCheck): add ShellCheck 0.11.0 and route it to the base repo#18318
reuben olinsky (reubeno) merged 1 commit into
microsoft:4.0from
liunan-ms:liunan/add-shellcheck

Conversation

@liunan-ms

@liunan-ms Nan Liu (liunan-ms) commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ShellCheck 0.11.0 (shell script analysis tool) to Azure Linux 4.0, imported from Fedora 43 as a bare upstream component (no overlays), and routes it to the base RPM channel.

Change Detail
Component ShellCheck 0.11.0 (inline Fedora-43 import in components.toml)
Publish routing Added to base-packages in components-publish-channels.toml (→ rpm-base)
Channel carve-out ghc-ShellCheck* library subpackages carved to sdk via exceptions-packages

Dependency notes

ShellCheck's build dependencies ghc-Diff and ghc-fgl are added in a separate prerequisite PR: #18332 (which must merge first). All other BuildRequires are satisfied by the existing ghc compiler package and already-packaged ghc-* libraries.

The shellcheck binary is statically linked against its Haskell libraries, so the ShellCheck binary RPM has no ghc-* runtime dependencies — only libc / libm / libffi / libgmp.

Channel routing (base vs sdk)

The base-packages group applies at the component level, i.e. to every binary RPM the SRPM produces. The ShellCheck SRPM emits five binaries:

Binary RPM Channel Why
ShellCheck (executable) base statically linked; only needs libc/libm/libffi/libgmp
ghc-ShellCheck (library) sdk links the ghc runtime libHS* libraries
ghc-ShellCheck-devel sdk hard-Requires: ghc-compiler
ghc-ShellCheck-doc sdk Haskell library docs
ghc-ShellCheck-prof sdk Haskell profiling library

To avoid dragging the Haskell library stack (and unsatisfiable base deps like ghc-compiler) into base, the four ghc-ShellCheck* siblings are carved into [package-groups.exceptions-packages] (→ sdk), leaving only the shellcheck executable in base. The ghc compiler and runtime ghc-* libraries already live in sdk.

Validation

  • Build: full chain ghc-Diffghc-fglShellCheck built cleanly with %check enabled, producing ShellCheck-0.11.0-2.azl4.x86_64.rpm plus the ghc-ShellCheck* subpackages.
  • Smoke test (mock chroot, RPM installed):
    • shellcheck resolves to /usr/bin/shellcheck.
    • Linting a flawed script reports findings (SC2154, SC2086) and exits non-zero.
    • Linting a clean script exits 0.
  • Runtime deps verified: rpm -qpR on the ShellCheck binary RPM shows only libc/libm/libffi/libgmp (no ghc-*/libHS*).
  • Config validated: azldev config dump accepts the publish-channel change.
  • Repo consistency: locks up to date; azldev comp render shows no spec drift.

Related / merge order

Copilot AI balanced review requested due to automatic review settings August 4, 2026 22:56

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 ShellCheck 0.11.0 and its missing Haskell dependencies as bare Fedora 43 components.

Changes:

  • Registers ShellCheck, ghc-Diff, and ghc-fgl.
  • Adds generated specs, sources, and lock files.
  • Includes ghc-Diff’s revised Cabal metadata.

Reviewed changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
base/comps/components.toml Registers three components.
locks/ShellCheck.lock Pins ShellCheck upstream state.
locks/ghc-Diff.lock Pins ghc-Diff upstream state.
locks/ghc-fgl.lock Pins ghc-fgl upstream state.
specs/s/ShellCheck/ShellCheck.spec Defines ShellCheck RPM packaging.
specs/s/ShellCheck/sources Records ShellCheck source checksum.
specs/g/ghc-Diff/ghc-Diff.spec Defines ghc-Diff RPM packaging.
specs/g/ghc-Diff/Diff-0.5.cabal Supplies revised Cabal metadata.
specs/g/ghc-Diff/sources Records ghc-Diff source checksum.
specs/g/ghc-fgl/ghc-fgl.spec Defines ghc-fgl RPM packaging.
specs/g/ghc-fgl/sources Records ghc-fgl source checksum.

Comment thread specs/g/ghc-fgl/ghc-fgl.spec Outdated
Comment thread specs/s/ShellCheck/ShellCheck.spec
@reubeno

Copy link
Copy Markdown
Member

@liunan-ms Great to see this coming through! This package has been long-requested 😄

Just a reminder that new package additions will require working with the team to get them allow-listed in our build services (koji) -- across dev and prod.

@liunan-ms

Copy link
Copy Markdown
Contributor Author

@liunan-ms Great to see this coming through! This package has been long-requested 😄

Just a reminder that new package additions will require working with the team to get them allow-listed in our build services (koji) -- across dev and prod.

@reubeno Thanks for the reminder! I'll request to allowlist these packages in Koji. One question on the publish channel for these packages, do we want to publish them to base or sdk repo?

@liunan-ms
Nan Liu (liunan-ms) marked this pull request as ready for review August 5, 2026 18:29
@liunan-ms
Nan Liu (liunan-ms) requested a review from a team as a code owner August 5, 2026 18:29
@reubeno

Copy link
Copy Markdown
Member

@liunan-ms Great to see this coming through! This package has been long-requested 😄
Just a reminder that new package additions will require working with the team to get them allow-listed in our build services (koji) -- across dev and prod.

@reubeno Thanks for the reminder! I'll request to allowlist these packages in Koji. One question on the publish channel for these packages, do we want to publish them to base or sdk repo?

I expect that ShellCheck is in base because it's a customer-requested tool and something we want to support. For the other ghc packages, if they're only build-time requirements with no runtime dependencies, they could be relegated to sdk. Where are the other ghc packages now?

@reubeno

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@liunan-ms

Copy link
Copy Markdown
Contributor Author

@liunan-ms Great to see this coming through! This package has been long-requested 😄
Just a reminder that new package additions will require working with the team to get them allow-listed in our build services (koji) -- across dev and prod.

@reubeno Thanks for the reminder! I'll request to allowlist these packages in Koji. One question on the publish channel for these packages, do we want to publish them to base or sdk repo?

I expect that ShellCheck is in base because it's a customer-requested tool and something we want to support. For the other ghc packages, if they're only build-time requirements with no runtime dependencies, they could be relegated to sdk. Where are the other ghc packages now?

Only ghc-srpm-macros is in base repo, the other ghc- packages are in sdk now. The newly added ghc-Diff, ghc-fgl are build-time dependencies, will leave them in sdk and move ShellCheck to base.

@reubeno

reuben olinsky (reubeno) commented Aug 5, 2026

Copy link
Copy Markdown
Member

Only ghc-srpm-macros is in base repo, the other ghc- packages are in sdk now. The newly added ghc-Diff, ghc-fgl are build-time dependencies, will leave them in sdk and move ShellCheck to base.

Sounds good to me. Are you planning to update this PR to route ShellCheck to base? Or are you planning a separate PR for that?

Also I see that scratch package build failed. This is expected since the packages added are built in parallel, and ShellCheck won't be able to use the new ghc packages (and then fail with missing dependencies). We will either need to split these up or alternatively request a maintainer to bypass policy and allow the failure. For the future I think it may be cleaner to separate these into different PRs, but I'm personally okay with the bypass for this one since you've been able to locally validate.

@reubeno reuben olinsky (reubeno) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The changes themselves look good, but after more reflection we'd like you to split out the ShellCheck addition into a separate PR that we can approve after the first one goes in.

[components.SDL3_ttf]
[components.SDL_gfx]
[components.SFCGAL]
[components.ShellCheck]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

issue(blocking): I discussed a bit more with the other maintainers. Given the relatively (small) number of components touched in this PR, we'd like you to split this PR in two:

  1. Add: ghc-Diff + ghc-fgl; we expect scratch PR builds should pass on this, as they already have in this PR.
  2. Add ShellCheck; once PR (1) is merged we can see the PR scratch build checks pass on this. I'd also recommend including the base repo routing entry for ShellCheck in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That sounds good, will split the PR.

Copilot AI review requested due to automatic review settings August 5, 2026 21:12
@liunan-ms Nan Liu (liunan-ms) changed the title feat(ShellCheck): add ShellCheck 0.11.0 with ghc-Diff and ghc-fgl deps feat(ShellCheck): add ShellCheck 0.11.0 and route it to the base repo Aug 5, 2026

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 4 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

base/comps/components-publish-channels.toml:2361

  • This component-level entry sends every binary RPM produced by the SRPM to rpm-base, not only the ShellCheck executable package. The rendered spec also emits ghc-ShellCheck and ghc-ShellCheck-devel (plus conditional -doc/-prof packages), and -devel explicitly requires ghc-compiler; currently only ghc-srpm-macros is routed to base. This therefore pulls Haskell artifacts/dependencies into base contrary to the PR rationale. Add the ghc-ShellCheck* sibling packages to [package-groups.exceptions-packages] (or stop building them) so only the executable package remains in base.
    "ShellCheck",

Import ShellCheck 0.11.0 (shell script analysis tool) from Fedora 43 as a
bare upstream component, and route it to the base RPM channel.

The shellcheck binary is statically linked against its Haskell libraries,
so it has no ghc-* runtime dependencies (only libc/libm/libffi/libgmp).
Its build dependencies ghc-Diff and ghc-fgl are added separately on
liunan/add-ghc-packages and must land first.

Built and smoke-tested in a mock chroot (shellcheck --version, lint of
both a flawed and a clean script).
Copilot AI review requested due to automatic review settings August 5, 2026 21:23

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 4 out of 5 changed files in this pull request and generated no new comments.

@reubeno reuben olinsky (reubeno) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes look good to me -- we'll need to wait for PR check scratch builds to go green before we merge, though.

@reubeno

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@reubeno
reuben olinsky (reubeno) merged commit 959a18e into microsoft:4.0 Aug 6, 2026
11 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.

3 participants