FS#40388 - [luarocks] architecture hardcoded to x86_64

Attached to Project: Community Packages
Opened by Vanya Sergeev (vsergeev) - Friday, 16 May 2014, 06:54 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Thursday, 26 June 2014, 08:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
usr/share/lua/5.2/luarocks/site_config.lua has the system architecture hardcoded to x86_64 with line 10:
LUAROCKS_UNAME_M=[[x86_64]]
This incorrectly allows for 64-bit binary rocks to be installed on a 32-bit system (see https://github.com/keplerproject/luarocks/issues/258). The package's architecture is specified to be "any".

Steps to reproduce:
Install a 64-bit binary rock on a 32-bit system with luarocks.

Solution:
A simple solution would be to omit the LUAROCKS_UNAME_M definition in site_config.lua. This will force a dynamic lookup of the architecture in install.lua for each binary rock install, which imposes some time penalty, but would easily allow the package to stay consistent with its "any" architecture type. Another solution would be to populate the LUAROCKS_UNAME_M field of site_config.lua in a post-install step with the contents of `uname -m`. This would require a post-install script of some sort.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Thursday, 26 June 2014, 08:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  luarocks 2.1.2-2

Loading...