Skip to content

update package pipeline and add bitnami-compat #43665

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

yashpimple
Copy link
Contributor

@yashpimple yashpimple commented Feb 25, 2025

This PR resolves the issue with nested directories within /opt/jsonnet/grafonnet/ and improve alignment with the source structure.

Earlier the pipeline use to create an nested directories like /opt/jsonnet/grafonnet/clean/clean/, /opt/jsonnet/grafonnet/custom/custom/, and /opt/jsonnet/grafonnet/raw/raw/ due to mv placing each source directory inside a pre-created subdirectory.

The PR replaces mv with a conditional cp -rwhich copy each directory (clean/, custom/, raw/) directly into /opt/jsonnet/grafonnet/ preserving their structure without nesting.

Also add bitnami compat package for grafonnet as per the Dockerfile

Pre-review Checklist

For new package PRs only

  • This PR is marked as fixing a pre-existing package request bug
    • Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
  • REQUIRED - The package is available under an OSI-approved or FSF-approved license
  • REQUIRED - The version of the package is still receiving security updates
  • This PR links to the upstream project's support policy (e.g. endoflife.date)

For new version streams

  • The upstream project actually supports multiple concurrent versions.
  • Any subpackages include the version string in their package name (e.g. name: ${{package.name}}-compat)
  • The package (and subpackages) provides: logical unversioned forms of the package (e.g. nodejs, nodejs-lts)
  • If non-streamed package names no longer built, open PR to withdraw them (see WITHDRAWING PACKAGES)

For package updates (renames) in the base images

When updating packages part of base images (i.e. cgr.dev/chainguard/wolfi-base or ghcr.io/wolfi-dev/sdk)

  • REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk images successfully build
  • REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk contain no obsolete (no longer built) packages
  • Upon launch, does apk upgrade --latest successfully upgrades packages or performs no actions

For security-related PRs

  • The security fix is recorded in the advisories repo

For version bump PRs

  • The epoch field is reset to 0

For PRs that add patches

  • Patch source is documented

@yashpimple yashpimple added the approved-to-run A repo member has approved this external contribution label Feb 25, 2025
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Feb 25, 2025
Signed-off-by: YashPimple <[email protected]>
Copy link
Contributor

octo-sts bot commented Feb 27, 2025

⚠️ EXPERIMENTAL

Please use 👍 or 👎 on this comment to indicate if you agree or disagree with the recommendation.

To provide more detailed feedback please comment on the recommendation prefixed with /ai-verify:

e.g. /ai-verify partially helpful but I also added bash to the build environment

Gen AI suggestions to solve the build error:

Based on the error output, I'll analyze and provide specific fixes:

• Detected Error: "install: omitting directory 'clean'"

• Error Category: Configuration/Pipeline

• Failure Point: In the pipeline step trying to install directories with:

for i in clean custom raw; do
    install -Dm644 "$i" "${{targets.destdir}}"/opt/jsonnet/grafonnet/
done

• Root Cause Analysis: The install command is failing because it can't directly copy directories with the current syntax. The -D flag creates directories but doesn't recursively copy directory contents.

• Suggested Fix: Replace the directory installation loop with either cp -r or separate directory creation and file copying:

  - runs: |
      mkdir -p ${{targets.destdir}}/opt/jsonnet/grafonnet
      cd gen/grafonnet-$GRAFONNET_VERSION

      install -m755 *.libsonnet "${{targets.destdir}}"/opt/jsonnet/grafonnet/
      install -m755 *.json "${{targets.destdir}}"/opt/jsonnet/grafonnet/

      # Replace the problematic loop with:
      for dir in clean custom raw; do
        mkdir -p "${{targets.destdir}}/opt/jsonnet/grafonnet/$dir"
        cp -r "$dir"/* "${{targets.destdir}}/opt/jsonnet/grafonnet/$dir/"
      done

• Explanation: The original command tried to use install on directories, which doesn't work as expected. The fix uses mkdir to create the directories first, then uses cp -r to recursively copy their contents, which is the proper way to handle directory structures in Linux.

• Additional Notes:

  • The fix maintains the intended file permissions
  • Ensures directory structure is preserved
  • Handles all files within the subdirectories
  • Maintains compatibility with the test pipeline that checks for directory existence

• References:

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Feb 27, 2025
@yashpimple yashpimple requested a review from Dentrax February 27, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/skip-comment Stop AI from commenting on PR approved-to-run A repo member has approved this external contribution bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants