Hi Mikko,
2014-09-22 15:22 GMT+02:00 Ylinen, Mikko <[email protected]>: > Hi Baptiste, > > A few questions and a requests > > 1. what are the characteristics of a global app? > Global apps is a common apps , that means all users have access to them. in other words all user can use them. > E.g., should all pre-installed apps in the image be global? > Currently all preinstalled image are global, because all files are copied in /usr/apps and manifest file are copied in /usr/share/packages/ Currently,all rpm that install applications install them as Global. Indeed, The path /usr/apps are used to store Common/Global apps contents. The path /usr/share/package are used to stored applications manifests for Common applications Indeed ail_initdb parses all manifest file stored in /usr/share/packages to register applications in app_info.db The implementations in applications RPM"s that you mention permits to install and register applciatons for all users. 2. when is it recommended to per user installation? > Depend what is the goal of the applications, and the platform design. An app installed for a user is not avaible for others ones > In Tizen (IVI) we have a lot of application RPMs that either install a > .wgt web app or > update the AUL db in their %post script. > > What is the new recommendation to: > > In Tizen 3 There is 3 ways to install applications. By using -> pkgcmd tool : that request a backend exist for the kind of apps we want to install. -> Preinstall mechanism : copy the applications contents (including manifest) in a specific directories and run pkg_initdb tool. -> pkg_info tool: currently used in rpm. but personally I didn't recommend this tool Because the execution environment of this last tools determine the user whose the app will be installed. ie if a user is carol, so the app will be installed only for carol, if the user is tizenglobalapp the app will be available for all users. Pre install apps for a specific user implies to give correct permission to the files that compose the application, copy them in a correct directory (ie $HOME/.applications/manifest/ => TZ_USER_PACKAGES ) for the manifest application, and the exec path wroten in the manifest should point a binary owned by the user. And execute pkg_info as the correct user We are thinking about a new tool called pkg_initdb_user that permits to register all user specific apps by scanning TZ_USER_PACKAGES direstory . Pre install apps in /usr/apps with manifest file in /usr/share/package means the app is global apps. (permission should be readable for "other groups", and owned by tizenglobalapp to allow update of this file. (ie update or remove this preinstalled global applications). Smack rules to apply smack should be "*" for global app and "User" for specific user applications a) install a web app from a .wgt? > > Backend exist so, currently we can use pkgcmd tool in quiet mode (-q only) Preinstall web app implies to generate a manifest file with an exec path that correspond to a symbolic link to xwalk-laucher named with app-id of the application. Please remember xwalk-laucher as the same logic than wrt-launcher, so when xwalk-launcher is launch withtout args, it gets the app id to launch by retreiving the command line. b) install a native demo app? > > At this time ; there is no backend for native application The only way to install a native app is to preinstall them in global way. (use pkg_initdb call). I planned to update the wiki about the install mechanism in Tizen. after the IVI release. I hope this email help. I'm also avaible in IRC ##tizen-dev my usename is Bdurand. Don't hesitate to contact me. Thanks I feel they all should be global for now. However, I think it's important > to understand my question #1 > before doing that. > > -- Mikko > > > On Thu, Sep 18, 2014 at 9:16 PM, Baptiste Durand < > [email protected]> wrote: > >> Hello all, >> >> >> Since Today the Application Framework provides some news Core API. >> & a new way to install applications >> >> --------------------------------------------------------------------------------------------------------------------------------- >> CAPI Changes : >> >> So what News? >> Now in Tizen 3 we can install/uninstall applications for dedicated user >> or for all users. >> >> So the Tizen Database are duplicated. >> Each User has it proper database that references all applications >> installed for himself (only) stored in $HOME/.applications/dbspace >> >> The set Applications Databases are also used to register applications >> for all user (common applications ) also called Global database stored in >> /usr/dbspace >> >> >> In consequences, appid is not unique now. >> Indeed an application can be installed for all user and in a same time >> for a dedicated user. >> >> If a user makes a request to open an app (by using appid), the user's app >> are choosen even if an application with the same appid exists at Global >> level ( avaible for all users) >> >> So now only the couple of value (appid, uid) is unique. >> >> To include this, we has been needed to introduce new CAPI based on Tizen >> 2.X ones. >> >> All functions fixed by _usr_ with an user id in parameters is related to >> applications or packages Database (depending of CAPI used) of the user >> >> All functions with the same prototype of Tizen 2.X ones are related to >> Common/Systems Applications >> >> We also introduce a Global User concept this user is a fictive one. (In >> Code, we can see some reference to a GLOBAL_USER) >> it exist only for operating on Common Applications Databases. >> >> >> To give an example of what is explain before, we have in application >> information library and pakcage manager library. >> >> AIL : >> ail_error_e ail_filter_list_usr_appinfo_foreach(ail_filter_h filter, >> ail_list_appinfo_cb appinfo_func, void *user_data, uid_t uid); ail_error_e >> ail_filter_list_appinfo_foreach(ail_filter_h filter, ail_list_appinfo_cb >> appinfo_func, void *user_data); >> -> ail_filter_list_appinfo_foreach permits to apply a filter on Common >> applications only (related to common applications). >> >> -> ail_error_e ail_filter_list*_usr_*appinfo_foreach permits to apply >> a filter on the applications dedicated to a user (choosen in parameters). >> >> >> SLP-PKGMGR >> int pkgmgr_client_usr_install(pkgmgr_client *pc, const char *pkg_type, >> const char *descriptor_path, const char *pkg_path, const char >> *optional_file, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data, >> uid_t uid); int pkgmgr_client_install(pkgmgr_client *pc, const char >> *pkg_type, const char *descriptor_path, const char *pkg_path, const char >> *optional_file, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data, >> uid_t uid); >> pkgmgr_client_*usr*_install is used to install an application for a >> dedicated user >> >> >> pkgmgr_client_install is used to install an application for all users >> >> >> We decide to duplicated the CAPI to distinguish Global level to User's >> level. >> for two reasons; >> -> make integration change easier >> ->satisfy a Core API usage in a Core Application Context. (see diagram >> architecture overview) >> >> >> We do not consider : >> pkgmgr_client_install are equal to pkgmgr_client_*usr*_install( >> getuid()) >> because >> -> CAPI can be used ay System Level by daemon (and a daemon is often not >> associated to a regular user ) >> >> So we need to permits to manipulate database by offering two differents >> API (one for Global DB / 1 for user's ones). >> We consider that this concept to take the current user in account should >> be done at HIGH Level API (ie WEB API or Native API) (see diagram >> architecture overview) >> >> >> >> -------------------------------------------------------------------------------------------------------------------------------------- >> Pkgcmd new option / Backend for Widget Apps >> >> >> We add ability to install web apps through pkgmgr-server >> >> so now pkgcmd binary is able to manage applications by using package >> Manager CAPI >> >> we are going to add -G option that permits to install application for all >> users. (coming soon next week). >> >> >> >> ---------------------------------------------------------------------------------------------------------------------------------------- >> >> >> Please find in attachment the list of added CAPI >> >> *For your information :During The Linux Con at Dusseldorf Sabera Djelti >> will present a global overview of theses changes.* >> >> >> >> For additional informations : please take a look on the wiki >> https://wiki.tizen.org/wiki/Multi-user_Architecture >> https://wiki.tizen.org/wiki/Multi-user_AMD >> >> >> BR >> >> Baptiste and Sabera >> >> -- >> Baptiste DURAND >> Eurogiciel Vannes/FR >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> https://lists.tizen.org/listinfo/dev >> >> > -- Baptiste DURAND Eurogiciel Vannes/FR
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
