diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-21 14:35:39 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-21 14:56:56 +0000 |
commit | ba29d2187341d958c329d19b4a78310a084172b8 (patch) | |
tree | 56f829602661e500938fbb345c4aa11819f575e2 | |
parent | a23c1ab6987707519446a04e60bd5dafdd6b63b9 (diff) | |
download | aports-ba29d2187341d958c329d19b4a78310a084172b8.tar.bz2 aports-ba29d2187341d958c329d19b4a78310a084172b8.tar.xz |
main/pingu: upgrade to 1.3
-rw-r--r-- | main/pingu/0001-pingu_route-allow-default-routes-that-has-no-via-add.patch | 60 | ||||
-rw-r--r-- | main/pingu/APKBUILD | 23 | ||||
-rw-r--r-- | main/pingu/pingu-strncpy.patch | 12 |
3 files changed, 14 insertions, 81 deletions
diff --git a/main/pingu/0001-pingu_route-allow-default-routes-that-has-no-via-add.patch b/main/pingu/0001-pingu_route-allow-default-routes-that-has-no-via-add.patch deleted file mode 100644 index 013fae46c..000000000 --- a/main/pingu/0001-pingu_route-allow-default-routes-that-has-no-via-add.patch +++ /dev/null @@ -1,60 +0,0 @@ -From f63ef90aefd8142c7b2ea2e3cd1abae375fc46b5 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Wed, 1 Aug 2012 12:03:05 +0000 -Subject: [PATCH] pingu_route: allow default routes that has no via address - -This fixes load-balancing with ppp0 - -We also make the via address family (ipv4/ipv6) agnostic. ---- - pingu_netlink.c | 10 ++++++---- - pingu_route.c | 3 +-- - 2 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/pingu_netlink.c b/pingu_netlink.c -index e3afbf6..dc4a2ed 100644 ---- a/pingu_netlink.c -+++ b/pingu_netlink.c -@@ -138,7 +138,7 @@ static int netlink_add_subrtattr_l(struct rtattr *rta, int maxlen, int type, - subrta->rta_len = len; - memcpy(RTA_DATA(subrta), data, alen); - rta->rta_len = NLMSG_ALIGN(rta->rta_len) + RTA_ALIGN(len); -- return TRUE; -+ return alen; - } - - static int netlink_add_subrtattr_addr_any(struct rtattr *rta, int maxlen, -@@ -346,11 +346,13 @@ static int add_one_nh(struct rtattr *rta, struct rtnexthop *rtnh, - struct pingu_iface *iface, - struct pingu_route *route) - { -+ int addr_size; - if (route == NULL) - return 0; -- netlink_add_subrtattr_addr_any(rta, 1024, RTA_GATEWAY, -- &route->gw_addr); -- rtnh->rtnh_len += sizeof(struct rtattr) + 4; // TODO: support ipv6 -+ addr_size = netlink_add_subrtattr_addr_any(rta, 1024, RTA_GATEWAY, -+ &route->gw_addr); -+ if (addr_size > 0) -+ rtnh->rtnh_len += sizeof(struct rtattr) + addr_size; - if (iface->balance_weight) - rtnh->rtnh_hops = iface->balance_weight - 1; - rtnh->rtnh_ifindex = iface->index; -diff --git a/pingu_route.c b/pingu_route.c -index 3a82f70..a2462c1 100644 ---- a/pingu_route.c -+++ b/pingu_route.c -@@ -126,8 +126,7 @@ int is_default_gw(struct pingu_route *route) - { - switch (route->dest.sa.sa_family) { - case AF_INET: -- return ((route->dest.sin.sin_addr.s_addr == 0) -- && (route->gw_addr.sin.sin_addr.s_addr != 0)); -+ return (route->dest.sin.sin_addr.s_addr == 0); - break; - case AF_INET6: - log_debug("TODO: ipv6"); --- -1.7.11.2 - diff --git a/main/pingu/APKBUILD b/main/pingu/APKBUILD index fe090da29..6929dc119 100644 --- a/main/pingu/APKBUILD +++ b/main/pingu/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=pingu -pkgver=1.2 -pkgrel=2 +pkgver=1.3 +pkgrel=0 pkgdesc="Small daemon that pings hosts and executes a script when status change" url="http://git.alpinelinux.org/cgit/pingu" arch="all" @@ -10,10 +10,8 @@ license="GPL" makedepends="libev-dev lua-dev" depends= subpackages="$pkgname-doc lua-pingu:_lua mtu" -source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 - 0001-pingu_route-allow-default-routes-that-has-no-via-add.patch +source="pingu-$pkgver.tar.gz::https://github.com/ncopa/pingu/archive/v$pkgver.tar.gz pingu.initd - pingu-strncpy.patch " _builddir="$srcdir"/$pkgname-$pkgver @@ -29,6 +27,11 @@ prepare() { build() { cd "$_builddir" + ./configure \ + --prefix=/usr \ + --localstatedir=/var \ + --sysconfdir=/etc \ + || return 1 make || return 1 } @@ -61,7 +64,9 @@ _lua() { mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr/ } -md5sums="a874d852ae0d8e10f8c22e0008d1b529 pingu-1.2.tar.bz2 -dbd6e66d4c9c694fd0436e91555bf750 0001-pingu_route-allow-default-routes-that-has-no-via-add.patch -70f56b0f506e1c2e725d0ec062667c32 pingu.initd -380539ae29d48af4d3958afaf1d2e1d0 pingu-strncpy.patch" +md5sums="0d33bfe66a428ace44bdf968c825ab12 pingu-1.3.tar.gz +70f56b0f506e1c2e725d0ec062667c32 pingu.initd" +sha256sums="971f3a68d201b2217bb7b4918ad349b0ef5ff19b7015439a174d2bf2d201ad42 pingu-1.3.tar.gz +cf3197f457d7a5955662417da8a7908a01934bfb5e97cf46c14a1ceab93ad47c pingu.initd" +sha512sums="e2489720268ef7c2e3b1619fd7f1f968db8e546b49769c6f40b12d7db49d39445329df4a6a12d1b5319aee4a89e0665bb188609a85d4b7495f9d5719d37409de pingu-1.3.tar.gz +b14b4b1ae218c53abec94d4c177327a5a7ed1833cb0160a83c683766d638759c1ed12c73d4cee93a2c09b6296affea20cf15f4dd5a5f2e910ac6f8d7e896ceb4 pingu.initd" diff --git a/main/pingu/pingu-strncpy.patch b/main/pingu/pingu-strncpy.patch deleted file mode 100644 index 8b2ee18b1..000000000 --- a/main/pingu/pingu-strncpy.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- pingu-1.1.orig/pingu_iface.c -+++ pingu-1.1/pingu_iface.c -@@ -115,7 +115,7 @@ - } - - if (name != NULL) -- strlcpy(iface->name, name, sizeof(iface->name)); -+ strncpy(iface->name, name, sizeof(iface->name)); - - list_init(&iface->ping_list); - list_init(&iface->route_list); - |