Can't manually install clicks "Signature verification error" since #205

Bug #1360582 reported by Alan Pope 🍺🐧🐱 🦄
70
This bug affects 14 people
Affects Status Importance Assigned to Milestone
PackageKit
Confirmed
Medium
click (Ubuntu)
Fix Released
High
Michael Vogt
phablet-tools (Ubuntu)
Fix Released
High
Unassigned
qtcreator-plugin-ubuntu (Ubuntu)
Fix Released
High
Michael Vogt

Bug Description

See mailing list thread at https://lists.launchpad.net/ubuntu-phone/msg09607.html

Since image #205 I can't install click packages using click-buddy & pkcon install-local. Changed click-buddy to use "adb $ADBOPTS shell click install --user=$DEVICE_USER --allow-unauthenticated /tmp/$click" which worked for me, but dunno if that's the "right" thing to do.

alan@deep-thought:~/phablet/code/coreapps⟫ adb push com.ubuntu.music_1.3.597_all.click /tmp
2560 KB/s (401406 bytes in 0.153s)

alan@deep-thought:~/phablet/code/coreapps⟫ phablet-shell
start: Job is already running: ssh
/home/alan/.ssh/known_hosts updated.
Original contents retained as /home/alan/.ssh/known_hosts.old
9 KB/s (399 bytes in 0.040s)
Warning: Permanently added '[localhost]:2222' (RSA) to the list of known hosts.
Welcome to Ubuntu Utopic Unicorn (development branch) (GNU/Linux 3.4.0-5-mako armv7l)

 * Documentation: https://help.ubuntu.com/
Last login: Fri Aug 22 23:53:19 2014 from localhost.localdomain
phablet@ubuntu-phablet:~$ pkcon install-local /tmp/com.ubuntu.music_1.3.597_all.click
Installing files [=========================]
Finished [=========================]
Installing files [=========================]
Waiting for authentication [=========================]
Starting [=========================]
Finished [=========================]
Fatal error: /tmp/com.ubuntu.music_1.3.597_all.click failed to install.
Cannot install /tmp/com.ubuntu.music_1.3.597_all.click: Signature verification error: debsig: Origin Signature check failed. This deb might not be signed.

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phablet-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1360582] [NEW] Can't manually install clicks "Signatureverification error" since #205

On sábado 23 de agosto de 2014 07h'33:59 ART, Alan Pope ㋛ wrote:
> Public bug reported:
>
> See mailing list thread at https://lists.launchpad.net/ubuntu-
> phone/msg09607.html
>
> Since image #205 I can't install click packages using click-buddy &
> pkcon install-local. Changed click-buddy to use "adb $ADBOPTS shell
> click install --user=$DEVICE_USER --allow-unauthenticated /tmp/$click"
> which worked for me, but dunno if that's the "right" thing to do.

Now that packages are signed by the store and click landed, this may be the
only way to side load.

> alan@deep-thought:~/phablet/code/coreapps⟫ adb push
> com.ubuntu.music_1.3.597_all.click /tmp
> 2560 KB/s (401406 bytes in 0.153s)
>
> alan@deep-thought:~/phablet/code/coreapps⟫ phablet-shell
> start: Job is already running: ssh
> /home/alan/.ssh/known_hosts updated.
> Original contents retained as /home/alan/.ssh/known_hosts.old
> 9 KB/s (399 bytes in 0.040s)
> Warning: Permanently added '[localhost]:2222' (RSA) to the list
> of known hosts.
> Welcome to Ubuntu Utopic Unicorn (development branch)
> (GNU/Linux 3.4.0-5-mako armv7l)
>
> * Documentation: https://help.ubuntu.com/
> Last login: Fri Aug 22 23:53:19 2014 from localhost.localdomain
> phablet@ubuntu-phablet:~$ pkcon install-local
> /tmp/com.ubuntu.music_1.3.597_all.click
> Installing files [=========================]
> Finished [=========================]
> Installing files [=========================]
> Waiting for authentication [=========================]
> Starting [=========================]
> Finished [=========================]
> Fatal error: /tmp/com.ubuntu.music_1.3.597_all.click failed to install.
> Cannot install /tmp/com.ubuntu.music_1.3.597_all.click:
> Signature verification error: debsig: Origin Signature check
> failed. This deb might not be signed.
>
> ** Affects: phablet-tools (Ubuntu)
> Importance: Undecided
> Status: New
>

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

This bug also breaks the SDK (running application on the phone from QtCreator),
since we use pkcon-local to install click packages. Our app launcher script needs to run as phablet user,
so we have no way of running "click install --allow-unauthenticated".

Revision history for this message
Alexander Sack (asac) wrote :

I tested on our rtm image r6; seems I can still install apps from store, which means we could backout the click change that introduced the signature checking.

tags: added: lt-category-noissue lt-date-20140825 lt-prio-medium
tags: added: lt-blocker lt-prio-high
removed: lt-prio-medium
Revision history for this message
Colin Watson (cjwatson) wrote :

I think the correct fix is as follows:

 * PackageKit has a transaction flag on the InstallFiles method for whether it's allowed to install unsigned files. We should certainly honour that, and return one of the values accepted by pk_backend_job_error_code_is_need_untrusted, then I believe that pkcon will fall back to trying the transaction in allow-unsigned mode.
 * We need to figure out how to allow untrusted installations via pkcon from the command line but not from the scope. I think it may be possible to do something with PolicyKit here. Sadly the scope uses InstallFiles rather than InstallPackages, or else it would be relatively trivial. I haven't had a chance to figure this out in detail, but note that click/pk-plugin/pk-plugin-click.c:pk_plugin_transaction_get_action accepts the "org.freedesktop.packagekit.package-install-untrusted" action.

If you really need to revert anything for now, then please don't revert the whole thing. Rather, just revert r499 from lp:click/devel (that is, reinstate r497). That way we'll keep the signing framework in general, packages that are signed with an invalid signature will still be rejected, and we'll have less work to put things back later.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in click (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Colin for your input on this.

I looked into this and attached is a patch to the click plugin that implements setting the PK_ERROR_ENUM_MISSING_GPG_SIGNATURE, and honoring PK_TRANSACTION_FLAG_ENUM_ONLY_TRUSTED. However this will not work for us as it requires the user to answer a interactive question which seems to be inelegant.

The alternative approach would be to add code to pkcon to honor either a environment variable or a commandline swtich and pass that directly in the task to avoid the interactive prompt. I will work on this next and attach code for that.

Revision history for this message
Alexander Sack (asac) wrote :

will SDK work without further changes with the patch by mvo or do we need to coordinate some landing?

Revision history for this message
Michael Vogt (mvo) wrote :

Hi,

this is doing it in a different way than my previous patch that does not require a interactive answer during install. It does require however that the patch goes to the packagekit upstream people.

This needs the lp:~mvo/click/lp1360582-honor-enum-only-trusted/ branch too.

Revision history for this message
In , Michael Vogt (mvo) wrote :

Created attachment 105257
add a new --allow-unauthenticated option to pkcon

In order to install packages without a signature (e.g. to test locally build projects) it would be nice to have a way to tell packagekit in advance that its ok to install a package without authentication (i.e. avoid the interactive question during the task execution).

The use case is a SDK that can build a test package from your project and install it into a emulator to do a full end-to-end test of the project.

Attached is a patch that implements a pkcon --allow-unauthenticated option that clear the PK_TRANSACTION_FLAG_ENUM_ONLY_TRUSTED flag when this option is used.

Feedback welcome! If that looks acceptable I'm happy to do the man-page addition as well.

Thanks,
 Michael

tags: added: patch
Changed in click:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

@alexander: we definitely need to coordinate the landing. For a hotfix I created lp:~mvo/click/lp1360582-hotfix that implements Colins suggestion in #5.

Michael Vogt (mvo)
affects: click → packagekit
Revision history for this message
Michael Vogt (mvo) wrote :

The packagekit patch has landed upstream and I pushed it into utopic now. Next step is that the SDK need to run "pkcon --allow-untrusted" when it installs the locally build click. Plus it needs to add a versionized dependency to packagekit-tools (>= 0.8.17-4ubuntu2) to ensure the commandline option is available. Then we can land the click change in lp:~mvo/click/lp1360582-honor-enum-only-trusted which will enable the authentication checks again.

Colin Watson (cjwatson)
Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Michael Vogt (mvo)
Changed in click (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtcreator-plugin-ubuntu - 3.1.1+14.10.20140908-0ubuntu1

---------------
qtcreator-plugin-ubuntu (3.1.1+14.10.20140908-0ubuntu1) utopic; urgency=low

  [ Michael Vogt ]
  * Run pkcon with --allow-untrusted (LP: #1360582). (LP: #1360582)
 -- Ubuntu daily release <email address hidden> Mon, 08 Sep 2014 09:47:27 +0000

Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.32.1

---------------
click (0.4.32.1) utopic; urgency=low

  [ Michael Vogt ]
  * fix autopkgtest failure found in 0.4.32
 -- Ubuntu daily release <email address hidden> Tue, 09 Sep 2014 10:02:00 +0000

Changed in click (Ubuntu):
status: In Progress → Fix Released
Michael Vogt (mvo)
Changed in phablet-tools (Ubuntu):
status: Confirmed → Fix Committed
importance: Undecided → High
Revision history for this message
Colin Watson (cjwatson) wrote :

The last piece of this was fixed a couple of days ago:

phablet-tools (1.1+14.10.20140909-0ubuntu1) utopic; urgency=low

  [ Michael Vogt ]
  * click-buddy: adding --allow-untrusted to the pkcon install-local
    call.

 -- Ubuntu daily release <email address hidden> Tue, 09 Sep 2014 20:43:43 +0000

Changed in phablet-tools (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Inoe (inoe-oke) wrote :

This issue is still occuring in my system with:
Ubuntu 14.04 LTS (upgraded from 12.04 LTS)
qtcreator-plugin-ubuntu 3.1.1+14.10.20141029-0ubuntu1~0trusty3
click 0.4.33.1
Ubuntu image version 296

Revision history for this message
Marco Graziotti (graziottimarco) wrote :

Same problem for me:

phablet@ubuntu-phablet:~/Downloads$ pkcon install-local provissima.username_0.1_all.click
Installing files [=========================]
Finished [=========================]
Installing files [=========================]
Waiting for authentication [=========================]
Starting [=========================]
Finished [=========================]
Fatal error: /home/phablet/Downloads/provissima.username_0.1_all.click failed to install.
Cannot install /home/phablet/Downloads/provissima.username_0.1_all.click: Signature verification error: debsig: Origin Signature check failed. This deb might not be signed.

There's a fix for this bug?

Thank you

Revision history for this message
Marco Graziotti (graziottimarco) wrote :

I solved adding option "--allow-untrusted":

pkcon --allow-untrusted install-local provissima.username_0.1_all.click

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.