clickpreload doesn't work on armhf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
click (Ubuntu) |
Fix Released
|
High
|
Colin Watson |
Bug Description
Hi,
TLDR; download-manager only allows downloads to be readable by phablet (of course root can too), so that clickpkg user can't read them.
Installing Click packages from appstore (click scope) in Ubuntu Touch images is unreliable.
I couldn't figure exactly which conditions trigger this, but "pkcon install-local some.click" works, and then installation from the scope works, however if I install straight from the scope it doens't work.
I've straced packagekit doing this and spotted some click traceback being written to a .crash which ends with:
Traceback:
Traceback (most recent call last):
File "/usr/bin/click", line 84, in <module>
sys.
File "/usr/bin/click", line 79, in main
mod.run(args)
File "/usr/lib/
installer.
File "/usr/lib/
env=env, **kwargs)
File "/usr/lib/
raise CalledProcessEr
subprocess.
Which suggests dpkg failing; which I found in the strace started as follows:
4519 execve(
then running dpkg-split:
4520 execve(
but failing to open the package:
4520 open("/
4520 write(2, "dpkg-split: error: unable to rea"..., 183) = 183
Immediately before, one can see:
4520 geteuid32() = 106
which was set when launching dpkg:
4519 setresgid32(107, 107, 107) = 0
4519 setresuid32(106, 106, 106) = 0
4519 getresuid32([106], [106], [106]) = 0
4519 getresgid32([107], [107], [107]) = 0
Indeed, click install had switched to the clickpkg user:
clickpkg:
So the problem is that .clicks may only be read by phablet user or root, but not by clickpkg.
Cheers,
Related branches
- Colin Watson: Approve
- Ubuntu CI managed package branches: Pending requested
-
Diff: 485 lines (+269/-70)11 files modifiedREADME (+1/-0)
click/build.py (+10/-22)
click/framework.py (+138/-0)
click/install.py (+8/-28)
click/paths.py.in (+1/-0)
click/tests/helpers.py (+29/-0)
click/tests/test_build.py (+39/-5)
click/tests/test_install.py (+2/-4)
debian/changelog (+8/-0)
doc/file-format.rst (+1/-2)
doc/index.rst (+32/-9)
tags: | added: patch |
Moving this to click as it should be opening the .click before changing UID and then passing it to subprocesses.