Hi - having had some discussions offline with Shawn and Brock about this, I'd like to get started and here is what I'm proposing:

I will put in place the mime type support for packagemanager, using the API suggested by Shawn with just a wrapper implementation consuming the basic config file used in the prototype. As soon as the API is available I can swap it in and start using MimeType files with the JSON layout Shawn has proposed. I will maintain this is a separate workspace and will only check it in when we have the new API in place. Anyone interested can grab the webrev in progress.

Suggested Mimetype:
----------------------------------
To cover both authority and package installs:
Mimetype: application/vnd.opensolaris.pkg-info
Suffix: .p5i

MimeType File Needs to Contain:
------------------------------------------------------
authority_name: optional
origin_urls: one or more required.
pkg_names: list of package names to install from this authority
Format handled will be in old config style initially, until new API is available which consumes JSON based files.

The assumption is that the authority info can be obtained from the authority/0 query, so authors of the MimeType files just have to put in the origin_url and pkg_names to the MimeType file.

Packagemanager:
------------------------------
Packagemanager launched with a -i <mimetype file path> will use the following API to get the information it needs to display a WebInstall Dialog to the user.

/api_wrapper.get_mimetype_info(<path to mimetype file|origin_url>) /- returns tuple of AuthorityInfo object [1] and optional list of packages to install.

Note: The wrapper will just get the Authority Name and Origin_URL, Scheme from the file. The real API will will use the authority/0 query to fetch all the required information to create the AuthorityInfo information dynamically. This should be opaque to us.

Note: The list of packages returned needs to have been setup so /api.plan_install() /can work with them: - If authority in file is the default authority the package list entries just need to be, <pkg_name> - If authority in file is NOT the default authority the package list entries need to be, pkg:://<authority_name>/<pkg_name>

- The AuthorityInfo object as well as all the authority fields already discussed [1] should contain a status field to indicate if its registered or not. If it is not then this will be passed to:

/api_wrapper.set_authority(AuthorityInfo)

/Workflow for the user will be [2]:
------------------------------------------------------
xDesign is working on preliminary designs, but in essence I think it will go like this:
- Click on Mimetype web link in browser
- Packagemanager is launched in WebInstall mode, so only a simple WebInstall dialog is displayed to the user not the full PM - WebInstall Dialog, lists out what is about to happen, if a new Authority needs registered and what if any packages are about to be installed. Click Cancel or Proceed. - On Proceed, if new Authority required, popup New Authority Dialog, which allows user to specify Authority name (though one could be suggested from info in AuthorityInfo file) and SSL key and cert if required. After this completes launch Install dialog to install packages. - On completion, status of WebInstall dialog is updated and user clicks Close.

Workflow for Web Server Admin
--------------------------------------------------------
- Ensure mime type registered on the server
- Post pkg mimetype files as needed on the server, containing just origin_url and optional list of packages to install.


[1] http://defect.opensolaris.org/bz/show_bug.cgi?id=5871
[2] http://defect.opensolaris.org/bz/show_bug.cgi?id=6352
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to