Skip to content

rattler-build doesn't include license if it's symlinked #2575

Description

@pavelzw
package:
  name: magika-cli
  version: "1.1.0"

source:
  url: https://github.com/google/magika/archive/refs/tags/cli/v1.1.0.tar.gz
  sha256: 87fd85f33d2c644d657de024b83cdc36bbdcf4a2961be5e93fe74e081477076c

about:
  license_file:
    - rust/cli/LICENSE
❯ rattler-build build -r recipe/
 Processing recipe at path: /Users/pavel/projects/feedstocks/magika-cli-feedstock/recipe/recipe.yaml

 ╭─ Finding outputs from recipe
 │ Found 1 variants
 │
 │ Build variant: magika-cli-1.1.0-h60d57d3_0
 │
 │ ╭─────────────────┬─────────────╮
 │ │ Variant         ┆ Version     │
 │ ╞═════════════════╪═════════════╡
 │ │ target_platform ┆ "osx-arm64" │
 │ ╰─────────────────┴─────────────╯
 │
 ╰─────────────────── (took 0 seconds)
 Starting build of 1 outputs

 ╭─ Running build for recipe: magika-cli-1.1.0-h60d57d3_0
 │
 │ ╭─ Fetching source code
 │ │ Fetching source from url: https://github.com/google/magika/archive/refs/tags/cli/v1.1.0.tar.gz
 │ │ Found extracted source in cache: /Users/pavel/projects/feedstocks/magika-cli-feedstock/output/src_cache/1ef4c7976aa54f65_extracted
 │ │ Copying source from cache: /Users/pavel/projects/feedstocks/magika-cli-feedstock/output/src_cache/1ef4c7976aa54f65_extracted to /Users/pavel/project
 │ │ s/feedstocks/magika-cli-feedstock/output/bld/rattler-build_magika-cli_1782126931/work
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ Finalized run dependencies: this output has no run dependencies
 │
 │ ╭─ Installing build environment
 │ │ ✔ Successfully updated the build environment
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Installing host environment
 │ │ ✔ Successfully updated the host environment
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Packaging new files
 │ │ Copying done!
 │ │ Post-processing done!
 │ │ Writing test files
 │ │ Writing metadata for package
 │ │ Copying license files
 │ │ Copying recipe files
 │ │
 │ │ Files in package:
 │ │   ├─ info/about.json (69 B)
 │ │   ├─ info/hash_input.json (32 B)
 │ │   ├─ info/index.json (206 B)
 │ │   ├─ info/licenses/rust/cli/LICENSE -> ../../LICENSE
 │ │   ├─ info/paths.json (39 B)
 │ │   ├─ info/recipe/recipe.yaml (254 B)
 │ │   ├─ info/recipe/rendered_recipe.yaml (1.97 KiB)
 │ │   ├─ info/recipe/variant_config.yaml (27 B)
 │ │   └─ info/tests/tests.yaml (3 B)
 │ │
 │ │ Package statistics: 9 files (0 content, 9 metadata), total size: 2.59 KiB
 │ │ Creating target folder '/Users/pavel/projects/feedstocks/magika-cli-feedstock/output/osx-arm64'
 │ │ Compressing archive...
 │ │ Archive written to '/Users/pavel/projects/feedstocks/magika-cli-feedstock/output/osx-arm64/magika-cli-1.1.0-h60d57d3_0.conda'
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 0 seconds)
 Collecting tests from '/var/folders/rz/q1r4tv0n6ll38q18fbk419mc0000gn/T/.tmpKU6DzQ/magika-cli-1.1.0-h60d57d3_0'
 ✔ all tests passed!

 ╭─ Build summary
 │
 │ ╭─ Build summary for recipe: magika-cli-1.1.0-h60d57d3_0
 │ │ Variant configuration (hash: h60d57d3_0):
 │ │ ╭─────────────────┬─────────────╮
 │ │ │ target_platform ┆ "osx-arm64" │
 │ │ ╰─────────────────┴─────────────╯
 │ │
 │ │ Artifact: /Users/pavel/projects/feedstocks/magika-cli-feedstock/output/osx-arm64/magika-cli-1.1.0-h60d57d3_0.conda (1.72 KiB)
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 0 seconds)

rattler-build only includes the symlink but not the license. this probably might make sense from a security standpoint (at least don't resolve symlinks outside of the source directory) but is still unintentional probably. how about rattler-build instead throws an error in those cases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions