-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
newnode 2.1.5 (new formula) #162683
newnode 2.1.5 (new formula) #162683
Conversation
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be vendoring a bunch of homebrew formula, which violates: https://docs.brew.sh/Acceptable-Formulae#stuff-that-requires-vendored-versions-of-homebrew-formulae
Entering 'libevent'
Entering 'libsodium'
The codebase of newnode uses internal headers of
Would that be a reasonable compromise to resolve this issue? |
@SMillerDev any update on this? I can try and look into fixing #162684 (though, I can't promise it), and we're very interested in making the project (d2d vpn with dht) accessible for mac users. |
Have they been submitted upstream? Then we can just patch the libevent formula |
The fork of libevent we're using has in part been submitted in a series of pull requests (see https://github.com/libevent/libevent/pulls/ghazel), and they might be resubmitted down the line. But this would take a considerable amount of time. In the meantime, we use features like allow external access to evdns cache, as well as internal headers and ones resulting from compiling libevent (e.g. evconfig.h). @SMillerDev what do you mean by patching libevent formula, and does it allow for this flexibility? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I have some concerns I need addressed before we attempt to move forward with this.
further inspection of https://github.com/clostra/newnode/blob/master/build.sh and subsequent build tests confirm that wget isnt needed on mac os
instead of assuming that the proxy is already run as a service, run it in a fork and kill at completion
linux builds currently rely on a hard-coded wget binary, which needs to change upstream to non-hardcoded binary
fix brew audit fail due to non-alphabetic ordering of dependencies
most of the dependencies specified so far are actually build-time only, and pkg-config was not specified at all
updated newnode-helper to 2.1.5, with updated dependencies and no dependency on mbedtls
We've released the new version which should be more compatible with homebrew's policy:
Does this provide a way forward with this PR? |
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Any update on this? @SMillerDev I believe most comments have been addressed. |
Formula/n/newnode.rb
Outdated
begin | ||
Timeout.timeout(5) do | ||
Process.wait(pid) | ||
end | ||
rescue Timeout::Error | ||
Process.kill("KILL", pid) # Forcefully kill if not terminated after timeout | ||
Process.wait(pid) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we expect it not to be killed by the kill above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the second kill
Anything else that need be addressed? @SMillerDev |
Any further updates on this? @SMillerDev |
Please don't open PR's from organization forks. It prevents maintainers from pushing fixes, and also breaks our merge process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, but I don't think we can look past the vendor-ing of multiple pieces of software that are provided by Homebrew.
There are already plenty of existing formulae that do this. We're trying to fix them so they stop doing that, but adding another formula that does it just makes that job harder.
Apologies for the extended review process here. We still appreciate the work you put in. I've left suggestions that will help you improve the formula for when it's ready for inclusion into Homebrew/core.
If you wish, you can host this formula in your own tap until then. Here are some docs to help you get started:
https://docs.brew.sh/Taps
https://docs.brew.sh/Interesting-Taps-and-Forks
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
https://brew.sh/2020/11/18/homebrew-tap-with-bottles-uploaded-to-github-releases/
on_macos do | ||
depends_on xcode: ["9.3", :build] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need the on_macos
block here.
tag: "2.1.5", | ||
revision: "18a3f713267b2a08e34cbe04253df891889997a2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tag: "2.1.5", | |
revision: "18a3f713267b2a08e34cbe04253df891889997a2" | |
tag: "2.1.5", | |
revision: "18a3f713267b2a08e34cbe04253df891889997a2" |
Align the arguments of url
. Though, we really should use a tarball instead of a Git checkout.
depends_on "gnu-sed" => :build | ||
depends_on "grep" => :build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends_on "gnu-sed" => :build | |
depends_on "grep" => :build |
It's unlikely that these are needed, since sed
and grep
are POSIX commands.
on_linux do | ||
depends_on "gnu-sed" => :build | ||
depends_on "grep" => :build | ||
depends_on "llvm" => :build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes this
uses_from_macos "llvm" => :build
(outside of the on_linux
block.
if OS.linux? | ||
inreplace "https_wget.c", "/usr/bin/wget", "#{Formula["wget"].opt_bin}/wget" | ||
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if OS.linux? | |
inreplace "https_wget.c", "/usr/bin/wget", "#{Formula["wget"].opt_bin}/wget" | |
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" | |
end | |
inreplace "https_wget.c", "/usr/bin/wget", "#{Formula["wget"].opt_bin}/wget" if OS.linux? |
unless brew
complains about the line being too long, in which case,
if OS.linux? | |
inreplace "https_wget.c", "/usr/bin/wget", "#{Formula["wget"].opt_bin}/wget" | |
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" | |
end | |
if OS.linux? | |
inreplace "https_wget.c", "/usr/bin/wget", "#{Formula["wget"].opt_bin}/wget" | |
end |
path = (var/"cache/newnode") | ||
path.mkpath | ||
path.chmod 0775 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be in a post_install
method.
begin | ||
system "curl", "https://brew.sh" | ||
ensure | ||
sleep 5 | ||
Process.kill("TERM", pid) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
begin | |
system "curl", "https://brew.sh" | |
ensure | |
sleep 5 | |
Process.kill("TERM", pid) | |
end | |
system "curl", "https://brew.sh" | |
sleep 5 | |
ensure | |
Process.kill("TERM", pid) |
I don't think you need the begin
block here.
@p-linnane sure, we can either allow access to avoid re-creating this PR or open it from a personal account. Sorry, I didn't realize there was an issue.
@carlocab if we excluded |
@carlocab @SMillerDev should I move these questions somewhere else, e.g. discussions/issues? I understand the concern, but I don't know how to resolve it without some back-and-forth given that the same newnode repo is used for building ios and android packages too. We really want the package to be included but we don't want to spend your time and mental energy figuring out too many nuances. |
Essentially we don't want to vendor anything. If the software was super popular (think Chrome or Nginx) we might lift that restriction, but since this tool is not I'd suggest upstreaming your fixes and then you can try again. Or, as other maintainers pointed out, make a tap. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?Newnode is an open-source decentralized Content Distribution Network (https://github.com/clostra/newnode).
This is a rewrite of #153960 with brew services in mind. Tested on intel OSx 14 Sonoma.