← Back to issue list

Rockcraft wipes working directory

View original Github issue

Metadata

Project
rockcraft
Number
#132
Type
issue
State
open
Author
jardon
Labels
Created
Updated
Closed

Current evaluation

Rockcraft's organize key can wipe the host working directory when a user maps /root/project (the project mountpoint) to another path. Maintainer agreed a safeguard is needed; no fix found yet, and a contributor offered to take it on in March 2026.

Suggested action: keep open

Reason: Maintainer tigarmo explicitly agreed the behavior is undesirable and that a safeguard should be added ("we'll do something for sure"), and a contributor offered to take it on in the latest comment (2026-03-18). No fix has been merged in rockcraft; the related craft-parts fix (#1562, reject organize sources outside install dir) may partially address it but is not confirmed to cover the /root/project mountpoint case, so the issue remains valid and actionable.

Impact: 55 Quick Win: 30.25 Staleness: 35 Complexity: 45 Confidence: 70 Support Request: 20

Issue body

When running rockcraft with the organize option, the working directory gets completely wiped. Steps to reproduce: ```bash git clone git@github.com:jardon/zookeeper-rock.git git checkout wipe-workdir rockcraft -v ``` Here is the verbose output: ``` Starting Rockcraft 0.0.1.dev1 Logging execution to '/home/jardon/.cache/rockcraft/log/rockcraft-20221021-081009.128623.log' Launching instance... Starting Rockcraft 0.0.1.dev1 Logging execution to '/tmp/rockcraft.log' Retrieving base ubuntu:20.04 Retrieved base ubuntu:20.04 for amd64 Extracting ubuntu:20.04 Extracted ubuntu:20.04 Initializing parts lifecycle Executing parts lifecycle Executing parts lifecycle: skip pull pebble (already ran) Executing action Executed: skip pull pebble (already ran) Executing parts lifecycle: skip pull zookeeper (already ran) Executing action Executed: skip pull zookeeper (already ran) Executing parts lifecycle: skip overlay pebble (already ran) Executing action Executed: skip overlay pebble (already ran) Executing parts lifecycle: skip overlay zookeeper (already ran) Executing action Executed: skip overlay zookeeper (already ran) Executing parts lifecycle: skip build pebble (already ran) Executing action Executed: skip build pebble (already ran) Executing parts lifecycle: build zookeeper Executing action Removing suid/guid from /root/parts/zookeeper/install/bin/su Removing suid/guid from /root/parts/zookeeper/install/usr/bin/newgrp /root/parts/zookeeper/install/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts will be a dangling symlink Removing suid/guid from /root/parts/zookeeper/install/sbin/pam_extrausers_chkpwd Removing suid/guid from /root/parts/zookeeper/install/sbin/unix_chkpwd :: + cp conf/zoo_sample.cfg conf/zoo.cfg :: + cp -r ./LICENSE.txt ./NOTICE.txt ./README.md ./README_packaging.md ./bin ./conf ./docs ./lib /root/parts/zookeeper/install /root/project: Device or resource busy Full execution log: '/tmp/rockcraft.log' craft-providers error: Failed to execute pack in instance. Full execution log: '/home/jardon/.cache/rockcraft/log/rockcraft-20221021-081009.128623.log' ``` Here is the [log](https://pastebin.com/YXAVDsph)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 55
Quick Win: 30.25
Staleness: 35
Complexity: 45
Confidence: 70
Support Request: 20
keep open Rockcraft's organize key can wipe the host working directory when a user maps /root/project (the project mountpoint) to another path. Maintainer agreed a safeguard is needed; no fix found yet, and a contributor offered to take it on in March 2026.
qwen/qwen3.6-35b-a3b
Staleness: 55
Complexity: 20
Confidence: 80
Support Request: 10
needs triage Rockcraft wipes working directory when using the organize option. Maintainers agreed a safeguard is needed, but the issue lacks labels and assignee after nearly four years. A contributor recently offered to implement the fix, awaiting formal triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 20
Confidence: 85
Support Request: 5
keep open Rockcraft's organize directive can accidentally wipe the host working directory when pointing to /root/project. Maintainers acknowledged the problem and agreed to add a safeguard, but it remains unaddressed after nearly 4 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 25
Confidence: 80
Support Request: 15
keep open Rockcraft's organize option accidentally wipes the host working directory when mapping /root/project. The issue is open and awaiting assignment, with a contributor ready to implement a safeguard or warning.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-parts#1562 (confidence 55%)

    craft-parts fix 'reject sources outside install dir' may prevent organizing from /root/project, but it is not confirmed to cover the mountpoint case or be picked up by rockcraft's current dependency.

Related issues

No related issues found above the similarity threshold.