[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#951671: marked as done (pdfannotator not yet fixed)



Your message dated Tue, 03 Mar 2020 02:54:23 +0000
with message-id <E1j8xhP-000Amb-Hj@fasolo.debian.org>
and subject line Bug#951671: fixed in texlive-extra 2019.202000302-1
has caused the Debian Bug report #951671,
regarding pdfannotator not yet fixed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
951671: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951671
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: texlive-latex-extra
Version: 2019.202000218-1
Severity: important
Tags: patch

Dear Maintainer,

Could you please replace the previous patch with this one ?

pdfannator is not  yet fixed and fail to run

diff --git a/scripts/pax/pax.jar b/scripts/pax/pax.jar
deleted file mode 100644
index 36371e2..0000000
Binary files a/scripts/pax/pax.jar and /dev/null differ
diff --git a/scripts/pax/pdfannotextractor.pl b/scripts/pax/pdfannotextractor.pl
index 085dc43..c5d5cf2 100755
--- a/scripts/pax/pdfannotextractor.pl
+++ b/scripts/pax/pdfannotextractor.pl
@@ -39,18 +39,15 @@ ${title}Syntax:   $program [options] <PDF files[.pdf]>
 Options:
   --help      print usage
   --version   print version number
-  --install   try installing PDFBox library
   --debug     debug informations
 END_OF_USAGE
 
 my $help = 0;
 my $debug = 0;
-my $install = 0;
 my $opt_version = 0;
 use Getopt::Long;
 GetOptions(
   'debug!' => \$debug,
-  'install!' => \$install,
   'help!' => \$help,
   'version!' => \$opt_version,
 ) or die $usage;
@@ -59,24 +56,13 @@ if ($opt_version) {
   print "$name $date v$version\n";
   exit(0);
 }
-!$install and (@ARGV >= 1 or die $usage);
+(@ARGV >= 1 or die $usage);
 
 print $title;
 
 my $error = '!!! Error:';
-my $url_pdfbox = 'http://prdownloads.sourceforge.net/pdfbox/PDFBox-0.7.3.zip?download';
-my $size_pdfbox_zip = 22769102;
-my $size_pdfbox_jar = 3321771;
-my $name_pdfbox_jar = 'PDFBox-0.7.3.jar';
-my $entry_pdfbox    = "PDFBox-0.7.3/lib/$name_pdfbox_jar";
 my $pdfbox = 'PDFBox';
-
 my $prg_kpsewhich = 'kpsewhich';
-my $prg_wget      = 'wget';
-my $prg_curl      = 'curl';
-my $prg_unzip     = 'unzip';
-my $prg_texhash   = 'texhash';
-my $prg_mktexlsr  = 'mktexlsr';
 my $prg_java      = 'java';
 my %prg;
 
@@ -175,34 +161,13 @@ sub find_jar_pax () {
     }
 }
 
-sub find_jar_pdfbox () {
-    return if $path_jar_pdfbox;
-    foreach my $dir (@dir_jar) {
-        foreach my $jar (@jar_pdfbox) {
-            my $path = "$dir/$jar";
-            if (-f $path) {
-                $path_jar_pdfbox = $path;
-                debug $jar_pdfbox, $path_jar_pdfbox;
-                return;
-            }
-        }
-    }
-    foreach my $jar_pdfbox (@jar_pdfbox) {
-        $path_jar_pdfbox = find_jar $jar_pdfbox;
-        last if $path_jar_pdfbox;
-    }
-}
 
 sub launch_pax () {
     check_prg $prg_java, 1;
     my @cmd = ($prg_java);
-    my $sep = $is_win ? ';' : ':';
-    my $cp = "$path_jar_pax";
-    $cp .= "$sep$path_jar_pdfbox" if $path_jar_pdfbox;
-    $cp .= "$sep$classpath" if $classpath;
     push @cmd, '-cp';
-    push @cmd, $cp;
-    push @cmd, $main_class;
+    push @cmd, $path_jar_pax;
+    push @cmd, 'pax.PDFAnnotExtractor';
     push @cmd, @ARGV;
     debug 'System', "@cmd";
     system @cmd;
@@ -222,212 +187,10 @@ sub launch_pax () {
     return $exit_code;
 }
 
-# install part
-
-sub expand_var ($) {
-    my $var = shift;
-    check_prg $prg_kpsewhich, 1;
-    my $cmd = $prg_kpsewhich
-              . " --progname $program"
-              . ' --expand-var';
-    $cmd .= $is_win ? " \$$var" : " \\\$$var";
-    debug 'Backticks', $cmd;
-    my $path = `$cmd`;
-    if ($? == 0) {
-        chomp $path;
-        debug 'Exit code', '0/success';
-        debug "\$$var", $path;
-        return $path;
-    }
-    if ($? == -1) {
-        die "!!! Error: Cannot execute `$prg_kpsewhich' ($!)!\n";
-    }
-    if ($? & 127) {
-        die "!!! Error: `$prg_kpsewhich' died with signal " . ($? & 127)
-            . (($? & 128) ? ' with coredump' : '') . "!\n";
-    }
-    debug 'Exit code', ($? >> 8);
-    return '';
-}
-
-sub ensure_dir ($) {
-    my $dir = shift;
-    return if -d $dir;
-    mkdir $dir or die "$error Cannot create directory `$dir'!\n";
-    debug 'mkdir', $dir;
-}
-
-sub file_size ($) {
-    my $file = shift;
-    return -1 unless -f $file;
-    return (stat $file)[7];
-}
-
-if ($install) {
-    # Can PDFBox already be found?
-    find_jar_pdfbox;
-    if ($path_jar_pdfbox) {
-        print "* Nothing to do, because $pdfbox is already found:\n"
-              . "  $path_jar_pdfbox\n";
-        exit(0);
-    }
-
-    # Find TEXMFVAR
-    my $tds_root;
-    foreach my $var ('TEXMFVAR', 'VARTEXMF') {
-        $tds_root = expand_var $var;
-        last if $tds_root;
-    }
-    $tds_root or die "$error Cannot find settings for `TEXMFVAR' or `VARTEXMF'!\n";
-
-    # Create directories
-    ensure_dir $tds_root;
-    my $tds_pax = $tds_root;
-    $tds_pax =~ s/(\/*)$/\/scripts/;
-    ensure_dir $tds_pax;
-    $tds_pax .= '/pax';
-    ensure_dir $tds_pax;
-    my $tds_pax_lib = "$tds_pax/lib";
-    ensure_dir $tds_pax_lib;
-
-    # Download
-    my $dest_file = "$tds_pax/PDFBox-0.7.3.zip";
-    if (file_size $dest_file == $size_pdfbox_zip) {
-        debug "$pdfbox archive found", $dest_file;
-    }
-    else {
-        my @cmd;
-        my $prg_download;
-        check_prg $prg_wget, 0;
-        if ($prg{$prg_wget}) {
-            $prg_download = $prg_wget;
-            push @cmd, $prg_wget;
-            push @cmd, '-O';
-        }
-        else {
-            check_prg $prg_curl, 0;
-            $prg{$prg_curl} or die "$error Cannot find programs `wget' or `curl'"
-                                   . " for downloading!\n";
-            $prg_download = $prg_curl;
-            push @cmd, $prg_curl;
-            push @cmd, '-L';
-            push @cmd, '-o';
-        }
-        push @cmd, $dest_file;
-        push @cmd, $url_pdfbox;
-        debug 'System', "@cmd";
-        system @cmd;
-        if ($? == 0) {
-            debug 'Result', 'ok';
-        }
-        elsif ($? == -1) {
-            die "$error Cannot execute `$prg_download' ($!)!\n";
-        }
-        elsif ($? & 127) {
-            die "$error `$prg_download' died with signal " . ($? & 127)
-                . (($? & 128) ? ' with coredump' : '') . "!\n";
-        }
-        else {
-            my $exit_code = $? >> 8;
-            die "$error `$prg_download' returns error code `$exit_code'!\n";
-        }
-        -f $dest_file or die "$error Download failed!\n";
-        my $size = file_size $dest_file;
-        $size == $size_pdfbox_zip
-                or die "$error File size of $dest_file is $size,\n"
-                . "but expected size is $size_pdfbox_zip!\n";
-    }
-    print "* Downloaded: $dest_file\n";
-
-    # Unpack jar file
-    check_prg $prg_unzip, 0;
-    if ($prg{$prg_unzip}) {
-        my @cmd = (
-            $prg_unzip,
-            '-j',
-            '-d',
-            $tds_pax_lib,
-            $dest_file,
-            $entry_pdfbox
-        );
-        debug 'System', "@cmd";
-        system @cmd;
-        if ($? == 0) {
-            debug 'Result', 'ok';
-        }
-        elsif ($? == -1) {
-            die "$error Cannot execute `$prg_unzip' ($!)!\n";
-        }
-        elsif ($? & 127) {
-            die "$error `$prg_unzip' died with signal " . ($? & 127)
-                . (($? & 128) ? ' with coredump' : '') . "!\n";
-        }
-        else {
-            my $exit_code = $? >> 8;
-            die "$error `$prg_unzip' returns error code `$exit_code'!\n";
-        }
-    }
-    else {
-        die "$error `$prg_unzip' not found!\n";
-    }
-    my $dest_jar = "$tds_pax_lib/$name_pdfbox_jar";
-    -f $dest_jar or die "$error Unpacking failed!\n";
-    my $size = file_size $dest_jar;
-    $size == $size_pdfbox_jar
-            or die "$error File size of $dest_jar is $size,\n"
-            . "but expected size is $size_pdfbox_jar!\n";
-
-    print "* Unpacked: $dest_jar\n";
-
-    # Update TDS data base
-    my $prg_tds_update;
-    check_prg $prg_texhash, 0;
-    if ($prg{$prg_texhash}) {
-       $prg_tds_update = $prg_texhash;
-    }
-    else {
-        check_prg $prg_mktexlsr, 0;
-        $prg{$prg_mktexlsr} or die "$error Neither `$prg_texhash' nor `$prg_mktexlsr' found!\n";
-        $prg_tds_update = $prg_mktexlsr;
-    }
-    my @cmd = ($prg_tds_update, $tds_root);
-    debug 'System', "@cmd";
-    system @cmd;
-    if ($? == 0) {
-        debug 'Result', 'ok';
-    }
-    elsif ($? == -1) {
-        die "$error Cannot execute `$prg_tds_update' ($!)!\n";
-    }
-    elsif ($? & 127) {
-        die "$error `$prg_tds_update' died with signal " . ($? & 127)
-            . (($? & 128) ? ' with coredump' : '') . "!\n";
-    }
-    else {
-        my $exit_code = $? >> 8;
-        die "$error `$prg_tds_update' returns error code `$exit_code'!\n";
-    }
-
-    # Check installation result
-    find_jar_pdfbox;
-    if ($path_jar_pdfbox) {
-        exit(0);
-    }
-    die "$error Installation failed, because $pdfbox library cannot be found!\n";
-}
-
 # main program
 
 my $ret = 0;
 find_jar_pax;
-if ($pdfbox_in_classpath) {
-    debug 'PDFBox in CLASSPATH', 'yes';
-}
-else {
-    find_jar_pdfbox;
-    $path_jar_pdfbox or die "$error Cannot find $pdfbox library!\n"
-            . "See README and option `--install'.\n";
-}
 exit launch_pax;
 
 __END__
diff --git a/source/latex/pax/build.xml b/source/latex/pax/build.xml
index 230cd3e..1f52043 100644
--- a/source/latex/pax/build.xml
+++ b/source/latex/pax/build.xml
@@ -6,44 +6,68 @@
 
   <property name="src"   location="src"/>
   <property name="build" location="build"/>
-  <property name="dist"  location="."/>
+  <property name="dist"  location="../../../scripts/pax/"/>
   <property name="pdfbox.home" location="${basedir}"/> <!-- or somewhere else -->
-  <property name="pdfbox.name" value="PDFBox-0.7.2.jar"/>
 
   <target name="init">
     <mkdir dir="${build}"/>
   </target>
 
   <target name="compile"
-          depends="init"
-          description="compile the source"
-  >
-    <javac srcdir="${src}" destdir="${build}" target="1.4" source="1.4">
+	  depends="init"
+	  description="compile the source"
+	  >
+    <javac srcdir="${src}" destdir="${build}">
       <classpath>
-        <!-- try with and without subdirectory `lib' -->
-        <pathelement location="${pdfbox.home}/lib/${pdfbox.name}"/>
-        <pathelement location="${pdfbox.home}/${pdfbox.name}"/>
+	<pathelement location="${basedir}/lib/pdfbox.jar"/>
+	<pathelement location="${basedir}/lib/commons-logging.jar"/>
       </classpath>
     </javac>
   </target>
 
+  <path id="build.classpath">
+    <fileset dir="${basedir}">
+      <include name="lib/*.jar"/>
+    </fileset>
+  </path>
+
+  <pathconvert property="manifest.classpath" pathsep=" ">
+    <path refid="build.classpath"/>
+    <mapper>
+      <chainedmapper>
+	<flattenmapper/>
+	<globmapper from="*.jar" to="lib/*.jar"/>
+      </chainedmapper>
+    </mapper>
+  </pathconvert>
+
   <target name="dist"
-          depends="compile"
-          description="generate the distribution"
-  >
+	  depends="compile"
+	  description="generate the distribution"
+	  >
     <mkdir dir="${dist}"/>
+    <mkdir dir="${dist}/lib"/>
+    <copy todir="${dist}/lib" flatten="true">
+      <fileset dir="lib">
+	<include name="*.jar" />
+      </fileset>
+    </copy>
     <jar jarfile="${dist}/${ant.project.name}.jar"
-         manifest="${src}/MANIFEST.MF"
-         basedir="${build}"
-         includes="pax/**"
-    />
+	 manifest="${src}/MANIFEST.MF"
+	 basedir="${build}"
+	 includes="pax/**" >
+      <manifest>
+	<attribute name="Class-Path" value="${manifest.classpath}" />
+      </manifest>
+    </jar>
   </target>
 
   <target name="clean"
-          description="clean up"
-  >
+	  description="clean up"
+	  >
     <delete dir="${build}"/>
-    <delete file="${dist}/${ant.project.name}.jar"/>
+    <delete dir="${dist}/lib"/>
+    <delete file="${dist}/pax.jar" />
   </target>
 
 </project>
diff --git a/source/latex/pax/lib/commons-logging.jar b/source/latex/pax/lib/commons-logging.jar
new file mode 120000
index 0000000..3f5cb56
--- /dev/null
+++ b/source/latex/pax/lib/commons-logging.jar
@@ -0,0 +1 @@
+/usr/share/java/commons-logging.jar
\ No newline at end of file
diff --git a/source/latex/pax/lib/pdfbox.jar b/source/latex/pax/lib/pdfbox.jar
new file mode 120000
index 0000000..9927915
--- /dev/null
+++ b/source/latex/pax/lib/pdfbox.jar
@@ -0,0 +1 @@
+/usr/share/java/pdfbox.jar
\ No newline at end of file
diff --git a/source/latex/pax/src/PDFAnnotExtractor.java b/source/latex/pax/src/PDFAnnotExtractor.java
index 868dada..d135057 100644
--- a/source/latex/pax/src/PDFAnnotExtractor.java
+++ b/source/latex/pax/src/PDFAnnotExtractor.java
@@ -24,14 +24,14 @@ import java.io.*;
 import java.text.*;
 import java.util.*;
 
-import org.pdfbox.cos.*;
-import org.pdfbox.pdfparser.*;
-import org.pdfbox.pdmodel.*;
-import org.pdfbox.pdmodel.common.*;
-import org.pdfbox.pdmodel.interactive.action.*;
-import org.pdfbox.pdmodel.interactive.action.type.*;
-import org.pdfbox.pdmodel.interactive.annotation.*;
-import org.pdfbox.pdmodel.interactive.documentnavigation.destination.*;
+import org.apache.pdfbox.cos.*;
+import org.apache.pdfbox.pdfparser.*;
+import org.apache.pdfbox.pdmodel.*;
+import org.apache.pdfbox.pdmodel.common.*;
+import org.apache.pdfbox.pdmodel.interactive.action.*;
+import org.apache.pdfbox.pdmodel.interactive.action.type.*;
+import org.apache.pdfbox.pdmodel.interactive.annotation.*;
+import org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.*;
 
 public class PDFAnnotExtractor implements Constants {
 
diff --git a/source/latex/pax/src/StringVisitor.java b/source/latex/pax/src/StringVisitor.java
index 485757e..1460ade 100644
--- a/source/latex/pax/src/StringVisitor.java
+++ b/source/latex/pax/src/StringVisitor.java
@@ -22,8 +22,8 @@ package pax;
 
 import java.io.*;
 import java.util.*;
-import org.pdfbox.cos.*;
-import org.pdfbox.exceptions.*;
+import org.apache.pdfbox.cos.*;
+import org.apache.pdfbox.exceptions.*;
 
 public class StringVisitor implements ICOSVisitor {
 

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---
--- Begin Message ---
Source: texlive-extra
Source-Version: 2019.202000302-1
Done: Norbert Preining <norbert@preining.info>

We believe that the bug you reported is fixed in the latest version of
texlive-extra, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 951671@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Norbert Preining <norbert@preining.info> (supplier of updated texlive-extra package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 02 Mar 2020 04:55:35 +0900
Source: texlive-extra
Architecture: source
Version: 2019.202000302-1
Distribution: unstable
Urgency: medium
Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>
Changed-By: Norbert Preining <norbert@preining.info>
Closes: 921297 951671 952537 952714
Changes:
 texlive-extra (2019.202000302-1) unstable; urgency=medium
 .
   * stackengine (tl-latex-extra) needs listofitems (tl-plain-generic)
     (Closes: #921297)
   * update pax build patch (Closes: #951671)
   * add default-jre-headless to suggests for extra-utils (Closes: #952537)
   * add breaks/replaces against buster's version of sdaps which installs
     files into /u/s/texlive (Closes: #952714)
Checksums-Sha1:
 ad0ba16f34ed50b4c62975ba4ba33ab5a3bebb9a 3449 texlive-extra_2019.202000302-1.dsc
 80548f86990eb1ee5de50f3b20e5a5f2d02ef73f 19036 texlive-extra_2019.202000302.orig-tex4ht.tar.xz
 9a39a0b1e827f0f2b3c33a09db94de9005168124 1840553972 texlive-extra_2019.202000302.orig.tar.xz
 df055e38f111bfea8176a0762824dad564082cc3 178120 texlive-extra_2019.202000302-1.debian.tar.xz
 6ae40fc372793ca3491d0058b311ca633bb51bc5 6642 texlive-extra_2019.202000302-1_source.buildinfo
Checksums-Sha256:
 aaaef5316a909a17712748e9fd0f1d4d980edc61c59e27fee96b7af328f7fada 3449 texlive-extra_2019.202000302-1.dsc
 ea131661fef91d161d365837bf4b89085ab59fdc64bc16a4df6b6b51b92109f0 19036 texlive-extra_2019.202000302.orig-tex4ht.tar.xz
 b5836625b97fe417aab63a64a1c39b040dd937f3fb9a20e7b33b4abfb0c5ddc0 1840553972 texlive-extra_2019.202000302.orig.tar.xz
 4c5820bebdfa4473be2be2446e8911bbfd1a3b286baa294ee59ca4cc52163acf 178120 texlive-extra_2019.202000302-1.debian.tar.xz
 20166e4c66b57df1ba170bcb8d6bea8b6d24b3f5e273a479f0af923372a7a44a 6642 texlive-extra_2019.202000302-1_source.buildinfo
Files:
 45eb86cf34c3b89a708586f952203a9e 3449 tex optional texlive-extra_2019.202000302-1.dsc
 8a5943ff12c9572088cecbb115daa178 19036 tex optional texlive-extra_2019.202000302.orig-tex4ht.tar.xz
 e56297a7669757dcacbcd119c4f17dbd 1840553972 tex optional texlive-extra_2019.202000302.orig.tar.xz
 0b60e02b790e3943a09b6f4e7bb0370f 178120 tex optional texlive-extra_2019.202000302-1.debian.tar.xz
 1148263ba8366ba60aec6e50fea1e3a5 6642 tex optional texlive-extra_2019.202000302-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE68ws0vrA2voQX53I2A4JsIcUAGYFAl5ctiIACgkQ2A4JsIcU
AGagsQf/RI8sq52x2krnumOJDBina7dgr6wq6XJ1b4EQ7ZLoOigevq3xIN5+7x4S
nn4yxKAoTyxyk+HfxTPZoYtfopDzNp72ORIizCS484FSGzM42w7RdWYhN0+mlehV
YFiRMmz0t3GO9lDs5iQig5RpjqYwydCi1HHyPC/7Zx9PkV+9/Czzni4Rvs5pM7tN
OvyJXjEk6S+8Z+VoCv4ioiSFJ8vjOW1OSMHCxe3SXPxM6OMkCxeGhaLw5AaLIHhL
eZ1Rpvui8OJhMLbT4hc1FEQvc0MnmilEuqPLLpKGvrMgHnhEWxe5WVJ86k2JvxTd
vAR7zjJg0PD38ocjk1qjLBYZxU/SAQ==
=EtDl
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: