* [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht @ 2016-08-17 14:53 Roland Hieber 2016-08-18 6:53 ` Michael Olbrich ` (2 more replies) 0 siblings, 3 replies; 16+ messages in thread From: Roland Hieber @ 2016-08-17 14:53 UTC (permalink / raw) To: ptxdist; +Cc: Roland Hieber IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC 5050), designed for embedded systems like the RouterBoard532A or Ubiquiti RouterStation Pro. IBR-DTN consists of several upstream tarballs which split its functionality into modular parts, namely ibrcommon, ibrdtn, ibrdtnd and ibrdtn-tools. Although they are released at the same time with the same version, they are usually packaged separately to provide the modularity on the package level. In order to provide clean and readable Makefiles, the upstream naming scheme is adopted here. Although dtndht is versioned and released as a separate upstream package, it is effectively part of IBR-DTN as it is not really used anywhere else, and it's also developed in close contact with IBR-DTN by the same authors. For this reason, I'm including all package rules in a single patch. The upstream releases includes some functionality which depends on software not currently available in ptxdist. This includes tffs, wifip2p and libvmime. I have included the directives for these features, but commented them out, so they can easily be enabled once that software gets packaged. Signed-off-by: Roland Hieber <rohieb@rohieb.name> --- projectroot/lib/systemd/system/ibrdtnd.service | 12 ++++ rules/dtndht.in | 18 ++++++ rules/dtndht.make | 53 +++++++++++++++++ rules/ibrcommon.in | 39 +++++++++++++ rules/ibrcommon.make | 56 ++++++++++++++++++ rules/ibrdtn-tools.in | 44 +++++++++++++++ rules/ibrdtn-tools.make | 68 ++++++++++++++++++++++ rules/ibrdtn.in | 35 ++++++++++++ rules/ibrdtn.make | 55 ++++++++++++++++++ rules/ibrdtnd.in | 78 ++++++++++++++++++++++++++ rules/ibrdtnd.make | 73 ++++++++++++++++++++++++ 11 files changed, 531 insertions(+) create mode 100644 projectroot/lib/systemd/system/ibrdtnd.service create mode 100644 rules/dtndht.in create mode 100644 rules/dtndht.make create mode 100644 rules/ibrcommon.in create mode 100644 rules/ibrcommon.make create mode 100644 rules/ibrdtn-tools.in create mode 100644 rules/ibrdtn-tools.make create mode 100644 rules/ibrdtn.in create mode 100644 rules/ibrdtn.make create mode 100644 rules/ibrdtnd.in create mode 100644 rules/ibrdtnd.make diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service new file mode 100644 index 0000000..f5ba5cd --- /dev/null +++ b/projectroot/lib/systemd/system/ibrdtnd.service @@ -0,0 +1,12 @@ +[Unit] +Description=IBR-DTN Bundle Protocol daemon +Requires=network.target + +[Service] +ExecStartPre=/bin/mkdir -p /etc/ibrdtn/bpsec /etc/ibrdtn/certs +ExecStartPre=/bin/chown root:root -R /etc/ibrdtn/bpsec /etc/ibrdtn/certs +ExecStart=/usr/sbin/dtnd -D -c /etc/ibrdtnd.conf +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/rules/dtndht.in b/rules/dtndht.in new file mode 100644 index 0000000..72824b5 --- /dev/null +++ b/rules/dtndht.in @@ -0,0 +1,18 @@ +## SECTION=networking + +menuconfig DTNDHT + tristate + prompt "dtndht " + select OPENSSL if DTNDHT_WITH_OPENSSL + help + DTNDHT is a library providing a fully distributed BitTorrent DHT-based + naming service especially for DTN Bundle Protocol EIDs (RFC 5050). + +if DTNDHT + config DTNDHT_WITH_OPENSSL + bool + default y + prompt "use OpenSSL instead of built-in crypto" +endif + +# vim: syntax=kconfig diff --git a/rules/dtndht.make b/rules/dtndht.make new file mode 100644 index 0000000..6908f50 --- /dev/null +++ b/rules/dtndht.make @@ -0,0 +1,53 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_DTNDHT) += dtndht + +# +# Paths and names +# +DTNDHT_VERSION := 0.2.3 +DTNDHT_MD5 := 37c33910ac7e760aad4db81724aeb4fb +DTNDHT := dtndht-$(DTNDHT_VERSION) +DTNDHT_SUFFIX := tar.gz +DTNDHT_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(DTNDHT).$(DTNDHT_SUFFIX) +DTNDHT_SOURCE := $(SRCDIR)/$(DTNDHT).$(DTNDHT_SUFFIX) +DTNDHT_DIR := $(BUILDDIR)/$(DTNDHT) +DTNDHT_LICENSE := MIT + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +DTNDHT_CONF_TOOL := autoconf +DTNDHT_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --$(call ptx/wwo, PTXCONF_DTNDHT_WITH_OPENSSL)-openssl \ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/dtndht.targetinstall: + @$(call targetinfo) + + @$(call install_init, dtndht) + @$(call install_fixup, dtndht,PRIORITY,optional) + @$(call install_fixup, dtndht,SECTION,base) + @$(call install_fixup, dtndht,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, dtndht,DESCRIPTION,missing) + + @$(call install_lib, dtndht, 0, 0, 0755, libdtndht-0.2) + + @$(call install_finish, dtndht) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrcommon.in b/rules/ibrcommon.in new file mode 100644 index 0000000..a310430 --- /dev/null +++ b/rules/ibrcommon.in @@ -0,0 +1,39 @@ +## SECTION=networking + +menuconfig IBRCOMMON + tristate + prompt "ibrcommon " + select LIBXML2 if IBRCOMMON_WITH_XML + select LIBNL3 if IBRCOMMON_WITH_LOWPAN + select OPENSSL if IBRCOMMON_WITH_OPENSSL + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the common library parts which could be of + interest for other software projects. + +if IBRCOMMON + + config IBRCOMMON_ENABLE_DEBUG + bool + default n + prompt "enable debug symbols" + config IBRCOMMON_WITH_LOWPAN + bool + default y + prompt "enable LoWPAN support" + + config IBRCOMMON_WITH_OPENSSL + bool + default y + prompt "enable OpenSSL support" + + config IBRCOMMON_WITH_XML + bool + prompt "enable XML support" + +endif + +# vim: syntax=kconfig diff --git a/rules/ibrcommon.make b/rules/ibrcommon.make new file mode 100644 index 0000000..a1279c1 --- /dev/null +++ b/rules/ibrcommon.make @@ -0,0 +1,56 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRCOMMON) += ibrcommon + +# +# Paths and names +# +IBRCOMMON_VERSION := 1.0.1 +IBRCOMMON_MD5 := 0104763ede969c470f32244d76c234b8 +IBRCOMMON := ibrcommon-$(IBRCOMMON_VERSION) +IBRCOMMON_SUFFIX := tar.gz +IBRCOMMON_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) +IBRCOMMON_SOURCE := $(SRCDIR)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) +IBRCOMMON_DIR := $(BUILDDIR)/$(IBRCOMMON) +IBRCOMMON_LICENSE := Apache-2.0 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +IBRCOMMON_CONF_TOOL := autoconf +IBRCOMMON_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --$(call ptx/endis, PTXCONF_IBRCOMMON_ENABLE_DEBUG)-debug \ + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_LOWPAN )-lowpan \ + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_OPENSSL)-openssl \ + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_XML )-xml \ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrcommon.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrcommon) + @$(call install_fixup, ibrcommon,PRIORITY,optional) + @$(call install_fixup, ibrcommon,SECTION,base) + @$(call install_fixup, ibrcommon,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrcommon,DESCRIPTION,missing) + + @$(call install_lib, ibrcommon, 0, 0, 0755, libibrcommon-1.0) + + @$(call install_finish, ibrcommon) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrdtn-tools.in b/rules/ibrdtn-tools.in new file mode 100644 index 0000000..d94cb24 --- /dev/null +++ b/rules/ibrdtn-tools.in @@ -0,0 +1,44 @@ +## SECTION=networking + +menuconfig IBRDTN_TOOLS + tristate + prompt "ibrdtn-tools " + select IBRDTND + select IBRDTN + select LIBDAEMON if IBRDTN_TOOLS_WITH_LIBDAEMON + select LIBARCHIVE if IBRDTN_TOOLS_WITH_LIBARCHIVE + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the tools to work with IBR-DTN: dtnping, + dtnsend, dtnrecv, dtntracepath, dtnconvert, dtninbox, dtnoutbox, + dtnstream, dtntrigger, and dtntunnel. + +if IBRDTN_TOOLS + + config IBRDTN_TOOLS_ENABLE_DEBUG + bool + default n + prompt "enable debug symbols" + + config IBRDTN_TOOLS_WITH_LIBDAEMON + bool + default y + prompt "build with daemon support" + help + If this option is enabled, dtntrigger and dtntunnel will be + able to start as a daemon in the background. + + config IBRDTN_TOOLS_WITH_LIBARCHIVE + bool + default y + prompt "build with libarchive support (dtninbox, dtnoutbox)" + help + If this option is deselected, dtninbox and dtnoutbox will not + be built. + +endif + +# vim: syntax=kconfig diff --git a/rules/ibrdtn-tools.make b/rules/ibrdtn-tools.make new file mode 100644 index 0000000..17bfeba --- /dev/null +++ b/rules/ibrdtn-tools.make @@ -0,0 +1,68 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRDTN_TOOLS) += ibrdtn-tools + +# +# Paths and names +# +IBRDTN_TOOLS_VERSION := 1.0.1 +IBRDTN_TOOLS_MD5 := 3e527cedc6132739403fc210e4f8abe2 +IBRDTN_TOOLS := ibrdtn-tools-$(IBRDTN_TOOLS_VERSION) +IBRDTN_TOOLS_SUFFIX := tar.gz +IBRDTN_TOOLS_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) +IBRDTN_TOOLS_SOURCE := $(SRCDIR)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) +IBRDTN_TOOLS_DIR := $(BUILDDIR)/$(IBRDTN_TOOLS) +IBRDTN_TOOLS_LICENSE := Apache-2.0 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +# Note: --without-tffs: tffs is not yet packaged +IBRDTN_TOOLS_CONF_TOOL := autoconf +IBRDTN_TOOLS_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --without-tffs \ + --$(call ptx/endis, PTXCONF_IBRDTN_TOOLS_ENABLE_DEBUG )-debug \ + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBDAEMON )-libdaemon \ + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBARCHIVE )-libarchive \ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrdtn-tools.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrdtn-tools) + @$(call install_fixup, ibrdtn-tools,PRIORITY,optional) + @$(call install_fixup, ibrdtn-tools,SECTION,base) + @$(call install_fixup, ibrdtn-tools,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrdtn-tools,DESCRIPTION,missing) + + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnstream ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnrecv ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntrigger ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnconvert ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnping ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntracepath ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnsend ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/sbin/dtntunnel ) +ifdef IBRDTN_TOOLS_WITH_LIBARCHIVE + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtninbox ) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnoutbox ) +endif + + @$(call install_finish, ibrdtn-tools) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrdtn.in b/rules/ibrdtn.in new file mode 100644 index 0000000..78a76b4 --- /dev/null +++ b/rules/ibrdtn.in @@ -0,0 +1,35 @@ +## SECTION=networking + +menuconfig IBRDTN + tristate + prompt "ibrdtn " + select IBRCOMMON + select ZLIB if IBRDTN_WITH_COMPRESSION + select GLIB if IBRDTN_WITH_GLIB + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the shared library used to build applications + with IBR-DTN functionality. + +if IBRDTN + + config IBRDTN_ENABLE_DEBUG + bool + default n + prompt "enable debug symbols" + + config IBRDTN_WITH_COMPRESSION + bool + default y + prompt "build with bundle compression support" + + config IBRDTN_WITH_GLIB + bool + default n + prompt "link to glib-2.0 library" + +endif +# vim: syntax=kconfig diff --git a/rules/ibrdtn.make b/rules/ibrdtn.make new file mode 100644 index 0000000..85c3ae4 --- /dev/null +++ b/rules/ibrdtn.make @@ -0,0 +1,55 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRDTN) += ibrdtn + +# +# Paths and names +# +IBRDTN_VERSION := 1.0.1 +IBRDTN_MD5 := 37208be202f199f1790983ff78b2fa8f +IBRDTN := ibrdtn-$(IBRDTN_VERSION) +IBRDTN_SUFFIX := tar.gz +IBRDTN_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN).$(IBRDTN_SUFFIX) +IBRDTN_SOURCE := $(SRCDIR)/$(IBRDTN).$(IBRDTN_SUFFIX) +IBRDTN_DIR := $(BUILDDIR)/$(IBRDTN) +IBRDTN_LICENSE := Apache-2.0 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +IBRDTN_CONF_TOOL := autoconf +IBRDTN_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --$(call ptx/endis, PTXCONF_IBRDTN_ENABLE_DEBUG )-debug \ + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_COMPRESSION)-compression \ + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_GLIB )-glib \ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrdtn.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrdtn) + @$(call install_fixup, ibrdtn,PRIORITY,optional) + @$(call install_fixup, ibrdtn,SECTION,base) + @$(call install_fixup, ibrdtn,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrdtn,DESCRIPTION,missing) + + @$(call install_lib, ibrdtn, 0, 0, 0755, libibrdtn-1.0) + + @$(call install_finish, ibrdtn) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrdtnd.in b/rules/ibrdtnd.in new file mode 100644 index 0000000..4e16fe5 --- /dev/null +++ b/rules/ibrdtnd.in @@ -0,0 +1,78 @@ +## SECTION=networking + +menuconfig IBRDTND + tristate + prompt "ibrdtnd " + select IBRDTN + select LIBDAEMON if IBRDTND_ENABLE_DAEMON + select DTNDHT if IBRDTND_ENABLE_DTNDHT + select IBRCOMMON_WITH_OPENSSL if IBRDTND_WITH_TLS + select SQLITE if IBRDTND_WITH_SQLITE + select LIBCURL if IBRDTND_WITH_LIBCURL + # not packaged yet: select WIFIP2P if IBRDTND_WITH_WIFIP2P + # not packaged yet: select LIBVMIME if IBRDTND_WITH_VMIME + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the daemon which handles all DTN communication. + +if IBRDTND + + config IBRDTND_ENABLE_DEBUG + bool + default n + prompt "enable debug symbols" + + config IBRDTND_SYSTEMD_UNIT + bool + default y + depends on INITMETHOD_SYSTEMD + prompt "install systemd unit files for the IBR-DTN daemon" + + config IBRDTND_ENABLE_DAEMON + bool + default y + prompt "build with libdaemon support" + + config IBRDTND_ENABLE_DTNDHT + bool + default y + prompt "build with DTNDHT support" + + config IBRDTND_WITH_SQLITE + bool + default n + prompt "build with SQLite storage module" + + config IBRDTND_WITH_TLS + bool + default n + prompt "build with TLS support (Bundle Security Protocol)" + + config IBRDTND_WITH_LIBCURL + bool + default n + prompt "build with libcurl (HTTP Convergence Layer)" + +# Note: wifip2p is not packaged yet +# config IBRDTND_WITH_WIFIP2P +# bool +# default y +# prompt "build with wifip2p support" +# help +# With wifip2p support, IBR-DTN can use supported Wi-Fi (IEEE +# 802.11) devices to connect to other neighbors without the need +# for an additional Wi-Fi access point. + +# Note: libvmime is not packaged yet +# config IBRDTND_WITH_VMIME +# bool +# default n +# prompt "build with libvmime (E-Mail Convergence Layer)" +# help +# libvmime is needed to build the E-Mail Convergence Layer. + +endif +# vim: syntax=kconfig diff --git a/rules/ibrdtnd.make b/rules/ibrdtnd.make new file mode 100644 index 0000000..177c74a --- /dev/null +++ b/rules/ibrdtnd.make @@ -0,0 +1,73 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRDTND) += ibrdtnd + +# +# Paths and names +# +IBRDTND_VERSION := 1.0.1 +IBRDTND_MD5 := 933d37bf777700a6e1709d0f7a129613 +IBRDTND := ibrdtnd-$(IBRDTND_VERSION) +IBRDTND_SUFFIX := tar.gz +IBRDTND_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTND).$(IBRDTND_SUFFIX) +IBRDTND_SOURCE := $(SRCDIR)/$(IBRDTND).$(IBRDTND_SUFFIX) +IBRDTND_DIR := $(BUILDDIR)/$(IBRDTND) +IBRDTND_LICENSE := Apache-2.0 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +IBRDTND_CONF_TOOL := autoconf +# Notes: --without-vmime: libvmime is not packaged yet +# --without-wifip2p: wifip2p is not packaged yet +# --disable-docs: docs would depend on pdfLaTeX +IBRDTND_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --disable-docs \ + --without-vmime \ + --without-wifip2p \ + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DEBUG )-debug \ + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DAEMON )-libdaemon \ + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DTNDHT )-dtndht \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_SQLITE )-sqlite \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_TLS )-tls \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_LIBCURL )-curl \ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrdtnd.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrdtnd) + @$(call install_fixup, ibrdtnd,PRIORITY,optional) + @$(call install_fixup, ibrdtnd,SECTION,base) + @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrdtnd,DESCRIPTION,missing) + + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd) +ifdef PTXCONF_IBRDTND_WITH_TLS + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh) +endif + @$(call install_copy, ibrdtnd, 0, 0, 0644, -, /etc/ibrdtnd.conf) + +ifdef PTXCONF_IBRDTND_SYSTEMD_UNIT + @$(call install_alternative, ibrdtnd, 0, 0, 0644, /lib/systemd/system/ibrdtnd.service) + @$(call install_link, ibrdtnd, ../ibrdtnd.service, /lib/systemd/system/multi-user.target.wants/ibrdtnd.service) +endif + + @$(call install_finish, ibrdtnd) + + @$(call touch) + +# vim: syntax=make -- 2.8.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-17 14:53 [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht Roland Hieber @ 2016-08-18 6:53 ` Michael Olbrich 2016-08-23 4:41 ` Roland Hieber 2016-08-28 5:27 ` Roland Hieber 2016-08-18 10:15 ` Michael Olbrich 2016-08-28 5:32 ` [ptxdist] [PATCH v2] " Roland Hieber 2 siblings, 2 replies; 16+ messages in thread From: Michael Olbrich @ 2016-08-18 6:53 UTC (permalink / raw) To: ptxdist On Wed, Aug 17, 2016 at 04:53:36PM +0200, Roland Hieber wrote: > IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > 5050), designed for embedded systems like the RouterBoard532A or > Ubiquiti RouterStation Pro. > > IBR-DTN consists of several upstream tarballs which split its > functionality into modular parts, namely ibrcommon, ibrdtn, ibrdtnd and > ibrdtn-tools. Although they are released at the same time with the same > version, they are usually packaged separately to provide the modularity > on the package level. In order to provide clean and readable Makefiles, > the upstream naming scheme is adopted here. > > Although dtndht is versioned and released as a separate upstream > package, it is effectively part of IBR-DTN as it is not really used > anywhere else, and it's also developed in close contact with IBR-DTN by > the same authors. For this reason, I'm including all package rules in a > single patch. > > The upstream releases includes some functionality which depends on > software not currently available in ptxdist. This includes tffs, > wifip2p and libvmime. I have included the directives for these > features, but commented them out, so they can easily be enabled once > that software gets packaged. > > Signed-off-by: Roland Hieber <rohieb@rohieb.name> I've made several comments below, that apply to more that one place. Please fix it everywhere. And check your configure options. You need to specify everything that is optional or may be auto detected. Please look at some other rules for guidance or ask me if you are unsure if an option should be specified. > --- > projectroot/lib/systemd/system/ibrdtnd.service | 12 ++++ > rules/dtndht.in | 18 ++++++ > rules/dtndht.make | 53 +++++++++++++++++ > rules/ibrcommon.in | 39 +++++++++++++ > rules/ibrcommon.make | 56 ++++++++++++++++++ > rules/ibrdtn-tools.in | 44 +++++++++++++++ > rules/ibrdtn-tools.make | 68 ++++++++++++++++++++++ > rules/ibrdtn.in | 35 ++++++++++++ > rules/ibrdtn.make | 55 ++++++++++++++++++ > rules/ibrdtnd.in | 78 ++++++++++++++++++++++++++ > rules/ibrdtnd.make | 73 ++++++++++++++++++++++++ > 11 files changed, 531 insertions(+) > create mode 100644 projectroot/lib/systemd/system/ibrdtnd.service > create mode 100644 rules/dtndht.in > create mode 100644 rules/dtndht.make > create mode 100644 rules/ibrcommon.in > create mode 100644 rules/ibrcommon.make > create mode 100644 rules/ibrdtn-tools.in > create mode 100644 rules/ibrdtn-tools.make > create mode 100644 rules/ibrdtn.in > create mode 100644 rules/ibrdtn.make > create mode 100644 rules/ibrdtnd.in > create mode 100644 rules/ibrdtnd.make > > diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service > new file mode 100644 > index 0000000..f5ba5cd > --- /dev/null > +++ b/projectroot/lib/systemd/system/ibrdtnd.service > @@ -0,0 +1,12 @@ > +[Unit] > +Description=IBR-DTN Bundle Protocol daemon > +Requires=network.target > + > +[Service] > +ExecStartPre=/bin/mkdir -p /etc/ibrdtn/bpsec /etc/ibrdtn/certs > +ExecStartPre=/bin/chown root:root -R /etc/ibrdtn/bpsec /etc/ibrdtn/certs The rootfs may be read-only. These directories should be created in the targetinstall stage. > +ExecStart=/usr/sbin/dtnd -D -c /etc/ibrdtnd.conf > +Restart=always > + > +[Install] > +WantedBy=multi-user.target > diff --git a/rules/dtndht.in b/rules/dtndht.in > new file mode 100644 > index 0000000..72824b5 > --- /dev/null > +++ b/rules/dtndht.in > @@ -0,0 +1,18 @@ > +## SECTION=networking > + > +menuconfig DTNDHT > + tristate > + prompt "dtndht " > + select OPENSSL if DTNDHT_WITH_OPENSSL tab before 'if'. > + help > + DTNDHT is a library providing a fully distributed BitTorrent DHT-based > + naming service especially for DTN Bundle Protocol EIDs (RFC 5050). > + > +if DTNDHT > + config DTNDHT_WITH_OPENSSL we don't indent here. > + bool > + default y > + prompt "use OpenSSL instead of built-in crypto" > +endif > + > +# vim: syntax=kconfig > diff --git a/rules/dtndht.make b/rules/dtndht.make > new file mode 100644 > index 0000000..6908f50 > --- /dev/null > +++ b/rules/dtndht.make > @@ -0,0 +1,53 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_DTNDHT) += dtndht > + > +# > +# Paths and names > +# > +DTNDHT_VERSION := 0.2.3 > +DTNDHT_MD5 := 37c33910ac7e760aad4db81724aeb4fb > +DTNDHT := dtndht-$(DTNDHT_VERSION) > +DTNDHT_SUFFIX := tar.gz > +DTNDHT_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(DTNDHT).$(DTNDHT_SUFFIX) > +DTNDHT_SOURCE := $(SRCDIR)/$(DTNDHT).$(DTNDHT_SUFFIX) > +DTNDHT_DIR := $(BUILDDIR)/$(DTNDHT) > +DTNDHT_LICENSE := MIT > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +DTNDHT_CONF_TOOL := autoconf > + Break like this: DTNDHT_CONF_OPT := \ $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/wwo, PTXCONF_DTNDHT_WITH_OPENSSL)-openssl \ no '\' for the last line. > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/dtndht.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, dtndht) > + @$(call install_fixup, dtndht,PRIORITY,optional) > + @$(call install_fixup, dtndht,SECTION,base) > + @$(call install_fixup, dtndht,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, dtndht,DESCRIPTION,missing) > + > + @$(call install_lib, dtndht, 0, 0, 0755, libdtndht-0.2) > + > + @$(call install_finish, dtndht) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrcommon.in b/rules/ibrcommon.in > new file mode 100644 > index 0000000..a310430 > --- /dev/null > +++ b/rules/ibrcommon.in > @@ -0,0 +1,39 @@ > +## SECTION=networking > + > +menuconfig IBRCOMMON > + tristate > + prompt "ibrcommon " > + select LIBXML2 if IBRCOMMON_WITH_XML LIBXML2 has a lot of options. Make sure all required sub-options are selected. > + select LIBNL3 if IBRCOMMON_WITH_LOWPAN > + select OPENSSL if IBRCOMMON_WITH_OPENSSL aligin with tab before 'if' > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the common library parts which could be of > + interest for other software projects. > + > +if IBRCOMMON > + > + config IBRCOMMON_ENABLE_DEBUG don't indent. > + bool > + default n 'default n' it the default, drop this line. This applies to all other uses as well. > + prompt "enable debug symbols" If that's just debug symbols, then remove the option and disable it. If you need debugging symbols you can always set TARGET_DEBUG_ENABLE and rebuild a package. > + config IBRCOMMON_WITH_LOWPAN > + bool > + default y > + prompt "enable LoWPAN support" > + > + config IBRCOMMON_WITH_OPENSSL > + bool > + default y > + prompt "enable OpenSSL support" > + > + config IBRCOMMON_WITH_XML > + bool > + prompt "enable XML support" > + > +endif > + > +# vim: syntax=kconfig > diff --git a/rules/ibrcommon.make b/rules/ibrcommon.make > new file mode 100644 > index 0000000..a1279c1 > --- /dev/null > +++ b/rules/ibrcommon.make > @@ -0,0 +1,56 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRCOMMON) += ibrcommon > + > +# > +# Paths and names > +# > +IBRCOMMON_VERSION := 1.0.1 > +IBRCOMMON_MD5 := 0104763ede969c470f32244d76c234b8 > +IBRCOMMON := ibrcommon-$(IBRCOMMON_VERSION) > +IBRCOMMON_SUFFIX := tar.gz > +IBRCOMMON_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) > +IBRCOMMON_SOURCE := $(SRCDIR)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) > +IBRCOMMON_DIR := $(BUILDDIR)/$(IBRCOMMON) > +IBRCOMMON_LICENSE := Apache-2.0 > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +IBRCOMMON_CONF_TOOL := autoconf > +IBRCOMMON_CONF_OPT := $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/endis, PTXCONF_IBRCOMMON_ENABLE_DEBUG)-debug \ > + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_LOWPAN )-lowpan \ > + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_OPENSSL)-openssl \ > + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_XML )-xml \ See my other comments, and don't align. > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrcommon.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrcommon) > + @$(call install_fixup, ibrcommon,PRIORITY,optional) > + @$(call install_fixup, ibrcommon,SECTION,base) > + @$(call install_fixup, ibrcommon,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrcommon,DESCRIPTION,missing) > + > + @$(call install_lib, ibrcommon, 0, 0, 0755, libibrcommon-1.0) > + > + @$(call install_finish, ibrcommon) don't align. > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrdtn-tools.in b/rules/ibrdtn-tools.in > new file mode 100644 > index 0000000..d94cb24 > --- /dev/null > +++ b/rules/ibrdtn-tools.in > @@ -0,0 +1,44 @@ > +## SECTION=networking > + > +menuconfig IBRDTN_TOOLS > + tristate > + prompt "ibrdtn-tools " > + select IBRDTND > + select IBRDTN > + select LIBDAEMON if IBRDTN_TOOLS_WITH_LIBDAEMON > + select LIBARCHIVE if IBRDTN_TOOLS_WITH_LIBARCHIVE tabs. > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the tools to work with IBR-DTN: dtnping, > + dtnsend, dtnrecv, dtntracepath, dtnconvert, dtninbox, dtnoutbox, > + dtnstream, dtntrigger, and dtntunnel. > + > +if IBRDTN_TOOLS > + > + config IBRDTN_TOOLS_ENABLE_DEBUG > + bool > + default n > + prompt "enable debug symbols" see above. > + > + config IBRDTN_TOOLS_WITH_LIBDAEMON > + bool > + default y > + prompt "build with daemon support" > + help > + If this option is enabled, dtntrigger and dtntunnel will be > + able to start as a daemon in the background. > + > + config IBRDTN_TOOLS_WITH_LIBARCHIVE > + bool > + default y > + prompt "build with libarchive support (dtninbox, dtnoutbox)" > + help > + If this option is deselected, dtninbox and dtnoutbox will not > + be built. > + > +endif > + > +# vim: syntax=kconfig > diff --git a/rules/ibrdtn-tools.make b/rules/ibrdtn-tools.make > new file mode 100644 > index 0000000..17bfeba > --- /dev/null > +++ b/rules/ibrdtn-tools.make > @@ -0,0 +1,68 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRDTN_TOOLS) += ibrdtn-tools > + > +# > +# Paths and names > +# > +IBRDTN_TOOLS_VERSION := 1.0.1 > +IBRDTN_TOOLS_MD5 := 3e527cedc6132739403fc210e4f8abe2 > +IBRDTN_TOOLS := ibrdtn-tools-$(IBRDTN_TOOLS_VERSION) > +IBRDTN_TOOLS_SUFFIX := tar.gz > +IBRDTN_TOOLS_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) > +IBRDTN_TOOLS_SOURCE := $(SRCDIR)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) > +IBRDTN_TOOLS_DIR := $(BUILDDIR)/$(IBRDTN_TOOLS) > +IBRDTN_TOOLS_LICENSE := Apache-2.0 > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +# Note: --without-tffs: tffs is not yet packaged > +IBRDTN_TOOLS_CONF_TOOL := autoconf > +IBRDTN_TOOLS_CONF_OPT := $(CROSS_AUTOCONF_USR) \ > + --without-tffs \ > + --$(call ptx/endis, PTXCONF_IBRDTN_TOOLS_ENABLE_DEBUG )-debug \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBDAEMON )-libdaemon \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBARCHIVE )-libarchive \ > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrdtn-tools.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrdtn-tools) > + @$(call install_fixup, ibrdtn-tools,PRIORITY,optional) > + @$(call install_fixup, ibrdtn-tools,SECTION,base) > + @$(call install_fixup, ibrdtn-tools,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrdtn-tools,DESCRIPTION,missing) > + > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnstream ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnrecv ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntrigger ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnconvert ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnping ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntracepath ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnsend ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/sbin/dtntunnel ) > +ifdef IBRDTN_TOOLS_WITH_LIBARCHIVE > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtninbox ) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnoutbox ) > +endif > + > + @$(call install_finish, ibrdtn-tools) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrdtn.in b/rules/ibrdtn.in > new file mode 100644 > index 0000000..78a76b4 > --- /dev/null > +++ b/rules/ibrdtn.in > @@ -0,0 +1,35 @@ > +## SECTION=networking > + > +menuconfig IBRDTN > + tristate > + prompt "ibrdtn " > + select IBRCOMMON > + select ZLIB if IBRDTN_WITH_COMPRESSION > + select GLIB if IBRDTN_WITH_GLIB > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the shared library used to build applications > + with IBR-DTN functionality. > + > +if IBRDTN > + > + config IBRDTN_ENABLE_DEBUG > + bool > + default n > + prompt "enable debug symbols" > + > + config IBRDTN_WITH_COMPRESSION > + bool > + default y > + prompt "build with bundle compression support" > + > + config IBRDTN_WITH_GLIB > + bool > + default n > + prompt "link to glib-2.0 library" > + > +endif > +# vim: syntax=kconfig > diff --git a/rules/ibrdtn.make b/rules/ibrdtn.make > new file mode 100644 > index 0000000..85c3ae4 > --- /dev/null > +++ b/rules/ibrdtn.make > @@ -0,0 +1,55 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRDTN) += ibrdtn > + > +# > +# Paths and names > +# > +IBRDTN_VERSION := 1.0.1 > +IBRDTN_MD5 := 37208be202f199f1790983ff78b2fa8f > +IBRDTN := ibrdtn-$(IBRDTN_VERSION) > +IBRDTN_SUFFIX := tar.gz > +IBRDTN_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN).$(IBRDTN_SUFFIX) > +IBRDTN_SOURCE := $(SRCDIR)/$(IBRDTN).$(IBRDTN_SUFFIX) > +IBRDTN_DIR := $(BUILDDIR)/$(IBRDTN) > +IBRDTN_LICENSE := Apache-2.0 > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +IBRDTN_CONF_TOOL := autoconf > +IBRDTN_CONF_OPT := $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/endis, PTXCONF_IBRDTN_ENABLE_DEBUG )-debug \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_COMPRESSION)-compression \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_GLIB )-glib \ > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrdtn.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrdtn) > + @$(call install_fixup, ibrdtn,PRIORITY,optional) > + @$(call install_fixup, ibrdtn,SECTION,base) > + @$(call install_fixup, ibrdtn,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrdtn,DESCRIPTION,missing) > + > + @$(call install_lib, ibrdtn, 0, 0, 0755, libibrdtn-1.0) > + > + @$(call install_finish, ibrdtn) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrdtnd.in b/rules/ibrdtnd.in > new file mode 100644 > index 0000000..4e16fe5 > --- /dev/null > +++ b/rules/ibrdtnd.in > @@ -0,0 +1,78 @@ > +## SECTION=networking > + > +menuconfig IBRDTND > + tristate > + prompt "ibrdtnd " > + select IBRDTN > + select LIBDAEMON if IBRDTND_ENABLE_DAEMON > + select DTNDHT if IBRDTND_ENABLE_DTNDHT > + select IBRCOMMON_WITH_OPENSSL if IBRDTND_WITH_TLS > + select SQLITE if IBRDTND_WITH_SQLITE > + select LIBCURL if IBRDTND_WITH_LIBCURL > + # not packaged yet: select WIFIP2P if IBRDTND_WITH_WIFIP2P > + # not packaged yet: select LIBVMIME if IBRDTND_WITH_VMIME > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the daemon which handles all DTN communication. > + > +if IBRDTND > + > + config IBRDTND_ENABLE_DEBUG > + bool > + default n > + prompt "enable debug symbols" > + > + config IBRDTND_SYSTEMD_UNIT > + bool > + default y > + depends on INITMETHOD_SYSTEMD > + prompt "install systemd unit files for the IBR-DTN daemon" > + > + config IBRDTND_ENABLE_DAEMON > + bool > + default y > + prompt "build with libdaemon support" > + > + config IBRDTND_ENABLE_DTNDHT > + bool > + default y > + prompt "build with DTNDHT support" > + > + config IBRDTND_WITH_SQLITE > + bool > + default n > + prompt "build with SQLite storage module" > + > + config IBRDTND_WITH_TLS > + bool > + default n > + prompt "build with TLS support (Bundle Security Protocol)" > + > + config IBRDTND_WITH_LIBCURL > + bool > + default n > + prompt "build with libcurl (HTTP Convergence Layer)" > + > +# Note: wifip2p is not packaged yet > +# config IBRDTND_WITH_WIFIP2P > +# bool > +# default y Instead of commenting this out use: # needs wifip2p depends on BROKEN > +# prompt "build with wifip2p support" > +# help > +# With wifip2p support, IBR-DTN can use supported Wi-Fi (IEEE > +# 802.11) devices to connect to other neighbors without the need > +# for an additional Wi-Fi access point. > + > +# Note: libvmime is not packaged yet > +# config IBRDTND_WITH_VMIME > +# bool > +# default n > +# prompt "build with libvmime (E-Mail Convergence Layer)" > +# help > +# libvmime is needed to build the E-Mail Convergence Layer. > + > +endif > +# vim: syntax=kconfig > diff --git a/rules/ibrdtnd.make b/rules/ibrdtnd.make > new file mode 100644 > index 0000000..177c74a > --- /dev/null > +++ b/rules/ibrdtnd.make > @@ -0,0 +1,73 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRDTND) += ibrdtnd > + > +# > +# Paths and names > +# > +IBRDTND_VERSION := 1.0.1 > +IBRDTND_MD5 := 933d37bf777700a6e1709d0f7a129613 > +IBRDTND := ibrdtnd-$(IBRDTND_VERSION) > +IBRDTND_SUFFIX := tar.gz > +IBRDTND_URL := https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTND).$(IBRDTND_SUFFIX) > +IBRDTND_SOURCE := $(SRCDIR)/$(IBRDTND).$(IBRDTND_SUFFIX) > +IBRDTND_DIR := $(BUILDDIR)/$(IBRDTND) > +IBRDTND_LICENSE := Apache-2.0 > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +IBRDTND_CONF_TOOL := autoconf > +# Notes: --without-vmime: libvmime is not packaged yet > +# --without-wifip2p: wifip2p is not packaged yet just use wwo with the options below and it will work once the 'BROKEN' is removed. > +# --disable-docs: docs would depend on pdfLaTeX Just remove this line. We don't install docs anyways. > +IBRDTND_CONF_OPT := $(CROSS_AUTOCONF_USR) \ > + --disable-docs \ > + --without-vmime \ > + --without-wifip2p \ > + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DEBUG )-debug \ > + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DAEMON )-libdaemon \ > + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DTNDHT )-dtndht \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_SQLITE )-sqlite \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_TLS )-tls \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_LIBCURL )-curl \ > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrdtnd.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrdtnd) > + @$(call install_fixup, ibrdtnd,PRIORITY,optional) > + @$(call install_fixup, ibrdtnd,SECTION,base) > + @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrdtnd,DESCRIPTION,missing) > + > + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd) > +ifdef PTXCONF_IBRDTND_WITH_TLS > + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh) > +endif > + @$(call install_copy, ibrdtnd, 0, 0, 0644, -, /etc/ibrdtnd.conf) > + > +ifdef PTXCONF_IBRDTND_SYSTEMD_UNIT > + @$(call install_alternative, ibrdtnd, 0, 0, 0644, /lib/systemd/system/ibrdtnd.service) > + @$(call install_link, ibrdtnd, ../ibrdtnd.service, /lib/systemd/system/multi-user.target.wants/ibrdtnd.service) > +endif > + > + @$(call install_finish, ibrdtnd) > + > + @$(call touch) > + > +# vim: syntax=make > -- > 2.8.1 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-18 6:53 ` Michael Olbrich @ 2016-08-23 4:41 ` Roland Hieber 2016-08-25 11:02 ` Michael Olbrich 2016-08-28 5:27 ` Roland Hieber 1 sibling, 1 reply; 16+ messages in thread From: Roland Hieber @ 2016-08-23 4:41 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1.1: Type: text/plain, Size: 1678 bytes --] On 18.08.2016 08:53, Michael Olbrich wrote: > And check your configure options. You need to specify everything that is > optional or may be auto detected. Please look at some other rules for > guidance or ask me if you are unsure if an option should be specified. Uh, good point. Most of the --disable/--enable options seem to be built in a way that their state is autodetected, except when overwritten on the command line. But not for every --disable there is also a matching --enable (that would let the configure fail if things are wrong)! For example, in ibrcommon, only --disable-netlink really works and disables netlink support, but --enable-netlink also disables netlink support, because AC_ARG_ENABLE only checks for the existence of the --*-netlink switches, not for their actual value. [0] One could argue that configure (without --disable-netlink) will try to detect libnl3 and find it every time because it is listed as a dependency in the rules and is therefore built before ibrcommon. On the other hand, if things go wrong somehow, libnl3 could not be detected although it should be, and configure will not interpret that as a failure and happily build without netlink support. So it seems like a better solution to me if we patch those AC_ARG_ENABLE calls so they respect the actual value of the command line switch, like in [1]. Same applies e.g. for --enable-debug and --enable-gcov (no --disable-debug or --disable-gcov), and I didn't look into the other ibrdtn packages yet... [0]: https://github.com/ibrdtn/ibrdtn/blob/master/ibrcommon/configure.ac#L217 [1]: https://autotools.io/autoconf/arguments.html - Roland [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-23 4:41 ` Roland Hieber @ 2016-08-25 11:02 ` Michael Olbrich 2016-08-25 15:11 ` Robert Schwebel 0 siblings, 1 reply; 16+ messages in thread From: Michael Olbrich @ 2016-08-25 11:02 UTC (permalink / raw) To: ptxdist On Tue, Aug 23, 2016 at 06:41:40AM +0200, Roland Hieber wrote: > On 18.08.2016 08:53, Michael Olbrich wrote: > > And check your configure options. You need to specify everything that is > > optional or may be auto detected. Please look at some other rules for > > guidance or ask me if you are unsure if an option should be specified. > > Uh, good point. Most of the --disable/--enable options seem to be built > in a way that their state is autodetected, except when overwritten on > the command line. But not for every --disable there is also a matching > --enable (that would let the configure fail if things are wrong)! > > For example, in ibrcommon, only --disable-netlink really works and > disables netlink support, but --enable-netlink also disables netlink > support, because AC_ARG_ENABLE only checks for the existence of the > --*-netlink switches, not for their actual value. [0] Right, broken configure.ac :-/. Use this: $(call ptx/ifdef,PTXCONF_FOO,,--disable-netlink) > One could argue that configure (without --disable-netlink) will try to > detect libnl3 and find it every time because it is listed as a > dependency in the rules and is therefore built before ibrcommon. On the > other hand, if things go wrong somehow, libnl3 could not be detected > although it should be, and configure will not interpret that as a > failure and happily build without netlink support. So it seems like a > better solution to me if we patch those AC_ARG_ENABLE calls so they > respect the actual value of the command line switch, like in [1]. Or you could do that, but I don't think that's necessary. What's important for me is that the result is the same for everyone and not dependent on the build order. Micahel -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-25 11:02 ` Michael Olbrich @ 2016-08-25 15:11 ` Robert Schwebel 0 siblings, 0 replies; 16+ messages in thread From: Robert Schwebel @ 2016-08-25 15:11 UTC (permalink / raw) To: ptxdist On Thu, Aug 25, 2016 at 01:02:03PM +0200, Michael Olbrich wrote: > On Tue, Aug 23, 2016 at 06:41:40AM +0200, Roland Hieber wrote: > > On 18.08.2016 08:53, Michael Olbrich wrote: > > > And check your configure options. You need to specify everything that is > > > optional or may be auto detected. Please look at some other rules for > > > guidance or ask me if you are unsure if an option should be specified. > > > > Uh, good point. Most of the --disable/--enable options seem to be built > > in a way that their state is autodetected, except when overwritten on > > the command line. But not for every --disable there is also a matching > > --enable (that would let the configure fail if things are wrong)! > > > > For example, in ibrcommon, only --disable-netlink really works and > > disables netlink support, but --enable-netlink also disables netlink > > support, because AC_ARG_ENABLE only checks for the existence of the > > --*-netlink switches, not for their actual value. [0] > > Right, broken configure.ac :-/. Use this: > > $(call ptx/ifdef,PTXCONF_FOO,,--disable-netlink) And, even better, send a patch to upstream and fix it :-) rsc -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-18 6:53 ` Michael Olbrich 2016-08-23 4:41 ` Roland Hieber @ 2016-08-28 5:27 ` Roland Hieber 2016-08-28 7:36 ` Robert Schwebel 2016-08-29 7:42 ` Juergen Borleis 1 sibling, 2 replies; 16+ messages in thread From: Roland Hieber @ 2016-08-28 5:27 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1.1: Type: text/plain, Size: 2528 bytes --] Hi, Thanks for the feedback! On 18.08.2016 08:53, Michael Olbrich wrote: > I've made several comments below, that apply to more that one place. Please > fix it everywhere. > > And check your configure options. You need to specify everything that is > optional or may be auto detected. Please look at some other rules for > guidance or ask me if you are unsure if an option should be specified. Okay, everything optional or auto-detected should be pinned down now. I've basically ignored every configure option relating to the toolchain, like --enable-static, --enable-maintainer-mode, --with-pic, --with-gnu-ld, etc. Some of the packages take paths for CPPUnit, but I ignored that too since tests are not run. >> diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service >> [...] >> +[Service] >> +ExecStartPre=/bin/mkdir -p /etc/ibrdtn/bpsec /etc/ibrdtn/certs >> +ExecStartPre=/bin/chown root:root -R /etc/ibrdtn/bpsec /etc/ibrdtn/certs > > The rootfs may be read-only. These directories should be created in the > targetinstall stage. Right! I now mkdir'd the folder in the targetinstall stage using ${ROOTDIR}, but it seems the rootdir contents are all created with my user and chown'd to root in the images stage later, so I didn't care for chown'ing them in the targetinstall stage (which additionally would have required (fake)root while building). > Break like this: > > DTNDHT_CONF_OPT := \ > $(CROSS_AUTOCONF_USR) \ >> + --$(call ptx/wwo, PTXCONF_DTNDHT_WITH_OPENSSL)-openssl \ > > no '\' for the last line. Old habit of mine to get fewer unneccessary changes in diffs when adding options in the future. But okay, I've left it out for now :) I also added a LIBC_M dependency in the packages that needed it because the build output showed "-lm" in libtool calls. I tried to discover additional runtime dependencies, but didn't find a good way to determine which objects are loaded at run time – on my machine I would have used ldd for that, but I can't do that for ARM binaries. Is there a way without actually running the binary (in qemu)? The Guru Guide chapter on Managing External Runtime Dependencies is very sparse on that topic. For the ibr* packages I also added the GitHub releases as additional URLs, but the dtndht tarballs on GitHub have different checksums than the tarballs from the official site. Is there a way to handle that (other than ignore one site)? - Roland [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-28 5:27 ` Roland Hieber @ 2016-08-28 7:36 ` Robert Schwebel 2016-08-28 18:36 ` Roland Hieber 2016-08-29 7:42 ` Juergen Borleis 1 sibling, 1 reply; 16+ messages in thread From: Robert Schwebel @ 2016-08-28 7:36 UTC (permalink / raw) To: ptxdist On Sun, Aug 28, 2016 at 07:27:06AM +0200, Roland Hieber wrote: > >> diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service > >> [...] > >> +[Service] > >> +ExecStartPre=/bin/mkdir -p /etc/ibrdtn/bpsec /etc/ibrdtn/certs > >> +ExecStartPre=/bin/chown root:root -R /etc/ibrdtn/bpsec /etc/ibrdtn/certs > > > > The rootfs may be read-only. These directories should be created in the > > targetinstall stage. > > Right! I now mkdir'd the folder in the targetinstall stage using > ${ROOTDIR}, but it seems the rootdir contents are all created with my > user and chown'd to root in the images stage later, so I didn't care for > chown'ing them in the targetinstall stage (which additionally would have > required (fake)root while building). You can use install_copy and avoid the last argument, this is the right mechanism to create a directory with ownership and permissions. rsc -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-28 7:36 ` Robert Schwebel @ 2016-08-28 18:36 ` Roland Hieber 2016-09-01 9:58 ` Michael Olbrich 2016-09-01 15:09 ` Alexander Dahl 0 siblings, 2 replies; 16+ messages in thread From: Roland Hieber @ 2016-08-28 18:36 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1.1: Type: text/plain, Size: 1193 bytes --] On 28.08.2016 09:36, Robert Schwebel wrote: > You can use install_copy and avoid the last argument, this is the right > mechanism to create a directory with ownership and permissions. Ah right thanks, it even says so in the manual :) But thinking this through: /etc/ibrdtn/bpsec is meant to hold the private key and cert for the Bundle Security Protocol, which are meant to be generated by ibrdtn-genkey.sh, which uses openssl and hexdump to generate it. So technically, IBRDTN_WITH_TLS has to select OPENSSL_BIN and BUSYBOX_HEXDUMP. However, if the target rootfs is read-only, running ibrdtn-genkey.sh on the target is futile, and in this case, those dependencies are unneccessary. The key material would rather need to be generated at build time and/or put into projectroot/etc/ibrdtn/bpsec by the user. So I'm rather thinking about adding a menuconfig option "install ibrdtn-genkey.sh", and let the users decide whether they want to generate keys on the target or deploy them via projectroot/. I tried hacking the key generation into the targetinstall stage, but didn't get it to work, and that really seems more like a job for the configure script. - Roland [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-28 18:36 ` Roland Hieber @ 2016-09-01 9:58 ` Michael Olbrich 2016-09-01 15:09 ` Alexander Dahl 1 sibling, 0 replies; 16+ messages in thread From: Michael Olbrich @ 2016-09-01 9:58 UTC (permalink / raw) To: ptxdist On Sun, Aug 28, 2016 at 08:36:19PM +0200, Roland Hieber wrote: > On 28.08.2016 09:36, Robert Schwebel wrote: > > You can use install_copy and avoid the last argument, this is the right > > mechanism to create a directory with ownership and permissions. > > Ah right thanks, it even says so in the manual :) > > But thinking this through: /etc/ibrdtn/bpsec is meant to hold the > private key and cert for the Bundle Security Protocol, which are meant > to be generated by ibrdtn-genkey.sh, which uses openssl and hexdump to > generate it. So technically, IBRDTN_WITH_TLS has to select OPENSSL_BIN > and BUSYBOX_HEXDUMP. However, if the target rootfs is read-only, running > ibrdtn-genkey.sh on the target is futile, and in this case, those > dependencies are unneccessary. The key material would rather need to be > generated at build time and/or put into projectroot/etc/ibrdtn/bpsec by > the user. So I'm rather thinking about adding a menuconfig option > "install ibrdtn-genkey.sh", and let the users decide whether they want > to generate keys on the target or deploy them via projectroot/. I tried > hacking the key generation into the targetinstall stage, but didn't get > it to work, and that really seems more like a job for the configure script. Should all devices have the same key or should each Device have its own key? I'm don't know enough about this to make that decision. If each device should have its own key, then take a look at what OpenSSH does to generate its server keys: - projectroot/etc/rc.once.d/openssh - rules/openssh.postinst - and the 'select RC_ONCE...' in openssh.in rc-once is a mechanism where we remount read-write during the first boot to do stuff that needs a writeable rootfs. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-28 18:36 ` Roland Hieber 2016-09-01 9:58 ` Michael Olbrich @ 2016-09-01 15:09 ` Alexander Dahl 1 sibling, 0 replies; 16+ messages in thread From: Alexander Dahl @ 2016-09-01 15:09 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 586 bytes --] Hei hei, On 28.08.2016 20:36, Roland Hieber wrote: > The key material would rather need to be > generated at build time and/or put into projectroot/etc/ibrdtn/bpsec by > the user. Generating one key at build time for all your devices may be seen as a security flaw, doesn't it? If you build update tarballs from your BSP for example, which contain in some way private keys, an attacker could replace those keys? On the other hand, embedded devices often lack good random number creation capabilities, so creating keys on the target may be bad, too? Greets Alex [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-28 5:27 ` Roland Hieber 2016-08-28 7:36 ` Robert Schwebel @ 2016-08-29 7:42 ` Juergen Borleis 1 sibling, 0 replies; 16+ messages in thread From: Juergen Borleis @ 2016-08-29 7:42 UTC (permalink / raw) To: ptxdist; +Cc: Roland Hieber Hi Roland, On Sunday 28 August 2016 07:27:06 Roland Hieber wrote: > [...] > I also added a LIBC_M dependency in the packages that needed it because > the build output showed "-lm" in libtool calls. I tried to discover > additional runtime dependencies, but didn't find a good way to determine > which objects are loaded at run time – on my machine I would have used > ldd for that, but I can't do that for ARM binaries. Is there a way > without actually running the binary (in qemu)? The Guru Guide chapter > on Managing External Runtime Dependencies is very sparse on that topic. Hmm, $ ptxdist menuconfig Debug Tools ---> <*> ldd Or: "readelf -d <prog or lib>" is your friend. Or, at run-time: start the program and take a look into "/proc/<its-pid>/maps". Regards, Juergen -- Pengutronix e.K. | Juergen Borleis | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-17 14:53 [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht Roland Hieber 2016-08-18 6:53 ` Michael Olbrich @ 2016-08-18 10:15 ` Michael Olbrich 2016-08-28 5:32 ` [ptxdist] [PATCH v2] " Roland Hieber 2 siblings, 0 replies; 16+ messages in thread From: Michael Olbrich @ 2016-08-18 10:15 UTC (permalink / raw) To: ptxdist On Wed, Aug 17, 2016 at 04:53:36PM +0200, Roland Hieber wrote: [...] > + @$(call install_copy, ibrdtnd, 0, 0, 0644, -, /etc/ibrdtnd.conf) You should probably use install_alternative here, so that the file can be overwritten in the BSP. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-17 14:53 [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht Roland Hieber 2016-08-18 6:53 ` Michael Olbrich 2016-08-18 10:15 ` Michael Olbrich @ 2016-08-28 5:32 ` Roland Hieber 2016-09-07 13:48 ` Michael Olbrich 2 siblings, 1 reply; 16+ messages in thread From: Roland Hieber @ 2016-08-28 5:32 UTC (permalink / raw) To: ptxdist; +Cc: Roland Hieber IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC 5050), designed for embedded systems like the RouterBoard532A or Ubiquiti RouterStation Pro. IBR-DTN consists of several upstream tarballs which split its functionality into modular parts, namely ibrcommon, ibrdtn, ibrdtnd and ibrdtn-tools. Although they are released at the same time with the same version, they are usually packaged separately to provide the modularity on the package level. In order to provide clean and readable Makefiles, the upstream naming scheme is adopted here. Although dtndht is versioned and released as a separate upstream package, it is effectively part of IBR-DTN as it is not really used anywhere else, and it's also developed in close contact with IBR-DTN by the same authors. For this reason, I'm including all package rules in a single patch. The upstream releases includes some functionality which depends on software not currently available in ptxdist. This includes tffs, wifip2p and libvmime. I have included the directives for these features, but commented them out, so they can easily be enabled once that software gets packaged. Signed-off-by: Roland Hieber <rohieb@rohieb.name> --- projectroot/lib/systemd/system/ibrdtnd.service | 10 ++++ rules/dtndht.in | 30 ++++++++++ rules/dtndht.make | 58 ++++++++++++++++++++ rules/ibrcommon.in | 43 +++++++++++++++ rules/ibrcommon.make | 60 ++++++++++++++++++++ rules/ibrdtn-tools.in | 49 +++++++++++++++++ rules/ibrdtn-tools.make | 71 ++++++++++++++++++++++++ rules/ibrdtn.in | 32 +++++++++++ rules/ibrdtn.make | 58 ++++++++++++++++++++ rules/ibrdtnd.in | 70 ++++++++++++++++++++++++ rules/ibrdtnd.make | 76 ++++++++++++++++++++++++++ 11 files changed, 557 insertions(+) create mode 100644 projectroot/lib/systemd/system/ibrdtnd.service create mode 100644 rules/dtndht.in create mode 100644 rules/dtndht.make create mode 100644 rules/ibrcommon.in create mode 100644 rules/ibrcommon.make create mode 100644 rules/ibrdtn-tools.in create mode 100644 rules/ibrdtn-tools.make create mode 100644 rules/ibrdtn.in create mode 100644 rules/ibrdtn.make create mode 100644 rules/ibrdtnd.in create mode 100644 rules/ibrdtnd.make diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service new file mode 100644 index 0000000..bc8bc27 --- /dev/null +++ b/projectroot/lib/systemd/system/ibrdtnd.service @@ -0,0 +1,10 @@ +[Unit] +Description=IBR-DTN Bundle Protocol daemon +Requires=network.target + +[Service] +ExecStart=/usr/sbin/dtnd -D -c /etc/ibrdtnd.conf +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/rules/dtndht.in b/rules/dtndht.in new file mode 100644 index 0000000..21d6ff1 --- /dev/null +++ b/rules/dtndht.in @@ -0,0 +1,30 @@ +## SECTION=networking + +menuconfig DTNDHT + tristate + prompt "dtndht " + select OPENSSL if DTNDHT_WITH_OPENSSL + help + DTNDHT is a library providing a fully distributed BitTorrent DHT-based + naming service especially for DTN Bundle Protocol EIDs (RFC 5050). + +if DTNDHT + +config DTNDHT_ENABLE_BLACKLIST + bool + default y + prompt "enable blacklist" + +config DTNDHT_ENABLE_RATING + bool + default y + prompt "enable peer rating" + +config DTNDHT_WITH_OPENSSL + bool + default y + prompt "use OpenSSL instead of built-in crypto" + +endif + +# vim: syntax=kconfig diff --git a/rules/dtndht.make b/rules/dtndht.make new file mode 100644 index 0000000..c47bb62 --- /dev/null +++ b/rules/dtndht.make @@ -0,0 +1,58 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_DTNDHT) += dtndht + +# +# Paths and names +# +DTNDHT_VERSION := 0.2.3 +DTNDHT_MD5 := 37c33910ac7e760aad4db81724aeb4fb +DTNDHT := dtndht-$(DTNDHT_VERSION) +DTNDHT_SUFFIX := tar.gz +DTNDHT_SOURCE := $(SRCDIR)/$(DTNDHT).$(DTNDHT_SUFFIX) +DTNDHT_DIR := $(BUILDDIR)/$(DTNDHT) +DTNDHT_LICENSE := MIT + +DTNDHT_URL := \ + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(DTNDHT).$(DTNDHT_SUFFIX) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +DTNDHT_CONF_TOOL := autoconf +DTNDHT_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --$(call ptx/endis, PTXCONF_DTNDHT_ENABLE_BLACKLIST)-blacklist \ + --$(call ptx/endis, PTXCONF_DTNDHT_ENABLE_RATING)-rating \ + --$(call ptx/wwo, PTXCONF_DTNDHT_WITH_OPENSSL)-openssl + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/dtndht.targetinstall: + @$(call targetinfo) + + @$(call install_init, dtndht) + @$(call install_fixup, dtndht,PRIORITY,optional) + @$(call install_fixup, dtndht,SECTION,base) + @$(call install_fixup, dtndht,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, dtndht,DESCRIPTION,missing) + + @$(call install_lib, dtndht, 0, 0, 0755, libdtndht-0.2) + + @$(call install_finish, dtndht) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrcommon.in b/rules/ibrcommon.in new file mode 100644 index 0000000..f585718 --- /dev/null +++ b/rules/ibrcommon.in @@ -0,0 +1,43 @@ +## SECTION=networking + +menuconfig IBRCOMMON + tristate + prompt "ibrcommon " + select LIBC_M + select LIBNL3 if IBRCOMMON_ENABLE_NETLINK + select LIBXML2 if IBRCOMMON_WITH_XML + select LIBXML2_WRITER if IBRCOMMON_WITH_XML + select OPENSSL if IBRCOMMON_WITH_OPENSSL + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the common library parts which could be of + interest for other software projects. + +if IBRCOMMON + +config IBRCOMMON_ENABLE_NETLINK + bool + default y + prompt "enable netlink support" + +config IBRCOMMON_WITH_LOWPAN + bool + default y + select IBRCOMMON_ENABLE_NETLINK + prompt "enable LoWPAN support" + +config IBRCOMMON_WITH_OPENSSL + bool + default y + prompt "enable OpenSSL support" + +config IBRCOMMON_WITH_XML + bool + prompt "enable XML support" + +endif + +# vim: syntax=kconfig diff --git a/rules/ibrcommon.make b/rules/ibrcommon.make new file mode 100644 index 0000000..63984a7 --- /dev/null +++ b/rules/ibrcommon.make @@ -0,0 +1,60 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRCOMMON) += ibrcommon + +# +# Paths and names +# +IBRCOMMON_VERSION := 1.0.1 +IBRCOMMON_MD5 := 0104763ede969c470f32244d76c234b8 +IBRCOMMON := ibrcommon-$(IBRCOMMON_VERSION) +IBRCOMMON_SUFFIX := tar.gz +IBRCOMMON_SOURCE := $(SRCDIR)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) +IBRCOMMON_DIR := $(BUILDDIR)/$(IBRCOMMON) +IBRCOMMON_LICENSE := Apache-2.0 + +IBRCOMMON_URL := \ + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) \ + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRCOMMON_VERSION)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +IBRCOMMON_CONF_TOOL := autoconf +IBRCOMMON_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --$(call ptx/ifdef, PTXCONF_IBRCOMMON_ENABLE_NETLINK,,disable-netlink) \ + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_LOWPAN)-lowpan \ + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_OPENSSL)-openssl \ + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_XML)-xml + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrcommon.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrcommon) + @$(call install_fixup, ibrcommon,PRIORITY,optional) + @$(call install_fixup, ibrcommon,SECTION,base) + @$(call install_fixup, ibrcommon,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrcommon,DESCRIPTION,missing) + + @$(call install_lib, ibrcommon, 0, 0, 0755, libibrcommon-1.0) + + @$(call install_finish, ibrcommon) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrdtn-tools.in b/rules/ibrdtn-tools.in new file mode 100644 index 0000000..b175dae --- /dev/null +++ b/rules/ibrdtn-tools.in @@ -0,0 +1,49 @@ +## SECTION=networking + +menuconfig IBRDTN_TOOLS + tristate + prompt "ibrdtn-tools " + select IBRDTND + select IBRDTN + select LIBC_M + select LIBDAEMON if IBRDTN_TOOLS_WITH_LIBDAEMON + select LIBARCHIVE if IBRDTN_TOOLS_WITH_LIBARCHIVE + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the tools to work with IBR-DTN: dtnping, + dtnsend, dtnrecv, dtntracepath, dtnconvert, dtninbox, dtnoutbox, + dtnstream, dtntrigger, and dtntunnel. + +if IBRDTN_TOOLS + +config IBRDTN_TOOLS_WITH_LIBDAEMON + bool + default y + prompt "build with daemon support" + help + If this option is enabled, dtntrigger and dtntunnel will be + able to start as a daemon in the background. + +config IBRDTN_TOOLS_WITH_LIBARCHIVE + bool + default y + prompt "build with libarchive support (dtninbox, dtnoutbox)" + help + libarchive support is needed for dtninbox and dtnoutbox. If this + option is disabled, those tools will not be built. + +config IBRDTN_TOOLS_WITH_TFFS + bool + # needs libtffs + depends on BROKEN + prompt "build with fat-image support for dtnoutbox [BROKEN]" + help + With libtffs support, dtnoutbox can read its input directly from vfat + images. + +endif + +# vim: syntax=kconfig diff --git a/rules/ibrdtn-tools.make b/rules/ibrdtn-tools.make new file mode 100644 index 0000000..d87b6a8 --- /dev/null +++ b/rules/ibrdtn-tools.make @@ -0,0 +1,71 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRDTN_TOOLS) += ibrdtn-tools + +# +# Paths and names +# +IBRDTN_TOOLS_VERSION := 1.0.1 +IBRDTN_TOOLS_MD5 := 3e527cedc6132739403fc210e4f8abe2 +IBRDTN_TOOLS := ibrdtn-tools-$(IBRDTN_TOOLS_VERSION) +IBRDTN_TOOLS_SUFFIX := tar.gz +IBRDTN_TOOLS_SOURCE := $(SRCDIR)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) +IBRDTN_TOOLS_DIR := $(BUILDDIR)/$(IBRDTN_TOOLS) +IBRDTN_TOOLS_LICENSE := Apache-2.0 + +IBRDTN_TOOLS_URL := \ + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) \ + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTN_TOOLS_VERSION)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +# Note: --without-tffs: tffs is not yet packaged +IBRDTN_TOOLS_CONF_TOOL := autoconf +IBRDTN_TOOLS_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBDAEMON)-libdaemon \ + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBARCHIVE)-libarchive \ + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_TFFS)-tffs + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrdtn-tools.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrdtn-tools) + @$(call install_fixup, ibrdtn-tools,PRIORITY,optional) + @$(call install_fixup, ibrdtn-tools,SECTION,base) + @$(call install_fixup, ibrdtn-tools,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrdtn-tools,DESCRIPTION,missing) + + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnstream) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnrecv) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntrigger) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnconvert) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnping) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntracepath) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnsend) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/sbin/dtntunnel) +ifdef IBRDTN_TOOLS_WITH_LIBARCHIVE + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtninbox) + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnoutbox) +endif + + @$(call install_finish, ibrdtn-tools) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrdtn.in b/rules/ibrdtn.in new file mode 100644 index 0000000..9e7511b --- /dev/null +++ b/rules/ibrdtn.in @@ -0,0 +1,32 @@ +## SECTION=networking + +menuconfig IBRDTN + tristate + prompt "ibrdtn " + select IBRCOMMON + select LIBC_M + select ZLIB if IBRDTN_WITH_COMPRESSION + select GLIB if IBRDTN_WITH_GLIB + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the shared library used to build applications + with IBR-DTN functionality. + +if IBRDTN + +config IBRDTN_WITH_COMPRESSION + bool + default y + prompt "build with bundle compression support" + +config IBRDTN_WITH_GLIB + bool + prompt "link to glib-2.0 library" + help + Linking against GLib results in optimized endianess conversion macros. + +endif +# vim: syntax=kconfig diff --git a/rules/ibrdtn.make b/rules/ibrdtn.make new file mode 100644 index 0000000..61b7856 --- /dev/null +++ b/rules/ibrdtn.make @@ -0,0 +1,58 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRDTN) += ibrdtn + +# +# Paths and names +# +IBRDTN_VERSION := 1.0.1 +IBRDTN_MD5 := 37208be202f199f1790983ff78b2fa8f +IBRDTN := ibrdtn-$(IBRDTN_VERSION) +IBRDTN_SUFFIX := tar.gz +IBRDTN_SOURCE := $(SRCDIR)/$(IBRDTN).$(IBRDTN_SUFFIX) +IBRDTN_DIR := $(BUILDDIR)/$(IBRDTN) +IBRDTN_LICENSE := Apache-2.0 + +IBRDTN_URL := \ + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN).$(IBRDTN_SUFFIX) \ + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTN_VERSION)/$(IBRDTN).$(IBRDTN_SUFFIX) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +IBRDTN_CONF_TOOL := autoconf +IBRDTN_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_COMPRESSION)-compression \ + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_GLIB)-glib + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrdtn.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrdtn) + @$(call install_fixup, ibrdtn,PRIORITY,optional) + @$(call install_fixup, ibrdtn,SECTION,base) + @$(call install_fixup, ibrdtn,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrdtn,DESCRIPTION,missing) + + @$(call install_lib, ibrdtn, 0, 0, 0755, libibrdtn-1.0) + + @$(call install_finish, ibrdtn) + + @$(call touch) + +# vim: syntax=make diff --git a/rules/ibrdtnd.in b/rules/ibrdtnd.in new file mode 100644 index 0000000..44f7834 --- /dev/null +++ b/rules/ibrdtnd.in @@ -0,0 +1,70 @@ +## SECTION=networking + +menuconfig IBRDTND + tristate + prompt "ibrdtnd " + select IBRDTN + select LIBC_M + select LIBDAEMON if IBRDTND_ENABLE_DAEMON + select DTNDHT if IBRDTND_ENABLE_DTNDHT + select IBRCOMMON_WITH_OPENSSL if IBRDTND_WITH_TLS + select SQLITE if IBRDTND_WITH_SQLITE + select LIBCURL if IBRDTND_WITH_LIBCURL + help + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC + 5050), designed for embedded systems like the RouterBoard532A or + Ubiquiti RouterStation Pro. + + This package contains the daemon which handles all DTN communication. + +if IBRDTND + +config IBRDTND_SYSTEMD_UNIT + bool + default y + depends on INITMETHOD_SYSTEMD + prompt "install systemd unit files for the IBR-DTN daemon" + +config IBRDTND_ENABLE_DAEMON + bool + default y + prompt "build with libdaemon support" + +config IBRDTND_ENABLE_DTNDHT + bool + default y + prompt "build with DTNDHT support" + help + The DTNDHT library makes it possible to find neighbors via a + distributed hash table based on the BitTorrent protocol. + +config IBRDTND_WITH_SQLITE + bool + prompt "build with SQLite storage module" + +config IBRDTND_WITH_TLS + bool + prompt "build with TLS support (Bundle Security Protocol)" + +config IBRDTND_WITH_LIBCURL + bool + prompt "build with libcurl (HTTP Convergence Layer)" + +config IBRDTND_WITH_VMIME + bool + prompt "build with libvmime (E-Mail Convergence Layer) [BROKEN]" + # needs libvmime + depends on BROKEN + +config IBRDTND_WITH_WIFIP2P + bool + prompt "build with wifip2p support [BROKEN]" + # needs wifip2p + depends on BROKEN + help + With wifip2p support, IBR-DTN can use supported Wi-Fi (IEEE + 802.11) devices to connect to other neighbors directly without the + need for an additional Wi-Fi access point. + +endif +# vim: syntax=kconfig diff --git a/rules/ibrdtnd.make b/rules/ibrdtnd.make new file mode 100644 index 0000000..e907b71 --- /dev/null +++ b/rules/ibrdtnd.make @@ -0,0 +1,76 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_IBRDTND) += ibrdtnd + +# +# Paths and names +# +IBRDTND_VERSION := 1.0.1 +IBRDTND_MD5 := 933d37bf777700a6e1709d0f7a129613 +IBRDTND := ibrdtnd-$(IBRDTND_VERSION) +IBRDTND_SUFFIX := tar.gz +IBRDTND_SOURCE := $(SRCDIR)/$(IBRDTND).$(IBRDTND_SUFFIX) +IBRDTND_DIR := $(BUILDDIR)/$(IBRDTND) +IBRDTND_LICENSE := Apache-2.0 + +IBRDTND_URL := \ + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTND).$(IBRDTND_SUFFIX) \ + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTND_VERSION)/$(IBRDTND).$(IBRDTND_SUFFIX) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +IBRDTND_CONF_TOOL := autoconf +IBRDTND_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DAEMON)-libdaemon \ + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DTNDHT)-dtndht \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_SQLITE)-sqlite \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_TLS)-tls \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_LIBCURL)-curl \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_VMIME)-vmime \ + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_WIFIP2P)-wifip2p + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/ibrdtnd.targetinstall: + @$(call targetinfo) + + @$(call install_init, ibrdtnd) + @$(call install_fixup, ibrdtnd,PRIORITY,optional) + @$(call install_fixup, ibrdtnd,SECTION,base) + @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") + @$(call install_fixup, ibrdtnd,DESCRIPTION,missing) + + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd) + @$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf) + +ifdef PTXCONF_IBRDTND_WITH_TLS + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh) + @mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs +endif + +ifdef PTXCONF_IBRDTND_SYSTEMD_UNIT + @$(call install_alternative, ibrdtnd, 0, 0, 0644, \ + /lib/systemd/system/ibrdtnd.service) + @$(call install_link, ibrdtnd, ../ibrdtnd.service, \ + /lib/systemd/system/multi-user.target.wants/ibrdtnd.service) +endif + + @$(call install_finish, ibrdtnd) + + @$(call touch) + +# vim: syntax=make -- 2.8.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-08-28 5:32 ` [ptxdist] [PATCH v2] " Roland Hieber @ 2016-09-07 13:48 ` Michael Olbrich 2016-09-08 1:07 ` Roland Hieber 0 siblings, 1 reply; 16+ messages in thread From: Michael Olbrich @ 2016-09-07 13:48 UTC (permalink / raw) To: ptxdist On Sun, Aug 28, 2016 at 07:32:50AM +0200, Roland Hieber wrote: > IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > 5050), designed for embedded systems like the RouterBoard532A or > Ubiquiti RouterStation Pro. > > IBR-DTN consists of several upstream tarballs which split its > functionality into modular parts, namely ibrcommon, ibrdtn, ibrdtnd and > ibrdtn-tools. Although they are released at the same time with the same > version, they are usually packaged separately to provide the modularity > on the package level. In order to provide clean and readable Makefiles, > the upstream naming scheme is adopted here. > > Although dtndht is versioned and released as a separate upstream > package, it is effectively part of IBR-DTN as it is not really used > anywhere else, and it's also developed in close contact with IBR-DTN by > the same authors. For this reason, I'm including all package rules in a > single patch. > > The upstream releases includes some functionality which depends on > software not currently available in ptxdist. This includes tffs, > wifip2p and libvmime. I have included the directives for these > features, but commented them out, so they can easily be enabled once > that software gets packaged. > > Signed-off-by: Roland Hieber <rohieb@rohieb.name> > --- > projectroot/lib/systemd/system/ibrdtnd.service | 10 ++++ > rules/dtndht.in | 30 ++++++++++ > rules/dtndht.make | 58 ++++++++++++++++++++ > rules/ibrcommon.in | 43 +++++++++++++++ > rules/ibrcommon.make | 60 ++++++++++++++++++++ > rules/ibrdtn-tools.in | 49 +++++++++++++++++ > rules/ibrdtn-tools.make | 71 ++++++++++++++++++++++++ > rules/ibrdtn.in | 32 +++++++++++ > rules/ibrdtn.make | 58 ++++++++++++++++++++ > rules/ibrdtnd.in | 70 ++++++++++++++++++++++++ > rules/ibrdtnd.make | 76 ++++++++++++++++++++++++++ > 11 files changed, 557 insertions(+) > create mode 100644 projectroot/lib/systemd/system/ibrdtnd.service > create mode 100644 rules/dtndht.in > create mode 100644 rules/dtndht.make > create mode 100644 rules/ibrcommon.in > create mode 100644 rules/ibrcommon.make > create mode 100644 rules/ibrdtn-tools.in > create mode 100644 rules/ibrdtn-tools.make > create mode 100644 rules/ibrdtn.in > create mode 100644 rules/ibrdtn.make > create mode 100644 rules/ibrdtnd.in > create mode 100644 rules/ibrdtnd.make > > diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service > new file mode 100644 > index 0000000..bc8bc27 > --- /dev/null > +++ b/projectroot/lib/systemd/system/ibrdtnd.service > @@ -0,0 +1,10 @@ > +[Unit] > +Description=IBR-DTN Bundle Protocol daemon > +Requires=network.target > + > +[Service] > +ExecStart=/usr/sbin/dtnd -D -c /etc/ibrdtnd.conf > +Restart=always > + > +[Install] > +WantedBy=multi-user.target > diff --git a/rules/dtndht.in b/rules/dtndht.in > new file mode 100644 > index 0000000..21d6ff1 > --- /dev/null > +++ b/rules/dtndht.in > @@ -0,0 +1,30 @@ > +## SECTION=networking > + > +menuconfig DTNDHT > + tristate > + prompt "dtndht " > + select OPENSSL if DTNDHT_WITH_OPENSSL > + help > + DTNDHT is a library providing a fully distributed BitTorrent DHT-based > + naming service especially for DTN Bundle Protocol EIDs (RFC 5050). > + > +if DTNDHT > + > +config DTNDHT_ENABLE_BLACKLIST > + bool > + default y > + prompt "enable blacklist" > + > +config DTNDHT_ENABLE_RATING > + bool > + default y > + prompt "enable peer rating" > + > +config DTNDHT_WITH_OPENSSL > + bool > + default y > + prompt "use OpenSSL instead of built-in crypto" > + > +endif > + > +# vim: syntax=kconfig > diff --git a/rules/dtndht.make b/rules/dtndht.make > new file mode 100644 > index 0000000..c47bb62 > --- /dev/null > +++ b/rules/dtndht.make > @@ -0,0 +1,58 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_DTNDHT) += dtndht > + > +# > +# Paths and names > +# > +DTNDHT_VERSION := 0.2.3 > +DTNDHT_MD5 := 37c33910ac7e760aad4db81724aeb4fb > +DTNDHT := dtndht-$(DTNDHT_VERSION) > +DTNDHT_SUFFIX := tar.gz > +DTNDHT_SOURCE := $(SRCDIR)/$(DTNDHT).$(DTNDHT_SUFFIX) > +DTNDHT_DIR := $(BUILDDIR)/$(DTNDHT) > +DTNDHT_LICENSE := MIT > + > +DTNDHT_URL := \ > + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(DTNDHT).$(DTNDHT_SUFFIX) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +DTNDHT_CONF_TOOL := autoconf > +DTNDHT_CONF_OPT := \ > + $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/endis, PTXCONF_DTNDHT_ENABLE_BLACKLIST)-blacklist \ > + --$(call ptx/endis, PTXCONF_DTNDHT_ENABLE_RATING)-rating \ > + --$(call ptx/wwo, PTXCONF_DTNDHT_WITH_OPENSSL)-openssl > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/dtndht.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, dtndht) > + @$(call install_fixup, dtndht,PRIORITY,optional) > + @$(call install_fixup, dtndht,SECTION,base) > + @$(call install_fixup, dtndht,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, dtndht,DESCRIPTION,missing) > + > + @$(call install_lib, dtndht, 0, 0, 0755, libdtndht-0.2) > + > + @$(call install_finish, dtndht) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrcommon.in b/rules/ibrcommon.in > new file mode 100644 > index 0000000..f585718 > --- /dev/null > +++ b/rules/ibrcommon.in > @@ -0,0 +1,43 @@ > +## SECTION=networking > + > +menuconfig IBRCOMMON > + tristate > + prompt "ibrcommon " > + select LIBC_M > + select LIBNL3 if IBRCOMMON_ENABLE_NETLINK > + select LIBXML2 if IBRCOMMON_WITH_XML > + select LIBXML2_WRITER if IBRCOMMON_WITH_XML > + select OPENSSL if IBRCOMMON_WITH_OPENSSL > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the common library parts which could be of > + interest for other software projects. > + > +if IBRCOMMON > + > +config IBRCOMMON_ENABLE_NETLINK > + bool > + default y > + prompt "enable netlink support" > + > +config IBRCOMMON_WITH_LOWPAN > + bool > + default y > + select IBRCOMMON_ENABLE_NETLINK > + prompt "enable LoWPAN support" > + > +config IBRCOMMON_WITH_OPENSSL > + bool > + default y > + prompt "enable OpenSSL support" > + > +config IBRCOMMON_WITH_XML > + bool > + prompt "enable XML support" > + > +endif > + > +# vim: syntax=kconfig > diff --git a/rules/ibrcommon.make b/rules/ibrcommon.make > new file mode 100644 > index 0000000..63984a7 > --- /dev/null > +++ b/rules/ibrcommon.make > @@ -0,0 +1,60 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRCOMMON) += ibrcommon > + > +# > +# Paths and names > +# > +IBRCOMMON_VERSION := 1.0.1 > +IBRCOMMON_MD5 := 0104763ede969c470f32244d76c234b8 > +IBRCOMMON := ibrcommon-$(IBRCOMMON_VERSION) > +IBRCOMMON_SUFFIX := tar.gz > +IBRCOMMON_SOURCE := $(SRCDIR)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) > +IBRCOMMON_DIR := $(BUILDDIR)/$(IBRCOMMON) > +IBRCOMMON_LICENSE := Apache-2.0 > + > +IBRCOMMON_URL := \ > + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) \ > + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRCOMMON_VERSION)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +IBRCOMMON_CONF_TOOL := autoconf > +IBRCOMMON_CONF_OPT := \ > + $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/ifdef, PTXCONF_IBRCOMMON_ENABLE_NETLINK,,disable-netlink) \ > + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_LOWPAN)-lowpan \ > + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_OPENSSL)-openssl \ > + --$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_XML)-xml > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrcommon.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrcommon) > + @$(call install_fixup, ibrcommon,PRIORITY,optional) > + @$(call install_fixup, ibrcommon,SECTION,base) > + @$(call install_fixup, ibrcommon,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrcommon,DESCRIPTION,missing) > + > + @$(call install_lib, ibrcommon, 0, 0, 0755, libibrcommon-1.0) > + > + @$(call install_finish, ibrcommon) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrdtn-tools.in b/rules/ibrdtn-tools.in > new file mode 100644 > index 0000000..b175dae > --- /dev/null > +++ b/rules/ibrdtn-tools.in > @@ -0,0 +1,49 @@ > +## SECTION=networking > + > +menuconfig IBRDTN_TOOLS > + tristate > + prompt "ibrdtn-tools " > + select IBRDTND > + select IBRDTN > + select LIBC_M > + select LIBDAEMON if IBRDTN_TOOLS_WITH_LIBDAEMON > + select LIBARCHIVE if IBRDTN_TOOLS_WITH_LIBARCHIVE > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the tools to work with IBR-DTN: dtnping, > + dtnsend, dtnrecv, dtntracepath, dtnconvert, dtninbox, dtnoutbox, > + dtnstream, dtntrigger, and dtntunnel. > + > +if IBRDTN_TOOLS > + > +config IBRDTN_TOOLS_WITH_LIBDAEMON > + bool > + default y > + prompt "build with daemon support" > + help > + If this option is enabled, dtntrigger and dtntunnel will be > + able to start as a daemon in the background. > + > +config IBRDTN_TOOLS_WITH_LIBARCHIVE > + bool > + default y > + prompt "build with libarchive support (dtninbox, dtnoutbox)" > + help > + libarchive support is needed for dtninbox and dtnoutbox. If this > + option is disabled, those tools will not be built. > + > +config IBRDTN_TOOLS_WITH_TFFS > + bool > + # needs libtffs > + depends on BROKEN > + prompt "build with fat-image support for dtnoutbox [BROKEN]" > + help > + With libtffs support, dtnoutbox can read its input directly from vfat > + images. > + > +endif > + > +# vim: syntax=kconfig > diff --git a/rules/ibrdtn-tools.make b/rules/ibrdtn-tools.make > new file mode 100644 > index 0000000..d87b6a8 > --- /dev/null > +++ b/rules/ibrdtn-tools.make > @@ -0,0 +1,71 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRDTN_TOOLS) += ibrdtn-tools > + > +# > +# Paths and names > +# > +IBRDTN_TOOLS_VERSION := 1.0.1 > +IBRDTN_TOOLS_MD5 := 3e527cedc6132739403fc210e4f8abe2 > +IBRDTN_TOOLS := ibrdtn-tools-$(IBRDTN_TOOLS_VERSION) > +IBRDTN_TOOLS_SUFFIX := tar.gz > +IBRDTN_TOOLS_SOURCE := $(SRCDIR)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) > +IBRDTN_TOOLS_DIR := $(BUILDDIR)/$(IBRDTN_TOOLS) > +IBRDTN_TOOLS_LICENSE := Apache-2.0 > + > +IBRDTN_TOOLS_URL := \ > + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) \ > + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTN_TOOLS_VERSION)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +# Note: --without-tffs: tffs is not yet packaged > +IBRDTN_TOOLS_CONF_TOOL := autoconf > +IBRDTN_TOOLS_CONF_OPT := \ > + $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBDAEMON)-libdaemon \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBARCHIVE)-libarchive \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_TFFS)-tffs > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrdtn-tools.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrdtn-tools) > + @$(call install_fixup, ibrdtn-tools,PRIORITY,optional) > + @$(call install_fixup, ibrdtn-tools,SECTION,base) > + @$(call install_fixup, ibrdtn-tools,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrdtn-tools,DESCRIPTION,missing) > + > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnstream) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnrecv) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntrigger) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnconvert) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnping) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntracepath) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnsend) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/sbin/dtntunnel) > +ifdef IBRDTN_TOOLS_WITH_LIBARCHIVE > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtninbox) > + @$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnoutbox) > +endif > + > + @$(call install_finish, ibrdtn-tools) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrdtn.in b/rules/ibrdtn.in > new file mode 100644 > index 0000000..9e7511b > --- /dev/null > +++ b/rules/ibrdtn.in > @@ -0,0 +1,32 @@ > +## SECTION=networking > + > +menuconfig IBRDTN > + tristate > + prompt "ibrdtn " > + select IBRCOMMON > + select LIBC_M > + select ZLIB if IBRDTN_WITH_COMPRESSION > + select GLIB if IBRDTN_WITH_GLIB > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the shared library used to build applications > + with IBR-DTN functionality. > + > +if IBRDTN > + > +config IBRDTN_WITH_COMPRESSION > + bool > + default y > + prompt "build with bundle compression support" > + > +config IBRDTN_WITH_GLIB > + bool > + prompt "link to glib-2.0 library" > + help > + Linking against GLib results in optimized endianess conversion macros. > + > +endif > +# vim: syntax=kconfig > diff --git a/rules/ibrdtn.make b/rules/ibrdtn.make > new file mode 100644 > index 0000000..61b7856 > --- /dev/null > +++ b/rules/ibrdtn.make > @@ -0,0 +1,58 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRDTN) += ibrdtn > + > +# > +# Paths and names > +# > +IBRDTN_VERSION := 1.0.1 > +IBRDTN_MD5 := 37208be202f199f1790983ff78b2fa8f > +IBRDTN := ibrdtn-$(IBRDTN_VERSION) > +IBRDTN_SUFFIX := tar.gz > +IBRDTN_SOURCE := $(SRCDIR)/$(IBRDTN).$(IBRDTN_SUFFIX) > +IBRDTN_DIR := $(BUILDDIR)/$(IBRDTN) > +IBRDTN_LICENSE := Apache-2.0 > + > +IBRDTN_URL := \ > + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN).$(IBRDTN_SUFFIX) \ > + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTN_VERSION)/$(IBRDTN).$(IBRDTN_SUFFIX) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +IBRDTN_CONF_TOOL := autoconf > +IBRDTN_CONF_OPT := \ > + $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_COMPRESSION)-compression \ > + --$(call ptx/wwo, PTXCONF_IBRDTN_WITH_GLIB)-glib > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrdtn.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrdtn) > + @$(call install_fixup, ibrdtn,PRIORITY,optional) > + @$(call install_fixup, ibrdtn,SECTION,base) > + @$(call install_fixup, ibrdtn,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrdtn,DESCRIPTION,missing) > + > + @$(call install_lib, ibrdtn, 0, 0, 0755, libibrdtn-1.0) > + > + @$(call install_finish, ibrdtn) > + > + @$(call touch) > + > +# vim: syntax=make > diff --git a/rules/ibrdtnd.in b/rules/ibrdtnd.in > new file mode 100644 > index 0000000..44f7834 > --- /dev/null > +++ b/rules/ibrdtnd.in > @@ -0,0 +1,70 @@ > +## SECTION=networking > + > +menuconfig IBRDTND > + tristate > + prompt "ibrdtnd " > + select IBRDTN > + select LIBC_M > + select LIBDAEMON if IBRDTND_ENABLE_DAEMON > + select DTNDHT if IBRDTND_ENABLE_DTNDHT > + select IBRCOMMON_WITH_OPENSSL if IBRDTND_WITH_TLS This looks wrong. If IBRCOMMON is needed then you must select the toplevel symbol as well. > + select SQLITE if IBRDTND_WITH_SQLITE > + select LIBCURL if IBRDTND_WITH_LIBCURL > + help > + IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC > + 5050), designed for embedded systems like the RouterBoard532A or > + Ubiquiti RouterStation Pro. > + > + This package contains the daemon which handles all DTN communication. > + > +if IBRDTND > + > +config IBRDTND_SYSTEMD_UNIT > + bool > + default y > + depends on INITMETHOD_SYSTEMD > + prompt "install systemd unit files for the IBR-DTN daemon" > + > +config IBRDTND_ENABLE_DAEMON > + bool > + default y > + prompt "build with libdaemon support" > + > +config IBRDTND_ENABLE_DTNDHT > + bool > + default y > + prompt "build with DTNDHT support" > + help > + The DTNDHT library makes it possible to find neighbors via a > + distributed hash table based on the BitTorrent protocol. > + > +config IBRDTND_WITH_SQLITE > + bool > + prompt "build with SQLite storage module" > + > +config IBRDTND_WITH_TLS > + bool > + prompt "build with TLS support (Bundle Security Protocol)" > + > +config IBRDTND_WITH_LIBCURL > + bool > + prompt "build with libcurl (HTTP Convergence Layer)" > + > +config IBRDTND_WITH_VMIME > + bool > + prompt "build with libvmime (E-Mail Convergence Layer) [BROKEN]" > + # needs libvmime > + depends on BROKEN > + > +config IBRDTND_WITH_WIFIP2P > + bool > + prompt "build with wifip2p support [BROKEN]" > + # needs wifip2p > + depends on BROKEN > + help > + With wifip2p support, IBR-DTN can use supported Wi-Fi (IEEE > + 802.11) devices to connect to other neighbors directly without the > + need for an additional Wi-Fi access point. > + > +endif > +# vim: syntax=kconfig > diff --git a/rules/ibrdtnd.make b/rules/ibrdtnd.make > new file mode 100644 > index 0000000..e907b71 > --- /dev/null > +++ b/rules/ibrdtnd.make > @@ -0,0 +1,76 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name> > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_IBRDTND) += ibrdtnd > + > +# > +# Paths and names > +# > +IBRDTND_VERSION := 1.0.1 > +IBRDTND_MD5 := 933d37bf777700a6e1709d0f7a129613 > +IBRDTND := ibrdtnd-$(IBRDTND_VERSION) > +IBRDTND_SUFFIX := tar.gz > +IBRDTND_SOURCE := $(SRCDIR)/$(IBRDTND).$(IBRDTND_SUFFIX) > +IBRDTND_DIR := $(BUILDDIR)/$(IBRDTND) > +IBRDTND_LICENSE := Apache-2.0 > + > +IBRDTND_URL := \ > + https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTND).$(IBRDTND_SUFFIX) \ > + https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTND_VERSION)/$(IBRDTND).$(IBRDTND_SUFFIX) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +# > +# autoconf > +# > +IBRDTND_CONF_TOOL := autoconf > +IBRDTND_CONF_OPT := \ > + $(CROSS_AUTOCONF_USR) \ > + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DAEMON)-libdaemon \ > + --$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DTNDHT)-dtndht \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_SQLITE)-sqlite \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_TLS)-tls \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_LIBCURL)-curl \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_VMIME)-vmime \ > + --$(call ptx/wwo, PTXCONF_IBRDTND_WITH_WIFIP2P)-wifip2p > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/ibrdtnd.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, ibrdtnd) > + @$(call install_fixup, ibrdtnd,PRIORITY,optional) > + @$(call install_fixup, ibrdtnd,SECTION,base) > + @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > + @$(call install_fixup, ibrdtnd,DESCRIPTION,missing) > + > + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd) > + @$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf) > + > +ifdef PTXCONF_IBRDTND_WITH_TLS > + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh) > + @mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs No, you nned to do this to create a directory: @$(call install_copy, ibrdtnd, 0, 0, 0755, /etc/ibrdtn/certs) Michael > +endif > + > +ifdef PTXCONF_IBRDTND_SYSTEMD_UNIT > + @$(call install_alternative, ibrdtnd, 0, 0, 0644, \ > + /lib/systemd/system/ibrdtnd.service) > + @$(call install_link, ibrdtnd, ../ibrdtnd.service, \ > + /lib/systemd/system/multi-user.target.wants/ibrdtnd.service) > +endif > + > + @$(call install_finish, ibrdtnd) > + > + @$(call touch) > + > +# vim: syntax=make > -- > 2.8.1 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-09-07 13:48 ` Michael Olbrich @ 2016-09-08 1:07 ` Roland Hieber 2016-09-08 6:35 ` Michael Olbrich 0 siblings, 1 reply; 16+ messages in thread From: Roland Hieber @ 2016-09-08 1:07 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1.1: Type: text/plain, Size: 1922 bytes --] On 07.09.2016 15:48, Michael Olbrich wrote: >> +menuconfig IBRDTND >> + tristate >> + prompt "ibrdtnd " >> + select IBRDTN >> + select LIBC_M >> + select LIBDAEMON if IBRDTND_ENABLE_DAEMON >> + select DTNDHT if IBRDTND_ENABLE_DTNDHT >> + select IBRCOMMON_WITH_OPENSSL if IBRDTND_WITH_TLS > > This looks wrong. If IBRCOMMON is needed then you must select the toplevel > symbol as well. Right, thanks. IBRCOMMON is already selected indirectly by selecting IBRDTN, but I have now also added it here for clarification. >> +# ---------------------------------------------------------------------------- >> +# Target-Install >> +# ---------------------------------------------------------------------------- >> + >> +$(STATEDIR)/ibrdtnd.targetinstall: >> + @$(call targetinfo) >> + >> + @$(call install_init, ibrdtnd) >> + @$(call install_fixup, ibrdtnd,PRIORITY,optional) >> + @$(call install_fixup, ibrdtnd,SECTION,base) >> + @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") >> + @$(call install_fixup, ibrdtnd,DESCRIPTION,missing) >> + >> + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd) >> + @$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf) >> + >> +ifdef PTXCONF_IBRDTND_WITH_TLS >> + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh) >> + @mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs > > No, you nned to do this to create a directory: > > @$(call install_copy, ibrdtnd, 0, 0, 0755, /etc/ibrdtn/certs) > > Michael Yes right, this was already noted by Robert Schwebel, I have already edited it in my local working copy, and will send an updated patch once the key generation in /etc/rc.once is working. But unfortunately there are currently things of higher priorities for me, so this will probably still take a while :-/ - Roland [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht 2016-09-08 1:07 ` Roland Hieber @ 2016-09-08 6:35 ` Michael Olbrich 0 siblings, 0 replies; 16+ messages in thread From: Michael Olbrich @ 2016-09-08 6:35 UTC (permalink / raw) To: ptxdist On Thu, Sep 08, 2016 at 03:07:27AM +0200, Roland Hieber wrote: > On 07.09.2016 15:48, Michael Olbrich wrote: > >> +menuconfig IBRDTND > >> + tristate > >> + prompt "ibrdtnd " > >> + select IBRDTN > >> + select LIBC_M > >> + select LIBDAEMON if IBRDTND_ENABLE_DAEMON > >> + select DTNDHT if IBRDTND_ENABLE_DTNDHT > >> + select IBRCOMMON_WITH_OPENSSL if IBRDTND_WITH_TLS > > > > This looks wrong. If IBRCOMMON is needed then you must select the toplevel > > symbol as well. > > Right, thanks. IBRCOMMON is already selected indirectly by selecting > IBRDTN, but I have now also added it here for clarification. > > >> +# ---------------------------------------------------------------------------- > >> +# Target-Install > >> +# ---------------------------------------------------------------------------- > >> + > >> +$(STATEDIR)/ibrdtnd.targetinstall: > >> + @$(call targetinfo) > >> + > >> + @$(call install_init, ibrdtnd) > >> + @$(call install_fixup, ibrdtnd,PRIORITY,optional) > >> + @$(call install_fixup, ibrdtnd,SECTION,base) > >> + @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>") > >> + @$(call install_fixup, ibrdtnd,DESCRIPTION,missing) > >> + > >> + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd) > >> + @$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf) > >> + > >> +ifdef PTXCONF_IBRDTND_WITH_TLS > >> + @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh) > >> + @mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs > > > > No, you nned to do this to create a directory: > > > > @$(call install_copy, ibrdtnd, 0, 0, 0755, /etc/ibrdtn/certs) > > > > Michael > > Yes right, this was already noted by Robert Schwebel, I have already > edited it in my local working copy, and will send an updated patch once > the key generation in /etc/rc.once is working. But unfortunately there > are currently things of higher priorities for me, so this will probably > still take a while :-/ I know the feeling. I have a lot of 'not quite ready for mainline' patches lying around for various other projects. And a few for ptxdist as well... Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-09-08 6:35 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-08-17 14:53 [ptxdist] [PATCH] ibrdtn: add packaging rules for IBR-DTN and dtndht Roland Hieber 2016-08-18 6:53 ` Michael Olbrich 2016-08-23 4:41 ` Roland Hieber 2016-08-25 11:02 ` Michael Olbrich 2016-08-25 15:11 ` Robert Schwebel 2016-08-28 5:27 ` Roland Hieber 2016-08-28 7:36 ` Robert Schwebel 2016-08-28 18:36 ` Roland Hieber 2016-09-01 9:58 ` Michael Olbrich 2016-09-01 15:09 ` Alexander Dahl 2016-08-29 7:42 ` Juergen Borleis 2016-08-18 10:15 ` Michael Olbrich 2016-08-28 5:32 ` [ptxdist] [PATCH v2] " Roland Hieber 2016-09-07 13:48 ` Michael Olbrich 2016-09-08 1:07 ` Roland Hieber 2016-09-08 6:35 ` Michael Olbrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox