sailfishos / sdk-harbour-rpmvalidator

Jolla Harbour intake RPM validator tool
GNU General Public License v2.0
17 stars 18 forks source link

Check where app loads plugins from, don't check the import statements *text* #32

Closed amarchen closed 9 years ago

amarchen commented 10 years ago

At the moment harbour requires my QML files to import everything via import harbour.mycoolapp.org.nemo.whatevernemopluginibundlein

That is not good enough as it:

  1. Forces you to modify the original plugin. At least its QML dir, also there can be some ASSERTs and checks that verify the plugin name (I've seen at least two nemo plugins checking it with ASSERTs)
  2. Prevents me from having QMLs for different platforms in one package

Check that app uses bundled-in libs/plugins only should probably be performed. However, it should be checked not by analysing QML text (easy to check, but checks wrong stuff), but by analyzing what app is actually loading (e.g. via strace tool).

RPM checker's warning could still be helpful not to forget to pay attention to it, but it shouldn't fail the validation.

thp commented 10 years ago

The problem is if you ship the Nemo plugin unchanged, it will conflict (for your app) with the system-wide installation of the plugin. The real fix IMHO is that we simply stabilize the API of the nemo plugins you'd like to use and then whitelist them in the rpmvalidator, so you don't even have to ship Nemo plugins with your application, but can use the system-wide installed ones (but the prerequisite of that is, as said, that we stabilize the API and commit to keep it working for third party apps).

Can you post a list of Nemo QML Plugins that you are currently using this way here? This might help us better understand what plugins need most attention, and maybe for some of them allows us to schedule API checks / cleanups of the plugin and then whitelisting in rpmvalidator.

amarchen commented 10 years ago

it shouldn't conflict if RPATH specifically prioritizes libs from in-app. Unless I am missing something it seems to work for me (I can see via strace that exactly bundled-in plugins are loaded). As for plugins so far I use nemobothumbnailer and nemomobile.policy (for resources in Flashlight). That is my personal use only though. Not sure how popular these are among the others.

fk-lx commented 10 years ago

I've been using nemoqmldbus plugin. I would say that access for easily calling dbus methods from qml is something quite important and not having to put the plugin packaged with the app would be appreciated.

amarchen commented 10 years ago

@fk-lx that is true, however:

  1. Freezing DBus interface is virtually the same as freezing API, isn't it? So you'll need to wait until plugin is allowed for use even without DBus anyway :) That is unless DBus interface is somehow treated as completely different and could be fixed earlier
  2. There still will be many cases when embedding exactly a plugin will be needed. Think about Qt modules not ever done for nemo (such as graphical effects)
d0b3rm4n commented 9 years ago

I close this, rpmvalidator as the names says, validates the RPM and not what happens during runtime. If there is a need for a tool which checks the Harbour apps during runtime, then this will most likely be in it's own git repo and not be part of rpm-validator.