pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2018Q3]: pkgsrc/www/drupal7 Pullup ticket #5863 - requested by...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d49fe2f378b0
branches:  pkgsrc-2018Q3
changeset: 334125:d49fe2f378b0
user:      spz <spz%pkgsrc.org@localhost>
date:      Mon Oct 29 19:57:08 2018 +0000

description:
Pullup ticket #5863 - requested by taca
www/drupal7: security update

Revisions pulled up:
- www/drupal7/Makefile                                          1.51-1.52
- www/drupal7/PLIST                                             1.19
- www/drupal7/distinfo                                          1.39-1.40
- www/drupal7/patches/patch-includes_bootstrap.inc              1.1
- www/drupal7/patches/patch-includes_form.inc                   1.1
- www/drupal7/patches/patch-includes_install.inc                1.1
- www/drupal7/patches/patch-includes_menu.inc                   1.1
- www/drupal7/patches/patch-includes_module.inc                 1.1
- www/drupal7/patches/patch-includes_theme.inc                  1.1
- www/drupal7/patches/patch-modules_book_book.module            1.1
- www/drupal7/patches/patch-modules_field_modules_list_list.install 1.1
- www/drupal7/patches/patch-modules_locale_locale.test          1.1
- www/drupal7/patches/patch-modules_simpletest_tests_themes_test__theme_theme-settings.php 1.1
- www/drupal7/patches/patch-modules_system_system.admin.inc     1.1
- www/drupal7/patches/patch-modules_system_system.test          1.1

-------------------------------------------------------------------
   Module Name: pkgsrc
   Committed By:        prlw1
   Date:                Wed Oct  3 10:58:15 UTC 2018

   Modified Files:
        pkgsrc/www/drupal7: Makefile PLIST distinfo
   Added Files:
        pkgsrc/www/drupal7/patches: patch-includes_bootstrap.inc
            patch-includes_form.inc patch-includes_install.inc
            patch-includes_menu.inc patch-includes_module.inc
            patch-includes_theme.inc patch-modules_book_book.module
            patch-modules_field_modules_list_list.install
            patch-modules_locale_locale.test
            patch-modules_simpletest_tests_themes_test__theme_theme-settings.php
            patch-modules_system_system.admin.inc
            patch-modules_system_system.test

   Log Message:
   Update drupal7 to 7.59nb2

   PHP 7.2: Removed deprecated function each().
   PHP 7.2: Avoid count() calls on uncountable variables.
   PHP 7.2: Removed deprecated create_function() call.
   PHP 7.2: Make sure variables are arrays in theme_links().
   Fixed theme-settings.php not being loaded on cached forms


   To generate a diff of this commit:
   cvs rdiff -u -r1.50 -r1.51 pkgsrc/www/drupal7/Makefile
   cvs rdiff -u -r1.18 -r1.19 pkgsrc/www/drupal7/PLIST
   cvs rdiff -u -r1.38 -r1.39 pkgsrc/www/drupal7/distinfo
   cvs rdiff -u -r0 -r1.1 \
       pkgsrc/www/drupal7/patches/patch-includes_bootstrap.inc \
       pkgsrc/www/drupal7/patches/patch-includes_form.inc \
       pkgsrc/www/drupal7/patches/patch-includes_install.inc \
       pkgsrc/www/drupal7/patches/patch-includes_menu.inc \
       pkgsrc/www/drupal7/patches/patch-includes_module.inc \
       pkgsrc/www/drupal7/patches/patch-includes_theme.inc \
       pkgsrc/www/drupal7/patches/patch-modules_book_book.module \
       pkgsrc/www/drupal7/patches/patch-modules_field_modules_list_list.install \
       pkgsrc/www/drupal7/patches/patch-modules_locale_locale.test \
       pkgsrc/www/drupal7/patches/patch-modules_simpletest_tests_themes_test__theme_theme-settings.php \
       pkgsrc/www/drupal7/patches/patch-modules_system_system.admin.inc \
       pkgsrc/www/drupal7/patches/patch-modules_system_system.test

-------------------------------------------------------------------
   Module Name: pkgsrc
   Committed By:        taca
   Date:                Thu Oct 18 14:32:48 UTC 2018

   Modified Files:
        pkgsrc/www/drupal7: Makefile distinfo

   Log Message:
   www/drupal7: update to 7.60

   Drupal 7.60, 2018-10-18
   ------------------------
   - Fixed security issues. See SA-CORE-2018-006.


   To generate a diff of this commit:
   cvs rdiff -u -r1.51 -r1.52 pkgsrc/www/drupal7/Makefile
   cvs rdiff -u -r1.39 -r1.40 pkgsrc/www/drupal7/distinfo

diffstat:

 www/drupal7/Makefile                                                                     |   21 +-
 www/drupal7/PLIST                                                                        |    4 +-
 www/drupal7/distinfo                                                                     |   22 +-
 www/drupal7/patches/patch-includes_bootstrap.inc                                         |   22 ++
 www/drupal7/patches/patch-includes_form.inc                                              |   23 ++
 www/drupal7/patches/patch-includes_install.inc                                           |   17 +
 www/drupal7/patches/patch-includes_menu.inc                                              |   38 +++
 www/drupal7/patches/patch-includes_module.inc                                            |   34 +++
 www/drupal7/patches/patch-includes_theme.inc                                             |  103 ++++++++++
 www/drupal7/patches/patch-modules_book_book.module                                       |   37 +++
 www/drupal7/patches/patch-modules_field_modules_list_list.install                        |   31 +++
 www/drupal7/patches/patch-modules_locale_locale.test                                     |   21 ++
 www/drupal7/patches/patch-modules_simpletest_tests_themes_test__theme_theme-settings.php |   42 ++++
 www/drupal7/patches/patch-modules_system_system.admin.inc                                |   23 ++
 www/drupal7/patches/patch-modules_system_system.test                                     |   40 +++
 15 files changed, 468 insertions(+), 10 deletions(-)

diffs (truncated from 569 to 300 lines):

diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/Makefile
--- a/www/drupal7/Makefile      Mon Oct 29 19:29:11 2018 +0000
+++ b/www/drupal7/Makefile      Mon Oct 29 19:57:08 2018 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.50 2018/08/02 16:18:47 prlw1 Exp $
+# $NetBSD: Makefile,v 1.50.2.1 2018/10/29 19:57:08 spz Exp $
 
-DISTNAME=      drupal-7.59
+DISTNAME=      drupal-7.60
 PKGNAME=       ${PHP_PKG_PREFIX}-${DISTNAME}
-PKGREVISION=   1
 CATEGORIES=    www
 MASTER_SITES=  https://ftp.drupal.org/files/projects/
 
@@ -66,6 +65,22 @@
 post-extract:
        ${CP} ${FILESDIR}/drupal.conf ${WRKSRC}
 
+pre-install:
+       ${RM} \
+       ${WRKSRC}/includes/bootstrap.inc.orig \
+       ${WRKSRC}/includes/form.inc.orig \
+       ${WRKSRC}/includes/install.inc.orig \
+       ${WRKSRC}/includes/menu.inc.orig \
+       ${WRKSRC}/includes/module.inc.orig \
+       ${WRKSRC}/includes/theme.inc.orig \
+       ${WRKSRC}/modules/book/book.module.orig \
+       ${WRKSRC}/modules/field/modules/list/list.install.orig \
+       ${WRKSRC}/modules/locale/locale.test.orig \
+       ${WRKSRC}/modules/simpletest/tests/themes/test_theme/theme-settings.php.orig \
+       ${WRKSRC}/modules/system/system.admin.inc.orig \
+       ${WRKSRC}/modules/system/system.test.orig \
+       ${WRKSRC}/modules/system/system.tar.inc.orig
+
 do-install:
        ${INSTALL_DATA} ${WRKSRC}/robots.txt ${DESTDIR}${PREFIX}/${DRUPAL}
        ${INSTALL_DATA} ${WRKSRC}/drupal.conf \
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/PLIST
--- a/www/drupal7/PLIST Mon Oct 29 19:29:11 2018 +0000
+++ b/www/drupal7/PLIST Mon Oct 29 19:57:08 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.18 2018/08/06 14:42:53 prlw1 Exp $
+@comment $NetBSD: PLIST,v 1.18.2.1 2018/10/29 19:57:08 spz Exp $
 share/doc/drupal/CHANGELOG.txt
 share/doc/drupal/COPYRIGHT.txt
 share/doc/drupal/INSTALL.mysql.txt
@@ -761,6 +761,7 @@
 share/drupal/modules/simpletest/tests/themes/test_theme/template.php
 share/drupal/modules/simpletest/tests/themes/test_theme/templates/node--1.tpl.php
 share/drupal/modules/simpletest/tests/themes/test_theme/test_theme.info
+share/drupal/modules/simpletest/tests/themes/test_theme/theme-settings.php
 share/drupal/modules/simpletest/tests/themes/test_theme_nyan_cat/templates/theme_test_template_test.nyan-cat.html
 share/drupal/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info
 share/drupal/modules/simpletest/tests/unicode.test
@@ -860,7 +861,6 @@
 share/drupal/modules/system/system.module
 share/drupal/modules/system/system.queue.inc
 share/drupal/modules/system/system.tar.inc
-share/drupal/modules/system/system.tar.inc.orig
 share/drupal/modules/system/system.test
 share/drupal/modules/system/system.theme-rtl.css
 share/drupal/modules/system/system.theme.css
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/distinfo
--- a/www/drupal7/distinfo      Mon Oct 29 19:29:11 2018 +0000
+++ b/www/drupal7/distinfo      Mon Oct 29 19:57:08 2018 +0000
@@ -1,7 +1,19 @@
-$NetBSD: distinfo,v 1.38 2018/08/02 16:18:47 prlw1 Exp $
+$NetBSD: distinfo,v 1.38.2.1 2018/10/29 19:57:08 spz Exp $
 
-SHA1 (drupal-7.59.tar.gz) = aa4c5ee88c37b82fc90765189919bbe22c231486
-RMD160 (drupal-7.59.tar.gz) = f7cd3f36611a7004910e4c53cc639aa4285f177a
-SHA512 (drupal-7.59.tar.gz) = 68f02b39d1a4658adc0f0046c22cc1059b68f952f9cd753f5a3e379cf93705be308b4727519e90d77a42437442daebaa78d76745954be4d40e1a5105c319069c
-Size (drupal-7.59.tar.gz) = 3282260 bytes
+SHA1 (drupal-7.60.tar.gz) = aa54d7fc85d2bc2dc20a639208b91256f8f8d2b0
+RMD160 (drupal-7.60.tar.gz) = 839ce4dc73fa52cf0cdbae9d8bcd74772c9b0c5b
+SHA512 (drupal-7.60.tar.gz) = fee59cf303a6c44e3fa3cbeda4912f7d61ffe8294282f9ad0416a6536cc6ea65cf114a6a801dd1f68572185c2b1e300f58f907f9bd61f96beaba3706c527d512
+Size (drupal-7.60.tar.gz) = 3283058 bytes
+SHA1 (patch-includes_bootstrap.inc) = 19af750379de283a17a1f8f202586d588fa58569
+SHA1 (patch-includes_form.inc) = 3f8955b576ebf292573f0953f0a07467dbdd4f64
+SHA1 (patch-includes_install.inc) = ff182d242f4637f7bbb509a1b043671ebd952f64
+SHA1 (patch-includes_menu.inc) = 7aa6f4ae82b37f024d54cc7dc6c6d5433f352916
+SHA1 (patch-includes_module.inc) = 4af9f2c26eb16d39bbcd08949183b54a78391b25
+SHA1 (patch-includes_theme.inc) = 4421f9ad1235825f7b3c360e44bbac994fcfe214
+SHA1 (patch-modules_book_book.module) = bab6aabf09736f5ebb7e60860a96116c2779db06
+SHA1 (patch-modules_field_modules_list_list.install) = 45fffa25115818babe9e743fb1f02020d620efca
+SHA1 (patch-modules_locale_locale.test) = 66f82c0517d32100da28f33b10d1caa27de839be
+SHA1 (patch-modules_simpletest_tests_themes_test__theme_theme-settings.php) = 40f7c7578f4f3c802cd2aaf55130ad9b22b9fea2
+SHA1 (patch-modules_system_system.admin.inc) = d052516a117ca5fecf0da81779ecaac9ef1c4e18
 SHA1 (patch-modules_system_system.tar.inc) = f5bbca9c1b0f5dbb52b744fd5627f83fb8e71cc6
+SHA1 (patch-modules_system_system.test) = 5761278afaa8369453b5857f806cd5d34a2589d0
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/patches/patch-includes_bootstrap.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal7/patches/patch-includes_bootstrap.inc  Mon Oct 29 19:57:08 2018 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-includes_bootstrap.inc,v 1.1.2.2 2018/10/29 19:57:08 spz Exp $
+
+Issue #2925449
+Function each() is deprecated since PHP 7.2
+commit 28de6772813387bf02a4bf6f75b9119c4c20a3f4
+
+--- includes/bootstrap.inc.orig        2018-04-25 15:32:27.000000000 +0000
++++ includes/bootstrap.inc
+@@ -3785,8 +3785,12 @@ function _drupal_shutdown_function() {
+   chdir(DRUPAL_ROOT);
+ 
+   try {
+-    while (list($key, $callback) = each($callbacks)) {
++    // Manually iterate over the array instead of using a foreach loop.
++    // A foreach operates on a copy of the array, so any shutdown functions that
++    // were added from other shutdown functions would never be called.
++    while ($callback = current($callbacks)) {
+       call_user_func_array($callback['callback'], $callback['arguments']);
++      next($callbacks);
+     }
+   }
+   catch (Exception $exception) {
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/patches/patch-includes_form.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal7/patches/patch-includes_form.inc       Mon Oct 29 19:57:08 2018 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-includes_form.inc,v 1.1.2.2 2018/10/29 19:57:08 spz Exp $
+
+Issue #2885610
+Avoid count() calls on uncountable variables
+commit 73e12f0ddf1ed60c13331dc3a9b8ea16d1599307
+
+--- includes/form.inc.orig     2018-04-25 15:32:27.000000000 +0000
++++ includes/form.inc
+@@ -1438,10 +1438,12 @@ function _form_validate(&$elements, &$fo
+       // length if it's a string, and the item count if it's an array.
+       // An unchecked checkbox has a #value of integer 0, different than string
+       // '0', which could be a valid value.
+-      $is_empty_multiple = (!count($elements['#value']));
++      $is_countable = is_array($elements['#value']) || $elements['#value'] instanceof \Countable;
++      $is_empty_multiple = $is_countable && count($elements['#value']) == 0;
+       $is_empty_string = (is_string($elements['#value']) && drupal_strlen(trim($elements['#value'])) == 0);
+       $is_empty_value = ($elements['#value'] === 0);
+-      if ($is_empty_multiple || $is_empty_string || $is_empty_value) {
++      $is_empty_null = is_null($elements['#value']);
++      if ($is_empty_multiple || $is_empty_string || $is_empty_value || $is_empty_null) {
+         // Although discouraged, a #title is not mandatory for form elements. In
+         // case there is no #title, we cannot set a form error message.
+         // Instead of setting no #title, form constructors are encouraged to set
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/patches/patch-includes_install.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal7/patches/patch-includes_install.inc    Mon Oct 29 19:57:08 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-includes_install.inc,v 1.1.2.2 2018/10/29 19:57:08 spz Exp $
+
+Issue #2925449
+Function each() is deprecated since PHP 7.2
+commit 28de6772813387bf02a4bf6f75b9119c4c20a3f4
+
+--- includes/install.inc.orig  2018-04-25 15:32:27.000000000 +0000
++++ includes/install.inc
+@@ -779,7 +779,7 @@ function drupal_uninstall_modules($modul
+     $module_list = array_flip(array_values($module_list));
+ 
+     $profile = drupal_get_profile();
+-    while (list($module) = each($module_list)) {
++    foreach (array_keys($module_list) as $module) {
+       if (!isset($module_data[$module]) || drupal_get_installed_schema_version($module) == SCHEMA_UNINSTALLED) {
+         // This module doesn't exist or is already uninstalled. Skip it.
+         unset($module_list[$module]);
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/patches/patch-includes_menu.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal7/patches/patch-includes_menu.inc       Mon Oct 29 19:57:08 2018 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-includes_menu.inc,v 1.1.2.2 2018/10/29 19:57:08 spz Exp $
+
+Issue #2925449
+Function each() is deprecated since PHP 7.2
+commit 28de6772813387bf02a4bf6f75b9119c4c20a3f4
+
+--- includes/menu.inc.orig     2018-04-25 15:32:27.000000000 +0000
++++ includes/menu.inc
+@@ -576,7 +576,8 @@ function _menu_load_objects(&$item, &$ma
+           // 'load arguments' in the hook_menu() entry, but they need
+           // some processing. In this case the $function is the key to the
+           // load_function array, and the value is the list of arguments.
+-          list($function, $args) = each($function);
++          $args = current($function);
++          $function = key($function);
+           $load_functions[$index] = $function;
+ 
+           // Some arguments are placeholders for dynamic items to process.
+@@ -2402,7 +2403,8 @@ function menu_set_active_trail($new_trai
+       // a stripped down menu tree containing the active trail only, in case
+       // the given menu has not been built in this request yet.
+       $tree = menu_tree_page_data($preferred_link['menu_name'], NULL, TRUE);
+-      list($key, $curr) = each($tree);
++      $curr = current($tree);
++      next($tree);
+     }
+     // There is no link for the current path.
+     else {
+@@ -2432,7 +2434,8 @@ function menu_set_active_trail($new_trai
+         }
+         $tree = $curr['below'] ? $curr['below'] : array();
+       }
+-      list($key, $curr) = each($tree);
++      $curr = current($tree);
++      next($tree);
+     }
+     // Make sure the current page is in the trail to build the page title, by
+     // appending either the preferred link or the menu router item for the
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/patches/patch-includes_module.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal7/patches/patch-includes_module.inc     Mon Oct 29 19:57:08 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-includes_module.inc,v 1.1.2.2 2018/10/29 19:57:08 spz Exp $
+
+Issue #2925449
+Function each() is deprecated since PHP 7.2
+commit 28de6772813387bf02a4bf6f75b9119c4c20a3f4
+
+--- includes/module.inc.orig   2018-04-25 15:32:27.000000000 +0000
++++ includes/module.inc
+@@ -404,7 +404,11 @@ function module_enable($module_list, $en
+     // Create an associative array with weights as values.
+     $module_list = array_flip(array_values($module_list));
+ 
+-    while (list($module) = each($module_list)) {
++    // The array is iterated over manually (instead of using a foreach) because
++    // modules may be added to the list within the loop and we need to process
++    // them.
++    while ($module = key($module_list)) {
++      next($module_list);
+       if (!isset($module_data[$module])) {
+         // This module is not found in the filesystem, abort.
+         return FALSE;
+@@ -540,7 +544,11 @@ function module_disable($module_list, $d
+     $module_list = array_flip(array_values($module_list));
+ 
+     $profile = drupal_get_profile();
+-    while (list($module) = each($module_list)) {
++    // The array is iterated over manually (instead of using a foreach) because
++    // modules may be added to the list within the loop and we need to process
++    // them.
++    while ($module = key($module_list)) {
++      next($module_list);
+       if (!isset($module_data[$module]) || !$module_data[$module]->status) {
+         // This module doesn't exist or is already disabled, skip it.
+         unset($module_list[$module]);
diff -r 953de66e1c3e -r d49fe2f378b0 www/drupal7/patches/patch-includes_theme.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal7/patches/patch-includes_theme.inc      Mon Oct 29 19:57:08 2018 +0000
@@ -0,0 +1,103 @@
+$NetBSD: patch-includes_theme.inc,v 1.1.2.2 2018/10/29 19:57:08 spz Exp $
+
+Issue #2885610
+Avoid count() calls on uncountable variables
+commit 73e12f0ddf1ed60c13331dc3a9b8ea16d1599307
+
+Issue #2996519
+PHP 7.2 compatibility - make sure some variables are arrays in
+theme_links()
+commit 083a4eca4a2ebc5276eed2f11fc4a595b07898ba
+
+--- includes/theme.inc.orig    2018-10-03 09:32:02.932500773 +0000
++++ includes/theme.inc
+@@ -1776,8 +1776,8 @@ function theme_link($variables) {
+  *     http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
+  */
+ function theme_links($variables) {
+-  $links = $variables['links'];
+-  $attributes = $variables['attributes'];
++  $links = (array) $variables['links'];
++  $attributes = (array) $variables['attributes'];
+   $heading = $variables['heading'];
+   global $language_url;
+   $output = '';
+@@ -1995,7 +1995,7 @@ function theme_table($variables) {
+   $empty = $variables['empty'];
+ 
+   // Add sticky headers, if applicable.
+-  if (count($header) && $sticky) {
++  if (!empty($header) && $sticky) {
+     drupal_add_js('misc/tableheader.js');
+     // Add 'sticky-enabled' class to the table to identify it for JS.
+     // This is needed to target tables constructed by this function.
+@@ -2009,7 +2009,7 @@ function theme_table($variables) {
+   }
+ 
+   // Format the table columns:
+-  if (count($colgroups)) {
++  if (!empty($colgroups)) {
+     foreach ($colgroups as $number => $colgroup) {
+       $attributes = array();
+ 
+@@ -2044,38 +2044,40 @@ function theme_table($variables) {
+   }
+ 
+   // Add the 'empty' row message if available.
+-  if (!count($rows) && $empty) {
++  if (empty($rows) && $empty) {
+     $header_count = 0;
+-    foreach ($header as $header_cell) {
+-      if (is_array($header_cell)) {
+-        $header_count += isset($header_cell['colspan']) ? $header_cell['colspan'] : 1;



Home | Main Index | Thread Index | Old Index