aboutsummaryrefslogtreecommitdiffstats
path: root/main/pingu
diff options
context:
space:
mode:
Diffstat (limited to 'main/pingu')
-rw-r--r--main/pingu/0001-fix-various-include-issues-and-remove-unused-functio.patch193
-rw-r--r--main/pingu/APKBUILD16
2 files changed, 6 insertions, 203 deletions
diff --git a/main/pingu/0001-fix-various-include-issues-and-remove-unused-functio.patch b/main/pingu/0001-fix-various-include-issues-and-remove-unused-functio.patch
deleted file mode 100644
index b3f8442c69..0000000000
--- a/main/pingu/0001-fix-various-include-issues-and-remove-unused-functio.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-From 200819267fd20424150fce79c5e579945f8f8f5d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Mon, 28 Oct 2013 14:13:59 +0200
-Subject: [PATCH] fix various #include issues and remove unused functions
-
-to compile against musl, and remove some gcc 4.8.x warnings.
----
- src/icmp.c | 10 +++++-----
- src/icmp.h | 2 +-
- src/lua/lua-client.c | 2 +-
- src/mtu.c | 8 ++++++--
- src/netlink.c | 4 +++-
- src/netlink.h | 2 ++
- src/pingu_host.c | 2 +-
- src/pinguctl.c | 2 +-
- 8 files changed, 20 insertions(+), 12 deletions(-)
-
-diff --git a/src/icmp.c b/src/icmp.c
-index eb1ec5c..15979eb 100644
---- a/src/icmp.c
-+++ b/src/icmp.c
-@@ -1,10 +1,12 @@
-+#include <time.h>
- #include <errno.h>
- #include <netdb.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <unistd.h>
-
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <arpa/inet.h>
- #include <netinet/ip.h>
- #include <netinet/ip_icmp.h>
-@@ -13,7 +15,6 @@
-
- static char *pr_addr(__u32 addr)
- {
-- struct hostent *hp;
- static char buf[4096];
-
- sprintf(buf, "%s", inet_ntoa(*(struct in_addr *)&addr));
-@@ -300,10 +301,9 @@ int icmp_send_ping(int fd, struct sockaddr *to, int tolen,
- return icmp_send(fd, to, tolen, (void *) packet, len);
- }
-
--int icmp_read_reply(int fd, struct sockaddr *from, int fromlen,
-+int icmp_read_reply(int fd, struct sockaddr *from, socklen_t fromlen,
- __u8 *buf, int buflen)
- {
-- struct iovec iov;
- int len;
-
- len = recvfrom(fd, buf, buflen, 0, from, &fromlen);
-@@ -318,7 +318,7 @@ int icmp_read_reply(int fd, struct sockaddr *from, int fromlen,
-
- int icmp_open(float timeout)
- {
-- const int pmtudisc = IP_PMTUDISC_DO, yes = 1;
-+ const int pmtudisc = IP_PMTUDISC_DO;
- struct timeval tv;
- int fd;
-
-diff --git a/src/icmp.h b/src/icmp.h
-index 0fc94e1..7e177e0 100644
---- a/src/icmp.h
-+++ b/src/icmp.h
-@@ -13,7 +13,7 @@ int icmp_send_frag_needed(int fd, struct sockaddr *to, int tolen,
- struct iphdr *iph, int newmtu);
- int icmp_send_ping(int fd, struct sockaddr *to, int tolen,
- int seq, int total_size);
--int icmp_read_reply(int fd, struct sockaddr *from, int fromlen,
-+int icmp_read_reply(int fd, struct sockaddr *from, socklen_t fromlen,
- __u8 *buf, int buflen);
- int icmp_open(float timeout);
- void icmp_close(int fd);
-diff --git a/src/lua/lua-client.c b/src/lua/lua-client.c
-index ad18f30..bc9fce0 100644
---- a/src/lua/lua-client.c
-+++ b/src/lua/lua-client.c
-@@ -1,9 +1,9 @@
--
- #include <sys/socket.h>
- #include <sys/un.h>
-
- #include <errno.h>
- #include <stdio.h>
-+#include <string.h>
- #include <unistd.h>
-
- #include <lua.h>
-diff --git a/src/mtu.c b/src/mtu.c
-index 77766eb..63a15c2 100644
---- a/src/mtu.c
-+++ b/src/mtu.c
-@@ -4,12 +4,16 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <sys/ioctl.h>
-
- #include <linux/if.h>
- #include <linux/sockios.h>
-+
-+#include <arpa/inet.h>
- #include <netinet/ip_icmp.h>
-
- #include "icmp.h"
-+#include "netlink.h"
-
- static int fd, mtu_size;
- static struct sockaddr_in to;
-@@ -142,7 +146,7 @@ static void do_discover_and_write(void)
- return;
- }
-
-- if (!netlink_route_get(&to, NULL, iface)) {
-+ if (!netlink_route_get((struct sockaddr*) &to, NULL, iface)) {
- fprintf(stderr, "Failed to determine route interface\n");
- return;
- }
-@@ -184,7 +188,7 @@ static void do_inject_pmtu(void)
- {
- u_int16_t mtu;
-
-- if (!netlink_route_get(&to, &mtu, NULL)) {
-+ if (!netlink_route_get((struct sockaddr*) &to, &mtu, NULL)) {
- fprintf(stderr, "Failed to determine Path MTU\n");
- return;
- }
-diff --git a/src/netlink.c b/src/netlink.c
-index 5e43116..6e13599 100644
---- a/src/netlink.c
-+++ b/src/netlink.c
-@@ -1,10 +1,12 @@
-+#include <time.h>
- #include <errno.h>
- #include <stdio.h>
-+#include <fcntl.h>
- #include <unistd.h>
- #include <string.h>
-+
- #include <sys/types.h>
- #include <sys/ioctl.h>
--#include <sys/fcntl.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-
-diff --git a/src/netlink.h b/src/netlink.h
-index 4e2ceb2..115d59a 100644
---- a/src/netlink.h
-+++ b/src/netlink.h
-@@ -1,6 +1,8 @@
- #ifndef PINGU_NETLINK_H
- #define PINGU_NETLINK_H
-
-+#include <sys/types.h>
-+
- int netlink_route_get(struct sockaddr *dst, u_int16_t *mtu, char *ifname);
-
- #endif
-diff --git a/src/pingu_host.c b/src/pingu_host.c
-index 5887996..b2b59a4 100644
---- a/src/pingu_host.c
-+++ b/src/pingu_host.c
-@@ -37,7 +37,7 @@ void execute_action(const char *action)
- return;
- }
- if (pid == 0) {
-- execl(shell, shell, "-c", action, NULL);
-+ execl(shell, shell, "-c", action, (void*) NULL);
- log_perror(action);
- exit(1);
- }
-diff --git a/src/pinguctl.c b/src/pinguctl.c
-index 02dbe14..ea59f8a 100644
---- a/src/pinguctl.c
-+++ b/src/pinguctl.c
-@@ -1,9 +1,9 @@
--
- #include <sys/socket.h>
- #include <sys/un.h>
-
- #include <errno.h>
- #include <stdio.h>
-+#include <string.h>
- #include <unistd.h>
-
- #include "log.h"
---
-1.8.4.1
-
diff --git a/main/pingu/APKBUILD b/main/pingu/APKBUILD
index 6255493ff9..ba9f66c807 100644
--- a/main/pingu/APKBUILD
+++ b/main/pingu/APKBUILD
@@ -1,17 +1,16 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pingu
-pkgver=1.4
-pkgrel=2
+pkgver=1.5
+pkgrel=0
pkgdesc="Small daemon that pings hosts and executes a script when status change"
url="http://git.alpinelinux.org/cgit/pingu"
arch="all"
license="GPL"
-makedepends="libev-dev lua-dev asciidoc"
+makedepends="libev-dev lua-dev asciidoc linux-headers"
depends=
subpackages="$pkgname-doc lua-pingu:_lua mtu"
source="pingu-$pkgver.tar.gz::https://github.com/ncopa/pingu/archive/v$pkgver.tar.gz
- 0001-fix-various-include-issues-and-remove-unused-functio.patch
pingu.initd
"
@@ -66,12 +65,9 @@ _lua() {
mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr/
}
-md5sums="b19154994b8f88186c4ed81a4ff26bdb pingu-1.4.tar.gz
-59387cd04a8c7afd499d20b9e4de4ecc 0001-fix-various-include-issues-and-remove-unused-functio.patch
+md5sums="3454ef7723e446d917c389c0615c62b4 pingu-1.5.tar.gz
bcd4639d6b495b28ca99e5be857c7676 pingu.initd"
-sha256sums="fd08f82dc2eebcbd46e573b553770a09d284d5c5b0902cf6fc76dd331f587adb pingu-1.4.tar.gz
-ca4e4128b2f5f999681bfc295f164c96b18b72b259a986ecd0382086e2c95044 0001-fix-various-include-issues-and-remove-unused-functio.patch
+sha256sums="1caaef8765e7bd6950be8109a58187ad529237eec89742d923c1888f4c2a9f6d pingu-1.5.tar.gz
d07a15b014a0518e48f2d62f133bc6a343f5cb11c850f93272633f7a6a063fab pingu.initd"
-sha512sums="3410bbff46d9d1deda4f39345374138296052cc7cb1e2987ed206043223fe2a5151f719b01c5cd8090e2c9e577260ad658861a5d72bfb1fee6dc560ff3d933be pingu-1.4.tar.gz
-f0fe97ae486235fb714d3a3b2c985befb3c20dd9837c0120ee0d0434a6c2123318f2956ad3d81bc1268583bc16251eeef12481f64f295ce82c1c626169963051 0001-fix-various-include-issues-and-remove-unused-functio.patch
+sha512sums="71e5fbe93f831f24d168957cdeaff2817a22f407575316d6515755bec760d10724821070549eaab562924237b96976a1a776ca903d5fe0cd9f9b69a38eadd8c9 pingu-1.5.tar.gz
35a54501843e75f0fa7be40dc60d613d5486836fe4cae88decc5d181141388cc2c191315de1fe949dd61f052c76cebd7ab93b9b53c007212197ec324ccc44ce0 pingu.initd"