#48348 Running /usr/sbin/setup-ds.pl fails with Can't locate bigint.pm, plus two warnings
Closed: wontfix None Opened 8 years ago by rmeggins.

Ticket was cloned from Red Hat Bugzilla (product Fedora): Bug 1282466

Description of problem:

Running

  /usr/sbin/setup-ds.pl -u -s General.UpdateMode=offline

on a Fedora 23 installation with data from Fedora 22 installation (in a
container but hopefully that does not matter) fails with

Error: not applying update /usr/share/dirsrv/updates/50fixNsState.pl. Error:
Can't locate bigint.pm in @INC (you may need to install the bigint module)
(@INC contains: /usr/lib64/dirsrv/perl /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
/usr/share/dirsrv/updates/50fixNsState.pl line 7.
BEGIN failed--compilation aborted at /usr/share/dirsrv/updates/50fixNsState.pl
line 7.
Compilation failed in require at (eval 16) line 1.

There are also warnings

   Use of literal control characters in variable names is deprecated

due to to a control character instead of verbatim $^O and

   Smartmatch is experimental

I was able to get the same error on plain (non-container) Fedora 23
installation.

Version-Release number of selected component (if applicable):

389-ds-base-1.3.4.4-1.fc23.1

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have FreeIPA on Fedora 23 installation.
2. Run /usr/sbin/setup-ds.pl -u -s General.UpdateMode=offline

Actual results:

Use of literal control characters in variable names is deprecated at
/usr/lib64/dirsrv/perl/DSCreate.pm line 839.
Error: not applying update /usr/share/dirsrv/updates/50fixNsState.pl. Error:
Can't locate bigint.pm in @INC (you may need to install the bigint module)
(@INC contains: /usr/lib64/dirsrv/perl /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
/usr/share/dirsrv/updates/50fixNsState.pl line 7.
BEGIN failed--compilation aborted at /usr/share/dirsrv/updates/50fixNsState.pl
line 7.
Compilation failed in require at (eval 16) line 1.

Smartmatch is experimental at /usr/share/dirsrv/updates/52updateAESplugin.pl
line 58.
Error: not applying update '/usr/share/dirsrv/updates/50fixNsState.pl'.  Error:
Can't locate bigint.pm in @INC (you may need to install the bigint module)
(@INC contains: /usr/lib64/dirsrv/perl /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
/usr/share/dirsrv/updates/50fixNsState.pl line 7.
BEGIN failed--compilation aborted at /usr/share/dirsrv/updates/50fixNsState.pl
line 7.
Compilation failed in require at (eval 16) line 1.

Error: could not update the directory server.
Exiting . . .
Log file is '/tmp/setupOj5aId.log'

Expected results:

No error related to wrong packaging or wrong or experimental coding.

Additional info:

Could reproduce the problem.

Fedora release 23 (Twenty Three)
{{{
Smartmatch is experimental at /usr/share/dirsrv/updates/52updateAESplugin.pl line 58, <STDIN> line 2.
Error: not applying update '/usr/share/dirsrv/updates/50fixNsState.pl'. Error: Can't locate bigint.pm in @INC (you may need to install the bigint module) (@INC contains: /usr/lib64/dirsrv/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/share/dirsrv/updates/50fixNsState.pl line 7, <STDIN> line 2.
BEGIN failed--compilation aborted at /usr/share/dirsrv/updates/50fixNsState.pl line 7, <STDIN> line 2.
Compilation failed in require at (eval 16) line 1, <STDIN> line 2.
}}}

rpm -qa perl | egrep -i bigint

"bigint" is sub-packaged since perl 5.22.0-347.
* Wed Jul 08 2015 Petr Pisar ppisar@redhat.com - 4:5.22.0-347
- Sub-package Math-BigInt
{{{
Note: the current perl version on FC23:
perl-5.22.0-349.fc23.x86_64
Math::BigInt:
perl-Math-BigInt-1.9997-349.fc23.noarch
There is no bigint in the package any more.

The current perl version of FC22:
perl-5.20.3-328.fc22.x86_64
bigint and BigInt are both in the main package perl.
$ rpm -qf /usr/share/perl5/bigint.pm
perl-5.20.3-328.fc22.x86_64
$ rpm -qf /usr/share/perl5/Math/BigInt.pm
perl-5.20.3-328.fc22.x86_64
}}}

{{{
7 use bigint;
7 use Math::BigInt;
}}}
Will this work on all platforms, or do we need to do some sort of conditional check e.g.
{{{
use Socket;
$sockVersion = Socket->VERSION;
if ($sockVersion >= 2.000) {
import Socket qw ( :addrinfo inet_ntoa
unpack_sockaddr_in unpack_sockaddr_in6
AF_INET INADDR_ANY
PF_INET SO_REUSEADDR SOCK_STREAM SOL_SOCKET );
} elsif (eval {require Socket6; 1}) {
import Socket6 qw (getaddrinfo getnameinfo unpack_sockaddr_in6);
}
}}}
how we conditionally require Socket or Socket6 depending on what platform we are using.

I'm thinking to have the patch on the version 1.3.4 and newer.

1.3.4 is on F22, on which I verified the patch. I have no plan to update 1.3.3 on F21.

Do we still need the condition?

I verified it works with perl-5.10.1-141 on epel6.

ok - if it works on el6, that's early enough

Ack, works for me (el7)

Reviewed by Rich and William (Thank you!!)

Pushed to master:
a534583..65362db master -> master
commit dfc9ad0

Pushed to 389-ds-base-1.3.4:
a4c0a9e..c0d35f7 389-ds-base-1.3.4 -> 389-ds-base-1.3.4
commit 9cf6284

Metadata Update from @firstyear:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.4.5

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1679

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata