bst shell work directory no longer at /buildstream-build on buildstream 2.6.0

Open
#2,082 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli, tooling

Research direction

Reproduce the regression by running the shown bst shell utils/generate-cve-report.bst commands with BuildStream 2.5.0 and 2.6.0, then test the bst shell path with --mount cve /buildstream-build. Trace the shell entry point and verify that the mounted files remain accessible at the expected working directory without breaking the 2.6.0 behavior.

Written by the indexing model from the issue text.

Description

enhancement

In buildstream 2.5.0 and before, bst shell <element.bst> will start the shell in /buildstream-build, e.g.

src # bst --version
2.5.0
src # bst shell utils/generate-cve-report.bst
[--:--:--][        ][    main:core activity                 ] START   Loading elements
[00:00:00][        ][    main:core activity                 ] SUCCESS Loading elements
[--:--:--][        ][    main:core activity                 ] START   Resolving elements
[00:00:00][        ][    main:core activity                 ] SUCCESS Resolving elements
[--:--:--][        ][    main:core activity                 ] START   Initializing remote caches
[00:00:01][        ][    main:core activity                 ] SUCCESS Initializing remote caches
[--:--:--][        ][    main:core activity                 ] START   Query cache
[00:00:01][        ][    main:core activity                 ] SUCCESS Query cache
[--:--:--][6deaf86b][    main:utils/generate-cve-report.bst ] START   Staging dependencies
[00:00:00][6deaf86b][    main:utils/generate-cve-report.bst ] SUCCESS Staging dependencies
[--:--:--][6deaf86b][    main:utils/generate-cve-report.bst ] START   Integrating sandbox
[00:00:00][6deaf86b][    main:utils/generate-cve-report.bst ] SUCCESS Integrating sandbox
[--:--:--][6deaf86b][    main:utils/generate-cve-report.bst ] STATUS  Running command

    sh -i

<:/buildstream-build]$ pwd
/buildstream-build

In buildstream 2.6.0, the work directory is instead /

src # bst --version
2.6.0
src # bst shell utils/generate-cve-report.bst
[--:--:--][        ][    main:core activity                 ] START   Loading elements
[00:00:00][        ][    main:core activity                 ] SUCCESS Loading elements
[--:--:--][        ][    main:core activity                 ] START   Resolving elements
[00:00:00][        ][    main:core activity                 ] SUCCESS Resolving elements
[--:--:--][        ][    main:core activity                 ] START   Initializing remote caches
[00:00:01][        ][    main:core activity                 ] SUCCESS Initializing remote caches
[--:--:--][        ][    main:core activity                 ] START   Query cache
[00:00:00][        ][    main:core activity                 ] SUCCESS Query cache
[--:--:--][6deaf86b][    main:utils/generate-cve-report.bst ] START   Staging dependencies
[00:00:00][6deaf86b][    main:utils/generate-cve-report.bst ] SUCCESS Staging dependencies
[--:--:--][6deaf86b][    main:utils/generate-cve-report.bst ] START   Integrating sandbox
[00:00:00][6deaf86b][    main:utils/generate-cve-report.bst ] SUCCESS Integrating sandbox
[--:--:--][6deaf86b][    main:utils/generate-cve-report.bst ] STATUS  Running command

    sh -i

<te-cve-report.bst:/]$ pwd
/
<te-cve-report.bst:/]$ ls
bin  dev  etc  lib  lib64  proc  sbin  tmp  usr  var

We have issue when some files are mounted to /buildstream-build and are accessed by relative path with bst shell <element> --mount cve /buildstream-build -- <script-accessing-mounted-files>

Dominant language
Python
Stars
144
Forks
45
Avg merge
20h 38m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/buildstream

All issues in apache/buildstream

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.