Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Nov 6, 2024

Package update, plus the Git patch needed to be re-generated for this release.


Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Nov 6, 2024
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 6, 2024

Gen AI suggestions to solve the build error:

Based on the error log, the build is failing during the patch application step. Here are the steps to fix this issue:

  1. The patch for console.gemspec is failing to apply cleanly. The error shows "Hunk Add binutils-2.39 configuration #1 FAILED at 11"

Here's what you can do to resolve this:

  1. Check the current patch file:
cat packages/ruby3.2-console/patches/*.patch
  1. Generate a new patch that matches the current source:
cd /tmp
git clone https://github.com/socketry/console
cd console
git checkout v1.29.0
# Make your changes to console.gemspec
git diff > new.patch
  1. Update the patch file in your package definition with the new patch

  2. Alternative approach - modify the gemspec directly in the melange pipeline:
    Add this to your yaml configuration:

pipeline:
  - uses: git-checkout
  - uses: strip
  - name: update-gemspec
    runs: |
      sed -i 's/problematic_line/new_line/' console.gemspec
  1. If you still want to use patches, verify your patch format:
package:
  name: ruby3.2-console
  version: 1.29.0
  epoch: 0
  description: "Ruby console"
  # ...
  
environment:
  contents:
    packages:
      - build-base
      - ruby-3.2
      - ruby-3.2-dev
      - git
      - patch

pipeline:
  - uses: git-checkout
  - uses: patch
    with:
      patches: 
        - patches/fix-gemspec.patch # Make sure this path is correct

The key is to either:

  • Generate a correct patch that applies cleanly
  • Move the changes into the pipeline directly
  • Verify the patch path and format in your melange YAML

Try these steps and rebuild the package.

@imjasonh imjasonh added approved-to-run A repo member has approved this external contribution and removed approved-to-run A repo member has approved this external contribution labels Nov 6, 2024
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 6, 2024

Gen AI suggestions to solve the build error:

Based on the error log, the build is failing during the patch application step. Here are the steps to fix this issue:

  1. The patch for console.gemspec is failing to apply cleanly. First, examine the reject file:
cat console.gemspec.rej
  1. Review the current patch in your melange YAML file and update it to match the current version of the source code. The error shows "Hunk Add binutils-2.39 configuration #1 FAILED at 11" which means the patch doesn't match the context around line 11.

  2. To create a new correct patch:

    # Get the original file
    git clone https://github.com/socketry/console.git
    cd console
    git checkout v1.29.0
    
    # Make your changes to console.gemspec
    # Then create a new patch
    git diff > ../new.patch
  3. Update your melange YAML file with the new patch content:

pipeline:
  - uses: git-checkout
  - uses: patch
    with:
      patches:
        - patches/new.patch  # Update this path
  1. Verify the patch format matches:
# Make sure the patch uses unified diff format
# Should start with lines like:
# --- a/console.gemspec
# +++ b/console.gemspec
  1. Try rebuilding:
make MELANGE_EXTRA_OPTS="--create-build-log --cache-dir=.melangecache" REPO="./packages" package/ruby3.2-console -j1

If you need more specific help, please share the content of your current patch and the melange YAML file.

Signed-off-by: Mark McCormick <mark.mccormick@chainguard.dev>
@github-actions
Copy link
Contributor

Package ruby3.2-console: Click to expand/collapse

Package ruby3.2-console:

.PKGINFO metadata:

  (
  	"""
  	# Generated by melange
  	pkgname = ruby3.2-console
- 	pkgver = 1.27.0-r2
+ 	pkgver = 1.29.0-r0
  	arch = x86_64
- 	size = 157035
+ 	size = 160647
  	origin = ruby3.2-console
  	pkgdesc = Beautiful logging for Ruby.
  	url = 
- 	commit = a6fe3dfbbe8c1228bacc7880b2b57bf28c9c8b38
- 	builddate = 1729889163
+ 	commit = a89b3166b39887206ae0ab8cd2e63f0324a7728a
+ 	builddate = 1731283206
  	license = MIT
  	depend = ruby-3.2
  	... // 2 identical lines
  	depend = ruby3.2-fiber-storage
  	depend = ruby3.2-json
- 	datahash = dc7b0ff0f8ea1c44df7024a4f7983487004d18d8af1b23a8a6d579715019b678
+ 	datahash = 7a66613bea475be246af7082205a84918c15d8002be470419a867731f3b539ea
  	"""
  )

Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/bake/console.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/adapter.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/capture.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/clock.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/compatible/logger.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/event/failure.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/event/generic.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/event/spawn.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/event.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/filter.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/format/safe.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/format.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/interface.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/logger.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/default.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/failure.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/null.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/sensitive.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/serialized.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/split.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/terminal.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output/wrapper.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/output.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/progress.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/resolver.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/terminal/formatter/failure.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/terminal/formatter/progress.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/terminal/formatter/spawn.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/terminal/text.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/terminal/xterm.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/terminal.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/version.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console/warn.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/lib/console.rb
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/license.md
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/readme.md
Added: /usr/lib/ruby/gems/3.2.0/gems/console-1.29.0/releases.md
Added: /usr/lib/ruby/gems/3.2.0/specifications/console-1.29.0.gemspec
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/bake/console.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/adapter.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/capture.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/clock.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/compatible/logger.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/event/failure.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/event/generic.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/event/spawn.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/event.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/filter.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/format/safe.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/format.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/logger.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/default.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/null.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/sensitive.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/serialized.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/split.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/terminal.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output/wrapper.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/output.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/progress.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/resolver.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/terminal/formatter/failure.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/terminal/formatter/progress.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/terminal/formatter/spawn.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/terminal/text.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/terminal/xterm.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/terminal.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console/version.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/lib/console.rb
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/license.md
Deleted: /usr/lib/ruby/gems/3.2.0/gems/console-1.27.0/readme.md
Deleted: /usr/lib/ruby/gems/3.2.0/specifications/console-1.27.0.gemspec

@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 Nov 11, 2024
@mamccorm mamccorm enabled auto-merge (squash) November 11, 2024 00:08
@mamccorm mamccorm merged commit b60f441 into main Nov 11, 2024
22 checks passed
@mamccorm mamccorm deleted the wolfictl-a4bbb5df-ab89-42c1-865f-2a596e40177f branch November 11, 2024 02:16
@mamccorm mamccorm self-assigned this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants