Skip to content
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

Closed
wants to merge 11 commits into from

Conversation

marivera
Copy link

@marivera marivera commented May 2, 2018

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.

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

marivera and others added 3 commits May 1, 2018 21:18
…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.
Copy link
Member

@fxcoudert fxcoudert left a 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?

mirror "https://ftpmirror.gnu.org/libcdio/libcdio-paranoia-10.2+0.94+2.tar.gz"
sha256 "d60f82ece97eeb92407a9ee03f3499c8983206672c28ae5e4e22179063c81941"

depends_on "libcdio" => :build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=> :build should be removed

Copy link
Author

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.

@@ -0,0 +1,20 @@
class LibcdioParanoia < Formula
desc "The cd-paranoia audio-cd ripper based on libcdio"
Copy link
Member

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the description.

sha256 "d60f82ece97eeb92407a9ee03f3499c8983206672c28ae5e4e22179063c81941"

depends_on "libcdio" => :build
depends_on "pkg-config" => :build
Copy link
Member

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)

Copy link
Author

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.

end

test do
assert_match /cdparanoia III release 10.2/, shell_output("#{bin}/cd-paranoia -V", 0)
Copy link
Member

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.

Copy link
Author

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.

depends_on "pkg-config" => :build

def install
system "./configure", "--without-versioned-libs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why --without-versioned-libs?

Copy link
Member

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.

Copy link
Author

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.

Copy link
Author

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.

@fxcoudert fxcoudert added the new formula PR adds a new formula to Homebrew/homebrew-core label May 2, 2018
@fxcoudert fxcoudert changed the title Adding a new formula libcdio-paranoia.rb to complement the already ex… libcdio-paranoia 10.2+0.94+2 (new formula) May 2, 2018
Copy link
Author

@marivera marivera left a 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.

@fxcoudert
Copy link
Member

Could you explain what is the difference between this and our existing cdparanoia and libcdio formulas?

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"
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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
Copy link
Member

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).

Copy link
Author

@marivera marivera May 2, 2018

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.

Copy link
Member

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).

Copy link
Author

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.

Copy link
Member

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.

@marivera
Copy link
Author

marivera commented May 2, 2018

Please let me know what are the next steps as this is a new process for me.

@fxcoudert
Copy link
Member

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).

@marivera
Copy link
Author

marivera commented May 3, 2018

The changes you requested are done.

@@ -0,0 +1,26 @@
require "English"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

Copy link
Author

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.

Copy link
Contributor

@JCount JCount May 4, 2018

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...)

@marivera
Copy link
Author

marivera commented May 7, 2018

fxcoudert, I added checking for the exit code. Could you please review? Thanks!

@marivera
Copy link
Author

marivera commented May 9, 2018

Is anyone looking at this at all?

Copy link
Contributor

@JCount JCount left a 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.)

@marivera
Copy link
Author

All changes requested have been done.

@marivera marivera closed this May 12, 2018
@marivera marivera deleted the libcdio-paranoia branch May 12, 2018 17:19
@marivera
Copy link
Author

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.

@woodruffw
Copy link
Member

If it's the testing requirement you're talking about, it's documented here:

We want tests that don't require any user input and test the basic functionality of the application. For example foo build-foo input.foo is a good test and (despite their widespread use) foo --version and foo --help are bad tests. However, a bad test is better than no test at all.
See cmake for an example of a formula with a good test. The formula writes a basic CMakeLists.txt file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation. Another good example is tinyxml2, which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.

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 cd-paranoia -vQd /dev/null should do the trick.

@marivera
Copy link
Author

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.

@lock lock bot added the outdated PR was locked due to age label Jun 20, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2018
@chenrui333
Copy link
Member

#204300

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new formula PR adds a new formula to Homebrew/homebrew-core outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants