diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-07-24 08:47:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-07-24 08:55:08 +0000 |
commit | 25948a450ec1e10d2d4d52b2cd50e032d0a8e732 (patch) | |
tree | 8a61fb2800ab92f70cfe86659ad6ab48d1861a29 /main/ngrep | |
parent | 4b944db481e2cd3109b3ebd21a914bc60be5a4db (diff) | |
download | aports-25948a450ec1e10d2d4d52b2cd50e032d0a8e732.tar.bz2 aports-25948a450ec1e10d2d4d52b2cd50e032d0a8e732.tar.xz |
main/ngrep: fix segfault on invalid filters and add -dbg
A comment in configure.in says:
> dnl For libpcap's that don't need the restart function called for
> dnl multiple lexer passes, allow them to turn it off here. This option
> dnl exists solely to address a very rude email from the maintainer
> dnl indicating that it shouldn't be called directly (and of course he
> dnl was wrong because this is still needed).
This indicates that you should not really call pcap_restart() directly,
so we use this --disable-pcap-restart.
This fixes segfault when the filter is invalid.
ref #4466
Diffstat (limited to 'main/ngrep')
-rw-r--r-- | main/ngrep/APKBUILD | 25 | ||||
-rw-r--r-- | main/ngrep/no-strip.patch | 10 |
2 files changed, 29 insertions, 6 deletions
diff --git a/main/ngrep/APKBUILD b/main/ngrep/APKBUILD index 487c58704a..efedd1d650 100644 --- a/main/ngrep/APKBUILD +++ b/main/ngrep/APKBUILD @@ -2,23 +2,30 @@ # Maintainer: Francesco Colista <francesco.colista@gmail.com> pkgname=ngrep pkgver=1.45 -pkgrel=1 +pkgrel=2 pkgdesc="A grep-like utility that allows you to search for network packets on an interface" url="http://ngrep.sourceforge.net/" arch="all" -license="custom" +license="BSD" depends= depends_dev="libpcap-dev" -makedepends="$depends_dev" +makedepends="$depends_dev autoconf automake" install="" -subpackages="" -source="http://downloads.sourceforge.net/sourceforge/ngrep/$pkgname-$pkgver.tar.bz2" +subpackages="$pkgname-dbg" +source="http://downloads.sourceforge.net/sourceforge/ngrep/$pkgname-$pkgver.tar.bz2 + no-strip.patch" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" update_config_sub || return 1 + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + autoreconf -vif } build() { @@ -29,6 +36,7 @@ build() { --prefix=/usr \ --sysconfdir=/etc \ --with-pcap-includes=/usr/include/pcap \ + --disable-pcap-restart \ || return 1 make || return 1 } @@ -38,4 +46,9 @@ package() { install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/custom/$pkgname/LICENSE } -md5sums="bc8150331601f3b869549c94866b4f1c ngrep-1.45.tar.bz2" +md5sums="bc8150331601f3b869549c94866b4f1c ngrep-1.45.tar.bz2 +312ad860fc42df3248d6209431162eac no-strip.patch" +sha256sums="aea6dd337da8781847c75b3b5b876e4de9c58520e0d77310679a979fc6402fa7 ngrep-1.45.tar.bz2 +d2971dcf822f745453b9736032dfdd9b7e3bd57368b26cbbebf830105a46a09d no-strip.patch" +sha512sums="0feb4080f834449d57ae99897c573d2b8148711cfb550fa4ff415169dedb1f0d23f4b03f625660162ca72f8ad06e19874c1af46da6afd8f8fe8dd553558c14f7 ngrep-1.45.tar.bz2 +28488c548cd409ac99af7eead37e3d7596b8c0ac2b9064de5ae7cc815beb65fc8488e8400d6a5d81eab128dc0a97b4e252e2503baf35704138a2226f7d3375d7 no-strip.patch" diff --git a/main/ngrep/no-strip.patch b/main/ngrep/no-strip.patch new file mode 100644 index 0000000000..b9c20e7865 --- /dev/null +++ b/main/ngrep/no-strip.patch @@ -0,0 +1,10 @@ +--- ./configure.in.orig ++++ ./configure.in +@@ -161,7 +161,6 @@ + dnl OS-specific options + dnl + +-STRIPFLAG="-s" + HAVE_DUMB_UDPHDR="0" + + case "$target_os" in |