mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Largely replace the Debian packaging with a new and much more up-to-date
Debhelper based version.
This commit is contained in:
18
debian/tests/functions.d/add-to.interfaces
vendored
Normal file
18
debian/tests/functions.d/add-to.interfaces
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
auto dummy0
|
||||
iface dummy0 inet static
|
||||
pre-up ip link add dummy0 type dummy
|
||||
address 192.168.141.1
|
||||
netmask 255.255.255.248
|
||||
post-down ip link del dummy0
|
||||
|
||||
auto veth0
|
||||
iface veth0 inet static
|
||||
pre-up ip netns add clientnet
|
||||
pre-up ip link add veth0 type veth peer veth1 netns clientnet
|
||||
address 192.168.142.1
|
||||
netmask 255.255.255.248
|
||||
post-down ip link del veth0
|
||||
post-down ip netns del clientnet
|
||||
|
||||
iface veth1 inet dhcp
|
||||
2
debian/tests/functions.d/add-to.named.conf.local
vendored
Normal file
2
debian/tests/functions.d/add-to.named.conf.local
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
zone "autopkg.test" { type master; file "/etc/bind/db.autopkg.test"; };
|
||||
|
||||
18
debian/tests/functions.d/db.autopkg.test
vendored
Normal file
18
debian/tests/functions.d/db.autopkg.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
$TTL 604800
|
||||
@ IN SOA ns.autopkg.test. hostmaster.autopkg.test. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
300 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN NS ns
|
||||
ns IN A 192.168.141.1
|
||||
host IN A 192.168.142.1
|
||||
dhcp0 IN A 192.168.142.2
|
||||
dhcp1 IN A 192.168.142.3
|
||||
dhcp2 IN A 192.168.142.4
|
||||
dhcp3 IN A 192.168.142.5
|
||||
dhcp4 IN A 192.168.142.6
|
||||
brdcst IN A 192.168.142.7
|
||||
|
||||
4
debian/tests/functions.d/dig.patterns
vendored
Normal file
4
debian/tests/functions.d/dig.patterns
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
ns.autopkg.test. hostmaster.autopkg.test. 2 604800 86400 2419200 300
|
||||
ns.autopkg.test.
|
||||
192.168.141.1
|
||||
192.168.142.5
|
||||
6
debian/tests/functions.d/dnsmasq-autopkgtest.conf
vendored
Normal file
6
debian/tests/functions.d/dnsmasq-autopkgtest.conf
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
no-resolv
|
||||
server=/autopkg.test/192.168.141.1
|
||||
listen-address=192.168.142.1,127.0.0.1
|
||||
bind-interfaces
|
||||
dhcp-range=192.168.142.2,192.168.142.6
|
||||
dhcp-authoritative
|
||||
42
debian/tests/functions.d/dnsmasq.alt-autopkgtest.default
vendored
Normal file
42
debian/tests/functions.d/dnsmasq.alt-autopkgtest.default
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# This file has six functions:
|
||||
# 1) to completely disable starting this dnsmasq instance
|
||||
# 2) to set DOMAIN_SUFFIX by running `dnsdomainname`
|
||||
# 3) to select an alternative config file
|
||||
# by setting DNSMASQ_OPTS to --conf-file=<file>
|
||||
# 4) to tell dnsmasq to read the files in /etc/dnsmasq.d for
|
||||
# more configuration variables.
|
||||
# 5) to stop the resolvconf package from controlling dnsmasq's
|
||||
# idea of which upstream nameservers to use.
|
||||
# 6) to avoid using this dnsmasq instance as the system's default resolver
|
||||
# by setting DNSMASQ_EXCEPT="lo"
|
||||
# For upgraders from very old versions, all the shell variables set
|
||||
# here in previous versions are still honored by the init script
|
||||
# so if you just keep your old version of this file nothing will break.
|
||||
|
||||
#DOMAIN_SUFFIX=`dnsdomainname`
|
||||
DNSMASQ_OPTS="--conf-file=/etc/dnsmasq.alt.conf"
|
||||
|
||||
# The dnsmasq daemon is run by default conforming to the Debian Policy.
|
||||
# To disable the service,
|
||||
# for SYSV init, use "update-rc.d dnsmasq disable",
|
||||
# for systemd, use "systemctl disable dnsmasq".
|
||||
|
||||
# By default search this drop directory for configuration options.
|
||||
# Libvirt leaves a file here to make the system dnsmasq play nice.
|
||||
# Comment out this line if you don't want this. The dpkg-* are file
|
||||
# endings which cause dnsmasq to skip that file. This avoids pulling
|
||||
# in backups made by dpkg.
|
||||
CONFIG_DIR=/etc/dnsmasq.alt.d,.dpkg-dist,.dpkg-old,.dpkg-new
|
||||
|
||||
# If the resolvconf package is installed, dnsmasq will use its output
|
||||
# rather than the contents of /etc/resolv.conf to find upstream
|
||||
# nameservers. Uncommenting this line inhibits this behaviour.
|
||||
# Note that including a "resolv-file=<filename>" line in
|
||||
# /etc/dnsmasq.conf is not enough to override resolvconf if it is
|
||||
# installed: the line below must be uncommented.
|
||||
#IGNORE_RESOLVCONF=yes
|
||||
|
||||
# If the resolvconf package is installed, dnsmasq will tell resolvconf
|
||||
# to use dnsmasq under 127.0.0.1 as the system's default resolver.
|
||||
# Uncommenting this line inhibits this behaviour.
|
||||
#DNSMASQ_EXCEPT="lo"
|
||||
6
debian/tests/functions.d/ip-addr.patterns
vendored
Normal file
6
debian/tests/functions.d/ip-addr.patterns
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
?: veth1@if?: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
|
||||
link/ether ??:??:??:??:??:?? brd ff:ff:ff:ff:ff:ff link-netnsid 0
|
||||
inet 192.168.142.?/29 brd 192.168.142.7 scope global dynamic veth1
|
||||
valid_lft 3[56][0-9][0-9]sec preferred_lft 3[56][0-9][0-9]sec
|
||||
inet6 fe80::*:*:*:*/64 scope link*
|
||||
valid_lft forever preferred_lft forever
|
||||
40
debian/tests/functions.d/log.lua
vendored
Normal file
40
debian/tests/functions.d/log.lua
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
-- Lua script logging calls from dnsmasq
|
||||
|
||||
-- Open the log file in append mode
|
||||
logfile = assert(io.open("/var/log/dnsmasq-lua.log", "a"))
|
||||
|
||||
-- Prepend date and time to a string and write the result to the log file
|
||||
function __log(str)
|
||||
logfile:write(os.date("!%FT%TZ ")..str.."\n")
|
||||
end
|
||||
|
||||
-- flush the log file
|
||||
function __flush_log()
|
||||
logfile:flush()
|
||||
end
|
||||
|
||||
-- Log a call to init()
|
||||
function init()
|
||||
__log("initialising")
|
||||
__flush_log()
|
||||
end
|
||||
|
||||
-- Log a call to shutdown()
|
||||
function shutdown()
|
||||
__log("shutting down")
|
||||
__flush_log()
|
||||
end
|
||||
|
||||
-- Log a call to lease() including all arguments
|
||||
function lease(operation, params)
|
||||
local lines = {}
|
||||
__log(operation.." lease")
|
||||
for key,value in pairs(params) do
|
||||
table.insert(lines, key..": "..value)
|
||||
end
|
||||
table.sort(lines)
|
||||
for index,line in ipairs(lines) do
|
||||
__log("\t"..line)
|
||||
end
|
||||
__flush_log()
|
||||
end
|
||||
10
debian/tests/functions.d/log.patterns
vendored
Normal file
10
debian/tests/functions.d/log.patterns
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
????-??-??T??:??:??Z initialising
|
||||
????-??-??T??:??:??Z add lease
|
||||
????-??-??T??:??:??Z client_id: ??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??
|
||||
????-??-??T??:??:??Z data_missing: 1.0
|
||||
????-??-??T??:??:??Z hostname: ?*
|
||||
????-??-??T??:??:??Z interface: veth0
|
||||
????-??-??T??:??:??Z ip_address: 192.168.142.[2-6]
|
||||
????-??-??T??:??:??Z lease_expires: [1-9]*
|
||||
????-??-??T??:??:??Z mac_address: ??:??:??:??:??:??
|
||||
????-??-??T??:??:??Z time_remaining: 3600.0
|
||||
6
debian/tests/functions.d/named.conf.options
vendored
Normal file
6
debian/tests/functions.d/named.conf.options
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
listen-on { 192.168.141.1; };
|
||||
recursion no;
|
||||
};
|
||||
|
||||
1
debian/tests/functions.d/options+lua.patterns
vendored
Normal file
1
debian/tests/functions.d/options+lua.patterns
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
|
||||
1
debian/tests/functions.d/options.patterns
vendored
Normal file
1
debian/tests/functions.d/options.patterns
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
|
||||
Reference in New Issue
Block a user