mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [RFC] casync: new package
@ 2019-05-15  7:00 Ladislav Michl
  2019-05-17 14:32 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Ladislav Michl @ 2019-05-15  7:00 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Hi there,

 this is just an attempt to find you how (if at all) are people using
 rauc with casync support. Packages here are good enough to run
 $ PATH=$ROOT/sysroot-host/bin:$ROOT/sysroot-host/sbin:$PATH
 $ rauc convert --cerrt=<config>/rauc/rauc.cert.pem --key=<config>/rauc/rauc.key.pem --keyring=<prjdir>/projectroot/etc/rauc/ca.cert.pem <imgdir>/update.raucb casync-bundle.raucb
 after rauc bundle is built. Resulting index and chunk store can
 be then used to update target system.

 Do we want it as another image target? Anyone is using any other
 scenario?

 Also, to make host-casync built we need host-xz with f9b48616ef47
 ("host-xz: Don't build with shared libs") reverted. That commit log
 says:
   We don't need shared librarys of host-xz. When they are enabled,
   building host-gettext may fail because of mixed shared library versions.
 Is that still an issue?

 Thank you,
	ladis

 rules/casync.in        | 36 +++++++++++++++++++
 rules/casync.make      | 78 ++++++++++++++++++++++++++++++++++++++++++
 rules/host-casync.in   | 11 ++++++
 rules/host-casync.make | 35 +++++++++++++++++++
 4 files changed, 160 insertions(+)
 create mode 100644 rules/casync.in
 create mode 100644 rules/casync.make
 create mode 100644 rules/host-casync.in
 create mode 100644 rules/host-casync.make

diff --git a/rules/casync.in b/rules/casync.in
new file mode 100644
index 000000000..20e3d87a7
--- /dev/null
+++ b/rules/casync.in
@@ -0,0 +1,36 @@
+## SECTION=applications
+
+menuconfig CASYNC
+	tristate
+	prompt "Casync Tool                   "
+	select HOST_CASYNC
+	select HOST_MESON
+	select ACL
+	select LIBC_RT
+	select LIBCURL
+	select LIBC_M
+	select FUSE		if CASYNC_FUSE
+	select FUSE_LIB		if CASYNC_FUSE
+	select OPENSSL
+	select UDEV		if CASYNC_UDEV
+	select UDEV_LIBUDEV	if CASYNC_UDEV
+	select XZ		if CASYNC_LZMA
+	select ZLIB		if CASYNC_ZLIB
+	help
+	  casync — Content Addressable Data Synchronizer.
+
+if CASYNC
+
+config CASYNC_FUSE
+	bool "FUSE integration"
+
+config CASYNC_UDEV
+	bool "UDEV integration"
+
+config CASYNC_LZMA
+	bool "support XZ compression"
+
+config CASYNC_ZLIB
+	bool "support ZLIB compression"
+
+endif
diff --git a/rules/casync.make b/rules/casync.make
new file mode 100644
index 000000000..8e0abbbdc
--- /dev/null
+++ b/rules/casync.make
@@ -0,0 +1,78 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Ladislav Michl <ladis@linux-mips.org>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_CASYNC) += casync
+
+#
+# Paths and names
+#
+CASYNC_VERSION	:= a8f6c841ccfe59ca8c68aad64df170b64042dce8
+CASYNC_MD5	:= 38cf3c9e1be9ac60243031538024aa01
+CASYNC		:= casync-$(CASYNC_VERSION)
+CASYNC_SUFFIX	:= tar.gz
+CASYNC_URL	:= https://github.com/systemd/casync/archive/$(CASYNC_VERSION).$(CASYNC_SUFFIX)
+CASYNC_SOURCE	:= $(SRCDIR)/$(CASYNC).$(CASYNC_SUFFIX)
+CASYNC_DIR	:= $(BUILDDIR)/$(CASYNC)
+CASYNC_LICENSE	:= LGPL-2.1+
+CASYNC_LICENSE_FILES := \
+	file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+CASYNC_CONF_TOOL	:= meson
+CASYNC_CONF_OPT		:= \
+	$(CROSS_MESON_USR) \
+	-Dfuse=$(call ptx/truefalse,PTXCONF_CASYNC_FUSE) \
+	-Dselinux=$(call ptx/truefalse,PTXCONF_GLOBAL_SELINUX) \
+	-Dudev=$(call ptx/truefalse,PTXCONF_CASYNC_UDEV) \
+	-Dudevrulesdir=/usr/lib/udev/rules.d \
+	-Dman=false \
+	-Dlibzstd=disabled \
+	-Dliblzma=$(call ptx/endis,PTXCONF_CASYNC_LZMA)d \
+	-Dlibz=$(call ptx/endis,PTXCONF_CASYNC_ZLIB)d \
+	-Doss-fuzz=false \
+	-Dllvm-fuzz=false \
+	-Dbashcompletiondir=no
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/casync.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, casync)
+	@$(call install_fixup, casync, PRIORITY, optional)
+	@$(call install_fixup, casync, SECTION, base)
+	@$(call install_fixup, casync, AUTHOR, "Ladislav Michl <ladis@linux-mips.org>")
+	@$(call install_fixup, casync, DESCRIPTION, \
+		"Content Addressable Data Synchronizer")
+
+	@$(call install_copy, casync, 0, 0, 0755, -, /usr/bin/casync)
+	@$(call install_copy, casync, 0, 0, 0755, -, /usr/lib/casync/protocols/casync-http)
+	@$(call install_link, casync, casync-http, /usr/lib/casync/protocols/casync-https)
+	@$(call install_link, casync, casync-http, /usr/lib/casync/protocols/casync-ftp)
+	@$(call install_link, casync, casync-http, /usr/lib/casync/protocols/casync-sftp)
+
+ifdef PTXCONF_CASYNC_UDEV
+	@$(call install_alternative, casync, 0, 0, 0644, \
+		/usr/lib/udev/rules.d/75-casync.rules)
+endif
+
+	@$(call install_finish, casync)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/rules/host-casync.in b/rules/host-casync.in
new file mode 100644
index 000000000..66e2192e9
--- /dev/null
+++ b/rules/host-casync.in
@@ -0,0 +1,11 @@
+## SECTION=hosttools_noprompt
+
+config HOST_CASYNC
+	tristate
+	select HOST_ACL
+	select HOST_LIBCURL
+	select HOST_MESON
+	select HOST_OPENSSL
+	select HOST_XZ
+	select HOST_ZLIB
+	default y if ALLYES
diff --git a/rules/host-casync.make b/rules/host-casync.make
new file mode 100644
index 000000000..4d31c44fc
--- /dev/null
+++ b/rules/host-casync.make
@@ -0,0 +1,35 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Ladislav Michl <ladis@linux-mips.org>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_CASYNC) += host-casync
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_CASYNC_CONF_TOOL	:= meson
+HOST_CASYNC_CONF_OPT	:= \
+	$(HOST_MESON_OPT) \
+	-Dfuse=false \
+	-Dselinux=false \
+	-Dudev=false \
+	-Dudevrulesdir=no \
+	-Dman=false \
+	-Dlibzstd=disabled \
+	-Dliblzma=enabled \
+	-Dlibz=enabled \
+	-Doss-fuzz=false \
+	-Dllvm-fuzz=false \
+	-Dbashcompletiondir=no
+
+# vim: syntax=make
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2019-08-29 12:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15  7:00 [ptxdist] [RFC] casync: new package Ladislav Michl
2019-05-17 14:32 ` Michael Olbrich
2019-08-29 12:35   ` Ladislav Michl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox