Skip to content

Commit

Permalink
lua@5.1: disable
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Feb 17, 2024
1 parent 31abe66 commit 57d73df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Formula/l/lua@5.1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LuaAT51 < Formula

# See: https://www.lua.org/versions.html#5.1
# Last release on 2012-02-17
deprecate! date: "2023-02-12", because: :deprecated_upstream
disable! date: "2024-02-16", because: :deprecated_upstream

uses_from_macos "unzip"

Expand Down

14 comments on commit 57d73df

@johnthacker
Copy link

Choose a reason for hiding this comment

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

This causes Wireshark to be unable to have Lua support, because of various changes done to Lua Wireshark can't use Lua past 5.2: https://gitlab.com/wireshark/wireshark/-/issues/10881

lua@5.1 (possibly because of Wireshark) has more recent installs in the Homebrew analytics than lua@5.3. Any way you can consider reversing this decision and leaving it deprecated?

@TangentFoxy
Copy link

Choose a reason for hiding this comment

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

disable is only supposed to be used when a formula can no longer be used. What caused this formula to break?

This removal is extremely inconvenient because LuaJIT cannot fulfill every use-case of Lua 5.1.

@KyLeggiero
Copy link

Choose a reason for hiding this comment

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

@branchvincent @MikeMcQuaid
Where's the PR for this with the reasoning for this change? It seems to me that it was just committed to master without a PR but I can't imagine that's true

@branchvincent
Copy link
Member Author

Choose a reason for hiding this comment

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

This commit is from #163028, which is following our standard deprecation/disable cycle outlined here and shouldn't have caused any surprises (at least, that's our goal. besides a period of ~6 months, we deprecated this back in 2021).

This causes Wireshark to be unable to have Lua support

I don't think we were aware of this since our wireshark has not depended on lua@5.1 since 2021: #69753. Does wireshark have documentation to point users to installing lua@5.1?

I'll check with the team and see if we can make an exception here. Typically, our advice is to create and maintain this in your own tap: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

@johnthacker
Copy link

Choose a reason for hiding this comment

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

I see that in #69753 someone brought up that wireshark didn't work with lua 5.3 or later, and someone then pointed to our (user-maintained) Wiki, which had outdated information from before 5.3 was released that simply said to install the unversioned package.

Does wireshark have documentation to point users to installing lua@5.1?

For macOS users using Homebrew and building Wireshark, we provide a script:
https://gitlab.com/wireshark/wireshark/-/blob/master/tools/macos-setup-brew.sh

Which installs all required and, with a flag, optional packages (Lua is optional, but many users do use Lua dissectors), that uses lua@5.1 as the version of Lua to install. That same script is used in our own CI/CD, where we install the optional packages.

Our documentation points people to run that script:

https://www.wireshark.org/docs/wsdg_html/#ChLibIntro
https://www.wireshark.org/docs/wsdg_html/#ChSetupUNIXBuildEnvironmentSetup

But while there a few places that mention that either 5.1 or 5.2 of Lua must be used, it could have said it in more places, and now it does.

Sorry about any confusion.

@TangentFoxy
Copy link

Choose a reason for hiding this comment

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

@branchvincent

following our standard deprecation/disable cycle outlined here

The overview on that page seems misleading to me:

disable! should be used for formulae that cannot be used.

As far as I am aware, there is no reason that lua@5.1 cannot be used?

(Thank you for linking to the tap documentation. This is something I am wholly unfamiliar with, but I will try to figure it out if an exception is not made here.)

@iMichka
Copy link
Member

Choose a reason for hiding this comment

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

As far as I am aware, there is no reason that lua@5.1 cannot be used?

When a package becomes EOL and upstream says there will be no new release; we start the deprecation cycle (sometimes early, sometimes lately).
See: https://www.lua.org/versions.html
From our perspective, Lua 5.1 should have been gone since around 17 Feb 2012 + 6 months / 1 year.

There are two reasons for that:

  • If there is a CVE opened against that package, no-one will patch it, and Homebrew has taken the route to provide only "supported" packages that get regular security patches (things have evolved over time and we want to push our users in the right direction).
  • The build might break at any moment (due to a compiler change, or really any other thing): it will then become a burden for us to fix and maintain. If upstream does not want to maintain it anymore, we will not either. And we do not like carrying patches around forever.

So technically lua@5.1 still works, but from our point of view it's a dead version that we would like to get rid of.

@iMichka
Copy link
Member

Choose a reason for hiding this comment

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

wireshark being a really important package (with more than 5000 downloads/month): we could make an exception and undisable lua@5.1.
Or we could vendor lua@5.1 inside the Wireshark formula (I prefer that solution).

We would also like to have a rough roadmap from the Wireshark team on when a new version could be used? I did not read through the full issue but it looks like more work on your side. Are we talking about 6 months or 3 years?

@johnthacker
Copy link

Choose a reason for hiding this comment

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

Understandable question. The core developers have been discussing it, as several Linux distributions would like to drop Lua 5.1/5.2 as well.

It's one of our plans for Wireshark 5.0. I will have to get back to you before promising anything, though I would think certainly less than three years. One issue is that the original author of the Lua interface has been less active recently, but it is a high priority now.

@iMichka
Copy link
Member

Choose a reason for hiding this comment

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

3 years is quite ... far away. We are not going to keep Lua 5.1 around for that long.

Another solution I did not mention is that the Wireshark team hosts a tap with your own version of Lua 5.1 https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

@johnthacker
Copy link

Choose a reason for hiding this comment

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

I only mentioned three years because you brought it up. Realistically I would think by the end of the year but I am reluctant to mention a time frame until someone working on it has an estimate.

@johnthacker
Copy link

Choose a reason for hiding this comment

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

Current status: we have done some work and now the current development branch has Lua 5.3 support and should support 5.4 by the time Wireshark 4.4.0 is released. We usually release a major version every 10-12 months, and 4.2.0 was mid November 2023, so end of this year seems safe:

https://wiki.wireshark.org/Development/LifeCycle

@max397574
Copy link

Choose a reason for hiding this comment

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

what's the current status of this?
I need to install this version of lua because some luarocks things fail when using lua 5.4

@SMillerDev
Copy link
Member

Choose a reason for hiding this comment

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

You can use brew extract to maintain a version of outdated formula in your own tap.

Please sign in to comment.