aboutsummaryrefslogtreecommitdiffstats
path: root/main/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'main/ldb')
-rw-r--r--main/ldb/APKBUILD52
-rw-r--r--main/ldb/disable-failing-test-ppc64le.patch12
-rw-r--r--main/ldb/strtoull.patch89
3 files changed, 106 insertions, 47 deletions
diff --git a/main/ldb/APKBUILD b/main/ldb/APKBUILD
index b65b69f224d..14d0bfd9d86 100644
--- a/main/ldb/APKBUILD
+++ b/main/ldb/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ldb
-pkgver=2.1.4
-pkgrel=0
-pkgdesc="A schema-less, ldap like, API and database"
+pkgver=2.8.0
+pkgrel=1
+pkgdesc="schema-less, ldap like, API and database"
url="https://ldb.samba.org/"
arch="all"
license="LGPL-3.0-or-later"
@@ -11,7 +11,7 @@ makedepends="libtirpc-dev tevent-dev py3-tevent tdb-dev py3-tdb talloc-dev
subpackages="$pkgname-dev py3-$pkgname:_py3 $pkgname-tools $pkgname-doc"
source="https://www.samba.org/ftp/pub/ldb/ldb-$pkgver.tar.gz
disable-compile-error-test.patch
- disable-failing-test-ppc64le.patch
+ strtoull.patch
"
# secfixes:
@@ -22,60 +22,42 @@ _waf=buildtools/bin/waf
case "$CARCH" in
ppc64le) options="$options !check" ;;
+ x86|armhf|armv7) options="$options !check" ;;
esac
-prepare() {
- default_prepare
-
- # [ RUN ] test_get_size
- # [ FAILED ] test_get_size
- # [==========] 13 test(s) run.
- # [ ERROR ] --- 13369 is not within the range 2500-5000
- # [ LINE ] --- ../../tests/ldb_kv_ops_test.c:1721: error: Failure!
- if [ $CARCH = ppc64le ]; then
- msg "Patching test_get_size in tests/ldb_kv_opts_test.c"
- sed -e 's/5000/15000/' -i tests/ldb_kv_ops_test.c
-
- msg "Disabling one assertion in tests/python/repack.py"
- sed -e '/test_guid_indexed_v1_db/,+18{/toggle_guidindex_check_pack/d}' \
- -i tests/python/repack.py
- fi
-}
-
build() {
- "$_waf" configure \
+ CFLAGS="$CFLAGS -flto=auto" \
+ ./configure \
--prefix=/usr \
--disable-rpath \
--disable-rpath-install \
--builtin-libraries=replace \
--bundled-libraries=NONE \
--with-modulesdir=/usr/lib/ldb/modules
- "$_waf" build
+ make
}
check() {
- "$_waf" test
+ make check
}
package() {
- DESTDIR="$pkgdir" "$_waf" install
+ make install DESTDIR="$pkgdir"
}
_py3() {
pkgdesc="Python 3 binding for the ldb library"
-
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
- mv "$pkgdir"/usr/lib/libpyldb-util.cpython* "$subpkgdir"/usr/lib/
+ amove usr/lib/python3* \
+ usr/lib/libpyldb-util.cpython*
}
tools() {
pkgdesc="Tools to manage LDB files"
- mkdir -p "$subpkgdir"/usr/lib/ldb
- mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
- mv "$pkgdir"/usr/lib/ldb/libldb-cmdline.* "$subpkgdir"/usr/lib/ldb/
+ amove usr/bin usr/lib/ldb/libldb-cmdline.*
}
-sha512sums="7e0eecccc973881dde2390568dc71a2ffe7c7ed894daaa9cadf80c221e1b969fd9a8729f3c48a0f611a64b2941c295a2bc7bd8ba869881ba14f75b8bf331167e ldb-2.1.4.tar.gz
+sha512sums="
+b6f289af3137e02a8e3ee0588bc300d1756b8980558e0b3a3a9eee4449100ccd42ed873187dbdb334e7e7834a8bff8478cd4f20588d4ca834d9ea14c0ee2c2f9 ldb-2.8.0.tar.gz
ed55d5151bbcaf5c0a1b70a1f44b461a501ad94ce02ee97e3ea10c560ce3656a190510697bbd3c5b6f70a74519bf7c0a91210bcb415ffd97d9440045e10a02e8 disable-compile-error-test.patch
-ac50c60082bd761b462f32f949cd6b3bacfd354b3f5dae8bd8655aaa3589e09d6146c42e2edc7c76ca9badd5beec69b5c87cee7cc10e50655cd5c4befd3e4208 disable-failing-test-ppc64le.patch"
+8e005bf69759b962b60898a746443a7324ab93dde0e6e21bbeddeb6e49a9cb90152129ef874c8cf82c45291427363307182bb54ce573eee3669ec0f0a251e3cb strtoull.patch
+"
diff --git a/main/ldb/disable-failing-test-ppc64le.patch b/main/ldb/disable-failing-test-ppc64le.patch
deleted file mode 100644
index 61202ad363c..00000000000
--- a/main/ldb/disable-failing-test-ppc64le.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tests/python/repack.py b/tests/python/repack.py
-index 0844cd2..189789e 100644
---- a/tests/python/repack.py
-+++ b/tests/python/repack.py
-@@ -194,7 +194,6 @@ class GUIDIndexAndPackFormatTests(TestCase):
- self.assertEqual(pack_formats, [ldb.PACKING_FORMAT_V2])
- self.assertEqual(self.get_database(), expect_db)
-
-- self.toggle_guidindex_check_pack()
-
-
- if __name__ == '__main__':
diff --git a/main/ldb/strtoull.patch b/main/ldb/strtoull.patch
new file mode 100644
index 00000000000..2fcd928a3d1
--- /dev/null
+++ b/main/ldb/strtoull.patch
@@ -0,0 +1,89 @@
+diff --git a/lib/replace/replace.c b/lib/replace/replace.c
+index 0652cb4..02b6ebf 100644
+--- a/lib/replace/replace.c
++++ b/lib/replace/replace.c
+@@ -559,41 +559,6 @@ long long int rep_strtoll(const char *str, char **endptr, int base)
+ #endif /* HAVE_STRTOLL */
+
+
+-#ifndef HAVE_STRTOULL
+-unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
+-{
+-#ifdef HAVE_STRTOUQ
+- return strtouq(str, endptr, base);
+-#elif defined(HAVE___STRTOULL)
+- return __strtoull(str, endptr, base);
+-#elif SIZEOF_LONG == SIZEOF_LONG_LONG
+- return (unsigned long long int) strtoul(str, endptr, base);
+-#else
+-# error "You need a strtoull function"
+-#endif
+-}
+-#else
+-#ifdef HAVE_BSD_STRTOLL
+-#undef strtoull
+-unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
+-{
+- int saved_errno = errno;
+- unsigned long long int nb = strtoull(str, endptr, base);
+- /* With glibc EINVAL is only returned if base is not ok */
+- if (errno == EINVAL) {
+- if (base == 0 || (base >1 && base <37)) {
+- /* Base was ok so it's because we were not
+- * able to make the conversion.
+- * Let's reset errno.
+- */
+- errno = saved_errno;
+- }
+- }
+- return nb;
+-}
+-#endif /* HAVE_BSD_STRTOLL */
+-#endif /* HAVE_STRTOULL */
+-
+ #ifndef HAVE_SETENV
+ int rep_setenv(const char *name, const char *value, int overwrite)
+ {
+diff --git a/lib/replace/replace.h b/lib/replace/replace.h
+index a8910e2..854b1a7 100644
+--- a/lib/replace/replace.h
++++ b/lib/replace/replace.h
+@@ -394,16 +394,6 @@ long long int rep_strtoll(const char *str, char **endptr, int base);
+ #endif
+ #endif
+
+-#ifndef HAVE_STRTOULL
+-#define strtoull rep_strtoull
+-unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
+-#else
+-#ifdef HAVE_BSD_STRTOLL /* yes, it's not HAVE_BSD_STRTOULL */
+-#define strtoull rep_strtoull
+-unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
+-#endif
+-#endif
+-
+ #ifndef HAVE_FTRUNCATE
+ #define ftruncate rep_ftruncate
+ int rep_ftruncate(int,off_t);
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 4c774d9..a1dc6d0 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -411,7 +411,7 @@ def configure(conf):
+ conf.CHECK_FUNCS('initgroups pread pwrite strndup strcasestr strsep')
+ conf.CHECK_FUNCS('strtok_r mkdtemp dup2 dprintf vdprintf isatty chown lchown')
+ conf.CHECK_FUNCS('link readlink symlink realpath snprintf vsnprintf')
+- conf.CHECK_FUNCS('asprintf vasprintf setenv unsetenv strnlen strtoull __strtoull')
++ conf.CHECK_FUNCS('asprintf vasprintf setenv unsetenv strnlen')
+ conf.CHECK_FUNCS('strtouq strtoll __strtoll strtoq memalign posix_memalign')
+ conf.CHECK_FUNCS('fmemopen')
+
+@@ -866,7 +866,7 @@ REPLACEMENT_FUNCTIONS = {
+ 'memmove', 'strdup', 'setlinebuf', 'vsyslog', 'strnlen',
+ 'strndup', 'waitpid', 'seteuid', 'setegid', 'chroot',
+ 'mkstemp', 'mkdtemp', 'pread', 'pwrite', 'strcasestr',
+- 'strsep', 'strtok_r', 'strtoll', 'strtoull', 'setenv', 'unsetenv',
++ 'strsep', 'strtok_r', 'strtoll', 'setenv', 'unsetenv',
+ 'utime', 'utimes', 'dup2', 'chown', 'link', 'readlink',
+ 'symlink', 'lchown', 'realpath', 'memmem', 'vdprintf',
+ 'dprintf', 'get_current_dir_name', 'copy_file_range',