trailofbits / trailofbits/coop

Installing missing host packages assumes apt

Open
#456 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
243
Forks
13
Avg merge
1d 20h
Merged PRs (30d)
30

Description

coop setup installs its missing host packages with apt-get
(src/setup.rs:1050-1060),
so on a non-apt host setup aborts as soon as one of them is absent. This is currently undocumented.

Every other apt-get coop runs is inside the Ubuntu guest rootfs, so this is
the only call site that depends on the host distribution.

On Arch, setup clears the host checks and stops here:

=> Missing system packages
  Need to install: debootstrap squashfs-tools openssh-client rsync
sudo: apt-get: command not found

Proposed Solutions

  1. Report that installation of missing packages is only supported on systems
    using apt as their package manager.
  2. Detect the package manager (pacman / dnf / zypper) and map the six
    names in install_system_packages
    (src/setup.rs:1019-1039).

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.

Research direction

Start in src/setup.rs:1019-1060, inspecting install_system_packages and the host apt-get call. Decide whether to report apt-only support or map the listed packages for pacman, dnf, and zypper; done means coop setup no longer aborts unexpectedly on the supported non-apt behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.