Skip to content
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

Local create-package broken by multiarch #856

Open
c0d1ngm0nk3y opened this issue Feb 14, 2025 · 2 comments
Open

Local create-package broken by multiarch #856

c0d1ngm0nk3y opened this issue Feb 14, 2025 · 2 comments

Comments

@c0d1ngm0nk3y
Copy link
Contributor

When calling create-package --destination target --version 0.0.1, it fails with

Paketo Buildpack for NPM Install 0.0.1
  https://github.com/paketo-buildpacks/npm-install
  Creating package in target
  Pre-package with ./scripts/build.sh --target linux/amd64 --target linux/arm64
unable to execute pre-package script ./scripts/build.sh --target linux/amd64 --target linux/arm64
unable to start PTY
fork/exec ./scripts/build.sh --target linux/amd64 --target linux/arm64: no such file or directory

As far as I can tell, this problem was introduced with #806

Expected Behavior

A local package is created (as before) which can be used for local testing (calling pack buildpack package --target linux/arm64 afterwards)

Current Behavior

It will try to execute the file ./scripts/build.sh --target linux/amd64 --target linux/arm64. So no arguments are allowed to be set to metadata.pre-package.

Possible Solution

build.sh could be something simple like here and always create all architectures.

Steps to Reproduce

  1. create-package --destination target --version 0.0.1

Motivations

Local packaging for testing.

@c0d1ngm0nk3y
Copy link
Contributor Author

@pacostas Could you have a look?

@pacostas
Copy link
Contributor

I dont see create-package used in any of the scripts/workflows of npm-install, and in general in all the buildpacks that are synced with the github-config/implementation. How does this affect the current implementation?

For local testing, if you use the package.sh script, you can find all the available .cnb files under the build directory. Is it something different that create-package generates?

On the metadata.pre-package you can set any kind of arch you want and it will be generated from the package.sh script. You should also include it on the metadata.include-files and also add it on the targets

Is something that package.sh script does not support compared to this implementation https://github.com/paketo-buildpacks/bellsoft-liberica/blob/main/scripts/build.sh ?

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

No branches or pull requests

2 participants