[interchange] Raise minimum Perl version to 5.14.1
Jon Jensen <[email protected]> Tue, 18 Sep 2018 20:09:11 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit bf1afaa4cbcbc2af1565611aa7fbf772a38a4688 Author: Jon Jensen <[email protected]> Date: Tue Sep 18 13:51:12 2018 -0600 Raise minimum Perl version to 5.14.1 and fill out WHATSNEW document with recent changes. .travis.yml | 4 +- Makefile.PL | 34 +-------------- README.md | 2 +- SPECS/interchange.spec | 9 +++- UPGRADE | 2 + dist/src/cpan_local_install | 2 +- dist/src/mod_perl_tlink.pl | 4 +- dist/src/tlink.pl | 4 +- dist/src/vlink.pl | 4 +- doc/WHATSNEW-5.12 | 101 +++++++++++++++++++++++++++---------------- extensions/Interchange.pm | 4 +- hints.pl | 60 +------------------------ lib/Vend/CounterFile.pm | 3 +- lib/Vend/Safe.pm | 2 +- scripts/interchange.PL | 30 +------------ scripts/offline.PL | 4 +- scripts/update.PL | 4 +- 17 files changed, 95 insertions(+), 178 deletions(-) --- diff --git a/.travis.yml b/.travis.yml index aba8ea2..ab1bb22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: perl perl: - - "5.8.9" - - "5.10" - - "5.12" - "5.14" - "5.16" - "5.18" @@ -10,6 +7,7 @@ perl: - "5.22" - "5.24" - "5.26" + - "5.28" sudo: false services: - mysql diff --git a/Makefile.PL b/Makefile.PL index 08dd4ee..8a09440 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -17,7 +17,7 @@ use File::Basename; use File::Find; use Data::Dumper; use Cwd; -require 5.008_005; +require 5.014_001; use strict; @@ -312,33 +312,12 @@ sub initialize { chomp($uid = <UID>); close UID; } +#warn "Got past open UID file , uid=$uid user=$>\n"; $Global::TryingThreads = $Config{usethreads} || $Config{useithreads} || $Config{use5005threads}; - if($Global::TryingThreads and $] < 5.008_008 and ! -f '_allow_threads') { - print <<EOF; -It is not recommended that you run Interchange with a thread-enabled -perl older than version 5.8.8, which you have called this installer with. -Either rerun with - - /path/to/non-threaded/perl Makefile.PL - -or accept the possible problems that come with running on an experimental -software system. -EOF - - my $ans = my_prompt("Do you want to try running with threads? ", 'n'); - exit if $ans !~ /^\s*y/i; - open(THR, ">_allow_threads") - or die "Can't write allow threads file: $!\n"; - print THR "I agree not to hold anyone but myself responsible for the results of running an experimental system.\n"; - close THR; - } - -#warn "Got past open UID file , uid=$uid user=$>\n"; - GETUID: { if($> == 0 and ! $MV::Default{INTERCHANGE_USER}) { $uid = my_prompt( @@ -562,15 +541,6 @@ EOF } } - ALLOWTHREADS: { - unlink "$realdir/_allow_threads"; - last ALLOWTHREADS unless $Global::TryingThreads; - open(THR, ">$realdir/_allow_threads") - or die "Can't write allow threads file: $!\n"; - print THR "I agree not to hold anyone but myself responsible for the results of running an experimental system.\n"; - close THR; - } - if($MV::Default{LSB}) { my $d = cwd(); print "Doing LSB install...\n"; diff --git a/README.md b/README.md index 686318b..d7c90f1 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ The installation test script. ## Prerequisites -Interchange requires Perl 5.8.5 or later, on a Unix-like operating +Interchange requires Perl 5.14.1 or later, on a Unix-like operating system. It is primarily used on various Linux distributions, and has also been used on FreeBSD, OpenBSD, macOS, and other Unix variants. diff --git a/SPECS/interchange.spec b/SPECS/interchange.spec index 093c6a4..7071ea9 100644 --- a/SPECS/interchange.spec +++ b/SPECS/interchange.spec @@ -18,7 +18,7 @@ Summary: Interchange web application platform Name: interchange Version: 5.12.0 -Release: 1 +Release: 2 Vendor: Interchange Development Group Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot @@ -27,8 +27,8 @@ Packager: Jon Jensen <[email protected]> Source0: http://www.icdevgroup.org/interchange/interchange-%{version}.tar.gz License: GPL Prereq: /sbin/chkconfig, /sbin/service, /usr/sbin/useradd, /usr/sbin/groupadd -BuildPrereq: perl >= 5.8.8 -Requires: perl >= 5.8.8 +BuildPrereq: perl >= 5.14.1 +Requires: perl >= 5.14.1 Requires: perl(Safe::Hole) Requires: perl(Set::Crontab) Requires: interchange = %{version}-%{release} @@ -381,6 +381,9 @@ fi %changelog +* Tue Sep 18 2018 Jon Jensen <[email protected]> 5.12.0-2 +- Increase minimum Perl version to 5.14.1. + * Fri Oct 27 2017 David Christensen <[email protected]> 5.12.0-1 - Update for new release. diff --git a/UPGRADE b/UPGRADE index 2a1fc34..6d6ab50 100644 --- a/UPGRADE +++ b/UPGRADE @@ -7,6 +7,8 @@ Interchange is designed to be drop-in compatible in its major version. Briefly summarized, here's what you can expect when upgrading from the following versions: + 5.12.x -- The minimum supported Perl version is now 5.14.1. + 5.10.x -- A minor bug was fixed in an edge-case usage of the [area] tag which could result in incompatibility if your code relies on the buggy behaviour. diff --git a/dist/src/cpan_local_install b/dist/src/cpan_local_install index 9de75d3..6142c26 100755 --- a/dist/src/cpan_local_install +++ b/dist/src/cpan_local_install @@ -7,7 +7,7 @@ use Getopt::Std; getopts('cfd:h'); -require 5.008_005; +require 5.014_001; use vars qw/$opt_c $opt_d $opt_h $VERSION/; diff --git a/dist/src/mod_perl_tlink.pl b/dist/src/mod_perl_tlink.pl index 5dcd658..08ea443 100755 --- a/dist/src/mod_perl_tlink.pl +++ b/dist/src/mod_perl_tlink.pl @@ -2,7 +2,7 @@ # tlink.pl: runs as a cgi program and passes request to Interchange server # -# Copyright (C) 2002-2008 Interchange Development Group +# Copyright (C) 2002-2018 Interchange Development Group # Copyright (C) 1996-2002 Red Hat, Inc. # # This program is free software; you can redistribute it and/or @@ -19,7 +19,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -require 5.008_005; +require 5.014_001; use strict; use Apache::Registry; use Socket; diff --git a/dist/src/tlink.pl b/dist/src/tlink.pl index 0db65e8..fe0841e 100755 --- a/dist/src/tlink.pl +++ b/dist/src/tlink.pl @@ -3,7 +3,7 @@ # tlink.pl: runs as a cgi program and passes request to Interchange server # via a TCP socket # -# Copyright (C) 2005-2008 Interchange Development Group, http://www.icdevgroup.org/ +# Copyright (C) 2005-2018 Interchange Development Group, http://www.icdevgroup.org/ # Copyright (C) 1996-2002 Red Hat, Inc. # # This program is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301 USA. -require 5.008_005; +require 5.014_001; use strict; use Socket; my $LINK_TIMEOUT = 30; diff --git a/dist/src/vlink.pl b/dist/src/vlink.pl index 6c5d446..53f39cf 100755 --- a/dist/src/vlink.pl +++ b/dist/src/vlink.pl @@ -3,7 +3,7 @@ # vlink.pl: runs as a cgi program and passes request to Interchange server # via a UNIX socket -# Copyright (C) 2005-2008 Interchange Development Group, http://www.icdevgroup.org/ +# Copyright (C) 2005-2018 Interchange Development Group, http://www.icdevgroup.org/ # Copyright (C) 1996-2002 Red Hat, Inc. # # This program is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301 USA. -require 5.008_005; +require 5.014_001; use strict; use Socket; my $LINK_FILE = '~@~INSTALLARCHLIB~@~/etc/socket'; diff --git a/doc/WHATSNEW-5.12 b/doc/WHATSNEW-5.12 index 39465ee..d6fa154 100644 --- a/doc/WHATSNEW-5.12 +++ b/doc/WHATSNEW-5.12 @@ -10,13 +10,14 @@ Interchange 5.12 not released yet +Interchange now requires Perl 5.14.1 or newer. + Installation ----- +------------ -* Assume that if a source code control repository is present in - the installation directory, we don't need to do the archaic .~* - file copies. +* Assume that if a source code control repository is present in the + installation directory, we don't need to do the archaic .~* file copies. Core @@ -28,8 +29,8 @@ Core * Improve image uploading via the table editor. -* Improve [image] extension handling to search for lower/upper versions of file - extensions. +* Improve [image] extension handling to search for lower/uppercase versions + of file extensions. * Add date-change "common" filter parameter. @@ -48,7 +49,18 @@ Core * Improved integration of CI tools for development. -* Multiple cleanups to handle more modern versions of Perl. +* Multiple cleanups and bugfixes to handle more modern versions of Perl. + +* Add x_accel_expires pragma to set X-Accel-Expires header for nginx proxy caching. + +* Remove non-header from BounceReferrals HTTP response headers, which + breaks output with newer Apache versions. + +* Support recipient addresses in CC and BCC when using Net::SMTP. + +* Make Interchange reopen debug.log/STDERR when receiving HUP signal. + +* Fix race conditions in timed-build output. Payments @@ -61,12 +73,15 @@ Payments * Updated Vend::Payment::PayPal to latest available version. -* Add Gateway Log feature for logging full details of payment gateway requests/responses. - (See extended section about the GatewayLog later in this document.) +* Add Gateway Log feature for logging full details of payment gateway requests/ + responses. (See extended section about the GatewayLog later in this document.) + Database -------- +* Support newer versions of MySQL. + * Allow admin user to export specific tables using [backup-database] despite current NoExportExternal setting. @@ -81,8 +96,8 @@ Database Assuming one has a timestamp field in the userdb table called "update_date", this is effected by changing the configuration as: - Database userdb TIMESTAMP_FIELD update_date - Database userdb NO_UPDATE mod_time + Database userdb TIMESTAMP_FIELD update_date + Database userdb NO_UPDATE mod_time * Add ability to return after Preload and Autoload routines. Setting $Vend::PreloadReturn or $Vend::AutoloadReturn (i.e. @@ -102,12 +117,12 @@ Database If you do: - UserDB ui valref user_record - UserTag uvalue Alias data base=session key= + UserDB ui valref user_record + UserTag uvalue Alias data base=session key= you will then be able to reference the Admin "values" with - [uvalue name] + [uvalue name] The [if-mm] tag probably needs to be adjusted for this to work in the admin in real life. @@ -116,20 +131,28 @@ Database * Update default field widths for userdb, transactions, and orderlines. +* Improve error handling/messaging when no access to database in Safe. + +* Fix table editor composite key problems, both creating new and editing + existing rows. + UserDB ------ -* Add "fallback_login" option, to be used with "indirect_login". If indirect fails, it will fallback - to the primary key (by default, username). This could allow users to login with email - (indirect_login = usernick), but still support login via username if they opted to use their - username instead. +* Add "fallback_login" option, to be used with "indirect_login". If + indirect fails, it will fallback to the primary key (by default, + username). This could allow users to login with email (indirect_login + = usernick), but still support login via username if they opted to use + their username instead. -* Add "promote_admin" option, to be used with "scratch". The option is set to the value of a - field name, which also has to be a "scratch" value. If that is true, and the value of the - field is true, the user will be promoted to $Vend::admin. They will not be $Vend::super. - Note that this does not gain access to the classic Interchange UI without modification, - since the login_table will not be admin (the test which is used in most cases). +* Add "promote_admin" option, to be used with "scratch". The option + is set to the value of a field name, which also has to be a "scratch" + value. If that is true, and the value of the field is true, the user + will be promoted to $Vend::admin. They will not be $Vend::super. Note + that this does not gain access to the classic Interchange UI without + modification, since the login_table will not be admin (the test which is + used in most cases). Strap Demo Catalog @@ -141,6 +164,9 @@ Strap Demo Catalog * Formatting fixes on checkout pages. +* Fix broken random password number range; consistently make random + instead of using zip or phone. + Gateway Log ----------- @@ -193,21 +219,22 @@ There are 3 settings a catalog manager can control when enabling gateway logging: * Enabled (discussed above) - Boolean to indicate that actual logging should be performed. Default - is false; thus logging must be explicitly requested. Can be set with - Route param or [charge] options "gwl_enabled", or globally with - MV_PAYMENT_GWL_ENABLED in catalog.cfg. + Boolean to indicate that actual logging should be performed. Default + is false; thus logging must be explicitly requested. Can be set with + Route param or [charge] options "gwl_enabled", or globally with + MV_PAYMENT_GWL_ENABLED in catalog.cfg. * LogTable - Name of table to which logging should be directed. Default is - gateway_log. Can be set with Route param or [charge] option "gwl_table", - or globally with MV_PAYMENT_GWL_TABLE in catalog.cfg. + Name of table to which logging should be directed. Default is + gateway_log. Can be set with Route param or [charge] option "gwl_table", + or globally with MV_PAYMENT_GWL_TABLE in catalog.cfg. * Source - Maps to the request_source field in the log table. Value is most - meaningful in a distributed environment, where multiple servers - running the Interchange application may be handling requests behind a - load balancer. Default value obtained from `hostname -s`. Can be set - with Route param or [charge] option "gwl_source", or globally with - MV_PAYMENT_GWL_SOURCE in catalog.cfg. - + Maps to the request_source field in the log table. Value is most + meaningful in a distributed environment, where multiple servers + running the Interchange application may be handling requests behind a + load balancer. Default value obtained from `hostname -s`. Can be set + with Route param or [charge] option "gwl_source", or globally with + MV_PAYMENT_GWL_SOURCE in catalog.cfg. + +(end) diff --git a/extensions/Interchange.pm b/extensions/Interchange.pm index 73b3c67..c2ab81b 100644 --- a/extensions/Interchange.pm +++ b/extensions/Interchange.pm @@ -1,6 +1,6 @@ # Interchange.pm - Interchange access for Perl scripts # -# Copyright (C) 2002-2008 Interchange Development Group +# Copyright (C) 2002-2018 Interchange Development Group # Copyright (C) 1996-2002 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -26,13 +26,13 @@ require Exporter; @EXPORT = qw(); @EXPORT_OK = qw(); +require 5.014_001; use strict; use Fcntl; use vars qw($VERSION @EXPORT @EXPORT_OK); $VERSION = '1.6'; BEGIN { - require 5.008_005; ($Global::VendRoot = $ENV{INTERCHANGE_ROOT}) if defined $ENV{INTERCHANGE_ROOT}; ($Global::CatRoot = $ENV{INTERCHANGE_CATDIR}) diff --git a/hints.pl b/hints.pl index b238c98..12b8dd4 100644 --- a/hints.pl +++ b/hints.pl @@ -2,63 +2,7 @@ package mvhints; -sub get_hints { - my @out; - - my $condition; - my $routine; - - $condition = sub { $^O =~ /nolongernecessary/i }; - $routine = sub { - my $fn = 'interchange.cfg.dist'; - rename $fn, "$fn.bak"; - open HINTIN, "$fn.bak" - or die "cannot open $fn.bak: $!\n"; - open HINTOUT, ">$fn" - or die "cannot write $fn: $!\n"; - while(<HINTIN>) { - s/ - ^\s*Housekeeping\s+\d+.*$ - /# Changed for $^O, no safe signals\nHousekeeping 1/xig; - s/ - ^\s*MaxServers\s+\d+.*$ - /# Changed for $^O, no safe signals\nMaxServers 0/xig; - print HINTOUT $_; - } - close HINTIN; - close HINTOUT; - unlink "$fn.bak"; - return 1; - }; - push @out, [ $condition, $routine ]; - - $condition = sub { $Global::TryingThreads && $^O =~ /linux/i }; - $routine = sub { - my $fn = 'interchange.cfg.dist'; - rename $fn, "$fn.bak"; - open HINTIN, "$fn.bak" - or die "cannot open $fn.bak: $!\n"; - open HINTOUT, ">$fn" - or die "cannot write $fn: $!\n"; - while(<HINTIN>) { - print HINTOUT $_; - } - if ($^V lt 5.10.0) { - print HINTOUT <<EOF; - -## Added because threaded Perl on linux has broken getppid() as -## of this distribution -Variable MV_GETPPID_BROKEN 1 -EOF - close HINTIN; - close HINTOUT; - unlink "$fn.bak"; - return 1; - } - }; - push @out, [ $condition, $routine ]; - - return @out; -} +# See the Git history of this file for examples of how to use this facility. +sub get_hints {} 1; diff --git a/lib/Vend/CounterFile.pm b/lib/Vend/CounterFile.pm index 15d6ccd..ff94f20 100644 --- a/lib/Vend/CounterFile.pm +++ b/lib/Vend/CounterFile.pm @@ -85,12 +85,11 @@ Gisle Aas <[email protected]> =cut -require 5.005; +require 5.014_001; use Carp qw(croak); use Symbol qw(gensym); my $rewind_check; eval { - require 5.005; require Errno; import Errno qw(EINTR); $rewind_check = 1; diff --git a/lib/Vend/Safe.pm b/lib/Vend/Safe.pm index 2a79c34..6a0fdce 100644 --- a/lib/Vend/Safe.pm +++ b/lib/Vend/Safe.pm @@ -43,7 +43,7 @@ sub new { my $safe = Safe->new(@args); # Safe started taking better care of Unicode things as of version 2.32 - if ($] lt '5.009' || version->parse($Safe::VERSION) < version->parse('2.32')) { + if (version->parse($Safe::VERSION) < version->parse('2.32')) { $invocant->initialize_safe_compartment($safe); } diff --git a/scripts/interchange.PL b/scripts/interchange.PL index 6c195bb..dbe997b 100644 --- a/scripts/interchange.PL +++ b/scripts/interchange.PL @@ -56,7 +56,7 @@ use Config; no Config; BEGIN { - require 5.008_005; + require 5.014_001; $ENV{PERL_SIGNALS} ||= 'unsafe'; @@ -379,7 +379,7 @@ its web site: http://www.icdevgroup.org/ -Interchange requires Perl 5.8.5 or higher; more information on Perl can +Interchange requires Perl 5.14.1 or higher; more information on Perl can be seen at: http://www.perl.com/ @@ -854,32 +854,6 @@ EOF } } - THREADCHECK: { - last THREADCHECK unless $Global::TryingThreads; - $] >= 5.008_008 and last THREADCHECK; - - my $msg = <<EOF; -*************************************************************** -*************************************************************** -**** **** -**** You are running a Perl older than 5.8.8 with **** -**** threads enabled -- this is not recommended for a **** -**** production environment. **** -**** **** -**** If the Interchange daemon does not start, add this **** -**** line to interchange.cfg: **** -**** **** -**** Variable MV_GETPPID_BROKEN 1 **** -**** **** -**** Then restart the server. **** -**** **** -*************************************************************** -*************************************************************** -EOF - chomp $msg; - logGlobal($msg); - } - # The global configuration set up which catalogs exist. # Certain ones may have been skipped with -skip on command line... CATCONFIG: { diff --git a/scripts/offline.PL b/scripts/offline.PL index 75dfef3..9b82e05 100644 --- a/scripts/offline.PL +++ b/scripts/offline.PL @@ -3,7 +3,7 @@ # # Interchange database builder and indexer # -# Copyright (C) 2002-2007 Interchange Development Group +# Copyright (C) 2002-2018 Interchange Development Group # Copyright (C) 1996-2002 Red Hat, Inc. # # This program was originally based on Vend 0.2 and 0.3 @@ -29,6 +29,7 @@ use lib '/usr/local/interchange/lib'; use lib '/usr/local/interchange'; #use lib '~_~INSTALLARCHLIB~_~'; +require 5.014_001; use strict; use Fcntl; use Vend::Util; @@ -43,7 +44,6 @@ $Data::Dumper::Indent = 2; BEGIN { eval { - require 5.004; require FindBin; 1 and $Global::VendRoot = $FindBin::RealBin; 1 and $Global::VendRoot =~ s/.bin$//; diff --git a/scripts/update.PL b/scripts/update.PL index c08b122..5eb7221 100644 --- a/scripts/update.PL +++ b/scripts/update.PL @@ -3,7 +3,7 @@ # # Interchange database updater # -# Copyright (C) 2002-2007 Interchange Development Group +# Copyright (C) 2002-2018 Interchange Development Group # Copyright (C) 1996-2002 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ use lib '/usr/local/interchange/lib'; use lib '/usr/local/interchange'; #use lib '~_~INSTALLARCHLIB~_~'; +require 5.014_001; use strict; use Fcntl; use Vend::Config; @@ -34,7 +35,6 @@ use Vend::Util; BEGIN { eval { - require 5.004; require FindBin; 1 and $Global::VendRoot = "$FindBin::RealBin"; 1 and $Global::VendRoot =~ s/.bin$//;