mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl via ptxdist <ptxdist@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>
Subject: [ptxdist] [RFC PATCH 3/7] swupdate: Introduce new package
Date: Fri, 21 Mar 2025 09:52:42 +0100	[thread overview]
Message-ID: <mailman.2953.1742547174.466.ptxdist@pengutronix.de> (raw)
In-Reply-To: <20250321085246.21344-1-ada@thorsis.com>


[-- Attachment #0: Type: message/rfc822, Size: 7999 bytes --]

From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [RFC PATCH 3/7] swupdate: Introduce new package
Date: Fri, 21 Mar 2025 09:52:42 +0100
Message-ID: <20250321085246.21344-4-ada@thorsis.com>

Minimal solution, not considering all the options which can be set
through Kconfig.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 rules/swupdate.in   |  17 ++++++
 rules/swupdate.make | 144 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)
 create mode 100644 rules/swupdate.in
 create mode 100644 rules/swupdate.make

diff --git a/rules/swupdate.in b/rules/swupdate.in
new file mode 100644
index 000000000..2fc4f6627
--- /dev/null
+++ b/rules/swupdate.in
@@ -0,0 +1,17 @@
+## SECTION=applications
+
+config SWUPDATE
+	tristate
+	select LIBUBOOTENV
+	select JSON_C
+	prompt "swupdate"
+	help
+	  SWUpdate is a Linux Update agent with the goal to provide an
+	  efficient and safe way to update an embedded Linux system in
+	  field.
+	  SWUpdate supports local and OTA updates, multiple update
+	  strategies and it is designed with security in mind.
+
+	  https://swupdate.org/
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/swupdate.make b/rules/swupdate.make
new file mode 100644
index 000000000..3f8fa13b5
--- /dev/null
+++ b/rules/swupdate.make
@@ -0,0 +1,144 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2025 by Alexander Dahl <ada@thorsis.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SWUPDATE) += swupdate
+
+#
+# Paths and names
+#
+SWUPDATE_VERSION	:= 2024.12.1
+SWUPDATE_MD5		:= ce7ef65f99840d0b0e724a6d96c17430
+SWUPDATE		:= swupdate-$(SWUPDATE_VERSION)
+SWUPDATE_SUFFIX		:= tar.gz
+SWUPDATE_URL		:= https://github.com/sbabic/swupdate/archive/refs/tags/$(SWUPDATE_VERSION).$(SWUPDATE_SUFFIX)
+SWUPDATE_SOURCE		:= $(SRCDIR)/$(SWUPDATE).$(SWUPDATE_SUFFIX)
+SWUPDATE_DIR		:= $(BUILDDIR)/$(SWUPDATE)
+SWUPDATE_BUILD_DIR	:= $(SWUPDATE_DIR)-build
+SWUPDATE_BUILD_OOT	:= KEEP
+SWUPDATE_LICENSE	:= \
+	BSD-1-Clause AND BSD-3-Clause AND CC-BY-SA-4.0 AND CC0-1.0 AND \
+	GPL-2.0-only AND GPL-2.0-or-later AND ISC AND \
+	LGPL-2.1-or-later AND MIT AND OFL-1.1
+SWUPDATE_LICENSE_FILES	:= \
+	file://LICENSES/BSD-1-Clause.txt;md5=4c75b3902cf6a01969906bcae9cf8cd6 \
+	file://LICENSES/BSD-3-Clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \
+	file://LICENSES/CC-BY-SA-4.0.txt;md5=7130783469368ceb248a4f03e89ea4b8 \
+	file://LICENSES/CC0-1.0.txt;md5=0ceb3372c9595f0a8067e55da801e4a1 \
+	file://LICENSES/GPL-2.0-only.txt;md5=4ee23c52855c222cba72583d301d2338 \
+	file://LICENSES/GPL-2.0-or-later.txt;md5=261bea1168c0bdfa73232ee90df11eb6 \
+	file://LICENSES/ISC.txt;md5=a6fd9988b21ff227cdfb961fd4b23ba4 \
+	file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c \
+	file://LICENSES/MIT.txt;md5=838c366f69b72c5df05c96dff79b35f2 \
+	file://LICENSES/OFL-1.1.txt;md5=7a75f82b54b8af9107d35c6d3cab23ac
+
+SWUPDATE_CONFIG		:= $(or \
+		$(call ptx/in-path, PTXDIST_PATH_LAYERS, configs/swupdate.config), \
+		$(PTXDIST_WORKSPACE)/configs/swupdate.config)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SWUPDATE_CONF_TOOL	:= kconfig
+
+SWUPDATE_CONF_ENV	:= \
+	HAVE_FREEBSD=n \
+	HAVE_LINUX=y \
+	HAVE_LUA=n \
+	HAVE_LIBCONFIG=n \
+	HAVE_LIBARCHIVE=n \
+	HAVE_LIBCURL=n \
+	HAVE_LIBFDISK=n \
+	HAVE_LIBBLKID=n \
+	HAVE_LIBGPIOD=n \
+	HAVE_LIBMTD=n \
+	HAVE_LIBUBI=n \
+	HAVE_LIBUBOOTENV=n \
+	HAVE_LIBEBGENV=n \
+	HAVE_LIBTEGRABOOT_TOOLS=n \
+	HAVE_LIBZEROMQ=n \
+	HAVE_ZLIB=n \
+	HAVE_ZSTD=n \
+	HAVE_LIBEXT2FS=n \
+	HAVE_LIBBTRFS=n \
+	HAVE_LIBSSL=n \
+	HAVE_LIBSYSTEMD=n \
+	HAVE_LIBCRYPTO=n \
+	HAVE_WOLFSSL=n \
+	HAVE_MBEDTLS=n \
+	HAVE_P11KIT=n \
+	HAVE_LIBWEBSOCKETS=n \
+	HAVE_LIBRSYNC=n \
+	HAVE_URIPARSER=n \
+	HAVE_ZCK=n
+
+SWUPDATE_CONF_OPT	:= \
+	-C $(SWUPDATE_DIR) \
+	O=$(SWUPDATE_BUILD_DIR) \
+	V=$(PTXDIST_VERBOSE)
+
+SWUPDATE_MAKE_ENV	:= \
+	$(SWUPDATE_CONF_ENV) \
+	CROSS_COMPILE=$(COMPILER_PREFIX) \
+	CC=$(CROSS_CC) \
+	LD=$(CROSS_CC) \
+	SKIP_STRIP=y
+
+SWUPDATE_MAKE_OPT	:= \
+	$(SWUPDATE_CONF_OPT) \
+	SWU_VER="$(SWUPDATE_VERSION) (PTXdist $(PTXDIST_VERSION_FULL))"
+
+SWUPDATE_INSTALL_OPT	:= \
+	$(SWUPDATE_MAKE_OPT) \
+	install
+
+ifdef PTXCONF_SWUPDATE
+$(SWUPDATE_CONFIG):
+	@echo
+	@echo "******************************************************************************"
+	@echo "**** Please generate a swupdate config with 'ptxdist menuconfig swupdate' ****"
+	@echo "******************************************************************************"
+	@echo
+	@echo
+	@exit 1
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/swupdate.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, swupdate)
+	@$(call install_fixup, swupdate,PRIORITY,optional)
+	@$(call install_fixup, swupdate,SECTION,base)
+	@$(call install_fixup, swupdate,AUTHOR,"Alexander Dahl <ada@thorsis.com>")
+	@$(call install_fixup, swupdate,DESCRIPTION,missing)
+
+	@$(call install_lib, swupdate, 0, 0, 0644, libswupdate)
+	@$(call install_copy, swupdate, 0, 0, 0755, -, /usr/bin/swupdate)
+	@$(call install_copy, swupdate, 0, 0, 0755, -, /usr/bin/swupdate-client)
+	@$(call install_copy, swupdate, 0, 0, 0755, -, /usr/bin/swupdate-ipc)
+	@$(call install_copy, swupdate, 0, 0, 0755, -, /usr/bin/swupdate-progress)
+
+	@$(call install_finish, swupdate)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+$(call ptx/kconfig-targets, swupdate): $(STATEDIR)/swupdate.extract
+	@$(call world/kconfig, SWUPDATE, $(subst swupdate_,,$@))
+
+# vim: ft=make noet tw=72 ts=8 sw=8
-- 
2.39.5




  parent reply	other threads:[~2025-03-21  8:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250321085246.21344-1-ada@thorsis.com>
2025-03-21  8:52 ` [ptxdist] [RFC PATCH 1/7] libubootenv: " Alexander Dahl via ptxdist
2025-03-21  8:52 ` [ptxdist] [RFC PATCH 2/7] libubootenv: Add option for installing tools Alexander Dahl via ptxdist
2025-03-21  8:52 ` Alexander Dahl via ptxdist [this message]
2025-03-21  8:52 ` [ptxdist] [RFC PATCH 4/7] swupdate: Remove targetinstall of example tools Alexander Dahl via ptxdist
2025-03-21  8:52 ` [ptxdist] [RFC PATCH 5/7] swupdate: Add option to build with OpenSSL support Alexander Dahl via ptxdist
2025-03-21  8:52 ` [ptxdist] [RFC PATCH 6/7] swupdate: Fix passing libubootenv dependency Alexander Dahl via ptxdist
2025-03-21  8:52 ` [ptxdist] [RFC PATCH 7/7] swupdate: Add optional zlib support Alexander Dahl via ptxdist

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=mailman.2953.1742547174.466.ptxdist@pengutronix.de \
    --to=ptxdist@pengutronix.de \
    --cc=ada@thorsis.com \
    /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