Skip to contentSkip to conversation

ibrdtn

PATCH New Tom Sparks 3 participants 3 messages Aug 6, 2015

lore
Share & tools
lore

Tom Sparks

author
#0 lore raw

PATCH 1/1 ibrdtn

---
 package/ibrcommon/Config.in    | 13 +++++++++++++
 package/ibrcommon/ibrcommon.mk | 32 ++++++++++++++++++++++++++++++++
 package/ibrdtn/Config.in       | 13 +++++++++++++
 package/ibrdtn/ibrdtn.mk       | 32 ++++++++++++++++++++++++++++++++
 package/ibrdtnd/Config.in      | 23 +++++++++++++++++++++++
 package/ibrdtnd/ibrdtnd.mk     | 32 ++++++++++++++++++++++++++++++++
 6 files changed, 145 insertions(+)
 create mode 100644 package/ibrcommon/Config.in
 create mode 100644 package/ibrcommon/ibrcommon.mk
 create mode 100644 package/ibrdtn/Config.in
 create mode 100644 package/ibrdtn/ibrdtn.mk
 create mode 100644 package/ibrdtnd/Config.in
 create mode 100644 package/ibrdtnd/ibrdtnd.mk
package/ibrcommon/Config.in new file +13 -0
new file mode 100644
index 0000000..c1d400b
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_IBRCOMMON
+	bool "ibrcommon"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_LIBXML2
+	help
+	  IBR-DTN is a small dtn application that supports:
+	  Bundle Protocol RFC 5050
+	  Bundle Security Protocol RFC 6257
+
+	  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn
package/ibrcommon/ibrcommon.mk new file +32 -0
new file mode 100644
index 0000000..3a67307
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ibrcommon
+#
+################################################################################
+
+IBRCOMMON_VERSION = 1.0.1
+IBRCOMMON_SOURCE = ibrcommon-$(IBRCOMMON_VERSION).tar.gz
+IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRCOMMON_INSTALL_STAGING = YES
+IBRCOMMON_LICENSE = Apache-2.0
+IBRCOMMON_LICENSE_FILES = COPYING
+IBRCOMMON_CONF_OPTS = --with-openssl --with-lowpan   --with-xml 
+IBRCOMMON_DEPENDENCIES = openssl libnl libxml2
+
+# While the configuration system uses autoconf, the Makefiles are
+# hand-written and do not use automake. Therefore, we have to hack
+# around their deficiencies by passing installation paths.
+IBRCOMMON_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRCOMMON_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install
+
+
+
+$(eval $(autotools-package))
package/ibrdtn/Config.in new file +13 -0
new file mode 100644
index 0000000..9da2b54
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_IBRDTN
+	bool "ibrdtn"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_IBRCOMMON
+	help
+	  IBR-DTN is a small dtn application that supports:
+	  Bundle Protocol RFC 5050
+	  Bundle Security Protocol RFC 6257
+
+	  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn
+
+
package/ibrdtn/ibrdtn.mk new file +32 -0
new file mode 100644
index 0000000..744bd2f
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ibrdtn
+#
+################################################################################
+
+IBRDTN_VERSION = 1.0.1
+IBRDTN_SOURCE = ibrdtn-$(IBRDTN_VERSION).tar.gz
+IBRDTN_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRDTN_INSTALL_STAGING = YES
+IBRDTN_LICENSE = Apache-2.0
+IBRDTN_LICENSE_FILES = COPYING
+IBRDTN_CONF_OPTS = --with-compression
+IBRDTN_DEPENDENCIES = ibrcommon
+
+# While the configuration system uses autoconf, the Makefiles are
+# hand-written and do not use automake. Therefore, we have to hack
+# around their deficiencies by passing installation paths.
+IBRDTN_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRDTN_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install
+
+
+
+$(eval $(autotools-package))
package/ibrdtnd/Config.in new file +23 -0
new file mode 100644
index 0000000..ffc6e09
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_IBRDTND
+	bool "ibrdtnd"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_IBRDTN
+	select BR2_PACKAGE_LIBDAEMON
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_OPENSSL
+
+	help
+	  IBR-DTN is a small dtn application that supports:
+	  Bundle Protocol RFC 5050
+	  Bundle Security Protocol RFC 6257
+
+	  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn
+
+if BR2_PACKAGE_IBRDTND
+
+source "package/ibrcommon/Config.in"
+source "package/ibrdtn/Config.in"
+
+endif
package/ibrdtnd/ibrdtnd.mk new file +32 -0
new file mode 100644
index 0000000..d201787
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ibrdtnd
+#
+################################################################################
+
+IBRDTND_VERSION = 1.0.1
+IBRDTND_SOURCE = ibrdtnd-$(IBRDTND_VERSION).tar.gz
+IBRDTND_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRDTND_INSTALL_STAGING = YES
+IBRDTND_LICENSE = Apache-2.0
+IBRDTND_LICENSE_FILES = COPYING
+IBRDTND_CONF_OPTS =   --with-curl  --with-sqlite     --with-tls  
+IBRDTND_DEPENDENCIES = ibrdtn libdaemon libcurl sqlite openssl 
+
+# While the configuration system uses autoconf, the Makefiles are
+# hand-written and do not use automake. Therefore, we have to hack
+# around their deficiencies by passing installation paths.
+IBRDTND_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRDTND_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install
+
+
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ibrdtn

Hello Tom,

I think it's better if you send separate patches for each new package you want to add, along with a good subject such as "new package: <pkg name>" or something similar.

Also you are not adding a new entry to package/Config.in in order to make your new packages able to be selected in the menu.

Quoted 1 line · Tom Sparks

+IBRCOMMON_CONF_OPTS = --with-openssl --with-lowpan --with-xml

To many spaces between "--with-lowpan" and "--with-xml".

package/ibrcommon/ibrcommon.mk line 28

Quoted 10 lines
package/ibrcommon/ibrcommon.mk new file +10 -0
+IBRCOMMON_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRCOMMON_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install

I wouldn't try to align the back-slashes. Just a space and then the back-slash.

package/ibrdtn/ibrdtn.mk line 28

Quoted 10 lines
package/ibrdtn/ibrdtn.mk new file +10 -0
+IBRDTN_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRDTN_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install

Same here.

package/ibrdtnd/Config.in line 23

Quoted 6 lines
package/ibrdtnd/Config.in new file +6 -0
+if BR2_PACKAGE_IBRDTND
+
+source "package/ibrcommon/Config.in"
+source "package/ibrdtn/Config.in"
+
+endif

What are you trying to do with this? Making "ibrdtn" the only package selectable from menuconfig, and when you select it show the other two in the menu as well?

Quoted 1 line

+IBRDTND_CONF_OPTS = --with-curl --with-sqlite --with-tls

More unnecessary spaces.

package/ibrdtnd/ibrdtnd.mk line 28

Quoted 10 lines
package/ibrdtnd/ibrdtnd.mk new file +10 -0
+IBRDTND_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRDTND_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install

No alignment, IMHO.

Regards,

Vincent.

#2 lore raw

PATCH 1/1 ibrdtn

In reply to Tom Sparks

Dear Tom Sparks,

Thanks for this contribution. Vicente already made a review with some comments, I'll add some more comments in this review.

Quoted 8 lines · Tom Sparks
---
 package/ibrcommon/Config.in    | 13 +++++++++++++
 package/ibrcommon/ibrcommon.mk | 32 ++++++++++++++++++++++++++++++++
 package/ibrdtn/Config.in       | 13 +++++++++++++
 package/ibrdtn/ibrdtn.mk       | 32 ++++++++++++++++++++++++++++++++
 package/ibrdtnd/Config.in      | 23 +++++++++++++++++++++++
 package/ibrdtnd/ibrdtnd.mk     | 32 ++++++++++++++++++++++++++++++++

As Vincente said, each package should be added in a separate patch. Each patch should have a title like this:

<package>: new package

so, your series should have three patches:

ibrcommon: new package
ibrdtn: new package
ibrdtnd: new package

And indeed each patch should add the package in package/Config.in to make it visible in menuconfig.

Quoted 9 lines
package/ibrcommon/Config.in new file +3 -0
new file mode 100644
index 0000000..c1d400b
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_IBRCOMMON
+	bool "ibrcommon"
+	depends on BR2_INSTALL_LIBSTDCPP

package/ibrcommon/Config.in line 13

Quoted 10 lines
package/ibrcommon/Config.in new file +10 -0
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_LIBXML2
+	help
+	  IBR-DTN is a small dtn application that supports:
+	  Bundle Protocol RFC 5050
+	  Bundle Security Protocol RFC 6257
+
+	  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn

Please read the Buildroot manual about adding a comment mentioning the toolchain dependencies, especially "17.2.4. Dependencies on target and toolchain options".

Quoted 6 lines
package/ibrcommon/ibrcommon.mk new file +0 -0
new file mode 100644
index 0000000..3a67307

package/ibrcommon/ibrcommon.mk line 8

Quoted 8 lines
package/ibrcommon/ibrcommon.mk new file +8 -0
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ibrcommon
+#
+################################################################################
+
+IBRCOMMON_VERSION = 1.0.1
+IBRCOMMON_SOURCE = ibrcommon-$(IBRCOMMON_VERSION).tar.gz

Not needed, since it is the default value.

Quoted 13 lines
package/ibrcommon/ibrcommon.mk new file +13 -0
+IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRCOMMON_INSTALL_STAGING = YES
+IBRCOMMON_LICENSE = Apache-2.0
+IBRCOMMON_LICENSE_FILES = COPYING
+IBRCOMMON_CONF_OPTS = --with-openssl --with-lowpan   --with-xml 
+IBRCOMMON_DEPENDENCIES = openssl libnl libxml2
+
+# While the configuration system uses autoconf, the Makefiles are
+# hand-written and do not use automake. Therefore, we have to hack
+# around their deficiencies by passing installation paths.
+IBRCOMMON_INSTALL_STAGING_OPTS = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\

package/ibrcommon/ibrcommon.mk line 31

Quoted 10 lines
package/ibrcommon/ibrcommon.mk new file +10 -0
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install
+
+IBRCOMMON_INSTALL_TARGET_OPTS = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install
+
+
+

Too many unneeded empty lines.

Quoted 10 lines
package/ibrcommon/ibrcommon.mk new file +1 -0
+$(eval $(autotools-package))
package/ibrdtn/Config.in new file +3 -0
new file mode 100644
index 0000000..9da2b54
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_IBRDTN
+	bool "ibrdtn"
+	depends on BR2_INSTALL_LIBSTDCPP

package/ibrdtn/Config.in line 13

Quoted 10 lines
package/ibrdtn/Config.in new file +10 -0
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_IBRCOMMON
+	help
+	  IBR-DTN is a small dtn application that supports:
+	  Bundle Protocol RFC 5050
+	  Bundle Security Protocol RFC 6257
+
+	  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn
+
+

Too many unneeded new lines. Also, you're missing the Config.in comment about toolchain dependencies.

Quoted 6 lines
package/ibrdtn/ibrdtn.mk new file +0 -0
new file mode 100644
index 0000000..744bd2f

package/ibrdtn/ibrdtn.mk line 8

Quoted 8 lines
package/ibrdtn/ibrdtn.mk new file +8 -0
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ibrdtn
+#
+################################################################################
+
+IBRDTN_VERSION = 1.0.1
+IBRDTN_SOURCE = ibrdtn-$(IBRDTN_VERSION).tar.gz

Unneeded, this is the default.

Same comments for the rest of the patch. Other than those basic comments, it seems good.

Did you check if your packages work on noMMU platforms? For example, if they use fork(), they will not work on noMMU platforms, and so you need to add a BR2_USE_MMU dependency.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com