Bug 1320508 - logconv.pl uses the older perl module DB_File.pm with limited functionality.
Summary: logconv.pl uses the older perl module DB_File.pm with limited functionality.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: pre-dev-freeze
: 7.4
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-23 11:36 UTC by Hemant Yadav
Modified: 2020-09-13 21:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: To use BerkeleyDB module of perl with enhanced functionality. Reason: DB_File uses deprecated functionality of quite old DB version. Result:
Clone Of:
Environment:
Last Closed: 2016-04-14 16:34:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1836 0 None None None 2020-09-13 21:42:20 UTC

Description Hemant Yadav 2016-03-23 11:36:11 UTC
Description of problem:
I would not say it as bug.
But the Directory server logconv.pl enforces the Berkeley DB to use the deprecated functionality, as it uses DB_File perl module. As per the perl documentation f you want to make use of the new features available in Berkeley DB 2.x or greater, use the Perl module BerkeleyDB instead.

Version-Release number of selected component (if applicable):
389 DS 1.1.42 need version Berkeley 4.2.52 or later.

I think we should change the logconv.pl as below:
from->  use DB_File;
to-> use BerkeleyDB

Comment 2 Rich Megginson 2016-03-23 14:17:23 UTC
(In reply to Hemant Yadav from comment #0)
> Description of problem:
> I would not say it as bug.
> But the Directory server logconv.pl enforces the Berkeley DB to use the
> deprecated functionality, as it uses DB_File perl module. As per the perl
> documentation if you want to make use of the new features available in
> Berkeley DB 2.x or greater, use the Perl module BerkeleyDB instead.

perl-DB_File isn't exactly deprecated.  It is not marked as deprecated at http://perldoc.perl.org/DB_File.html.  If it is marked as deprecated, can you provide a link to that?

Are there specific features you want to use that are not available via the perl-DB_File interfaces?

logconv.pl uses very basic features of BDB.  I'm not sure how we could significantly improve logconv.pl by using BerkeleyDB instead of DB_File.

I would rather rewrite logconv in some other language (like python, or something newer like go? rust?), or figure out how to use off-the-shelf 3rd party logging parsers.

> 
> Version-Release number of selected component (if applicable):
> 389 DS 1.1.42 need version Berkeley 4.2.52 or later.

The documentation says this:
"Using DB_File with Berkeley DB version 2 or greater

Although DB_File is intended to be used with Berkeley DB version 1, it can also be used with version 2, 3 or 4. In this case the interface is limited to the functionality provided by Berkeley DB 1.x. Anywhere the version 2 or greater interface differs, DB_File arranges for it to work like version 1. This feature allows DB_File scripts that were built with version 1 to be migrated to version 2 or greater without any changes.

If you want to make use of the new features available in Berkeley DB 2.x or greater, use the Perl module BerkeleyDB instead."

And in fact perl-DB_File can use bdb 5.x:

$ cat /etc/fedora-release 
Fedora release 23 (Twenty Three)
$ ldd /usr/lib64/perl5/vendor_perl/auto/DB_File/DB_File.so
...
	libdb-5.3.so => /lib64/libdb-5.3.so (0x00007f5979411000)

> 
> I think we should change the logconv.pl as below:
> from->  use DB_File;
> to-> use BerkeleyDB

Comment 3 Noriko Hosoi 2016-03-23 16:38:08 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/48776

Comment 4 Hemant Yadav 2016-04-14 06:24:54 UTC
(In reply to Rich Megginson from comment #2)
> (In reply to Hemant Yadav from comment #0)
> > Description of problem:
> > I would not say it as bug.
> > But the Directory server logconv.pl enforces the Berkeley DB to use the
> > deprecated functionality, as it uses DB_File perl module. As per the perl
> > documentation if you want to make use of the new features available in
> > Berkeley DB 2.x or greater, use the Perl module BerkeleyDB instead.
> 
> perl-DB_File isn't exactly deprecated.  It is not marked as deprecated at
> http://perldoc.perl.org/DB_File.html.  If it is marked as deprecated, can
> you provide a link to that?
> 
> Are there specific features you want to use that are not available via the
> perl-DB_File interfaces?
> 
> logconv.pl uses very basic features of BDB.  I'm not sure how we could
> significantly improve logconv.pl by using BerkeleyDB instead of DB_File.
> 
> I would rather rewrite logconv in some other language (like python, or
> something newer like go? rust?), or figure out how to use off-the-shelf 3rd
> party logging parsers.
> 
> > 
> > Version-Release number of selected component (if applicable):
> > 389 DS 1.1.42 need version Berkeley 4.2.52 or later.
> 
> The documentation says this:
> "Using DB_File with Berkeley DB version 2 or greater
> 
> Although DB_File is intended to be used with Berkeley DB version 1, it can
> also be used with version 2, 3 or 4. In this case the interface is limited
> to the functionality provided by Berkeley DB 1.x. Anywhere the version 2 or
> greater interface differs, DB_File arranges for it to work like version 1.
> This feature allows DB_File scripts that were built with version 1 to be
> migrated to version 2 or greater without any changes.
> 
> If you want to make use of the new features available in Berkeley DB 2.x or
> greater, use the Perl module BerkeleyDB instead."
> 
> And in fact perl-DB_File can use bdb 5.x:
> 
> $ cat /etc/fedora-release 
> Fedora release 23 (Twenty Three)
> $ ldd /usr/lib64/perl5/vendor_perl/auto/DB_File/DB_File.so
> ...
> 	libdb-5.3.so => /lib64/libdb-5.3.so (0x00007f5979411000)
> 
> > 
> > I think we should change the logconv.pl as below:
> > from->  use DB_File;
> > to-> use BerkeleyDB

(In reply to Noriko Hosoi from comment #3)
> Upstream ticket:
> https://fedorahosted.org/389/ticket/48776

I havn't gone through the functionality of logconv.pl, that it uses the basic features of Berkeley DB. I just thought it might have got missed from the community to use the newer perl module.
I think we close this ticket if that is the case.
Thanks for the information Rich.

Comment 5 Noriko Hosoi 2016-04-14 16:34:59 UTC
Thanks for your notes, Hemant.

Closing this bug as you suggested.


Note You need to log in before you can comment on or make changes to this bug.