Comment 1 for bug 1197051

Revision history for this message
David Planella (dpm) wrote : Re: [Bug 1197051] [NEW] SDK applications should not use ~/.local/share/Qt Project for sqlite files

Thinking about how core apps make use of the LocalStorage QML plugin to
store settings, this bug might easily be solved in some of them when we
migrate to using the GSettings QML backend (lp:gsettings-qt) to store the
settings.

However, it will not cover all cases, as there are genuine use cases for
using a database (such as storing past calculations in the calculator app)

Cheers,
David.

On Tue, Jul 2, 2013 at 7:17 PM, Jamie Strandboge <email address hidden> wrote:

> Public bug reported:
>
> Ubuntu SDK applications store their sqlite data in locations like this:
> ~/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.ini
> ~/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.sqlite
>
> This results in AppArmor rules like the following:
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/" rw,
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/" rw,
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/" rw,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/" rw,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.ini{,.*}" rwk,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.sqlite" rwk,
>
> But these rules are too lenient and these paths need to be made
> application specific. Specifically: $XDG_DATA_DIR/<app id> where '<app
> id>' will ultimately be the reverse domain name with Click packages (see
> bug #1197037 for details on '<app id>').
>
> ** Affects: ubuntu-qtcreator-plugins
> Importance: Undecided
> Status: New
>
> ** Affects: apparmor-easyprof-ubuntu (Ubuntu)
> Importance: Undecided
> Status: New
>
>
> ** Tags: application-confinement
>
> ** Also affects: apparmor-easyprof-ubuntu (Ubuntu)
> Importance: Undecided
> Status: New
>
> ** Tags added: application-confinement
>
> ** Description changed:
>
> - Ubuntu SDK applications still their sqlite data in locations like this:
> + Ubuntu SDK applications store their sqlite data in locations like this:
> ~/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.ini
> ~/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.sqlite
>
> This results in AppArmor rules like the following:
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/" rw,
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/" rw,
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/"
> rw,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/" rw,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.ini{,.*}" rwk,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.sqlite" rwk,
>
> But these rules are too lenient and these paths need to be made
> application specific. Specifically: $XDG_DATA_DIR/<app id> where '<app
> id>' will ultimately be the reverse domain name with Click packages (see
> bug #1197037 for details on '<app id>').
>
> --
> You received this bug notification because you are subscribed to Ubuntu
> QtCreator Plugins.
> https://bugs.launchpad.net/bugs/1197051
>
> Title:
> SDK applications should not use ~/.local/share/Qt Project for sqlite
> files
>
> Status in Ubuntu QtCreator Plugins:
> New
> Status in “apparmor-easyprof-ubuntu” package in Ubuntu:
> New
>
> Bug description:
> Ubuntu SDK applications store their sqlite data in locations like this:
> ~/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.ini
> ~/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.sqlite
>
> This results in AppArmor rules like the following:
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/" rw,
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/" rw,
> owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/"
> rw,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/" rw,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.ini{,.*}" rwk,
> owner "@{HOME}/.local/share/Qt
> Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.sqlite" rwk,
>
> But these rules are too lenient and these paths need to be made
> application specific. Specifically: $XDG_DATA_DIR/<app id> where '<app
> id>' will ultimately be the reverse domain name with Click packages
> (see bug #1197037 for details on '<app id>').
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu-qtcreator-plugins/+bug/1197051/+subscriptions
>