From ee6d79e978558d1d49cf8965fb92806b210aaa20 Mon Sep 17 00:00:00 2001 From: Andrew Newton Date: Mon, 27 Jan 2025 09:55:24 -0500 Subject: [PATCH 1/4] icann-rdap v0.0.21 (new formula) This is a new formula for the icann-rdap command line RDAP client. This formula uses the Rust build system and specifies a path for the icann-rdap-cli crate. This formula installs two binaries: rdap and rdap-test. --- Formula/i/icann-rdap.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Formula/i/icann-rdap.rb diff --git a/Formula/i/icann-rdap.rb b/Formula/i/icann-rdap.rb new file mode 100644 index 0000000000000..77c5a98904805 --- /dev/null +++ b/Formula/i/icann-rdap.rb @@ -0,0 +1,34 @@ +class IcannRdap < Formula + desc "Full-rich client for the Registry Data Access Protocol (RDAP) sponsored by ICANN" + homepage "https://github.com/icann/icann-rdap/wiki" + url "https://github.com/icann/icann-rdap/archive/refs/tags/v0.0.21.tar.gz" + sha256 "252b112776fae0160f539e20b70ff24b6f2bea7551c9476ccd6f7651c7b861d0" + license any_of: ["Apache-2.0", "MIT"] + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + conflicts_with "rdap", because: "rdap also ships a rdap binary" + + def install + system "cargo", "install", "--bin=rdap", *std_cargo_args(path: "icann-rdap-cli") + system "cargo", "install", "--bin=rdap-test", *std_cargo_args(path: "icann-rdap-cli") + end + + test do + # check version of rdap + assert_match "icann-rdap-cli #{version}", shell_output("#{bin}/rdap -V") + + # check version of rdap-test + assert_match "icann-rdap-cli #{version}", shell_output("#{bin}/rdap-test -V") + + # lookup com TLD at IANA with rdap + output = shell_output("#{bin}/rdap -O pretty-json https://rdap.iana.org/domain/com") + assert_match '"ldhName": "com"', output + + # test com TLD at IANA with rdap-test + output = shell_output("#{bin}/rdap-test -O pretty-json --skip-v6 -C icann-error https://rdap.iana.org/domain/com") + assert_match '"status_code": 200', output + end +end From 8a37264bb00e7ac0ada6c6457048ae2c0299cf77 Mon Sep 17 00:00:00 2001 From: Andrew Newton Date: Mon, 27 Jan 2025 09:58:28 -0500 Subject: [PATCH 2/4] rdap: fix conflict between rdap and icann-rdap Both formula install an rdap executable binary and are therefore in conflict. This commit adds the conflict to rdap while the conflict is in icann-rdap in another commit. --- Formula/r/rdap.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Formula/r/rdap.rb b/Formula/r/rdap.rb index dddad93bfaf22..bd3a07fb49a59 100644 --- a/Formula/r/rdap.rb +++ b/Formula/r/rdap.rb @@ -19,6 +19,8 @@ class Rdap < Formula depends_on "go" => :build + conflicts_with "icann-rdap", because: "icann-rdap also ships a rdap binary" + def install system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/rdap" end From 3efd9802b14ffea59c9c8615cd111bddf12fe3ad Mon Sep 17 00:00:00 2001 From: Daeho Ro Date: Sun, 2 Feb 2025 05:54:25 +0000 Subject: [PATCH 3/4] icann-rdap: add 0.0.21 bottle. --- Formula/i/icann-rdap.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/i/icann-rdap.rb b/Formula/i/icann-rdap.rb index 77c5a98904805..5f6639bde86dd 100644 --- a/Formula/i/icann-rdap.rb +++ b/Formula/i/icann-rdap.rb @@ -5,6 +5,15 @@ class IcannRdap < Formula sha256 "252b112776fae0160f539e20b70ff24b6f2bea7551c9476ccd6f7651c7b861d0" license any_of: ["Apache-2.0", "MIT"] + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90dd2871061dbb621157244693df3d361072e015af84f8ab2ab3b48851889fd0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "425f54cbcfd6d997c1112e5a12ed9bfd23932c1c339dd95d7f1d515f4a925349" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fb5fd0c882692fbc37f38f26ff38a4e365eee66a9da130a1c21b9c3d0a1af2b4" + sha256 cellar: :any_skip_relocation, sonoma: "0dddb2b0fbb213392014322889534b08e38d4ca24ffb0996d15bdec21abcb1d3" + sha256 cellar: :any_skip_relocation, ventura: "d132e511cc94753fbf2c719f9b81f8944bd7470c52088dd0b45725245083dfe3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62401230680ed85dfccb10042c702f1711865443efe6e4bfde6c52898203b643" + end + depends_on "pkgconf" => :build depends_on "rust" => :build depends_on "openssl@3" From 6e9781eace29091d7949a69a28355e1e50e2c5fc Mon Sep 17 00:00:00 2001 From: Daeho Ro Date: Sun, 2 Feb 2025 05:54:27 +0000 Subject: [PATCH 4/4] rdap: update 0.9.1 bottle. --- Formula/r/rdap.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Formula/r/rdap.rb b/Formula/r/rdap.rb index bd3a07fb49a59..80adad4343a82 100644 --- a/Formula/r/rdap.rb +++ b/Formula/r/rdap.rb @@ -7,14 +7,13 @@ class Rdap < Formula head "https://github.com/openrdap/rdap.git", branch: "master" bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b0cb4f88c751e154d5154f7aa902d886a280f0d4fc45618e7887ef810dd9fe4" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "f017c594a757f00c98b0b48306a8b3a3a438d312b16a77c3840553c2debcbef4" - sha256 cellar: :any_skip_relocation, arm64_ventura: "54ea5ea4262c179ff3ce0ec8899ef858a5999e9c9c0ddef471badf66e7c3f2be" - sha256 cellar: :any_skip_relocation, arm64_monterey: "9bc124e0bb9533626c3cbb0b35c852b8c4d48ab59b1102a241a9365e755e9868" - sha256 cellar: :any_skip_relocation, sonoma: "c4879a4f4501db20b71e6ad669aceafce95d952081d1fa7c6f1b8a75a7066a98" - sha256 cellar: :any_skip_relocation, ventura: "f9ed293d7e9c2cc430465f33e9e404e662912281764f65b7142f21409625dbec" - sha256 cellar: :any_skip_relocation, monterey: "70c44872af154a6ba84ba86294b9b3c6d51e95167739cfe706ddbd5bee4e3e5b" - sha256 cellar: :any_skip_relocation, x86_64_linux: "d84e08854b7b1a1376035b1ddba94ffd6072e456f7cbe2f3a78b3bd40ed513f6" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a73abdb1f73b15293ec718621dc35982af08454db08a899d6ddcf2f279eac55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a73abdb1f73b15293ec718621dc35982af08454db08a899d6ddcf2f279eac55" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a73abdb1f73b15293ec718621dc35982af08454db08a899d6ddcf2f279eac55" + sha256 cellar: :any_skip_relocation, sonoma: "6941798ba46a5391886ce266bfb1c4b5bfeb9db8eb9cf11c33741256f0405784" + sha256 cellar: :any_skip_relocation, ventura: "6941798ba46a5391886ce266bfb1c4b5bfeb9db8eb9cf11c33741256f0405784" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d791f01848f4e8c654a1174e55a1118d8f0ac743962bba87ec7350c81e027f58" end depends_on "go" => :build