Bug#698230: uninitialized variable causes firefox to crash when card is inserted into reader

2013-01-15 Thread Manny Vindiola
Package: coolkey
Version: 1.1.0-12
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch



*** /tmp/tmpbG98u8/bug_body
In Ubuntu, the attached patch was applied to achieve the following:

  * Fix Firefox crash due to Assertion `mOldCAC' failed error
based on patch from www.spinics.net/linux/fedora/coolkey/msg00368.html


Thanks for considering the patch.



-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-36-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/changelog'

=== added file 'debian/patches/99-fixmAsserterror.patch'
--- debian/patches/99-fixmAsserterror.patch	1970-01-01 00:00:00 +
+++ debian/patches/99-fixmAsserterror.patch	2013-01-15 15:34:29 +
@@ -0,0 +1,16 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+Index: coolkey/src/coolkey/slot.cpp
+===
+--- coolkey.orig/src/coolkey/slot.cpp	2013-01-15 10:25:31.690342000 -0500
 coolkey/src/coolkey/slot.cpp	2013-01-15 10:34:08.539195695 -0500
+@@ -2215,6 +2215,8 @@
+ CKYBuffer_InitEmpty(vBuf);
+ CKYBuffer_Resize(cert, 0);
+ 
++*nextSize = 0;
++
+ /* handle the new CAC card read */
+ /* read the TLV */
+ status = CACApplet_ReadFile(conn, CAC_TAG_FILE, tBuf, NULL);

=== modified file 'debian/patches/series'
--- debian/patches/series	2012-04-11 20:56:20 +
+++ debian/patches/series	2013-01-15 15:32:25 +
@@ -8,3 +8,4 @@
 coolkey-cac-rhl5.patch
 0001-Fix-working-with-empty-certificates-in-not-zero-slot.patch
 Handle-pcscd-restarting
+99-fixmAsserterror.patch



Bug#558222: Imagej crashes with NullPointerException only java-gcj-compat is installed

2009-11-27 Thread Manny Vindiola
Hi,

I was worried that this might be a bug that only affected ubuntu so I
checked if it would run in a squeeze chroot and I it also fails with
the NullPointerException.
The other thing is it is probably better for the binary to depend on
default-jre instead of openjdk-6-jre as it has not been ported to all
debian architectures. However you might still have a runtime error for
the architectures that use gcj-jre as the default: [avr32, hppa,
hurd-i386, kfreebsd-amd64, kfreebsd-i386, m68k].

On Fri, Nov 27, 2009 at 1:22 AM, Manny Vindiola man...@gmail.com wrote:
 Package: imagej
 Version: 1.43g-1
 Severity: important
 Tags: patch

 When java-gcj-compat is the only java version installed on the system the 
 application will not run. It fails with message /usr/bin/imagej: line 420: 
 //bin/java: No such file or directory. This is because of the JAVA_HOME hack 
 introduced inversion 1.43b-1.

 When the correct path is specified it still will not run. It crashes with 
 error:
 (lucid32)ma...@laptop:~/dev/submitted/imagej$ imagej
 Open other images in this ImageJ panel as follows:
  imagej -p 1 image1 [image2 ... imageN]

 Exception in thread main java.lang.NullPointerException
   at java.awt.Component.setDropTarget(libgcj.so.10)
   at ij.plugin.DragAndDrop.run(DragAndDrop.java:28)
   at ij.IJ.runPlugIn(IJ.java:152)
   at ij.IJ.runPlugIn(IJ.java:135)
   at ij.ImageJ.init(ImageJ.java:184)
   at ij.ImageJ.main(ImageJ.java:554)

 These errors can be corrected by depending on openjdk-6-jre and reverting the 
 JAVA_HOME hack to what it used to be. I have attached a patch to correct 
 these problems.


 -- System Information:
 Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 
 'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic')
 Architecture: amd64 (x86_64)

 Kernel: Linux 2.6.31-15-generic (SMP w/2 CPU cores)
 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
 Shell: /bin/sh linked to /bin/dash

 Versions of packages imagej depends on:
 ii  gcj-4.4-jre [java2-r 4.4.1-5ubuntu2      Java runtime environment using 
 GIJ
 ii  gcj-jre [java2-runti 4:4.4.1-1ubuntu2    Java runtime environment using 
 GIJ
 ii  openjdk-6-jre [java2 6b16-1.6.1-3ubuntu1 OpenJDK Java runtime, using 
 Hotspo
 ii  sun-java6-jre [java2 6-15-1              Sun Java(TM) Runtime Environment 
 (

 imagej recommends no packages.

 Versions of packages imagej suggests:
 ii  gcj-4.4-jre-headless [j 4.4.1-5ubuntu2   Java runtime environment using 
 GIJ
 ii  gcj-jre-headless [java- 4:4.4.1-1ubuntu2 Java runtime environment using 
 GIJ
 ii  gij-4.3 [java-virtual-m 4.3.4-4ubuntu1   The GNU Java bytecode interpreter
 ii  sun-java6-jre [java-vir 6-15-1           Sun Java(TM) Runtime Environment 
 (

 -- no debconf information




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#558222: Imagej crashes with NullPointerException only java-gcj-compat is installed

2009-11-26 Thread Manny Vindiola
Package: imagej
Version: 1.43g-1
Severity: important
Tags: patch

When java-gcj-compat is the only java version installed on the system the 
application will not run. It fails with message /usr/bin/imagej: line 420: 
//bin/java: No such file or directory. This is because of the JAVA_HOME hack 
introduced inversion 1.43b-1.

When the correct path is specified it still will not run. It crashes with error:
(lucid32)ma...@laptop:~/dev/submitted/imagej$ imagej 
Open other images in this ImageJ panel as follows:   
  imagej -p 1 image1 [image2 ... imageN]   

Exception in thread main java.lang.NullPointerException
   at java.awt.Component.setDropTarget(libgcj.so.10) 
   at ij.plugin.DragAndDrop.run(DragAndDrop.java:28) 
   at ij.IJ.runPlugIn(IJ.java:152)   
   at ij.IJ.runPlugIn(IJ.java:135)   
   at ij.ImageJ.init(ImageJ.java:184)  
   at ij.ImageJ.main(ImageJ.java:554)

These errors can be corrected by depending on openjdk-6-jre and reverting the 
JAVA_HOME hack to what it used to be. I have attached a patch to correct these 
problems.


-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 
'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-15-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages imagej depends on:
ii  gcj-4.4-jre [java2-r 4.4.1-5ubuntu2  Java runtime environment using GIJ
ii  gcj-jre [java2-runti 4:4.4.1-1ubuntu2Java runtime environment using GIJ
ii  openjdk-6-jre [java2 6b16-1.6.1-3ubuntu1 OpenJDK Java runtime, using Hotspo
ii  sun-java6-jre [java2 6-15-1  Sun Java(TM) Runtime Environment (

imagej recommends no packages.

Versions of packages imagej suggests:
ii  gcj-4.4-jre-headless [j 4.4.1-5ubuntu2   Java runtime environment using GIJ
ii  gcj-jre-headless [java- 4:4.4.1-1ubuntu2 Java runtime environment using GIJ
ii  gij-4.3 [java-virtual-m 4.3.4-4ubuntu1   The GNU Java bytecode interpreter
ii  sun-java6-jre [java-vir 6-15-1   Sun Java(TM) Runtime Environment (

-- no debconf information
diff -u imagej-1.43k/debian/control imagej-1.43k/debian/control
--- imagej-1.43k/debian/control
+++ imagej-1.43k/debian/control
@@ -13,7 +13,7 @@
 
 Package: imagej
 Architecture: all
-Depends: ${java:Depends}, ${misc:Depends}, java-gcj-compat | java2-runtime,
+Depends: ${java:Depends}, ${misc:Depends}, openjdk-6-jre | java2-runtime
 Suggests: java-virtual-machine
 Description: Image processing program inspired by NIH Image for the Macintosh
  It can display, edit, analyze, process, save and print 8-bit, 16-bit and
diff -u imagej-1.43k/debian/imagej.sh imagej-1.43k/debian/imagej.sh
--- imagej-1.43k/debian/imagej.sh
+++ imagej-1.43k/debian/imagej.sh
@@ -26,9 +26,7 @@
 # DEFINE JAVA_HOME  #
 
 if [ -z $JAVA_HOME ] ; then
-# This does not work see #505315
-# JAVA_HOME=$(/usr/sbin/update-java-alternatives -l | head -1 | cut -d' ' -f 3)
-JAVA_HOME=$(dirname $(dirname $(dirname $(readlink /etc/alternatives/java
+JAVA_HOME=$(/usr/sbin/update-java-alternatives -l | head -1 | cut -d' ' -f 3)
 fi
 
 # CREATE THE RIGHT ENVIRONMENT #


Bug#509518: cups-pdf: does not reliably create pdf-queue

2008-12-22 Thread Manny Vindiola
Package: cups-pdf
Version: 2.4.8-4
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu intrepid ubuntu-patch

We applied these changes in Ubuntu and thought you might consider doing the 
same:
Sometime due to restart/configuration race condition the PDF-printer (queue) is 
not created
We have modified the postinstall so that it no longer restarts cups and 
installs a pdf queue and printer.
Patches are attached.

*** /tmp/tmpowFKGE
In Ubuntu, we've applied the attached patch to achieve the following:

  * Merge from debian unstable (LP: #310290), remaining changes:
- debian/postinst, debian/prerm: Let PDF print queue being created
  automatically when installing the package and being removed
  automatically when uninstalling the package.
- debian/postinst: Updated PPD file name to the new one used by the
  upstream package (LP: #241701). Updated the name of the CUPS startup
  script to cups.

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: lenny/sid
  APT prefers intrepid-updates
  APT policy: (500, 'intrepid-updates'), (500, 'intrepid-security'), (500, 
'intrepid-backports'), (500, 'intrepid')
Architecture: i386 (i686)

Kernel: Linux 2.6.27-9-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u cups-pdf-2.4.8/debian/changelog cups-pdf-2.4.8/debian/changelog
diff -u cups-pdf-2.4.8/debian/postinst cups-pdf-2.4.8/debian/postinst
--- cups-pdf-2.4.8/debian/postinst
+++ cups-pdf-2.4.8/debian/postinst
@@ -14,9 +14,81 @@
chown nobody:nogroup /var/spool/cups-pdf/ANONYMOUS
chmod 1777 /var/spool/cups-pdf/ANONYMOUS
chmod 0700 /usr/lib/cups/backend/cups-pdf
+   # This package needs the CUPS daemon running to actually work
if [ -f /etc/init.d/cups ]
then
-   invoke-rc.d cups force-reload || invoke-rc.d cups start 
|| /bin/true
+   lpstat -r  /dev/null 21 || invoke-rc.d cups start || 
/bin/true
+   fi
+   if lpstat -r  /dev/null 21
+   then
+   # Create a PDF CUPS queue if we have none yet (only
+   # if CUPS daemon is running)
+   if [ -z `LC_ALL=C lpstat -v 2/dev/null | grep 
'cups-pdf:/'` ]
+   then
+   # Find a name for the PDF queue
+   queue=PDF
+   number=0
+   while LC_ALL=C lpstat -v 2/dev/null | cut -d 
':' -f 1 | cut -d ' ' -f 3 | grep -q ^$queue\$
+   do
+   number=$(($number + 1))
+   queue=PDF$number
+   done
+   # Find system's default paper size
+   size=`LC_ALL=C paperconf 2/dev/null` || 
size=a4
+   # Create the queue
+   lpadmin -h localhost -p $queue -E -v cups-pdf:/ 
-m lsb/usr/cups-pdf/CUPS-PDF.ppd -o printer-is-shared=no -o PageSize=$size 
2/dev/null || :
+   # Set the PDF printer as default when there is 
not
+   # already a default printer
+   #if [ -z `LC_ALL=C lpstat -d 2/dev/null | 
grep 'system default destination:'` ]
+   #then
+   #   lpadmin -d $queue 2/dev/null || :
+   #fi
+   fi
+   else
+   # Create a PDF CUPS queue if we have none yet (for the
+   # case that CUPS is not running or even not installed)
+   if [ -z `grep 'DeviceURI cups-pdf:/' 
/etc/cups/printers.conf 2 /dev/null` ]
+   then
+   # Find a name for the PDF queue
+   queue=PDF
+   number=0
+   while grep -q Printer $queue 
/etc/cups/printers.conf
+   do
+   number=$(($number + 1))
+   queue=PDF$number
+   done
+   # Find system's default paper size
+   size=`LC_ALL=C paperconf 2/dev/null` || 
size=a4
+   # Create the queue
+   time=`date +%s`
+   mkdir -p /etc/cups/ppd
+   cat  EOF  /etc/cups/printers.conf
+Printer $queue
+Info Print into PDF file
+DeviceURI cups-pdf:/
+State Idle
+StateTime $time
+Accepting Yes
+Shared No
+JobSheets none none
+QuotaPeriod 0
+PageLimit