microsoft / onefuzz

A self-hosted Fuzzing-As-A-Service platform
MIT License
2.82k stars 199 forks source link

onefuzz agent does not build from github release bundle #3323

Closed cswindle closed 1 year ago

cswindle commented 1 year ago

Information

Provide detailed reproduction steps (if any)

  1. wget https://github.com/microsoft/onefuzz/archive/refs/tags/8.5.0.tar.gz
  2. tar -xzf 8.5.0.tar.gz
  3. cd onefuzz-8.5.0/src/agent
  4. cargo build

Expected result

Packages build successfully

Actual result

Package build fails while trying to build build.rs in onefuzz-agent and onefuzz-task due to the following code:

fn main() -> Result<(), Box<dyn Error>> {
    let sha = run_cmd(&["git", "rev-parse", "HEAD"])?;

Where the code is assuming that this is running in a git repo, which it won't be if the tarball is downloaded. This means that a patch needs to be applied in order to get the package building when building from source for into an RPM for example.

AB#162819

mgreisen commented 1 year ago

@cswindle can you DM me on teams please.

mgreisen commented 1 year ago

Spoke with cswindle offline.