aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2018-11-08 02:42:50 +0200
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-11-12 10:52:24 +0000
commitaa559fd44003c124d0caae346e46c8467c8b06c4 (patch)
tree2cbb28e22cd3f6cce45b94625616d34a0957a27f
parent0d21931ffd43bf41d8776f47b396b7a7b0f345a5 (diff)
downloadaports-aa559fd44003c124d0caae346e46c8467c8b06c4.tar.gz
aports-aa559fd44003c124d0caae346e46c8467c8b06c4.tar.bz2
aports-aa559fd44003c124d0caae346e46c8467c8b06c4.tar.xz
community/phpldapadmin: modernize and bump dependencies to use php7
-rw-r--r--community/phpldapadmin/APKBUILD50
-rw-r--r--community/phpldapadmin/php72-db8a98c7a5ae6352018e2a2673e3d24df03f3e48.patch40
2 files changed, 58 insertions, 32 deletions
diff --git a/community/phpldapadmin/APKBUILD b/community/phpldapadmin/APKBUILD
index 69bbd340c9..a1291f6b65 100644
--- a/community/phpldapadmin/APKBUILD
+++ b/community/phpldapadmin/APKBUILD
@@ -1,17 +1,20 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
-_php=php5
+_php=php7
pkgname=phpldapadmin
pkgver=1.2.3
-pkgrel=4
+pkgrel=5
pkgdesc="Web front-end for managing OpenLDAP"
url="http://phpldapadmin.sourceforge.net"
arch="noarch"
license="GPL-2.0"
-depends="${_php} ${_php}-ldap ${_php}-gettext ${_php}-xml"
-depends_dev=
-makedepends="$depends_dev"
-install=
-subpackages=
+depends="${_php} ${_php}-ldap
+ ${_php}-gettext
+ ${_php}-mbstring
+ ${_php}-opcache
+ ${_php}-openssl
+ ${_php}-session
+ ${_php}-xml
+ "
source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-php5/$pkgver/$pkgname-$pkgver.tgz
$pkgname.additional-template
phpldapadmin-1.2.3-force-ssha512.patch
@@ -20,43 +23,25 @@ source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-php5/$pkgver
phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
phpldapadmin-1.2.3_use-preg_replace_callback.patch
CVE-2017-11107.patch
+ php72-db8a98c7a5ae6352018e2a2673e3d24df03f3e48.patch
"
+options="!check" # no test suite
# secfixes:
# 1.2.3-r4:
# - CVE-2017-11107
-_builddir="$srcdir"/$pkgname-$pkgver
-
-prepare() {
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch)
- msg "Applying $i..."
- if ! patch -s -p1 -N -i "$srcdir"/$i; then
- echo $i >>failed
- _patch_failed=1
- fi
- ;;
- esac
- done
-
-}
-
-build() {
- cd "$_builddir"
-}
+builddir="$srcdir"/$pkgname-$pkgver
package() {
- cd "$_builddir"
+ cd "$builddir"
mkdir -p "$pkgdir"/usr/share/webapps/phpldapadmin
mkdir -p "$pkgdir"/etc
mv * "$pkgdir"/usr/share/webapps/phpldapadmin
mv "$pkgdir"/usr/share/webapps/phpldapadmin/config "$pkgdir"/etc/phpldapadmin
- ln -s /etc/phpldapadmin "$pkgdir"/usr/share/webapps/phpldapadmin/config || return 1
+ ln -s /etc/phpldapadmin "$pkgdir"/usr/share/webapps/phpldapadmin/config
install -Dm644 ../$pkgname.additional-template \
- "$pkgdir"/usr/share/webapps/phpldapadmin/templates/creation/groupOfNames.xml || return 1
+ "$pkgdir"/usr/share/webapps/phpldapadmin/templates/creation/groupOfNames.xml
}
sha512sums="58a57ca577586685ebd0d7fde7e299b8945d1693018c7803e19239b79f4b9d72a4d207d53c9f284268e32398108038efafcdb434e634619bfe87db3524d267b6 phpldapadmin-1.2.3.tgz
@@ -66,4 +51,5 @@ aecbf3699af4ae39426c6c81edd45a738cdd91f9cfc1e8062ade4b6fa11e7530a8d8b4c2730cd648
d238e27ed89e400f467ab8282a67920cd1e72e5f52709d086f6b31708960dc65acafc0fe683887ceff0b78b3aa9631e91e2c57f722d9f7e0f057e0f872ae73a2 phpldapadmin-1.2.3_fixed-call-to-renamed-function-pla_password_hash.patch
0524112c7a3c591eaf4b3e64de26282a786a2c0fa73f1047084f14c4f9093cf31e1b9a36b7b1736d6c6ae89f9940916d42cbbab7081249abf1a963de588aac63 phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
57e1d8d861f84f0934a2275d7ba37621c2c19c71bf2c04db918ccbc6df36eaca60986db2ba6b543356ad55eab8d7850267db1d30677d77c96238821c29b99ac9 phpldapadmin-1.2.3_use-preg_replace_callback.patch
-647e8924a302666ebae3090bcf61f82e3a82d19c232beabaf3faae43d0c434b12fb83a3d862fe6ce6a27b2b750c67974ac22e583d4897734f39e26733bdd2580 CVE-2017-11107.patch"
+647e8924a302666ebae3090bcf61f82e3a82d19c232beabaf3faae43d0c434b12fb83a3d862fe6ce6a27b2b750c67974ac22e583d4897734f39e26733bdd2580 CVE-2017-11107.patch
+70662456026eabe8043b16798a6233b889a079de18ca52d541b20c672fd4af2b5893e36523afefdefce4d1e50f0ed21a7367aee98fd8ea15788a1b52b511f025 php72-db8a98c7a5ae6352018e2a2673e3d24df03f3e48.patch"
diff --git a/community/phpldapadmin/php72-db8a98c7a5ae6352018e2a2673e3d24df03f3e48.patch b/community/phpldapadmin/php72-db8a98c7a5ae6352018e2a2673e3d24df03f3e48.patch
new file mode 100644
index 0000000000..d1bbf2f844
--- /dev/null
+++ b/community/phpldapadmin/php72-db8a98c7a5ae6352018e2a2673e3d24df03f3e48.patch
@@ -0,0 +1,40 @@
+diff --git a/lib/functions.php.orig b/lib/functions.php
+index 528c7cc..2ab9999 100644
+--- a/lib/functions.php.orig
++++ b/lib/functions.php
+@@ -51,7 +51,7 @@ if (file_exists(LIBDIR.'functions.custom.php'))
+ /**
+ * Loads class definition
+ */
+-function __autoload($className) {
++spl_autoload_register(function($className) {
+ if (file_exists(HOOKSDIR."classes/$className.php"))
+ require_once(HOOKSDIR."classes/$className.php");
+ elseif (file_exists(LIBDIR."$className.php"))
+@@ -64,7 +64,7 @@ function __autoload($className) {
+ 'body'=>sprintf('%s: %s [%s]',
+ __METHOD__,_('Called to load a class that cant be found'),$className),
+ 'type'=>'error'));
+-}
++});
+
+ /**
+ * Strips all slashes from the specified array in place (pass by ref).
+@@ -1029,7 +1029,7 @@ function masort(&$data,$sortby,$rev=0) {
+ $code .= " } else\n";
+ $code .= " \$bb = \$b->$key;\n";
+
+- $code .= " if (\$aa != \$bb)";
++ $code .= " if (\$aa != \$bb)\n";
+ if ($rev)
+ $code .= " return (\$aa < \$bb ? 1 : -1);\n";
+ else
+@@ -1080,7 +1080,7 @@ function masort(&$data,$sortby,$rev=0) {
+
+ $code .= 'return $c;';
+
+- $CACHE[$sortby] = create_function('$a, $b',$code);
++ $CACHE[$sortby] = function($a, $b) { global $code; eval($code); };
+ }
+
+ uasort($data,$CACHE[$sortby]);