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

midnight-commander: latest formula uses broken version 4.8.27 #97718

Closed
2 tasks done
pgpbpadilla opened this issue Mar 24, 2022 · 10 comments
Closed
2 tasks done

midnight-commander: latest formula uses broken version 4.8.27 #97718

pgpbpadilla opened this issue Mar 24, 2022 · 10 comments
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed

Comments

@pgpbpadilla
Copy link

pgpbpadilla commented Mar 24, 2022

The current formula uses a version of MC which has the bug described in: https://midnight-commander.org/ticket/4356

However, that's not a bug in the formula but in MC itself.

I'm not an expert on Homebrew formulas but I've seen other formulas that have multiple versions available via brew search, e.g.

brew search postgres
==> Formulae
check_postgres     postgresql@10      postgresql@12      [email protected]     [email protected]     qt-postgresql
postgresql ✔       postgresql@11      postgresql@13      [email protected]     postgrest          postgis

The following stable branch of MC does not have the bug: 4.8.1-stable

Having the ability to install the stable versions would be awesome :)

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

See: https://midnight-commander.org/ticket/4356

What happened (include all command output)?

See: https://midnight-commander.org/ticket/4356

What did you expect to happen?

See: https://midnight-commander.org/ticket/4356

Step-by-step reproduction instructions (by running brew commands)

See: https://midnight-commander.org/ticket/4356
@pgpbpadilla pgpbpadilla added the bug Reproducible Homebrew/homebrew-core bug label Mar 24, 2022
@SMillerDev
Copy link
Member

If this is the version that MC deems stable I don't think we can do much about it.

@cho-m cho-m added upstream issue An upstream issue report is needed and removed bug Reproducible Homebrew/homebrew-core bug labels Mar 24, 2022
@pgpbpadilla
Copy link
Author

Would it be too difficult to extend the formula to allow the installation of stable releases and not only the latest release ?

The MC repo has a couple of stable branches. I'm currently using branch: 4.8.1-stable built from sources and that solves the problem for me.

I can give it a try, I just need a pointer to the docs on how to make multiple versions of a formula available.

@SMillerDev
Copy link
Member

https://docs.brew.sh/Versions

@pgpbpadilla
Copy link
Author

Ok, sounds like a tap would be more appropriate for this purpose. I guess we can close this issue then. Thanks for looking into it.

@pgpbpadilla
Copy link
Author

Hi @SMillerDev, I'm a bit stuck creating my tap for the stable version.

I've created the following tap: pgpbpadilla/pgpb

brew tap pgpbpadilla/pgpb

And I'm able to get the information about my custom formula:

brew info midnight-commander-stable

pgpbpadilla/pgpb/midnight-commander-stable: stable 4.8.1.7 (bottled), HEAD
GNU Midnight Commander is a visual file manager
https://www.midnight-commander.org/
Conflicts with:
  minio-mc (because both install an `mc` binary)
Not installed
From: https://github.com/pgpbpadilla/homebrew-pgpb/blob/HEAD/Formula/midnight-commander-stable.rb
License: GPL-3.0-or-later
==> Dependencies
Build: pkg-config
Required: glib, libssh2, [email protected], s-lang
==> Options
--HEAD
  Install HEAD version

However, installing it fails with an error:

	> $ brew install midnight-commander-stable
	> ==> Downloading <https://ghcr.io/v2/homebrew/core/midnight-commander-stable/manifests/4.8.1.7>
	> curl: (22) The requested URL returned error: 404
	> 
	> Error: midnight-commander-stable: Failed to download resource "midnight-commander-stable<sub>bottle</sub><sub>manifest</sub>"
	> Download failed: <https://ghcr.io/v2/homebrew/core/midnight-commander-stable/manifests/4.8.1.7>

I don't understand why brew is trying to download a manifest
for my custom package from the core repo.

Am I missing some step before I can install the formula from my tap?

@pgpbpadilla pgpbpadilla reopened this Mar 25, 2022
@gromgit
Copy link
Member

gromgit commented Mar 26, 2022

It's almost certainly because:

pgpbpadilla/pgpb/midnight-commander-stable: stable 4.8.1.7 (bottled), HEAD

you left the bottle block in the formula: https://github.com/pgpbpadilla/homebrew-pgpb/blob/4b6cd606d8261adbf8453ea1ff7631a5e29e9b36/Formula/midnight-commander-stable.rb#L14-L22

Since there are no midnight-commander-stable bottles, only midnight-commander ones, your install failed. Removing the bottle block and building from source is the most expeditious way of solving this problem.

@zyv
Copy link
Contributor

zyv commented Mar 26, 2022

Hi there,

I'm one the maintainers of mc. I'm afraid that you are confused about our current release versioning. The current stable version is 4.8.27 and I'm going to release 4.8.28 soon.

The -stable branches are coming from the times, when we just took over the maintenance and were doing huge refactoring all over the place after releasing the last 4.6.x version and some 4.7.x releases. At that time we had releases like 4.8.1 and then stable versions like 4.8.1.2 and so on.

These old releases are not considered stable nowadays, these days we are just continuing with 4.8.27, 4.8.28, 4.8.29 and so on - the changes between these versions are mostly bug fixes.

Please don't use and/or package old stable branches. They are less stable than the current code, are insecure and probably don't even build properly at all.

Z.

@carlocab
Copy link
Member

@zyv thanks for dropping by. Yes, we don't plan to package the older versions of mc. The latter part of this discussion is about how @pgpbpadilla can maintain their preferred version of mc in their own personal tap.

@pgpbpadilla
Copy link
Author

I'm one the maintainers of mc. I'm afraid that you are confused about our current release versioning.

Ok, that makes sense, I was just guessing based on the branch names 😅

In any case, I believe the bug is still present when I build MC from sources: #4356

@pgpbpadilla
Copy link
Author

It's almost certainly because:

pgpbpadilla/pgpb/midnight-commander-stable: stable 4.8.1.7 (bottled), HEAD

you left the bottle block in the formula: https://github.com/pgpbpadilla/homebrew-pgpb/blob/4b6cd606d8261adbf8453ea1ff7631a5e29e9b36/Formula/midnight-commander-stable.rb#L14-L22

Since there are no midnight-commander-stable bottles, only midnight-commander ones, your install failed. Removing the bottle block and building from source is the most expeditious way of solving this problem.

That did it! 😀 ... my tap now works!

I am now able to install v4.8.1.7 with brew install

brew tap pgpbpadilla/pgpb
brew info pgpbpadilla/pgpb/midnight-commander
brew install pgpbpadilla/pgpb/midnight-commander

Thank you all @SMillerDev @gromgit @zyv

@github-actions github-actions bot added the outdated PR was locked due to age label Apr 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

6 participants