git: 1a4187074539 - main - databases/adminer: Remove expired port

From: Rene Ladan <rene_at_FreeBSD.org>
Date: Tue, 30 Jun 2026 20:57:48 UTC
The branch main has been updated by rene:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1a418707453990900e45506637c952c5c106f8f2

commit 1a418707453990900e45506637c952c5c106f8f2
Author:     Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2026-06-30 20:57:44 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2026-06-30 20:57:44 +0000

    databases/adminer: Remove expired port
    
    2026-06-30 databases/adminer: Project's poor security practices
---
 MOVED                                              |   1 +
 databases/Makefile                                 |   1 -
 databases/adminer/Makefile                         |  55 ----------
 databases/adminer/distinfo                         |   7 --
 .../adminer/files/adminer-plugins-example.php      |  20 ----
 databases/adminer/files/makephar.php               | 122 ---------------------
 .../files/patch-adminer_include_functions.inc.php  |  11 --
 .../files/patch-adminer_include_xxtea.inc.php      |  70 ------------
 databases/adminer/pkg-descr                        |   6 -
 databases/adminer/pkg-plist                        |   5 -
 10 files changed, 1 insertion(+), 297 deletions(-)

diff --git a/MOVED b/MOVED
index 2881d55e786b..b9027105c525 100644
--- a/MOVED
+++ b/MOVED
@@ -5448,3 +5448,4 @@ textproc/py-elasticsearch5|textproc/py-elasticsearch6|2026-06-30|Has expired: 5.
 audio/murmur|audio/mumble-server|2026-06-30|Has expired: 1.3 is deprecated by upstream and renamed - use audio/mumble-server instead
 www/forgejo14|www/forgejo-lts|2026-06-30|Has expired: Unsupported, please switch to www/forgejo or www/forgejo-lts
 net/unison248||2026-06-30|Has expired: Legacy release unsupported by upstream
+databases/adminer||2026-06-30|Has expired: Project's poor security practices
diff --git a/databases/Makefile b/databases/Makefile
index 3123c00989a8..be28c644016e 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -14,7 +14,6 @@
     SUBDIR += R-cran-pool
     SUBDIR += R-cran-sqldf
     SUBDIR += WWWdb
-    SUBDIR += adminer
     SUBDIR += adodb5
     SUBDIR += akonadi
     SUBDIR += apache-commons-dbutils
diff --git a/databases/adminer/Makefile b/databases/adminer/Makefile
deleted file mode 100644
index a59b125d0fe7..000000000000
--- a/databases/adminer/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-PORTNAME=	adminer
-DISTVERSION=	5.4.1
-CATEGORIES=	databases www
-MASTER_SITES=	https://github.com/vrana/${PORTNAME}/releases/download/v${DISTVERSION}/
-PKGNAMEPREFIX=	${PHP_PKGNAMEPREFIX}
-DISTFILES=	${PORTNAME}-${DISTVERSION}.zip
-
-MAINTAINER=	pkaipila@gmail.com
-COMMENT=	Full-featured database management tool in a single PHP file
-WWW=		https://www.adminer.org
-
-LICENSE=	APACHE20
-
-DEPRECATED=     Project's poor security practices
-EXPIRATION_DATE=2026-06-30
-
-USES=		cpe php:build,flavors
-USE_GITHUB=	nodefault
-_FORCED_TAG=	1.2
-_PEMATON_TAG=	99912d508a1b39db27910ef6c6dd07bab9368670
-GH_TUPLE=	MirLach:adminer-forced-server:${_FORCED_TAG}:forcedserver \
-		vrana:adminer-plugins-pematon:${_PEMATON_TAG}:pematon
-USE_PHP=	phar session tokenizer zlib
-
-NO_ARCH=	yes
-
-PLIST_SUB=	WWWGRP="${WWWGRP}" \
-		WWWOWN="${WWWOWN}"
-
-OPTIONS_DEFINE=		MYSQL PGSQL SQLITE
-OPTIONS_DEFAULT=	MYSQL SQLITE
-
-MYSQL_DESC=		MySQL and MariaDB driver
-PGSQL_DESC=		PostgreSQL driver
-SQLITE_DESC=		SQLite driver
-
-MYSQL_USE=		PHP=mysqli
-PGSQL_USE=		PHP=pgsql
-SQLITE_USE=		PHP=sqlite3
-
-do-build:
-	${MV} ${WRKDIR}/adminer-forced-server-${_FORCED_TAG}/adminer-plugins/forced-server.php \
-	      ${WRKDIR}/adminer-plugins-pematon-${_PEMATON_TAG}/*.php \
-		${WRKSRC}/plugins
-	@(cd ${WRKSRC} && ${LOCALBASE}/bin/php ${WRKSRC}/compile.php)
-	${MV} ${WRKSRC}/${PORTNAME}-${DISTVERSION}.php ${WRKSRC}/${PORTNAME}.php
-	${CP} ${FILESDIR}/makephar.php ${WRKSRC}
-	${LOCALBASE}/bin/php -d phar.readonly=0 ${WRKSRC}/makephar.php
-
-do-install:
-	${MKDIR} ${STAGEDIR}${WWWDIR}
-	${INSTALL_SCRIPT} ${WRKSRC}/index.php ${STAGEDIR}${WWWDIR}
-	${INSTALL_SCRIPT} ${FILESDIR}/adminer-plugins-example.php ${STAGEDIR}${WWWDIR}
-
-.include <bsd.port.mk>
diff --git a/databases/adminer/distinfo b/databases/adminer/distinfo
deleted file mode 100644
index 257ff21e5d68..000000000000
--- a/databases/adminer/distinfo
+++ /dev/null
@@ -1,7 +0,0 @@
-TIMESTAMP = 1764916864
-SHA256 (adminer-5.4.1.zip) = f8a8b8ea647e13cd85feca54d0304cee459e958df303d6dd15a778e07799e4ba
-SIZE (adminer-5.4.1.zip) = 881687
-SHA256 (MirLach-adminer-forced-server-1.2_GH0.tar.gz) = 8f00a802ed5e6f323a28d46edac026926dc294f5e50e393c6a3827aba0c0a886
-SIZE (MirLach-adminer-forced-server-1.2_GH0.tar.gz) = 5685
-SHA256 (vrana-adminer-plugins-pematon-99912d508a1b39db27910ef6c6dd07bab9368670_GH0.tar.gz) = a38e075f1c70fa4acdbe54ebedf52e7901e89739ff277d7a340f87923aaa6cbd
-SIZE (vrana-adminer-plugins-pematon-99912d508a1b39db27910ef6c6dd07bab9368670_GH0.tar.gz) = 8128
diff --git a/databases/adminer/files/adminer-plugins-example.php b/databases/adminer/files/adminer-plugins-example.php
deleted file mode 100644
index 61400c6dc82b..000000000000
--- a/databases/adminer/files/adminer-plugins-example.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * List of all included plugins can be found at the
- * beginning of index.php
- */
-return [
-        new AdminerDarkSwitcher,
-
-        new AdminerPrettyJsonColumn,
-
-        new AdminerDumpJson,
-
-        new AdminerDumpXml,
-
-        // install zip extension to use this
-        new AdminerDumpZip,
-
-        // install bz2 extension to use this
-        new AdminerDumpBz2,
-];
diff --git a/databases/adminer/files/makephar.php b/databases/adminer/files/makephar.php
deleted file mode 100644
index b8fdadf1dfbc..000000000000
--- a/databases/adminer/files/makephar.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-/***********************************************************
- * 
- *   Merges adminer.php and it's plugins to a phar archive
- * 
- ***********************************************************/
-
-$phar = new Phar(
-    $tmpFile = __DIR__ . '/adminer_' . bin2hex(random_bytes(8)) . '.phar',
-    0,
-    'adminer.phar'
-);
-
-$stub = <<<STUB
-<?php
-/******************************************************************************
- *  
- *  Adminer plugins are now included in this
- *  FreeBSD ports edition, no need to download
- *  them separately.
- *  https://www.adminer.org/en/plugins/
- *  
- *  copyright Paavo-Einari Kaipila (FreeBSD ports edition)
- *  copyright Jakub Vrana          (Adminer)
- *  copyright MirLach              (ForcedServer plugin)
- *  copyright Pematon              (Collations, JsonPreview, LoginServers and SimpleMenu plugins)
- *  
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *  
- *  http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- * 
- ******************************************************************************/
-if (file_exists(\$adminerObjectFile = __DIR__ . '/adminer-object.php'))
-{
-    require \$adminerObjectFile;
-}
-Phar::mapPhar('adminer.phar');
-define('ADMINER_PLUGIN_CLASSMAP', json_decode('%s', true));
-require 'phar://adminer.phar/autoload.php';
-__HALT_COMPILER();
-STUB;
-
-$classMap = [];
-$plugins = [];
-
-foreach(new DirectoryIterator(__DIR__ . '/plugins') as $file)
-{
-    if ($file->isFile())
-    {
-        $contents = php_strip_whitespace($file->getRealPath());
-        $fileName = $file->getFileName();
-        $pharFile = 'adminer-plugins/' . $fileName;
-
-        if (
-            /**
-             * Skip affected plugin
-             * https://nvd.nist.gov/vuln/detail/CVE-2023-45197
-             */
-            $fileName !== 'file-upload.php'
-            /**
-             * Adminer editor's plugins are only relevant
-             * in Adminer editor.
-             */
-            && !str_starts_with($fileName, 'editor')
-            && preg_match('/class\s(A[a-zA-Z0-9]+)\s(extends\sAdminer|\{)/', $contents, $m)
-        ) {
-            $plugins[$pharFile] = $contents;
-            $classMap[$m[1]] = $file->getFileName();
-        }
-    }
-}
-
-ksort($classMap);
-
-$phar->setStub(
-    sprintf(
-        $stub,
-        json_encode($classMap, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)
-    )
-);
-
-$autoLoader = <<<LOADER
-<?php
-spl_autoload_register(function(\$class)
-{
-    if (isset(ADMINER_PLUGIN_CLASSMAP[\$class]))
-    {
-        require __DIR__ . '/adminer-plugins/' . ADMINER_PLUGIN_CLASSMAP[\$class];
-        return true;
-    }
-});
-require __DIR__ . '/adminer.php';
-LOADER;
-
-$phar->addFromString(
-    'autoload.php',
-    $autoLoader
-);
-
-foreach($plugins as $file => $contents)
-{
-    $phar->addFromString(
-        $file,
-        $contents
-    );
-}
-$phar->compressFiles(Phar::GZ);
-
-$phar->addFromString(
-    'adminer.php',
-    php_strip_whitespace(__DIR__ . '/adminer.php'),
-);
-
-rename($tmpFile, __DIR__ . '/index.php');
diff --git a/databases/adminer/files/patch-adminer_include_functions.inc.php b/databases/adminer/files/patch-adminer_include_functions.inc.php
deleted file mode 100644
index fa627837460a..000000000000
--- a/databases/adminer/files/patch-adminer_include_functions.inc.php
+++ /dev/null
@@ -1,11 +0,0 @@
---- adminer/include/functions.inc.php.orig	2025-10-19 12:05 UTC
-+++ adminer/include/functions.inc.php
-@@ -761,7 +761,7 @@
- * @return string 32 hexadecimal characters
- */
- function rand_string(): string {
--	return md5(uniqid(strval(mt_rand()), true));
-+	return bin2hex(random_bytes(32));
- }
- 
- /** Format value to use in select
diff --git a/databases/adminer/files/patch-adminer_include_xxtea.inc.php b/databases/adminer/files/patch-adminer_include_xxtea.inc.php
deleted file mode 100644
index 86b20cb3ea7f..000000000000
--- a/databases/adminer/files/patch-adminer_include_xxtea.inc.php
+++ /dev/null
@@ -1,70 +0,0 @@
---- adminer/include/xxtea.inc.php.orig	2025-11-14 10:44:16 UTC
-+++ adminer/include/xxtea.inc.php
-@@ -45,6 +45,11 @@
- 	return int32((($z >> 5 & 0x7FFFFFF) ^ $y << 2) + (($y >> 3 & 0x1FFFFFFF) ^ $z << 4)) ^ int32(($sum ^ $y) + ($k ^ $z));
- }
- 
-+const AES256_NAME = 'aes-256-gcm';
-+const AES256_KEY_BYTES = 32;
-+const AES256_NONCE_BYTES = 12;
-+const AES256_TAG_BYTES = 16;
-+
- /** Cipher
- * @param string $str plain-text password
- * @return string binary cipher
-@@ -53,6 +58,20 @@
- 	if ($str == "") {
- 		return "";
- 	}
-+	$key = hash_hkdf('sha256', $key, AES256_KEY_BYTES, AES256_NAME);
-+	$nonce = random_bytes(AES256_NONCE_BYTES);
-+	$cipherText = openssl_encrypt(
-+		$str,
-+		AES256_NAME,
-+		$key,
-+		OPENSSL_RAW_DATA,
-+		$nonce,
-+		$tag,
-+		'',
-+		AES256_TAG_BYTES
-+	);
-+	return $nonce . $tag . $cipherText;
-+/*
- 	$key = array_values(unpack("V*", pack("H*", md5($key))));
- 	$v = str2long($str, true);
- 	$n = count($v) - 1;
-@@ -75,6 +94,7 @@
- 		$v[$n] = $z;
- 	}
- 	return long2str($v, false);
-+*/
- }
- 
- /** Decipher
-@@ -88,6 +108,20 @@
- 	if (!$key) {
- 		return false;
- 	}
-+	$key = hash_hkdf('sha256', $key, AES256_KEY_BYTES, AES256_NAME);
-+	$nonce = substr($str, 0, AES256_NONCE_BYTES);
-+	$tag = substr($str, AES256_NONCE_BYTES, AES256_TAG_BYTES);
-+	$cipherText = substr($str, AES256_NONCE_BYTES + AES256_TAG_BYTES);
-+	return openssl_decrypt(
-+		$cipherText,
-+		AES256_NAME,
-+		$key,
-+		OPENSSL_RAW_DATA,
-+		$nonce,
-+		$tag,
-+		''
-+	);
-+/*
- 	$key = array_values(unpack("V*", pack("H*", md5($key))));
- 	$v = str2long($str, false);
- 	$n = count($v) - 1;
-@@ -110,4 +144,5 @@
- 		$sum = int32($sum - 0x9E3779B9);
- 	}
- 	return long2str($v, true);
-+*/
- }
diff --git a/databases/adminer/pkg-descr b/databases/adminer/pkg-descr
deleted file mode 100644
index 8a364c1f0beb..000000000000
--- a/databases/adminer/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-Adminer is a full-featured database management tool in a
-single PHP file. Supports MySQL, SQLite and PostgreSQL.
-
-This port has been completely revamped. It is now flavored
-and plugins are built in to the same 600K file too, no
-need to download them separately or to track their updates.
diff --git a/databases/adminer/pkg-plist b/databases/adminer/pkg-plist
deleted file mode 100644
index 49cd2d84519e..000000000000
--- a/databases/adminer/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-@owner %%WWWOWN%%
-@group %%WWWGRP%%
-@mode 0644
-%%WWWDIR%%/index.php
-%%WWWDIR%%/adminer-plugins-example.php