Github messages for voidlinux
 help / color / mirror / Atom feed
From: 08A <08A@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: libdecsync-2.2.1, python3-libdecsync-2.2.1, python3-radicale_storage_decsync-2.1.0
Date: Sat, 12 Nov 2022 12:43:38 +0100	[thread overview]
Message-ID: <20221112114338.CU1CqT0OkEBxvVkUV5nIS_JUZx6dyYN2Ob4hy60VCx4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39258@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 3241 bytes --]

There is an updated pull request by 08A against master on the void-packages repository

https://github.com/08A/void-packages new-package-libdecsync
https://github.com/void-linux/void-packages/pull/39258

New packages: libdecsync-2.2.1, python3-libdecsync-2.2.1, python3-radicale_storage_decsync-2.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)

#### Questions

I put my email in the maintainer field. I don't know if it is the expected behavior.

#### Test libdecsync
main.c:
````c
#include <libdecsync.h>
#include <stddef.h>


int main() {
	Decsync tmp = NULL;
	return 0;
}
````

````sh
$ gcc main.c $(pkg-config --libs decsync)
$ ldd a.out
        linux-vdso.so.1 (0x00007ffca77d6000)
        libdecsync.so.0 => /usr/lib64/libdecsync.so.0 (0x00007f24572b8000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f24570f2000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f24570d8000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f2456f93000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f2456f72000)
        libutil.so.1 => /usr/lib/libutil.so.1 (0x00007f2456f6d000)
        libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0x00007f2456f31000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f2456f26000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f2456f20000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f2456f06000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f24575f6000)


````

#### Test python3-libdecsync

````sh
$ ./xbps-src -Q pkg python3-libdecsync
````

#### Test all packages

````sh
$ xi python3-radicale_storage_decsync
$ htpasswd -B -c /tmp/radicale-test-passwd void-user # enter a paswd
````

/tmp/radicale.conf:
````
[storage]
type = radicale_storage_decsync
filesystem_folder = /tmp/radicale-collections
decsync_dir = /tmp/decsync

[auth]
type = htpasswd
htpasswd_filename = /tmp/radicale-test-passwd
htpasswd_encryption = bcrypt
````

````sh
$ radicale --config ~/.config/radicale/config
````

Connect to localhost:5232 with your browser (user: void-user, passwd: what you typed)

tested:
* create collection
* delete collection
* create contact
* delete contact

#### PS
This PR is heavily inspired by https://github.com/void-linux/void-packages/pull/34731.

All of the credit should go to @eoli3n.
All of the blame should go to me.




A patch file from https://github.com/void-linux/void-packages/pull/39258.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new-package-libdecsync-39258.patch --]
[-- Type: text/x-diff, Size: 7704 bytes --]

From 514f982ea3ca7ec7ce22503cc06f8f2025fc1243 Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Tue, 13 Sep 2022 13:33:29 +0200
Subject: [PATCH 1/3] New package: libdecsync-2.2.1

---
 common/shlibs               |  1 +
 srcpkgs/libdecsync-devel    |  1 +
 srcpkgs/libdecsync/template | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 120000 srcpkgs/libdecsync-devel
 create mode 100644 srcpkgs/libdecsync/template

diff --git a/common/shlibs b/common/shlibs
index 76512744735e..549fbe9ea89d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4197,3 +4197,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libdecsync.so.0 libdecsync-2.2.1_1
diff --git a/srcpkgs/libdecsync-devel b/srcpkgs/libdecsync-devel
new file mode 120000
index 000000000000..e72513c6dcf1
--- /dev/null
+++ b/srcpkgs/libdecsync-devel
@@ -0,0 +1 @@
+libdecsync
\ No newline at end of file
diff --git a/srcpkgs/libdecsync/template b/srcpkgs/libdecsync/template
new file mode 100644
index 000000000000..aabd2b0dc3c8
--- /dev/null
+++ b/srcpkgs/libdecsync/template
@@ -0,0 +1,35 @@
+# Template file for 'libdecsync'
+pkgname=libdecsync
+version=2.2.1
+revision=1
+archs="x86_64"
+build_style=gnu-makefile
+hostmakedepends="gradle openjdk8 patchelf pkg-config tar"
+makedepends="ncurses-devel"
+short_desc="Multiplatform library for synchronizing using DecSync"
+maintainer="08a <dev@08a.re>"
+license="LGPL-2.0-only"
+homepage="https://github.com/39aldo39/libdecsync"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=3e08b35efed3bafb079aa52a8dcd51217f6602cde64accba1a10cf5c25029d45
+subpackages="libdecsync-devel"
+disable_parallel_build=yes
+
+export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+
+pre_install() {
+	patchelf --set-soname libdecsync.so.0 build/bin/linuxX64/releaseShared/libdecsync.so
+}
+
+post_install() {
+	ln -rsf "${DESTDIR}/usr/lib/libdecsync.so" "${DESTDIR}/usr/lib/libdecsync.so.0"
+}
+
+libdecsync-devel_package() {
+	depends="${sourcepkg}-${version}_${revision}"
+	short_desc+=" - development files"
+		pkg_install() {
+			vmove usr/include
+			vmove usr/share/pkgconfig
+		}
+}

From a4d03e9cac864766f53beeb7d0e6e10d2ddad981 Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Tue, 13 Sep 2022 18:18:15 +0200
Subject: [PATCH 2/3] New package: python3-libdecsync-2.2.1

---
 .../0001-hardcode-libpath-for-voidlinux.patch | 64 +++++++++++++++++++
 srcpkgs/python3-libdecsync/template           | 16 +++++
 2 files changed, 80 insertions(+)
 create mode 100644 srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch
 create mode 100644 srcpkgs/python3-libdecsync/template

diff --git a/srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch b/srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch
new file mode 100644
index 000000000000..f55a0a11bf07
--- /dev/null
+++ b/srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch
@@ -0,0 +1,64 @@
+From 5a2024669f4cc03e79c2a5ae856edd635bd87b9e Mon Sep 17 00:00:00 2001
+From: Alexis Ehret <git@08a.re>
+Date: Tue, 13 Sep 2022 18:04:32 +0200
+Subject: [PATCH 1/1] hardcode libpath for voidlinux
+
+Signed-off-by: Alexis Ehret <git@08a.re>
+---
+ libdecsync/__init__.py | 27 +--------------------------
+ setup.py               |  1 -
+ 2 files changed, 1 insertion(+), 27 deletions(-)
+
+diff --git a/libdecsync/__init__.py b/libdecsync/__init__.py
+index fa2d14d..484c6dc 100644
+--- a/libdecsync/__init__.py
++++ b/libdecsync/__init__.py
+@@ -29,32 +29,7 @@ import sys
+ class DecsyncException(Exception):
+     pass
+ 
+-os_name = platform.system()
+-machine_type = platform.machine()
+-platform_bits = platform.architecture()[0]
+-if os_name == "Linux":
+-    if machine_type == "x86_64":
+-        libpath = resource_filename(__name__, "libs/libdecsync_amd64.so")
+-    elif machine_type.startswith("arm") or machine_type.startswith("aarch"):
+-        if platform_bits == "64bit":
+-            libpath = resource_filename(__name__, "libs/libdecsync_arm64.so")
+-        else:
+-            libpath = resource_filename(__name__, "libs/libdecsync_arm32.so")
+-    else:
+-        raise Exception("libdecsync: Machine type '" + machine_type + "' not supported")
+-elif os_name == "Windows":
+-    if platform_bits == "64bit":
+-        libpath = resource_filename(__name__, "libs/decsync_x64.dll")
+-    else:
+-        libpath = resource_filename(__name__, "libs/decsync_x86.dll")
+-elif os_name == "Darwin":
+-    if machine_type == "x86_64":
+-        libpath = resource_filename(__name__, "libs/libdecsync_amd64.dylib")
+-    else:
+-        libpath = resource_filename(__name__, "libs/libdecsync_arm64.dylib")
+-else:
+-    raise Exception("libdecsync: Operating system '" + os_name + "' not supported")
+-
++libpath = "/usr/lib/libdecsync.so.0"
+ _libdecsync = CDLL(libpath)
+ 
+ def _errcheckDecsync(result, func, args):
+diff --git a/setup.py b/setup.py
+index a79755a..6853f70 100644
+--- a/setup.py
++++ b/setup.py
+@@ -14,7 +14,6 @@ setup(
+     keywords=["decsync"],
+     license="LGPLv2+",
+     packages=["libdecsync"],
+-    package_data={"libdecsync":["libs/*"]},
+     classifiers=[
+         "Programming Language :: Python :: 3",
+         "Operating System :: POSIX :: Linux",
+-- 
+2.37.3
+
diff --git a/srcpkgs/python3-libdecsync/template b/srcpkgs/python3-libdecsync/template
new file mode 100644
index 000000000000..bb5db27ab412
--- /dev/null
+++ b/srcpkgs/python3-libdecsync/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-libdecsync'
+pkgname=python3-libdecsync
+version=2.2.1
+revision=1
+archs="x86_64"
+wrksrc="libdecsync-bindings-python3-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3 libdecsync-${version}_${revision}"
+checkdepends="${depends}"
+short_desc="Python3 wrapper around libdecsync for synchronizing using DecSync"
+maintainer="Alexis Ehret <dev@08a.re>"
+license="LGPL-2.0-only"
+homepage="https://github.com/39aldo39/libdecsync-bindings-python3"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=68e0452c128306981dc8e7aa58248cc57855a2de241326b37fbeb5469446d10e

From 97e1617450786893e1dd5eb1d8604b7490b2d3df Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Tue, 13 Sep 2022 20:21:54 +0200
Subject: [PATCH 3/3] New package: python3-radicale_storage_decsync-2.1.0

---
 .../python3-radicale_storage_decsync/template    | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-radicale_storage_decsync/template

diff --git a/srcpkgs/python3-radicale_storage_decsync/template b/srcpkgs/python3-radicale_storage_decsync/template
new file mode 100644
index 000000000000..b9efb10ec187
--- /dev/null
+++ b/srcpkgs/python3-radicale_storage_decsync/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-radicale_storage_decsync'
+pkgname=python3-radicale_storage_decsync
+version=2.1.0
+revision=1
+archs="x86_64"
+wrksrc="Radicale-DecSync-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-pip"
+depends="radicale>=3 python3-libdecsync>=2.0.0"
+short_desc="Radicale DecSync is an Radicale storage plugin using DecSync"
+maintainer="Alexis Ehret <git@08a.re>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/39aldo39/Radicale-DecSync"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=c5879a447b2d9b73cb12c941504d796bf86a8fd19683df695331f8f5e59188c9
+make_check=no # Empty check

  parent reply	other threads:[~2022-11-12 11:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 14:07 [PR PATCH] New package: libdecsync-2.2.1 08A
2022-09-13 14:21 ` [PR PATCH] [Updated] " 08A
2022-09-13 17:24 ` 08A
2022-09-13 18:22 ` [PR PATCH] [Updated] [WIP] New packages: libdecsync-2.2.1, python3-libdecsync-2.2.1, python3-radicale_storage_decsync-2.1.0 08A
2022-09-13 18:33 ` 08A
2022-09-13 18:58 ` eoli3n
2022-09-13 19:02 ` eoli3n
2022-09-14  7:12 ` [PR PATCH] [Updated] " 08A
2022-09-14 10:33 ` 08A
2022-09-25 10:54 ` 08A
2022-09-26  9:00 ` 08A
2022-09-28  9:01 ` 08A
2022-11-12 11:43 ` 08A [this message]
2022-11-12 11:45 ` 08A
2022-11-12 19:32 ` [PR PATCH] [Updated] " 08A
2022-11-15 12:23 ` 08A
2023-02-14  2:02 ` github-actions
2023-03-01  5:18 ` [PR PATCH] [Closed]: " github-actions
2023-03-01 13:06 ` 08A
2023-03-01 13:07 ` 08A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221112114338.CU1CqT0OkEBxvVkUV5nIS_JUZx6dyYN2Ob4hy60VCx4@z \
    --to=08a@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).