Bug#1032142: marked as done (unblock: libdbd-oracle-perl/1.83-1) (4/11)
From
Debian Bug Tracking System@21:1/5 to
All on Tue Feb 28 22:20:01 2023
[continued from previous message]
- print "Forcing Oracle version to be treated as $force_version\n";
- $client_version_full = $force_version;
+ print "Forcing Oracle version to be treated as $force_version\n";
+ $client_version_full = $force_version;
}
- if ($client_version_full && $client_version_full !~ m/^(7|8|9|1\d)\.\d+/
+ if ($client_version_full && $client_version_full !~ m/^([789]|[12][0-9])\.[0-9]+/
) {
- print "Oracle version seems to be $client_version_full but that looks wrong so I'll ignore it.\n";
- $client_version_full = "";
+ print "Oracle version seems to be $client_version_full but that looks wrong so I'll ignore it.\n";
+ $client_version_full = "";
}
if (!$client_version_full) {
@@ -1740,16 +1741,16 @@
$::opt_s ||= $::opt_S;
print "Searching for symbol '$::opt_s' in $OH ...\n";
my $dlext = $Config{dlext};
- system(qq{ cd $OH; for i in lib/*.[ao] lib/*.$dlext */lib/*.[ao];
- do echo " searching oracle \$i ..."; PATH=/usr/ccs/bin:\$PATH nm \$i | grep $::opt_s; done
+ system(qq{ cd $OH; for i in lib/*.[ao] lib/*.$dlext */lib/*.[ao];
+ do echo " searching oracle \$i ..."; PATH=/usr/ccs/bin:\$PATH nm \$i | grep $::opt_s; done
});
if ($::opt_S) {
- my @libpth = split ' ', $Config{libpth};
- print "Searching for symbol '$::opt_s' in @libpth ...\n";
- @libpth = map { ("$_/lib*.$dlext", "$_/lib*.a") } @libpth;
- system(qq{ cd $OH; for i in @libpth;
- do echo " searching \$i ..."; PATH=/usr/ccs/bin:\$PATH nm \$i | grep $::opt_s; done
- });
+ my @libpth = split ' ', $Config{libpth};
+ print "Searching for symbol '$::opt_s' in @libpth ...\n";
+ @libpth = map { ("$_/lib*.$dlext", "$_/lib*.a") } @libpth;
+ system(qq{ cd $OH; for i in @libpth;
+ do echo " searching \$i ..."; PATH=/usr/ccs/bin:\$PATH nm \$i | grep $::opt_s; done
+ });
}
print "Search done.\n";
print "(Please only include the 'interesting' parts when mailing.)\n";
@@ -1774,75 +1775,75 @@
sub post_initialize {
- my $self = shift;
+ my $self = shift;
- print "\nNote: \$ORACLE_HOME/lib must be added to your $need_ldlp_env environment variable\n",
- "before running \"make test\" and whenever DBD::Oracle is used.\n\n"
- if $need_ldlp_env && ($ENV{$need_ldlp_env}||'') !~ m:\Q$OH/lib\b:; -
- eval { # This chunk is for Oracle::OCI
- require Data::Dumper;
- print main::MK_PM Data::Dumper->Purity(1)->Terse(0)->Indent(1)->Useqq(1)
- ->Dump([\%opts, $self], [qw(dbd_oracle_mm_opts dbd_oracle_mm_self)]);
- };
- if ($@) {
- warn "Can't dump config to mk.pm so you won't be able to build Oracle::OCI later if you wanted to: $@\n";
- print main::MK_PM qq{die "You need to reinstall DBD::Oracle after installing Data::Dumper\n"; };
- }
- close main::MK_PM or die "Error closing mk.pm: $!\n";
-
- foreach (qw(mk.pm Oracle.h dbdimp.h ocitrace.h)) {
- $self->{PM}->{$_} = '$(INST_ARCHAUTODIR)/'.$_;
- }
-
- # Add $linkwith to EXTRALIBS for those doing static linking
- $self->{EXTRALIBS} .= " -L\$(LIBHOME)";
- $self->{EXTRALIBS} .= " $linkwith" if $linkwith;
+ print "\nNote: \$ORACLE_HOME/lib must be added to your $need_ldlp_env environment variable\n",
+ "before running \"make test\" and whenever DBD::Oracle is used.\n\n"
+ if $need_ldlp_env && ($ENV{$need_ldlp_env}||'') !~ m:\Q$OH/lib\b:; +
+ eval { # This chunk is for Oracle::OCI
+ require Data::Dumper;
+ print main::MK_PM Data::Dumper->Purity(1)->Terse(0)->Indent(1)->Useqq(1)
+ ->Dump([\%opts, $self], [qw(dbd_oracle_mm_opts dbd_oracle_mm_self)]);
+ };
+ if ($@) {
+ warn "Can't dump config to mk.pm so you won't be able to build Oracle::OCI later if you wanted to: $@\n";
+ print main::MK_PM qq{die "You need to reinstall DBD::Oracle after installing Data::Dumper\n"; };
+ }
+ close main::MK_PM or die "Error closing mk.pm: $!\n";
+
+ foreach (qw(mk.pm Oracle.h dbdimp.h ocitrace.h)) {
+ $self->{PM}->{$_} = '$(INST_ARCHAUTODIR)/'.$_;
+ }
- '';
+ # Add $linkwith to EXTRALIBS for those doing static linking
+ $self->{EXTRALIBS} .= " -L\$(LIBHOME)";
+ $self->{EXTRALIBS} .= " $linkwith" if $linkwith;
+
+ '';
}
sub postamble {
- return main::dbd_postamble(@_);
+ return main::dbd_postamble(@_);
}
sub const_loadlibs {
- my $self = shift;
+ my $self = shift;
- # ExtUtils::MM_Unix v1.50 (invoked by ExtUtils::MakeMaker)
- # requires that $self->{LD_RUN_PATH} be defined and not be
- # an empty string for Makefile to specify its use during the
- # build. This is required by both SUPER::const_loadlibs
- # and SUPER::dynamic_lib. hence it is best if we define
- # or modify $self->{LD_RUN_PATH} here *before* calling
- # SUPER::const_loadlibs.
+ # ExtUtils::MM_Unix v1.50 (invoked by ExtUtils::MakeMaker)
+ # requires that $self->{LD_RUN_PATH} be defined and not be
+ # an empty string for Makefile to specify its use during the
+ # build. This is required by both SUPER::const_loadlibs
+ # and SUPER::dynamic_lib. hence it is best if we define
+ # or modify $self->{LD_RUN_PATH} here *before* calling
+ # SUPER::const_loadlibs.
- # edit LD_RUN_PATH ...
- my ($ldrp) = $self->{LD_RUN_PATH};
- # remove redundant /lib or /usr/lib as it can cause problems
- $ldrp =~ s!:(/usr)?/lib$!! if $ldrp;
+ # edit LD_RUN_PATH ...
+ my ($ldrp) = $self->{LD_RUN_PATH};
+ # remove redundant /lib or /usr/lib as it can cause problems
+ $ldrp =~ s!:(/usr)?/lib$!! if $ldrp;
# if it's empty then set it manually
#Lincoln: if pick the right library path
my $libdir = main::ora_libdir();
$ldrp ||= "$OH/$libdir:$OH/rdbms/$libdir";
- $self->{LD_RUN_PATH} = $ldrp;
+ $self->{LD_RUN_PATH} = $ldrp;
- local($_) = $self->SUPER::const_loadlibs(@_);
+ local($_) = $self->SUPER::const_loadlibs(@_);
- print "Ignoring LD_RUN_PATH='$ENV{LD_RUN_PATH}' in environment\n" if $ENV{LD_RUN_PATH};
- print "LD_RUN_PATH=$ldrp\n";
- return $_;
+ print "Ignoring LD_RUN_PATH='$ENV{LD_RUN_PATH}' in environment\n" if $ENV{LD_RUN_PATH};
+ print "LD_RUN_PATH=$ldrp\n";
+ return $_;
}
sub post_constants {
- my $self = shift;
- return '' unless $::opt_f;
- # Oracle Definitions, based on $(ORACLE_HOME)/proc/lib/proc.mk
- '
+ my $self = shift;
+ return '' unless $::opt_f;
+ # Oracle Definitions, based on $(ORACLE_HOME)/proc/lib/proc.mk
+ '
###################################################################
#
ORACLE_HOME = '.$OH.'
@@ -1859,96 +1860,96 @@
sub const_cccmd {
- my ($self) = shift;
- print "Using DBD::Oracle $self->{VERSION}.\n";
+ my ($self) = shift;
+ print "Using DBD::Oracle $self->{VERSION}.\n";
- local($_) = $self->SUPER::const_cccmd(@_);
- # If perl Makefile.PL *-g* then switch on debugging
- if ($::opt_g) {
- if ($^O eq "MSWin32" and $Config::Config{cc} eq 'cl') {
- s/\s-/ -Zi -/;
- s/-O1//;
- } else {
- s/\s-O\d?\b//; # delete optimise option
- s/\s-/ -g -/; # add -g option
- }
- }
- # are we using the non-bundled hpux compiler?
- if ($^O eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
- print "Changing -Aa to -Ae for HP-UX in ccmd.\n"
- if s/-Aa\b/-Ae/g; # allow "long long" in oratypes.h
- }
+ local($_) = $self->SUPER::const_cccmd(@_);
+ # If perl Makefile.PL *-g* then switch on debugging
+ if ($::opt_g) {
+ if ($^O eq "MSWin32" and $Config::Config{cc} eq 'cl') {
+ s/\s-/ -Zi -/;
+ s/-O1//;
+ } else {
+ s/\s-O\d?\b//; # delete optimise option
+ s/\s-/ -g -/; # add -g option
+ }
+ }
+ # are we using the non-bundled hpux compiler?
+ if ($^O eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
+ print "Changing -Aa to -Ae for HP-UX in ccmd.\n"
+ if s/-Aa\b/-Ae/g; # allow "long long" in oratypes.h
+ }
- $_;
+ $_;
}
sub cflags {
- my ($self) = shift;
- local($_) = $self->SUPER::cflags(@_);
- # If perl Makefile.PL *-g* then switch on debugging
- if ($::opt_g) {
- if ($^O eq "MSWin32" and $Config::Config{cc} eq 'cl') {
- s/\s-/ -Zi -/;
- s/-O1//;
-
- } else {
- s/\s-O\d?\b//; # delete optimise option
- s/\s-/ -g -/; # add -g option
- }
- }
- # are we using the non-bundled hpux compiler?
- if ($^O eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
- print "Changing -Aa to -Ae for HP-UX in cflags.\n"
- if s/-Aa\b/-Ae/g; # allow "long long" in oratypes.h
- }
- $_;
+ my ($self) = shift;
+ local($_) = $self->SUPER::cflags(@_);
+ # If perl Makefile.PL *-g* then switch on debugging
+ if ($::opt_g) {
+ if ($^O eq "MSWin32" and $Config::Config{cc} eq 'cl') {
+ s/\s-/ -Zi -/;
+ s/-O1//;
+
+ } else {
+ s/\s-O\d?\b//; # delete optimise option
+ s/\s-/ -g -/; # add -g option
+ }
+ }
+ # are we using the non-bundled hpux compiler?
+ if ($^O eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
+ print "Changing -Aa to -Ae for HP-UX in cflags.\n"
+ if s/-Aa\b/-Ae/g; # allow "long long" in oratypes.h
+ }
+ $_;
}
sub dynamic_lib {
- my($self) = shift;
+ my($self) = shift;
+
+ unless ($^O eq 'VMS') {
+ my $m = $self->SUPER::dynamic_lib(@_);
+ if ($^O eq 'darwin') {
+ $m = "NMEDIT = nmedit\n" . $m .
+ "\t\$(NMEDIT) -R ./hints/macos_bundle.syms \$(INST_DYNAMIC) || true\n";
+ }
+ elsif (($^O eq 'hpux') and ($osvers <11)) {
+ $m =~ s/LD_RUN_PATH=(\S+)\s+(\S+)/$2 -Wl,+b $1/;
+
+ }
+ return ($m);
+ }
- unless ($^O eq 'VMS') {
- my $m = $self->SUPER::dynamic_lib(@_);
- if ($^O eq 'darwin') {
- $m = "NMEDIT = nmedit\n" . $m .
- "\t\$(NMEDIT) -R ./hints/macos_bundle.syms \$(INST_DYNAMIC) || true\n";
- }
- elsif (($^O eq 'hpux') and ($osvers <11)) {
- $m =~ s/LD_RUN_PATH=(\S+)\s+(\S+)/$2 -Wl,+b $1/;
-
- }
- return ($m);
- }
-
- # special code for VMS only
- my(%attribs) = @_;
- return '' unless $self->needs_linking(); #might be because of a subdir - return '' unless $self->has_link_code();
-
- my $OtherText;
- my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
- my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
- my @m;
- push @m, "OTHERLDFLAGS = $otherldflags\n";
- push @m, "INST_DYNAMIC_DEP = $inst_dynamic_dep\n";
+ # special code for VMS only
+ my(%attribs) = @_;
+ return '' unless $self->needs_linking(); #might be because of a subdir + return '' unless $self->has_link_code();
+
+ my $OtherText;
+ my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
+ my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
+ my @m;
+ push @m, "OTHERLDFLAGS = $otherldflags\n";
+ push @m, "INST_DYNAMIC_DEP = $inst_dynamic_dep\n";
if ($] < 5.00450) {
- push @m, '
+ push @m, '
$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt rtls.opt $(INST_ARCHAUTODIR).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
- $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
- $(NOECHO) If F$TrnLNm("PerlShr").eqs."" Then Define/NoLog/User PerlShr Sys$Share:PerlShr.',$Config::Config{'dlext'},'
- Lnproc $(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,rtls.opt/Option,$(PERL_INC)perlshr_attr.opt/Option i
+ $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+ $(NOECHO) If F$TrnLNm("PerlShr").eqs."" Then Define/NoLog/User PerlShr Sys$Share:PerlShr.',$Config::Config{'dlext'},'
+ Lnproc $(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,rtls.opt/Option,$(PERL_INC)perlshr_attr.opt/Option i
';
} else {
- push @m, '
+ push @m, '
$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt $(INST_ARCHAUTODIR).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
- $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
- $(NOECHO) If F$TrnLNm("PerlShr").eqs."" Then Define/NoLog/User PerlShr Sys$Share:PerlShr.',$Config::Config{'dlext'},'
- Lnproc $(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option i
+ $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+ $(NOECHO) If F$TrnLNm("PerlShr").eqs."" Then Define/NoLog/User PerlShr Sys$Share:PerlShr.',$Config::Config{'dlext'},'
+ Lnproc $(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option i
';
}
- push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
- join('',@m);
+ push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
+ join('',@m);
}
}
@@ -2014,18 +2015,17 @@
# SUID and SGID, and warn if either is set
my @files = map { ($_,$_.'0') } qw(
- oratclsh lsnrctl oemevent onrsd osslogin tnslsnr
- tnsping trcasst trcroute cmctl cmadmin cmgw names namesctl otrccref
- otrcfmt otrcrep otrccol
+ oratclsh lsnrctl oemevent onrsd osslogin tnslsnr
+ tnsping trcasst trcroute cmctl cmadmin cmgw names namesctl otrccref
+ otrcfmt otrcrep otrccol
);
my @bad;
- foreach (@files) {
- my $file = "$ENV{ORACLE_HOME}/bin/$_";
- my ($mode) = (stat($file))[2];
- next unless defined $mode;
- push @bad, $file if ($mode & 04000 and $mode & 00111)
- or ($mode & 02000 and $mode & 00111);
+ for my $file (map { "$ENV{ORACLE_HOME}/bin/$_" } @files) {
+ my ($mode) = (stat($file))[2];
+ next unless defined $mode;
+ push @bad, $file if ($mode & 04000 and $mode & 00111)
+ or ($mode & 02000 and $mode & 00111);
}
return unless @bad;
@@ -2049,7 +2049,7 @@
return if /^\s+U _(dlsym|dlclose)/;
}
- warn <<"END_WARNING";
+ warn <<"END_WARNING";
WARNING: symbol table may need modification in Oracle library:
$oracle_lib
If the build fails in the linking stage, manual modification is
diff -Nru libdbd-oracle-perl-1.80/Oracle.xs libdbd-oracle-perl-1.83/Oracle.xs --- libdbd-oracle-perl-1.80/Oracle.xs 2019-07-25 14:15:30.000000000 +0000
+++ libdbd-oracle-perl-1.83/Oracle.xs 2022-01-17 02:06:35.000000000 +0000
@@ -114,9 +114,13 @@
#endif /* __CYGWIN32__ */
-
INCLUDE: Oracle.xsi
+
+
+# ------------------------------------------------------------
+# statement interface
+# ------------------------------------------------------------
MODULE = DBD::Oracle PACKAGE = DBD::Oracle::st
@@ -281,7 +285,9 @@
-
+# ------------------------------------------------------------
+# database level interface
+# ------------------------------------------------------------
MODULE = DBD::Oracle PACKAGE = DBD::Oracle::db
void
@@ -702,6 +708,10 @@
}
+
+# ------------------------------------------------------------
+# driver level interface
+# ------------------------------------------------------------
MODULE = DBD::Oracle PACKAGE = DBD::Oracle::dr
void
diff -Nru libdbd-oracle-perl-1.80/README libdbd-oracle-perl-1.83/README