[Bug 1134320] [NEW] Need to install unsigned packages with aptdamon's PackageKit emulation
Till Kamppeter
1134320 at bugs.launchpad.net
Wed Feb 27 13:08:11 UTC 2013
Public bug reported:
Hi,
for the automatic download of printer drivers on OpenPrinting we use
signed packages only for manufacturer-supplied packages with binary
executables. Pure PPD packages generated from PostScript printer PPDs in
foomatic-db and hosted on OpenPrinting are not signed.
The signed packages auto-install without any problems using
system-config-printer or the GNOME printer tool which uses
system-config-printer's D-Bus backend. The unsigned packages installed
also for a long time. Only recently they do not install any more and
this is due to changes in aptdaemon or its PackageKit-emulating interface.
To reproduce I have run the appropriate calls in Python's interactive
mode getting this:
----------
till at till:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, PackageKitGlib
>>> pk = PackageKitGlib.Client()
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE, ["cups"], None,
lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'cups;1.6.1-1;amd64;'
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE,
["openprinting-ppds-postscript-samsung"], None, lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'openprinting-ppds-postscript-samsung;20130226-1lsb3.2;all;printdriver'
>>> pk.install_packages(True,
['openprinting-ppds-postscript-samsung;20130226-1lsb3.2;all;printdriver'],
None, lambda p, t, d: True, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: openprinting-ppds-postscript-samsung
>>> pk.install_packages(True,
['openprinting-ppds-postscript-samsung;20130226-1lsb3.2;all;'], None,
lambda p, t, d: True, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: openprinting-ppds-postscript-samsung
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE,
["openprinting-splix"], None, lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'openprinting-splix;2.0.0-2lsb3.2;amd64;printdriver'
>>> pk.install_packages(True,
['openprinting-splix;2.0.0-2lsb3.2;amd64;printdriver'], None, lambda p,
t, d: True, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: openprinting-splix
>>> quit()
----------
And here is a session of a successful installation of a signed package:
----------
till at till:~/ubuntu/cups/quantal/cups-1.6.1$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, PackageKitGlib
>>> pk = PackageKitGlib.Client()
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE,
["epson-inkjet-printer-escpr"], None, lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'epson-inkjet-printer-escpr;1.2.2-1lsb3.2;amd64;printdriver'
>>> pk.install_packages(True,
['epson-inkjet-printer-escpr;1.2.2-1lsb3.2;amd64;printdriver'], None,
lambda p, t, d: True, None)
/usr/lib/python2.7/dist-packages/gi/types.py:47: Warning:
g_variant_get_boolean: assertion `g_variant_is_of_type (value,
G_VARIANT_TYPE_BOOLEAN)' failed
return info.invoke(*args, **kwargs)
/usr/lib/python2.7/dist-packages/gi/types.py:47: Warning:
g_variant_get_uint32: assertion `g_variant_is_of_type (value,
G_VARIANT_TYPE_UINT32)' failed
return info.invoke(*args, **kwargs)
<Results object at 0x2152730 (PkResults at 0x2187210)>
>>> quit()
----------
Note that all above-mentioned packages install with "apt-get install
...", requiring confirmation if they are unsigned. The package's
repositories got correctly added to the apt package sources by
system-config-printer. Problem is only the actual installation of the
unsigned packages.
The possibility to install unsigned packages is needed for installing
these PPD packages and system-config-printer installs only these
unsigned (architecture: all), for packages containing binaries
(architecture: i386, amd64, ...) it requires a signature.
Is there a special parameter which I can add to the call to allow
installation of unsigned packages? Or can you provide a patch to
aptdaemon to allow unsigned package installation?
For testing in the real environment I attach my CUPS test backend. Copy
it to /usr/lib/cups/backend, make it executable for all, and start
system-config-printer. Then click the button to add a new printer. The
"EPSON WF-7520" initiates the download of a signed driver package from
Epson, which works correctly, whereas the "Samsung CLX-6250" or the
Ricoh printers want to install unsigned PPD packages which fail, not
even asking for the password.
Thanks in advance.
Till
** Affects: aptdaemon (Ubuntu)
Importance: Critical
Assignee: Sebastian Heinlein (glatzor)
Status: New
** Attachment added: "testbackend"
https://bugs.launchpad.net/bugs/1134320/+attachment/3549543/+files/testbackend
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to aptdaemon in Ubuntu.
https://bugs.launchpad.net/bugs/1134320
Title:
Need to install unsigned packages with aptdamon's PackageKit emulation
Status in “aptdaemon” package in Ubuntu:
New
Bug description:
Hi,
for the automatic download of printer drivers on OpenPrinting we use
signed packages only for manufacturer-supplied packages with binary
executables. Pure PPD packages generated from PostScript printer PPDs in
foomatic-db and hosted on OpenPrinting are not signed.
The signed packages auto-install without any problems using
system-config-printer or the GNOME printer tool which uses
system-config-printer's D-Bus backend. The unsigned packages installed
also for a long time. Only recently they do not install any more and
this is due to changes in aptdaemon or its PackageKit-emulating interface.
To reproduce I have run the appropriate calls in Python's interactive
mode getting this:
----------
till at till:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, PackageKitGlib
>>> pk = PackageKitGlib.Client()
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE, ["cups"], None,
lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'cups;1.6.1-1;amd64;'
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE,
["openprinting-ppds-postscript-samsung"], None, lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'openprinting-ppds-postscript-samsung;20130226-1lsb3.2;all;printdriver'
>>> pk.install_packages(True,
['openprinting-ppds-postscript-samsung;20130226-1lsb3.2;all;printdriver'],
None, lambda p, t, d: True, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: openprinting-ppds-postscript-samsung
>>> pk.install_packages(True,
['openprinting-ppds-postscript-samsung;20130226-1lsb3.2;all;'], None,
lambda p, t, d: True, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: openprinting-ppds-postscript-samsung
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE,
["openprinting-splix"], None, lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'openprinting-splix;2.0.0-2lsb3.2;amd64;printdriver'
>>> pk.install_packages(True,
['openprinting-splix;2.0.0-2lsb3.2;amd64;printdriver'], None, lambda p,
t, d: True, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: openprinting-splix
>>> quit()
----------
And here is a session of a successful installation of a signed
package:
----------
till at till:~/ubuntu/cups/quantal/cups-1.6.1$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, PackageKitGlib
>>> pk = PackageKitGlib.Client()
>>> res = pk.resolve(PackageKitGlib.FilterEnum.NONE,
["epson-inkjet-printer-escpr"], None, lambda p, t, d: True, None)
>>> package_ids = res.get_package_array()
>>> package_id = package_ids[0].get_id()
>>> package_id
'epson-inkjet-printer-escpr;1.2.2-1lsb3.2;amd64;printdriver'
>>> pk.install_packages(True,
['epson-inkjet-printer-escpr;1.2.2-1lsb3.2;amd64;printdriver'], None,
lambda p, t, d: True, None)
/usr/lib/python2.7/dist-packages/gi/types.py:47: Warning:
g_variant_get_boolean: assertion `g_variant_is_of_type (value,
G_VARIANT_TYPE_BOOLEAN)' failed
return info.invoke(*args, **kwargs)
/usr/lib/python2.7/dist-packages/gi/types.py:47: Warning:
g_variant_get_uint32: assertion `g_variant_is_of_type (value,
G_VARIANT_TYPE_UINT32)' failed
return info.invoke(*args, **kwargs)
<Results object at 0x2152730 (PkResults at 0x2187210)>
>>> quit()
----------
Note that all above-mentioned packages install with "apt-get install
...", requiring confirmation if they are unsigned. The package's
repositories got correctly added to the apt package sources by
system-config-printer. Problem is only the actual installation of the
unsigned packages.
The possibility to install unsigned packages is needed for installing
these PPD packages and system-config-printer installs only these
unsigned (architecture: all), for packages containing binaries
(architecture: i386, amd64, ...) it requires a signature.
Is there a special parameter which I can add to the call to allow
installation of unsigned packages? Or can you provide a patch to
aptdaemon to allow unsigned package installation?
For testing in the real environment I attach my CUPS test backend. Copy
it to /usr/lib/cups/backend, make it executable for all, and start
system-config-printer. Then click the button to add a new printer. The
"EPSON WF-7520" initiates the download of a signed driver package from
Epson, which works correctly, whereas the "Samsung CLX-6250" or the
Ricoh printers want to install unsigned PPD packages which fail, not
even asking for the password.
Thanks in advance.
Till
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1134320/+subscriptions
More information about the foundations-bugs
mailing list