New package: ndppd-0.2.5
This commit is contained in:
parent
8f6dea334c
commit
7e4df53154
6 changed files with 167 additions and 0 deletions
3
srcpkgs/ndppd/files/ndppd/log/run
Executable file
3
srcpkgs/ndppd/files/ndppd/log/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec logger -t ndppd
|
3
srcpkgs/ndppd/files/ndppd/run
Executable file
3
srcpkgs/ndppd/files/ndppd/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec ndppd -v
|
22
srcpkgs/ndppd/patches/0001-Version-bump.patch
Normal file
22
srcpkgs/ndppd/patches/0001-Version-bump.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From 715f9f330d8606d4a7b68900325f9b1455dd5368 Mon Sep 17 00:00:00 2001
|
||||
From: Rafael Cossovan <navossoc@gmail.com>
|
||||
Date: Tue, 3 Apr 2018 17:06:16 -0300
|
||||
Subject: [PATCH 1/3] Forgot to bump the version.
|
||||
|
||||
---
|
||||
src/ndppd.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ndppd.h b/src/ndppd.h
|
||||
index 57ba829..3e11221 100644
|
||||
--- a/src/ndppd.h
|
||||
+++ b/src/ndppd.h
|
||||
@@ -21,7 +21,7 @@
|
||||
#define NDPPD_NS_BEGIN namespace ndppd {
|
||||
#define NDPPD_NS_END }
|
||||
|
||||
-#define NDPPD_VERSION "0.2.4"
|
||||
+#define NDPPD_VERSION "0.2.5"
|
||||
|
||||
#include <assert.h>
|
||||
|
55
srcpkgs/ndppd/patches/0002-Fixes-strerror_r-GNU-XSI.patch
Normal file
55
srcpkgs/ndppd/patches/0002-Fixes-strerror_r-GNU-XSI.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
From 1f610129b475b417509b251e022ad46d2210ff50 Mon Sep 17 00:00:00 2001
|
||||
From: Rafael Cossovan <navossoc@gmail.com>
|
||||
Date: Tue, 3 Apr 2018 17:04:35 -0300
|
||||
Subject: [PATCH 2/3] Fixes strerror_r GNU/XSI issue #40.
|
||||
http://www.zverovich.net/2015/03/13/reliable-detection-of-strerror-variants.html
|
||||
|
||||
---
|
||||
src/logger.cc | 14 ++++++++++++-
|
||||
src/logger.h | 3 +++
|
||||
2 files changed, 15 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/logger.cc b/src/logger.cc
|
||||
index 6ddbea9..6ccb2a0 100644
|
||||
--- a/src/logger.cc
|
||||
+++ b/src/logger.cc
|
||||
@@ -84,6 +84,6 @@ std::string logger::err()
|
||||
{
|
||||
char buf[2048];
|
||||
- return strerror_r(errno, buf, sizeof(buf));
|
||||
+ return strerror_r_wrapper(strerror_r(errno, buf, sizeof(buf)), buf);
|
||||
}
|
||||
|
||||
logger logger::error()
|
||||
@@ -221,4 +221,16 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+// XSI-compliant: int
|
||||
+std::string logger::strerror_r_wrapper(int, char* s)
|
||||
+{
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
+// GNU-specific: char *
|
||||
+std::string logger::strerror_r_wrapper(char* s, char*)
|
||||
+{
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
NDPPD_NS_END
|
||||
diff --git a/src/logger.h b/src/logger.h
|
||||
index 7d3d7db..0446595 100644
|
||||
--- a/src/logger.h
|
||||
+++ b/src/logger.h
|
||||
@@ -91,6 +91,9 @@ class logger {
|
||||
|
||||
static int _max_pri;
|
||||
|
||||
+ // helpers for strerror_r
|
||||
+ static std::string strerror_r_wrapper(int, char* s);
|
||||
+ static std::string strerror_r_wrapper(char* s, char*);
|
||||
|
||||
};
|
||||
|
||||
|
64
srcpkgs/ndppd/patches/0003-fix-poll-header.patch
Normal file
64
srcpkgs/ndppd/patches/0003-fix-poll-header.patch
Normal file
|
@ -0,0 +1,64 @@
|
|||
From 88b9bc561ce42f2eb97ea041cd8920797b44dd53 Mon Sep 17 00:00:00 2001
|
||||
From: Rafael Cossovan <navossoc@gmail.com>
|
||||
Date: Tue, 3 Apr 2018 17:05:42 -0300
|
||||
Subject: [PATCH 3/3] Fixes a compile warning when building with musl: #warning
|
||||
redirecting incorrect #include <sys/poll.h> to <poll.h>
|
||||
|
||||
---
|
||||
src/iface.cc | 2 +-
|
||||
src/iface.h | 2 +-
|
||||
src/proxy.h | 2 +-
|
||||
src/rule.h | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/iface.cc b/src/iface.cc
|
||||
index f569d3c..7cbb57f 100644
|
||||
--- a/src/iface.cc
|
||||
+++ b/src/iface.cc
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
|
||||
#include <linux/filter.h>
|
||||
|
||||
diff --git a/src/iface.h b/src/iface.h
|
||||
index 9db59ab..df7ff35 100644
|
||||
--- a/src/iface.h
|
||||
+++ b/src/iface.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <net/ethernet.h>
|
||||
|
||||
#include "ndppd.h"
|
||||
diff --git a/src/proxy.h b/src/proxy.h
|
||||
index 8141b2a..9299d9a 100644
|
||||
--- a/src/proxy.h
|
||||
+++ b/src/proxy.h
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
|
||||
#include "ndppd.h"
|
||||
|
||||
diff --git a/src/rule.h b/src/rule.h
|
||||
index 0c2f79a..23086e6 100644
|
||||
--- a/src/rule.h
|
||||
+++ b/src/rule.h
|
||||
@@ -20,6 +20,6 @@
|
||||
#include <map>
|
||||
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
|
||||
#include "ndppd.h"
|
||||
|
20
srcpkgs/ndppd/template
Normal file
20
srcpkgs/ndppd/template
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Template file for 'ndppd'
|
||||
pkgname=ndppd
|
||||
version=0.2.5
|
||||
revision=1
|
||||
build_style=gnu-makefile
|
||||
short_desc="NDP Proxy Daemon"
|
||||
maintainer="lemmi <lemmi@nerd2nerd.org>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://github.com/DanielAdolfsson/ndppd"
|
||||
distfiles="https://github.com/DanielAdolfsson/ndppd/archive/${version}.tar.gz"
|
||||
checksum=ee934167f8357f0bd0015e201a77fbe4d028c59e89dc98113805c6855e1c3992
|
||||
patch_args="-Np1"
|
||||
|
||||
do_install() {
|
||||
vbin ndppd
|
||||
vman ndppd.1
|
||||
vman ndppd.conf.5
|
||||
vsv ndppd
|
||||
vsconf ndppd.conf-dist ndppd.conf
|
||||
}
|
Loading…
Reference in a new issue