Hello community,

here is the log from the commit of package lua-luadbi for openSUSE:Factory 
checked in at 2020-10-10 19:03:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lua-luadbi (Old)
 and      /work/SRC/openSUSE:Factory/.lua-luadbi.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lua-luadbi"

Sat Oct 10 19:03:56 2020 rev:5 rq:840483 version:0.7.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/lua-luadbi/lua-luadbi.changes    2020-07-15 
14:58:49.403047452 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luadbi.new.4249/lua-luadbi.changes  
2020-10-10 19:04:05.156475215 +0200
@@ -1,0 +2,6 @@
+Fri Oct  9 02:58:43 UTC 2020 - Emil Biserov <bise...@gmail.com>
+
+- updated for 0.7.2
+- tests-modules-load.lua added
+
+-------------------------------------------------------------------

Old:
----
  luadbi.0.5.tar.gz

New:
----
  luadbi-0.7.2.tar.gz
  tests-modules-load.lua

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lua-luadbi.spec ++++++
--- /var/tmp/diff_new_pack.pUmarg/_old  2020-10-10 19:04:07.916476585 +0200
+++ /var/tmp/diff_new_pack.pUmarg/_new  2020-10-10 19:04:07.920476586 +0200
@@ -18,14 +18,15 @@
 
 %define flavor @BUILD_FLAVOR@
 %define mod_name luadbi
-Version:        0.5
+Version:        0.7.2
 Release:        0
 Summary:        A database interface library for Lua
 License:        MIT
 Group:          Productivity/Databases/Tools
-URL:            https://code.google.com/p/luadbi
+URL:            https://github.com/mwild1/luadbi
 # Formely found on code.google.com
-Source:         luadbi.%{version}.tar.gz
+Source:         luadbi-%{version}.tar.gz
+Source50:       tests-modules-load.lua
 # PATCH-FIX-UPSTREAM marguer...@opensuse.org - fix postgresql headers' path
 Patch0:         luadbi-postgresql-headers.patch
 BuildRequires:  %{flavor}-devel
@@ -65,14 +66,17 @@
 %install
 install -d %{buildroot}%{lua_archdir}
 install -d %{buildroot}%{lua_noarchdir}
+make install_free DESTDIR=%{buildroot} LUA_LDIR=%{lua_noarchdir} 
LUA_CDIR=%{lua_archdir}
 
-cp -r *.so %{buildroot}%{lua_archdir}
-cp -r *.lua %{buildroot}%{lua_noarchdir}
+%check
+# run tests
+lua%lua_version %{SOURCE50} "%{buildroot}"
 
 %files
 %license COPYING
-%doc README
-%{lua_archdir}/*.so
+%doc README.md
+%dir %{lua_archdir}/dbd
+%{lua_archdir}/dbd/*.so
 %{lua_noarchdir}/*.lua
 
 %changelog

++++++ luadbi-postgresql-headers.patch ++++++
--- /var/tmp/diff_new_pack.pUmarg/_old  2020-10-10 19:04:07.948476601 +0200
+++ /var/tmp/diff_new_pack.pUmarg/_new  2020-10-10 19:04:07.948476601 +0200
@@ -1,12 +1,8 @@
-Index: luadbi/dbd/postgresql/dbd_postgresql.h
-===================================================================
---- luadbi.orig/dbd/postgresql/dbd_postgresql.h
-+++ luadbi/dbd/postgresql/dbd_postgresql.h
-@@ -1,5 +1,5 @@
+--- luadbi-0.7.2/dbd/postgresql/dbd_postgresql.h.orig  2019-01-14 
12:39:17.000000000 +0300
++++ luadbi-0.7.2/dbd/postgresql/dbd_postgresql.h       2020-10-04 
08:26:13.372785212 +0300
+@@ -1,4 +1,4 @@
 -#include <libpq-fe.h>
--#include <postgres_fe.h>
 +#include <pgsql/libpq-fe.h>
-+#include <pgsql/server/postgres_fe.h>
  #include <dbd/common.h>
  
  /* 

++++++ tests-modules-load.lua ++++++
#!/usr/bin/lua

-- test stubs
_test_name = string.gsub(arg[0], ".*/(.*)%.lua$", "%1")
function _progress(...)
    io.stdout:write(_test_name, ": ", ...)
end

function _add_buildroot(buildroot, var)
    local path_sep = package.config:sub(3,3);
    local path_sep_mask = path_sep:gsub('[()%%.[^$%]*+%-?]','%%%1')
    local mask = "([^" .. path_sep_mask .."]+)"

    local paths = {}
    for p in var:gmatch(mask) do
        if not (p:sub(1, 2) == './') then
            table.insert(paths, buildroot .. p)
        end
        table.insert(paths, p)
    end
    return table.concat(paths, path_sep)
end

if arg[1] then
    local buildroot = arg[1]
    _progress("add buildroot ", buildroot, " to package.path - ")
    package.path = _add_buildroot(buildroot, package.path)
    print("done")

    _progress("add buildroot ", buildroot, " to package.cpath - ")
    package.cpath = _add_buildroot(buildroot, package.cpath)
    print("done")
end
-- /test stubs

_progress("--- Test modules loading from:\n")
_progress("package.path=")
print(package.path)
_progress("package.cpath=")
print(package.cpath)
_progress("---\n")

-- run test
local modules = {
    { 'lua',  'DBI' },
    { 'MySQL', 'dbd.mysql' },
    { 'PostgreSQL', 'dbd.postgresql' },
    { 'SQLite3', 'dbd.sqlite3' },
}

errors = 0
for _, m in ipairs(modules) do
    driver = m[1]
    modulefile = m[2]

    _progress("load ", driver, " module ", modulefile, ": ")
    local m, err = pcall(require, modulefile)
    if m then
        print("success");
    else
        print("FAILED, err="..err);
        print()
        errors = errors + 1;
    end
end

_progress()
if errors == 0 then
    print("SUCCESS")
    os.exit(0)
else
    print("FAILED, " .. errors .. " error(s) found")
    os.exit(1)
end

Reply via email to