From e234f493ad28af665f13c743f31942bc5417798a Mon Sep 17 00:00:00 2001 From: tigro Date: Sun, 5 Jan 2025 20:56:56 +0300 Subject: [PATCH] import luarocks-3.9.2-6.el10 --- .gitignore | 1 + .luarocks.metadata | 1 + SOURCES/config-5.1.lua | 11 + SOURCES/luarocks-3.9.1-dynamic_libdir.patch | 40 ++++ SPECS/luarocks.spec | 234 ++++++++++++++++++++ 5 files changed, 287 insertions(+) create mode 100644 .gitignore create mode 100644 .luarocks.metadata create mode 100644 SOURCES/config-5.1.lua create mode 100644 SOURCES/luarocks-3.9.1-dynamic_libdir.patch create mode 100644 SPECS/luarocks.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7620de --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/luarocks-3.9.2.tar.gz diff --git a/.luarocks.metadata b/.luarocks.metadata new file mode 100644 index 0000000..4a92c60 --- /dev/null +++ b/.luarocks.metadata @@ -0,0 +1 @@ +116a4ce0bfe945045d9e6b28dedc270b2d7a3ebd SOURCES/luarocks-3.9.2.tar.gz diff --git a/SOURCES/config-5.1.lua b/SOURCES/config-5.1.lua new file mode 100644 index 0000000..51c73da --- /dev/null +++ b/SOURCES/config-5.1.lua @@ -0,0 +1,11 @@ +-- LuaRocks configuration + +rocks_trees = { + { name = "user", root = home .. "/.luarocks" }; + { name = "system", root = "/usr" }; +} +lua_interpreter = "lua-5.1"; +variables = { + LUA_DIR = "/usr"; + LUA_BINDIR = "/usr/bin"; +} diff --git a/SOURCES/luarocks-3.9.1-dynamic_libdir.patch b/SOURCES/luarocks-3.9.1-dynamic_libdir.patch new file mode 100644 index 0000000..0545866 --- /dev/null +++ b/SOURCES/luarocks-3.9.1-dynamic_libdir.patch @@ -0,0 +1,40 @@ +From 5f3d7db817c367690c96af5f074fe88895d0f4be Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Sat, 29 Apr 2023 21:02:09 -0400 +Subject: [PATCH] Dynamically detect libdir on Linux + +Some Linux distributions (e.g. Fedora, CentOS) put 64-bit libraries +in `/usr/lib64` rather than `/usr/lib`. On such systems `luarocks` +should use `lib64` rather than `lib`. + +Co-authored-by: Michel Alexandre Salim +--- + src/luarocks/core/cfg.lua | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua +index 6231678..5fde2bc 100644 +--- a/src/luarocks/core/cfg.lua ++++ b/src/luarocks/core/cfg.lua +@@ -393,6 +393,18 @@ local function make_defaults(lua_version, target_cpu, platforms, home) + local xdg_cache_home = os.getenv("XDG_CACHE_HOME") or home.."/.cache" + defaults.local_cache = xdg_cache_home.."/luarocks" + defaults.web_browser = "xdg-open" ++ if platforms.linux then ++ -- inline code from fs/linux.lua since ++ -- luarocks.fs can't be required here ++ -- (circular dependencies) ++ local fd, _, code = io.open("/usr/lib64", "r") ++ if code ~= 2 then ++ defaults.lib_modules_path = "/lib64/lua/"..lua_version ++ end ++ if fd then ++ fd:close() ++ end ++ end + end + + if platforms.cygwin then +-- +2.40.0 + diff --git a/SPECS/luarocks.spec b/SPECS/luarocks.spec new file mode 100644 index 0000000..c50ec44 --- /dev/null +++ b/SPECS/luarocks.spec @@ -0,0 +1,234 @@ +Name: luarocks +Version: 3.9.2 +Release: 6%{?dist} +Summary: A deployment and management system for Lua modules + +License: MIT +URL: http://luarocks.org +Source0: http://luarocks.org/releases/luarocks-%{version}.tar.gz +Source1: config-5.1.lua + +# Use /usr/lib64 as default LUA_LIBDIR +Patch0: luarocks-3.9.1-dynamic_libdir.patch + +BuildArch: noarch +# this package was previously arched, and needs to be obsoleted +# to have an upgrade path +Obsoletes: luarocks < 3.5.0-1 + +BuildRequires: lua-devel +BuildRequires: make +%if 0%{?el7} +BuildRequires: lua-rpm-macros +%endif +%if 0%{?rhel} && 0%{?rhel} < 9 +Requires: lua(abi) = %{lua_version} +%endif +Requires: unzip +Requires: zip +Requires: gcc + +%if 0%{?fedora} +Recommends: lua-sec +Recommends: lua-devel +Recommends: compat-lua-devel +Recommends: make +Recommends: cmake +%endif + +%description +LuaRocks allows you to install Lua modules as self-contained packages +called "rocks", which also contain version dependency +information. This information is used both during installation, so +that when one rock is requested all rocks it depends on are installed +as well, and at run time, so that when a module is required, the +correct version is loaded. LuaRocks supports both local and remote +repositories, and multiple local rocks trees. + + +%prep +%autosetup -p1 + + +%build +./configure \ + --prefix=%{_prefix} \ + --lua-version=%{lua_version} \ + --with-lua=%{_prefix} +%make_build + + +%install +%make_install + +mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version} + +install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/luarocks/config-5.1.lua + +%check +# TODO - find how to run this without having to pre-download entire rocks tree +# ./test/run_tests.sh + + +%files +%license COPYING +%doc README.md +%dir %{_sysconfdir}/luarocks +%config(noreplace) %{_sysconfdir}/luarocks/config-%{lua_version}.lua +%config(noreplace) %{_sysconfdir}/luarocks/config-5.1.lua +%{_bindir}/luarocks +%{_bindir}/luarocks-admin +%{_prefix}/lib/luarocks +%{lua_pkgdir}/luarocks + + +%changelog +* Sun Jan 05 2025 Arkady L. Shane - 3.9.2-6 +- Rebuilt for MSVSphere 10 + +* Thu Jul 18 2024 Fedora Release Engineering - 3.9.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Apr 15 2024 Andreas Schneider - 3.9.2-5 +- Add support for lua 5.1 + +* Thu Jan 25 2024 Fedora Release Engineering - 3.9.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 3.9.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 3.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Apr 29 2023 FeRD (Frank Dana) - 3.9.2-1 +- New upstream release +- Restore mistakenly-dropped libdir patch & refresh for 3.9.1 sources + +* Thu Jan 19 2023 Fedora Release Engineering - 3.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Sep 14 2022 FeRD (Frank Dana) - 3.9.1-1 +- New upstream release, drop upstreamed patch +- Raise lua-devel from Suggests to Recommends, add new Requires: gcc + and Recommends: make and cmake (rhbz#2091484) + +* Thu Jul 21 2022 Fedora Release Engineering - 3.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 3.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 3.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jul 16 2021 Michel Alexandre Salim - 3.7.0-1 +- Update to 3.7.0 + +* Wed Jan 27 2021 Michel Alexandre Salim - 3.5.0-1 +- Update to 3.5.0 +- This package is now noarch, tested on x86_64 and i386 + +* Tue Jan 26 2021 Fedora Release Engineering - 3.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 3.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jun 30 2020 Miro Hrončok - 3.3.1-2 +- Rebuilt for Lua 5.4 + +* Tue Mar 3 2020 Michel Alexandre Salim - 3.3.1-1 +- Update to 3.3.1 + +* Wed Jan 29 2020 Fedora Release Engineering - 3.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 3.0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 3.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Oct 15 2018 Tom Callaway - 3.0.3-1 +- update to 3.0.3 + +* Fri Jul 13 2018 Fedora Release Engineering - 2.4.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 2.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Sep 13 2017 Tom Callaway - 2.4.3-1 +- update to 2.4.3 + +* Thu Aug 03 2017 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jul 5 2016 Michel Alexandre Salim - 2.3.0-1 +- Update to 2.3.0 +- Use license macro +- On Fedora, add weak dependencies on lua-sec (recommended) + and lua-devel (suggested) + +* Thu Feb 04 2016 Fedora Release Engineering - 2.2.3-0.3.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Dec 10 2015 Tom Callaway - 2.2.3-0.2.rc2 +- update to 2.2.3-rc2 +- fix another case of /usr/lib pathing + +* Wed Jun 17 2015 Fedora Release Engineering - 2.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Jun 2 2015 Michel Alexandre Salim - 2.2.2-1 +- Update to 2.2.2 +- Add runtime dependencies on unzip and zip (h/t Ignacio Burgueño) + +* Thu Jan 15 2015 Tom Callaway - 2.2.0-2 +- rebuild for lua 5.3 + +* Fri Oct 17 2014 Michel Alexandre Salim - 2.2.0-1 +- Update to 2.2.0 + +* Sat Jun 07 2014 Fedora Release Engineering - 2.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Jan 16 2014 Michel Salim - 2.1.2-1 +- Update to 2.1.2 + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0.13-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sun May 12 2013 Tom Callaway - 2.0.13-2 +- rebuild for lua 5.2 + +* Mon Apr 22 2013 Michel Salim - 2.0.13-1 +- Update to 2.0.13 + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Nov 5 2012 Michel Salim - 2.0.12-1.1 +- Fix macro problem affecting EPEL builds + +* Mon Nov 5 2012 Michel Salim - 2.0.12-1 +- Update to 2.0.12 + +* Fri Sep 28 2012 Michel Salim - 2.0.11-1 +- Update to 2.0.11 + +* Thu Jul 19 2012 Fedora Release Engineering - 2.0.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 11 2012 Michel Salim - 2.0.8-2 +- Add support for RHEL's older lua packaging + +* Tue May 8 2012 Michel Salim - 2.0.8-1 +- Initial package