[Feature Request] Allowing "media" type packages in Harbour

This is a Work-in-Progress/Draft and contents may change

The Harbour rules and validation scripts are currently tailored for “Applications” only, ensuring that they are well-contained, somewhat relocatable, have only supported dependencies etc.

This is an idea to allow, in addition to Applications, “Media” type packages as well.

For example:

  • Ambiences
  • Sound/Ringtone themes
  • Fonts (or maybe not, as a bad font can negatively affect the UI. Also, fonts can be configured per-user through the default fontconfig search paths)

In order to allow these kinds of packages, the following rules would have to be in place:

  • All naming, versioning etc. rules remain as-is.

    • possibly, the harbour- prefix requirement might be lifted or changed to ambience- or sounds- or media- but that is more or less cosmetic.
    • it may also be expanded to require harbour-ambience- or harbour-media- or so
    • introducing to such a new prefix may make validation easier (to distinguish from applications)
  • packages must not include any binary, QML, icon, or .desktop files (but see below)

  • packages may include files only in these locations:

    • /usr/share/ambience/$packagename
    • /usr/share/sounds/$packagename
    • filenames allowed are stereo.index, index.theme, *.wav, *.ogg, *.oga, mp3 for sounds (maybe: *.m4a, *.aac?). (Note that the FDO sound theme spec only mentions WAV and Ogg, but SFOS does use mp3 for some sounds.)
    • filetypes are .ambience, *. png, *.jpg
    • in addition, a single text file is allowed at /usr/share/$packagename/COPYRIGHT to record copyright and licensing information for included media
  • packages may not have any Requires, except on ambienced (because there may be a certain version necessary).

Open Points/challenges

Uninstallation:

Users should be able to uninstall such packages.

This is usually enabled using a .desktop file (and icon(s)). Because such “media” packages are not apps, them having a .desktop file just to be able to uninstall has disadvantages:

  • Icon Clutter in Launcher
  • needs special handling in Launcher as they are not apps

Perhaps the best way to uninstall these would be through the Settings app - either in the Apps list, or from the Sound or Ambience settings, or a dedicated secition in Settings.

Ambienced:

After un/installation of an ambience or sound theme, ambienced must be restarted.
Harbour rules do not allow %post scriplets, so this can not be ensured by the packager. Maybe a specialized mechanism is needed here. Or a very specific %post/postun line or other macro can be allowed in the .spec.

Maybe simply requiring a Reboot is acceptable, though there is currently no way to indicate this to a user.

9 Likes

What would be the purpose of a .desktop or permissions when there can be no binary or QML?

None, but in order to be able to uninstall, there currently must be a .desktop file. And a .desktop file, AFAIK, needs an Exec key. And something with an Exec key will cause the invoker to look for Sailjail config.

Please try to edit a .desktop file w/o devel-su.

So let’s say i install a dozen or two ringtones, ambiences and fonts - now i should have my app drawer twice as full as normal. No thanks. This just needs another page in the store listing all installed packages from there.

@hanswf
What does this have to do with anything discussed here?

1 Like

Yes this is a thing but IMO minor.

Maybe, yes. Or it could create a Launcher Folder automatically or so.
In any case not something I would specify/prescribe in this request.

If something like this is accepted it’s up to Jolla to design the UI side in Store and/or Settings. (Or they open-source both and I’ll do it heh.)

3 Likes

No, useless icons is not minor.

No thank you.

I completely agree - so just leave the parts related to that out if they are incomplete and inconsistent.

2 Likes

You’re right, I have removed these parts.

2 Likes