Thanks Antonello for having a look.

Antonello Cruz wrote:
The SMF service should work. However I wonder if it is really necessary
to run it on every boot. If not, the service should disable itself at
the end.
I did not know that this is possible in the service. Please tell me how. Or has it do to with the "duration" property in the manifest.xml which has the value transient?

When OpenOffice.org (OOo) is updated, then the service only needs to be restarted. I do not know if this works with a disabled service.
Additionally, any other package that installs bundled
extentions and have a similar post-install script should have ooo as a
dependency and restart the service (probably with the suspend_fmri
action).
Only OOo can have bundled extensions. So this is currently no worry :)

Are you sure you don't need the service restarted if it dumps core?
You mean the ignore_right property, correct? I am not sure if this would helpful, because what most of time would fail is OOo's unopkg binary, which is executed by the script. When the service restarts itself, then we could create a loop which constantly causes a crash.

The issue reported in 5742 should be fixed by now, with the exception of
a bit of aggressiveness towards manifests imported from unknown
locations.

Good to know.

Responding to your second replay. I don't know what the dependency
svc:/system/filesystem/local:default
is good for.

Initially I was thinking to trigger the service based on the existence of a particular file. But someone replied that this would not be reliable.

Joachim


Antonello


Joachim Lingner wrote:
Hi,

The current openoffice package in the IPS repository appear to come without dictionaries. The reason is that the package was created using the SRV4 packages, which can be obtained from here
http://download.openoffice.org

The SRV4 packages contain postinstall scripts which install the dictionaries in OpenOffice.org. Because these scripts are not supported by IPS there are no dictionaries in OpenOffice.org. However they can be downloaded at
http://extensions.services.openoffice.org/dictionary
and installed using OOo's extension manager.

I have created a SMF service which installs the dictionaries. The service was tested with OpenOffice.org DEV300m57 which is a development version of the future OOo 3.2. The current OOo developer build can be obtained at
http://download.openoffice.org/next/other.html

The files of the service can be obtained via FTP using anonymous login. Here are the details:

Server:
qa-upload.services.openoffice.org

Directory:
OSOL_Repository_integration_script

File:
OSOL_Repository_integration_script_CWS-jl133.tar

Here is the content of the README file which is also  in that tar file:



================================================================================
Installation information
================================================================================

In order to properly install the bundled extensions, such as dictionaries, it is
necessary that the files

installed
ooo_bundled_extensions.xml
svc-ooo_bundled_extensions

are part of the OpenOffice.org IPS package. They must be added to the package after all other files have been added. Those other files are the SVR4 packages
of OOo which can be imported by pkg (pkg import).
The files have to be uploaded this way:

pkgsend -s url_to_pkg_server add file installed mode=644 owner=root group=bin path=${EXTENSIONPATH}/installed restart_fmri=svc:/application/ooo_bundled_extensions:default pkgsend -s url_to_pkg_server add file svc-ooo_bundled_extensions mode=744 owner=root group=bin path=/lib/svc/method/svc-ooo_bundled_extensions pkgsend -s url_to_pkg_server add file ooo_bundled_extensions.xml mode=644 owner=root group=bin path=/var/svc/manifest/application/ooo_bundled_extensions.xml restart_fmri=svc:/system/manifest-import:default


---

${EXTENSIONPATH} must be replaced by the path to the folder containing the bundled extensions. This path changes with every major release of OOo because of
the version number which is part of a folder name. The
current value is:

EXTENSIONPATH=/opt/openoffice.org3/share/extension/install

The service was tested with OpenSolaris release 2009.6 and may not work with a
previous release.


================================================================================
What do these files do
================================================================================

The three files constitute a SMF service. When this service is started, then it
installes the bundled extensions which are contained in
/opt/openoffice.org3/share/extension/install. To install them, the service calls
"unopkg add --shared ..." with the appropriate arguments.

The service is started initially after the installation of
ooo_bundled_extensions.xml. At this time, all files of OOo, including the extensions, have been copied to their destination. The service calls unopkg on behalf of every extension and adds the path to that extension to the file 'installed'. The file 'installed' is used to remember what extensions have
already been installed with unopkg. This will prevent to reinstall those
extensions whenever the service is restarted.

When a new version of OOo becomes available, then the respective OOo package containes a new version of 'installed'. That is, it contains a version string, such as 3.2.0. The sole reason for that string is, to change the content of this file in every release. Otherwise IPS would not replace the installed version of
'installed' with the one contained in the package.

The update procedure of OOo will replace 'installed'. 'installed' is associated
with a restart_fmri of the service ooo_bundled_extensions. That is after
copying 'installed' the service will be restarted. It then installes all
extensions contained in /opt/openoffice.org3/share/extension/install, because the newly installed 'installed' file does not contain any entries yet, except
for the version string.


================================================================================
Known issues
================================================================================

If OOo, which contains this service, is uninstalled and later it is installed again, then the bundled extensions are not installed. That is, unopkg is not called to install them with OOo's Extensions Manager. The reasons is a bug in
OpenSolaris:
http://defect.opensolaris.org/bz/show_bug.cgi?id=5742

To work around this, one can call after uninstalling OOo

svccfg delete -f ooo_bundled_extensions
svccfg delete smf/manifest

--------------------------------------------------

It would be great if someone would be willing to test this and to create the IPS packages for OpenOffice.org.


Best Regards,

Joachim Lingner


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to