aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pdns-gui
diff options
context:
space:
mode:
Diffstat (limited to 'testing/pdns-gui')
-rw-r--r--testing/pdns-gui/0010-replace-bash-with-sh.patch81
-rw-r--r--testing/pdns-gui/0020-update-for-mysql55.patch67
-rw-r--r--testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch12
-rw-r--r--testing/pdns-gui/0040-alpine-default-htaccess-fix.patch11
-rw-r--r--testing/pdns-gui/APKBUILD63
-rw-r--r--testing/pdns-gui/pdns-gui.apache2.conf7
-rw-r--r--testing/pdns-gui/pdns-gui.post-install12
-rw-r--r--testing/pdns-gui/pdns-gui.post-upgrade8
8 files changed, 261 insertions, 0 deletions
diff --git a/testing/pdns-gui/0010-replace-bash-with-sh.patch b/testing/pdns-gui/0010-replace-bash-with-sh.patch
new file mode 100644
index 0000000000..e684009bff
--- /dev/null
+++ b/testing/pdns-gui/0010-replace-bash-with-sh.patch
@@ -0,0 +1,81 @@
+--- ./batch/install.sh.orig
++++ ./batch/install.sh
+@@ -1,10 +1,11 @@
+-#!/bin/bash
++#!/bin/sh
+
+-abspath=$(cd ${0%/*} && pwd -P)
++abspath=${0%/*}
++php=$(which php)
+
+-if [[ `which php` == "" ]]; then
++if [ -z "$php" ]; then
+ echo "Error: can't locate PHP CLI interpreter"
+ exit 1
+ fi
+
+-php -q $abspath/install.php
++$php -q $abspath/install.php
+--- ./batch/install.php.orig
++++ ./batch/install.php
+@@ -110,7 +110,7 @@
+ echo "\n\nAnd make sure 'mod_rewrite' is enabled.\n\n";
+ /**
+ * Interactively prompts for input without echoing to the terminal.
+- * Requires a bash shell or Windows and won't work with
++ * Requires a sh shell or Windows and won't work with
+ * safe_mode settings (Uses `shell_exec`)
+ */
+ function prompt_silent($prompt = "Enter Password:") {
+@@ -125,12 +125,12 @@
+ unlink($vbscript);
+ return $password;
+ } else {
+- $command = "/usr/bin/env bash -c 'echo OK'";
++ $command = "/usr/bin/env sh -c 'echo OK'";
+ if (rtrim(shell_exec($command)) !== 'OK') {
+- trigger_error("Can't invoke bash");
++ trigger_error("Can't invoke sh");
+ return;
+ }
+- $command = "/usr/bin/env bash -c 'read -s -p \""
++ $command = "/usr/bin/env sh -c 'read -s -p \""
+ . addslashes($prompt)
+ . "\" mypassword && echo \$mypassword'";
+ $password = rtrim(shell_exec($command));
+--- ./batch/upgrade.sh.orig
++++ ./batch/upgrade.sh
+@@ -1,10 +1,11 @@
+-#!/bin/bash
++#!/bin/sh
+
+-abspath=$(cd ${0%/*} && pwd -P)
++abspath=${0%/*}
++php=$(which php)
+
+-if [[ `which php` == "" ]]; then
++if [ -z "$php" ]; then
+ echo "Error: can't locate PHP CLI interpreter"
+ exit 1
+ fi
+
+-php -q $abspath/upgrade.php
++$php -q $abspath/upgrade.php
+--- ./batch/dev/refresh.sh.orig
++++ ./batch/dev/refresh.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ echo ""
+ echo ""
+@@ -15,8 +15,7 @@
+ echo -n " Do you want to continue [no]: "
+ read confirm
+
+-if [[ "$confirm" != "YES" ]]
+-then
++if [ "$confirm" != "YES" ]; then
+ exit 0
+ fi
+
diff --git a/testing/pdns-gui/0020-update-for-mysql55.patch b/testing/pdns-gui/0020-update-for-mysql55.patch
new file mode 100644
index 0000000000..2f2800a202
--- /dev/null
+++ b/testing/pdns-gui/0020-update-for-mysql55.patch
@@ -0,0 +1,67 @@
+--- ./data/sql/lib.model.schema.sql.orig
++++ ./data/sql/lib.model.schema.sql
+@@ -21,7 +21,7 @@
+ `account` VARCHAR(40),
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name_index` (`name`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- records
+@@ -47,7 +47,7 @@
+ CONSTRAINT `records_FK_1`
+ FOREIGN KEY (`domain_id`)
+ REFERENCES `domains` (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- supermasters
+@@ -63,7 +63,7 @@
+ `account` VARCHAR(40),
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- template
+@@ -78,7 +78,7 @@
+ `name` VARCHAR(255),
+ `type` VARCHAR(45),
+ PRIMARY KEY (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- template_record
+@@ -101,7 +101,7 @@
+ CONSTRAINT `template_record_FK_1`
+ FOREIGN KEY (`template_id`)
+ REFERENCES `template` (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- setting
+@@ -115,7 +115,7 @@
+ `name` VARCHAR(255) NOT NULL,
+ `value` TEXT,
+ PRIMARY KEY (`name`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ # This restores the fkey checks, after having unset them earlier
+ SET FOREIGN_KEY_CHECKS = 1;
+--- ./data/sql/plugins.sfPropelAuditPlugin.lib.model.schema.sql.orig
++++ ./data/sql/plugins.sfPropelAuditPlugin.lib.model.schema.sql
+@@ -22,7 +22,7 @@
+ `type` VARCHAR(255),
+ `created_at` DATETIME,
+ PRIMARY KEY (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ # This restores the fkey checks, after having unset them earlier
+ SET FOREIGN_KEY_CHECKS = 1;
diff --git a/testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch b/testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch
new file mode 100644
index 0000000000..6c3c5a7aa8
--- /dev/null
+++ b/testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch
@@ -0,0 +1,12 @@
+--- ./data/symfony/config/php.yml.orig
++++ ./data/symfony/config/php.yml
+@@ -4,9 +4,6 @@
+ arg_separator.output: |
+ &
+
+-check:
+- zend.ze1_compatibility_mode: off
+-
+ warn:
+ magic_quotes_gpc: off
+ register_globals: off
diff --git a/testing/pdns-gui/0040-alpine-default-htaccess-fix.patch b/testing/pdns-gui/0040-alpine-default-htaccess-fix.patch
new file mode 100644
index 0000000000..4842a425ff
--- /dev/null
+++ b/testing/pdns-gui/0040-alpine-default-htaccess-fix.patch
@@ -0,0 +1,11 @@
+--- ./web/.htaccess.orig
++++ ./web/.htaccess
+@@ -5,7 +5,7 @@
+
+ # uncomment the following line, if you are having trouble
+ # getting no_script_name to work
+- #RewriteBase /
++ RewriteBase /pdns-gui
+
+ # we skip all files with .something
+ # comment the following 3 lines to allow periods in routes
diff --git a/testing/pdns-gui/APKBUILD b/testing/pdns-gui/APKBUILD
new file mode 100644
index 0000000000..4812790124
--- /dev/null
+++ b/testing/pdns-gui/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=pdns-gui
+pkgver=0.3.3
+pkgrel=1
+pkgdesc="Web-based GUI for administering PowerDNS"
+url="http://code.google.com/p/pdns-gui/"
+arch="noarch"
+license="GPL"
+depends="mysql php php-cli php-mysql php-xsl pdns pdns-backend-mysql"
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.post-install $pkgname.post-upgrade"
+subpackages=
+source="http://$pkgname.googlecode.com/files/$pkgname.$pkgver.tgz
+ 0010-replace-bash-with-sh.patch
+ 0020-update-for-mysql55.patch
+ 0030-remove-zend.ze1_compatibility_mode-option.patch
+ 0040-alpine-default-htaccess-fix.patch
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/$pkgname.$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ # copy pdns-gui
+ mkdir -p "$pkgdir"/usr/share/webapps/$pkgname || return 1
+ cp -a "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
+
+ # move log directory
+ mkdir -p "$pkgdir"/var/log/$pkgname || return 1
+ chmod 2755 "$pkgdir"/var/log/$pkgname || return 1
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/log || return 1
+ ln -fs /var/log/$pkgname "$pkgdir"/usr/share/webapps/$pkgname/log \
+ || return 1
+
+ # remove the install file
+ rm "$pkgdir"/usr/share/webapps/$pkgname/INSTALL || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+}
+
+md5sums="caa45c5408764ccd98cfffd69e5e976f pdns-gui.0.3.3.tgz
+98acdea457a4805c77cea373a6d57029 0010-replace-bash-with-sh.patch
+21683d18b30aef6082803339413f8c42 0020-update-for-mysql55.patch
+8865c965b6c81dbf2d9de5f8956b0ae0 0030-remove-zend.ze1_compatibility_mode-option.patch
+d621eecb4f688640cb514aff1ea8ef7d 0040-alpine-default-htaccess-fix.patch
+2a4d9133e4ac0c22ed7bd408052b5de0 pdns-gui.apache2.conf"
diff --git a/testing/pdns-gui/pdns-gui.apache2.conf b/testing/pdns-gui/pdns-gui.apache2.conf
new file mode 100644
index 0000000000..35e866853b
--- /dev/null
+++ b/testing/pdns-gui/pdns-gui.apache2.conf
@@ -0,0 +1,7 @@
+Alias /pdns-gui "/usr/share/webapps/pdns-gui/web"
+<Directory "/usr/share/webapps/pdns-gui/web">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/testing/pdns-gui/pdns-gui.post-install b/testing/pdns-gui/pdns-gui.post-install
new file mode 100644
index 0000000000..4bc6d990a0
--- /dev/null
+++ b/testing/pdns-gui/pdns-gui.post-install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* pdns-gui has been installed in: /usr/share/webapps/pdns-gui" >&2
+echo "* pdns-gui logs are at : /var/log/pdns-gui" >&2
+echo "* pdns-gui apache2 config is at : /etc/apache2/conf.d/pdns-gui.conf" >&2
+echo "*" >&2
+echo "* To finish installing pdns-gui, please run the following script:" >&2
+echo "* /usr/share/webapps/pdns-gui/batch/install.sh" >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/pdns-gui/pdns-gui.post-upgrade b/testing/pdns-gui/pdns-gui.post-upgrade
new file mode 100644
index 0000000000..7d9922a5d1
--- /dev/null
+++ b/testing/pdns-gui/pdns-gui.post-upgrade
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* To finish upgrading pdns-gui, please run the following script:" >&2
+echo "* /usr/share/webapps/pdns-gui/batch/upgrade.sh" >&2
+echo "*" >&2
+
+exit 0