All of lore.kernel.org
 help / color / mirror / Atom feed
* [Printing-architecture] Updates for auto-downloadable printer packages
       [not found]                     ` <4C89CF0C.60003@avasys.jp>
@ 2010-11-18 16:55                       ` Till Kamppeter
  2010-12-03  6:16                         ` yuji.saito
  0 siblings, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2010-11-18 16:55 UTC (permalink / raw)
  To: Olaf Meeuwissen, yuji.saito, hidenori.ishii,
	萩原 賢治,
	Open Printing

Hi,

I have done some updates and fixes for the auto-downloadable driver 
package creation:

First, I have updated the documentation about creating and uploading the 
driver packages:

https://www.linuxfoundation.org/collaborate/workgroups/openprinting/writingandpackagingprinterdrivers

In the section "Printer driver design"/"Components and purposes" I have 
added that the PPD files are also essential part of a driver package and 
that they need to be designed to comply with Adobe's specs and that they 
also should make use of the PPD extensions for the Common Printing 
Dialog and for CUPS. I have also updated the "Testing" section telling 
that the PPD extension use should be tested with a development snapshot 
of the Common Printing Dialog.

In the section "Setting up the package repositories" I have added a link 
to the component assignment rules file for the (already linked) 
"mkrepodeb" script for creating and indexing Debian package archives.

In addition, I have updated "mkrepodeb" fixing some bugs. Please 
re-download it if you have already used it:

http://www.openprinting.org/download/printdriver/debian/mkrepodeb

You do not need to rebuild or re-index any existing package archives.

    Till


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Updates for auto-downloadable printer packages
  2010-11-18 16:55                       ` [Printing-architecture] Updates for auto-downloadable printer packages Till Kamppeter
@ 2010-12-03  6:16                         ` yuji.saito
  2010-12-06 16:54                           ` Till Kamppeter
                                             ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: yuji.saito @ 2010-12-03  6:16 UTC (permalink / raw)
  To: till.kamppeter; +Cc: printing-architecture, kenji.hagiwara

Hi, Till.

-----Original Message-----
From: Till Kamppeter [mailto:till.kamppeter@gmail.com] 
Sent: Friday, November 19, 2010 1:56 AM
> 
> In addition, I have updated "mkrepodeb" fixing some bugs. Please 
> re-download it if you have already used it:
> 
> http://www.openprinting.org/download/printdriver/debian/mkrepodeb

I checked the fixed "mkrepodeb" script.
I noticed that the components in the deb repository have been changed.

In the old OpenPrinting deb package repository (and in our current
repository[1]),
all driver packages had been included in the "main" component.

But the current OpenPrinting deb package repository[2] has 4 components, and
driver packages under "main-nonfree" and "contrib" are not included in
"main".
  * main
  * main-nonfree
  * contrib
  * lsbddk

From what you said before, I understood that in OpenPrinting "main" will 
contain all packages (including non-free driver packages). Did the
specification 
change?

If so, could you tell me the exact meaning of the 4 components above. Also,
in 
the future, I would appreciate it if we could be notified ahead of time of
any 
changes that might affect external repository maintainers like us.


[1]
http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/debian/dists/lsb3.2/
[2] http://www.openprinting.org/download/printdriver/debian/dists/lsb3.2/

-- 
Yuji Saito <yuji.saito@avasys.jp>
Linux Driver Team, ES1G, ES Business Division
AVASYS CORPORATION <http://avasys.jp/>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Updates for auto-downloadable printer packages
  2010-12-03  6:16                         ` yuji.saito
@ 2010-12-06 16:54                           ` Till Kamppeter
  2011-01-07  0:13                           ` [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages Till Kamppeter
  2011-01-07  0:20                           ` Till Kamppeter
  2 siblings, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2010-12-06 16:54 UTC (permalink / raw)
  To: yuji.saito; +Cc: printing-architecture, kenji.hagiwara

On 12/03/2010 07:16 AM, yuji.saito@avasys.jp wrote:
> Hi, Till.
>
> -----Original Message-----
> From: Till Kamppeter [mailto:till.kamppeter@gmail.com]
> Sent: Friday, November 19, 2010 1:56 AM
>>
>> In addition, I have updated "mkrepodeb" fixing some bugs. Please
>> re-download it if you have already used it:
>>
>> http://www.openprinting.org/download/printdriver/debian/mkrepodeb
>
> I checked the fixed "mkrepodeb" script.
> I noticed that the components in the deb repository have been changed.
>
> In the old OpenPrinting deb package repository (and in our current
> repository[1]),
> all driver packages had been included in the "main" component.
>
> But the current OpenPrinting deb package repository[2] has 4 components, and
> driver packages under "main-nonfree" and "contrib" are not included in
> "main".
>    * main
>    * main-nonfree
>    * contrib
>    * lsbddk
>
>  From what you said before, I understood that in OpenPrinting "main" will
> contain all packages (including non-free driver packages). Did the
> specification
> change?
>
> If so, could you tell me the exact meaning of the 4 components above. Also,
> in
> the future, I would appreciate it if we could be notified ahead of time of
> any
> changes that might affect external repository maintainers like us.
>

On the OpenPrinting web server we want to give the possibility to host 
packages in different categories, to make it easier for users and 
distributions to choose the packages to take into account when browsing 
available package repositories, especially to avoid that users get 
offered non-free or unsupported packages if they do not want them. The 
components are the same as distributions usually use:

- main: Fully supported packages under free licenses (on OpenPrinting
   packages without binary executables and signed packages)

- main-nonfree: As main, but non-free licenses

- contrib: Unsupported packages, especially drivers with binary
   executables which are not signed packages. Free licenses.

- contrib-nonfree: As contrib, but non-free licenses

- lsbddk: Only needed for development

As principal selection of drivers for a detected printer by the 
distributions is controlled by the OpenPrinting database, you do not 
need to use this scheme for packages which you host on your server. 
Consider the components.lst simply as an example how packages can be 
sorted into components by rules. You can simply let everything go into 
your server's main component by having a components.lst like this:

.* main

Important is to set the correct bits in the XML files set: free/non-free 
license, manufacturer-supplied, printer device IDs, ... and to have the 
signing correct. This is all correct for your packages. So do not worry. 
The new script is only to overcome a problem which the old one had with 
the Debian repository indexing and also to make it easier to update 
packages in your repository.

    Till


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2010-12-03  6:16                         ` yuji.saito
  2010-12-06 16:54                           ` Till Kamppeter
@ 2011-01-07  0:13                           ` Till Kamppeter
  2011-01-07  0:20                           ` Till Kamppeter
  2 siblings, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-01-07  0:13 UTC (permalink / raw)
  To: yuji.saito; +Cc: printing-architecture, kenji.hagiwara

Hi,

Ubuntu Natty (11.04, to be released end of April) will be the first 
Linux distribution which automatically downloads binary printer driver 
packages from manufacturers via OpenPrinting.

The still missing support for signed packages got added to the 
third-party hardware driver manager Jockey today. See also

https://blueprints.launchpad.net/ubuntu/+spec/packageselection-desktop-n-automatic-printer-driver-download-should-support-signed-packages

and

https://bugs.launchpad.net/bugs/604698

This means that on Ubuntu Natty (and newer) printers supported by the 
manufacturer-supplied driver packages available via OpenPrinting will 
work out-of-the-box by just plugging them in or setting them up with 
system-config-printer.

So do not hesitate to add or update driver packages to support your 
newest models to have always Plug'n'Print.

For testing, download Ubuntu Natty (a daily CD or an Alpha version) and 
plug in one of the supported Epson printers or run the command lines

cupsctl FileDevice=yes
system-config-printer --setup-printer='file:/tmp/printout' \
--devid='MFG:Epson;MDL:ME 320;'

if you do not have any suitable printer near you (they emulate the case 
that system-config-printer has detected an Epson ME 320).

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2010-12-03  6:16                         ` yuji.saito
  2010-12-06 16:54                           ` Till Kamppeter
  2011-01-07  0:13                           ` [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages Till Kamppeter
@ 2011-01-07  0:20                           ` Till Kamppeter
  2011-01-21  2:36                             ` yuji.saito
  2 siblings, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-01-07  0:20 UTC (permalink / raw)
  To: Open Printing, Printing-japan; +Cc: Martin Pitt

Hi,

Ubuntu Natty (11.04, to be released end of April) will be the first 
Linux distribution which automatically downloads binary printer driver 
packages from manufacturers via OpenPrinting.

The still missing support for signed packages got added to the 
third-party hardware driver manager Jockey today. Martin Pitt, thank for 
your great work!

See also

https://blueprints.launchpad.net/ubuntu/+spec/packageselection-desktop-n-automatic-printer-driver-download-should-support-signed-packages

and

https://bugs.launchpad.net/bugs/604698

This means that on Ubuntu Natty (and newer) printers supported by the 
manufacturer-supplied driver packages available via OpenPrinting will 
work out-of-the-box by just plugging them in or setting them up with 
system-config-printer.

So if you are making Linux printer drivers for a printer manufacturer, 
do not hesitate to add or update driver packages to support your newest 
models to have always Plug'n'Print. See

https://www.linuxfoundation.org/collaborate/workgroups/openprinting/writingandpackagingprinterdrivers

for instructions.

For testing, download Ubuntu Natty (a daily CD or an Alpha version), do 
a full update to get it to today's state (Jockey must be at least 0.7) 
and run the command lines:

cupsctl FileDevice=yes
system-config-printer --setup-printer='file:/tmp/printout' \
--devid='MFG:Epson;MDL:ME 320;'

They emulate the case that system-config-printer has detected an Epson 
ME 320.

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-01-07  0:20                           ` Till Kamppeter
@ 2011-01-21  2:36                             ` yuji.saito
  2011-01-24 23:00                               ` Till Kamppeter
       [not found]                               ` <20110131104358.GC4406@piware.de>
  0 siblings, 2 replies; 31+ messages in thread
From: yuji.saito @ 2011-01-21  2:36 UTC (permalink / raw)
  To: till.kamppeter, printing-architecture, printing-japan; +Cc: martin.pitt

Hello, Till, Martin.

On Fri, 2011-01-07 at 01:20 +0100, Till Kamppeter wrote:
> Hi,
>
> Ubuntu Natty (11.04, to be released end of April) will be the first
> Linux distribution which automatically downloads binary printer driver
> packages from manufacturers via OpenPrinting.

Thank you for achieving automatic download.

I checked in my home, and it works perfectly. I could read driver's
license, and I could select one from 2 drivers for 1 printer.

But I tried it in my company, it had a problem and didn't work. It was
because of proxy. Result of my quick analysis, it could work if the
following 3 points are changed.

1. In system-config-printer (package:
python-cupshelpers_1.2.3+20100723-0ubuntu13)
   system-config-printer accesses to OpenPrinting.org. But it did't
   read "http_proxy". I tried like below, and it could work.

   (Caution! It is just example. I think proxy information should be
    acquired from "http_proxy" environment variable.)
========================================================================
--- /usr/share/pyshared/cupshelpers/openprinting.py.ORG	2011-01-04
23:39:02.000000000 +0900
+++ /usr/share/pyshared/cupshelpers/openprinting.py	2011-01-20
09:58:58.000000000 +0900
@@ -59,8 +59,9 @@
         # Send request
         result = None
         status = 1
+        myproxies = {'http': 'http://proxy.example.com:port'}
         try:
-            conn = urllib.urlopen(self.url);
+            conn = urllib.urlopen(self.url, proxies=myproxies);
             status = conn.getcode();
             if (status == 200):
                 result = conn.read()
========================================================================

2. In jockey (package: jockey-common_0.8-0ubuntu3)
   Jockey seems to acquire the public key from driver's fingerprint.
   But gpg command in jockey didn't read "http_proxy".
   I tried like below, and it could work.

   (Caution! It is just example. I think proxy information should be
    acquired from "http_proxy" environment variable.)
========================================================================
--- /usr/share/pyshared/jockey/oslib.py.ORG	2011-01-20 03:57:54.000000000
+0900
+++ /usr/share/pyshared/jockey/oslib.py	2011-01-20 13:32:36.000000000 +0900
@@ -436,7 +436,9 @@
             # the fingerprint
             gpg = subprocess.Popen(['gpg', '--homedir', gpghome,
                 '--no-default-keyring', '--primary-keyring',
default_keyring,
-                '--keyserver', self.gpg_key_server, '--recv-key', keyid],
+                '--keyserver', self.gpg_key_server,
+                '--keyserver-options', 'http-proxy=http://proxy.example.com:
port',
+                '--recv-key', keyid],
                 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                 env={'PATH': os.environ.get('PATH', '')})
             (out, err) = gpg.communicate()
========================================================================
   And, in addition, I think it might be better that gpg uses http access
   to port 80 instead of hkp access by default, considering the users in
   the enterprise or the organization.

3. In apt-get
   [System]-[Preferences]-[Network Proxy] (gnome-network-properties)
   doesn't set proxy for apt, so jockey can't download the driver. Ubuntu
   10.10 or older, gnome-network-properties could set proxy for apt.
   I created file like below, and jockey could download the driver.
========================================================================
# cat <<EOF > /etc/apt/apt.conf
Acquire::http::Proxy "http://proxy.example.com:port";
EOF
========================================================================

Best regards.

Saito

-- 
Yuji Saito <yuji.saito@avasys.jp>
Linux Driver Team, ES1G, ES Business Division
AVASYS CORPORATION <http://avasys.jp/>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-01-21  2:36                             ` yuji.saito
@ 2011-01-24 23:00                               ` Till Kamppeter
       [not found]                               ` <20110131104358.GC4406@piware.de>
  1 sibling, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-01-24 23:00 UTC (permalink / raw)
  To: yuji.saito; +Cc: printing-architecture, printing-japan, martin.pitt

I have talked with Martin Pitt about the problem of missing Proxy 
support in system-config-printer and Jockey. He will look into this.

    Till

On 01/21/2011 03:36 AM, yuji.saito@avasys.jp wrote:
> Hello, Till, Martin.
>
> On Fri, 2011-01-07 at 01:20 +0100, Till Kamppeter wrote:
>> Hi,
>>
>> Ubuntu Natty (11.04, to be released end of April) will be the first
>> Linux distribution which automatically downloads binary printer driver
>> packages from manufacturers via OpenPrinting.
>
> Thank you for achieving automatic download.
>
> I checked in my home, and it works perfectly. I could read driver's
> license, and I could select one from 2 drivers for 1 printer.
>
> But I tried it in my company, it had a problem and didn't work. It was
> because of proxy. Result of my quick analysis, it could work if the
> following 3 points are changed.
>
> 1. In system-config-printer (package:
> python-cupshelpers_1.2.3+20100723-0ubuntu13)
>     system-config-printer accesses to OpenPrinting.org. But it did't
>     read "http_proxy". I tried like below, and it could work.
>
>     (Caution! It is just example. I think proxy information should be
>      acquired from "http_proxy" environment variable.)
> ========================================================================
> --- /usr/share/pyshared/cupshelpers/openprinting.py.ORG	2011-01-04
> 23:39:02.000000000 +0900
> +++ /usr/share/pyshared/cupshelpers/openprinting.py	2011-01-20
> 09:58:58.000000000 +0900
> @@ -59,8 +59,9 @@
>           # Send request
>           result = None
>           status = 1
> +        myproxies = {'http': 'http://proxy.example.com:port'}
>           try:
> -            conn = urllib.urlopen(self.url);
> +            conn = urllib.urlopen(self.url, proxies=myproxies);
>               status = conn.getcode();
>               if (status == 200):
>                   result = conn.read()
> ========================================================================
>
> 2. In jockey (package: jockey-common_0.8-0ubuntu3)
>     Jockey seems to acquire the public key from driver's fingerprint.
>     But gpg command in jockey didn't read "http_proxy".
>     I tried like below, and it could work.
>
>     (Caution! It is just example. I think proxy information should be
>      acquired from "http_proxy" environment variable.)
> ========================================================================
> --- /usr/share/pyshared/jockey/oslib.py.ORG	2011-01-20 03:57:54.000000000
> +0900
> +++ /usr/share/pyshared/jockey/oslib.py	2011-01-20 13:32:36.000000000 +0900
> @@ -436,7 +436,9 @@
>               # the fingerprint
>               gpg = subprocess.Popen(['gpg', '--homedir', gpghome,
>                   '--no-default-keyring', '--primary-keyring',
> default_keyring,
> -                '--keyserver', self.gpg_key_server, '--recv-key', keyid],
> +                '--keyserver', self.gpg_key_server,
> +                '--keyserver-options', 'http-proxy=http://proxy.example.com:
> port',
> +                '--recv-key', keyid],
>                   stdout=subprocess.PIPE, stderr=subprocess.PIPE,
>                   env={'PATH': os.environ.get('PATH', '')})
>               (out, err) = gpg.communicate()
> ========================================================================
>     And, in addition, I think it might be better that gpg uses http access
>     to port 80 instead of hkp access by default, considering the users in
>     the enterprise or the organization.
>
> 3. In apt-get
>     [System]-[Preferences]-[Network Proxy] (gnome-network-properties)
>     doesn't set proxy for apt, so jockey can't download the driver. Ubuntu
>     10.10 or older, gnome-network-properties could set proxy for apt.
>     I created file like below, and jockey could download the driver.
> ========================================================================
> # cat<<EOF>  /etc/apt/apt.conf
> Acquire::http::Proxy "http://proxy.example.com:port";
> EOF
> ========================================================================
>
> Best regards.
>
> Saito
>


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
       [not found]                               ` <20110131104358.GC4406@piware.de>
@ 2011-02-24  9:38                                 ` Till Kamppeter
  2011-02-25  7:00                                   ` yuji.saito
  0 siblings, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-02-24  9:38 UTC (permalink / raw)
  To: Martin Pitt; +Cc: printing-architecture, printing-japan, Michael Vogt

Saito-san,

is your problem solved now? Can you now auto-download the Epson drivers 
if you are behind a proxy?

    Till


On 01/31/2011 11:43 AM, Martin Pitt wrote:
> Hello Yuji, hello Michael,
>
> yuji.saito@avasys.jp [2011-01-21 11:36 +0900]:
>> But I tried it in my company, it had a problem and didn't work. It was
>> because of proxy.
>
> I now fixed two things in current Natty:
>
> ubuntu-system-service (0.1.21) natty; urgency=low
>
>    * debian/control: Fix Vcs-Bzr to point to actual branch.
>    * backend/system-service-d: Fix D-Bus type of start-time argument to unbreak
>      polkit query. This makes global proxy settings etc. work again.
>    [...]
>
>   -- Martin Pitt<martin.pitt@ubuntu.com>   Mon, 31 Jan 2011 09:48:34 +0100
>
> jockey (0.8-0ubuntu5) natty; urgency=low
>
>    * data/handlers/nvidia.py: Fix typo.
>    * backend/com.ubuntu.DeviceDriver.service: Export {http,https,ftp}_proxy
>      variables from /etc/environment into the backend. (LP: #373795)
>
>   -- Martin Pitt<martin.pitt@ubuntu.com>   Mon, 31 Jan 2011 11:31:56 +0100
>
> I don't have a proxy, but I verified that with above changes, I can
> now set a proxy in System ->  Preferences ->  Network proxy (and apply
> it globally), and then run jockey. The backend now has the http_proxy
> (etc.) environment variables and uses them, as I get "connection
> refused" errors.
>
>>     And, in addition, I think it might be better that gpg uses http access
>>     to port 80 instead of hkp access by default, considering the users in
>>     the enterprise or the organization.
>
> I committed the change to Jockey now, but didn't upload it yet.
>
>> 3. In apt-get
>>     [System]-[Preferences]-[Network Proxy] (gnome-network-properties)
>>     doesn't set proxy for apt, so jockey can't download the driver. Ubuntu
>>     10.10 or older, gnome-network-properties could set proxy for apt.
>>     I created file like below, and jockey could download the driver.
>> ========================================================================
>> # cat<<EOF>  /etc/apt/apt.conf
>> Acquire::http::Proxy "http://proxy.example.com:port";
>> EOF
>> ========================================================================
>
> This sounds like another bug in either apt or ubuntu-system-service.
> The latter is supposed to set the proxy configuration for apt as well.
> So either the bug is that apt doesn't respect the proxy settings in
> /etc/environment, or that ubuntu-system-service doesn't write a proper
> apt configuration. Michael, how is this supposed to work?
>
> Thanks,
>
> Martin


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-24  9:38                                 ` Till Kamppeter
@ 2011-02-25  7:00                                   ` yuji.saito
  2011-02-25 12:40                                     ` Till Kamppeter
  2011-02-25 13:03                                     ` Till Kamppeter
  0 siblings, 2 replies; 31+ messages in thread
From: yuji.saito @ 2011-02-25  7:00 UTC (permalink / raw)
  To: till.kamppeter, martin.pitt
  Cc: printing-architecture, printing-japan, michael.vogt

Hi, Till.

On Thu, 24 Feb 2011 18:38:13 +0900, "Till Kamppeter" wrote:
> Saito-san,
> 
> is your problem solved now? Can you now auto-download the Epson drivers 
> if you are behind a proxy?

I'm sorry for the late reply.

On Feb 18, I upgraded the system and tested automatic-download in the
proxy environment.  But it failed. When I checked the cause of
problem, it seems to be the problem not only in the system but also in
my test environment.  Now I am still investigating.

By the way, system-config-printer became 1.3.1, and it disabled debug 
option "-setup-printer" and "--devid". (It's not a bug but inconvenience 
for developer, I think.) Therefore I tested with the actual printer. 
But system-config-printer didn't start when I plugged the printer.


Regards,

Saito

-- 
Yuji Saito <yuji.saito@avasys.jp>
Linux Driver Team, ES1G, ES Business Division
AVASYS CORPORATION <http://avasys.jp/>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-25  7:00                                   ` yuji.saito
@ 2011-02-25 12:40                                     ` Till Kamppeter
  2011-02-25 21:26                                       ` Tim Waugh
  2011-02-25 13:03                                     ` Till Kamppeter
  1 sibling, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-02-25 12:40 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

On 02/25/2011 08:00 AM, yuji.saito@avasys.jp wrote:
> By the way, system-config-printer became 1.3.1, and it disabled debug
> option "-setup-printer" and "--devid". (It's not a bug but inconvenience
> for developer, I think.) Therefore I tested with the actual printer.
> But system-config-printer didn't start when I plugged the printer.

Tim, is there a new way to test the driver selection and 
automatic-download for a given device ID without needing to modify the 
code of system-config-printer and without having the appropriate printer 
physically? Or do I need to re-develop this feature?

I (and also the driver-issuing manufacturers) need this feature. Can you 
tell us (please use "Reply to all") how to proceed? Thanks.

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-25  7:00                                   ` yuji.saito
  2011-02-25 12:40                                     ` Till Kamppeter
@ 2011-02-25 13:03                                     ` Till Kamppeter
  1 sibling, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-02-25 13:03 UTC (permalink / raw)
  To: yuji.saito
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

On 02/25/2011 08:00 AM, yuji.saito@avasys.jp wrote:
> On Feb 18, I upgraded the system and tested automatic-download in the
> proxy environment.  But it failed. When I checked the cause of
> problem, it seems to be the problem not only in the system but also in
> my test environment.  Now I am still investigating.
>
> By the way, system-config-printer became 1.3.1, and it disabled debug
> option "-setup-printer" and "--devid". (It's not a bug but inconvenience
> for developer, I think.) Therefore I tested with the actual printer.
> But system-config-printer didn't start when I plugged the printer.

The printer recognition not working for your printer(s) is a bug and so 
we need to fix it. So I need all details about the detection process. So 
please go to

https://wiki.ubuntu.com/DebuggingPrintingProblems

and follow especially the instructions of the sections:

- USB printer
- CUPS error_log

If the printer is network-connected (LAN, WLAN) you have to start 
system-config-printer manually (System -> Administration -> Printing), 
click the "Add" button, and choose the printer on the first screen of 
the add-printer wizard (open the secion for network printers and wait 
~15 sec for the network scan).

Independent whether the printer is on USB or on the network, also run 
system-config-printer from the command line with

system-config-printer --debug

click "Add", choose the printer and click "Forward". Complete the 
add-printer wizard, independent whether a driver download happens or 
not, and send the output in the terminal window (use "Reply to all").

Also attach your /var/log/syslog file, to see logs of the hot-plugging 
of your printer.

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-25 12:40                                     ` Till Kamppeter
@ 2011-02-25 21:26                                       ` Tim Waugh
  2011-02-25 21:31                                         ` Till Kamppeter
                                                           ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Tim Waugh @ 2011-02-25 21:26 UTC (permalink / raw)
  To: Till Kamppeter
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Fri, 2011-02-25 at 13:40 +0100, Till Kamppeter wrote:
> Tim, is there a new way to test the driver selection and 
> automatic-download for a given device ID without needing to modify the 
> code of system-config-printer and without having the appropriate printer 
> physically? Or do I need to re-develop this feature?

Use: python newprinter.py --with-uri URI
(requires current git master... I'll do a 1.3.2 release in a week or so)

Tim.
*/


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-25 21:26                                       ` Tim Waugh
@ 2011-02-25 21:31                                         ` Till Kamppeter
  2011-02-25 21:37                                         ` Till Kamppeter
  2011-03-01 21:06                                         ` Till Kamppeter
  2 siblings, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-02-25 21:31 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

On 02/25/2011 10:26 PM, Tim Waugh wrote:
> On Fri, 2011-02-25 at 13:40 +0100, Till Kamppeter wrote:
>> Tim, is there a new way to test the driver selection and
>> automatic-download for a given device ID without needing to modify the
>> code of system-config-printer and without having the appropriate printer
>> physically? Or do I need to re-develop this feature?
>
> Use: python newprinter.py --with-uri URI
> (requires current git master... I'll do a 1.3.2 release in a week or so)

Thank you very much.

And how do I supply a device ID, to simulate the discovery of a given 
printer model?

Does this also work with an installed copy of s-c-p (using the installed 
pycups and jockey), like

python /usr/share/system-config-printer/newprinter.py --with-uri URI

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-25 21:26                                       ` Tim Waugh
  2011-02-25 21:31                                         ` Till Kamppeter
@ 2011-02-25 21:37                                         ` Till Kamppeter
  2011-03-01 21:06                                         ` Till Kamppeter
  2 siblings, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-02-25 21:37 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

On 02/25/2011 10:26 PM, Tim Waugh wrote:
> On Fri, 2011-02-25 at 13:40 +0100, Till Kamppeter wrote:
>> Tim, is there a new way to test the driver selection and
>> automatic-download for a given device ID without needing to modify the
>> code of system-config-printer and without having the appropriate printer
>> physically? Or do I need to re-develop this feature?
>
> Use: python newprinter.py --with-uri URI
> (requires current git master... I'll do a 1.3.2 release in a week or so)
>

Which patch introduces this functionality? I want to backport it into 
the s-c-p 1.3.1 of Ubuntu Natty.

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-02-25 21:26                                       ` Tim Waugh
  2011-02-25 21:31                                         ` Till Kamppeter
  2011-02-25 21:37                                         ` Till Kamppeter
@ 2011-03-01 21:06                                         ` Till Kamppeter
  2011-03-01 22:03                                           ` Till Kamppeter
  2011-03-08 15:55                                           ` [Printing-architecture] " Tim Waugh
  2 siblings, 2 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-03-01 21:06 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

On 02/25/2011 10:26 PM, Tim Waugh wrote:
> On Fri, 2011-02-25 at 13:40 +0100, Till Kamppeter wrote:
>> Tim, is there a new way to test the driver selection and
>> automatic-download for a given device ID without needing to modify the
>> code of system-config-printer and without having the appropriate printer
>> physically? Or do I need to re-develop this feature?
>
> Use: python newprinter.py --with-uri URI
> (requires current git master... I'll do a 1.3.2 release in a week or so)

Unfortunately, this testing mode does not work. I have fixed it, 
including the possibility to supply device IDs. Patch attached.

    Till

[-- Attachment #2: 0001-Activated-and-fixed-testing-mode-for-device-ID-drive.patch --]
[-- Type: text/x-patch, Size: 4285 bytes --]

From dbf81b6ce20fa4270b5da3e89e7485e42773c23b Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter@gmail.com>
Date: Tue, 1 Mar 2011 21:50:40 +0100
Subject: [PATCH] Activated and fixed testing mode for device ID/driver association

Currently, newprinter.py has only one testing mode to test the
complete wiozard setting up physically available printers. This did
not allow testing which driver gets associated to a printer with a
given device ID, for example if a user reports a bug about a wrong
driver being selected but the maintainer or developer does not have
the user's printer.

Exactly this is now available by a second testing mode with
parameters, which is fixed and made available with this change.

Instead of

cd /usr/share/system-config-printer
python newprinter.py

one does the call with parameters:

cupsctl FileDevice=yes
cd /usr/share/system-config-printer
python newprinter.py --setup-printer=file:/tmp/printout --devid="MFG:HP;MDL:Fax;"

and the printer with the device ID "MFG:HP;MDL:Fax;" will get set up
and the appropriate driver (here the fax driver of HPLIP) gets
selected. Also automatic driver downloads happen if appropriate.

This change only makes an already existing testing mode accessible and
fixes a bug in it (the device/driver association did not get
triggered). It does not change any behavior for normal use of
system-config-printer.
---
 newprinter.py |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/newprinter.py b/newprinter.py
index f10018a..0d58a40 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -661,6 +661,16 @@ class NewPrinterGUI(GtkGUI):
             self.on_rbtnNPFoomatic_toggled(self.rbtnNPFoomatic)
             self.rbtnChangePPDKeepSettings.set_active(True)
 
+            if self.dialog_mode == "printer_with_uri":
+                p = ppdsloader.PPDsLoader (device_id=devid,
+                                           device_uri=device_uri,
+                                           parent=self.NewPrinterWindow,
+                                           host=self._host,
+                                           encryption=self._encryption)
+                self.ppdsloader = p
+                p.connect ('finished',self.change_ppd_have_devs_and_ppds)
+                p.run ()
+
             self.auto_make = ""
             self.auto_model = ""
             self.auto_driver = None
@@ -3665,9 +3675,39 @@ class NewPrinterGUI(GtkGUI):
         self.device = None
         del self.printers
 
+def show_help():
+    print ("\nThis is the test/debug mode of the new-printer dialog of " \
+           "system-config-printer.\n\n"
+           "Options:\n\n"
+           "  --setup-printer URI\n"
+           "            Select the (detected) CUPS device URI on start up\n"
+           "            and run the new-printer wizard for it.\n\n"
+           "  --devid   Supply a device ID which should be used for the\n"
+           "            setup of the new peinter with \"--setup-printer\".\n"
+           "            This can be any printer's ID, so that driver \n"
+           "            selection can be tested for p[rinters which are not\n"
+           "            physically available.\n")
+
 gobject.type_register (NewPrinterGUI)
 
 if __name__ == '__main__':
+    import getopt
+    try:
+        opts, args = getopt.gnu_getopt (sys.argv[1:], '',
+                                        ['setup-printer=',
+                                         'devid='])
+    except getopt.GetoptError:
+        show_help ()
+        sys.exit (1)
+
+    setup_printer = None
+    devid = ""
+    for opt, optarg in opts:
+        if opt == '--setup-printer':
+            setup_printer = optarg
+        elif opt == '--devid':
+            devid = optarg
+
     os.environ["SYSTEM_CONFIG_PRINTER_UI"] = "ui"
     import ppdippstr
     import locale
@@ -3683,5 +3723,8 @@ if __name__ == '__main__':
     n.connect ("printer-added", on_signal)
     n.connect ("printer-modified", on_signal)
     n.connect ("dialog-canceled", on_signal)
-    n.init ("printer")
+    if setup_printer != None:
+        n.init ("printer_with_uri", device_uri=setup_printer, devid=devid)
+    else:
+        n.init ("printer")
     gtk.main ()
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-01 21:06                                         ` Till Kamppeter
@ 2011-03-01 22:03                                           ` Till Kamppeter
  2011-03-04  9:29                                             ` Olaf Meeuwissen
  2011-03-08 15:55                                           ` [Printing-architecture] " Tim Waugh
  1 sibling, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-03-01 22:03 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

Saito-san,

for testing the automatic driver download on current Natty, please 
update to the current state of the system, via

sudo apt-get update
sudo apt-get dist-upgrade

and then apply the patch attached to my previous mail using the commands:

cd /usr/share/system-config-printer/
sudo patch -p1 < 
0001-Activated-and-fixed-testing-mode-for-device-ID-drive.patch

Then do tests by running the commands:

cupsctl FileDevice=yes
cd /usr/share/system-config-printer/
python newprinter.py --setup-printer=file:/tmp/printout 
--devid="MFG:Epson;MDL:Stylus NX110;"

Try device IDs of different Epson printers and see whether the 
appropriate driver downloads. Especially test also in environments where 
the internet is only accessible through a proxy.

    Till

On 03/01/2011 10:06 PM, Till Kamppeter wrote:
> On 02/25/2011 10:26 PM, Tim Waugh wrote:
>> On Fri, 2011-02-25 at 13:40 +0100, Till Kamppeter wrote:
>>> Tim, is there a new way to test the driver selection and
>>> automatic-download for a given device ID without needing to modify the
>>> code of system-config-printer and without having the appropriate printer
>>> physically? Or do I need to re-develop this feature?
>>
>> Use: python newprinter.py --with-uri URI
>> (requires current git master... I'll do a 1.3.2 release in a week or so)
>
> Unfortunately, this testing mode does not work. I have fixed it,
> including the possibility to supply device IDs. Patch attached.
>
> Till


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-01 22:03                                           ` Till Kamppeter
@ 2011-03-04  9:29                                             ` Olaf Meeuwissen
  2011-03-04 16:50                                               ` Till Kamppeter
       [not found]                                               ` <20110304172254.GF30872@piware.de>
  0 siblings, 2 replies; 31+ messages in thread
From: Olaf Meeuwissen @ 2011-03-04  9:29 UTC (permalink / raw)
  To: Till Kamppeter
  Cc: printing-architecture, printing-japan, martin.pitt, michael.vogt

Hi Till,

Saito-san and I have been looking at how well the automatic download
works when behind a proxy.  Short story: it doesn't.  The long story
follows below.

Till Kamppeter <till.kamppeter@gmail.com> writes:

> for testing the automatic driver download on current Natty [...]
> apply the patch attached to my previous mail [...]
> 0001-Activated-and-fixed-testing-mode-for-device-ID-drive.patch

We upgraded Natty on 2011-03-03 and applied your patch to
system-config-printer.
 
> cupsctl FileDevice=yes
> cd /usr/share/system-config-printer/
> python newprinter.py --setup-printer=file:/tmp/printout 
> --devid="MFG:Epson;MDL:Stylus NX110;"

That's what we did.  We've been looking at jockey debug logs, wireshark
network traffic captures and the jockey code trying to figure out where
things went wrong.  According to the logs, the query of the OpenPrinting
DB went just fine.  It's getting the fingerprint that bombs.  Using wget
to fetch the fingerprint in the same environment works fine.
From the jockey debug logs:

  2011-03-03 13:04:49,904 DEBUG: Querying openprinting.org database...
  2011-03-03 13:04:49,904 DEBUG:    ... querying for MFG:Epson;MDL:Stylus NX110;
  2011-03-03 13:04:56,203 DEBUG: OpenPrintingDriverDB: driver driver/epson-stylus-nx110-series info: {'nonfreesoftware': True, 'name': 'epson-stylus-nx110-series', 'license': 'LGPL and SEIKO EPSON CORPORATION SOFTWARE LICENSE AGREEMENT', 'url': 'http://avasys.jp/english/linux_e/', 'thirdpartysupplied': False, 'supportcontacts': [{'url': 'http://avasys.jp/english/linux_e/contact/', 'name': 'AVASYS Corporation', 'level': 'voluntary'}], 'recommended': True, 'functionality': {'text': '100', 'lineart': '100', 'photo': '100', 'graphics': '100'}, 'manufacturersupplied': True, 'licensetext': u'License agreement fo..', 'supplier': 'Seiko Epson Corporation', 'freesoftware': False, 'packages': {'i386': {'epson-inkjet-printer-stylus-nx110-series_1.0.0-1lsb3.2_i386.deb': {'url': 'http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/debian/dists/lsb3.2/main/binary-i386/epson-inkjet-printer-stylus-nx110-series_1.0.0-1lsb3.2_i386.deb', 'pkgsys': 'deb', 'repositories': {'apt': 'deb http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/debian/ lsb3.2 main'}, 'version': '1.0.0', 'fingerprint': 'https://linux.avasys.jp/drivers/lsb/epson-inkjet/key/fingerprint', 'release': '1', 'realversion': '1.0.0'}}}, 'shortdescription': 'Epson Inkjet Printer Driver for Linux', 'patents': False}
  2011-03-03 13:04:56,252 WARNING: https://linux.avasys.jp/drivers/lsb/epson-inkjet/key/fingerprint has invalid certificate, ignoring driver: Host 172.xx.xx.xx:8080 returned an invalid certificate (_ssl.c:499: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol)
	
  2011-03-03 13:04:56,252 DEBUG: Ignoring driver as it does not have a valid GPG fingerprint
  2011-03-03 13:04:56,253 DEBUG: openprinting.org database query finished

We've chased the WARNING statement down to the connect method of
_CertValidatingHTTPSConnection in jockey's verified_https.py

   def connect(self):
        sock = socket.create_connection((self.host, self.port))
        self.sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED,
                                          ca_certs=self.ca_certs)
        cert = self.sock.getpeercert()
        hostname = self.host.split(':', 0)[0]
        if not self._validate_certificate_hostname(cert, hostname):
            raise InvalidCertificateException(hostname, cert,
                                              'hostname mismatch')

The ssl.wrap_socket raises an ssl.SSLError.  What puzzles us is that
this method creates a connection to the _proxy_ rather than to the host
where the fingerprint resides.  The wireshark capture for a wget went
straight to the latter host and negotiated TLSv1 with the proxy on the
fly.

We've also played with passing different ssl_version parameters to
ssl.wrap_socket but that didn't help.  We're not sure whether this
method negotiates a usable version but if it doesn't that something that
probably needs fixing as well.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-04  9:29                                             ` Olaf Meeuwissen
@ 2011-03-04 16:50                                               ` Till Kamppeter
       [not found]                                               ` <20110304172254.GF30872@piware.de>
  1 sibling, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-03-04 16:50 UTC (permalink / raw)
  To: Olaf Meeuwissen
  Cc: printing-architecture, printing-japan, martin.pitt, michael.vogt

Thank you very much, Olaf. I have created a bug report about this on 
Launchpad now:

https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/729185

pitti, can you fix this?

    Till


On 03/04/2011 10:29 AM, Olaf Meeuwissen wrote:
> Hi Till,
>
> Saito-san and I have been looking at how well the automatic download
> works when behind a proxy.  Short story: it doesn't.  The long story
> follows below.
>
> Till Kamppeter<till.kamppeter@gmail.com>  writes:
>
>> for testing the automatic driver download on current Natty [...]
>> apply the patch attached to my previous mail [...]
>> 0001-Activated-and-fixed-testing-mode-for-device-ID-drive.patch
>
> We upgraded Natty on 2011-03-03 and applied your patch to
> system-config-printer.
>
>> cupsctl FileDevice=yes
>> cd /usr/share/system-config-printer/
>> python newprinter.py --setup-printer=file:/tmp/printout
>> --devid="MFG:Epson;MDL:Stylus NX110;"
>
> That's what we did.  We've been looking at jockey debug logs, wireshark
> network traffic captures and the jockey code trying to figure out where
> things went wrong.  According to the logs, the query of the OpenPrinting
> DB went just fine.  It's getting the fingerprint that bombs.  Using wget
> to fetch the fingerprint in the same environment works fine.
>> From the jockey debug logs:
>
>    2011-03-03 13:04:49,904 DEBUG: Querying openprinting.org database...
>    2011-03-03 13:04:49,904 DEBUG:    ... querying for MFG:Epson;MDL:Stylus NX110;
>    2011-03-03 13:04:56,203 DEBUG: OpenPrintingDriverDB: driver driver/epson-stylus-nx110-series info: {'nonfreesoftware': True, 'name': 'epson-stylus-nx110-series', 'license': 'LGPL and SEIKO EPSON CORPORATION SOFTWARE LICENSE AGREEMENT', 'url': 'http://avasys.jp/english/linux_e/', 'thirdpartysupplied': False, 'supportcontacts': [{'url': 'http://avasys.jp/english/linux_e/contact/', 'name': 'AVASYS Corporation', 'level': 'voluntary'}], 'recommended': True, 'functionality': {'text': '100', 'lineart': '100', 'photo': '100', 'graphics': '100'}, 'manufacturersupplied': True, 'licensetext': u'License agreement fo..', 'supplier': 'Seiko Epson Corporation', 'freesoftware': False, 'packages': {'i386': {'epson-inkjet-printer-stylus-nx110-series_1.0.0-1lsb3.2_i386.deb': {'url': 'http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/debian/dists/lsb3.2/main/binary-i386/epson-inkjet-printer-stylus-nx110-series_1.0.0-1lsb3.2_i386.deb', 'pkgsys': 'deb', 'repositories': {'apt': 'deb http:
//linux.avasys.jp/drivers/lsb/epson-inkjet/stable/debian/ lsb3.2 main'}, 'version': '1.0.0', 'fingerprint': 'https://linux.avasys.jp/drivers/lsb/epson-inkjet/key/fingerprint', 'release': '1', 'realversion': '1.0.0'}}}, 'shortdescription': 'Epson Inkjet Printer Driver for Linux', 'patents': False}
>    2011-03-03 13:04:56,252 WARNING: https://linux.avasys.jp/drivers/lsb/epson-inkjet/key/fingerprint has invalid certificate, ignoring driver: Host 172.xx.xx.xx:8080 returned an invalid certificate (_ssl.c:499: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol)
> 	
>    2011-03-03 13:04:56,252 DEBUG: Ignoring driver as it does not have a valid GPG fingerprint
>    2011-03-03 13:04:56,253 DEBUG: openprinting.org database query finished
>
> We've chased the WARNING statement down to the connect method of
> _CertValidatingHTTPSConnection in jockey's verified_https.py
>
>     def connect(self):
>          sock = socket.create_connection((self.host, self.port))
>          self.sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED,
>                                            ca_certs=self.ca_certs)
>          cert = self.sock.getpeercert()
>          hostname = self.host.split(':', 0)[0]
>          if not self._validate_certificate_hostname(cert, hostname):
>              raise InvalidCertificateException(hostname, cert,
>                                                'hostname mismatch')
>
> The ssl.wrap_socket raises an ssl.SSLError.  What puzzles us is that
> this method creates a connection to the _proxy_ rather than to the host
> where the fingerprint resides.  The wireshark capture for a wget went
> straight to the latter host and negotiated TLSv1 with the proxy on the
> fly.
>
> We've also played with passing different ssl_version parameters to
> ssl.wrap_socket but that didn't help.  We're not sure whether this
> method negotiates a usable version but if it doesn't that something that
> probably needs fixing as well.
>
> Hope this helps,


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
       [not found]                                               ` <20110304172254.GF30872@piware.de>
@ 2011-03-07  1:32                                                 ` Olaf Meeuwissen
  2011-03-11  3:03                                                   ` [Printing-architecture] [Printing-japan] " Olaf Meeuwissen
  0 siblings, 1 reply; 31+ messages in thread
From: Olaf Meeuwissen @ 2011-03-07  1:32 UTC (permalink / raw)
  To: Martin Pitt
  Cc: printing-architecture, printing-japan, michael.vogt, Till Kamppeter

Martin Pitt <martin.pitt@ubuntu.com> writes:

> Hello Olaf,
>
> Olaf Meeuwissen [2011-03-04 18:29 +0900]:
>>         sock = socket.create_connection((self.host, self.port))
>>         self.sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED,
>>                                           ca_certs=self.ca_certs)
>> 
>> The ssl.wrap_socket raises an ssl.SSLError.  What puzzles us is that
>> this method creates a connection to the _proxy_ rather than to the host
>> where the fingerprint resides.
>
> That indeed sounds strange. For reproducing this, do you have some
> details about your proxy setup? Is that just a standard squid?

Not quite sure what our IT department uses but I'm pretty sure it's not
just a standard squid.  Actually, I'm almost sure it's not even a squid
at all.

> Anyway, now that Till created a bug report for it, I propose we move
> discussion there, for better record-keeping.

OK.
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-01 21:06                                         ` Till Kamppeter
  2011-03-01 22:03                                           ` Till Kamppeter
@ 2011-03-08 15:55                                           ` Tim Waugh
  1 sibling, 0 replies; 31+ messages in thread
From: Tim Waugh @ 2011-03-08 15:55 UTC (permalink / raw)
  To: Till Kamppeter
  Cc: printing-architecture, printing-japan, michael.vogt, martin.pitt

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

On Tue, 2011-03-01 at 22:06 +0100, Till Kamppeter wrote:
> Unfortunately, this testing mode does not work.

I'd forgotten to push it before going away for a week, sorry.

> I have fixed it, including the possibility to supply device IDs. Patch
> attached.

Thanks, applied.

Tim.
*/


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-07  1:32                                                 ` Olaf Meeuwissen
@ 2011-03-11  3:03                                                   ` Olaf Meeuwissen
       [not found]                                                     ` <20110311080832.GB2541@piware.de>
  2011-03-11 16:15                                                     ` Till Kamppeter
  0 siblings, 2 replies; 31+ messages in thread
From: Olaf Meeuwissen @ 2011-03-11  3:03 UTC (permalink / raw)
  To: Martin Pitt; +Cc: printing-architecture, printing-japan, michael.vogt

Olaf Meeuwissen <olaf.meeuwissen@avasys.jp> writes:

> Martin Pitt <martin.pitt@ubuntu.com> writes:
>> Anyway, now that Till created a bug report for it, I propose we move
>> discussion there, for better record-keeping.
>
> OK.

# Sorry about not subscribing myself to the bug report.

Anyway, just wanted to summarize current status here so the OpenPrinting
people remain in the loop as well.

 1. Fingerprint SSL check does not work behind a proxy
    We've checked the latest changes and the fingerprint is fetched
    without any problems.
    -> https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/729185

 2. GPG keyserver access does not work behind a proxy
    This has been reported on the mailing list before (IIRC) but after
    getting the fingerprint correctly, this is the next proxy problem
    that we hit.
    -> https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/733023

 3. GPG keyserver default port blocked by proxy
    IIRC, Saito-san has suggested using a keyserver that listens on the
    HTTP port (rather than the HKP one) on the list and I believe there
    was a mail saying it got fixed, but the current sources refer to a
    keyserver that listens on the HKP port.
    -> https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/733029

 4. Jockey not called by system-config-printer?
    We seen some discrepancies in behaviour wrt the automatic printer
    driver download depending on how the printer was "detected".
    Connecting a USB printer worked fine.  Running newprinter.py from
    the command-line is also okay.  However, when trying to add a USB
    or network printer using system-config-printer nothing happened.
    As in no attempt to have jockey download a driver was made.
    I'll submit a bug report against system-config-printer later as I
    don't have the details handy at the moment.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
       [not found]                                                     ` <20110311080832.GB2541@piware.de>
@ 2011-03-11 15:50                                                       ` Till Kamppeter
  2011-03-14  9:29                                                       ` Olaf Meeuwissen
  1 sibling, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-03-11 15:50 UTC (permalink / raw)
  To: Martin Pitt; +Cc: printing-architecture, printing-japan, michael.vogt

On 03/11/2011 09:08 AM, Martin Pitt wrote:
>>   4. Jockey not called by system-config-printer?
>
> I leave that to Till.

Fixed in system-config-printer 1.3.1+20110222-0ubuntu4 package in Natty. 
Please test. I will submit the patch to upstream, too.

    Till

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-11  3:03                                                   ` [Printing-architecture] [Printing-japan] " Olaf Meeuwissen
       [not found]                                                     ` <20110311080832.GB2541@piware.de>
@ 2011-03-11 16:15                                                     ` Till Kamppeter
  2011-03-11 16:59                                                       ` Tim Waugh
  1 sibling, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-03-11 16:15 UTC (permalink / raw)
  To: Olaf Meeuwissen
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

On 03/11/2011 04:03 AM, Olaf Meeuwissen wrote:
>   4. Jockey not called by system-config-printer?
>      We seen some discrepancies in behaviour wrt the automatic printer
>      driver download depending on how the printer was "detected".
>      Connecting a USB printer worked fine.  Running newprinter.py from
>      the command-line is also okay.  However, when trying to add a USB
>      or network printer using system-config-printer nothing happened.
>      As in no attempt to have jockey download a driver was made.
>      I'll submit a bug report against system-config-printer later as I
>      don't have the details handy at the moment.

Tim, the patch to fix this (and which I have applied to the Ubuntu 
package) is attached./ Please apply it also upstream. Thanks.

    Till

[-- Attachment #2: 0001-Assured-that-on-all-uses-of-the-ppdsloader-class-the.patch --]
[-- Type: text/x-patch, Size: 2116 bytes --]

From 2bd9546c93d33e58bb03ff252091c8ea680c21ec Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter@gmail.com>
Date: Fri, 11 Mar 2011 17:10:56 +0100
Subject: [PATCH] Assured that on all uses of the ppdsloader class the device ID is supplied

In some cases during the creation or the modification of a print queue
(newprinter.py) a device ID was available but it did not get supplied
to the ppdsloader class and this caused automatic driver downloads not
to get triggered.
---
 newprinter.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/newprinter.py b/newprinter.py
index 0d58a40..fa113cc 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -637,6 +637,8 @@ class NewPrinterGUI(GtkGUI):
 
             if self.dialog_mode == "ppd":
                 devid = self.device.id
+                if not self.devid:
+                    self.devid = devid
 
             if not devid:
                 devid = None
@@ -655,6 +657,8 @@ class NewPrinterGUI(GtkGUI):
                                         include_schemes=schemes,
                                         reply_handler=self.change_ppd_got_devs,
                                         error_handler=self.change_ppd_got_devs)
+                if self.devid:
+                    devid = self.devid
 
             self.ntbkNewPrinter.set_current_page(2)
             self.rbtnNPFoomatic.set_active (True)
@@ -714,6 +718,7 @@ class NewPrinterGUI(GtkGUI):
                 devid = device.id
                 mm = device.make_and_model
                 self.device = device
+                self.devid = devid
 
         # We'll also need the list of PPDs.
         self.ppdsloader = ppdsloader.PPDsLoader (device_id=devid,
@@ -970,6 +975,8 @@ class NewPrinterGUI(GtkGUI):
 
                 if not self.remotecupsqueue:
                     if self.ppds == None:
+                        if self.device.id and not self.devid:
+                            self.devid = self.device.id
                         devid = self.devid
                         if not devid:
                             devid = None
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-11 16:15                                                     ` Till Kamppeter
@ 2011-03-11 16:59                                                       ` Tim Waugh
  2011-03-11 17:45                                                         ` Till Kamppeter
  0 siblings, 1 reply; 31+ messages in thread
From: Tim Waugh @ 2011-03-11 16:59 UTC (permalink / raw)
  To: Till Kamppeter
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt


[-- Attachment #1.1: Type: text/plain, Size: 1657 bytes --]

On Fri, 2011-03-11 at 17:15 +0100, Till Kamppeter wrote:
> Tim, the patch to fix this (and which I have applied to the Ubuntu 
> package) is attached./ Please apply it also upstream. Thanks.

Thanks.  Actually some of these are incorrect, so I've applied a patch
that fixes the correct part and have removed the incorrect code.

diff --git a/newprinter.py b/newprinter.py
index 0d58a40..fa113cc 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -637,6 +637,8 @@ class NewPrinterGUI(GtkGUI):
 
             if self.dialog_mode == "ppd":
                 devid = self.device.id
+                if not self.devid:
+                    self.devid = devid
 
             if not devid:
                 devid = None

This entire block is stale code I think.  If self.dialog_mode is "ppd",
self.device.id is definitely unset (we only created self.device a few
lines above).

@@ -655,6 +657,8 @@ class NewPrinterGUI(GtkGUI):
                                         include_schemes=schemes,
                                         reply_handler=self.change_ppd_got_devs,
                                         error_handler=self.change_ppd_got_devs)
+                if self.devid:
+                    devid = self.devid

No, that's not right.  The reason is that the getDevices() call
immediately above these new lines is asynchronous.  The reason we're
calling getDevices() at all here is precisely in order to get the Device
ID for the device we're changing the PPD of, because we don't already
have it.

Here's the patch that fixes the problem.  Another patch is in master
that removes the stale code.

Tim.
*/


[-- Attachment #1.2: 0001-Ensure-all-uses-of-ppdsloader-supply-the-Device-ID.patch --]
[-- Type: text/x-patch, Size: 1029 bytes --]

From bf57c0244d438972d98328d13d0589a07e2c95b6 Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com>
Date: Fri, 11 Mar 2011 16:53:09 +0000
Subject: [PATCH] Ensure all uses of ppdsloader supply the Device ID.

The "printer" (i.e. New Printer) case did not supply the Device ID
obtained from the device list.  Discovered by Till Kamppeter.
---
 newprinter.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/newprinter.py b/newprinter.py
index 9c13225..f5ab791 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -970,7 +970,9 @@ class NewPrinterGUI(GtkGUI):
 
                 if not self.remotecupsqueue:
                     if self.ppds == None:
-                        devid = self.devid
+                        devid = self.device.id # ID of selected device
+                        if not devid:
+                            devid = self.devid # ID supplied at init()
                         if not devid:
                             devid = None
 
-- 
1.7.4


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-11 16:59                                                       ` Tim Waugh
@ 2011-03-11 17:45                                                         ` Till Kamppeter
  2011-03-12 16:21                                                           ` Till Kamppeter
  0 siblings, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-03-11 17:45 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

Tim, thanks. I have updated the Ubuntu package now (0ubuntu5).

Can everyonne please test again (with fully updated Natty) whether 
auto-download of drivers works in all cases:

1. Plug printer to USB and turn it on.
2. Leave the printer on USB plugged and turned on, remove the
    auto-generated queue(s) and uninstall the auto-installed driver.
    Then start system-config-printer, click "+ Add", select the USB from
    the list of detected printers and go through the new printer wizard.
3. Right-click the icon of the printer installed from the last test,
    click "Properties in the pop-up menu and in the Properties dialog
    click the "Change" button for make and model. Change the driver to
    any local one, like Gutenprint. Then uninstall the auto-downloaded
    driver package. Now go intp the Properties dialog again and click
    "Change" for make and model. Choose the original printer make and
    model (the one which could automatically chosen in the first 2
    tests). Does somewhere on the way an automatic driver download get
    triggered?
4. Uninstall the auto-installed package from the previous tests and
    remove the print queues. Disconnect the printer from the USB and
    connect it to the network (wired or wireless does not matter, but
    for wireless the printer needs to be configured to connect to the
    router). Now start system-config-printer, click "+ Add" and in the
    list open the section for network printers. Wait around 15 sec until
    the spinning circle at the lower left disappears. Now choose the
    printer under the network printers and follow the rest of the
    wizard's steps.
5. Do the steps of test 3 with your network printer queue from test 4.

Does the automatic driver download happen in all these steps?

    Till


On 03/11/2011 05:59 PM, Tim Waugh wrote:
> On Fri, 2011-03-11 at 17:15 +0100, Till Kamppeter wrote:
>> Tim, the patch to fix this (and which I have applied to the Ubuntu
>> package) is attached./ Please apply it also upstream. Thanks.
>
> Thanks.  Actually some of these are incorrect, so I've applied a patch
> that fixes the correct part and have removed the incorrect code.
>
> diff --git a/newprinter.py b/newprinter.py
> index 0d58a40..fa113cc 100644
> --- a/newprinter.py
> +++ b/newprinter.py
> @@ -637,6 +637,8 @@ class NewPrinterGUI(GtkGUI):
>
>               if self.dialog_mode == "ppd":
>                   devid = self.device.id
> +                if not self.devid:
> +                    self.devid = devid
>
>               if not devid:
>                   devid = None
>
> This entire block is stale code I think.  If self.dialog_mode is "ppd",
> self.device.id is definitely unset (we only created self.device a few
> lines above).
>
> @@ -655,6 +657,8 @@ class NewPrinterGUI(GtkGUI):
>                                           include_schemes=schemes,
>                                           reply_handler=self.change_ppd_got_devs,
>                                           error_handler=self.change_ppd_got_devs)
> +                if self.devid:
> +                    devid = self.devid
>
> No, that's not right.  The reason is that the getDevices() call
> immediately above these new lines is asynchronous.  The reason we're
> calling getDevices() at all here is precisely in order to get the Device
> ID for the device we're changing the PPD of, because we don't already
> have it.
>
> Here's the patch that fixes the problem.  Another patch is in master
> that removes the stale code.
>
> Tim.
> */
>


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-11 17:45                                                         ` Till Kamppeter
@ 2011-03-12 16:21                                                           ` Till Kamppeter
  2011-03-12 17:36                                                             ` Till Kamppeter
  2011-03-14  9:39                                                             ` Olaf Meeuwissen
  0 siblings, 2 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-03-12 16:21 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

I have done test 3 and found a bug. I have fixed it in -0ubuntu6. Please 
do your tests with that version.

    Till

On 03/11/2011 06:45 PM, Till Kamppeter wrote:
> Tim, thanks. I have updated the Ubuntu package now (0ubuntu5).
>
> Can everyonne please test again (with fully updated Natty) whether
> auto-download of drivers works in all cases:
>
> 1. Plug printer to USB and turn it on.
> 2. Leave the printer on USB plugged and turned on, remove the
> auto-generated queue(s) and uninstall the auto-installed driver.
> Then start system-config-printer, click "+ Add", select the USB from
> the list of detected printers and go through the new printer wizard.
> 3. Right-click the icon of the printer installed from the last test,
> click "Properties in the pop-up menu and in the Properties dialog
> click the "Change" button for make and model. Change the driver to
> any local one, like Gutenprint. Then uninstall the auto-downloaded
> driver package. Now go intp the Properties dialog again and click
> "Change" for make and model. Choose the original printer make and
> model (the one which could automatically chosen in the first 2
> tests). Does somewhere on the way an automatic driver download get
> triggered?
> 4. Uninstall the auto-installed package from the previous tests and
> remove the print queues. Disconnect the printer from the USB and
> connect it to the network (wired or wireless does not matter, but
> for wireless the printer needs to be configured to connect to the
> router). Now start system-config-printer, click "+ Add" and in the
> list open the section for network printers. Wait around 15 sec until
> the spinning circle at the lower left disappears. Now choose the
> printer under the network printers and follow the rest of the
> wizard's steps.
> 5. Do the steps of test 3 with your network printer queue from test 4.
>
> Does the automatic driver download happen in all these steps?
>
> Till
>
>
> On 03/11/2011 05:59 PM, Tim Waugh wrote:
>> On Fri, 2011-03-11 at 17:15 +0100, Till Kamppeter wrote:
>>> Tim, the patch to fix this (and which I have applied to the Ubuntu
>>> package) is attached./ Please apply it also upstream. Thanks.
>>
>> Thanks. Actually some of these are incorrect, so I've applied a patch
>> that fixes the correct part and have removed the incorrect code.
>>
>> diff --git a/newprinter.py b/newprinter.py
>> index 0d58a40..fa113cc 100644
>> --- a/newprinter.py
>> +++ b/newprinter.py
>> @@ -637,6 +637,8 @@ class NewPrinterGUI(GtkGUI):
>>
>> if self.dialog_mode == "ppd":
>> devid = self.device.id
>> + if not self.devid:
>> + self.devid = devid
>>
>> if not devid:
>> devid = None
>>
>> This entire block is stale code I think. If self.dialog_mode is "ppd",
>> self.device.id is definitely unset (we only created self.device a few
>> lines above).
>>
>> @@ -655,6 +657,8 @@ class NewPrinterGUI(GtkGUI):
>> include_schemes=schemes,
>> reply_handler=self.change_ppd_got_devs,
>> error_handler=self.change_ppd_got_devs)
>> + if self.devid:
>> + devid = self.devid
>>
>> No, that's not right. The reason is that the getDevices() call
>> immediately above these new lines is asynchronous. The reason we're
>> calling getDevices() at all here is precisely in order to get the Device
>> ID for the device we're changing the PPD of, because we don't already
>> have it.
>>
>> Here's the patch that fixes the problem. Another patch is in master
>> that removes the stale code.
>>
>> Tim.
>> */
>>
>


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-12 16:21                                                           ` Till Kamppeter
@ 2011-03-12 17:36                                                             ` Till Kamppeter
  2011-03-14 11:13                                                               ` Tim Waugh
  2011-03-14  9:39                                                             ` Olaf Meeuwissen
  1 sibling, 1 reply; 31+ messages in thread
From: Till Kamppeter @ 2011-03-12 17:36 UTC (permalink / raw)
  To: Tim Waugh
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

[-- Attachment #1: Type: text/plain, Size: 3678 bytes --]

Tim, I have attached the patch of the last fix for the upstream repository.

    Till

On 03/12/2011 05:21 PM, Till Kamppeter wrote:
> I have done test 3 and found a bug. I have fixed it in -0ubuntu6. Please
> do your tests with that version.
>
> Till
>
> On 03/11/2011 06:45 PM, Till Kamppeter wrote:
>> Tim, thanks. I have updated the Ubuntu package now (0ubuntu5).
>>
>> Can everyonne please test again (with fully updated Natty) whether
>> auto-download of drivers works in all cases:
>>
>> 1. Plug printer to USB and turn it on.
>> 2. Leave the printer on USB plugged and turned on, remove the
>> auto-generated queue(s) and uninstall the auto-installed driver.
>> Then start system-config-printer, click "+ Add", select the USB from
>> the list of detected printers and go through the new printer wizard.
>> 3. Right-click the icon of the printer installed from the last test,
>> click "Properties in the pop-up menu and in the Properties dialog
>> click the "Change" button for make and model. Change the driver to
>> any local one, like Gutenprint. Then uninstall the auto-downloaded
>> driver package. Now go intp the Properties dialog again and click
>> "Change" for make and model. Choose the original printer make and
>> model (the one which could automatically chosen in the first 2
>> tests). Does somewhere on the way an automatic driver download get
>> triggered?
>> 4. Uninstall the auto-installed package from the previous tests and
>> remove the print queues. Disconnect the printer from the USB and
>> connect it to the network (wired or wireless does not matter, but
>> for wireless the printer needs to be configured to connect to the
>> router). Now start system-config-printer, click "+ Add" and in the
>> list open the section for network printers. Wait around 15 sec until
>> the spinning circle at the lower left disappears. Now choose the
>> printer under the network printers and follow the rest of the
>> wizard's steps.
>> 5. Do the steps of test 3 with your network printer queue from test 4.
>>
>> Does the automatic driver download happen in all these steps?
>>
>> Till
>>
>>
>> On 03/11/2011 05:59 PM, Tim Waugh wrote:
>>> On Fri, 2011-03-11 at 17:15 +0100, Till Kamppeter wrote:
>>>> Tim, the patch to fix this (and which I have applied to the Ubuntu
>>>> package) is attached./ Please apply it also upstream. Thanks.
>>>
>>> Thanks. Actually some of these are incorrect, so I've applied a patch
>>> that fixes the correct part and have removed the incorrect code.
>>>
>>> diff --git a/newprinter.py b/newprinter.py
>>> index 0d58a40..fa113cc 100644
>>> --- a/newprinter.py
>>> +++ b/newprinter.py
>>> @@ -637,6 +637,8 @@ class NewPrinterGUI(GtkGUI):
>>>
>>> if self.dialog_mode == "ppd":
>>> devid = self.device.id
>>> + if not self.devid:
>>> + self.devid = devid
>>>
>>> if not devid:
>>> devid = None
>>>
>>> This entire block is stale code I think. If self.dialog_mode is "ppd",
>>> self.device.id is definitely unset (we only created self.device a few
>>> lines above).
>>>
>>> @@ -655,6 +657,8 @@ class NewPrinterGUI(GtkGUI):
>>> include_schemes=schemes,
>>> reply_handler=self.change_ppd_got_devs,
>>> error_handler=self.change_ppd_got_devs)
>>> + if self.devid:
>>> + devid = self.devid
>>>
>>> No, that's not right. The reason is that the getDevices() call
>>> immediately above these new lines is asynchronous. The reason we're
>>> calling getDevices() at all here is precisely in order to get the Device
>>> ID for the device we're changing the PPD of, because we don't already
>>> have it.
>>>
>>> Here's the patch that fixes the problem. Another patch is in master
>>> that removes the stale code.
>>>
>>> Tim.
>>> */
>>>
>>
>


[-- Attachment #2: 0001-Make-automatic-driver-download-also-working-when-cha.patch --]
[-- Type: text/x-patch, Size: 1361 bytes --]

From 71ac9f2eb40e10d60d3de93a7b9dd3a16b2fb359 Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter@gmail.com>
Date: Sat, 12 Mar 2011 18:30:41 +0100
Subject: [PATCH] Make automatic driver download also working when changing the driver

When changing the PPD file of an existing print queue ("Make and
Model" in "Properties" dialog) the cupshelpers.getDevices() function
is called with the scheme of the device URI to find the printer's
device ID. The scheme needs to be supplied as ASCII string and not as
UniCode, otherwise the scheme is not recognized and the appropriate
CUPS backend does not get called. The device ID is needed to suggest
the correct drivers and to trigger automatic driver downloads.
---
 newprinter.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/newprinter.py b/newprinter.py
index 4aca860..f116641 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -637,7 +637,7 @@ class NewPrinterGUI(GtkGUI):
 
             # We'll need to know the Device ID for this device.
             if self.dialog_mode == "ppd" and not self.devid:
-                scheme = device_uri.split (":", 1)[0]
+                scheme = str(device_uri.split (":", 1)[0])
                 schemes = [scheme]
                 if scheme in ["socket", "lpd", "ipp"]:
                     schemes.extend (["snmp", "dnssd"])
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
       [not found]                                                     ` <20110311080832.GB2541@piware.de>
  2011-03-11 15:50                                                       ` Till Kamppeter
@ 2011-03-14  9:29                                                       ` Olaf Meeuwissen
  1 sibling, 0 replies; 31+ messages in thread
From: Olaf Meeuwissen @ 2011-03-14  9:29 UTC (permalink / raw)
  To: Martin Pitt; +Cc: printing-architecture, printing-japan, michael.vogt

Martin Pitt <martin.pitt@ubuntu.com> writes:

> Olaf Meeuwissen [2011-03-11 12:03 +0900]:
>>  2. GPG keyserver access does not work behind a proxy
>>     This has been reported on the mailing list before (IIRC) but after
>>     getting the fingerprint correctly, this is the next proxy problem
>>     that we hit.
>>     -> https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/733023
>
> Fixed in trunk.

Fix tested.  Works fine.

>>  3. GPG keyserver default port blocked by proxy
>>     IIRC, Saito-san has suggested using a keyserver that listens on the
>>     HTTP port (rather than the HKP one) on the list and I believe there
>>     was a mail saying it got fixed, but the current sources refer to a
>>     keyserver that listens on the HKP port.
>>     -> https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/733029
>
> Fixed in trunk.

Fix tested.  Works fine.

>>  4. Jockey not called by system-config-printer?
>
> I leave that to Till.

Will follow up on Till's mail.

Thanks,
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-12 16:21                                                           ` Till Kamppeter
  2011-03-12 17:36                                                             ` Till Kamppeter
@ 2011-03-14  9:39                                                             ` Olaf Meeuwissen
  2011-03-14 20:47                                                               ` Till Kamppeter
  1 sibling, 1 reply; 31+ messages in thread
From: Olaf Meeuwissen @ 2011-03-14  9:39 UTC (permalink / raw)
  To: Till Kamppeter
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

Till Kamppeter <till.kamppeter@gmail.com> writes:

> I have done test 3 and found a bug. I have fixed it in
> -0ubuntu6. Please do your tests with that version.

We've tested this with USB and wired printers and everything works
great!  Versions used:

  jockey (0.9.2-0ubuntu3)
  system-config-printer (1.3.1+20110222-0ubuntu6)

Thanks!
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-12 17:36                                                             ` Till Kamppeter
@ 2011-03-14 11:13                                                               ` Tim Waugh
  0 siblings, 0 replies; 31+ messages in thread
From: Tim Waugh @ 2011-03-14 11:13 UTC (permalink / raw)
  To: Till Kamppeter
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

On Sat, 2011-03-12 at 18:36 +0100, Till Kamppeter wrote:
> Tim, I have attached the patch of the last fix for the upstream repository.

That looks like a Python bug to me.

If scheme is e.g. u'socket' (i.e. a unicode object), that should still
give True when used with 'scheme in ["socket"]'.  It does here:

>>> scheme = u'socket'
>>> scheme in ["socket", "lpd", "ipp"]
True

python-2.7-8.fc14.1.x86_64

I'll apply it in any case for the moment, but you might want to check to
see whether Python in Ubuntu is behaving correctly there.

Tim.
*/


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Printing-architecture] [Printing-japan] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages
  2011-03-14  9:39                                                             ` Olaf Meeuwissen
@ 2011-03-14 20:47                                                               ` Till Kamppeter
  0 siblings, 0 replies; 31+ messages in thread
From: Till Kamppeter @ 2011-03-14 20:47 UTC (permalink / raw)
  To: Olaf Meeuwissen
  Cc: printing-architecture, printing-japan, michael.vogt, Martin Pitt

Olaf, thanks for all the testing.

    Till

On 03/14/2011 10:39 AM, Olaf Meeuwissen wrote:
> Till Kamppeter<till.kamppeter@gmail.com>  writes:
>
>> I have done test 3 and found a bug. I have fixed it in
>> -0ubuntu6. Please do your tests with that version.
>
> We've tested this with USB and wired printers and everything works
> great!  Versions used:
>
>    jockey (0.9.2-0ubuntu3)
>    system-config-printer (1.3.1+20110222-0ubuntu6)
>
> Thanks!


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2011-03-14 20:47 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <F30723B8678F584CB6A4269E911255CB03396379@m1a.epkowa.co.jp>
     [not found] ` <4B8241D4.2040207@gmail.com>
     [not found]   ` <F30723B8678F584CB6A4269E911255CB034CE4DE@m1a.epkowa.co.jp>
     [not found]     ` <4B8E4CEF.8040007@gmail.com>
     [not found]       ` <F30723B8678F584CB6A4269E911255CB035D7CF6@m1a.epkowa.co.jp>
     [not found]         ` <4BBBA6A9.5050005@gmail.com>
     [not found]           ` <F30723B8678F584CB6A4269E911255CB0392318F@m1a.epkowa.co.jp>
     [not found]             ` <4BD18655.8060000@gmail.com>
     [not found]               ` <F30723B8678F584CB6A4269E911255CB03BF5E5C@m1a.epkowa.co.jp>
     [not found]                 ` <4C091F92.7050102@gmail.com>
     [not found]                   ` <4C1284F4.3000707@gmail.com>
     [not found]                     ` <4C89CF0C.60003@avasys.jp>
2010-11-18 16:55                       ` [Printing-architecture] Updates for auto-downloadable printer packages Till Kamppeter
2010-12-03  6:16                         ` yuji.saito
2010-12-06 16:54                           ` Till Kamppeter
2011-01-07  0:13                           ` [Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages Till Kamppeter
2011-01-07  0:20                           ` Till Kamppeter
2011-01-21  2:36                             ` yuji.saito
2011-01-24 23:00                               ` Till Kamppeter
     [not found]                               ` <20110131104358.GC4406@piware.de>
2011-02-24  9:38                                 ` Till Kamppeter
2011-02-25  7:00                                   ` yuji.saito
2011-02-25 12:40                                     ` Till Kamppeter
2011-02-25 21:26                                       ` Tim Waugh
2011-02-25 21:31                                         ` Till Kamppeter
2011-02-25 21:37                                         ` Till Kamppeter
2011-03-01 21:06                                         ` Till Kamppeter
2011-03-01 22:03                                           ` Till Kamppeter
2011-03-04  9:29                                             ` Olaf Meeuwissen
2011-03-04 16:50                                               ` Till Kamppeter
     [not found]                                               ` <20110304172254.GF30872@piware.de>
2011-03-07  1:32                                                 ` Olaf Meeuwissen
2011-03-11  3:03                                                   ` [Printing-architecture] [Printing-japan] " Olaf Meeuwissen
     [not found]                                                     ` <20110311080832.GB2541@piware.de>
2011-03-11 15:50                                                       ` Till Kamppeter
2011-03-14  9:29                                                       ` Olaf Meeuwissen
2011-03-11 16:15                                                     ` Till Kamppeter
2011-03-11 16:59                                                       ` Tim Waugh
2011-03-11 17:45                                                         ` Till Kamppeter
2011-03-12 16:21                                                           ` Till Kamppeter
2011-03-12 17:36                                                             ` Till Kamppeter
2011-03-14 11:13                                                               ` Tim Waugh
2011-03-14  9:39                                                             ` Olaf Meeuwissen
2011-03-14 20:47                                                               ` Till Kamppeter
2011-03-08 15:55                                           ` [Printing-architecture] " Tim Waugh
2011-02-25 13:03                                     ` Till Kamppeter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.