X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 8E468DC4ED2 for ; Fri, 22 Jan 2016 13:22:30 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 14E41DC0CD8 for ; Fri, 22 Jan 2016 13:22:29 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id u188so18631070wmu.1 for ; Fri, 22 Jan 2016 05:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i5lUC4RNy9Q26t9Y/GOpYwrkCv6a2ponNXV1rV1hA5g=; b=hEZPjOJaNfZNekqCQZF8Ne4HDNwEiJLbZwuljIlPtmiJkl5wuWoRpooxQ1cgWFKLg4 5QrA7vG0HlhLq/D1pzuUGL0RjiclNqJdl04AY0N3NxTonaxJa+lT5BcYCkepeyr1ayaE cyfB9/ZLh1c8xlKtiS21+pW+2fyXdYz0j+x3AmRMKze7DF+imDsU5FXYlTifhh6DYX7L 74L371ArRDMJ2YKgrSnVi3I9fq88uFCzsDUl7txO3XNa/ZzbHGobMg8VP4aJ9Pt+3cvq ad1taOudscF4ot4r8PrXnR48g/jbuKBZCVwCVbS6t/l8Csok0KX+EOKi1gIeLntEXpNA yetA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i5lUC4RNy9Q26t9Y/GOpYwrkCv6a2ponNXV1rV1hA5g=; b=XTxgQMqmimVyLcX9ataWmAMEpdcvc3j92X+St/bHTOwC1txrpTW/shKqKtOJxFF9Ae laeXXSPZYX9doeEJ7dMhpnLU8nCzDPp5Q7coE7sApb0UTo4QPG8/CE/uySpzgH1o7t1C tiz0450ccv6FhwNxQ5X1/pOm69/IQg8OBnEa81woRvaY2JkxTt3a60kEUF7STkUHpIW+ /rSkooAtNC+uX342+LYJ6ANhpm3MEBIuPDIgoYgT01E1m03X6nZSDJTK8m0+PWuqBmEe 5Nnat60AxU8/uh0OChzllyx+l4IbjVqvPAzWSM7j7yoTW3kLdxiZFjjx9u2fCjFWxZOf ZLvw== X-Gm-Message-State: AG10YOSj1abl+Dp5hafQMBRicgx0InR5oejNFkTvQ+fAI3fuDfg2OtcMyhO9Ci6B3nKatA== X-Received: by 10.28.188.70 with SMTP id m67mr3712778wmf.24.1453468948255; Fri, 22 Jan 2016 05:22:28 -0800 (PST) Received: from localhost (89-156-8-192.rev.numericable.fr. [89.156.8.192]) by smtp.gmail.com with ESMTPSA id u12sm2912474wmu.10.2016.01.22.05.22.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2016 05:22:27 -0800 (PST) From: Corentin Henry To: ibid.ag@gmail.com Cc: alpine-aports@lists.alpinelinux.org, Corentin Henry Subject: Re: [alpine-aports] Date: Fri, 22 Jan 2016 13:21:20 +0000 Message-Id: <1453468880-24744-1-git-send-email-corentinhenry@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <20160121114007.29e8f8e6@vostro> References: <20160121114007.29e8f8e6@vostro> X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: > On Tue, 19 Jan 2016 07:28:54 -0800 > Isaac Dunham wrote: > > > On Tue, Jan 19, 2016 at 11:50:37AM +0000, Corentin Henry wrote: > > > hi, > > > > > > hping3 is a network tool able to send custom TCP/IP packets and to > > > display target replies like ping do with ICMP replies. hping3 can > > > handle fragmentation, and almost arbitrary packet size and content, > > > using the command line interface. > > > > > > this package builds hping with tcl scripting support. > > > > > > let me know if there is anything to change, I'm not used yet to > > > packaging. > > > > Looks like a typo in package() (hpin3 should presumably be hping3). > > > > Quote $subpkgdir and $pkgdir ("$subpkgdir"). > > > > Send it all as one patch. > > New APKBUILDS should be buildable from the start; creating a series of > > patches like this: > > 1/4: add APKBUILD (references 1-foo.patch, 2-bar.patch, 3-baz.patch) > > 2/4: add 1-foo.patch > > 3/4: add 2-bar.patch > > 4/4: add 3-baz.patch > > > > is needlessly cluttered, and likely to break autobuild scripts. > > If you refer to a local source file, you should add it, the checksums, > > and the reference in one commit. > > Yes, please flatten it all to one commit. > > Additionally, you can look how to do github commitid based packaging. > See. e.g. main/bmd-tools for this: > http://git.alpinelinux.org/cgit/aports/tree/main/bmd-tools/APKBUILD > > I believe the compression of manpages happens now automatic, so the > explicit gzip should not be needed in doc(). Well, you'd probably need > to install the .doc files before calling default_doc. > > There was also few whitespace mismatches (tabs vs. spaces). > > But other than these nitpicks on formatting, it looks good. > > Please resubmit with fixes! > > Thanks, > Timo Thank you Timo and Isaac. Here is a new version, with (hopefully) all the requested fixes: - fix typo (hpin -> hping) - convert hard tabs to spaces. I kept hard tabs in 10-add_tcl_version.patch though, since the patched file is using hard tabs. Let me know if you prefer otherwise. - do not zip the man pages - squash everything Corentin --- testing/hping/10-add_tcl_version.patch | 72 +++++++++++++++++++++++++++++++ testing/hping/20-pass_CFLAGS_to_gcc.patch | 25 +++++++++++ testing/hping/30-fix_bpf_include.patch | 37 ++++++++++++++++ testing/hping/APKBUILD | 72 +++++++++++++++++++++++++++++++ 4 files changed, 206 insertions(+) create mode 100644 testing/hping/10-add_tcl_version.patch create mode 100644 testing/hping/20-pass_CFLAGS_to_gcc.patch create mode 100644 testing/hping/30-fix_bpf_include.patch create mode 100644 testing/hping/APKBUILD diff --git a/testing/hping/10-add_tcl_version.patch b/testing/hping/10-add_tcl_version.patch new file mode 100644 index 0000000..9e6eae2 --- /dev/null +++ b/testing/hping/10-add_tcl_version.patch @@ -0,0 +1,72 @@ +From ab6a1f2d7d0b064514ee7cbf575b8ef4dd039d73 Mon Sep 17 00:00:00 2001 +From: Carsten Grohmann +Date: Tue, 19 May 2015 17:55:42 +0200 +Subject: [PATCH] Quote variables and add new TCL versions "8.5" and "8.6" + +--- + configure | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/configure b/configure +index dab04ab..047712d 100755 +--- a/configure ++++ b/configure +@@ -44,11 +44,11 @@ if [ ! "$CONFIGOSTYPE" ]; then + fi + + # for BSD/OS use the historical name as it doesn't include '/' +-if [ $CONFIGOSTYPE = "BSD/OS" ]; then ++if [ "$CONFIGOSTYPE" = "BSD/OS" ]; then + CONFIGOSTYPE=BSDI + fi + +-case $CONFIGOSTYPE in ++case "$CONFIGOSTYPE" in + SUNOS) + SOLARISLIB="-lsocket -lresolv -lnsl" + BUG='/* #define STUPID_SOLARIS_CHECKSUM_BUG */' +@@ -63,31 +63,31 @@ esac + # + for TCLPATH_TRY in "/usr/bin/" "/usr/local/bin/" "/bin/" + do +- for TCLVER_TRY in "8.4" "8.3" "8.2" "8.1" "8.0" ++ for TCLVER_TRY in "8.6" "8.5" "8.4" "8.3" "8.2" "8.1" "8.0" + do +- if [ -z $TCLSH ] ++ if [ -z "$TCLSH" ] + then +- TCLSH_TRY=${TCLPATH_TRY}tclsh${TCLVER_TRY} +- if [ -f $TCLSH_TRY ] ++ TCLSH_TRY="${TCLPATH_TRY}tclsh${TCLVER_TRY}" ++ if [ -f "$TCLSH_TRY" ] + then +- TCLSH=$TCLSH_TRY ++ TCLSH="$TCLSH_TRY" + echo "===> Found Tclsh in: $TCLSH" + fi + fi + done + done +-if [ -f $TCLSH ] ++if [ -f "$TCLSH" ] + then + TCL_VER=`echo puts \\$tcl_version | $TCLSH -` +- USE_TCL='-DUSE_TCL' ++ USE_TCL="-DUSE_TCL" + TCL_LIB="-ltcl${TCL_VER}" +- if [ -e /usr/include/tcl${TCL_VER} ] ++ if [ -e "/usr/include/tcl${TCL_VER}" ] + then + TCL_INC="-I/usr/include/tcl${TCL_VER}" +- elif [ -e /usr/include/tcl.h ] ++ elif [ -e "/usr/include/tcl.h" ] + then + TCL_INC="" +- elif [ -e /usr/local/include/tcl${TCL_VER} ] ++ elif [ -e "/usr/local/include/tcl${TCL_VER}" ] + then + TCL_INC="-I/usr/local/include/tcl${TCL_VER}" + else +-- +2.7.0 + diff --git a/testing/hping/20-pass_CFLAGS_to_gcc.patch b/testing/hping/20-pass_CFLAGS_to_gcc.patch new file mode 100644 index 0000000..31d6689 --- /dev/null +++ b/testing/hping/20-pass_CFLAGS_to_gcc.patch @@ -0,0 +1,25 @@ +From 9b586fa0ae41cbf36e1043e6a5879d1bbc9e0ff6 Mon Sep 17 00:00:00 2001 +From: Corentin Henry +Date: Mon, 11 Jan 2016 15:04:23 +0000 +Subject: [PATCH] add CFLAGS to gcc options + +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 5cccbdd..5b70092 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -9,7 +9,7 @@ + CC= gcc + AR=/usr/bin/ar + RANLIB=/usr/bin/ranlib +-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ ++CCOPT= $(CFLAGS) -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ + DEBUG= -g + #uncomment the following if you need libpcap based build under linux + #(not raccomanded) +-- +2.7.0 + diff --git a/testing/hping/30-fix_bpf_include.patch b/testing/hping/30-fix_bpf_include.patch new file mode 100644 index 0000000..c74ff79 --- /dev/null +++ b/testing/hping/30-fix_bpf_include.patch @@ -0,0 +1,37 @@ +From 73d4684bd0bbb1fbc82a290bcb742d76d0224647 Mon Sep 17 00:00:00 2001 +From: Corentin Henry +Date: Mon, 11 Jan 2016 15:07:30 +0000 +Subject: [PATCH] fix bpf include + +--- + libpcap_stuff.c | 1 - + script.c | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/libpcap_stuff.c b/libpcap_stuff.c +index 26f9993..07ea1e6 100644 +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -16,7 +16,6 @@ + #include + #include + #include +-#include + #include + + #include "globals.h" +diff --git a/script.c b/script.c +index 124370c..b2a328b 100644 +--- a/script.c ++++ b/script.c +@@ -23,7 +23,6 @@ + #include + + #include +-#include + #include + + #include "release.h" +-- +2.7.0 + diff --git a/testing/hping/APKBUILD b/testing/hping/APKBUILD new file mode 100644 index 0000000..8f646a3 --- /dev/null +++ b/testing/hping/APKBUILD @@ -0,0 +1,72 @@ +# Contributor: +# Maintainer: Corentin Henry +pkgname=hping +pkgver=0.r13.3547c7691742c6eaa31f8402e0ccbb81387c1b99 +pkgrel=1 +pkgdesc="network tool able to send custom TCP/IP packets and to display target replies" +url="https://github.com/antirez/$pkgname" +arch="all" +license="GPL2" +depends="" +depends_dev="" +makedepends="tcl-dev libpcap-dev" +install="" +subpackages="$pkgname-doc" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz + 10-add_tcl_version.patch + 20-pass_CFLAGS_to_gcc.patch + 30-fix_bpf_include.patch" + +_builddir="$srcdir"/hping +prepare() { + local i + cd "$_builddir" + echo $source + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +snapshot() { + abuild clean + mkdir -p "$srcdir" + cd "$srcdir" + msg "Checking out hping master branch" + git clone $url || return 1 + tar zcf $pkgname-$pkgver.tar.gz hping || return 1 +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr + make + make strip +} + +package() { + cd "$_builddir" + install -D -m 755 hping3 "$pkgdir"/usr/sbin/hping3 + ln -s "$pkgdir"/usr/sbin/hping3 "$pkgdir"/usr/sbin/hping + ln -s "$pkgdir"/usr/sbin/hping3 "$pkgdir"/usr/sbin/hping2 +} + +doc() { + cd "$_builddir"/docs + install -D -m 0644 hping2.8 "$subpkgdir"/usr/share/man/man8/hping2.8 + install -D -m 0644 hping3.8 "$subpkgdir"/usr/share/man/man8/hping3.8 + default_doc +} +md5sums="6cdce1aa966d00035038c3474dc7c41e hping-0.r13.3547c7691742c6eaa31f8402e0ccbb81387c1b99.tar.gz +b5b43469b3bc5451870c9214c178e380 10-add_tcl_version.patch +05161223c57de36a3d07f7f6544cdcde 20-pass_CFLAGS_to_gcc.patch +bc7819f6f76360b38f43447124f2e4d3 30-fix_bpf_include.patch" +sha256sums="9cc450a609b88df77c575cb6df396c9189dc9caa67d86a7d871c21967cc77da9 hping-0.r13.3547c7691742c6eaa31f8402e0ccbb81387c1b99.tar.gz +4b2ba6a21a7d14f6251bf7d186efceeef1dcf6261cab8429fe0e8b402dc4739e 10-add_tcl_version.patch +dd33970382773f0cd0944ee2fc90d1e10a79c8a67e922662b7cb0f0491dee816 20-pass_CFLAGS_to_gcc.patch +7dda17a55ca2e4ecb3003dfb84d804b30d3f030a1fcdf4ebdda65fa8a6fec410 30-fix_bpf_include.patch" +sha512sums="c1051ecb7dae29afe1c3e931c1f85dc3f0c66397ad483bca383915e1ed96bb3e3ef05a824cc887341b4688d5d5e454d9ca122d7f38c78f78d45e1435257eeb61 hping-0.r13.3547c7691742c6eaa31f8402e0ccbb81387c1b99.tar.gz +3d7629a77ddbed4231172c6702b0f3a6929e19a303c5629ecb014ab4cd593763a3573507c9cb2f45fc5ad2032d7f95410bea9ef8a68a6508695d77dfd8e00e9b 10-add_tcl_version.patch +09b2b04bb9a6788a29da546c07c6301973757dbd67bd00a4e71dde2c762f9b39ad5c9e464a89c92569af762fd3fcecbcc01749f0f8bb4f416ab75ed95e0cae67 20-pass_CFLAGS_to_gcc.patch +660a434837e8d0afeac9b3a1ca301ca8b8585bf02dcba79fa24b4d9b479336fc774a7c9b0e19e63b6782535a9c0c0a1ddb077735e0d0bb1ed7a41e77b581ac89 30-fix_bpf_include.patch" -- 2.7.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---