Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lua-macros for openSUSE:Factory checked in at 2025-11-05 16:17:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lua-macros (Old) and /work/SRC/openSUSE:Factory/.lua-macros.new.1980 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lua-macros" Wed Nov 5 16:17:58 2025 rev:15 rq:1315205 version:20210827 Changes: -------- --- /work/SRC/openSUSE:Factory/lua-macros/lua-macros.changes 2025-10-23 16:36:04.994948710 +0200 +++ /work/SRC/openSUSE:Factory/.lua-macros.new.1980/lua-macros.changes 2025-11-05 16:20:06.806641192 +0100 @@ -1,0 +2,7 @@ +Mon Nov 3 00:20:49 UTC 2025 - Matej Cepl <[email protected]> + +- Finally broke %lua_provides to be working. I got stumped by the + craziness of rpm which runs Lua interpreter with locales and + crazy reformatting of integers. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.VyiRNk/_old 2025-11-05 16:20:07.446668068 +0100 +++ /var/tmp/diff_new_pack.VyiRNk/_new 2025-11-05 16:20:07.450668236 +0100 @@ -1,6 +1,6 @@ -mtime: 1760999899 -commit: d1f0f1035bb04d30b4b3f2362fd2a8fa757179cdb184b24e5b6d27f1245ff673 +mtime: 1762129307 +commit: 521e3b1dc4df1038c5dbf9a8b71c2a16fcd44edd1bb7e3027630f6fc0d491129 url: https://src.opensuse.org/lua/lua-macros.git -revision: d1f0f1035bb04d30b4b3f2362fd2a8fa757179cdb184b24e5b6d27f1245ff673 +revision: 521e3b1dc4df1038c5dbf9a8b71c2a16fcd44edd1bb7e3027630f6fc0d491129 projectscmsync: https://src.opensuse.org/lua/_ObsPrj.git ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2025-11-03 01:22:04.000000000 +0100 @@ -0,0 +1,9 @@ +.osc +_scmsync.obsinfo +_buildconfig-* +_buildinfo-*.xml +lua-macros-*-build/ +*.obscpio +*.osc +_build.* +.pbuild diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/install-lua-rock.sh new/install-lua-rock.sh --- old/install-lua-rock.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/install-lua-rock.sh 2025-11-03 01:22:04.000000000 +0100 @@ -0,0 +1,15 @@ +#!/bin/bash +set -ex + +# 1. %{lua_version} +# 2. %{buildroot}%{_prefix} +# 3. %{buildroot}%{luarocks_treedir}/%{mod_name} + +SOURCE_DIR="$3" +luarocks --lua-version="$1" --tree="$2" install --deps-mode=none --no-manifest "${*:$#}" + +if [ -d "${SOURCE_DIR}" ] && [ "$(find "${SOURCE_DIR}" -type f | wc -l)" -gt 0 ] +then + mkdir -p __rocktree + mv -v "${SOURCE_DIR}"/*/* __rocktree +fi ++++++ macros.lua ++++++ --- /var/tmp/diff_new_pack.VyiRNk/_old 2025-11-05 16:20:07.650676634 +0100 +++ /var/tmp/diff_new_pack.VyiRNk/_new 2025-11-05 16:20:07.654676802 +0100 @@ -44,14 +44,14 @@ print(result) } %lua_version_default %{lua: -local result = 5.4 +local result = "5.4" local ver = rpm.expand("%{?suse_version}") if #ver > 0 then ver = tonumber(ver) if ver < 1500 then - result = 5.1 + result = "5.1" elseif ver < 1600 then - result = 5.3 + result = "5.3" end end print(result) @@ -63,31 +63,39 @@ print(nodots) } # Lua default version -# This REQUIRES macro %{mod_name} to be defined. +# This REQUIRES macro %%{mod_name} to be defined. # -e: Exclude lua prefix # -n: Specify name %lua_provides(en:) %{lua: local mod_name = rpm.expand("%{?mod_name}") -if mod_name == "" then - print("-- Error: %{mod_name} is not defined!") +if mod_name == "" or mod_name == "%{?mod_name}" then + print("-- Error: %%{mod_name} is not defined!") return end -print([[ -%if "%{lua_version_nodots}" == "%{lua_version_default_nodots}" -%if 0%{?-n:1} -Provides: %{-n*} = %{version}-%{release} -Obsoletes: %{-n*} < %{version}-%{release} -%else -%if 0%{?-e:1} -Provides: %{mod_name} = %{version}-%{release} -Obsoletes: %{mod_name} < %{version}-%{release} -%else -Provides: lua-%{mod_name} = %{version}-%{release} -Obsoletes: lua-%{mod_name} < %{version}-%{release} -%endif -%endif -%endif -]]) + +local lua_ver_nodots = rpm.expand("%{lua_version_nodots}") +local lua_ver_default_nodots = rpm.expand("%{lua_version_default_nodots}") +local flavor = rpm.expand("%{flavor}") +local version = rpm.expand("%{version}") +local release = rpm.expand("%{release}") + +local provides_name +if rpm.expand("%{-n*}") ~= "" then + provides_name = rpm.expand("%{-n*}") +elseif rpm.expand("%{-e:1}") == "1" then + provides_name = mod_name +else + provides_name = "lua-" .. mod_name +end + +if lua_ver_nodots == lua_ver_default_nodots then + print("Provides: " .. provides_name .. " = " .. version .. "-" .. release .. "\\n") + print("Obsoletes: " .. provides_name .. " < " .. version .. "-" .. release .. "\\n") +end + +if flavor == "luajit" then + print("Obsoletes: lua51-" .. mod_name .. " <= " .. version .. "-" .. release .. "\\n") +end } # LuaRocks
