Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-09-08 Thread Michael Olbrich
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 LIBDAEMONif 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 
> >> ")
> >> +  @$(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- |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-09-07 Thread Roland Hieber
On 07.09.2016 15:48, Michael Olbrich wrote:
>> +menuconfig IBRDTND
>> +tristate
>> +prompt "ibrdtnd   "
>> +select IBRDTN
>> +select LIBC_M
>> +select LIBDAEMONif 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 
>> ")
>> +@$(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



signature.asc
Description: OpenPGP digital signature
___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-09-07 Thread Michael Olbrich
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 
> ---
>  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 000..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 000..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 000..c47bb62
> --- /dev/null
> +++ b/rules/dtndht.make
> @@ -0,0 +1,58 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2016 by Roland Hieber 
> +#
> +
> +#
> +# 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
> +#

[ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-08-27 Thread 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 
---
 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 000..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 000..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 000..c47bb62
--- /dev/null
+++ b/rules/dtndht.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Roland Hieber 
+#
+
+#
+# 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
+
+#