Skip to content

Address some nits that would be helpful for platform builders - #131

Merged
alerque merged 2 commits into
lunarmodules:masterfrom
kevans91:nits
Jul 18, 2025
Merged

Address some nits that would be helpful for platform builders#131
alerque merged 2 commits into
lunarmodules:masterfrom
kevans91:nits

Conversation

@kevans91

Copy link
Copy Markdown

My main concern here is FreeBSD, though I suspect other platforms would also benefit. We're currently on an old version based out of the original repo, but I'd quite like to update it- a few env vars that we can set to point at the correct names for the expected programs would be incredibly helpful.

@alerque alerque left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The content here looks fine. In the nits department though I'd like the commit messages to follow the conventional commits scheme we've been using. Both these commits should be chore: commits with a capitalized imperative mode verb beginning the message after that, as in chore: Add some ....

Also it isn't very important, buy your commit messages implies the binary name thing is only a platform issue, but it isn't. Some Linux distros actually have exactly the same issue.

@alerque

alerque commented Jul 18, 2025

Copy link
Copy Markdown
Member

And don't worry about the failed CI job, that's a known issue with the job itself right now.

kevans91 added 2 commits July 18, 2025 09:59
This is slightly nicer to folks building on other platforms, without having
to sacrifice anything on Linux.  With FreeBSD in mind, in particular, the
default `make` is bmake and luarocks binaries are typically named according
to the lua version they were built against -- having an easy way to avoid
patching in `gmake` and `luarocks54` would be quite welcome.
Leave them enabled by default to avoid breaking the default configuration,
but allow them to be turned off for platform redistribution purposes where
we mostly care about just building for the platform we're currently running
on.
@kevans91

kevans91 commented Jul 18, 2025

Copy link
Copy Markdown
Author

The content here looks fine. In the nits department though I'd like the commit messages to follow the conventional commits scheme we've been using. Both these commits should be chore: commits with a capitalized imperative mode verb beginning the message after that, as in chore: Add some ....

Fixed, thanks!

Also it isn't very important, buy your commit messages implies the binary name thing is only a platform issue, but it isn't. Some Linux distros actually have exactly the same issue.

Right, so I mainly didn't want to speak overly broadly here- I haven't looked at anything but FreeBSD personally, though I could see where others probably have the same issues.

The other problem I have is with luarocks unpack in general. I haven't gone spelunking through other systems packaging yet to decide if we're just behind the trend yet, but I don't think we do any packaging of system rocks today (and this may be something we want to fix). We don't allow any sort of network access during the build (which I think is probably not-uncommon), so these kinds of dependencies have to be satisfied locally in some fashion. (edit for clarity: there's of course a fetch phase right before if we really have to re-organize things to do that independently, but it'd be preferred to handle as part of building, e.g., the luafilesystem port).

@alerque

alerque commented Jul 18, 2025

Copy link
Copy Markdown
Member

The other problem I have is with luarocks unpack in general. I haven't gone spelunking through other systems packaging yet to decide if we're just behind the trend yet, but I don't think we do any packaging of system rocks today (and this may be something we want to fix). We don't allow any sort of network access during the build (which I think is probably not-uncommon), so these kinds of dependencies have to be satisfied locally in some fashion.

I wouldn't use luarocks unpack at all for distro packaging, I would use luarocks make paired with luarocks install instead. See for example how we package this for Arch Linux. The build() phase technically does have network access but we strongly discourage it.

Note how this is taking the locally extracted sources and guided by the local copy of the rockspec is making a LuaRocks rock out of them. Then we install that, also locally and NOT including any dependencies we install those to a predefined tree that will eventually be copied into the target system. Because dependencies are excluded, no network access is needed and the system package manager is expected to supply the right dependencies.

The bit about manifests is taken care of in Arch Linux by a hook that runs after the package manager installs anything to the luarocks directory. This way the system always has an updated manifest with all the system-installed luarocks without LuaRocks messing with it directly as part of each package installation.

@alerque
alerque enabled auto-merge July 18, 2025 15:32
@alerque
alerque disabled auto-merge July 18, 2025 15:34
@alerque
alerque merged commit d1e973c into lunarmodules:master Jul 18, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants