tgotwig / homebrew-feroxbuster

0 stars 0 forks source link

πŸ‘· Add to Homebrew-Core #5

Closed bee-san closed 3 years ago

bee-san commented 4 years ago

Hey Thomas! πŸ‘‹

I saw your contribution to Feroxbuster, and as the RustScan core dev I thought I'd show you something helpful.

I spent a good while on the homebrew-core formula, so feel free to copy it for Feroxbuster.

class Rustscan < Formula
  desc "Modern Day Portscanner"
  homepage "https://github.com/rustscan/rustscan"
  url "https://github.com/RustScan/RustScan/archive/1.10.0.tar.gz"
  sha256 "63c387c645826107734eb10d45b0a540a69fb3a61e478593f515adce95bad530"
  license "GPL-3.0-or-later"

  bottle do
    cellar :any_skip_relocation
    sha256 "3f6072b555545a3efe33cc84aec3ba11c8110b038fe51cd1ec95be921e44fe16" => :catalina
    sha256 "29b494ff1b888b9cd2e94a61168236ccab5a2030a923efc490706301dcfe7bef" => :mojave
    sha256 "03b01fce247218e8dd5e60565199c61e4d458ab0d66f9952a2bbf158d04c9f0f" => :high_sierra
  end

  depends_on "rust" => :build
  depends_on "nmap"

  def install
    system "cargo", "install", *std_cargo_args
  end

  test do
    assert_no_match /panic/, shell_output("#{bin}/rustscan --greppable 127.0.0.1")
    assert_no_match /panic/, shell_output("#{bin}/rustscan --greppable 0.0.0.0")
  end
end

The tests run by grepping the output for the regex /panic/. So if the Rust program doesn't panic, it's a-okay!

Not sure on how much you know about core, so I'll share a few things:

Other than that, good luck if you choose to contribute to core! Feel free to ping me in a PR if you need any more help :smile:

tgotwig commented 4 years ago

Hello again Bee! πŸ™‹β€β™‚οΈ

Thank you very much for this! I'll take a closer look soon πŸ•΅οΈ btw nice title! Follows modern best-practices 🌟✨

I think to publish on Homebrew-Core it needs min. 30 forks, 30 watchers and 75 stars (at least for linuxbrew-core πŸ˜„).

bee-san commented 4 years ago

For what it's worth πŸ‘† I found that submitting to homebrew-core made someone submit it to linuxbrew-core πŸ’­ soooo my guess is that if you submit to one, someone will submit to both? πŸ€”

tgotwig commented 4 years ago

@bee-san Haha yeah that would explain why there are sometimes formulas for Linux but nothing about that inside the projects main readme! πŸ˜„

Hmmm maybe you know what the following error from the homebrew-core tests mean? What to do? πŸ€”

Formula/feroxbuster.rb#L8
https://github.com/epi052/feroxbuster/releases/download/v1.0.3/x86_64-macos-feroxbuster.tar.gz looks like a binary package, not a source archive; homebrew/core is source-only.
bee-san commented 4 years ago

Ah yes, that might be one of those ones that can be skipped. 😒 The homebrew-core tests are sometimes wrong, when I submitted my PR I had about ~3 checks that failed. One of them was really stupid ❓ "Version number in URL does not match version listed" despite the 2 versions were matching.

I think if you submit it, the core team will overlook it because it's clearly not a binary package πŸ˜‡

tgotwig commented 4 years ago

I think I will try again in one week or so after adding the build-stuff to the formula πŸ”§πŸ™ƒ

tgotwig commented 3 years ago

If somebody else like to continue on that, feel free to go for it πŸ™ˆπŸ”§

epi052 commented 3 years ago

@dnaka91 took care of this :tada: