Merge lp:~3v1n0/snappy-playpen/hello-unity-fixes into lp:snappy-playpen
| Status: | Merged |
|---|---|
| Approved by: | Michael Hall on 2016-05-17 |
| Approved revision: | 52 |
| Merged at revision: | 48 |
| Proposed branch: | lp:~3v1n0/snappy-playpen/hello-unity-fixes |
| Merge into: | lp:snappy-playpen |
| Diff against target: | 523 lines |
| To merge this branch: | bzr merge lp:~3v1n0/snappy-playpen/hello-unity-fixes |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Hall (community) | 2016-05-17 | Approve on 2016-05-17 | |
|
Review via email:
|
|||
Description of the Change
Fixed hello-unity, to properly build and run in snap environment.
Since the upstream code needs some patches, I've played a little with it including an example of "quilt" plugin, which allows to use quilt patches to fix upstream code (upstream fixes parially live at lp:~3v1n0/hello-unity/sandbox-support).
- 51. By Marco Trevisan (Treviño) on 2016-05-17
-
HelloUnity: use cached files and user data around
- 52. By Marco Trevisan (Treviño) on 2016-05-17
-
HelloUnity: use snap version to chose which data or cache path use
| Michael Hall (mhall119) wrote : | # |
| Michael Hall (mhall119) wrote : | # |
Even installing with --devmode running the app fails:
mhall@mhall-
Traceback (most recent call last):
File "/snap/
__import_
File "/snap/
self.
File "/snap/
raise ResolutionError("No script named %r" % script_name)
pkg_resources.
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Mhmhmh.... Wait, are you sure you installed this snap version? Because this should run /snap/hello-
I also had this problem, but also desktop files should actually run
/snap/
Which is a wrapper that eventually calls the script above
| Michael Hall (mhall119) wrote : | # |
I removed and rebuilt everything, installed with --devmode, still getting this:
mhall@mhall-
Traceback (most recent call last):
File "/snap/
__import_
File "/snap/
self.
File "/snap/
raise ResolutionError("No script named %r" % script_name)
pkg_resources.
| Jamie Strandboge (jdstrand) wrote : | # |
I get a different result. Note, I 'snap remove hello-unity' and then 'snap install ./hello-
Note I didn't install it with --devmode. When I run it I see:
Traceback (most recent call last):
File "/snap/
__boot()
File "/snap/
import os
ImportError: No module named os
and the following apparmor denials:
audit: type=1400 audit(146351378
audit: type=1400 audit(146351378
If I do:
$ grep -r 'jamie/bzr-pulls' ./*|grep -v pyc
I see a ton of absolute paths to my snap build directory rather then the snap install directory (/snap/
| Michael Hall (mhall119) wrote : | # |
My mistake, I messed up my bzr merge and that was causing all of the problems. I had to use --devmode, and amd also getting some apparmor denials,but the app runs and most of the Unity API use works too, approving
| Michael Hall (mhall119) wrote : | # |
Marco, can you propose these patches to the upstream project so I can merge them there?
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Michael, sure... Changes are already in lp:~3v1n0/hello-unity/sandbox-support (I planned to get these merged upstream too), but I also wanted to use this example to show how to patch upstream code.
However, we still need to include a patch (the one that changes the name of the .desktop file), so You could still merge it and update the downstream patches accordingly (remove the first two of the serie).

Built a snap using this, but got apparmor error when running it:
May 16 23:00:34 mhall-thinkpad kernel: [10792.749388] audit: type=1400 audit(146345763 4.502:103) : apparmor="DENIED" operation="open" profile= "snap.hello- unity.hello- unity" name="/ home/mhall/ projects/ Ubuntu/ snaps/snappy- playpen/ hello-unity/ stage/usr/ lib/python2. 7/os.py" pid=18146 comm="hello-unity" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000 4.502:104) : apparmor="DENIED" operation="open" profile= "snap.hello- unity.hello- unity" name="/ home/mhall/ projects/ Ubuntu/ snaps/snappy- playpen/ hello-unity/ stage/usr/ lib/python2. 7/os.pyc" pid=18146 comm="hello-unity" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
May 16 23:00:34 mhall-thinkpad kernel: [10792.749452] audit: type=1400 audit(146345763