Skip to contentSkip to conversation

aiccu: new package

PATCH New Michael Rommel 3 participants 5 messages Sep 2, 2013 – Sep 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aiccu: new package

Automatic IPv6 Connectivity Configuration Utility for users of a IPv6 tunnel broker, developed by sixxs.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
package/Config.in +1 -0
index 1be41bb..d5e3b52 100644
@@ -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"
package/aiccu/Config.in new file +21 -0
new file mode 100644
index 0000000..1c6f554
@@ -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)
package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch new file +104 -0

104 lines not on this page · raw message

package/aiccu/aiccu-0002-install-correct-init-script.patch new file +17 -0
new file mode 100644
index 0000000..15e9268
@@ -0,0 +1,17 @@
+Makefile: remove hardcoded .debian part from install command, debian
+	  version does not work under buildroot
+
+Signed-off-by: Michael Rommel <[email protected]>
+
+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
package/aiccu/aiccu.mk new file +26 -0
new file mode 100644
index 0000000..0eb605b
@@ -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))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 aiccu: new package

Quoted 11 lines · Michael Rommel

Automatic IPv6 Connectivity Configuration Utility for users of a IPv6 tunnel broker, developed by sixxs.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(+)
Quoted 2 lines

create mode 100644 package/aiccu/Config.in
create mode 100644 package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch

Did you upstream this patch?

Quoted 1 line

create mode 100644 package/aiccu/aiccu-0002-install-correct-init-script.patch

[snip]

Quoted 10 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +4 -0
new file mode 100644
index 0000000..15e9268
@@ -0,0 +1,17 @@
+Makefile: remove hardcoded .debian part from install command, debian
+	  version does not work under buildroot
+
+Signed-off-by: Michael Rommel <[email protected]>

package/aiccu/aiccu-0002-install-correct-init-script.patch line 14

Quoted 10 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +10 -0
+
+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?

Quoted 9 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +3 -0
+ else
+ 	@echo "Installing Redhat-style init.d"
+ 	@mkdir -p ${DESTDIR}${diretc}init.d
package/aiccu/aiccu.mk new file +0 -0
new file mode 100644
index 0000000..0eb605b

package/aiccu/aiccu.mk line 7

Quoted 7 lines
package/aiccu/aiccu.mk new file +7 -0
@@ -0,0 +1,26 @@
+################################################################################
+#
+# aiccu
+#
+################################################################################
+
+AICCU_VERSION = 20070115

Ouch, that's old...

Quoted 6 lines
package/aiccu/aiccu.mk new file +6 -0
+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
+

package/aiccu/aiccu.mk line 23

Quoted 10 lines
package/aiccu/aiccu.mk new file +10 -0
+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

Quoted 4 lines
package/aiccu/aiccu.mk new file +3 -0
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
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
#2 lore raw

PATCH 1/1 aiccu: new package

Hi Arnout,

Quoted 15 lines · Arnout Vandecappelle
Quoted 4 lines · Michael Rommel

Automatic IPv6 Connectivity Configuration Utility for users of a IPv6 tunnel broker, developed by sixxs.net

Quoted 9 lines
---
 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
Quoted 1 line

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).

Quoted 25 lines
Quoted 1 line

create mode 100644 package/aiccu/aiccu-0002-install-correct-init-script.patch

[snip]

Quoted 10 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +4 -0
new file mode 100644
index 0000000..15e9268
@@ -0,0 +1,17 @@
+Makefile: remove hardcoded .debian part from install command, debian
+	  version does not work under buildroot
+
+Signed-off-by: Michael Rommel <[email protected]>

package/aiccu/aiccu-0002-install-correct-init-script.patch line 14

Quoted 10 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +10 -0
+
+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).

Quoted 2 lines

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.

Quoted 4 lines

package/aiccu/aiccu-0002-install-correct-init-script.patch line 16

Quoted 2 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +2 -0
+
+AICCU_VERSION = 20070115

Ouch, that's old...

Yes... but it works without any problems for me since I got my first tunnel in 2005.

Quoted 5 lines

package/aiccu/aiccu-0002-install-correct-init-script.patch

Quoted 3 lines
package/aiccu/aiccu-0002-install-correct-init-script.patch new file +3 -0
+
+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.

Signature · 5 lines
Michael Rommel, Erlangen, Germany

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130904/a067637d/attachment.html>
#3 lore raw

PATCH 1/1 aiccu: new package

Dear Michael Rommel,

Quoted 21 lines · Michael Rommel

Regarding the installation there are three versions on the table:

1. Using the recommended default way:

package/aiccu/aiccu.mk new file +3 -0
+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
Quoted 7 lines

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.

Quoted 2 lines

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

Quoted 9 lines

= 50 should be fine.

Quoted 5 lines

package/aiccu/aiccu.mk line 23

Quoted 3 lines
package/aiccu/aiccu.mk new file +3 -0
+
+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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 1/1 aiccu: new package

Hi Thomas,

Quoted 10 lines · Thomas Petazzoni

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.

Quoted 2 lines

Network is S40network. ntp is installed at S49ntp. So I guess something

Quoted 1 line

= 50 should be fine.

done.

Quoted 2 lines

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.

Signature · 1 line
Michael Rommel, Erlangen, Germany