Issue 120359 - ScriptProviderForooRexx.oxt cannot be successfully installed with unopkg on MacOSX 3.4.0, 3.4.1
Summary: ScriptProviderForooRexx.oxt cannot be successfully installed with unopkg on M...
Alias: None
Product: Installation
Classification: Application
Component: code (show other issues)
Version: 3.4.0
Hardware: All Mac OS X, all
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2012-07-24 18:07 UTC by rony
Modified: 2014-02-18 15:23 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

AOO extension (script provider for the ooRexx language) (323.03 KB, application/octet-stream)
2012-12-03 16:51 UTC, rony
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description rony 2012-07-24 18:07:10 UTC
Report copied from the email on the developer list. 

Problem exists in the rc of MacOSX (en-US), r1364591 AOO 3.4.1, as of 2012-07-17, as well, hence filing a bug!

In the case the Java code for interfacing ooRexx with AOO is relevant, here a link to the source:

- jar with sources: <>

- individual Java source files starting at: <>

-------- Original Message --------
Subject: 	MacOSX: problems deploying an extension in shared mode
Date: 	Sun, 22 Jul 2012 14:07:28 +0200
From: 	Rony G. Flatscher (Apache) <>

In the context of creating a new version of BSF4ooRexx for MacOSX as well
the automatic installation of an oxt-extension to AOO 3.4.0 to add ooRexx as a macro language
directly to AOO, there are errors with the MacOSX version.

If you download the package from the above link you'll get ooRexx and BSF4ooRexx for MacOSX in
32-Bit (as OOo is still 32-bit on MacOSX) installed and both ooRexx and BSF4ooRexx (a Rexx function
package camouflaging Java as the dynamically typed ooRexx) are operational.

Unfortunately, the OOo extension named "ScriptProviderForooRexx.oxt" cannot be added to the MacOSX
AOO 3.4 installation using "unopkg"! Here a few infos to the locations and the scripts that are run
as sudo with the error message:

    wu114123:sources rony$ *ls -al /Applications/**
    lrwxr-xr-x@ 1 rony  admin     10 Apr 19 08:28 /Applications/ -> unopkg.bin
    -r-xr-xr-x@ 1 rony  admin  13568 Apr 19 08:28 /Applications/

    wu114123:sources rony$ *ls -al /System/Library/Frameworks/BSF4ooRexx.framework/Libraries/ScriptProviderForooRexx.oxt*
    -rwxrwxrwx  1 root  wheel  330778 Jun 15 17:24 /System/Library/Frameworks/BSF4ooRexx.framework/Libraries/ScriptProviderForooRexx.oxt

    wu114123:sources rony$ *sudo /Applications/ add --shared /System/Library/Frameworks/BSF4ooRexx.framework/Libraries/ScriptProviderForooRexx.oxt*

    *ERROR: Error binding package:$UNO_SHARED_PACKAGES_CACHE/uno_packages/Qpgmug_/ScriptProviderForooRexx.oxt*
           Cause: an error occured during file opening

    unopkg failed.

There is no directory named "Qpgmug_" in the shared cache directory; not sure why.


Trying to do the same from AOO's "Tools -> Extension Manager" is not successful either, if intending
to install for "All users" with the scarce error message "an error occured during file opening".

However adding this extension via AOO's "Tools -> Extension Manager" for "Only for me" works o.k.!
Restarting AOO, and the extension is available and operational allowing ooRexx to be used as a macro

    Using the user extension has another irregularity: if using for the first time in a totally
    fresh AOO session "Tools -> Macros -> Run Macro" and then executing any ooRexx macro will yield
    an error ("unable to load language"). However, if first doing a "Tools -> Macros -> Organize
    Macros -> ooRexx" and editing any ooRexx macro and running it via the edit window menu, ooRexx
    can be later found via "Tools -> Macros -> Run Macro" as well.

[Using the oxt-extension on Windows and Linux with AOO, OOo, LO works in shared mode, and AFAIK
there are no anomalities that I know of.]

Any ideas, what might be wrong, what I could do?
[To duplicate: just install the MacOSX package and then run the above commands from a command line
to see for yourself.]

TIA for any hints, ideas and suggestions,

Comment 1 Andre 2012-07-26 12:38:21 UTC
One possible reason for this problem might be that in order to install an extensions shared, you need superuser/admin access rights.  This is currently not supported by AOO outside the installer.  I am more surprised that it works on Windows and Linux than that it does not work on MacOSX.
Comment 2 Andre 2012-07-26 12:40:33 UTC
See bug 119272 for another representation of this kind of problem.
Comment 3 rony 2012-07-26 13:53:41 UTC
Andre, thank you for your feedback!

However, the postflight script runs unopkg via sudo, such that all rights should be available to unopkg to create any directory or copy any files. The installation in addition adds ooRexx sample scripts to the shared AOO locations successfully.

Running the unopkg command with sudo from the command line as reported, does not work either.

I am pretty sure, that in the past (OOo 3.2?) the installation as a shared extension worked on MacOSX.


Ad Linux: here running unopkg via sudo works.
Ad Windows: here running elevated works.


If there is anything else I could provide, please let me know. On the MacOSX I am using the Iceberg installer, if that makes a difference (it should not as the postflight script runs unopkg explicitly via sudo).
Comment 4 rony 2012-07-26 14:05:18 UTC
Ah, forgot to point out: this installation is carried out under the control of the BSF4ooRexx Iceberg installer. At the point when unopkg gets invoked to install the oxt as a shared extension, the credentials are those of sudo such that all rights should be available to unopkg to do whatever it needs to do.
Comment 5 rony 2012-12-03 16:51:12 UTC
Created attachment 79989 [details]
AOO extension (script provider for the ooRexx language)

This extension can only be installed in user mode on a MacOSX, but not in "shared" mode, even if running unopkg as superuser.
Comment 6 rony 2012-12-03 16:53:00 UTC
At ApacheCon Europe it has turned out that the extension in question can be successfully installed for a user.

However running unopkg as sudo and trying to install in shared mode yields the reported errors/problems. 

The oxt-file was just uploaded, such that this can be tested without a need to install the full BSF4ooRexx package.
Comment 7 jsc 2013-02-06 15:53:41 UTC
I have installed the ScriptProviderForooRexx.oxt in a AOO 4.0 dev version on my MacOs 10.7.5 system. I installed for all users and I am in the admin group. I don't use sudo because this causes a problem with a tmp directory in the user profile. The tmp directory can't be deleted.

Can you please try to install it with a user with admin rights. Or with sudo unopkg ... but then please start the office also with sudo directly after the installation. during the next office start the tmp directory gets synchronized and deleted.

There is indeed room for improvements but I don't see that somebody will work on this. The whole extension deployment framework should be reworked to remove some complexity.
Comment 8 rony 2014-02-18 15:20:04 UTC
The reported anomality when executing Rexx scripts may be linked to executing the scripts on the wrong thread, cf. <> (there one finds instructions how to test this with a debug version of the oxt, that simply uses a JDialog for popups, which fails, when started on the wrong thread).
Comment 9 rony 2014-02-18 15:23:47 UTC
A question ad your remark to restart AOO in sudo mode to have it clean up the tmp directory: how could one possibly do that from the command line? The package is added using unopkg from the command line and causes an instance of AOO to be created and lingering.

If there was a command line argument to soffice for quitting AOO, then I could follow your advice. 

Or, is there maybe some undocumented possibility to do that? If so, then I would be able to follow your advice.