Deployment directories for scopes conflict with packaging

Bug #1274421 reported by Michi Henning
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-scopes-api
Fix Released
High
Michi Henning

Bug Description

Currently scopes need to be installed in a single directory that contains both the scope .ini file and the shared lib. Apparently packaging needs the library in one place /usr/lib/whatever??? and the .ini file in another place /usr/share/whatever???. And some scopes (click-packages) will be installed in /usr/.local/whatever???

Please comment on what the actual locations will be, so we can adjust the config accordingly.

Related branches

Revision history for this message
Michi Henning (michihenning) wrote :
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Ignoring multiarch issues, shared libraries need to be installed under /usr/lib/archname, probably under some subdirectory, say, unity-scopes. In CMake parlance this would mean ${CMAKE_INSTALL_LIBDIR}/unity-scopes.

As far as conf files go, should they go under share or etc? I'm guessing the former but don't really know. Current scopes install stuff to /usr/share/unity-scopes, but those seem to contain only Python modules.

Revision history for this message
James Henstridge (jamesh) wrote :

The primary rule is no platform dependent code in /usr/share. It would be acceptable to have both the scope library/executable and the .ini file together under /usr/lib, if that is preferable.

Revision history for this message
James Henstridge (jamesh) wrote :

We should only put the .ini files under /etc if we truely consider them to be configuration files as opposed to data files.

So I think they either belong under /usr/lib (if we consider them to be platform dependent configuration files), or /usr/share (if they are platform independent).

Michal Hruby (mhr3)
Changed in unity-scopes-api:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Michi Henning (michihenning)
Revision history for this message
Michi Henning (michihenning) wrote :

The config files are platform independent.

In /usr/share, we already have:

- unity
- unity8
- unity-greeter
- unity-lens-friends
- unity-scopes
- unity-webapps

I'm reluctant to install things into either unity or unity-scopes because there is stuff there already, and I think it could be really confusing to mix the old and the new files in the same hierarchy. So, how about /usr/share/unity-scopes-api as the root dir for the config files?

Revision history for this message
Michi Henning (michihenning) wrote :

Anyone know what the OEM directory is called? Would be nice to know.

Assuming that it's called, say, "OEM", I'm suggesting to have the exact same hierarchy that we have for everything else under there. So, if we use

/usr/share/unity-scopes-api/scopes/MyScope.ini

then, for the OEM, it would be

/OEM/usr/share/unity-scopes-api/scopes/TheirScope.ini

Comments?

Revision history for this message
Michal Hruby (mhr3) wrote :

> /OEM/usr/share/unity-scopes-api/scopes/TheirScope.ini

> Comments?

OEM-specifics live in /custom, IIRC the XDG_DATA_DIRS envvar is modified to include the OEM-specific data directories (where /usr/share/ is the default one)

Revision history for this message
Chris Wayne (cwayne) wrote :

Yes, we include /custom/xdg/data in XDG_DATA_DIRS, so from our point of view, it'd be best to have unity8 just look in XDG_DATA_DIRS instead of a hardcoded list of directories. This is a blocker from our point of view

Revision history for this message
Michi Henning (michihenning) wrote :

/custom is fine with me for the OEM dir.

I don't think looking in XDG_DATA_DIRS is all that great. There may be several of them. Which one would we use? Try all of them do search for OEM scopes? Also, the scope config will be architecture-specific, so we'll be looking in /lib for the config.

Can you comment on what exactly the "blocker" is? I don't think I'm seeing the full picture...

Revision history for this message
Chris Wayne (cwayne) wrote :

The blocker is that we don't install debs for custom images, so we can't put scopes in /usr/share, so without this, we can't have demo scopes on the MWC image, which is a blocker

Revision history for this message
Michi Henning (michihenning) wrote :

I want to give scopes a writeable data directory, for scopes that want to write cache files, or whatever.

The most sensible location would be somewhere under $HOME, I would think. (AppArmor can make sure that the scope can't write to locations outside its assigned directory.)

What path should we use for that? Any suggestions?

Changed in unity-scopes-api:
status: Triaged → In Progress
Michal Hruby (mhr3)
Changed in unity-scopes-api:
status: In Progress → Fix Released
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity-scopes-api/devel at revision 323, scheduled for release in unity-scopes-api, milestone Unknown

Changed in unity-scopes-api:
status: Fix Released → Fix Committed
Michal Hruby (mhr3)
Changed in unity-scopes-api:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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