* [Buildroot] [PATCH 1/1] aiccu: new package
@ 2013-09-05 21:56 Michael Rommel
2013-09-07 20:56 ` Thomas De Schampheleire
0 siblings, 1 reply; 17+ messages in thread
From: Michael Rommel @ 2013-09-05 21:56 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 | 21 ++++
.../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++
package/aiccu/aiccu.mk | 32 ++++++
4 files changed, 158 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 4e3469f..5e71e9a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -716,6 +716,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..1c6f554
--- /dev/null
+++ b/package/aiccu/Config.in
@@ -0,0 +1,21 @@
+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 and WCHAR support"
+ depends on !(BR2_INET_IPV6 && 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..05f4ba0
--- /dev/null
+++ b/package/aiccu/aiccu.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# 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/aiccu
+ [ -f $(TARGET_DIR)/etc/aiccu.conf ] || \
+ $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf \
+ $(TARGET_DIR)/etc/aiccu.conf
+endef
+
+define AICCU_INSTALL_INIT_SYSV
+ [ -f $(TARGET_DIR)/etc/init.d/S50aiccu ] || \
+ $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \
+ $(TARGET_DIR)/etc/init.d/S50aiccu
+endef
+
+$(eval $(generic-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-05 21:56 [Buildroot] [PATCH 1/1] aiccu: new package Michael Rommel
@ 2013-09-07 20:56 ` Thomas De Schampheleire
2013-09-08 11:39 ` Thomas De Schampheleire
[not found] ` <150C0AB5-B4C6-4379-9FEE-9819278AAF69@layer-7.net>
0 siblings, 2 replies; 17+ messages in thread
From: Thomas De Schampheleire @ 2013-09-07 20:56 UTC (permalink / raw)
To: buildroot
Op 5-sep.-2013 23:57 schreef "Michael Rommel" <rommel@layer-7.net> het
volgende:
>
> 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 | 21 ++++
> .../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104
++++++++++++++++++++
> package/aiccu/aiccu.mk | 32 ++++++
> 4 files changed, 158 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 4e3469f..5e71e9a 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -716,6 +716,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..1c6f554
> --- /dev/null
> +++ b/package/aiccu/Config.in
> @@ -0,0 +1,21 @@
> +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 and WCHAR support"
> + depends on !(BR2_INET_IPV6 && 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..05f4ba0
> --- /dev/null
> +++ b/package/aiccu/aiccu.mk
> @@ -0,0 +1,32 @@
>
+################################################################################
> +#
> +# 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/aiccu
> + [ -f $(TARGET_DIR)/etc/aiccu.conf ] || \
> + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf \
> + $(TARGET_DIR)/etc/aiccu.conf
> +endef
> +
> +define AICCU_INSTALL_INIT_SYSV
> + [ -f $(TARGET_DIR)/etc/init.d/S50aiccu ] || \
> + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \
> + $(TARGET_DIR)/etc/init.d/S50aiccu
> +endef
> +
> +$(eval $(generic-package))
> --
> 1.7.9.5
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130907/3735babf/attachment.html>
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-07 20:56 ` Thomas De Schampheleire
@ 2013-09-08 11:39 ` Thomas De Schampheleire
2013-09-11 6:07 ` Arnout Vandecappelle
[not found] ` <150C0AB5-B4C6-4379-9FEE-9819278AAF69@layer-7.net>
1 sibling, 1 reply; 17+ messages in thread
From: Thomas De Schampheleire @ 2013-09-08 11:39 UTC (permalink / raw)
To: buildroot
Hi Michael,
On Sat, Sep 7, 2013 at 10:56 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
>
> Op 5-sep.-2013 23:57 schreef "Michael Rommel" <rommel@layer-7.net> het
> volgende:
>
>
>>
>> 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 | 21 ++++
>> .../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104
>> ++++++++++++++++++++
>> package/aiccu/aiccu.mk | 32 ++++++
>> 4 files changed, 158 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 4e3469f..5e71e9a 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -716,6 +716,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..1c6f554
>> --- /dev/null
>> +++ b/package/aiccu/Config.in
>> @@ -0,0 +1,21 @@
>> +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 and WCHAR support"
>> + depends on !(BR2_INET_IPV6 && 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..05f4ba0
>> --- /dev/null
>> +++ b/package/aiccu/aiccu.mk
>> @@ -0,0 +1,32 @@
>>
>> +################################################################################
>> +#
>> +# 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/aiccu
>> + [ -f $(TARGET_DIR)/etc/aiccu.conf ] || \
>> + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf \
>> + $(TARGET_DIR)/etc/aiccu.conf
>> +endef
>> +
>> +define AICCU_INSTALL_INIT_SYSV
>> + [ -f $(TARGET_DIR)/etc/init.d/S50aiccu ] || \
>> + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \
>> + $(TARGET_DIR)/etc/init.d/S50aiccu
>> +endef
>> +
>> +$(eval $(generic-package))
>> --
>> 1.7.9.5
>
> Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
I tried compiling on a powerpc target, but this unfortunately failed:
strip aiccu
strip: Unable to recognise the format of the input file `aiccu'
make[2]: *** [aiccu] Error 1
make[2]: Leaving directory
`/home/tdescham/repo/contrib/buildroot-review/output/build/aiccu-20070115/unix-console'
The aiccu/unix-console/Makefile hardcodes the 'strip' command, but
this should be the cross-strip, provided by buildroot through
TARGET_STRIP. I think that aiccu should be patched to use STRIP, which
defaults to 'strip', and aiccu.mk in buildroot should then pass the
right STRIP command.
This patch could then also be upstreamed...
Best regards,
Thomas
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-08 11:39 ` Thomas De Schampheleire
@ 2013-09-11 6:07 ` Arnout Vandecappelle
0 siblings, 0 replies; 17+ messages in thread
From: Arnout Vandecappelle @ 2013-09-11 6:07 UTC (permalink / raw)
To: buildroot
On 08/09/13 13:39, Thomas De Schampheleire wrote:
> I tried compiling on a powerpc target, but this unfortunately failed:
>
> strip aiccu
> strip: Unable to recognise the format of the input file `aiccu'
> make[2]: *** [aiccu] Error 1
> make[2]: Leaving directory
> `/home/tdescham/repo/contrib/buildroot-review/output/build/aiccu-20070115/unix-console'
>
>
> The aiccu/unix-console/Makefile hardcodes the 'strip' command, but
> this should be the cross-strip, provided by buildroot through
> TARGET_STRIP. I think that aiccu should be patched to use STRIP, which
> defaults to 'strip', and aiccu.mk in buildroot should then pass the
> right STRIP command.
> This patch could then also be upstreamed...
Actually, it is better to remove the strip completely. We strip the
target directory in a final step, so that you still have unstripped
binaries in the build and staging directories. Most packages leave it up
to the distro to strip the binaries - which makes it possible to build
foo-dbg packages that have the debug symbols.
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] 17+ messages in thread
[parent not found: <150C0AB5-B4C6-4379-9FEE-9819278AAF69@layer-7.net>]
* [Buildroot] [PATCH 1/1] aiccu: new package
@ 2013-09-08 21:58 Michael Rommel
2013-09-11 18:34 ` Michael Rommel
0 siblings, 1 reply; 17+ messages in thread
From: Michael Rommel @ 2013-09-08 21:58 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 | 21 ++++
.../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++
.../aiccu/aiccu-0002-makefile-target-strip.patch | 23 +++++
package/aiccu/aiccu.mk | 32 ++++++
5 files changed, 181 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-0002-makefile-target-strip.patch
create mode 100644 package/aiccu/aiccu.mk
diff --git a/package/Config.in b/package/Config.in
index 7a0ef68..c1e5da0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -716,6 +716,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..1c6f554
--- /dev/null
+++ b/package/aiccu/Config.in
@@ -0,0 +1,21 @@
+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 and WCHAR support"
+ depends on !(BR2_INET_IPV6 && 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-0002-makefile-target-strip.patch b/package/aiccu/aiccu-0002-makefile-target-strip.patch
new file mode 100644
index 0000000..49183e4
--- /dev/null
+++ b/package/aiccu/aiccu-0002-makefile-target-strip.patch
@@ -0,0 +1,23 @@
+Makefile: exchanged the hardcoded strip command with a variable based one
+
+Signed-off-by: Michael Rommel <rommel@layer-7.net>
+
+--- aiccu_20070115.orig/unix-console/Makefile 2007-01-15 12:04:27.000000000 +0100
++++ aiccu_20070115/unix-console/Makefile 2013-09-08 17:00:33.004727305 +0200
+@@ -28,6 +28,7 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar
+ CFLAGS += $(CWARNS) -D_GNU_SOURCE
+ CC = @gcc
+ RM = rm
++STRIP = strip
+
+ # Add -O3 when nothing is specified yet
+ ifeq ($(shell echo $(CFLAGS) | grep -c "\-O"),0)
+@@ -147,7 +148,7 @@ aiccu: $(OBJS) ${SRCS} ${INCS}
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+ ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0)
+ ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1)
+- strip $@
++ $(STRIP) $@
+ endif
+ endif
+
diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk
new file mode 100644
index 0000000..c9862c1
--- /dev/null
+++ b/package/aiccu/aiccu.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# 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)" STRIP="$(TARGET_STRIP)" -C $(@D) all
+endef
+
+define AICCU_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu \
+ $(TARGET_DIR)/usr/sbin/aiccu
+ [ -f $(TARGET_DIR)/etc/aiccu.conf ] || \
+ $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf \
+ $(TARGET_DIR)/etc/aiccu.conf
+endef
+
+define AICCU_INSTALL_INIT_SYSV
+ [ -f $(TARGET_DIR)/etc/init.d/S50aiccu ] || \
+ $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \
+ $(TARGET_DIR)/etc/init.d/S50aiccu
+endef
+
+$(eval $(generic-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-08 21:58 Michael Rommel
@ 2013-09-11 18:34 ` Michael Rommel
2013-09-11 19:52 ` Thomas De Schampheleire
2013-09-11 21:22 ` Arnout Vandecappelle
0 siblings, 2 replies; 17+ messages in thread
From: Michael Rommel @ 2013-09-11 18:34 UTC (permalink / raw)
To: buildroot
Dear Thomas,
On Sep 11, 2013, at 8:07 , Arnout Vandecappelle <arnout@mind.be> wrote:
> On 08/09/13 13:39, Thomas De Schampheleire wrote:
>> I tried compiling on a powerpc target, but this unfortunately failed:
>>
>> strip aiccu
>> strip: Unable to recognise the format of the input file `aiccu'
>> make[2]: *** [aiccu] Error 1
>> make[2]: Leaving directory
>> `/home/tdescham/repo/contrib/buildroot-review/output/build/aiccu-20070115/unix-console'
>>
>>
>> The aiccu/unix-console/Makefile hardcodes the 'strip' command, but
>> this should be the cross-strip, provided by buildroot through
>> TARGET_STRIP. I think that aiccu should be patched to use STRIP, which
>> defaults to 'strip', and aiccu.mk in buildroot should then pass the
>> right STRIP command.
>> This patch could then also be upstreamed...
>
> Actually, it is better to remove the strip completely. We strip the target directory in a final step, so that you still have unstripped binaries in the build and staging directories. Most packages leave it up to the distro to strip the binaries - which makes it possible to build foo-dbg packages that have the debug symbols.
>
> Regards,
> Arnout
Since the mailinglist was down, Arnouts comment came in after I submitted the
latest version of the patch (I will add numbering in the future).
He proposes to make the patch leave off the strip command completely.
Since I think no upstream patches will be made, it is a matter of your
guidance.
@Thomas: If you too think it shall be left off, I'll send a new version.
I can follow the argument of having a debug version around in the build
tree.
Let me know and you'll get a new version (which will be v5, if I counted correctly).
@Arnout: you made comment regarding use of the toolchains from the
autobuilders. I do not fully understand what you mean, do you refer to these:
http://autobuild.buildroot.net/toolchains/configs/free-electrons/
configurations and suggest, that I set up some of these cross compilers to
test packages I submit first, if they work under these configs? Which would be
the most important ones - I do not have so much space to accomodate them
all, so if I must focus on 3-5, which should I take?
Thanks,
Michael.
--
Michael Rommel, Erlangen, Germany
On Sep 8, 2013, at 23:58 , 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>
> ---
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-11 18:34 ` Michael Rommel
@ 2013-09-11 19:52 ` Thomas De Schampheleire
2013-09-11 21:22 ` Arnout Vandecappelle
1 sibling, 0 replies; 17+ messages in thread
From: Thomas De Schampheleire @ 2013-09-11 19:52 UTC (permalink / raw)
To: buildroot
Hi Michael,
Op 11-sep.-2013 20:35 schreef "Michael Rommel" <rommel@layer-7.net> het
volgende:
>
> Dear Thomas,
>
> On Sep 11, 2013, at 8:07 , Arnout Vandecappelle <arnout@mind.be> wrote:
>
> > On 08/09/13 13:39, Thomas De Schampheleire wrote:
> >> I tried compiling on a powerpc target, but this unfortunately failed:
> >>
> >> strip aiccu
> >> strip: Unable to recognise the format of the input file `aiccu'
> >> make[2]: *** [aiccu] Error 1
> >> make[2]: Leaving directory
> >>
`/home/tdescham/repo/contrib/buildroot-review/output/build/aiccu-20070115/unix-console'
> >>
> >>
> >> The aiccu/unix-console/Makefile hardcodes the 'strip' command, but
> >> this should be the cross-strip, provided by buildroot through
> >> TARGET_STRIP. I think that aiccu should be patched to use STRIP, which
> >> defaults to 'strip', and aiccu.mk in buildroot should then pass the
> >> right STRIP command.
> >> This patch could then also be upstreamed...
> >
> > Actually, it is better to remove the strip completely. We strip the
target directory in a final step, so that you still have unstripped
binaries in the build and staging directories. Most packages leave it up to
the distro to strip the binaries - which makes it possible to build foo-dbg
packages that have the debug symbols.
> >
> > Regards,
> > Arnout
>
>
> Since the mailinglist was down, Arnouts comment came in after I submitted
the
> latest version of the patch (I will add numbering in the future).
>
> He proposes to make the patch leave off the strip command completely.
> Since I think no upstream patches will be made, it is a matter of your
> guidance.
>
> @Thomas: If you too think it shall be left off, I'll send a new version.
> I can follow the argument of having a debug version around in the build
> tree.
>
> Let me know and you'll get a new version (which will be v5, if I counted
correctly).
>
Yes, I think Arnout has a good point so I would follow his advice.
Best regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130911/51c35343/attachment-0001.html>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-11 18:34 ` Michael Rommel
2013-09-11 19:52 ` Thomas De Schampheleire
@ 2013-09-11 21:22 ` Arnout Vandecappelle
1 sibling, 0 replies; 17+ messages in thread
From: Arnout Vandecappelle @ 2013-09-11 21:22 UTC (permalink / raw)
To: buildroot
On 11/09/13 20:34, Michael Rommel wrote:
> @Arnout: you made comment regarding use of the toolchains from the
> autobuilders. I do not fully understand what you mean, do you refer to these:
> http://autobuild.buildroot.net/toolchains/configs/free-electrons/
> configurations and suggest, that I set up some of these cross compilers to
> test packages I submit first, if they work under these configs? Which would be
> the most important ones - I do not have so much space to accomodate them
> all, so if I must focus on 3-5, which should I take?
I actually mean e.g.
http://autobuild.buildroot.org/toolchains/tarballs/br-powerpc-e500mc-full-2013.05-1.tar.bz2
- it has IPv6 and largefile, nothing else.
One uClibc build is probably sufficient. If something else is wrong it
will come out of the autobuilders.
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] 17+ messages in thread
* [Buildroot] [PATCH 1/1] aiccu: new package
@ 2013-09-02 23:49 Michael Rommel
2013-09-04 16:38 ` Arnout Vandecappelle
0 siblings, 1 reply; 17+ messages in thread
From: Michael Rommel @ 2013-09-02 23:49 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 | 21 ++++
.../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++
.../aiccu-0002-install-correct-init-script.patch | 17 ++++
package/aiccu/aiccu.mk | 26 +++++
5 files changed, 169 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-0002-install-correct-init-script.patch
create mode 100644 package/aiccu/aiccu.mk
diff --git a/package/Config.in b/package/Config.in
index 1be41bb..d5e3b52 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -715,6 +715,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..1c6f554
--- /dev/null
+++ b/package/aiccu/Config.in
@@ -0,0 +1,21 @@
+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 and WCHAR support"
+ depends on !(BR2_INET_IPV6 && 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-0002-install-correct-init-script.patch b/package/aiccu/aiccu-0002-install-correct-init-script.patch
new file mode 100644
index 0000000..15e9268
--- /dev/null
+++ b/package/aiccu/aiccu-0002-install-correct-init-script.patch
@@ -0,0 +1,17 @@
+Makefile: remove hardcoded .debian part from install command, debian
+ version does not work under buildroot
+
+Signed-off-by: Michael Rommel <rommel@layer-7.net>
+
+diff -purN aiccu_20070115.orig/Makefile aiccu_20070115/Makefile
+--- aiccu_20070115.orig/Makefile 2007-01-11 01:29:33.000000000 +0100
++++ aiccu_20070115/Makefile 2013-09-03 00:47:06.153662575 +0200
+@@ -86,7 +86,7 @@ ifeq ($(shell echo "A${RPM_BUILD_ROOT}")
+ @cp doc/HOWTO ${DESTDIR}${dirdoc}
+ @echo "Installing Debian-style init.d"
+ @mkdir -p ${DESTDIR}${diretc}init.d
+- @cp doc/${PROJECT}.init.debian ${DESTDIR}${diretc}init.d/${PROJECT}
++ @cp doc/${PROJECT}.init ${DESTDIR}${diretc}init.d/${PROJECT}
+ else
+ @echo "Installing Redhat-style init.d"
+ @mkdir -p ${DESTDIR}${diretc}init.d
diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk
new file mode 100644
index 0000000..0eb605b
--- /dev/null
+++ b/package/aiccu/aiccu.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# 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
+ $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define AICCU_PERMISSIONS
+ /etc/init.d/aiccu f 4755 0 0 - - - - -
+endef
+
+$(eval $(generic-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-02 23:49 Michael Rommel
@ 2013-09-04 16:38 ` Arnout Vandecappelle
2013-09-04 20:50 ` Michael Rommel
0 siblings, 1 reply; 17+ messages in thread
From: Arnout Vandecappelle @ 2013-09-04 16:38 UTC (permalink / raw)
To: buildroot
On 09/03/13 01:49, Michael Rommel 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 | 21 ++++
> .../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++
> .../aiccu-0002-install-correct-init-script.patch | 17 ++++
> package/aiccu/aiccu.mk | 26 +++++
> 5 files changed, 169 insertions(+)
> create mode 100644 package/aiccu/Config.in
> create mode 100644 package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch
Did you upstream this patch?
> create mode 100644 package/aiccu/aiccu-0002-install-correct-init-script.patch
[snip]
> diff --git a/package/aiccu/aiccu-0002-install-correct-init-script.patch b/package/aiccu/aiccu-0002-install-correct-init-script.patch
> new file mode 100644
> index 0000000..15e9268
> --- /dev/null
> +++ b/package/aiccu/aiccu-0002-install-correct-init-script.patch
> @@ -0,0 +1,17 @@
> +Makefile: remove hardcoded .debian part from install command, debian
> + version does not work under buildroot
> +
> +Signed-off-by: Michael Rommel <rommel@layer-7.net>
> +
> +diff -purN aiccu_20070115.orig/Makefile aiccu_20070115/Makefile
> +--- aiccu_20070115.orig/Makefile 2007-01-11 01:29:33.000000000 +0100
> ++++ aiccu_20070115/Makefile 2013-09-03 00:47:06.153662575 +0200
> +@@ -86,7 +86,7 @@ ifeq ($(shell echo "A${RPM_BUILD_ROOT}")
> + @cp doc/HOWTO ${DESTDIR}${dirdoc}
> + @echo "Installing Debian-style init.d"
> + @mkdir -p ${DESTDIR}${diretc}init.d
> +- @cp doc/${PROJECT}.init.debian ${DESTDIR}${diretc}init.d/${PROJECT}
> ++ @cp doc/${PROJECT}.init ${DESTDIR}${diretc}init.d/${PROJECT}
The init script should be called Sxxaiccu (replace xx by an appropriate
number). And you can do the required chmod here as well. Or better yet,
use 'install -D -m 0755' (which removes the need for mkdir as well).
However, I propose to instead install it manually from the .mk file
(using the _INSTALL_INIT_SYSV variable) and to remove the incorrect init
script in a post-install hook. Maybe there's even a target to install
just the interesting bits and skip the howto and init scripts?
> + else
> + @echo "Installing Redhat-style init.d"
> + @mkdir -p ${DESTDIR}${diretc}init.d
> diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk
> new file mode 100644
> index 0000000..0eb605b
> --- /dev/null
> +++ b/package/aiccu/aiccu.mk
> @@ -0,0 +1,26 @@
> +################################################################################
> +#
> +# aiccu
> +#
> +################################################################################
> +
> +AICCU_VERSION = 20070115
Ouch, that's old...
> +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
> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +endef
> +
> +define AICCU_PERMISSIONS
> + /etc/init.d/aiccu f 4755 0 0 - - - - -
Does it really have to be setuid? That is very weird for an init script.
Regards,
Arnout
> +endef
> +
> +$(eval $(generic-package))
>
--
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] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-04 16:38 ` Arnout Vandecappelle
@ 2013-09-04 20:50 ` Michael Rommel
2013-09-05 8:13 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Michael Rommel @ 2013-09-04 20:50 UTC (permalink / raw)
To: buildroot
Hi Arnout,
On Sep 4, 2013, at 18:38 , Arnout Vandecappelle <arnout@mind.be> wrote:
> On 09/03/13 01:49, Michael Rommel 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 | 21 ++++
>> .../aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch | 104 ++++++++++++++++++++
>> .../aiccu-0002-install-correct-init-script.patch | 17 ++++
>> package/aiccu/aiccu.mk | 26 +++++
>> 5 files changed, 169 insertions(+)
>> create mode 100644 package/aiccu/Config.in
>> create mode 100644 package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch
>
> Did you upstream this patch?
yes, I have submitted the patch and the info about submission for inclusion into buildroot
upstream to info at sixxs.net but have not received an answer (yet).
>> create mode 100644 package/aiccu/aiccu-0002-install-correct-init-script.patch
> [snip]
>> diff --git a/package/aiccu/aiccu-0002-install-correct-init-script.patch b/package/aiccu/aiccu-0002-install-correct-init-script.patch
>> new file mode 100644
>> index 0000000..15e9268
>> --- /dev/null
>> +++ b/package/aiccu/aiccu-0002-install-correct-init-script.patch
>> @@ -0,0 +1,17 @@
>> +Makefile: remove hardcoded .debian part from install command, debian
>> + version does not work under buildroot
>> +
>> +Signed-off-by: Michael Rommel <rommel@layer-7.net>
>> +
>> +diff -purN aiccu_20070115.orig/Makefile aiccu_20070115/Makefile
>> +--- aiccu_20070115.orig/Makefile 2007-01-11 01:29:33.000000000 +0100
>> ++++ aiccu_20070115/Makefile 2013-09-03 00:47:06.153662575 +0200
>> +@@ -86,7 +86,7 @@ ifeq ($(shell echo "A${RPM_BUILD_ROOT}")
>> + @cp doc/HOWTO ${DESTDIR}${dirdoc}
>> + @echo "Installing Debian-style init.d"
>> + @mkdir -p ${DESTDIR}${diretc}init.d
>> +- @cp doc/${PROJECT}.init.debian ${DESTDIR}${diretc}init.d/${PROJECT}
>> ++ @cp doc/${PROJECT}.init ${DESTDIR}${diretc}init.d/${PROJECT}
>
> The init script should be called Sxxaiccu (replace xx by an appropriate number). And you can do the required chmod here as well. Or better yet, use 'install -D -m 0755' (which removes the need for mkdir as well).
>
> However, I propose to instead install it manually from the .mk file (using the _INSTALL_INIT_SYSV variable) and to remove the incorrect init script in a post-install hook. Maybe there's even a target to install just the interesting bits and skip the howto and init scripts?
>
Regarding the installation there are three versions on the table:
1. Using the recommended default way:
+define AICCU_INSTALL_TARGET_CMDS
+ $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
This needs then the Makefile patch and I certainly can patch more buildroot related things into it,
like renaming and permissions.
2. Using only the sub-level Makefile unix-console, which has a target "install", that
only installs the aiccu binary. That would be clean and easy but we would be missing
the template for the configuration (which I always find helpful)
3. Skipping the patch for the Makefile altogether and using a better version of my first
attempt:
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
endef
define AICCU_INSTALL_INIT_SYSV
[ -f $(TARGET_DIR)/etc/init.d/S60aiccu ] || \
$(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \
$(TARGET_DIR)/etc/init.d/S60aiccu
endef
Is there a recommendation about the Snn numbering of the init.d scripts? I have not found it in the manual.
It should run after all internet connectivity has been established and the time has been synchronized.
>> +
>> +AICCU_VERSION = 20070115
>
> Ouch, that's old...
Yes... but it works without any problems for me since I got my first tunnel in 2005.
>> +
>> +define AICCU_PERMISSIONS
>> + /etc/init.d/aiccu f 4755 0 0 - - - - -
>
> Does it really have to be setuid? That is very weird for an init script.
I got the permission setting wrong, it should be only 755, the 4 was a cut&paste error from the Buildroot Documentation, I will correct that, my mistake!
Thanks for your patience with me!
Michael.
--
Michael Rommel, Erlangen, Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130904/a067637d/attachment.html>
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-04 20:50 ` Michael Rommel
@ 2013-09-05 8:13 ` Thomas Petazzoni
2013-09-05 22:03 ` Michael Rommel
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-09-05 8:13 UTC (permalink / raw)
To: buildroot
Dear Michael Rommel,
On Wed, 4 Sep 2013 22:50:42 +0200, Michael Rommel wrote:
> Regarding the installation there are three versions on the table:
>
> 1. Using the recommended default way:
>
> +define AICCU_INSTALL_TARGET_CMDS
> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +endef
>
> This needs then the Makefile patch and I certainly can patch more buildroot related things into it,
> like renaming and permissions.
>
> 2. Using only the sub-level Makefile unix-console, which has a target "install", that
> only installs the aiccu binary. That would be clean and easy but we would be missing
> the template for the configuration (which I always find helpful)
>
> 3. Skipping the patch for the Makefile altogether and using a better version of my first
> attempt:
>
> 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
> endef
>
> define AICCU_INSTALL_INIT_SYSV
> [ -f $(TARGET_DIR)/etc/init.d/S60aiccu ] || \
> $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \
> $(TARGET_DIR)/etc/init.d/S60aiccu
> endef
Between (1) and (3) I believe it's mainly a matter of whether you think
your fixes to the Makefile can be integrated upstream into a new
release or not. If your Makefile changes can be integrated upstream and
a new release is made, we can update Buildroot to use this new release,
drop the patch, and everything is nice. On the other hand, if the
upstream is more or less dead (which the very old version number seems
to indicate), then the chances of having the patch accepted and a new
release published is rather small. In that case, doing a manual
AICCU_INSTALL_TARGET_CMDS and AICCU_INSTALL_INIT_SYSV is probably
better.
> Is there a recommendation about the Snn numbering of the init.d scripts? I have not found it in the manual.
> It should run after all internet connectivity has been established and the time has been synchronized.
Network is S40network. ntp is installed at S49ntp. So I guess something
>= 50 should be fine.
> >> +
> >> +define AICCU_PERMISSIONS
> >> + /etc/init.d/aiccu f 4755 0 0 - - - - -
> >
> > Does it really have to be setuid? That is very weird for an init script.
>
> I got the permission setting wrong, it should be only 755, the 4 was a cut&paste error from the Buildroot Documentation, I will correct that, my mistake!
You don't need to set explicit permissions if you use the
AICCU_INSTALL_INIT_SYSV method since you do an $(INSTALL) -m 0755.
Thanks a lot!
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] 17+ messages in thread
* [Buildroot] [PATCH 1/1] aiccu: new package
2013-09-05 8:13 ` Thomas Petazzoni
@ 2013-09-05 22:03 ` Michael Rommel
0 siblings, 0 replies; 17+ messages in thread
From: Michael Rommel @ 2013-09-05 22:03 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Sep 5, 2013, at 10:13 , Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> Between (1) and (3) I believe it's mainly a matter of whether you think
> your fixes to the Makefile can be integrated upstream into a new
> release or not. If your Makefile changes can be integrated upstream and
> a new release is made, we can update Buildroot to use this new release,
> drop the patch, and everything is nice. On the other hand, if the
> upstream is more or less dead (which the very old version number seems
> to indicate), then the chances of having the patch accepted and a new
> release published is rather small. In that case, doing a manual
> AICCU_INSTALL_TARGET_CMDS and AICCU_INSTALL_INIT_SYSV is probably
> better.
I opted for (3), I think the patch is cleaner now and since I have not heard
anything back from upstream, I guess they are reluctant to put any effort in
this tool.
> Network is S40network. ntp is installed at S49ntp. So I guess something
>> = 50 should be fine.
done.
> You don't need to set explicit permissions if you use the
> AICCU_INSTALL_INIT_SYSV method since you do an $(INSTALL) -m 0755.
done.
Cheers,
Michael.
--
Michael Rommel, Erlangen, Germany
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-09-11 21:22 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 21:56 [Buildroot] [PATCH 1/1] aiccu: new package Michael Rommel
2013-09-07 20:56 ` Thomas De Schampheleire
2013-09-08 11:39 ` Thomas De Schampheleire
2013-09-11 6:07 ` Arnout Vandecappelle
[not found] ` <150C0AB5-B4C6-4379-9FEE-9819278AAF69@layer-7.net>
[not found] ` <CAAXf6LWetaF-1wTWvhad-gKFc0CwLrqTKjgM_F9Seou+Pm=UWg@mail.gmail.com>
2013-09-08 15:28 ` Michael Rommel
2013-09-08 17:46 ` Thomas De Schampheleire
2013-09-08 18:28 ` Michael Rommel
2013-09-09 8:41 ` Thomas De Schampheleire
-- strict thread matches above, loose matches on Subject: below --
2013-09-08 21:58 Michael Rommel
2013-09-11 18:34 ` Michael Rommel
2013-09-11 19:52 ` Thomas De Schampheleire
2013-09-11 21:22 ` Arnout Vandecappelle
2013-09-02 23:49 Michael Rommel
2013-09-04 16:38 ` Arnout Vandecappelle
2013-09-04 20:50 ` Michael Rommel
2013-09-05 8:13 ` Thomas Petazzoni
2013-09-05 22:03 ` Michael Rommel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox