サーバー移転で、Perlがエラー

らら
らら

はじめに

いままでのPerlは後方互換性が取れていて移転しやすかったんですが・・・

最近、ここ数年Perl 5.14でjcodeの対応、そして5.26でエラーが出て、引っ越し作業がPHPみたいになってきて・・・

まぁ CentOS 6から7、8毎にエラーでる感じですね。

正直・リニューアルしてほしい。

ディストリビューションごとのバージョン

CentOS 9 AlmaLinux


Perl		5.32 remiで
MariaDB		10.5
MySQL		8.0

CentOS 8 実行カレントディレクトリ。連想配列の%の定義・改行コードなど・・・


Perl		5.26
MySQL		8.0

CentOS 7 jcode問題


Perl		5.16
MySQL		5.5

CentOS 6


perl		5.10.1
MySQL		5.1

Perl 5.14

jcode エラー


efined(%hash) is deprecated at ../perllib/jcode.pl line 684.
       (Maybe you should just omit the defined()?)
defined(%hash) is deprecated at ../perllib/jcode.pl line 693.
       (Maybe you should just omit the defined()?)

jcode.plをエディターで開いて。下記の箇所を変更 unless defined %→ if !%


sub z2h_euc {
   local(*s, $n) = @_;
   &init_z2h_euc unless defined %z2h_euc_inited;
   $s =~ s/($re_euc_c|$re_euc_kana)/
   $z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1
   /geo;
   $n;
}
sub z2h_sjis {
   local(*s, $n) = @_;
   &init_z2h_sjis unless defined %z2h_sjis_inited;
   $s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
   $n;
}

下記に変更


sub z2h_euc {
   local(*s, $n) = @_;
   &init_z2h_euc if !%z2h_euc;
   $s =~ s/($re_euc_c|$re_euc_kana)/$z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1/geo;
   $n;
}
sub z2h_sjis {
   local(*s, $n) = @_;
   &init_z2h_sjis if !%z2h_sjis;
   $s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
   $n;
}

Perl 5.26

■@INCから.が削除された。

これは、いままで下記の書き方でもOKだったのが・・・・


require "xxxxx.pl";

下記のようにしないとだめになった...


require "./xxxxx.pl";

require以外もopenなどファイルを指定する場所は、注意が必要

もしくは、修正するファイルの量・修正箇所が多い場合、下記とかでも

ライブラリのみは。


use lib ".";

または。。。


BEGIN { push @INC, "." if $INC[-1] ne "."; }

カレントディレクトリを使用しているソース先頭に・・


#!/usr/bin/perl
BEGIN { push @INC, "." if $INC[-1] ne "."; }

■連想配列%で、下記のバグぽい記述もNGで動作していたものが動作しない


	%XXXX->{'test'}[1]		= "";

下記、が正解・・


	$XXXX{'test'}[1]		= "";

■ソースの改行コード CR+LFでもエラーにならなかったが、エラーになる。LFに置き換えて正常になる

実行カレントディレクトリ確認してみた

perl 5.16の設定

@INCの最後に.があります。


perl -V
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
  Platform:
    osname=linux, osvers=3.10.0-957.1.3.el7.x86_64, archname=x86_64-linux-thread-multi
    uname='linux x86-02.bsys.centos.org 3.10.0-957.1.3.el7.x86_64 #1 smp thu nov 29 14:49:43 utc 2018 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -Dccdlflags=-Wl,--enable-new-dtags -Dlddlflags=-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -Wl,-z,relro  -DDEBUGGING=-g -Dversion=5.16.3 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64/perl5/vendor_perl -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustomize'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.8.5 20150623 (Red Hat 4.8.5-44)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector'
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.17'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro '
Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
                        USE_REENTRANT_API USE_SITECUSTOMIZE
  Locally applied patches:
        Fedora Patch1: Removes date check, Fedora/RHEL specific
        Fedora Patch3: support for libdir64
        Fedora Patch4: use libresolv instead of libbind
        Fedora Patch5: USE_MM_LD_RUN_PATH
        Fedora Patch6: Skip hostname tests, due to builders not being network capable
        Fedora Patch7: Dont run one io test due to random builder failures
        Fedora Patch9: Fix find2perl to translate ? glob properly (RT#113054)
        Fedora Patch10: Fix broken atof (RT#109318)
        Fedora Patch13: Clear $@ before "do" I/O error (RT#113730)
        Fedora Patch14: Do not truncate syscall() return value to 32 bits (RT#113980)
        Fedora Patch15: Override the Pod::Simple::parse_file (CPANRT#77530)
        Fedora Patch16: Do not leak with attribute on my variable (RT#114764)
        Fedora Patch17: Allow operator after numeric keyword argument (RT#105924)
        Fedora Patch18: Extend stack in File::Glob::glob, (RT#114984)
        Fedora Patch19: Do not crash when vivifying $|
        Fedora Patch20: Fix misparsing of maketext strings (CVE-2012-6329)
        Fedora Patch21: Add NAME headings to CPAN modules (CPANRT#73396)
        Fedora Patch22: Fix leaking tied hashes (RT#107000) [1]
        Fedora Patch23: Fix leaking tied hashes (RT#107000) [2]
        Fedora Patch24: Fix leaking tied hashes (RT#107000) [3]
        Fedora Patch25: Fix dead lock in PerlIO after fork from thread (RT#106212)
        Fedora Patch26: Make regexp safe in a signal handler (RT#114878)
        Fedora Patch27: Update h2ph(1) documentation (RT#117647)
        Fedora Patch28: Update pod2html(1) documentation (RT#117623)
        Fedora Patch29: Document Math::BigInt::CalcEmu requires Math::BigInt (CPAN RT#85015)
        RHEL Patch30: Use stronger algorithm needed for FIPS in t/op/crypt.t (RT#121591)
        RHEL Patch31: Make *DBM_File desctructors thread-safe (RT#61912)
        RHEL Patch32: Use stronger algorithm needed for FIPS in t/op/taint.t (RT#123338)
        RHEL Patch33: Remove CPU-speed-sensitive test in Benchmark test
        RHEL Patch34: Make File::Glob work with threads again
        RHEL Patch35: Fix CRLF conversion in ASCII FTP upload (CPAN RT#41642)
        RHEL Patch36: Do not leak the temp utf8 copy of namepv (CPAN RT#123786)
        RHEL Patch37: Fix duplicating PerlIO::encoding when spawning threads (RT#31923)
        RHEL Patch38: Add SSL support to Net::SMTP (CPAN RT#93823) [1]
        RHEL Patch39: Add SSL support to Net::SMTP (CPAN RT#93823) [2]
        RHEL Patch40: Add SSL support to Net::SMTP (CPAN RT#93823) [3]
        RHEL Patch41: Add SSL support to Net::SMTP (CPAN RT#93823) [4]
        RHEL Patch42: Do not overload ".." in Math::BigInt (CPAN RT#80182)
        RHEL Patch43: Fix CVE-2018-18311 Integer overflow leading to buffer overflow
        RHEL Patch44: Fix a spurious timeout in Net::FTP::close (CPAN RT#18504)
        RHEL Patch45: Fix day of year parsing (CPAN RT#88211)
        RHEL Patch47: Fix CVE-2020-12723 (GH#16947)
        RHEL Patch48: Fix CVE-2020-10543
        RHEL Patch49: Fix CVE-2020-10878
  Built under linux
  Compiled at Feb  2 2021 16:31:58
  %ENV:
    PERL5LIB="/root/perl5/lib/perl5:"
    PERL_LOCAL_LIB_ROOT=":/root/perl5"
    PERL_MB_OPT="--install_base /root/perl5"
    PERL_MM_OPT="INSTALL_BASE=/root/perl5"
  @INC:
    /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi
    /root/perl5/lib/perl5/5.16.3
    /root/perl5/lib/perl5/x86_64-linux-thread-multi
    /root/perl5/lib/perl5
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5
    .

perl 5.26の設定

@INCに実行カレントディレクトリの指定(.)がない。


perl -V
Summary of my perl5 (revision 5 version 26 subversion 3) configuration:
  Platform:
    osname=linux
    osvers=4.18.0-425.3.1.el8.x86_64
    archname=x86_64-linux-thread-multi
    uname='linux aa2c0304b1c54bccacee11bffa62968a 4.18.0-425.3.1.el8.x86_64 #1 smp tue nov 8 14:08:25 est 2022 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=none -Dccflags=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Dldflags=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Dccdlflags=-Wl,--enable-new-dtags -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Dlddlflags=-shared -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Dshrpdir=/usr/lib64 -DDEBUGGING=-g -Dversion=5.26.3 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64/perl5/vendor_perl -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustomize -Duse64bitint'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='  -g'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include'
    ccversion=''
    gccversion='8.5.0 20210514 (Red Hat 8.5.0-18)'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='gcc'
    ldflags ='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib64 /lib64 /usr/lib64 /usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib
    libs=-lpthread -lresolv -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lresolv -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.28.so
    so=so
    useshrplib=true
    libperl=libperl.so
    gnulibc_version='2.28'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
    cccdlflags='-fPIC'
    lddlflags='-lpthread -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_IMPLICIT_CONTEXT
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
    USE_SITECUSTOMIZE
  Locally applied patches:
    Fedora Patch1: Removes date check, Fedora/RHEL specific
    Fedora Patch3: support for libdir64
    Fedora Patch4: use libresolv instead of libbind
    Fedora Patch5: USE_MM_LD_RUN_PATH
    Fedora Patch6: Provide MM::maybe_command independently (bug #1129443)
    Fedora Patch7: Dont run one io test due to random builder failures
    Fedora Patch15: Define SONAME for libperl.so
    Fedora Patch16: Install libperl.so to -Dshrpdir value
    Fedora Patch22: Document Math::BigInt::CalcEmu requires Math::BigInt (CPAN RT#85015)
    Fedora Patch26: Make *DBM_File desctructors thread-safe (RT#61912)
    Fedora Patch27: Make PadlistNAMES() lvalue again (CPAN RT#101063)
    Fedora Patch30: Replace EU::MakeMaker dependency with EU::MM::Utils in IPC::Cmd (bug #1129443)
    Fedora Patch31: Make File::Glob more resistant against degenerative matching (RT#131211)
    Fedora Patch36: Fix glob UTF-8 flag on a glob reassignment (RT#131263)
    Fedora Patch38: Fix handling backslashes in PATH environment variable when executing "perl -S" (RT#129183)
    Fedora Patch45: Fix File::Glob rt131211.t test random failures
    Fedora Patch46: Fix t/op/hash.t test random failures
    Fedora Patch47: Parse caret variables with subscripts as normal variables inside ${...} escaping (RT#131664)
    Fedora Patch49: Do not display too many bytes when reporting malformed UTF-8 character
    Fedora Patch51: Fix error message for "our sub foo::bar" (RT#131679)
    Fedora Patch52: Fix executing arybase::_tie_it() in Safe compartement (RT#131588)
    Fedora Patch54: Fix splitting non-ASCII strings if unicode_strings feature is enabled (RT#130907)
    Fedora Patch55: Fix compiler warnings in code generated by ExtUtils::Constant (CPAN RT#63832)
    Fedora Patch56: Fix compiler warnings in code generated by ExtUtils::Constant (CPAN RT#101487)
    Fedora Patch58: Fix unreliable Time-HiRes tests (CPAN RT#122819)
    Fedora Patch61: Fix Term::ReadLine not to create spurious &STDERR files (RT#132008)
    Fedora Patch64: Fix an overflow when parsing a character range with no preceding character (RT#132245)
    Fedora Patch65: Fix walking symbol table for ISA in Carp
    Fedora Patch66: Fix handling file names with null bytes in stat and lstat functions (RT#131895)
    Fedora Patch67: Fix a crash when untying an object witout a stash
    Fedora Patch68: Fix deparsing of transliterations with unprintable characters (RT#132405)
    Fedora Patch69: Fix error reporting on do() on a directory (RT#125774)
    Fedora Patch70: Fix stack manipulation when a lexical subroutine is defined in a do block in a member of an iteration list (RT#132442)
    Fedora Patch71: Fix setting $! when statting a closed filehandle (RT#108288)
    Fedora Patch72: Fix tainting of s/// with overloaded replacement (RT#115266)
    Fedora Patch73: Expand system() arguments before a fork (RT#121105)
    Fedora Patch76: Avoid undefined behavior when copying memory in Glob and pp_caller (RT#131746)
    Fedora Patch78: Fix compatibility with libxcrypt (RT#133184)
    Fedora Patch79: Link XS modules to pthread library to fix linking with -z defs
    Fedora Patch80: Fix parsing braced subscript after parentheses (RT#8045)
    Fedora Patch81: Do not clobber file bytes in :encoding layer (RT#132833)
    Fedora Patch82: Fix line numbers in multi-line s/// (RT#131930)
    Fedora Patch83: Fix parsing extended bracketed character classes (RT#132167)
    Fedora Patch84: Fix a possibly unitialized memory read in the Perl parser (RT#133074)
    Fedora Patch85: Fix an infinite loop in the regular expression compiler (RT#133185)
    Fedora Patch86: Adjust tests to gdbm-1.15 (RT#133295)
    Fedora Patch88: Fix printing a warning about a wide character when matching a regular expression while ISO-8859-1 locale is in effect
    Fedora Patch89: Fix invoking a check for wide characters while ISO-8859-1 locale is in effect
    Fedora Patch90: Pass the correct CFLAGS to dtrace
    RHEL Patch91: Fix Time-Local tests to pass after year 2019 (bug #1807120)
    RHEL Patch92: Fix CVE-2020-12723 (GH#16947)
    RHEL Patch93: Fix CVE-2020-10543
    RHEL Patch94: Fix CVE-2020-10878
    RHEL Patch95: Fix Net-Ping _resolv return value on failing DNS name lookup (bug #1973030)
    RHEL Patch97: Fix a memory leak when compiling a regular expression with a non-word class (GH#17218)
    Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux
    Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux
    Fedora Patch202: Add definition of OPTIMIZE to .ph files (bug #2152012)
  Built under linux
  Compiled at May 18 2023 17:34:27
  @INC:
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5

変更するソースコードが沢山とか・・他社の書いたコードだから触りたくないという感じの方は・・

セキュリティ面で下がってしまいますが・・・


perl -V:usesitecustomize
usesitecustomize='define';

perl -V:sitelib
sitelib='/usr/local/share/perl5';

上記で判明した/usr/local/share/perl5からsitecustomize.plをさがす・・


ls /usr/local/share/perl5

sitecustomize.plがなければ

sitecustomize.plを作成して下記を追加して、パーミッション変更でOKです。下記1行でOKです。


push @INC, "." if $INC[-1] ne ".";

Perl 5.30

■ File::Slurp 9999.23 read_fileでエラー

Perl 5.30 で、:utf8 ハンドルでバイトを読み書きするために sysread(), recv(), syswrite(), send() を使うことはできなくなります。

ライブラリ最新で問題解決

5.30からかなり・・・詳細は下記から

https://perldoc.jp/docs/perl/5.30.0/perldeprecation.pod

こちらは、再度移転の時・・・わすれないで・・・

さいごに

5.16の方もアプデきちんとされてるんですね。。

RHEL Patch95とかRHEL Patch97の辺がネックなんですかね。。5.26は。。

他社が作ったものは・・・・時間がかかるね。。

あと、Movable Typeもperlなので、centos6から7とか8にアップグレードする場合は、旧サイトでMT ver 6.2以降か最終の6.8とかでバージョンアップしたほうがよいです。

MT年間ライセンス費用は掛かりますが・・・

関連

CentOS8環境Movable Type6でエラー発生
https://www.omakase.net/blog/2020/12/centos8movable-type6.html

関連記事