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

Melange continues building the package even though it throws a 'no such file or directory' error during package generation #1623

Open
Dentrax opened this issue Nov 6, 2024 · 0 comments

Comments

@Dentrax
Copy link
Contributor

Dentrax commented Nov 6, 2024

Tested on 0.14.10.

Repro here:

  1. Use the following Melange manifest, promitor.yaml:
package:
  name: promitor
  version: 2.11.2
  epoch: 0
  description: Bringing Azure Monitor metrics where you need them.
  copyright:
    - license: MIT
  dependencies:
    runtime:
      - dotnet-8

environment:
  contents:
    packages:
      - busybox
      - dotnet-8-sdk
      - openssf-compiler-options

pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/tomkerkhove/promitor
      tag: Scraper-v${{package.version}}
      expected-commit: a457a98b6e2920ea2751f4d07d0d8e085946eeec

  - working-directory: src
    pipeline:
      - name: "Build Promitor Scraper"
        runs: |
          # Set runtime arch
          if [[ "${{build.arch}}" == "aarch64" ]]; then
            runtime_arch="arm64"
          elif [[ "${{build.arch}}" == "x86_64" ]]; then
            runtime_arch="x64"
          fi

          dotnet publish \
            Promitor.Agents.Scraper/Promitor.Agents.Scraper.csproj \
            --configuration release \
            --output app \
            --runtime linux-$runtime_arch \
            --no-self-contained \
            /p:Version=${{package.version}} \
            -p:DebugSymbols=false \
            -p:DebugType=none

          mkdir -p "${{targets.contextdir}}"/usr/lib
          cp -dr app "${{targets.contextdir}}"/usr/lib/promitor

          mkdir -p "${{targets.contextdir}}"/usr/bin
          ln -s /usr/lib/promitor/promitor "${{targets.contextdir}}"/usr/bin/promitor

  - uses: strip
  1. Run make package/promitor
  2. See the Failed to open usr/bin/promitor: open usr/bin/promitor: no such file or directory log
  3. Expect the build succeeded and exited with zero
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

1 participant