-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from exonet/tsi/pdns-42
PowerDNS 4.2 / PHP 7.4 support
- Loading branch information
Showing
31 changed files
with
479 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/.idea/ | ||
/vendor/ | ||
composer.lock | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,3 @@ enabled: | |
|
||
disabled: | ||
- align_double_arrow | ||
- simplified_null_return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
dist: xenial | ||
language: php | ||
|
||
services: | ||
- mysql | ||
|
||
env: | ||
- PDNS_VERSION=41 | ||
- PDNS_VERSION=42 | ||
|
||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
- 7.4 | ||
|
||
cache: | ||
directories: | ||
- vendor | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- mysql -e 'CREATE DATABASE powerdns;' | ||
- if [[ "$PDNS_VERSION" == "41" ]]; then mysql -u root powerdns < .travis/pdns-41.sql; fi | ||
- if [[ "$PDNS_VERSION" == "42" ]]; then mysql -u root powerdns < .travis/pdns-42.sql; fi | ||
|
||
install: | ||
- sudo ./.travis/install-pdns.sh | ||
- composer install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# Use the PowerDNS repo as source. | ||
if [ "$PDNS_VERSION" = "41" ]; then | ||
sudo echo 'deb [arch=amd64] http://repo.powerdns.com/ubuntu xenial-auth-41 main' > /etc/apt/sources.list.d/pdns.list | ||
fi | ||
|
||
if [ "$PDNS_VERSION" = "42" ]; then | ||
sudo echo 'deb [arch=amd64] http://repo.powerdns.com/ubuntu xenial-auth-42 main' > /etc/apt/sources.list.d/pdns.list | ||
fi | ||
|
||
# Get the specific release and install. | ||
curl https://repo.powerdns.com/FD380FBB-pub.asc | sudo apt-key add - && sudo apt-get update && sudo apt-get install pdns-server pdns-backend-mysql | ||
sudo cp "$TRAVIS_BUILD_DIR/.travis/pdns.conf" /etc/powerdns/pdns.conf | ||
sudo service pdns restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
CREATE TABLE domains ( | ||
id INT AUTO_INCREMENT, | ||
name VARCHAR(255) NOT NULL, | ||
master VARCHAR(128) DEFAULT NULL, | ||
last_check INT DEFAULT NULL, | ||
type VARCHAR(6) NOT NULL, | ||
notified_serial INT DEFAULT NULL, | ||
account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE UNIQUE INDEX name_index ON domains(name); | ||
|
||
|
||
CREATE TABLE records ( | ||
id BIGINT AUTO_INCREMENT, | ||
domain_id INT DEFAULT NULL, | ||
name VARCHAR(255) DEFAULT NULL, | ||
type VARCHAR(10) DEFAULT NULL, | ||
content VARCHAR(64000) DEFAULT NULL, | ||
ttl INT DEFAULT NULL, | ||
prio INT DEFAULT NULL, | ||
change_date INT DEFAULT NULL, | ||
disabled TINYINT(1) DEFAULT 0, | ||
ordername VARCHAR(255) BINARY DEFAULT NULL, | ||
auth TINYINT(1) DEFAULT 1, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX nametype_index ON records(name,type); | ||
CREATE INDEX domain_id ON records(domain_id); | ||
CREATE INDEX ordername ON records (ordername); | ||
|
||
|
||
CREATE TABLE supermasters ( | ||
ip VARCHAR(64) NOT NULL, | ||
nameserver VARCHAR(255) NOT NULL, | ||
account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, | ||
PRIMARY KEY (ip, nameserver) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
|
||
CREATE TABLE comments ( | ||
id INT AUTO_INCREMENT, | ||
domain_id INT NOT NULL, | ||
name VARCHAR(255) NOT NULL, | ||
type VARCHAR(10) NOT NULL, | ||
modified_at INT NOT NULL, | ||
account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, | ||
comment TEXT CHARACTER SET 'utf8' NOT NULL, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX comments_name_type_idx ON comments (name, type); | ||
CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); | ||
|
||
|
||
CREATE TABLE domainmetadata ( | ||
id INT AUTO_INCREMENT, | ||
domain_id INT NOT NULL, | ||
kind VARCHAR(32), | ||
content TEXT, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); | ||
|
||
|
||
CREATE TABLE cryptokeys ( | ||
id INT AUTO_INCREMENT, | ||
domain_id INT NOT NULL, | ||
flags INT NOT NULL, | ||
active BOOL, | ||
content TEXT, | ||
PRIMARY KEY(id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX domainidindex ON cryptokeys(domain_id); | ||
|
||
|
||
CREATE TABLE tsigkeys ( | ||
id INT AUTO_INCREMENT, | ||
name VARCHAR(255), | ||
algorithm VARCHAR(50), | ||
secret VARCHAR(255), | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
CREATE TABLE domains ( | ||
id INT AUTO_INCREMENT, | ||
name VARCHAR(255) NOT NULL, | ||
master VARCHAR(128) DEFAULT NULL, | ||
last_check INT DEFAULT NULL, | ||
type VARCHAR(6) NOT NULL, | ||
notified_serial INT UNSIGNED DEFAULT NULL, | ||
account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE UNIQUE INDEX name_index ON domains(name); | ||
|
||
|
||
CREATE TABLE records ( | ||
id BIGINT AUTO_INCREMENT, | ||
domain_id INT DEFAULT NULL, | ||
name VARCHAR(255) DEFAULT NULL, | ||
type VARCHAR(10) DEFAULT NULL, | ||
content VARCHAR(64000) DEFAULT NULL, | ||
ttl INT DEFAULT NULL, | ||
prio INT DEFAULT NULL, | ||
disabled TINYINT(1) DEFAULT 0, | ||
ordername VARCHAR(255) BINARY DEFAULT NULL, | ||
auth TINYINT(1) DEFAULT 1, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX nametype_index ON records(name,type); | ||
CREATE INDEX domain_id ON records(domain_id); | ||
CREATE INDEX ordername ON records (ordername); | ||
|
||
|
||
CREATE TABLE supermasters ( | ||
ip VARCHAR(64) NOT NULL, | ||
nameserver VARCHAR(255) NOT NULL, | ||
account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, | ||
PRIMARY KEY (ip, nameserver) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
|
||
CREATE TABLE comments ( | ||
id INT AUTO_INCREMENT, | ||
domain_id INT NOT NULL, | ||
name VARCHAR(255) NOT NULL, | ||
type VARCHAR(10) NOT NULL, | ||
modified_at INT NOT NULL, | ||
account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, | ||
comment TEXT CHARACTER SET 'utf8' NOT NULL, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX comments_name_type_idx ON comments (name, type); | ||
CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); | ||
|
||
|
||
CREATE TABLE domainmetadata ( | ||
id INT AUTO_INCREMENT, | ||
domain_id INT NOT NULL, | ||
kind VARCHAR(32), | ||
content TEXT, | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); | ||
|
||
|
||
CREATE TABLE cryptokeys ( | ||
id INT AUTO_INCREMENT, | ||
domain_id INT NOT NULL, | ||
flags INT NOT NULL, | ||
active BOOL, | ||
content TEXT, | ||
PRIMARY KEY(id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE INDEX domainidindex ON cryptokeys(domain_id); | ||
|
||
|
||
CREATE TABLE tsigkeys ( | ||
id INT AUTO_INCREMENT, | ||
name VARCHAR(255), | ||
algorithm VARCHAR(50), | ||
secret VARCHAR(255), | ||
PRIMARY KEY (id) | ||
) Engine=InnoDB CHARACTER SET 'latin1'; | ||
|
||
CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
launch=gmysql | ||
gmysql-host=localhost | ||
gmysql-user=root | ||
gmysql-password= | ||
gmysql-dbname=powerdns | ||
gmysql-port=3306 | ||
gmysql-dnssec=yes | ||
|
||
api=yes | ||
api-key=apiKey | ||
|
||
webserver=yes | ||
webserver-port=8001 | ||
webserver-address=0.0.0.0 | ||
webserver-allow-from=0.0.0.0/0,::/0 | ||
|
||
default-soa-name=ns1.powerdns-php | ||
default-soa-mail=hostmaster@powerdns-php | ||
|
||
default-ksk-algorithm=rsasha256 | ||
default-ksk-size=2048 | ||
default-zsk-algorithm=rsasha256 | ||
default-zsk-size=1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.