From patchwork Mon Jan 14 23:32:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles Talis X-Patchwork-Id: 211954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 26A3C2C009A for ; Tue, 15 Jan 2013 10:32:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C28C31010BA; Mon, 14 Jan 2013 23:32:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07u6+wlq9m1C; Mon, 14 Jan 2013 23:32:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6491D1000A2; Mon, 14 Jan 2013 23:32:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B9F528F74B for ; Mon, 14 Jan 2013 23:32:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 43D7C8659F for ; Mon, 14 Jan 2013 23:32:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DjFEC4BZ4FmL for ; Mon, 14 Jan 2013 23:32:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 084B888836 for ; Mon, 14 Jan 2013 23:32:18 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id bi1so2495163pad.22 for ; Mon, 14 Jan 2013 15:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=ZMJqzXfRGLLIlL4dbzUvJLnO9Ej2xRuDOhTe5l3XL3g=; b=NI2UCghMOOd9TON80u4gIVnCY3GfKfii1x11b+r0pHiArYR4BqgzJ6niTrqiLX3LNx WGRmwwGGRPH0TuBGe2ODGvwci3eJjjCjgH/wBz07aIS22sMbpkqT3COneDjMgDoAe8iy enFMQY8g39YdNgMvv4f+Y4+mc+tXst7Tsl8XaCdXUm5VnUYWSc90eUavbKZYY3oVbYMl QsWjLlqo6SeswhHnfsKZBYkag8kHMu6tXsSpgtkMLFLNTpikPUOyJvK0TOZHGuMt75Pe WHYFhmiQWxaTq4jprGN9f4fsfULyd/tl8R8zZGqgyQKvfE2aPcGgUrc/x8fPzCGkCidl qjbQ== X-Received: by 10.68.192.97 with SMTP id hf1mr258123660pbc.106.1358206338540; Mon, 14 Jan 2013 15:32:18 -0800 (PST) Received: from localhost.localdomain (50-193-5-105-static.hfc.comcastbusiness.net. [50.193.5.105]) by mx.google.com with ESMTPS id mn4sm8982652pbc.12.2013.01.14.15.32.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 15:32:17 -0800 (PST) From: gilles.talis@gmail.com To: buildroot@busybox.net Date: Mon, 14 Jan 2013 15:32:07 -0800 Message-Id: <1358206327-28381-1-git-send-email-gilles.talis@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 1/1] httping: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Gilles Talis Httping is like 'ping' but for http-requests. Give it an url, and it'll show you how long it takes to connect, send a request and retrieve the reply (only the headers) Signed-off-by: Gilles Talis --- package/Config.in | 1 + package/httping/Config.in | 23 +++++++++++ package/httping/httping-override-cflags.patch | 53 +++++++++++++++++++++++++ package/httping/httping.mk | 37 +++++++++++++++++ 4 files changed, 114 insertions(+), 0 deletions(-) create mode 100644 package/httping/Config.in create mode 100644 package/httping/httping-override-cflags.patch create mode 100644 package/httping/httping.mk diff --git a/package/Config.in b/package/Config.in index 42cde07..c59f342 100644 --- a/package/Config.in +++ b/package/Config.in @@ -631,6 +631,7 @@ source "package/ethtool/Config.in" source "package/heirloom-mailx/Config.in" source "package/hiawatha/Config.in" source "package/hostapd/Config.in" +source "package/httping/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/ifplugd/Config.in" endif diff --git a/package/httping/Config.in b/package/httping/Config.in new file mode 100644 index 0000000..aa1550a --- /dev/null +++ b/package/httping/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_HTTPING + bool "httping" + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takes time! + So it measures the latency of the webserver + network. + + http://www.vanheusden.com/httping/ + +if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_OPENSSL + bool "OpenSSL support" + select BR2_PACKAGE_OPENSSL + help + Adds openSSL support to httping + +config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + +endif diff --git a/package/httping/httping-override-cflags.patch b/package/httping/httping-override-cflags.patch new file mode 100644 index 0000000..a3cf59d --- /dev/null +++ b/package/httping/httping-override-cflags.patch @@ -0,0 +1,53 @@ +From 66f5811dd45fa27a7bfacf946dfefd16d765bb4d Mon Sep 17 00:00:00 2001 +From: Gilles Talis +Date: Mon, 14 Jan 2013 11:48:00 -0800 +Subject: [PATCH] allow CFLAGS/LDFLAGS to be overriden from command line + +Ensure required CFLAGS/LDFLAGS are appended to those provided in command line + +Signed-off-by: Gilles Talis +--- + Makefile | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 4c4f6a8..fdbb4cb 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,7 +19,7 @@ TARGET=httping + DEBUG=yes + WFLAGS=-Wall -W + OFLAGS=-O3 +-CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" ++override CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" + + PACKAGE=$(TARGET)-$(VERSION) + PREFIX=/usr +@@ -48,19 +48,19 @@ DOCS=license.txt license.OpenSSL readme.txt + # TFO=yes + + ifeq ($(SSL),no) +-CFLAGS+=-DNO_SSL ++override CFLAGS+=-DNO_SSL + else + OBJS+=mssl.o +-LDFLAGS+=-lssl -lcrypto ++override LDFLAGS+=-lssl -lcrypto + endif + + ifeq ($(TFO),yes) +-CFLAGS+=-DTCP_TFO ++override CFLAGS+=-DTCP_TFO + endif + + ifeq ($(DEBUG),yes) +-CFLAGS+=-D_DEBUG -ggdb +-LDFLAGS+=-g ++override CFLAGS+=-D_DEBUG -ggdb ++override LDFLAGS+=-g + endif + + ifeq ($(ARM),yes) +-- +1.7.4.1 + diff --git a/package/httping/httping.mk b/package/httping/httping.mk new file mode 100644 index 0000000..bec65f3 --- /dev/null +++ b/package/httping/httping.mk @@ -0,0 +1,37 @@ +############################################################# +# +# httping +# +############################################################# +HTTPING_VERSION = 1.5.7 +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz +HTTPING_SITE = http://www.vanheusden.com/httping +HTTPING_LICENSE = GPLv2 +HTTPING_LICENSE_FILES = license.txt + +ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) + HTTPING_DEPENDENCIES = openssl +else + HTTPING_SSL = no +endif + +ifeq ($(BR2_PACKAGE_HTTPING_TFO),y) + HTTPING_TFO = yes +endif + +define HTTPING_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + SSL=$(HTTPING_SSL) \ + DEBUG=no \ + TFO=$(HTTPING_TFO) -C $(@D) +endef + +define HTTPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin/httping +endef + +define HTTPING_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package))