Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump binwalk to v3 #350300

Closed
felbinger opened this issue Oct 21, 2024 · 2 comments · Fixed by #357991
Closed

Bump binwalk to v3 #350300

felbinger opened this issue Oct 21, 2024 · 2 comments · Fixed by #357991
Labels
0.kind: enhancement Add something new 6.topic: rust 9.needs: package (update) This needs a package to be updated

Comments

@felbinger
Copy link
Member

felbinger commented Oct 21, 2024

Project description

The firmware analysis tool has been rewritten in rust, according to ReFirmLabs/binwalk#691 the first release will be created in the next days.

Metadata


Add a 👍 reaction to issues you find important.

@felbinger felbinger added 0.kind: packaging request Request for a new package to be added 6.topic: rust labels Oct 21, 2024
@felbinger
Copy link
Member Author

felbinger commented Oct 27, 2024

This works so far:

{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  fontconfig,
  bzip2,
}:

rustPlatform.buildRustPackage rec {
  pname = "binwalk";
  version = "3.1.0";

  src = fetchFromGitHub {
    owner = "ReFirmLabs";
    repo = "binwalk";
    rev = "4c71ce48bda3c8f0214d56ad6c18c3a833a8dd29";
    hash = "sha256-5RgjspfTiiLyIyxr9BEHSlmjlWP02MKuSkMlQS482/E=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    fontconfig.dev
    bzip2.out
  ];

  # skip broken tests
  checkFlags = [
    "--skip=binwalk::Binwalk"
    "--skip=binwalk::Binwalk::analyze"
    "--skip=binwalk::Binwalk::extract"
    "--skip=binwalk::Binwalk::scan"
  ];

  meta = {
    description = "Firmware Analysis Tool";
    homepage = "https://github.com/ReFirmLabs/binwalk";
    changelog = "https://github.com/ReFirmLabs/binwalk/releases/tag/${src.rev}";
    license = lib.licenses.mit;
  };
}

@felbinger felbinger changed the title Package request: binwalkv3 Bumb binwalk to v3 Oct 27, 2024
@felbinger felbinger changed the title Bumb binwalk to v3 Bump binwalk to v3 Oct 27, 2024
@alexandru0-dev
Copy link
Contributor

@felbinger I've come up with the same solution basically
I've just seen now that you've changed the previous message

{
  lib,
  rustPlatform,
  fetchFromGitHub,
  versionCheckHook,
  pkg-config,
  fontconfig,
}:

rustPlatform.buildRustPackage rec {
  pname = "binwalk-v3";
  version = "5ef95bf9b40409a8ea6a9b0c85f52b249a3ef861";

  src = fetchFromGitHub {
    owner = "ReFirmLabs";
    repo = "binwalk";
    rev = "${version}";
    sha256 = "sha256-XBFo0g4ZJZBWdEr7LwjEq3KHz1wceOCvBE5pt8V+fBg=";
  };

  cargoHash = "sha256-3DCwnthZEF7DAo5unhQ9WlHcToGUtJDfJrVPxvvmxWc=";

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ fontconfig ];

  # skip broken tests
  checkFlags = [
    "--skip=binwalk::Binwalk"
    "--skip=binwalk::Binwalk::analyze"
    "--skip=binwalk::Binwalk::extract"
    "--skip=binwalk::Binwalk::scan"
  ];

  passthru.tests.can-print-version = [ versionCheckHook ];

  meta = {
    description = "Firmware Analysis Tool";
    homepage = "https://github.com/ReFirmLabs/binwalk";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ alexandru0-dev ];
  };
}

@tomodachi94 tomodachi94 added 9.needs: package (update) This needs a package to be updated 0.kind: enhancement Add something new and removed 0.kind: packaging request Request for a new package to be added labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: rust 9.needs: package (update) This needs a package to be updated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants