-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
libcdio-paranoia 10.2+0.94+2 (new formula) #27347
Conversation
…isting libcdui.rb This commit add the formula to support libcdio-paranoia on homebrew. The source page is https://www.gnu.org/software/libcdio/ for further information and documentation on this package.
Changes to fix problems and coply with the standards required by homebrew.
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.
Could you explain what is the difference between this and our existing cdparanoia
and libcdio
formulas?
Formula/libcdio-paranoia.rb
Outdated
mirror "https://ftpmirror.gnu.org/libcdio/libcdio-paranoia-10.2+0.94+2.tar.gz" | ||
sha256 "d60f82ece97eeb92407a9ee03f3499c8983206672c28ae5e4e22179063c81941" | ||
|
||
depends_on "libcdio" => :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.
=> :build
should be removed
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 is my first time to submit a formula. I will change this.
Formula/libcdio-paranoia.rb
Outdated
@@ -0,0 +1,20 @@ | |||
class LibcdioParanoia < Formula | |||
desc "The cd-paranoia audio-cd ripper based on libcdio" |
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.
Audio CD ripper based on libcdio
would be shorter
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.
Changed the description.
Formula/libcdio-paranoia.rb
Outdated
sha256 "d60f82ece97eeb92407a9ee03f3499c8983206672c28ae5e4e22179063c81941" | ||
|
||
depends_on "libcdio" => :build | ||
depends_on "pkg-config" => :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.
Move build dep (pkg-config) above runtime dep (libcdio)
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.
I made this change per your request.
Formula/libcdio-paranoia.rb
Outdated
end | ||
|
||
test do | ||
assert_match /cdparanoia III release 10.2/, shell_output("#{bin}/cd-paranoia -V", 0) |
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.
We need a test that exercises the some of the functionality of the app.
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.
Testing the functionality is going to be near impossible, but testing that the code executes is achievable.
Formula/libcdio-paranoia.rb
Outdated
depends_on "pkg-config" => :build | ||
|
||
def install | ||
system "./configure", "--without-versioned-libs", |
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 --without-versioned-libs
?
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.
Also: does configure
support --disable-dependency-tracking
and/or --disable-silent-rules
? If so, include them.
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.
The linker in macOS do not support it. It won't build without it.
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.
I added --disable-dependency-tracking and/or --disable-silent-rules per your suggestion. Thank you for the feedback as this is my first formula.
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.
All changes were performed.
|
class LibcdioParanoia < Formula | ||
desc "Audio CD ripper based on libcdio" | ||
homepage "https://www.gnu.org/software/libcdio/" | ||
url "https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-10.2+0.94+2.tar.gz" |
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.
What is the version number here? How does it work?
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.
I am not the author of the program. I am only providing a formula for the package to build under home brew. I am not sure how their versioning work.
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.
I did some sleuthing, and it looks like 10.2 refers to the CDDA Paranoia version, 0.94 refers to the libcdio
version, and +2
is some kind of revision number.
end | ||
|
||
test do | ||
assert_match /cdparanoia/, shell_output("#{bin}/cd-paranoia -V 2>&1", 0).partition(" ").first |
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.
We are going to need to test some operation. If nothing is possible, at least try to do something and check that we get the correct error (exit code and error message).
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 check is similar to the one from the cdparanoia formula. This library and binary are functionally the same as cdparanoia, but the main difference is that this is being actively maintain and it is supported in multiple platforms as it uses libcdio, which already exists in homebrew, to abstract all cd operations.
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.
Barrier is higher for tests on new formulas, than existing tests (which we're trying to improve over time, but we have lots of formulas).
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.
There is nothing noted in the documentation about this and there is not a lot of guidance on what are the requirements either.
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.
Try to perform some operation, and check that it fails. See for example formulas like fabio
, gist
, unravel
, etc.
Please let me know what are the next steps as this is a new process for me. |
|
The changes you requested are done. |
Formula/libcdio-paranoia.rb
Outdated
@@ -0,0 +1,26 @@ | |||
require "English" |
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.
Remove this.
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.
Could you please point me to an example where they are checking the return code without using $?. I tried and the audit failed and suggested that I use the English module.
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.
@marivera Try taking a look at https://www.rubydoc.info/github/Homebrew/brew/master/Homebrew/Assertions
(though I am not sure how helpful it will prove...)
fxcoudert, I added checking for the exit code. Could you please review? Thanks! |
Is anyone looking at this at all? |
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.
Currently the version on this is broken, and will probably need to be set explicitly. (The version currently being detected is 2, which is clearly incorrect.)
…omatically detect the version out of the tar file name.
All changes requested have been done. |
I think the kind of punitive, arbitrary and undocumented requirements that fxcoudert imposes to be able to submit a formula, will discourage people like me to invest time into making homebrew better. Sorry about wasting your time. Good luck. |
If it's the testing requirement you're talking about, it's documented here:
Our requirements aren't punitive or arbitrary, although they are sometimes less-than-perfectly documented (we all work on this in our spare time). Please don't make it personal by singling maintainers out. I'd like to help you get this formula merged, if you're still interested. It looks pretty close to me -- all it really needs is a more substantive test. In this case, testing the output and failure of |
What I was referring to is the fact that this formula does not differ too much from the cdparanoia formula which is already approved. I tried to do the same to make sure I come as close as possible to an already approved formula, but that is not good enough anymore. The requirement I am talking about is the fact that there is no guideline of what is good enough given the fact that many formulas are very minimalistic of their tests. I was not slinging the maintainer, I was bringing to his attention the lack of objectivity in the process. BTW, I am also contributing my time to support this as well. I am not affiliated with libcdio or GNU or homebrew. |
libcdio-paranoia.rb
This commit add the formula to support libcdio-paranoia on homebrew. The source
page is https://www.gnu.org/software/libcdio/ for further information and
documentation on this package.
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?