forked from pool/lua-luasql
Compare commits
16 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
4fdf52f139
|
|||
|
9d8c2bf10a
|
|||
|
0804d8d005
|
|||
|
65246e0423
|
|||
|
cc050e1ed8
|
|||
|
833f1de651
|
|||
|
71941ad8a2
|
|||
|
6007080746
|
|||
|
5dac2c04e7
|
|||
|
082cc20f0c
|
|||
| 99e2002019 | |||
| 29068c5ba6 | |||
| dd52904689 | |||
| c224f5155c | |||
| 92fef1614c | |||
| 808a539d6b |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,6 @@
|
||||
*.obscpio
|
||||
.osc
|
||||
_scmsync.obsinfo
|
||||
.assets/
|
||||
_build*
|
||||
.pbuild
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<multibuild>
|
||||
<package>lua51</package>
|
||||
<package>luajit</package>
|
||||
<package>lua53</package>
|
||||
<package>lua54</package>
|
||||
</multibuild>
|
||||
|
||||
15
_service
Normal file
15
_service
Normal file
@@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/lunarmodules/luasql.git</param>
|
||||
<param name="versionprefix">2.6.0+git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="changesauthor">mcepl@cepl.eu</param>
|
||||
</service>
|
||||
<service name="tar" mode="manual"/>
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual"/>
|
||||
</services>
|
||||
4
_servicedata
Normal file
4
_servicedata
Normal file
@@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/lunarmodules/luasql.git</param>
|
||||
<param name="changesrevision">d60f8b2a613c31a9626bc8d9a760609830cd1d4d</param></service></servicedata>
|
||||
30
add_missing_cur_gc.patch
Normal file
30
add_missing_cur_gc.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 10ed75b36bf909f57b3c1a070dd87669c323cff0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1s=20Guisasola?= <tomas@puc-rio.br>
|
||||
Date: Mon, 7 Jul 2025 20:59:39 -0300
|
||||
Subject: [PATCH] Solving issue #178, missing cur_gc
|
||||
|
||||
---
|
||||
src/ls_odbc.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/ls_odbc.c b/src/ls_odbc.c
|
||||
index 1a7f768..565b216 100644
|
||||
--- a/src/ls_odbc.c
|
||||
+++ b/src/ls_odbc.c
|
||||
@@ -483,6 +483,16 @@ static int cur_fetch (lua_State *L)
|
||||
}
|
||||
}
|
||||
|
||||
+/*
|
||||
+** Cursor object collector function
|
||||
+*/
|
||||
+static int cur_gc (lua_State *L) {
|
||||
+ cur_data *cur = (cur_data *) luaL_checkudata (L, 1, LUASQL_CURSOR_ODBC);
|
||||
+ if (cur != NULL && !(cur->closed))
|
||||
+ cur_shut(L, cur);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
** Closes a cursor.
|
||||
*/
|
||||
@@ -1,3 +1,51 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 31 17:54:52 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Fix ownership of %%{lua_archdir}/luasql directory.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 24 14:49:49 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch off building lua51 build of the package.
|
||||
- Remove already upstreamed luasql-fix-configuration.patch
|
||||
(actually it already happened three commits before, but OBS
|
||||
doesn't read older change records, it seems).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 12 00:39:58 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Make the package buildable with LuaJIT.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 8 15:05:21 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update to 2.7.0:
|
||||
* LuaSQL is adapted to Lua version 5.4 and all the drivers are
|
||||
compatible with To-be-closed variables.
|
||||
* The :close() method now returns false and a string with
|
||||
appropriate message instead of raising an error when there
|
||||
are related open objects.
|
||||
- Add add_missing_cur_gc.patch adding missing cur_gc symbol
|
||||
(gh#lunarmodules/luasql#178).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 5 10:25:55 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch to _service and download the code from GitHub repo,
|
||||
upstream doesn't create releases.
|
||||
- Update to version 2.6.0+git.1724375068.d60f8b2:
|
||||
* Add version history and credits
|
||||
* Update fr Documentation
|
||||
* Update br Documentation
|
||||
* Update US Documentation
|
||||
* Minor fixes
|
||||
* Fix HTML Characters
|
||||
* Update br Documentation
|
||||
* Update Fr Documentation
|
||||
* Update example
|
||||
- Enable the test suite.
|
||||
- Remove already upstreamed luasql-fix-configuration.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 17 18:24:52 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
# spec file for package lua-luasql
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2014 Malcolm J Lewis <malcolmlewis@opensuse.org>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -17,39 +17,35 @@
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%define flavor_dec $(c=%{flavor}; echo ${c:0:-1}.${c: -1})
|
||||
%define flavor_ver %{lua:ver, ok = string.gsub(rpm.expand("%{flavor}"), "lua(%d)(%d)", "%1.%2"); print(ver)}
|
||||
%global flavor @BUILD_FLAVOR@
|
||||
%define mod_name luasql
|
||||
%define lua_archdir %{_libdir}/lua/%{flavor_ver}
|
||||
%define lua_incdir %{_includedir}/lua%{flavor_ver}
|
||||
%define lua_noarchdir %{_datadir}/lua/%{flavor_ver}
|
||||
|
||||
%lua_provides
|
||||
%if "%{flavor}" == ""
|
||||
Name: lua-%{mod_name}
|
||||
ExclusiveArch: do_not_build
|
||||
%else
|
||||
Name: %{flavor}-%{mod_name}
|
||||
%endif
|
||||
Version: 2.6.0
|
||||
Version: 2.7.0
|
||||
Release: 0
|
||||
Summary: Simple interface from Lua to a DBMS
|
||||
License: MIT
|
||||
Group: Development/Libraries/Other
|
||||
URL: https://github.com/lunarmodules/luasql
|
||||
Source0: https://github.com/lunarmodules/luasql/archive/refs/tags/%{version}/%{mod_name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM luasql-fix-configuration.patch gh#lunarmodules/luasql!152 mcepl@suse.com
|
||||
# Clean up building and add rpm optflags.
|
||||
Patch0: luasql-fix-configuration.patch
|
||||
# Source0: %%{mod_name}-%%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM add_missing_cur_gc.patch gh#lunarmodules/luasql#178 mcepl@suse.com
|
||||
# add missing definition of cur_gc function
|
||||
Patch0: add_missing_cur_gc.patch
|
||||
BuildRequires: %{flavor}-devel
|
||||
BuildRequires: libiodbc-devel
|
||||
BuildRequires: libmysqlclient-devel
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: pkgconf
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: sqlite3-devel
|
||||
Requires: %{flavor}
|
||||
Requires: libmariadb3
|
||||
%if "%{flavor}" == ""
|
||||
Name: lua-%{mod_name}
|
||||
ExclusiveArch: do_not_build
|
||||
%else
|
||||
Name: %{flavor}-%{mod_name}
|
||||
%endif
|
||||
%lua_provides
|
||||
|
||||
%description
|
||||
A simple interface from Lua to a DBMS. It enables a Lua program to:
|
||||
@@ -65,13 +61,13 @@ export OPTFLAGS="%{optflags}"
|
||||
export LUA_INC="%{lua_incdir}"
|
||||
|
||||
# also oci8 firebird
|
||||
make %{?_smp_mflags} \
|
||||
%make_build \
|
||||
DRIVER_INCS="-I%{_includedir}" DRIVER_LIBS_sqlite3="-lsqlite3" sqlite3
|
||||
make %{?_smp_mflags} \
|
||||
%make_build \
|
||||
DRIVER_INCS="-I%{_includedir}/pgsql" DRIVER_LIBS_postgres="-lpq" postgres
|
||||
make %{?_smp_mflags} \
|
||||
%make_build \
|
||||
DRIVER_INCS="-I%{_includedir}/mysql" DRIVER_LIBS_mysql="-lmysqlclient -lz" mysql
|
||||
make %{?_smp_mflags} \
|
||||
%make_build \
|
||||
DRIVER_INCS="-I%{_includedir}" DRIVER_LIBS_odbc="-liodbc" odbc
|
||||
|
||||
%install
|
||||
@@ -80,10 +76,14 @@ make %{?_smp_mflags} \
|
||||
%make_install LUA_LIBDIR='$(DESTDIR)%{lua_archdir}' mysql
|
||||
%make_install LUA_LIBDIR='$(DESTDIR)%{lua_archdir}' odbc
|
||||
|
||||
%check
|
||||
export LUA_PATH='%{buildroot}%{lua_archdir}/?.lua;'
|
||||
export LUA_CPATH='%{buildroot}%{lua_archdir}/?.so'
|
||||
lua tests/test.lua sqlite3
|
||||
|
||||
%files
|
||||
%doc doc/us/*
|
||||
%dir %{lua_archdir}/luasql
|
||||
%{lua_archdir}/luasql/
|
||||
%{lua_archdir}/luasql
|
||||
# TODO? Split to subpackages?
|
||||
# /usr/lib64/lua/%%{lua_version}/luasql
|
||||
# /usr/lib64/lua/%%{lua_version}/luasql/mysql.so
|
||||
|
||||
BIN
luasql-2.6.0.tar.gz
LFS
BIN
luasql-2.6.0.tar.gz
LFS
Binary file not shown.
BIN
luasql-2.7.0.tar.gz
LFS
Normal file
BIN
luasql-2.7.0.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,19 +0,0 @@
|
||||
---
|
||||
config | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -46,9 +46,8 @@ DRIVER_LIBS_firebird ?= -L/usr/local/fir
|
||||
DRIVER_INCS_firebird ?=
|
||||
|
||||
# general compilation parameters
|
||||
-WARN = -Wall -Wmissing-prototypes -Wmissing-declarations -pedantic
|
||||
+WARN= -fPIC $(OPTFLAGS) -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
|
||||
INCS = -I$(LUA_INC)
|
||||
-DEFS =
|
||||
-CFLAGS = -O2 -std=gnu99 $(WARN) -fPIC $(DRIVER_INCS) $(INCS) \
|
||||
- -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS)
|
||||
+DEFS = -std=gnu99 -fPIC
|
||||
+CFLAGS=$(WARN) $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS)
|
||||
CC= gcc
|
||||
4
luasql.obsinfo
Normal file
4
luasql.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
||||
name: luasql
|
||||
version: 2.6.0+git.1724375068.d60f8b2
|
||||
mtime: 1724375068
|
||||
commit: d60f8b2a613c31a9626bc8d9a760609830cd1d4d
|
||||
Reference in New Issue
Block a user