aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-12 15:30:01 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-12 17:22:12 +0100
commitefb191b1fd982cc15886898fdab4ff2b2fd09d2b (patch)
treecb060c702fc63fbf55ca7ebaf8f0e234fc87495f
parentaebf2df2a6a56187dfcd958b4bae825eaae4c958 (diff)
downloadaports-efb191b1fd982cc15886898fdab4ff2b2fd09d2b.tar.bz2
aports-efb191b1fd982cc15886898fdab4ff2b2fd09d2b.tar.xz
main/lua-ldap: fix anonymous bind, add more metadata into patches
-rw-r--r--main/lua-ldap/APKBUILD12
-rw-r--r--main/lua-ldap/fix-anonymous-bind.patch25
-rw-r--r--main/lua-ldap/fix-open_simple-segfault.patch1
-rw-r--r--main/lua-ldap/fix-search-iter.patch2
-rw-r--r--main/lua-ldap/script-to-run-test.lua-against-a-dummy-slapd.patch22
-rw-r--r--main/lua-ldap/update-test.lua-for-5.2.patch1
6 files changed, 54 insertions, 9 deletions
diff --git a/main/lua-ldap/APKBUILD b/main/lua-ldap/APKBUILD
index 1ef54a71c1..0ea82cacd2 100644
--- a/main/lua-ldap/APKBUILD
+++ b/main/lua-ldap/APKBUILD
@@ -4,7 +4,7 @@
pkgname=lua-ldap
_pkgname=lualdap
pkgver=1.2.3
-pkgrel=3
+pkgrel=4
pkgdesc="Lua binding to LDAP"
url="https://github.com/bdellegrazie/lualdap"
arch="all"
@@ -15,6 +15,7 @@ checkdepends="openldap openldap-back-bdb"
subpackages=""
source="$_pkgname-$pkgver.tar.gz::https://github.com/bdellegrazie/$_pkgname/archive/v$pkgver.tar.gz
fix-open_simple-segfault.patch
+ fix-anonymous-bind.patch
fix-search-iter.patch
script-to-run-test.lua-against-a-dummy-slapd.patch
update-test.lua-for-5.2.patch"
@@ -75,7 +76,8 @@ _package() {
}
sha512sums="51934d18d1ee97a0130545e657497e51542eef97c338df14e7171f94a2d6395fceb00313e1e64e46e6cdeedf85a17c63284595fdf6fbce8b7abce29d28f1b4a7 lualdap-1.2.3.tar.gz
-6f71ec19be58e21778cdce0a28d52c2629df736a8cbd119e6b98a306f20df193c0a646449b40104490f992750d1fbcef4519238aca4b9706f7460a6238009769 fix-open_simple-segfault.patch
-f1ba8e85421498abab814c20d2e410c5b13a6b63d0d56463ad38434405c5ae1cc694f168edfb37a0a727597f68dd67d511d234947b9df55d6322751275d4df61 fix-search-iter.patch
-b769ef5d6a47a79d83b5f684414f4db5f316290d7b99de4e2f5a2d4fdad0d4e094dab6465578e534d4510f3dbc4a0bb1b1ff99ca9ad613a3736a2cf44e02db9c script-to-run-test.lua-against-a-dummy-slapd.patch
-970da7a53d050210298712742decdf2b617450e78ebaed993c73b5300870f2b1979661c83a82d316b37f26f373c2c86d6a024ab82c1b628c73f0ca6e9c61b0ac update-test.lua-for-5.2.patch"
+f9f88ef13c8dd13064ca338720d461355cc4d32c03a7e597d7d7a0d9a8a20802bafe0dd479f8c341926fc714fb91489f0649c76675609b84d61ee0327fba8a56 fix-open_simple-segfault.patch
+733bbe09edba98f7a549d1e4083a45bf05e1ce9aeffea0416b42e22f1a9f3072a4b36dd56bfde78586edcaafeffcd4880cb72953aeb2952121c92afadd0c8816 fix-anonymous-bind.patch
+45170c06fe71bc61565fbdb960d74e59745dc91cbf52c760b8495890d9b02d8fa9361dc4c747d1257db8cb0dac16d97415db6fe69d6d17bb0b37b507aa60627e fix-search-iter.patch
+59622fabc03dd669c554cd8a58a934b5990f482da59bd5b7c243e53a41fbaaa55933ebd345d0d5911c48665fa18f6fcb08e0d9d74a61602f80afe6cb0b20dc4a script-to-run-test.lua-against-a-dummy-slapd.patch
+ffc0f08a141667db402b4b523f0de9893035bdbee5f8e68e48792cd7a29d549931ec4be0715b9f872992f492c1ac2e62c0e05552159571ffa05e5f507a1baf85 update-test.lua-for-5.2.patch"
diff --git a/main/lua-ldap/fix-anonymous-bind.patch b/main/lua-ldap/fix-anonymous-bind.patch
new file mode 100644
index 0000000000..4c5babe8d0
--- /dev/null
+++ b/main/lua-ldap/fix-anonymous-bind.patch
@@ -0,0 +1,25 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sun, 12 Mar 2017 15:16:19 +0100
+Subject: [PATCH] Fix anonymous bind
+
+Empty string should work for both ancient and the current OpenLDAP API
+(but I've tested only the current).
+
+Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/1
+---
+ src/lualdap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lualdap.c b/src/lualdap.c
+index 5bc1bb9..6063a97 100644
+--- a/src/lualdap.c
++++ b/src/lualdap.c
+@@ -1003,7 +1003,7 @@ static int lualdap_initialize (lua_State *L) {
+ static int lualdap_open_simple (lua_State *L) {
+ ldap_pchar_t host = (ldap_pchar_t) luaL_checkstring (L, 1);
+ ldap_pchar_t who = (ldap_pchar_t) luaL_optstring (L, 2, NULL);
+- const char *password = luaL_optstring (L, 3, NULL);
++ const char *password = luaL_optstring (L, 3, "");
+ int use_tls = lua_toboolean (L, 4);
+ conn_data *conn = (conn_data *)lua_newuserdata (L, sizeof(conn_data));
+ #if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300
diff --git a/main/lua-ldap/fix-open_simple-segfault.patch b/main/lua-ldap/fix-open_simple-segfault.patch
index ecd9d629d9..7a7ffdeb6d 100644
--- a/main/lua-ldap/fix-open_simple-segfault.patch
+++ b/main/lua-ldap/fix-open_simple-segfault.patch
@@ -2,6 +2,7 @@ From: Jakub Jirutka <jakub@jirutka.cz>
Date: Fri, 10 Mar 2017 00:28:52 +0100
Subject: [PATCH] Fix segfault in lualdap_open_simple()
+Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/1
--- a/src/lualdap.c
+++ b/src/lualdap.c
@@ -1011,7 +1011,7 @@
diff --git a/main/lua-ldap/fix-search-iter.patch b/main/lua-ldap/fix-search-iter.patch
index 6060534171..6c491ea19a 100644
--- a/main/lua-ldap/fix-search-iter.patch
+++ b/main/lua-ldap/fix-search-iter.patch
@@ -5,6 +5,8 @@ Subject: [PATCH] Fix error when calling search result iterator
This patch fixes error:
tests/test.lua:175: bad argument #1 to 'iter' (table expected, got no value)
+
+Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/1
--- a/src/lualdap.c
+++ b/src/lualdap.c
@@ -726,8 +726,6 @@
diff --git a/main/lua-ldap/script-to-run-test.lua-against-a-dummy-slapd.patch b/main/lua-ldap/script-to-run-test.lua-against-a-dummy-slapd.patch
index a5a3853551..9ec951bd28 100644
--- a/main/lua-ldap/script-to-run-test.lua-against-a-dummy-slapd.patch
+++ b/main/lua-ldap/script-to-run-test.lua-against-a-dummy-slapd.patch
@@ -1,8 +1,18 @@
+From d69b83f1464a6326c426f0228bb98c626c7f64bd Mon Sep 17 00:00:00 2001
From: Dan Callaghan <dcallagh@redhat.com>
Date: Mon, 30 Jun 2014 11:27:56 +1000
Subject: [PATCH] Add script to run test.lua against a dummy slapd
Ported from https://src.fedoraproject.org/cgit/rpms/lua-ldap.git/tree/0002-script-to-run-test.lua-against-a-dummy-slapd.patch
+Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/2
+---
+ Makefile | 3 ++
+ tests/run-tests.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 86 insertions(+)
+ create mode 100755 tests/run-tests.sh
+
+diff --git a/Makefile b/Makefile
+index 72ee348..9bfa542 100644
--- a/Makefile
+++ b/Makefile
@@ -26,3 +26,6 @@ install: src/$(LIBNAME)
@@ -14,10 +24,10 @@ Ported from https://src.fedoraproject.org/cgit/rpms/lua-ldap.git/tree/0002-scrip
+ LUA_CPATH="src/?.so.$V" sh tests/run-tests.sh
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
new file mode 100755
-index 0000000..f3cafd0
+index 0000000..33949c1
--- /dev/null
+++ b/tests/run-tests.sh
-@@ -0,0 +1,80 @@
+@@ -0,0 +1,83 @@
+#!/bin/sh
+set -ex
+
@@ -96,5 +106,9 @@ index 0000000..f3cafd0
+slapd -F "$d/slapd-config" -h ldap://localhost:3899/
+trap 'kill -TERM $(cat "$d/slapd.pid")' EXIT
+
-+${LUA:-lua} tests/test.lua localhost:3899 \
-+ dc=example,dc=invalid uid=ldapuser,dc=example,dc=invalid "$password"
++${LUA:-lua} tests/test.lua \
++ localhost:3899 \
++ dc=example,dc=invalid \
++ uid=ldapuser,dc=example,dc=invalid \
++ "$password"
+
diff --git a/main/lua-ldap/update-test.lua-for-5.2.patch b/main/lua-ldap/update-test.lua-for-5.2.patch
index 1035273b93..1d3ed51f2f 100644
--- a/main/lua-ldap/update-test.lua-for-5.2.patch
+++ b/main/lua-ldap/update-test.lua-for-5.2.patch
@@ -4,6 +4,7 @@ Date: Mon, 30 Jun 2014 11:18:04 +1000
Subject: [PATCH] update test.lua for 5.2
Source: https://src.fedoraproject.org/cgit/rpms/lua-ldap.git/tree/0001-update-test.lua-for-5.2.patch
+Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/2
diff --git a/lualdap/tests/test.lua b/lualdap/tests/test.lua
index 2dce95b..76c8640 100755
--- a/tests/test.lua