All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/casync: new package
@ 2021-01-07  7:12 Yair Ben-Avraham
  2021-01-07 10:13 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yair Ben-Avraham @ 2021-01-07  7:12 UTC (permalink / raw)
  To: buildroot

Content-Addressable Data Synchronization Tool

Signed-off-by: Yair Ben-Avraham <yairba@protonmail.com>
---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/casync/Config.in   | 15 +++++++++++
 package/casync/casync.hash |  3 +++
 package/casync/casync.mk   | 54 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 74 insertions(+)
 create mode 100644 package/casync/Config.in
 create mode 100644 package/casync/casync.hash
 create mode 100644 package/casync/casync.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 258a51a14c..1917cd7f48 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2709,6 +2709,7 @@ F:	package/fwup/

 N:	Yair Ben Avraham <yairba@protonmail.com>
 F:	package/gloox/
+F:	package/casync/

 N:	Yann CARDAILLAC <ycardaillac@sepro-group.com>
 F:	package/open62541/
diff --git a/package/Config.in b/package/Config.in
index 7264198001..eff1a7f433 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2067,6 +2067,7 @@ menu "Networking applications"
 	source "package/c-icap-modules/Config.in"
 	source "package/can-utils/Config.in"
 	source "package/cannelloni/Config.in"
+	source "package/casync/Config.in"
 	source "package/chrony/Config.in"
 	source "package/civetweb/Config.in"
 	source "package/connman/Config.in"
diff --git a/package/casync/Config.in b/package/casync/Config.in
new file mode 100644
index 0000000000..7cace7eacf
--- /dev/null
+++ b/package/casync/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_CASYNC
+	bool "casync"
+	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_TOOLCHAIN_USES_GLIBC # scandirat() is not implemented by musl and uclibc-ng
+	select BR2_PACKAGE_ACL
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_XZ
+	help
+	  Content-Addressable Data Synchronization Tool
+
+	  https://github.com/systemd/casync
+
+comment "casync needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/casync/casync.hash b/package/casync/casync.hash
new file mode 100644
index 0000000000..dbb85520de
--- /dev/null
+++ b/package/casync/casync.hash
@@ -0,0 +1,3 @@
+# sha256 locally computed
+sha256  d07f43e70e3c466152033da4c55c065f815d3025234a046c2bce1cfe4ac7d273  casync-4ad9bcb94bc83ff36cfc65515107ea06a88c2dfc.tar.gz
+sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  LICENSE.LGPL2.1
diff --git a/package/casync/casync.mk b/package/casync/casync.mk
new file mode 100644
index 0000000000..9cda386bb0
--- /dev/null
+++ b/package/casync/casync.mk
@@ -0,0 +1,54 @@
+################################################################################
+#
+# casync
+#
+################################################################################
+
+CASYNC_VERSION = 4ad9bcb94bc83ff36cfc65515107ea06a88c2dfc
+CASYNC_SITE = $(call github,systemd,casync,$(CASYNC_VERSION))
+CASYNC_LICENSE = LGPL-2.1+
+CASYNC_LICENSE_FILES = LICENSE.LGPL2.1
+# xz is mandatory because of ./src/castore.c:5:10: #include <lzma.h>
+CASYNC_DEPENDENCIES = acl libcurl openssl xz
+CASYNC_CONF_OPTS += -Dman=false
+
+# meson booleans
+ifeq ($(BR2_PACKAGE_LIBFUSE),y)
+CASYNC_DEPENDENCIES += libfuse
+CASYNC_CONF_OPTS += -Dfuse=true
+else
+CASYNC_CONF_OPTS += -Dfuse=false
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+CASYNC_DEPENDENCIES += libselinux
+CASYNC_CONF_OPTS += -Dselinux=true
+else
+CASYNC_CONF_OPTS += -Dselinux=false
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+CASYNC_DEPENDENCIES += libudev
+CASYNC_CONF_OPTS += -Dudev=true
+else
+CASYNC_CONF_OPTS += -Dudev=false
+# Due to a bug in ./meson.build, 'udevrulesdir' must not be empty
+CASYNC_CONF_OPTS += -Dudevrulesdir=this_is_a_bug
+endif
+
+# meson features
+ifeq ($(BR2_PACKAGE_LIBZSTD),y)
+CASYNC_DEPENDENCIES += libzstd
+CASYNC_CONF_OPTS += -Dlibzstd=enabled
+else
+CASYNC_CONF_OPTS += -Dlibzstd=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+CASYNC_DEPENDENCIES += zlib
+CASYNC_CONF_OPTS += -Dzlib=enabled
+else
+CASYNC_CONF_OPTS += -Dlibz=disabled
+endif
+
+$(eval $(meson-package))
--
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/casync: new package
  2021-01-07  7:12 [Buildroot] [PATCH v2 1/1] package/casync: new package Yair Ben-Avraham
@ 2021-01-07 10:13 ` Thomas Petazzoni
  2021-01-07 14:23   ` Yair Ben-Avraham
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2021-01-07 10:13 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for the new iteration!

On Thu, 07 Jan 2021 07:12:57 +0000
Yair Ben-Avraham via buildroot <buildroot@busybox.net> wrote:

> +	depends on BR2_PACKAGE_HAS_UDEV

udev is not a mandatory dependency.

> +CASYNC_VERSION = 4ad9bcb94bc83ff36cfc65515107ea06a88c2dfc
> +CASYNC_SITE = $(call github,systemd,casync,$(CASYNC_VERSION))
> +CASYNC_LICENSE = LGPL-2.1+
> +CASYNC_LICENSE_FILES = LICENSE.LGPL2.1
> +# xz is mandatory because of ./src/castore.c:5:10: #include <lzma.h>
> +CASYNC_DEPENDENCIES = acl libcurl openssl xz

This seems odd, I *think* I got it to build without xz. Did you pass
the right -D option ?

Other than those two questions, looks good to me!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/casync: new package
  2021-01-07 10:13 ` Thomas Petazzoni
@ 2021-01-07 14:23   ` Yair Ben-Avraham
  2021-01-09 22:51     ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Yair Ben-Avraham @ 2021-01-07 14:23 UTC (permalink / raw)
  To: buildroot

Hi,

I tried without xz, build failed, details below:

./casync.config:
BR2_PACKAGE_ACL=y
BR2_PACKAGE_LIBCURL=y
BR2_PACKAGE_OPENSSL=y


./package/casync/casync.mk:
CASYNC_DEPENDENCIES = acl libcurl openssl
...
ifeq ($(BR2_PACKAGE_XZ),y)
CASYNC_DEPENDENCIES += xz
CASYNC_CONF_OPTS += -Dliblzma=enabled
else
CASYNC_CONF_OPTS += -Dliblzma=disabled
endif
...


br-arm-cortex-a9-glibc/logfile:
../src/castore.c:5:10: fatal error: lzma.h: No such file or directory
    5 | #include <lzma.h>
      |          ^~~~~~~~
compilation terminated.


In addition, in file ./src/castore.c , include <lzma.h> is not under if HAVE_LIBLZMA block, see counterexample inside ./src/compressor.h

So it's either adding xz to the dependencies or include <lzma.h> under if condition and try to build. What is better?

Yair
--
Yair Ben-Avraham
yairba at protonmail.com
+31.6.1316.5535

??????? Original Message ???????
On Thursday, January 7, 2021 11:13 AM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
>
> Thanks for the new iteration!
>
> On Thu, 07 Jan 2021 07:12:57 +0000
> Yair Ben-Avraham via buildroot buildroot at busybox.net wrote:
>
> > -   depends on BR2_PACKAGE_HAS_UDEV
>
> udev is not a mandatory dependency.
>
> > +CASYNC_VERSION = 4ad9bcb94bc83ff36cfc65515107ea06a88c2dfc
> > +CASYNC_SITE = $(call github,systemd,casync,$(CASYNC_VERSION))
> > +CASYNC_LICENSE = LGPL-2.1+
> > +CASYNC_LICENSE_FILES = LICENSE.LGPL2.1
> > +# xz is mandatory because of ./src/castore.c:5:10: #include <lzma.h>
> > +CASYNC_DEPENDENCIES = acl libcurl openssl xz
>
> This seems odd, Ithink I got it to build without xz. Did you pass
> the right -D option ?
>
> Other than those two questions, looks good to me!
>
> Thomas
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/casync: new package
  2021-01-07 14:23   ` Yair Ben-Avraham
@ 2021-01-09 22:51     ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-01-09 22:51 UTC (permalink / raw)
  To: buildroot

Yair, All,

On 2021-01-07 14:23 +0000, Yair Ben-Avraham via buildroot spake thusly:
> I tried without xz, build failed, details below:
> 
> ./casync.config:
> BR2_PACKAGE_ACL=y
> BR2_PACKAGE_LIBCURL=y
> BR2_PACKAGE_OPENSSL=y
> 
> ./package/casync/casync.mk:
> CASYNC_DEPENDENCIES = acl libcurl openssl
> ...
> ifeq ($(BR2_PACKAGE_XZ),y)
> CASYNC_DEPENDENCIES += xz
> CASYNC_CONF_OPTS += -Dliblzma=enabled
> else
> CASYNC_CONF_OPTS += -Dliblzma=disabled
> endif
> ...
> 
> br-arm-cortex-a9-glibc/logfile:
> ../src/castore.c:5:10: fatal error: lzma.h: No such file or directory
>     5 | #include <lzma.h>
>       |          ^~~~~~~~
> compilation terminated.
> 
> In addition, in file ./src/castore.c , include <lzma.h> is not under if HAVE_LIBLZMA block, see counterexample inside ./src/compressor.h
> 
> So it's either adding xz to the dependencies or include <lzma.h> under if condition and try to build. What is better?

The proper solution, IMHO, would be to fix ./src/castore.c. AFAICS,
lzma.h is not needed from src/castore.c.

If that is indeed true, then patch it out, and send the patch upstream.

Afterall, upstream has an option to enable/disable use of liblzma, so
they do expect the build to succeed without it, I would wager.

Regards,
Yann E. MORIN.

> Yair
> --
> Yair Ben-Avraham
> yairba at protonmail.com
> +31.6.1316.5535
> 
> ??????? Original Message ???????
> On Thursday, January 7, 2021 11:13 AM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
> > Hello,
> >
> > Thanks for the new iteration!
> >
> > On Thu, 07 Jan 2021 07:12:57 +0000
> > Yair Ben-Avraham via buildroot buildroot at busybox.net wrote:
> >
> > > -   depends on BR2_PACKAGE_HAS_UDEV
> >
> > udev is not a mandatory dependency.
> >
> > > +CASYNC_VERSION = 4ad9bcb94bc83ff36cfc65515107ea06a88c2dfc
> > > +CASYNC_SITE = $(call github,systemd,casync,$(CASYNC_VERSION))
> > > +CASYNC_LICENSE = LGPL-2.1+
> > > +CASYNC_LICENSE_FILES = LICENSE.LGPL2.1
> > > +# xz is mandatory because of ./src/castore.c:5:10: #include <lzma.h>
> > > +CASYNC_DEPENDENCIES = acl libcurl openssl xz
> >
> > This seems odd, Ithink I got it to build without xz. Did you pass
> > the right -D option ?
> >
> > Other than those two questions, looks good to me!
> >
> > Thomas
> >
> > -----------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > Thomas Petazzoni, CTO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-09 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07  7:12 [Buildroot] [PATCH v2 1/1] package/casync: new package Yair Ben-Avraham
2021-01-07 10:13 ` Thomas Petazzoni
2021-01-07 14:23   ` Yair Ben-Avraham
2021-01-09 22:51     ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.