FS#15410 - [go-openoffice] unopkg installer mktemp path error

Attached to Project: Arch Linux
Opened by Adrian Benson (abenson) - Monday, 06 July 2009, 17:27 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 09 October 2009, 16:10 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

when attempting to list/install shared extensions

calls - /bin/mktemp
arch - /usr/bin/mktemp

extensions still install

The erroneous call to /bin/mktemp means that tempfiles are created in / (i.e. root)
so running say:

unopkg install --shared foo.oxt

creates a spurious directory /user/....
This is not removed by unopkg

I edited the /usr/lib/go-openoffice-3.1.0.6/program/unopkg and problem was resolved.


Additional info:

/usr/lib/go-openoffice-*/program/unopkg , line 68

##===============
## this is the block in question
## called whenever operating on shared extensions

if [ $isshared -eq 1 ]; then
echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
if [ $? -ne 0 ]; then
set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
fi
echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA
if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then
set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml'
fi
echo $@ | grep -q env:UserInstallation
if [ $? -ne 0 ]; then
INSTDIR=`/bin/mktemp -d -t unoinstall.XXXXXX`
set -- $@ '-env:UserInstallation=file://'$INSTDIR
fi
fi
##===============

Possible fix:

if [ $? -ne 0 ]; then
_MKTEMP_CMD=`which mktemp`
INSTDIR=`$_MKTEMP_CMD -d -t unoinstall.XXXXXX`
set -- $@ '-env:UserInstallation=file://'$INSTDIR
fi




Steps to reproduce:

bensonad@co-516-04-c:/$ sudo unopkg install --shared foo.oxt
- works, but garbage directory '/user' left behind

bensonad@co-516-04-c:/$ unopkg list --shared
- fails due to write permission in root

please remove  FS#15408  - a poorly worded duplicate posted by me
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 09 October 2009, 16:10 GMT
Reason for closing:  Fixed
Comment by Andreas Radke (AndyRTR) - Monday, 06 July 2009, 20:13 GMT
please check if mktemp path can be set in build process. If not autodetection (if any) failed and you should file it upstream and give us here the report url.
Comment by Adrian Benson (abenson) - Tuesday, 07 July 2009, 00:01 GMT
Hi, had a look at the source in svn trunk

The source for unopkg is at
http://svn.services.openoffice.org/opengrok/xref/Current%20%28trunk%29/desktop/scripts/unopkg.sh

None of lines 49 - 82 are in the svn source.

searched for 'isshared' - it does not appear in any file in the svn tree upstream

Lines 49 - 82 appear to be some sort of mish-mash of bits out of
http://svn.services.openoffice.org/opengrok/xref/Current%20%28trunk%29/setup_native/source/packinfo/shellscripts_extensions.txt

which sets up finding the correct mktemp etc
This is where the problem must lie.

There are no comments, etc so I am guessing it is a dodgy patch introduced somewhere.
Thats about the limit of my source code sleuthing skills I'm afraid

AB
Comment by Adrian Benson (abenson) - Tuesday, 07 July 2009, 23:51 GMT
I notice there is also a binary executable file /usr/lib/go-openoffice/program/unopkg.bin
This works fine, i.e no mktemp dependency

Perhaps symlinking unopkg ==> unopkg.bin will be an intant fix?

PS I did not file a bug report with upstream as I could not see any point at which the errant call would be introduced.

go-openoffice 3.1.0.98.2-2
Comment by Andreas Radke (AndyRTR) - Friday, 09 October 2009, 04:32 GMT
This seems to be a coreutils issue. See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531842 . Assigning Allan for coreutils.
Comment by Andreas Radke (AndyRTR) - Friday, 09 October 2009, 06:09 GMT
go-openoffice 3.1.1.3-1 will have the mktemp path fixed.

Loading...