Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New formula: mbuffer v20130220 #31018

Closed
wants to merge 1 commit into from

7 participants

@dch

Passes brew audit and brew test uses the mac port from lundman of zfs-osx fame

@dch

/cc @tristan-k who asked for this in April in #28702

@mistydemeo mistydemeo commented on the diff
Library/Formula/mbuffer.rb
@@ -0,0 +1,17 @@
+require "formula"
+
+class Mbuffer < Formula
+ homepage "http://www.maier-komor.de/mbuffer.html"
@mistydemeo Owner

Is this the right homepage for the version you're using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mikemcquaid mikemcquaid commented on the diff
Library/Formula/mbuffer.rb
@@ -0,0 +1,17 @@
+require "formula"
+
+class Mbuffer < Formula
+ homepage "http://www.maier-komor.de/mbuffer.html"
+ url "http://lundman.net/ftp/osx.zfs/mbuffer-20130220-osx.tgz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jacknagel
Owner

Feedback needs to be addressed.

@dch

Thanks for the review @mikemcquaid, upstream doesn't work on OSX (not tested), also fails:

checking for library containing clock_gettime... no
configure: error: could not find the library containing clock_gettime!

The upstream owner apparently rejected the necessary patches for OSX & lundman has provided a build / tarball with the necessary changes - see https://openzfsonosx.org/forum/viewtopic.php?f=26&t=575 for the full story.

I've looked and there is no simple patch between mbuffer the official release and mbuffer the OSX-compatible one, at least for my level of C.

We can either skip the recipe, wait for somebody else to fiddle the C, or roll with this slightly unorthodox approach. I'm easy either way, at worst I can publish the brew url to zfs-osx users.

@mikemcquaid
Owner

@dch I think we'll need to skip this and try to work with upstream to get some of these merged. Otherwise we include as mbuffer-osx and point to the correct homepage (if one exists).

@tdsmith
Owner

Passing, per discussion; can reopen if you want to do this as mbuffer-osx.

@tdsmith tdsmith closed this
@steveschnepp

I think most use cases of mbuffer can be addressed by pv which is already in brew.

@ilovezfs

@mikemcquaid Is this the sort of thing you have in mind?
https://github.com/ilovezfs/mbuffer-osx

@mikemcquaid
Owner

@ilovezfs As it's two hours old: no. In a few months if it gets popular: maybe.

@ilovezfs

@mikemcquaid The idea for now is possibly to distribute it with OpenZFS on OS X, so not sure its implicit popularity would register in that case, assuming people do find it useful.

@ilovezfs

@mikemcquaid Another possibility might be to use this commit as a Homebrew patch against upstream mbuffer, and make the formula "mbuffer," as originally proposed by dch:
ilovezfs/mbuffer-osx@6cffde9

@mikemcquaid
Owner

If we can't get this working unpatched it needs to be treated as a separate project with the relevant notability guidelines.

@ilovezfs

Here's where things stand with the upstream developer:

Hi Joe,

this patch is well known to me. The problem is that it just enables
mbuffer to compile on OS X and run with some very basic functionality.
I.e. several features are broken with this patch. The reason is that
mac_sem_getvalue unconditionally returns 0 instead of the real semaphore
value. This is a limitation of OS X, which is just lacking this
function. There is no easy way to fix this, as you would need to
reimplement the complete semaphore infrastructure, to get everything
working.

I am willing to integrate a patch for OS X, if the patch doesn't come
with that kind of severe limitation. Features that are broken with this
patch are at least: Display of buffer status and high-/low-watermark
functionality and probably also multi target streaming.

I don't know if these limitations are documeted somewhere in the patch
(at least they should).

Integrating such a patch that breaks important core functionality would
do no good for mbuffer reputation.

So, sorry - I have to reject it. Feel free to send me a patch that
resolves this problem - then I will reconsider the suppoert of OS X.

Cheers,
Thomas

Am 08.01.2015 um 20:39 schrieb ilove zfs:
Hi,

Jorgen Lundman was able to port mbuffer to OS X. I have posted the
code on GitHub here:
https://github.com/ilovezfs/mbuffer-osx

The particular changes needed are found in this commit:
ilovezfs/mbuffer-osx@6cffde9

Any chance of getting OS X compatibility "upstreamed"? This seems to
be a sticking point with getting mbuffer included into Homebrew as you
can see here: #31018

Thanks,
Joe

@mikemcquaid
Owner

@ilovezfs Thanks for letting me know. I think him and I are on the same page; we want to get this included but not a version that's badly broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 0 deletions.
  1. +17 −0 Library/Formula/mbuffer.rb
View
17 Library/Formula/mbuffer.rb
@@ -0,0 +1,17 @@
+require "formula"
+
+class Mbuffer < Formula
+ homepage "http://www.maier-komor.de/mbuffer.html"
@mistydemeo Owner

Is this the right homepage for the version you're using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ url "http://lundman.net/ftp/osx.zfs/mbuffer-20130220-osx.tgz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ sha1 "7b333f4706506576d43b9391e2af581473125416"
+
+ def install
+ system "./configure", "--prefix=#{prefix}"
+ system "make", "install"
+ end
+
+ test do
+ # test by sending mbuffer itself to devnull and hashing it
+ system "#{bin}/mbuffer", "-i", "#{bin}/mbuffer", "-o", "/dev/null", "--md5"
+ end
+end
Something went wrong with that request. Please try again.