From nobody Sat Jan 08 16:04:03 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 484DD194D13E; Sat, 8 Jan 2022 16:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JWPz75ypbz4kBm; Sat, 8 Jan 2022 16:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D74D217F0; Sat, 8 Jan 2022 16:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 208G43To055011; Sat, 8 Jan 2022 16:04:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 208G43sN055010; Sat, 8 Jan 2022 16:04:03 GMT (envelope-from git) Date: Sat, 8 Jan 2022 16:04:03 GMT Message-Id: <202201081604.208G43sN055010@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jochen Neumeister Subject: git: 13bb72d35c08 - main - databases/pear-Horde_Db: Update to 2.4.1 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: joneum X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13bb72d35c08281968ca96e3be0da578f7788cc3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641657843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpMjyKOguU3XUMnm+7O6SjgwLcJ0BTTLxIdRtoxW2q4=; b=sK1slkthpKlrKOlx8spSRX1LEGgmT3tGyRwLy7qbN0obUvkf7sKcXBHv7deE6l/uoNJYGo cNGxjtFosi2RIgWQ3f8mcCR/kPLynbc09xKkQNqQCnfqr+d69PlI/04eSK7l4Ds+WT3XFU O+xuynxyp41pbHB2rZTOIzUphB9LX+R4Mr0bPsPOP+bIw404TLH+rOhx4yr5c0SMGZdUg/ wNrlkcxrZqa7OMcNzB8lDZt73tBpdIWJfo+cbGpeXrtSVSbu/SixaTh4GkQGs3i0ObxK3S 1cXb/R1ZpFplI9+da7b0+KZOOuSzcuPY7YTGVfnKaUTO5TgznITFT5c6cd/1GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641657843; a=rsa-sha256; cv=none; b=B/ZTsaBCdNqOToG6gSR5FRdGiuhE3JJrDgyWfUgZ9BkrTw1lHqv4CIrFIo5wTlK9WzxRbI 4UpkAD8I/bUav+ymIN4dAQQBH2yL89XWeUdp3y/y6qUdM3ktRCpFk7Vlqy62D5azTxHZSG ol82jRhaRUGBOyduqOb+BcmQ0EjSAwTuj+mIQo7ivWWPFI1hcYmbpr7qpHdplIQgea0O65 Tsg8TTWYHLSbRu7derMr7FcuWsnxiZEjYjsIMfX51lbO/rIDaf9hbUm637CtJCtIF+NMTk JQvEf8jrzVVu8SaI6BXzMSrD5qo4/UDalgySckLX94arn3SxrhtNOHuxixrwAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by joneum: URL: https://cgit.FreeBSD.org/ports/commit/?id=13bb72d35c08281968ca96e3be0da578f7788cc3 commit 13bb72d35c08281968ca96e3be0da578f7788cc3 Author: Jochen Neumeister AuthorDate: 2022-01-08 15:49:37 +0000 Commit: Jochen Neumeister CommitDate: 2022-01-08 16:03:48 +0000 databases/pear-Horde_Db: Update to 2.4.1 Sponsored by: Netzkommune GmbH --- databases/pear-Horde_Db/Makefile | 3 +- databases/pear-Horde_Db/distinfo | 6 +- ...atch-lib_Horde_Db_Adapter_Postgresql_Schema.php | 141 --------------------- 3 files changed, 4 insertions(+), 146 deletions(-) diff --git a/databases/pear-Horde_Db/Makefile b/databases/pear-Horde_Db/Makefile index 6b7ccd6d8402..570e9341ffec 100644 --- a/databases/pear-Horde_Db/Makefile +++ b/databases/pear-Horde_Db/Makefile @@ -1,6 +1,5 @@ PORTNAME= Horde_Db -PORTVERSION= 2.4.0 -PORTREVISION= 2 +PORTVERSION= 2.4.1 CATEGORIES= databases www pear MAINTAINER= horde@FreeBSD.org diff --git a/databases/pear-Horde_Db/distinfo b/databases/pear-Horde_Db/distinfo index 0d5268d7df7d..de528ab82e2a 100644 --- a/databases/pear-Horde_Db/distinfo +++ b/databases/pear-Horde_Db/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1488896477 -SHA256 (Horde/Horde_Db-2.4.0.tgz) = 69fecc955c21b9d5ae2d604c32edb6da48ba9f1305e55dd0187355bca59b2a06 -SIZE (Horde/Horde_Db-2.4.0.tgz) = 96916 +TIMESTAMP = 1641590338 +SHA256 (Horde/Horde_Db-2.4.1.tgz) = 0b89bbfd961a152ff23ce59b4d9aba2a98599b018777a7c7e44b22ea7b677c84 +SIZE (Horde/Horde_Db-2.4.1.tgz) = 98261 diff --git a/databases/pear-Horde_Db/files/patch-lib_Horde_Db_Adapter_Postgresql_Schema.php b/databases/pear-Horde_Db/files/patch-lib_Horde_Db_Adapter_Postgresql_Schema.php deleted file mode 100644 index 5e503c401937..000000000000 --- a/databases/pear-Horde_Db/files/patch-lib_Horde_Db_Adapter_Postgresql_Schema.php +++ /dev/null @@ -1,141 +0,0 @@ ---- lib/Horde/Db/Adapter/Postgresql/Schema.php.orig 2017-02-27 11:00:17.000000000 +0100 -+++ lib/Horde/Db/Adapter/Postgresql/Schema.php 2020-10-28 00:40:32.469743000 +0100 -@@ -3,12 +3,15 @@ - * Copyright 2007 Maintainable Software, LLC - * Copyright 2008-2017 Horde LLC (http://www.horde.org/) - * -+ * See the enclosed file LICENSE for license information (BSD). If you -+ * did not receive this file, see http://www.horde.org/licenses/bsd. -+ * - * @author Mike Naberezny - * @author Derek DeVries - * @author Chuck Hagenbuch - * @author Jan Schneider -- * @license http://www.horde.org/licenses/bsd - * @category Horde -+ * @license http://www.horde.org/licenses/bsd - * @package Db - * @subpackage Adapter - */ -@@ -21,8 +24,10 @@ - * @author Derek DeVries - * @author Chuck Hagenbuch - * @author Jan Schneider -- * @license http://www.horde.org/licenses/bsd - * @category Horde -+ * @copyright 2007 Maintainable Software, LLC -+ * @copyright 2008-2017 Horde LLC -+ * @license http://www.horde.org/licenses/bsd - * @package Db - * @subpackage Adapter - */ -@@ -383,12 +388,13 @@ class Horde_Db_Adapter_Postgresql_Schema - { - /* @todo See if we can get this from information_schema instead */ - return $this->selectAll(' -- SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull -- FROM pg_attribute a LEFT JOIN pg_attrdef d -- ON a.attrelid = d.adrelid AND a.attnum = d.adnum -- WHERE a.attrelid = ' . $this->quote($tableName) . '::regclass -- AND a.attnum > 0 AND NOT a.attisdropped -- ORDER BY a.attnum', $name); -+ SELECT a.attname, format_type(a.atttypid, a.atttypmod), -+ pg_get_expr(d.adbin, d.adrelid) AS adsrc, a.attnotnull -+ FROM pg_attribute a -+ LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum -+ WHERE a.attrelid = ' . $this->quote($tableName) . '::regclass -+ AND a.attnum > 0 AND NOT a.attisdropped -+ ORDER BY a.attnum;', $name); - } - - /** -@@ -1057,13 +1063,32 @@ class Horde_Db_Adapter_Postgresql_Schema - $quotedSequence = $this->quoteSequenceName($sequence); - $quotedTable = $this->quoteTableName($table); - $quotedPk = $this->quoteColumnName($pk); -- -- $sql = sprintf('SELECT setval(%s, (SELECT COALESCE(MAX(%s) + (SELECT increment_by FROM %s), (SELECT min_value FROM %s)) FROM %s), false)', -- $quotedSequence, -- $quotedPk, -- $sequence, -- $sequence, -- $quotedTable); -+ if ($this->postgresqlVersion() >= 100000) { -+ $sql = sprintf(' -+ SELECT setval( -+ %s, -+ (SELECT COALESCE( -+ MAX(%s) + (SELECT increment_by FROM pg_sequences WHERE schemaname=ANY(CURRENT_SCHEMAS(false)) AND sequencename=%s), -+ (SELECT min_value FROM pg_sequences WHERE schemaname=ANY(CURRENT_SCHEMAS(false)) AND sequencename=%s) -+ ) FROM %s), -+ false -+ )', -+ $quotedSequence, -+ $quotedPk, -+ $quotedSequence, -+ $quotedSequence, -+ $quotedTable -+ ); -+ } else { -+ $sql = sprintf( -+ 'SELECT setval(%s, (SELECT COALESCE(MAX(%s) + (SELECT increment_by FROM %s), (SELECT min_value FROM %s)) FROM %s), false)', -+ $quotedSequence, -+ $quotedPk, -+ $sequence, -+ $sequence, -+ $quotedTable -+ ); -+ } - $this->selectValue($sql, 'Reset sequence'); - } else { - if ($this->_logger) { -@@ -1103,28 +1128,20 @@ class Horde_Db_Adapter_Postgresql_Schema - $result = $this->selectOne($sql, 'PK and serial sequence'); - - if (!$result) { -- // If that fails, try parsing the primary key's default value. -- // Support the 7.x and 8.0 nextval('foo'::text) as well as -- // the 8.1+ nextval('foo'::regclass). - $sql = " -- SELECT attr.attname, -- CASE -- WHEN split_part(def.adsrc, '''', 2) ~ '.' THEN -- substr(split_part(def.adsrc, '''', 2), -- strpos(split_part(def.adsrc, '''', 2), '.')+1) -- ELSE split_part(def.adsrc, '''', 2) -- END AS relname -- FROM pg_class t -- JOIN pg_attribute attr ON (t.oid = attrelid) -- JOIN pg_attrdef def ON (adrelid = attrelid AND adnum = attnum) -- JOIN pg_constraint cons ON (conrelid = adrelid AND adnum = conkey[1]) -- WHERE t.oid = '$table'::regclass -- AND cons.contype = 'p' -- AND def.adsrc ~* 'nextval'"; -- -+ SELECT c.column_name, c.ordinal_position, -+ pg_get_serial_sequence(t.table_name, c.column_name) as relname -+ FROM information_schema.key_column_usage AS c -+ LEFT JOIN information_schema.table_constraints AS t -+ ON t.constraint_name = c.constraint_name -+ WHERE t.table_name = '$table' AND t.constraint_type = 'PRIMARY KEY';"; - $result = $this->selectOne($sql, 'PK and custom sequence'); - } - -+ if (!$result) { -+ return array(null, null); -+ } -+ - // [primary_key, sequence] - return array($result['attname'], $result['relname']); - } -@@ -1138,9 +1155,7 @@ class Horde_Db_Adapter_Postgresql_Schema - { - if (!$this->_version) { - try { -- $version = $this->selectValue('SELECT version()'); -- if (preg_match('/PostgreSQL (\d+)\.(\d+)\.(\d+)/', $version, $matches)) -- $this->_version = ($matches[1] * 10000) + ($matches[2] * 100) + $matches[3]; -+ $this->_version = $this->selectValue('SHOW server_version_num'); - } catch (Exception $e) { - return 0; - }