mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix
This commit is contained in:
parent
d4ceecb05b
commit
a8fff12089
13 changed files with 6747 additions and 0 deletions
57
pdnsd-alt/Makefile
Normal file
57
pdnsd-alt/Makefile
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=pdnsd
|
||||
PKG_VERSION:=1.2.9b-par
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/shadowsocks/pdnsd.git
|
||||
PKG_SOURCE_DATE:=2012-04-26
|
||||
PKG_SOURCE_VERSION:=a8e46ccba7b0fa2230d6c42ab6dcd92926f6c21d
|
||||
PKG_MIRROR_HASH:=e3e9c56cf91b12d8db73def2c247be2f726a052bed012f7a1e48946375f8e478
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/pdnsd-alt
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=IP Addresses and Names
|
||||
TITLE:=Proxy DNS Server
|
||||
DEPENDS:=+libpthread
|
||||
endef
|
||||
|
||||
define Package/pdnsd-alt/description
|
||||
pdnsd, is an IPv6 capable proxy DNS server with permanent caching (the cache
|
||||
contents are written to hard disk on exit) that is designed to cope with
|
||||
unreachable or down DNS servers (for example in dial-in networking).
|
||||
|
||||
pdnsd can be used with applications that do dns lookups, eg on startup, and
|
||||
can't be configured to change that behaviour, to prevent the often
|
||||
minute-long hangs (or even crashes) that result from stalled dns queries.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-cachedir=/var/pdnsd \
|
||||
--with-target=Linux
|
||||
|
||||
define Package/pdnsd-alt/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pdnsd $(1)/usr/sbin/pdnsd
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pdnsd-ctl $(1)/usr/sbin/pdnsd-ctl
|
||||
|
||||
#$(INSTALL_DIR) $(1)/etc
|
||||
#$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/pdnsd.conf.sample $(1)/etc/pdnsd.conf
|
||||
#$(INSTALL_DIR) $(1)/etc/init.d
|
||||
#$(INSTALL_BIN) ./files/pdnsd.init $(1)/etc/init.d/pdnsd
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,pdnsd-alt))
|
||||
46
pdnsd-alt/files/pdnsd.init
Executable file
46
pdnsd-alt/files/pdnsd.init
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=65
|
||||
NAME=pdnsd
|
||||
DESC="proxy DNS server"
|
||||
|
||||
DAEMON=/usr/sbin/pdnsd
|
||||
PID_FILE=/var/run/$NAME.pid
|
||||
CACHEDIR=/var/pdnsd
|
||||
CACHE=$CACHEDIR/pdnsd.cache
|
||||
|
||||
USER=nobody
|
||||
GROUP=nogroup
|
||||
|
||||
start() {
|
||||
echo -n "Starting $DESC: $NAME"
|
||||
|
||||
gen_cache
|
||||
|
||||
$DAEMON --daemon -p $PID_FILE
|
||||
echo " ."
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping $DESC: $NAME"
|
||||
kill `cat $PID_FILE` > /dev/null 2>&1
|
||||
rm -rf $PID_FILE
|
||||
echo " ."
|
||||
}
|
||||
|
||||
restart() {
|
||||
echo "Restarting $DESC: $NAME... "
|
||||
stop
|
||||
sleep 2
|
||||
start
|
||||
}
|
||||
|
||||
gen_cache()
|
||||
{
|
||||
if ! test -f "$CACHE"; then
|
||||
mkdir -p `dirname $CACHE`
|
||||
dd if=/dev/zero of="$CACHE" bs=1 count=4 2> /dev/null
|
||||
chown -R $USER.$GROUP $CACHEDIR
|
||||
fi
|
||||
}
|
||||
|
||||
42
pdnsd-alt/patches/010-no-doc-and-test.patch
Normal file
42
pdnsd-alt/patches/010-no-doc-and-test.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-SUBDIRS = src doc contrib
|
||||
+SUBDIRS = src contrib
|
||||
|
||||
EXTRA_DIST = version ChangeLog.old COPYING.BSD README.par README.par.old PKGBUILD
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -196,7 +196,7 @@ threadlib = @threadlib@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-SUBDIRS = src doc contrib
|
||||
+SUBDIRS = src contrib
|
||||
EXTRA_DIST = version ChangeLog.old COPYING.BSD README.par README.par.old PKGBUILD
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -15,7 +15,7 @@ EXTRA_DIST = make_rr_types_h.pl rr_types
|
||||
|
||||
## Try to do this last
|
||||
|
||||
-SUBDIRS = . pdnsd-ctl rc test
|
||||
+SUBDIRS = . pdnsd-ctl
|
||||
|
||||
$(pdnsd_OBJECTS): rr_types.h
|
||||
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -215,7 +215,7 @@ pdnsd_SOURCES = conf-parser.c conff.c co
|
||||
freebsd_netinet_ip_icmp.h
|
||||
|
||||
EXTRA_DIST = make_rr_types_h.pl rr_types.in
|
||||
-SUBDIRS = . pdnsd-ctl rc test
|
||||
+SUBDIRS = . pdnsd-ctl
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
66
pdnsd-alt/patches/020-headers.patch
Normal file
66
pdnsd-alt/patches/020-headers.patch
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
--- a/src/conff.h
|
||||
+++ b/src/conff.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/socket.h>
|
||||
-#include <net/if.h>
|
||||
+#include <linux/if.h>
|
||||
#include "ipvers.h"
|
||||
#include "list.h"
|
||||
|
||||
--- a/src/dns.h
|
||||
+++ b/src/dns.h
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <config.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
-#include <net/if.h>
|
||||
+#include <linux/if.h>
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include "rr_types.h"
|
||||
--- a/src/dns_answer.c
|
||||
+++ b/src/dns_answer.c
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <netdb.h>
|
||||
--- a/src/dns_query.c
|
||||
+++ b/src/dns_query.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <netdb.h>
|
||||
--- a/src/icmp.c
|
||||
+++ b/src/icmp.c
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
--- a/src/netdev.c
|
||||
+++ b/src/netdev.c
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "ipvers.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
-#include <net/if.h>
|
||||
+#include <linux/if.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
Loading…
Add table
Add a link
Reference in a new issue