* [Buildroot] [PATCH 1/3] knock: new package
@ 2013-09-01 21:33 Michael Rommel
2013-09-01 21:33 ` [Buildroot] [PATCH 2/3] aiccu: " Michael Rommel
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Michael Rommel @ 2013-09-01 21:33 UTC (permalink / raw)
To: buildroot
A port knocking implementation with daemon and user application.
Signed-off-by: Michael Rommel <rommel@layer-7.net>
---
package/Config.in | 1 +
package/knock/Config.in | 13 +++++++++++++
package/knock/knock.mk | 13 +++++++++++++
3 files changed, 27 insertions(+)
create mode 100644 package/knock/Config.in
create mode 100644 package/knock/knock.mk
diff --git a/package/Config.in b/package/Config.in
index 6306947..fd98da0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -763,6 +763,7 @@ source "package/ipset/Config.in"
source "package/iptables/Config.in"
source "package/iw/Config.in"
source "package/kismet/Config.in"
+source "package/knock/Config.in"
source "package/lighttpd/Config.in"
source "package/linknx/Config.in"
source "package/links/Config.in"
diff --git a/package/knock/Config.in b/package/knock/Config.in
new file mode 100644
index 0000000..8d80274
--- /dev/null
+++ b/package/knock/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_KNOCK
+ bool "knock"
+ select BR2_PACKAGE_LIBPCAP
+ help
+ A port knocking implementation.
+ Provides a daemon and a user application. Port knocking can be
+ used to run an arbitrary application, once the daemon detects
+ a predefined sequence of incoming TCP/UDP packets on a network
+ interface. This can be used, e.g. to open up ports in a
+ firewall.
+
+ http://www.zeroflux.org/projects/knock
+
diff --git a/package/knock/knock.mk b/package/knock/knock.mk
new file mode 100644
index 0000000..85dfe62
--- /dev/null
+++ b/package/knock/knock.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# knock
+#
+################################################################################
+
+KNOCK_VERSION = 7666f2e86e
+KNOCK_SITE = https://github.com/jvinet/knock/tarball/master
+KNOCK_LICENSE = GPLv2+
+KNOCK_LICENSE_FILES = COPYING
+KNOCK_AUTORECONF = YES
+
+$(eval $(autotools-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 2/3] aiccu: new package 2013-09-01 21:33 [Buildroot] [PATCH 1/3] knock: new package Michael Rommel @ 2013-09-01 21:33 ` Michael Rommel 2013-09-02 8:28 ` Thomas De Schampheleire 2013-09-02 8:57 ` Thomas Petazzoni 2013-09-01 21:33 ` [Buildroot] [PATCH 3/3] python-pyzmq: " Michael Rommel ` (2 subsequent siblings) 3 siblings, 2 replies; 16+ messages in thread From: Michael Rommel @ 2013-09-01 21:33 UTC (permalink / raw) To: buildroot Automatic IPv6 Connectivity Configuration Utility for users of a IPv6 tunnel broker, developed by sixxs.net Signed-off-by: Michael Rommel <rommel@layer-7.net> --- package/Config.in | 1 + package/aiccu/Config.in | 24 +++++ .../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++ package/aiccu/aiccu.mk | 25 +++++ 4 files changed, 154 insertions(+) create mode 100644 package/aiccu/Config.in create mode 100644 package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch create mode 100644 package/aiccu/aiccu.mk diff --git a/package/Config.in b/package/Config.in index fd98da0..ed7a509 100644 --- a/package/Config.in +++ b/package/Config.in @@ -714,6 +714,7 @@ source "package/sound-theme-freedesktop/Config.in" endmenu menu "Networking applications" +source "package/aiccu/Config.in" source "package/aircrack-ng/Config.in" source "package/argus/Config.in" source "package/arptables/Config.in" diff --git a/package/aiccu/Config.in b/package/aiccu/Config.in new file mode 100644 index 0000000..008ada7 --- /dev/null +++ b/package/aiccu/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_AICCU + bool "aiccu" + depends on BR2_INET_IPV6 + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GNUTLS + help + SixXS Automatic IPv6 Connectivity Client Utility + + AICCU (Automatic IPv6 Connectivity Client Utility) makes it + easy for users to get IPv6 connectivity. After having + requested an account, tunnel and optionally a subnet, AICCU + can be used to automatically configure the tunnel. AICCU + supports TIC (Tunnel Information & Control protocol), which it + uses for retrieving the tunnel configuration information, + AYIYA, which allows tunnels to be created even behind + firewalls and NAT's. + + http://www.sixxs.net/tools/aiccu/ + +comment "aiccu requires a toolchain with IPv6 support" + depends on !BR2_INET_IPV6 + +comment "aiccu requires a toolchain with WCHAR support" + depends on !BR2_USE_WCHAR diff --git a/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch b/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch new file mode 100644 index 0000000..d316f8f --- /dev/null +++ b/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch @@ -0,0 +1,104 @@ +aiccu.h, common.c, common.h: fixes for deprecated GNUTLS functions and types +resolver.c: fixes for selection of wrong resolver function under uclibc + +Signed-off-by: Michael Rommel <rommel@layer-7.net> + +diff -purN aiccu_20070115.orig/common/aiccu.h aiccu_20070115/common/aiccu.h +--- aiccu_20070115.orig/common/aiccu.h 2007-01-15 13:01:43.000000000 +0100 ++++ aiccu_20070115/common/aiccu.h 2013-08-31 23:50:53.651936146 +0200 +@@ -111,7 +111,7 @@ struct AICCU_conf + #endif + + #ifdef AICCU_GNUTLS +- gnutls_certificate_credentials tls_cred; /* GNUTLS credentials */ ++ gnutls_certificate_credentials_t tls_cred; /* GNUTLS credentials */ + #endif + + bool daemonize; /* Daemonize? */ +diff -purN aiccu_20070115.orig/common/common.c aiccu_20070115/common/common.c +--- aiccu_20070115.orig/common/common.c 2006-12-21 15:08:50.000000000 +0100 ++++ aiccu_20070115/common/common.c 2013-09-01 01:21:36.031396740 +0200 +@@ -271,9 +271,8 @@ TLSSOCKET sock_alloc(void); + TLSSOCKET sock_alloc(void) + { + #ifdef AICCU_GNUTLS +- /* Allow connections to servers that have OpenPGP keys as well */ +- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; + int ret; ++ const char *err; + #endif /* AICCU_GNUTLS*/ + + TLSSOCKET sock; +@@ -297,11 +296,16 @@ TLSSOCKET sock_alloc(void) + } + + /* Use default priorities */ +- gnutls_set_default_priority(sock->session); +- /* XXX: Return value is not documented in GNUTLS documentation! */ +- +- gnutls_certificate_type_set_priority(sock->session, cert_type_priority); +- /* XXX: Return value is not documented in GNUTLS documentation! */ ++ ret = gnutls_priority_set_direct(sock->session, "NORMAL", &err); ++ if (ret < 0) ++ { ++ if (ret == GNUTLS_E_INVALID_REQUEST) ++ { ++ dolog( LOG_ERR, "TLS set priority failed, syntax error at: %s\n", err); ++ } ++ free(sock); ++ return NULL; ++ } + + /* Configure the x509 credentials for the current session */ + gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, g_aiccu->tls_cred); +@@ -474,7 +478,7 @@ bool sock_gotls(TLSSOCKET sock) + } + + /* Set the transport */ +- gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr)sock->socket); ++ gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) sock->socket); + + /* Perform the TLS handshake */ + ret = gnutls_handshake(sock->session); +diff -purN aiccu_20070115.orig/common/common.h aiccu_20070115/common/common.h +--- aiccu_20070115.orig/common/common.h 2007-01-11 15:50:51.000000000 +0100 ++++ aiccu_20070115/common/common.h 2013-08-31 23:26:13.683659455 +0200 +@@ -381,7 +381,7 @@ struct tlssocket + SOCKET socket; + #ifdef AICCU_GNUTLS + bool tls_active; /* TLS active? */ +- gnutls_session session; /* The GnuTLS sesision */ ++ gnutls_session_t session; /* The GnuTLS sesision */ + #endif + }; + +diff -purN aiccu_20070115.orig/common/resolver.c aiccu_20070115/common/resolver.c +--- aiccu_20070115.orig/common/resolver.c 2006-07-23 16:55:14.000000000 +0200 ++++ aiccu_20070115/common/resolver.c 2013-08-31 23:44:31.574866862 +0200 +@@ -26,7 +26,7 @@ + + int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record)) + { +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + struct __res_state res; + #endif + unsigned char answer[8192]; +@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype + uint16_t type = 0, class = 0; + uint32_t ttl = 0; + +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + memset(&res, 0, sizeof(res)); + res.options = RES_DEBUG; + res_ninit(&res); +@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype + #endif + + memset(answer, 0, sizeof(answer)); +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer)); + #else + ret = res_query(label, C_IN, rrtype, answer, sizeof(answer)); diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk new file mode 100644 index 0000000..da3cc3b --- /dev/null +++ b/package/aiccu/aiccu.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# aiccu +# +################################################################################ + +AICCU_VERSION = 20070115 +AICCU_SOURCE = aiccu_$(AICCU_VERSION).tar.gz +AICCU_SITE = http://www.sixxs.net/archive/sixxs/aiccu/unix/ +AICCU_LICENSE = SixXS License, concise redistribution license +AICCU_LICENSE_FILES = doc/LICENSE +AICCU_DEPENDENCIES = gnutls + +define AICCU_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all +endef + +define AICCU_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu $(TARGET_DIR)/usr/sbin + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf $(TARGET_DIR)/etc + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ + $(TARGET_DIR)/usr/sbin/S90aiccu +endef + +$(eval $(generic-package)) -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/3] aiccu: new package 2013-09-01 21:33 ` [Buildroot] [PATCH 2/3] aiccu: " Michael Rommel @ 2013-09-02 8:28 ` Thomas De Schampheleire 2013-09-02 8:57 ` Thomas Petazzoni 1 sibling, 0 replies; 16+ messages in thread From: Thomas De Schampheleire @ 2013-09-02 8:28 UTC (permalink / raw) To: buildroot On Sun, Sep 1, 2013 at 11:33 PM, Michael Rommel <rommel@layer-7.net> wrote: > Automatic IPv6 Connectivity Configuration Utility for users of a > IPv6 tunnel broker, developed by sixxs.net > > Signed-off-by: Michael Rommel <rommel@layer-7.net> > --- > package/Config.in | 1 + > package/aiccu/Config.in | 24 +++++ > .../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++ > package/aiccu/aiccu.mk | 25 +++++ > 4 files changed, 154 insertions(+) > create mode 100644 package/aiccu/Config.in > create mode 100644 package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch > create mode 100644 package/aiccu/aiccu.mk > > diff --git a/package/Config.in b/package/Config.in > index fd98da0..ed7a509 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -714,6 +714,7 @@ source "package/sound-theme-freedesktop/Config.in" > endmenu > > menu "Networking applications" > +source "package/aiccu/Config.in" > source "package/aircrack-ng/Config.in" > source "package/argus/Config.in" > source "package/arptables/Config.in" > diff --git a/package/aiccu/Config.in b/package/aiccu/Config.in > new file mode 100644 > index 0000000..008ada7 > --- /dev/null > +++ b/package/aiccu/Config.in > @@ -0,0 +1,24 @@ > +config BR2_PACKAGE_AICCU > + bool "aiccu" > + depends on BR2_INET_IPV6 > + depends on BR2_USE_WCHAR > + select BR2_PACKAGE_GNUTLS > + help > + SixXS Automatic IPv6 Connectivity Client Utility > + > + AICCU (Automatic IPv6 Connectivity Client Utility) makes it > + easy for users to get IPv6 connectivity. After having > + requested an account, tunnel and optionally a subnet, AICCU > + can be used to automatically configure the tunnel. AICCU > + supports TIC (Tunnel Information & Control protocol), which it > + uses for retrieving the tunnel configuration information, > + AYIYA, which allows tunnels to be created even behind > + firewalls and NAT's. > + > + http://www.sixxs.net/tools/aiccu/ > + > +comment "aiccu requires a toolchain with IPv6 support" > + depends on !BR2_INET_IPV6 > + > +comment "aiccu requires a toolchain with WCHAR support" > + depends on !BR2_USE_WCHAR > diff --git a/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch b/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch > new file mode 100644 > index 0000000..d316f8f > --- /dev/null > +++ b/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch > @@ -0,0 +1,104 @@ > +aiccu.h, common.c, common.h: fixes for deprecated GNUTLS functions and types > +resolver.c: fixes for selection of wrong resolver function under uclibc > + > +Signed-off-by: Michael Rommel <rommel@layer-7.net> > + > +diff -purN aiccu_20070115.orig/common/aiccu.h aiccu_20070115/common/aiccu.h > +--- aiccu_20070115.orig/common/aiccu.h 2007-01-15 13:01:43.000000000 +0100 > ++++ aiccu_20070115/common/aiccu.h 2013-08-31 23:50:53.651936146 +0200 > +@@ -111,7 +111,7 @@ struct AICCU_conf > + #endif > + > + #ifdef AICCU_GNUTLS > +- gnutls_certificate_credentials tls_cred; /* GNUTLS credentials */ > ++ gnutls_certificate_credentials_t tls_cred; /* GNUTLS credentials */ > + #endif > + > + bool daemonize; /* Daemonize? */ > +diff -purN aiccu_20070115.orig/common/common.c aiccu_20070115/common/common.c > +--- aiccu_20070115.orig/common/common.c 2006-12-21 15:08:50.000000000 +0100 > ++++ aiccu_20070115/common/common.c 2013-09-01 01:21:36.031396740 +0200 > +@@ -271,9 +271,8 @@ TLSSOCKET sock_alloc(void); > + TLSSOCKET sock_alloc(void) > + { > + #ifdef AICCU_GNUTLS > +- /* Allow connections to servers that have OpenPGP keys as well */ > +- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; > + int ret; > ++ const char *err; > + #endif /* AICCU_GNUTLS*/ > + > + TLSSOCKET sock; > +@@ -297,11 +296,16 @@ TLSSOCKET sock_alloc(void) > + } > + > + /* Use default priorities */ > +- gnutls_set_default_priority(sock->session); > +- /* XXX: Return value is not documented in GNUTLS documentation! */ > +- > +- gnutls_certificate_type_set_priority(sock->session, cert_type_priority); > +- /* XXX: Return value is not documented in GNUTLS documentation! */ > ++ ret = gnutls_priority_set_direct(sock->session, "NORMAL", &err); > ++ if (ret < 0) > ++ { > ++ if (ret == GNUTLS_E_INVALID_REQUEST) > ++ { > ++ dolog( LOG_ERR, "TLS set priority failed, syntax error at: %s\n", err); > ++ } > ++ free(sock); > ++ return NULL; > ++ } > + > + /* Configure the x509 credentials for the current session */ > + gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, g_aiccu->tls_cred); > +@@ -474,7 +478,7 @@ bool sock_gotls(TLSSOCKET sock) > + } > + > + /* Set the transport */ > +- gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr)sock->socket); > ++ gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) sock->socket); > + > + /* Perform the TLS handshake */ > + ret = gnutls_handshake(sock->session); > +diff -purN aiccu_20070115.orig/common/common.h aiccu_20070115/common/common.h > +--- aiccu_20070115.orig/common/common.h 2007-01-11 15:50:51.000000000 +0100 > ++++ aiccu_20070115/common/common.h 2013-08-31 23:26:13.683659455 +0200 > +@@ -381,7 +381,7 @@ struct tlssocket > + SOCKET socket; > + #ifdef AICCU_GNUTLS > + bool tls_active; /* TLS active? */ > +- gnutls_session session; /* The GnuTLS sesision */ > ++ gnutls_session_t session; /* The GnuTLS sesision */ > + #endif > + }; > + > +diff -purN aiccu_20070115.orig/common/resolver.c aiccu_20070115/common/resolver.c > +--- aiccu_20070115.orig/common/resolver.c 2006-07-23 16:55:14.000000000 +0200 > ++++ aiccu_20070115/common/resolver.c 2013-08-31 23:44:31.574866862 +0200 > +@@ -26,7 +26,7 @@ > + > + int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record)) > + { > +-#ifdef _LINUX > ++#if defined(_LINUX) && !defined(__UCLIBC__) > + struct __res_state res; > + #endif > + unsigned char answer[8192]; > +@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype > + uint16_t type = 0, class = 0; > + uint32_t ttl = 0; > + > +-#ifdef _LINUX > ++#if defined(_LINUX) && !defined(__UCLIBC__) > + memset(&res, 0, sizeof(res)); > + res.options = RES_DEBUG; > + res_ninit(&res); > +@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype > + #endif > + > + memset(answer, 0, sizeof(answer)); > +-#ifdef _LINUX > ++#if defined(_LINUX) && !defined(__UCLIBC__) > + ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer)); > + #else > + ret = res_query(label, C_IN, rrtype, answer, sizeof(answer)); > diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk > new file mode 100644 > index 0000000..da3cc3b > --- /dev/null > +++ b/package/aiccu/aiccu.mk > @@ -0,0 +1,25 @@ > +################################################################################ > +# > +# aiccu > +# > +################################################################################ > + > +AICCU_VERSION = 20070115 > +AICCU_SOURCE = aiccu_$(AICCU_VERSION).tar.gz > +AICCU_SITE = http://www.sixxs.net/archive/sixxs/aiccu/unix/ > +AICCU_LICENSE = SixXS License, concise redistribution license > +AICCU_LICENSE_FILES = doc/LICENSE > +AICCU_DEPENDENCIES = gnutls > + > +define AICCU_BUILD_CMDS > + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all > +endef > + > +define AICCU_INSTALL_TARGET_CMDS > + $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu $(TARGET_DIR)/usr/sbin > + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf $(TARGET_DIR)/etc > + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ > + $(TARGET_DIR)/usr/sbin/S90aiccu > +endef I'll ask the same question here: is there a specific reason why the standard 'install' recipe is not suitable? Best regards, Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/3] aiccu: new package 2013-09-01 21:33 ` [Buildroot] [PATCH 2/3] aiccu: " Michael Rommel 2013-09-02 8:28 ` Thomas De Schampheleire @ 2013-09-02 8:57 ` Thomas Petazzoni 2013-09-02 23:49 ` Michael Rommel 1 sibling, 1 reply; 16+ messages in thread From: Thomas Petazzoni @ 2013-09-02 8:57 UTC (permalink / raw) To: buildroot Dear Michael Rommel, Thanks a lot for your continuous effort with those patches. I now see that you managed to use 'git rebase -i' and generate a very nice patch series! On Sun, 1 Sep 2013 23:33:35 +0200, Michael Rommel wrote: > diff --git a/package/aiccu/Config.in b/package/aiccu/Config.in > new file mode 100644 > index 0000000..008ada7 > --- /dev/null > +++ b/package/aiccu/Config.in > @@ -0,0 +1,24 @@ > +config BR2_PACKAGE_AICCU > + bool "aiccu" > + depends on BR2_INET_IPV6 > + depends on BR2_USE_WCHAR > + select BR2_PACKAGE_GNUTLS > + help > + SixXS Automatic IPv6 Connectivity Client Utility > + > + AICCU (Automatic IPv6 Connectivity Client Utility) makes it > + easy for users to get IPv6 connectivity. After having > + requested an account, tunnel and optionally a subnet, AICCU > + can be used to automatically configure the tunnel. AICCU > + supports TIC (Tunnel Information & Control protocol), which it > + uses for retrieving the tunnel configuration information, > + AYIYA, which allows tunnels to be created even behind > + firewalls and NAT's. > + > + http://www.sixxs.net/tools/aiccu/ > + > +comment "aiccu requires a toolchain with IPv6 support" > + depends on !BR2_INET_IPV6 > + > +comment "aiccu requires a toolchain with WCHAR support" > + depends on !BR2_USE_WCHAR We generally have only one comment for both. See examples in other packages. > diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk > new file mode 100644 > index 0000000..da3cc3b > --- /dev/null > +++ b/package/aiccu/aiccu.mk > @@ -0,0 +1,25 @@ > +################################################################################ > +# > +# aiccu > +# > +################################################################################ > + > +AICCU_VERSION = 20070115 > +AICCU_SOURCE = aiccu_$(AICCU_VERSION).tar.gz > +AICCU_SITE = http://www.sixxs.net/archive/sixxs/aiccu/unix/ > +AICCU_LICENSE = SixXS License, concise redistribution license > +AICCU_LICENSE_FILES = doc/LICENSE > +AICCU_DEPENDENCIES = gnutls > + > +define AICCU_BUILD_CMDS > + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all You could use: $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all TARGET_CONFIGURE_OPTS contains the definitions of CC, LD, CFLAGS, LDFLAGS, and more. > +define AICCU_INSTALL_TARGET_CMDS > + $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu $(TARGET_DIR)/usr/sbin > + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf $(TARGET_DIR)/etc > + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ > + $(TARGET_DIR)/usr/sbin/S90aiccu > +endef Either use 'make install' as Thomas suggested, or if it's really not possible, you need to make the second argument the complete filename, not only the destination directory. Moreover, the init script must be installed in /etc/init.d, not in /usr/sbin. And finally, it should not be installed manually, but instead should use the INIT_SYSV mechanism. See the Buildroot manual, which states: LIBFOO_INSTALL_INIT_SYSV and LIBFOO_INSTALL_INIT_SYSTEMD list the actions to install init scripts either for the systemV-like init systems (busybox, sysvinit, etc.) or for the systemd units. These commands will be run only when the relevant init system is installed (i.e. if systemd is selected as the init system in the configuration, only LIBFOO_INSTALL_INIT_SYSTEMD will be run). Thanks! Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/3] aiccu: new package 2013-09-02 8:57 ` Thomas Petazzoni @ 2013-09-02 23:49 ` Michael Rommel 0 siblings, 0 replies; 16+ messages in thread From: Michael Rommel @ 2013-09-02 23:49 UTC (permalink / raw) To: buildroot Dear all, On Sep 2, 2013, at 10:57 , Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: >> +AICCU_LICENSE_FILES = doc/LICENSE >> +AICCU_DEPENDENCIES = gnutls >> + >> +define AICCU_BUILD_CMDS >> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all > > You could use: > > $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all > > TARGET_CONFIGURE_OPTS contains the definitions of CC, LD, CFLAGS, > LDFLAGS, and more. I tried this, but it aborted with a lot of errors. I couldn't find the description for this in the manual - where should I look about these variables, it seems there are a lot more, e.g. $(SED) that might be handy... >> +define AICCU_INSTALL_TARGET_CMDS >> + $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu $(TARGET_DIR)/usr/sbin >> + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf $(TARGET_DIR)/etc >> + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ >> + $(TARGET_DIR)/usr/sbin/S90aiccu >> +endef > > Either use 'make install' as Thomas suggested, or if it's really not > possible, you need to make the second argument the complete filename, > not only the destination directory. I have now changed that in the latest submission. But I am not sure it is an improvement. I had to patch the Makefile, so that the correct, working version of the init script gets installed and had to manually correct the permissions in the .mk file. All in all, that makes the whole patch a lot larger. > Moreover, the init script must be installed in /etc/init.d, not > in /usr/sbin. Yes, of course, my mistake! > And finally, it should not be installed manually, but > instead should use the INIT_SYSV mechanism. See the Buildroot manual, > which states: > > LIBFOO_INSTALL_INIT_SYSV and LIBFOO_INSTALL_INIT_SYSTEMD list the > actions to install init scripts either for the systemV-like init > systems (busybox, sysvinit, etc.) or for the systemd units. These > commands will be run only when the relevant init system is installed > (i.e. if systemd is selected as the init system in the configuration, > only LIBFOO_INSTALL_INIT_SYSTEMD will be run). Actually I do not understand this well enough and the manual is not very explicit. Now, either I shall use the "make install" approach, then I get what the makefile does, which is "aiccu" in "/etc/init.d". Or I can do it explicitly, which would then be more like: +define AICCU_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ + $(TARGET_DIR)/etc/init.d/S90aiccu +endef The Makefile does not support any other sensible targets, than all and install. So I might be back to the original approach (of course with the wrong dir corrected). I'll send the submission and you can have a look what it looks like now, after I incorporated your suggestions! Thanks, Michael. -- Michael Rommel, Erlangen, Germany ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/3] python-pyzmq: new package 2013-09-01 21:33 [Buildroot] [PATCH 1/3] knock: new package Michael Rommel 2013-09-01 21:33 ` [Buildroot] [PATCH 2/3] aiccu: " Michael Rommel @ 2013-09-01 21:33 ` Michael Rommel 2013-09-02 8:24 ` Thomas De Schampheleire 2013-09-08 12:07 ` [Buildroot] [PATCH 1/3] knock: " Thomas De Schampheleire 2013-09-08 12:08 ` Thomas De Schampheleire 3 siblings, 1 reply; 16+ messages in thread From: Michael Rommel @ 2013-09-01 21:33 UTC (permalink / raw) To: buildroot The python language bindings for ZeroMQ. Signed-off-by: Michael Rommel <rommel@layer-7.net> --- package/Config.in | 1 + package/python-pyzmq/Config.in | 31 ++++++++++++++ ...e-buildroot-zmq-version-instead-of-detect.patch | 43 ++++++++++++++++++++ package/python-pyzmq/python-pyzmq.mk | 43 ++++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 package/python-pyzmq/Config.in create mode 100644 package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch create mode 100644 package/python-pyzmq/python-pyzmq.mk diff --git a/package/Config.in b/package/Config.in index ed7a509..d5e3b52 100644 --- a/package/Config.in +++ b/package/Config.in @@ -371,6 +371,7 @@ source "package/python-protobuf/Config.in" source "package/python-pygame/Config.in" source "package/python-pyparsing/Config.in" source "package/python-pyro/Config.in" +source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" source "package/python-thrift/Config.in" diff --git a/package/python-pyzmq/Config.in b/package/python-pyzmq/Config.in new file mode 100644 index 0000000..350f995 --- /dev/null +++ b/package/python-pyzmq/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_PYTHON_PYZMQ + bool "pyzmq" + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_INET_IPV6 # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_LARGEFILE # zeromq + depends on BR2_USE_WCHAR # zeromq + select BR2_PACKAGE_ZEROMQ + select BR2_PACKAGE_PYTHON_HASHLIB + help + This package contains the python language binding for zeromq. + Due to issues with cross-compiling this package is hardcoded + to the ZeroMQ version of this buildroot; the ZeroMQ version + must be at least v3.2.2 + + http://zeromq.org/bindings:python + +comment "pyzmq requires a toolchain with C++ support enabled" + depends on !BR2_INSTALL_LIBSTDCPP + +comment "pyzmq requires a toolchain with IPv6 support" + depends on !BR2_INET_IPV6 + +comment "pyzmq requires a toolchain with thread support" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "pyzmq requires a toolchain with LARGEFILE support" + depends on !BR2_LARGEFILE + +comment "pyzmq requires a toolchain with WCHAR support" + depends on !BR2_USE_WCHAR diff --git a/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch b/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch new file mode 100644 index 0000000..75a72c4 --- /dev/null +++ b/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch @@ -0,0 +1,43 @@ +detect.py: fix the ZMQ version check to the ZMQ version of the buildroot + +The setup.py script tries to compile a test C program and runs it, to +retrieve a version string for the installed ZMQ library, but if the cross +compiler links it together, the result cannot be run on the host, due to +different architectures and libraries. + +And if the host compiler would compile/link it, it would not link with the +library version inside buildroot but with the library from the host, possibly returning a wrong version number. + +Instead of trying to run the compiled test program to get the version +dynamically, return the version of the buildroot environment. + +Signed-off-by: Michael Rommel <rommel@layer-7.net> + +--- pyzmq-13.0.2/buildutils/detect.py.orig 2013-08-10 00:49:28.242557978 +0200 ++++ pyzmq-13.0.2/buildutils/detect.py 2013-08-10 00:44:35.197572704 +0200 +@@ -118,15 +118,17 @@ def detect_zmq(basedir, compiler=None, * + + efile = test_compilation(cfile, compiler=compiler, **compiler_attrs) + +- result = Popen(efile, stdout=PIPE, stderr=PIPE) +- so, se = result.communicate() ++ # result = Popen(efile, stdout=PIPE, stderr=PIPE) ++ # so, se = result.communicate() + # for py3k: +- so = so.decode() +- se = se.decode() +- if result.returncode: +- msg = "Error running version detection script:\n%s\n%s" % (so,se) +- logging.error(msg) +- raise IOError(msg) ++ #so = so.decode() ++ #se = se.decode() ++ #if result.returncode: ++ # msg = "Error running version detection script:\n%s\n%s" % (so,se) ++ # logging.error(msg) ++ # raise IOError(msg) ++ ++ so = "vers: ##ZEROMQ_VERSION##" + + handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))} + diff --git a/package/python-pyzmq/python-pyzmq.mk b/package/python-pyzmq/python-pyzmq.mk new file mode 100644 index 0000000..9061f84 --- /dev/null +++ b/package/python-pyzmq/python-pyzmq.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# pyzmq +# +################################################################################ + +PYTHON_PYZMQ_VERSION = 13.1.0 +PYTHON_PYZMQ_SOURCE = pyzmq-$(PYTHON_PYZMQ_VERSION).tar.gz +PYTHON_PYZMQ_SITE = https://pypi.python.org/packages/source/p/pyzmq/ +PYTHON_PYZMQ_LICENSE = LGPLv3+ BSD-3c Apache License Version 2.0 +# Apache license only online: http://www.apache.org/licenses/LICENSE-2.0 +PYTHON_PYZMQ_LICENSE_FILES = COPYING.LESSER COPYING.BSD +PYTHON_PYZMQ_DEPENDENCIES = zeromq python + +define PYTHON_PYZMQ_POST_PATCH_FIXUP + $(SED) 's/##ZEROMQ_VERSION##/$(ZEROMQ_VERSION)/' \ + $(@D)/buildutils/detect.py +endef + +PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_POST_PATCH_FIXUP + +PYTHON_PYZMQ_PARAMS = CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CC) -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +define PYTHON_PYZMQ_CONFIGURE_CMDS + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ + $(HOST_DIR)/usr/bin/python setup.py configure \ + --zmq=$(STAGING_DIR)/usr) +endef + +define PYTHON_PYZMQ_INSTALL_TARGET_CMDS + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/3] python-pyzmq: new package 2013-09-01 21:33 ` [Buildroot] [PATCH 3/3] python-pyzmq: " Michael Rommel @ 2013-09-02 8:24 ` Thomas De Schampheleire 2013-09-02 15:55 ` Arnout Vandecappelle 0 siblings, 1 reply; 16+ messages in thread From: Thomas De Schampheleire @ 2013-09-02 8:24 UTC (permalink / raw) To: buildroot Op 1-sep.-2013 23:35 schreef "Michael Rommel" <rommel@layer-7.net> het volgende: > > The python language bindings for ZeroMQ. > > Signed-off-by: Michael Rommel <rommel@layer-7.net> > --- > package/Config.in | 1 + > package/python-pyzmq/Config.in | 31 ++++++++++++++ > ...e-buildroot-zmq-version-instead-of-detect.patch | 43 ++++++++++++++++++++ > package/python-pyzmq/python-pyzmq.mk | 43 ++++++++++++++++++++ > 4 files changed, 118 insertions(+) > create mode 100644 package/python-pyzmq/Config.in > create mode 100644 package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch > create mode 100644 package/python-pyzmq/python-pyzmq.mk > > diff --git a/package/Config.in b/package/Config.in > index ed7a509..d5e3b52 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -371,6 +371,7 @@ source "package/python-protobuf/Config.in" > source "package/python-pygame/Config.in" > source "package/python-pyparsing/Config.in" > source "package/python-pyro/Config.in" > +source "package/python-pyzmq/Config.in" > source "package/python-serial/Config.in" > source "package/python-setuptools/Config.in" > source "package/python-thrift/Config.in" > diff --git a/package/python-pyzmq/Config.in b/package/python-pyzmq/Config.in > new file mode 100644 > index 0000000..350f995 > --- /dev/null > +++ b/package/python-pyzmq/Config.in > @@ -0,0 +1,31 @@ > +config BR2_PACKAGE_PYTHON_PYZMQ > + bool "pyzmq" > + depends on BR2_INSTALL_LIBSTDCPP # zeromq > + depends on BR2_INET_IPV6 # zeromq > + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq > + depends on BR2_LARGEFILE # zeromq > + depends on BR2_USE_WCHAR # zeromq > + select BR2_PACKAGE_ZEROMQ > + select BR2_PACKAGE_PYTHON_HASHLIB > + help > + This package contains the python language binding for zeromq. > + Due to issues with cross-compiling this package is hardcoded > + to the ZeroMQ version of this buildroot; the ZeroMQ version > + must be at least v3.2.2 Is it relevant to mention this, since the zeromq version is not configurable in buildroot? > + > + http://zeromq.org/bindings:python > + > +comment "pyzmq requires a toolchain with C++ support enabled" > + depends on !BR2_INSTALL_LIBSTDCPP > + > +comment "pyzmq requires a toolchain with IPv6 support" > + depends on !BR2_INET_IPV6 > + > +comment "pyzmq requires a toolchain with thread support" > + depends on !BR2_TOOLCHAIN_HAS_THREADS > + > +comment "pyzmq requires a toolchain with LARGEFILE support" > + depends on !BR2_LARGEFILE > + > +comment "pyzmq requires a toolchain with WCHAR support" > + depends on !BR2_USE_WCHAR > diff --git a/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch b/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch > new file mode 100644 > index 0000000..75a72c4 > --- /dev/null > +++ b/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch > @@ -0,0 +1,43 @@ > +detect.py: fix the ZMQ version check to the ZMQ version of the buildroot > + > +The setup.py script tries to compile a test C program and runs it, to > +retrieve a version string for the installed ZMQ library, but if the cross > +compiler links it together, the result cannot be run on the host, due to > +different architectures and libraries. > + > +And if the host compiler would compile/link it, it would not link with the > +library version inside buildroot but with the library from the host, possibly returning a wrong version number. > + > +Instead of trying to run the compiled test program to get the version > +dynamically, return the version of the buildroot environment. > + > +Signed-off-by: Michael Rommel <rommel@layer-7.net> > + > +--- pyzmq-13.0.2/buildutils/detect.py.orig 2013-08-10 00:49:28.242557978 +0200 > ++++ pyzmq-13.0.2/buildutils/detect.py 2013-08-10 00:44:35.197572704 +0200 > +@@ -118,15 +118,17 @@ def detect_zmq(basedir, compiler=None, * > + > + efile = test_compilation(cfile, compiler=compiler, **compiler_attrs) > + > +- result = Popen(efile, stdout=PIPE, stderr=PIPE) > +- so, se = result.communicate() > ++ # result = Popen(efile, stdout=PIPE, stderr=PIPE) > ++ # so, se = result.communicate() > + # for py3k: > +- so = so.decode() > +- se = se.decode() > +- if result.returncode: > +- msg = "Error running version detection script:\n%s\n%s" % (so,se) > +- logging.error(msg) > +- raise IOError(msg) > ++ #so = so.decode() > ++ #se = se.decode() > ++ #if result.returncode: > ++ # msg = "Error running version detection script:\n%s\n%s" % (so,se) > ++ # logging.error(msg) > ++ # raise IOError(msg) > ++ > ++ so = "vers: ##ZEROMQ_VERSION##" > + > + handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))} > + > diff --git a/package/python-pyzmq/python-pyzmq.mk b/package/python-pyzmq/ python-pyzmq.mk > new file mode 100644 > index 0000000..9061f84 > --- /dev/null > +++ b/package/python-pyzmq/python-pyzmq.mk > @@ -0,0 +1,43 @@ > +################################################################################ > +# > +# pyzmq > +# > +################################################################################ > + > +PYTHON_PYZMQ_VERSION = 13.1.0 > +PYTHON_PYZMQ_SOURCE = pyzmq-$(PYTHON_PYZMQ_VERSION).tar.gz > +PYTHON_PYZMQ_SITE = https://pypi.python.org/packages/source/p/pyzmq/ > +PYTHON_PYZMQ_LICENSE = LGPLv3+ BSD-3c Apache License Version 2.0 > +# Apache license only online: http://www.apache.org/licenses/LICENSE-2.0 > +PYTHON_PYZMQ_LICENSE_FILES = COPYING.LESSER COPYING.BSD > +PYTHON_PYZMQ_DEPENDENCIES = zeromq python > + > +define PYTHON_PYZMQ_POST_PATCH_FIXUP We generally name hooks after what they do, like PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION for example, instead of such a generic name. If there are several distinct actions to take, multiple hooks are created. > + $(SED) 's/##ZEROMQ_VERSION##/$(ZEROMQ_VERSION)/' \ > + $(@D)/buildutils/detect.py > +endef > + > +PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_POST_PATCH_FIXUP > + > +PYTHON_PYZMQ_PARAMS = CC="$(TARGET_CC)" \ > + CFLAGS="$(TARGET_CFLAGS)" \ > + LDSHARED="$(TARGET_CC) -shared" \ > + CROSS_COMPILING=yes \ > + _python_sysroot=$(STAGING_DIR) \ > + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ $(PYTHON_DIR) should work fine here. > + _python_prefix=/usr \ > + _python_exec_prefix=/usr > + > +define PYTHON_PYZMQ_CONFIGURE_CMDS > + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ > + $(HOST_DIR)/usr/bin/python setup.py configure \ > + --zmq=$(STAGING_DIR)/usr) > +endef > + > +define PYTHON_PYZMQ_INSTALL_TARGET_CMDS > + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ > + $(HOST_DIR)/usr/bin/python setup.py install \ > + --prefix=$(TARGET_DIR)/usr) > +endef Since you're using $(HOST_DIR)/usr/bin/python here, there is a dependency on host-python which is not explicitly expressed. Since python itself already depends on host-python (see package/python/python.mk), the dependency is implicitly satisfied. I check and there are some python packages that do explicitly depend on host-python, while others do not. It seems there is no clear strategy for this yet. Ideally, these things should be lined up. My view would be to add the explicit dependency, if the .mk file explicitly references the host python binary, but this may not be the view of others. > + > +$(eval $(generic-package)) > -- > 1.7.9.5 Best regards, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130902/9354919b/attachment-0001.html> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/3] python-pyzmq: new package 2013-09-02 8:24 ` Thomas De Schampheleire @ 2013-09-02 15:55 ` Arnout Vandecappelle 2013-09-03 18:04 ` Michael Rommel 0 siblings, 1 reply; 16+ messages in thread From: Arnout Vandecappelle @ 2013-09-02 15:55 UTC (permalink / raw) To: buildroot On 09/02/13 10:24, Thomas De Schampheleire wrote: [snip] > > +define PYTHON_PYZMQ_INSTALL_TARGET_CMDS > > + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ > > + $(HOST_DIR)/usr/bin/python setup.py install \ > > + --prefix=$(TARGET_DIR)/usr) > > +endef > > Since you're using $(HOST_DIR)/usr/bin/python here, there is a dependency > on host-python which is not explicitly expressed. Since python itself > already depends on host-python (see package/python/python.mk > <http://python.mk>), the dependency is implicitly satisfied. > I check and there are some python packages that do explicitly depend on > host-python, while others do not. It seems there is no clear strategy for > this yet. Ideally, these things should be lined up. My view would be to > add the explicit dependency, if the .mk file explicitly references the > host python binary, but this may not be the view of others. I agree that dependencies that are specific to the package itself should be explicit, even if they are also implicit. Not just for things explicitly mentioned in the .mk file, but also e.g. for packages that are checked for in the configure script. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/3] python-pyzmq: new package 2013-09-02 15:55 ` Arnout Vandecappelle @ 2013-09-03 18:04 ` Michael Rommel 2013-09-03 21:30 ` Arnout Vandecappelle 0 siblings, 1 reply; 16+ messages in thread From: Michael Rommel @ 2013-09-03 18:04 UTC (permalink / raw) To: buildroot On Sep 2, 2013, at 17:55 , Arnout Vandecappelle <arnout@mind.be> wrote: > On 09/02/13 10:24, Thomas De Schampheleire wrote: Hi Arnout and Thomas, I incorporated all your suggestions here and some additional changes I saw myself: - added host-python dependency - removed mentioning of minimum zeromq version needed - combined comments for dependencies on IPv6 and WCHAR - fixed naming of the patch hook - used $(PYTHON_DIR) - although for the heck of me I could not find out, where this is defined :-( - changed depends on PYTHON from select (actually, I got it wrong, using the select gave the cyclic dependency :-() - named the package, bool and filenames consistently python-pyzmq Patch will come in some minutes. Cheers, Michael. -- Michael Rommel, Erlangen, Germany ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/3] python-pyzmq: new package 2013-09-03 18:04 ` Michael Rommel @ 2013-09-03 21:30 ` Arnout Vandecappelle 0 siblings, 0 replies; 16+ messages in thread From: Arnout Vandecappelle @ 2013-09-03 21:30 UTC (permalink / raw) To: buildroot On 09/03/13 20:04, Michael Rommel wrote: > On Sep 2, 2013, at 17:55 , Arnout Vandecappelle <arnout@mind.be> wrote: >> On 09/02/13 10:24, Thomas De Schampheleire wrote: > > Hi Arnout and Thomas, > > I incorporated all your suggestions here and some additional changes I saw myself: > - added host-python dependency > - removed mentioning of minimum zeromq version needed > - combined comments for dependencies on IPv6 and WCHAR > - fixed naming of the patch hook > - used $(PYTHON_DIR) - although for the heck of me I could not find out, where this is defined :-( This variable is defined as part of the $(pkg-generic) infrastructure. You can use 'make printvars | grep ^PYTHON_DIR=' to get the expansion. Hm, looks like this feature isn't mentioned in the manual... Regards, Arnout > - changed depends on PYTHON from select (actually, I got it wrong, using the select gave the cyclic dependency :-() > - named the package, bool and filenames consistently python-pyzmq > > Patch will come in some minutes. > > Cheers, > > Michael. > -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/3] knock: new package 2013-09-01 21:33 [Buildroot] [PATCH 1/3] knock: new package Michael Rommel 2013-09-01 21:33 ` [Buildroot] [PATCH 2/3] aiccu: " Michael Rommel 2013-09-01 21:33 ` [Buildroot] [PATCH 3/3] python-pyzmq: " Michael Rommel @ 2013-09-08 12:07 ` Thomas De Schampheleire 2013-09-08 12:08 ` Thomas De Schampheleire 3 siblings, 0 replies; 16+ messages in thread From: Thomas De Schampheleire @ 2013-09-08 12:07 UTC (permalink / raw) To: buildroot Hi Michael, On Sun, Sep 1, 2013 at 11:33 PM, Michael Rommel <rommel@layer-7.net> wrote: > A port knocking implementation with daemon and user application. > > Signed-off-by: Michael Rommel <rommel@layer-7.net> > --- > package/Config.in | 1 + > package/knock/Config.in | 13 +++++++++++++ > package/knock/knock.mk | 13 +++++++++++++ > 3 files changed, 27 insertions(+) > create mode 100644 package/knock/Config.in > create mode 100644 package/knock/knock.mk > > diff --git a/package/Config.in b/package/Config.in > index 6306947..fd98da0 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -763,6 +763,7 @@ source "package/ipset/Config.in" > source "package/iptables/Config.in" > source "package/iw/Config.in" > source "package/kismet/Config.in" > +source "package/knock/Config.in" > source "package/lighttpd/Config.in" > source "package/linknx/Config.in" > source "package/links/Config.in" > diff --git a/package/knock/Config.in b/package/knock/Config.in > new file mode 100644 > index 0000000..8d80274 > --- /dev/null > +++ b/package/knock/Config.in > @@ -0,0 +1,13 @@ > +config BR2_PACKAGE_KNOCK > + bool "knock" > + select BR2_PACKAGE_LIBPCAP > + help > + A port knocking implementation. > + Provides a daemon and a user application. Port knocking can be > + used to run an arbitrary application, once the daemon detects > + a predefined sequence of incoming TCP/UDP packets on a network > + interface. This can be used, e.g. to open up ports in a > + firewall. > + > + http://www.zeroflux.org/projects/knock > + > diff --git a/package/knock/knock.mk b/package/knock/knock.mk > new file mode 100644 > index 0000000..85dfe62 > --- /dev/null > +++ b/package/knock/knock.mk > @@ -0,0 +1,13 @@ > +################################################################################ > +# > +# knock > +# > +################################################################################ > + > +KNOCK_VERSION = 7666f2e86e > +KNOCK_SITE = https://github.com/jvinet/knock/tarball/master > +KNOCK_LICENSE = GPLv2+ > +KNOCK_LICENSE_FILES = COPYING > +KNOCK_AUTORECONF = YES > + > +$(eval $(autotools-package)) The Config.in file mentions a dependency on libpcap, but this is not properly expressed in the .mk file. You need: KNOCK_DEPENDENCIES = libpcap Without this, the compilation on a clean system fails. Best regards, Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/3] knock: new package 2013-09-01 21:33 [Buildroot] [PATCH 1/3] knock: new package Michael Rommel ` (2 preceding siblings ...) 2013-09-08 12:07 ` [Buildroot] [PATCH 1/3] knock: " Thomas De Schampheleire @ 2013-09-08 12:08 ` Thomas De Schampheleire [not found] ` <E9670545-EE12-445D-A15C-C0C3E4A4116A@layer-7.net> 3 siblings, 1 reply; 16+ messages in thread From: Thomas De Schampheleire @ 2013-09-08 12:08 UTC (permalink / raw) To: buildroot Hi Michael, On Sun, Sep 1, 2013 at 11:33 PM, Michael Rommel <rommel@layer-7.net> wrote: > A port knocking implementation with daemon and user application. > > Signed-off-by: Michael Rommel <rommel@layer-7.net> > --- > package/Config.in | 1 + > package/knock/Config.in | 13 +++++++++++++ > package/knock/knock.mk | 13 +++++++++++++ > 3 files changed, 27 insertions(+) > create mode 100644 package/knock/Config.in > create mode 100644 package/knock/knock.mk > > diff --git a/package/Config.in b/package/Config.in > index 6306947..fd98da0 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -763,6 +763,7 @@ source "package/ipset/Config.in" > source "package/iptables/Config.in" > source "package/iw/Config.in" > source "package/kismet/Config.in" > +source "package/knock/Config.in" > source "package/lighttpd/Config.in" > source "package/linknx/Config.in" > source "package/links/Config.in" > diff --git a/package/knock/Config.in b/package/knock/Config.in > new file mode 100644 > index 0000000..8d80274 > --- /dev/null > +++ b/package/knock/Config.in > @@ -0,0 +1,13 @@ > +config BR2_PACKAGE_KNOCK > + bool "knock" > + select BR2_PACKAGE_LIBPCAP > + help > + A port knocking implementation. > + Provides a daemon and a user application. Port knocking can be > + used to run an arbitrary application, once the daemon detects > + a predefined sequence of incoming TCP/UDP packets on a network > + interface. This can be used, e.g. to open up ports in a > + firewall. > + > + http://www.zeroflux.org/projects/knock > + > diff --git a/package/knock/knock.mk b/package/knock/knock.mk > new file mode 100644 > index 0000000..85dfe62 > --- /dev/null > +++ b/package/knock/knock.mk > @@ -0,0 +1,13 @@ > +################################################################################ > +# > +# knock > +# > +################################################################################ > + > +KNOCK_VERSION = 7666f2e86e > +KNOCK_SITE = https://github.com/jvinet/knock/tarball/master > +KNOCK_LICENSE = GPLv2+ > +KNOCK_LICENSE_FILES = COPYING > +KNOCK_AUTORECONF = YES > + > +$(eval $(autotools-package)) > -- The Config.in file mentions a dependency on libpcap, but this is not properly expressed in the .mk file. You need: KNOCK_DEPENDENCIES = libpcap Without this, the compilation on a clean system fails. Best regards, Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <E9670545-EE12-445D-A15C-C0C3E4A4116A@layer-7.net>]
* [Buildroot] [PATCH 1/3] knock: new package [not found] ` <E9670545-EE12-445D-A15C-C0C3E4A4116A@layer-7.net> @ 2013-09-08 14:09 ` Michael Rommel 2013-09-08 14:32 ` Thomas De Schampheleire 0 siblings, 1 reply; 16+ messages in thread From: Michael Rommel @ 2013-09-08 14:09 UTC (permalink / raw) To: buildroot Hi Thomas, I got it. I could reproduce the issue with the missing dependency in the .mk file and have set up a standard tree just for testing the build process. And with the new dependency in the .mk file, the build succeeds. After the test build my tree looks like this: rommel at pelican:/var/nfs/software/initrds/uclibc/buildroot-patchtest$ ls -la build/ total 108 drwxr-xr-x 24 rommel users 4096 Sep 8 16:04 . drwxr-xr-x 7 rommel users 4096 Sep 8 16:02 .. drwxr-xr-x 4 rommel users 4096 Sep 8 15:42 buildroot-config drwxr-xr-x 34 rommel users 4096 Sep 8 16:00 busybox-1.21.1 drwxr-xr-x 9 rommel users 4096 Sep 8 15:47 host-autoconf-2.69 drwxr-xr-x 7 rommel users 4096 Sep 8 15:47 host-automake-1.11.6 drwxr-xr-x 18 rommel users 4096 Sep 8 15:45 host-binutils-2.21.1 drwxr-xr-x 14 rommel users 4096 Sep 8 16:03 host-bison-2.7.1 drwxr-xr-x 9 rommel users 4096 Sep 8 16:04 host-fakeroot-1.18.2 drwxr-xr-x 10 rommel users 4096 Sep 8 16:03 host-flex-2.5.37 drwxr-xr-x 31 rommel users 4096 Sep 8 16:00 host-gcc-final-4.7.3 drwxr-xr-x 31 rommel users 4096 Sep 8 15:49 host-gcc-initial-4.7.3 drwxr-xr-x 31 rommel users 4096 Sep 8 15:57 host-gcc-intermediate-4.7.3 drwxr-xr-x 16 rommel users 4096 Sep 8 15:46 host-gmp-5.1.2 drwxr-xr-x 5 rommel users 4096 Sep 8 15:47 host-libtool-2.4.2 drwxr-xr-x 10 rommel users 4096 Sep 8 15:46 host-m4-1.4.16 drwxr-xr-x 2 rommel users 4096 Sep 8 16:04 host-makedevs-undefined drwxr-xr-x 7 rommel users 4096 Sep 8 15:47 host-mpc-1.0.1 drwxr-xr-x 9 rommel users 4096 Sep 8 15:46 host-mpfr-3.1.2 drwxr-xr-x 6 rommel users 4096 Sep 8 16:03 knock-7666f2e86e drwxr-xr-x 13 rommel users 12288 Sep 8 16:03 libpcap-1.4.0 drwxr-xr-x 23 rommel users 4096 Sep 8 15:55 linux-headers-3.11 -rw-r--r-- 1 rommel users 0 Sep 8 15:39 .root drwxr-xr-x 19 rommel users 4096 Sep 8 15:58 uclibc-0.9.33.2 -rw-r--r-- 1 rommel users 7 Sep 8 16:04 _users_table.txt drwxr-xr-x 14 rommel users 4096 Sep 8 16:02 zlib-1.2.8 I will submit the patch later again. Thanks, Michael. On Sep 8, 2013, at 15:00 , Michael Rommel <rommel@layer-7.net> wrote: > Hi Thomas, > > thanks - will fix this in the next iteration. Is there a description, how one can go ahead with discovering things like > this, i.e. an explanation of a "clean system"? I only have i586 infrastructure ready, so the error on the aiccu package > I could not have found (but I will try to follow your suggestions and see, what I can come up with), but I certainly > can set up a separate buildroot just for testing packages. I assume that a clean system is one, where I just get > a clone of the git, apply the patch and just select this package - am I right or do I have to consider something else? > > Thanks! > > Michael. > > > On Sep 8, 2013, at 14:08 , Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote: > >> Hi Michael, >> >>> +KNOCK_SITE = https://github.com/jvinet/knock/tarball/master >>> +KNOCK_LICENSE = GPLv2+ >>> +KNOCK_LICENSE_FILES = COPYING >>> +KNOCK_AUTORECONF = YES >>> + >>> +$(eval $(autotools-package)) >>> -- >> >> The Config.in file mentions a dependency on libpcap, but this is not >> properly expressed in the .mk file. >> You need: >> KNOCK_DEPENDENCIES = libpcap >> Without this, the compilation on a clean system fails. -- Michael Rommel, Erlangen, Germany ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/3] knock: new package 2013-09-08 14:09 ` Michael Rommel @ 2013-09-08 14:32 ` Thomas De Schampheleire 2013-09-10 20:58 ` Arnout Vandecappelle 0 siblings, 1 reply; 16+ messages in thread From: Thomas De Schampheleire @ 2013-09-08 14:32 UTC (permalink / raw) To: buildroot Hi Michael, On Sun, Sep 8, 2013 at 4:09 PM, Michael Rommel <rommel@layer-7.net> wrote: > > Hi Thomas, > > I got it. I could reproduce the issue with the missing dependency in the .mk file and have set up > a standard tree just for testing the build process. And with the new dependency in the .mk file, > the build succeeds. Great. To discover such mandatory dependencies, you can use the following idiom: make clean toolchain knock This will first clean the buildroot tree, build/install the toolchain, and then build only the knock package and its dependencies. We should probably add this to the documentation... Another tip: for these type of dependency problems, you could also use an external toolchain, like the Sourcery ones, to get much quicker results. With such external toolchains, it also becomes very easy to test some other architectures like powerpc, arm, ... Best regards, Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/3] knock: new package 2013-09-08 14:32 ` Thomas De Schampheleire @ 2013-09-10 20:58 ` Arnout Vandecappelle 2013-09-15 18:18 ` Thomas Petazzoni 0 siblings, 1 reply; 16+ messages in thread From: Arnout Vandecappelle @ 2013-09-10 20:58 UTC (permalink / raw) To: buildroot On 08/09/13 16:32, Thomas De Schampheleire wrote: > Another tip: for these type of dependency problems, you could also use > an external toolchain, like the Sourcery ones, to get much quicker > results. With such external toolchains, it also becomes very easy to > test some other architectures like powerpc, arm, ... And you can also use the toolchains used by the autobuilders, to test with uClibc-based toolchains. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/3] knock: new package 2013-09-10 20:58 ` Arnout Vandecappelle @ 2013-09-15 18:18 ` Thomas Petazzoni 0 siblings, 0 replies; 16+ messages in thread From: Thomas Petazzoni @ 2013-09-15 18:18 UTC (permalink / raw) To: buildroot Hello, On Tue, 10 Sep 2013 22:58:53 +0200, Arnout Vandecappelle wrote: > And you can also use the toolchains used by the autobuilders, to test > with uClibc-based toolchains. Correct. As a reminder, I put all the toolchain defconfigs tested by the autobuilders in http://autobuild.buildroot.org/toolchains/configs/free-electrons/. Some of them point to well-known external toolchains (Linaro, Sourcery CodeBench, Blackfin, etc.), and some other point to external toolchains that I have built specifically for the autobuilders, but the defconfig contains an URL that is available for everyone. Whenever I need to test some package, I often start with: wget -O .config http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-arm-basic.config which will create me a minimal .config file that points to a very simple uClibc toolchain. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2013-09-15 18:18 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-01 21:33 [Buildroot] [PATCH 1/3] knock: new package Michael Rommel
2013-09-01 21:33 ` [Buildroot] [PATCH 2/3] aiccu: " Michael Rommel
2013-09-02 8:28 ` Thomas De Schampheleire
2013-09-02 8:57 ` Thomas Petazzoni
2013-09-02 23:49 ` Michael Rommel
2013-09-01 21:33 ` [Buildroot] [PATCH 3/3] python-pyzmq: " Michael Rommel
2013-09-02 8:24 ` Thomas De Schampheleire
2013-09-02 15:55 ` Arnout Vandecappelle
2013-09-03 18:04 ` Michael Rommel
2013-09-03 21:30 ` Arnout Vandecappelle
2013-09-08 12:07 ` [Buildroot] [PATCH 1/3] knock: " Thomas De Schampheleire
2013-09-08 12:08 ` Thomas De Schampheleire
[not found] ` <E9670545-EE12-445D-A15C-C0C3E4A4116A@layer-7.net>
2013-09-08 14:09 ` Michael Rommel
2013-09-08 14:32 ` Thomas De Schampheleire
2013-09-10 20:58 ` Arnout Vandecappelle
2013-09-15 18:18 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox