tcping: new package
PATCH 1/1 tcping: new package
tcping does a TCP connect to the given ip/port combination. The user can specify a timeout in seconds. This is useful in shell scripts running in firewalled environments. Often SYNs are just being dropped by firewalls, thus connection establishment will be retried several times (for minutes) until a TCP timeout is reached. With tcping it is possible to check first if the desired port is reachable and then start connection establishment.
http://www.linuxco.de/tcping/tcping.html
--- package/Config.in | 1 + package/tcping/Config.in | 7 +++++++ package/tcping/tcping.mk | 27 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 package/tcping/Config.in create mode 100644 package/tcping/tcping.mk
package/Config.in +1 -0
@@ -854,6 +854,7 @@ source "package/squid/Config.in" source "package/strongswan/Config.in" source "package/stunnel/Config.in" source "package/tcpdump/Config.in" +source "package/tcping/Config.in" source "package/tcpreplay/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/tftpd/Config.in"
package/tcping/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port combination. + + http://www.linuxco.de/tcping/tcping.html +
package/tcping/tcping.mk new file +27 -0
@@ -0,0 +1,27 @@ +############################################################# +# +# tcping +# +############################################################# +TCPING_VERSION = 1.3.5 +TCPING_SOURCE = tcping-$(TCPING_VERSION).tar.gz +TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+ + +define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +define TCPING_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/tcping +endef + +define TCPING_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package))
Signature · 1 line
1.8.4.rc3
PATCH 1/1 tcping: new package
Dear Arnaud R?billout,
Thanks for this contribution! A few comments below, if you could fix them and resend an updated version, that'd be great!
Quoted 2 lines
http://www.linuxco.de/tcping/tcping.html
Signed-off-by Arnaud R?billout <[email protected]>
First, leave one empty line before the Signed-off-by line.
package/tcping/Config.in line 4
Quoted 10 lines · Arnaud R?billout
package/tcping/Config.in new file +4
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port combination.
I believe you could put here a slightly longer description, such as the one you've written in your commit log.
package/tcping/tcping.mk line 5
Quoted 13 lines
package/tcping/Config.in new file +2
-0+ http://www.linuxco.de/tcping/tcping.html +package/tcping/tcping.mk new file +5
-0@@ -0,0 +1,27 @@ +############################################################# +# +# tcping +# +#############################################################
There should be 80 # dashes, and an empty line between this header and the first variable.
package/tcping/tcping.mk line 7
Quoted 2 lines
package/tcping/tcping.mk new file +2
-0+TCPING_VERSION = 1.3.5 +TCPING_SOURCE = tcping-$(TCPING_VERSION).tar.gz
This last line is not needed since it is the default value.
package/tcping/tcping.mk line 9
Quoted 2 lines
package/tcping/tcping.mk new file +2
-0+TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+
You should add another line here for the licensing informations:
TCPING_LICENSE_FILES = LICENSE
this will automatically consider the file called 'LICENSE' in the tcping source tree as the license file.
package/tcping/tcping.mk line 13
Quoted 3 lines
package/tcping/tcping.mk new file +3
-0+define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linux +endef
It's quite unfortunate that the Makefile uses the non-standard CCFLAGS instead of CFLAGS, but ok.
package/tcping/tcping.mk line 25
Quoted 11 lines
package/tcping/tcping.mk new file +11
-0+define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +define TCPING_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/tcping +endef + +define TCPING_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef
You can remove the uninstall and clean commands, we are going to remove them soon.
Other than that, looks good! Thanks again!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 tcping: new package
Dear Thomas Petazzoni,
thanks for your feedback, the corrected version will come soon.
Best regards
Quoted 76 lines · Thomas Petazzoni
Dear Arnaud R?billout,
Thanks for this contribution! A few comments below, if you could fix them and resend an updated version, that'd be great!
Quoted 2 lines
http://www.linuxco.de/tcping/tcping.html
Signed-off-by Arnaud R?billout <[email protected]>First, leave one empty line before the Signed-off-by line.
package/tcping/Config.in line 4
Quoted 10 lines · Arnaud R?billout
package/tcping/Config.in new file +4
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port combination.I believe you could put here a slightly longer description, such as the one you've written in your commit log.
package/tcping/tcping.mk line 5
Quoted 13 lines
package/tcping/Config.in new file +2
-0+ http://www.linuxco.de/tcping/tcping.html +package/tcping/tcping.mk new file +5
-0@@ -0,0 +1,27 @@ +############################################################# +# +# tcping +# +#############################################################There should be 80 # dashes, and an empty line between this header and the first variable.
package/tcping/tcping.mk line 7
Quoted 2 lines
package/tcping/tcping.mk new file +2
-0+TCPING_VERSION = 1.3.5 +TCPING_SOURCE = tcping-$(TCPING_VERSION).tar.gzThis last line is not needed since it is the default value.
package/tcping/tcping.mk line 9
Quoted 2 lines
package/tcping/tcping.mk new file +2
-0+TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+You should add another line here for the licensing informations:
TCPING_LICENSE_FILES= LICENSEthis will automatically consider the file called 'LICENSE' in the tcping source tree as the license file.
package/tcping/tcping.mk line 13
Quoted 3 lines
package/tcping/tcping.mk new file +3
-0+define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linux +endefIt's quite unfortunate that the
Makefileuses the non-standard CCFLAGS instead of CFLAGS, but ok.package/tcping/tcping.mk line 25
Quoted 11 lines
package/tcping/tcping.mk new file +11
-0+define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +define TCPING_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/tcping +endef + +define TCPING_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endefYou can remove the uninstall and clean commands, we are going to remove them soon.
Other than that, looks good! Thanks again!
Thomas
Signature · 6 lines
Arnaud R?billout SYSCOM Instruments SA rue de l'industrie 21 CH-1450 Sainte-Croix Switzerland Tel: +41 (0)24 455 44 11
PATCH 1/1 tcping: new package
tcping does a TCP connect to the given ip/port combination. The user can specify a timeout in seconds. This is useful in shell scripts running in firewalled environments. Often SYNs are just being dropped by firewalls, thus connection establishment will be retried several times (for minutes) until a TCP timeout is reached. With tcping it is possible to check first if the desired port is reachable and then start connection establishment.
http://www.linuxco.de/tcping/tcping.html
--- package/Config.in | 1 + package/tcping/Config.in | 11 +++++++++++ package/tcping/tcping.mk | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 package/tcping/Config.in create mode 100644 package/tcping/tcping.mk
package/Config.in +1 -0
@@ -854,6 +854,7 @@ source "package/squid/Config.in" source "package/strongswan/Config.in" source "package/stunnel/Config.in" source "package/tcpdump/Config.in" +source "package/tcping/Config.in" source "package/tcpreplay/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/tftpd/Config.in"
package/tcping/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port combination. The user can + specify a timeout in seconds. This is useful in shell scripts running in + firewalled environments. Often SYNs are just being dropped by firewalls, + thus connection establishment will be retried several times (for minutes) + until a TCP timeout is reached. With tcping it is possible to check first + if the desired port is reachable and then start connection establishment. + + http://www.linuxco.de/tcping/tcping.html
package/tcping/tcping.mk new file +20 -0
@@ -0,0 +1,20 @@ +################################################################################ +# +# tcping +# +################################################################################ + +TCPING_VERSION = 1.3.5 +TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+ +TCPING_LICENSE_FILES = LICENSE + +define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +$(eval $(generic-package))
Signature · 1 line
1.8.4.rc3
PATCH 1/1 tcping: new package
In reply to Arnaud Rébillouttcping does a TCP connect to the given ip/port combination. The user can specify a timeout in seconds. This is useful in shell scripts running in firewalled environments. Often SYNs are just being dropped by firewalls, thus connection establishment will be retried several times (for minutes) until a TCP timeout is reached. With tcping it is possible to check first if the desired port is reachable and then start connection establishment.
http://www.linuxco.de/tcping/tcping.html
--- package/Config.in | 1 + package/tcping/Config.in | 11 +++++++++++ package/tcping/tcping.mk | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 package/tcping/Config.in create mode 100644 package/tcping/tcping.mk
package/Config.in +1 -0
@@ -854,6 +854,7 @@ source "package/squid/Config.in" source "package/strongswan/Config.in" source "package/stunnel/Config.in" source "package/tcpdump/Config.in" +source "package/tcping/Config.in" source "package/tcpreplay/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/tftpd/Config.in"
package/tcping/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port combination. The user can + specify a timeout in seconds. This is useful in shell scripts running in + firewalled environments. Often SYNs are just being dropped by firewalls, + thus connection establishment will be retried several times (for minutes) + until a TCP timeout is reached. With tcping it is possible to check first + if the desired port is reachable and then start connection establishment. + + http://www.linuxco.de/tcping/tcping.html
package/tcping/tcping.mk new file +20 -0
@@ -0,0 +1,20 @@ +################################################################################ +# +# tcping +# +################################################################################ + +TCPING_VERSION = 1.3.5 +TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+ +TCPING_LICENSE_FILES = LICENSE + +define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +$(eval $(generic-package))
Signature · 1 line
1.8.4.rc3
PATCH 1/1 tcping: new package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnaud" == Arnaud R?billout <[email protected]> writes:
Hi,
Arnaud> tcping does a TCP connect to the given ip/port combination. The user can Arnaud> specify a timeout in seconds. This is useful in shell scripts running in Arnaud> firewalled environments. Often SYNs are just being dropped by firewalls, Arnaud> thus connection establishment will be retried several times (for minutes) Arnaud> until a TCP timeout is reached. With tcping it is possible to check first Arnaud> if the desired port is reachable and then start connection establishment.
Arnaud> http://www.linuxco.de/tcping/tcping.html
Arnaud> Signed-off-by: Arnaud R?billout <[email protected]> Arnaud> ---
Please clearly mark patch version and what you have changed to ease review. The way to do this is to add the revision after PATCH in subject (E.G. [PATCHv2]) and to write a small change long here under the --- line.
Arnaud> package/Config.in | 1 + Arnaud> package/tcping/Config.in | 11 +++++++++++ Arnaud> package/tcping/tcping.mk | 20 ++++++++++++++++++++ Arnaud> 3 files changed, 32 insertions(+) Arnaud> create mode 100644 package/tcping/Config.in Arnaud> create mode 100644 package/tcping/tcping.mk
Arnaud> diff --git a/package/Config.in b/package/Config.in Arnaud> index 2351839..fc1ec87 100644
Arnaud> --- a/package/Config.in
Arnaud> +++ b/package/Config.in
Arnaud> @@ -854,6 +854,7 @@ source "package/squid/Config.in"
Arnaud> source "package/strongswan/Config.in" Arnaud> source "package/stunnel/Config.in" Arnaud> source "package/tcpdump/Config.in" Arnaud> +source "package/tcping/Config.in" Arnaud> source "package/tcpreplay/Config.in" Arnaud> if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS Arnaud> source "package/tftpd/Config.in" Arnaud> diff --git a/package/tcping/Config.in b/package/tcping/Config.in Arnaud> new file mode 100644 Arnaud> index 0000000..93cf322 Arnaud> --- /dev/null Arnaud> +++ b/package/tcping/Config.in Arnaud> @@ -0,0 +1,11 @@ Arnaud> +config BR2_PACKAGE_TCPING Arnaud> + bool "tcping" Arnaud> + help Arnaud> + tcping does a TCP connect to the given ip/port combination. The user can Arnaud> + specify a timeout in seconds. This is useful in shell scripts running in Arnaud> + firewalled environments. Often SYNs are just being dropped by firewalls, Arnaud> + thus connection establishment will be retried several times (for minutes) Arnaud> + until a TCP timeout is reached. With tcping it is possible to check first Arnaud> + if the desired port is reachable and then start connection establishment.
Arnaud> +
The help lines are too long. Please wrap after ~column 70 so it fits into menuconfig with a normal 80char window.
Arnaud> + http://www.linuxco.de/tcping/tcping.html
Arnaud> diff --git a/package/tcping/tcping.mk b/package/tcping/tcping.mk Arnaud> new file mode 100644
Arnaud> index 0000000..1472ad4
Arnaud> --- /dev/null
Arnaud> +++ b/package/tcping/tcping.mk
Arnaud> @@ -0,0 +1,20 @@
Arnaud> +################################################################################ Arnaud> +#
Arnaud> +# tcping
Arnaud> +#
Arnaud> +################################################################################ Arnaud> +
Arnaud> +TCPING_VERSION = 1.3.5
Arnaud> +TCPING_SITE = http://www.linuxco.de/tcping
Arnaud> +TCPING_LICENSE = GPLv3+
Arnaud> +TCPING_LICENSE_FILES = LICENSE
Arnaud> +
Arnaud> +define TCPING_BUILD_CMDS
Arnaud> + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linux
You should also pass TARGET_LDFLAGS. As the Makefile is really simple I just added it to CCFLAGS.
Committed with these minor fixes, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 tcping: new package
Thanks for the recommandation ! I'll keep that in mind for the next patch !
Quoted 85 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnaud" == Arnaud R?billout <[email protected]> writes:
Hi,
Arnaud> tcping does a TCP connect to the given ip/port combination. The user can Arnaud> specify a timeout in seconds. This is useful in shell scripts running in Arnaud> firewalled environments. Often SYNs are just being dropped by firewalls, Arnaud> thus connection establishment will be retried several times (for minutes) Arnaud> until a TCP timeout is reached. With tcping it is possible to check first Arnaud> if the desired port is reachable and then start connection establishment.
Arnaud> http://www.linuxco.de/tcping/tcping.html
Arnaud> Signed-off-by: Arnaud R?billout <[email protected]> Arnaud> ---
Please clearly mark patch version and what you have changed to ease review. The way to do this is to add the revision after PATCH in subject (E.G. [PATCHv2]) and to write a small change long here under the --- line.
Arnaud> package/Config.in | 1 + Arnaud> package/tcping/Config.in | 11 +++++++++++ Arnaud> package/tcping/tcping.mk | 20 ++++++++++++++++++++ Arnaud> 3 files changed, 32 insertions(+) Arnaud> create mode 100644 package/tcping/Config.in Arnaud> create mode 100644 package/tcping/tcping.mkArnaud> diff --git a/package/Config.in b/package/Config.in Arnaud> index 2351839..fc1ec87 100644
Arnaud> --- a/package/Config.in
Arnaud> +++ b/package/Config.in
Arnaud> @@ -854,6 +854,7 @@ source "package/squid/Config.in"Arnaud> source "package/strongswan/Config.in" Arnaud> source "package/stunnel/Config.in" Arnaud> source "package/tcpdump/Config.in" Arnaud> +source "package/tcping/Config.in" Arnaud> source "package/tcpreplay/Config.in" Arnaud> if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS Arnaud> source "package/tftpd/Config.in" Arnaud> diff --git a/package/tcping/Config.in b/package/tcping/Config.in Arnaud> new file mode 100644 Arnaud> index 0000000..93cf322 Arnaud> --- /dev/null Arnaud> +++ b/package/tcping/Config.in Arnaud> @@ -0,0 +1,11 @@ Arnaud> +config BR2_PACKAGE_TCPING Arnaud> + bool "tcping" Arnaud> + help Arnaud> + tcping does a TCP connect to the given ip/port combination. The user can Arnaud> + specify a timeout in seconds. This is useful in shell scripts running in Arnaud> + firewalled environments. Often SYNs are just being dropped by firewalls, Arnaud> + thus connection establishment will be retried several times (for minutes) Arnaud> + until a TCP timeout is reached. With tcping it is possible to check first Arnaud> + if the desired port is reachable and then start connection establishment.Arnaud> +
The help lines are too long. Please wrap after ~column 70 so it fits into menuconfig with a normal 80char window.
Arnaud> + http://www.linuxco.de/tcping/tcping.html Arnaud> diff --git a/package/tcping/tcping.mk b/package/tcping/tcping.mk Arnaud> new file mode 100644 Arnaud> index 0000000..1472ad4 Arnaud> --- /dev/null Arnaud> +++ b/package/tcping/tcping.mk Arnaud> @@ -0,0 +1,20 @@ Arnaud> +################################################################################ Arnaud> +# Arnaud> +# tcping Arnaud> +# Arnaud> +################################################################################ Arnaud> + Arnaud> +TCPING_VERSION = 1.3.5 Arnaud> +TCPING_SITE = http://www.linuxco.de/tcping Arnaud> +TCPING_LICENSE = GPLv3+ Arnaud> +TCPING_LICENSE_FILES = LICENSE Arnaud> + Arnaud> +define TCPING_BUILD_CMDS Arnaud> + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS)" -C $(@D) tcping.linuxYou should also pass
TARGET_LDFLAGS. As theMakefileis really simple I just added it to CCFLAGS.Committed with these minor fixes, thanks.
Signature · 6 lines
Arnaud R?billout SYSCOM Instruments SA rue de l'industrie 21 CH-1450 Sainte-Croix Switzerland Tel: +41 (0)24 455 44 11
PATCH 1/1 tcping: new package
Quoted 1 line · Arnaud R?billout
Thanks for the recommandation ! I'll keep that in mind for the next patch !
I've written a small howto about working with git and patches:
http://libbits.wordpress.com/2011/12/27/managing-patch-series-with-git/
BR documentation has even more info about this subject:
http://buildroot.uclibc.org/downloads/manual/manual.html#_contributing_to_buildroot
Yegor