mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 0/2 v2] add image-rauc-casync
@ 2019-11-01  9:17 Ladislav Michl
  2019-11-01  9:18 ` [ptxdist] [PATCH 1/2 v2] host-xz: build shared libs again Ladislav Michl
  2019-11-01  9:19 ` [ptxdist] [PATCH 2/2 v2] casync: new package Ladislav Michl
  0 siblings, 2 replies; 3+ messages in thread
From: Ladislav Michl @ 2019-11-01  9:17 UTC (permalink / raw)
  To: ptxdist

Hi there,

this is second attempt to find out how (if at all) are people using
rauc with casync support. Here it is used to build zip file with
casync update to be deployed on IIS server:
--- 8< ---
#
# We provide this package
#
IMAGE_PACKAGES-$(PTXCONF_IMAGE_RAUC_CASYNC) += image-rauc-casync

#
# Paths and names
#
IMAGE_RAUC_CASYNC		:= image-rauc-casync
IMAGE_RAUC_CASYNC_VER		:= $(call ptx/sh, git describe --abbrev=0 --tags)
IMAGE_RAUC_CASYNC_VER_FULL	:= $(call ptx/sh, git describe --long --tags)
IMAGE_RAUC_CASYNC_DIR		:= $(BUILDDIR)/$(IMAGE_RAUC_CASYNC)
IMAGE_RAUC_CASYNC_IMAGE		:= $(IMAGEDIR)/$(IMAGE_RAUC_CASYNC_VER).zip

# ----------------------------------------------------------------------------
# Image
# ----------------------------------------------------------------------------

ifdef PTXCONF_IMAGE_RAUC_CASYNC

IMAGE_RAUC_KEY		:= $(call ptx/in-platformconfigdir, config/rauc/rauc.key.pem)
IMAGE_RAUC_CERT		:= $(call ptx/in-platformconfigdir, config/rauc/rauc.cert.pem)
IMAGE_RAUC_KEYRING	:= $(call ptx/in-platformconfigdir, projectroot/etc/rauc/ca.cert.pem)

TVM4_MANIFEST_FILE	:= TVM4_$(IMAGE_RAUC_CASYNC_VER).manifest
TVM4_MANIFEST_TEMPLATE	:= $(call ptx/in-platformconfigdir, config/images/manifest-template)

$(IMAGE_RAUC_CASYNC_IMAGE): $(TVM4_MANIFEST_TEMPLATE)
	@$(call targetinfo)
	@sed -e 's,@VERSION@,$(IMAGE_RAUC_CASYNC_VER),g' \
		-e 's,@VERSIONFULL@,$(IMAGE_RAUC_CASYNC_VER_FULL),g' \
		 $(TVM4_MANIFEST_TEMPLATE) > $(PTXDIST_TEMPDIR)/$(TVM4_MANIFEST_FILE)
	@rauc convert --cert=$(IMAGE_RAUC_CERT) \
		--key=$(IMAGE_RAUC_KEY) --keyring=$(IMAGE_RAUC_KEYRING) \
		$(IMAGE_RAUC_IMAGE) $(PTXDIST_TEMPDIR)/casync-bundle.raucb
	@cd $(PTXDIST_TEMPDIR) && \
		zip -q -m -r update.zip casync-bundle.raucb casync-bundle.castr
	@zip -q -m -j $(IMAGE_RAUC_CASYNC_IMAGE) $(PTXDIST_TEMPDIR)/update.zip \
		$(PTXDIST_TEMPDIR)/$(TVM4_MANIFEST_FILE)
	@$(call finish)

endif

--- 8< ---

Ladislav Michl (2):
  host-xz: build shared libs again
  casync: new package

 rules/casync.in        | 36 ++++++++++++++++++++
 rules/casync.make      | 76 ++++++++++++++++++++++++++++++++++++++++++
 rules/host-casync.in   | 11 ++++++
 rules/host-casync.make | 33 ++++++++++++++++++
 rules/host-xz.make     |  5 ++-
 5 files changed, 158 insertions(+), 3 deletions(-)
 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

-- 
2.24.0.rc2

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 1/2 v2] host-xz: build shared libs again
  2019-11-01  9:17 [ptxdist] [PATCH 0/2 v2] add image-rauc-casync Ladislav Michl
@ 2019-11-01  9:18 ` Ladislav Michl
  2019-11-01  9:19 ` [ptxdist] [PATCH 2/2 v2] casync: new package Ladislav Michl
  1 sibling, 0 replies; 3+ messages in thread
From: Ladislav Michl @ 2019-11-01  9:18 UTC (permalink / raw)
  To: ptxdist

Commit f9b48616ef47 ("host-xz: Don't build with shared libs") disabled
building of shared libs, but we now need them for host-casync package.
As host-gettext package is build with --without-xz now, mixing system
and host libraries original commit solved is no longer an issue.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 CHANGES:
 -v2: new patch

 rules/host-xz.make | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/rules/host-xz.make b/rules/host-xz.make
index c02a9449e..ee7131479 100644
--- a/rules/host-xz.make
+++ b/rules/host-xz.make
@@ -21,7 +21,6 @@ HOST_PACKAGES-$(PTXCONF_HOST_XZ) += host-xz
 HOST_XZ_CONF_TOOL	:= autoconf
 HOST_XZ_CONF_OPT	:= \
 	$(HOST_AUTOCONF) \
-	--libdir=/lib/xz \
 	--disable-debug \
 	--disable-external-sha256 \
 	--enable-assembler \
@@ -33,11 +32,11 @@ HOST_XZ_CONF_OPT	:= \
 	--disable-lzmainfo \
 	--disable-lzma-links \
 	--disable-scripts \
-	--disable-shared \
 	--disable-doc \
 	--enable-symbol-versions \
 	--disable-sandbox \
-	--enable-static \
+	--enable-shared \
+	--disable-static \
 	--disable-nls \
 	--enable-rpath \
 	--enable-unaligned-access=auto \
-- 
2.24.0.rc2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 2/2 v2] casync: new package
  2019-11-01  9:17 [ptxdist] [PATCH 0/2 v2] add image-rauc-casync Ladislav Michl
  2019-11-01  9:18 ` [ptxdist] [PATCH 1/2 v2] host-xz: build shared libs again Ladislav Michl
@ 2019-11-01  9:19 ` Ladislav Michl
  1 sibling, 0 replies; 3+ messages in thread
From: Ladislav Michl @ 2019-11-01  9:19 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 CHANGES:
 -v2: None

 rules/casync.in        | 36 ++++++++++++++++++++
 rules/casync.make      | 76 ++++++++++++++++++++++++++++++++++++++++++
 rules/host-casync.in   | 11 ++++++
 rules/host-casync.make | 33 ++++++++++++++++++
 4 files changed, 156 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..63e6085da
--- /dev/null
+++ b/rules/casync.make
@@ -0,0 +1,76 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Ladislav Michl <ladis@linux-mips.org>
+#
+# 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..6bcf0361a
--- /dev/null
+++ b/rules/host-casync.make
@@ -0,0 +1,33 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Ladislav Michl <ladis@linux-mips.org>
+#
+# 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.24.0.rc2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2019-11-01  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01  9:17 [ptxdist] [PATCH 0/2 v2] add image-rauc-casync Ladislav Michl
2019-11-01  9:18 ` [ptxdist] [PATCH 1/2 v2] host-xz: build shared libs again Ladislav Michl
2019-11-01  9:19 ` [ptxdist] [PATCH 2/2 v2] casync: new package Ladislav Michl

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