Making a snap of an icon theme

William Hua william.hua at canonical.com
Tue May 17 14:44:24 UTC 2016


Hi,

There are a few hacks needed to get GSettings working properly in a snap, even when unconfined:

- Add dconf-gsettings-backend to stage-packages (this gets you libdconfsettings.so)

- Stage gschemas.compiled from the host machine. You can find it under
  /usr/share/glib-2.0/schemas/gschemas.compiled, just copy it using a plugin as in:
  https://github.com/elopio/snaps/blob/master/keepassx/snapcraft.yaml#L38 and make sure
  you commit the file to your repo (this gets you the GSettings schemas)

- Stage a one-line giomodule.cache file that points to the dconf-gsettings backend:
  https://github.com/elopio/snaps/commit/b8ae00ae66be8a05ef6590d5ca16c364fa01b5a2

- Make sure the binary runs with GIO_MODULE_DIR properly set to $SNAP/usr/lib/$ARCH/gio/modules:
  https://github.com/elopio/qt5conf/commit/98154248a4dca8352ac34f838998c6636130cf1c

There is a reference bug here: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1576296



> Hello,
> I'm working on packaging an icon theme, the ubuntukylin-icon-theme.
> I succeeded creating the package, but I have some problems with
> confinement, as
> I'm copying the theme to the .icons folder and then I would like to be able
> to
> set it with gsettings, but this does't work as I probably can't see the
> system gsettings.
> What can I do to improve the situation?
> 
> Error from dmesg:
> 
> [83350.103274] audit: type=1400 audit(1463422827.503:34798):
> apparmor="DENIED" operation="open" profile="/usr/bin/ubuntu-core-launcher"
> name="/home/.ecryptfs/fabio/.Private/" pid=1595 comm="ubuntu-core-lau"
> requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
> [83350.103355] audit: type=1400 audit(1463422827.503:34799):
> apparmor="DENIED" operation="open" profile="/usr/bin/ubuntu-core-launcher"
> name="/home/.ecryptfs/fabio/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWYcPLgdtb4bgkRq.5qpI91Jz.BUZ-Fw09Q.7fH7k09PzHt0mw7Qc.yQ6---/"
> pid=1595 comm="ubuntu-core-lau" requested_mask="wr" denied_mask="wr"
> fsuid=1000 ouid=1000
> [83350.103443] audit: type=1400 audit(1463422827.503:34800):
> apparmor="DENIED" operation="open" profile="/usr/bin/ubuntu-core-launcher"
> name="/home/.ecryptfs/fabio/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWYcPLgdtb4bgkRq.5qpI91Jz.BUZ-Fw09Q.7fH7k09PzHt0mw7Qc.yQ6---/ECRYPTFS_FNEK_ENCRYPTED.FXYcPLgdtb4bgkRq.5qpI91Jz.BUZ-Fw09Q.tHhd43KPdShEHBi1YYkKNM6qmM3BXXz8Ego0T5fm8A2-/"
> pid=1595 comm="ubuntu-core-lau" requested_mask="wr" denied_mask="wr"
> fsuid=1000 ouid=1000
> [83350.103534] audit: type=1400 audit(1463422827.503:34801):
> apparmor="DENIED" operation="open" profile="/usr/bin/ubuntu-core-launcher"
> name="/home/.ecryptfs/fabio/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWYcPLgdtb4bgkRq.5qpI91Jz.BUZ-Fw09Q.7fH7k09PzHt0mw7Qc.yQ6---/ECRYPTFS_FNEK_ENCRYPTED.FXYcPLgdtb4bgkRq.5qpI91Jz.BUZ-Fw09Q.tHhd43KPdShEHBi1YYkKNM6qmM3BXXz8Ego0T5fm8A2-/ECRYPTFS_FNEK_ENCRYPTED.FWYcPLgdtb4bgkRq.5qpI91Jz.BUZ-Fw09Q.J9Msqsfiu.XjDDtK10Di1k--/"
> pid=1595 comm="ubuntu-core-lau" requested_mask="wr" denied_mask="wr"
> fsuid=1000 ouid=1000
> [83350.464007] audit: type=1400 audit(1463422827.863:34802):
> apparmor="DENIED" operation="mkdir"
> profile="snap.ubuntukylin-icon-theme.enable"
> name="/home/fabio/.icons/ubuntukylin-icon-theme-snap/" pid=1595 comm="cp"
> requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
> 
> Snapcraft file: http://paste.ubuntu.com/16466423/
> 
> Cheers,
> Fabio Colella

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20160517/415009c4/attachment.pgp>


More information about the snappy-app-devel mailing list