rpms/openoffice.org/F-8 openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch, NONE, 1.1 openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch, NONE, 1.1 openoffice.org.spec, 1.1347, 1.1348
Caolan McNamara (caolanm)
fedora-extras-commits at redhat.com
Mon Feb 18 09:39:39 UTC 2008
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2695
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch
openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
Log Message:
make unopkg not suck so horribly
openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch:
--- NEW FILE openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch ---
Index: com/sun/star/deployment/makefile.mk
===================================================================
RCS file: /cvs/api/offapi/com/sun/star/deployment/makefile.mk,v
retrieving revision 1.15
diff -u -r1.15 makefile.mk
--- openoffice.org.orig/offapi/com/sun/star/deployment/makefile.mk 6 Jul 2007 14:32:11 -0000 1.15
+++ openoffice.org/offapi/com/sun/star/deployment/makefile.mk 22 Nov 2007 14:43:47 -0000
@@ -55,6 +55,7 @@
LicenseException.idl \
VersionException.idl \
InstallException.idl \
+ LinkException.idl \
UpdateInformationEntry.idl \
XUpdateInformationProvider.idl \
UpdateInformationProvider.idl \
--- /dev/null 2007-10-09 17:51:18.611015998 +0100
+++ openoffice.org.orig/offapi/com/sun/star/deployment/LinkException.idl 2007-11-22 13:45:04.000000000 +0000
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile$
+ *
+ * $Revision$
+ *
+ * last change: $Author$ $Date$
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2006 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_COM_SUN_STAR_DEPLOYMENT_LINKEXCEPTION_IDL
+#define INCLUDED_COM_SUN_STAR_DEPLOYMENT_LINKEXCEPTION_IDL
+
+#include "com/sun/star/uno/Exception.idl"
+
+module com { module sun { module star { module deployment {
+
+interface XPackage;
+
+/**
+ describes the fact that deployment unit is about to be linked.
+
+ <p>This exception is intended to be used with an
+ <type scope="com::sun::star::task">XInteractionHandler</type>.</p>
+
+ @since OOo 2.4
+*/
+exception LinkException: com::sun::star::uno::Exception {
+ /**
+ represents the new deployment unit.
+
+ <p>Must not be <NULL/>.</p>
+ */
+ XPackage New;
+
+
+};
+
+}; }; }; };
+
+#endif
Index: source/deployment/manager/dp_manager.cxx
===================================================================
RCS file: /cvs/framework/desktop/source/deployment/manager/dp_manager.cxx,v
retrieving revision 1.26
diff -u -r1.26 dp_manager.cxx
--- openoffice.org.orig/desktop/source/deployment/manager/dp_manager.cxx 26 Jul 2007 08:54:34 -0000 1.26
+++ openoffice.org/desktop/source/deployment/manager/dp_manager.cxx 22 Nov 2007 14:45:05 -0000
@@ -64,6 +64,7 @@
#include "com/sun/star/ucb/NameClash.hpp"
#include "com/sun/star/deployment/VersionException.hpp"
#include "com/sun/star/deployment/InstallException.hpp"
+#include "com/sun/star/deployment/LinkException.hpp"
#include "com/sun/star/task/XInteractionApprove.hpp"
#include "com/sun/star/ucb/UnsupportedCommandException.hpp"
#include "boost/bind.hpp"
@@ -512,6 +513,40 @@
return mediaType;
}
+oslFileError dp_linkFile( rtl_uString* ustrFileURL, rtl_uString* ustrDestURL )
+{
+ oslFileError eRet = osl_File_E_invalidError;
+#ifdef UNX
+ OSL_ASSERT( ustrFileURL );
+ OSL_ASSERT( ustrDestURL );
+
+ /* convert source url to system path */
+ rtl::OUString aSrc;
+ eRet = osl_getSystemPathFromFileURL( ustrFileURL, &aSrc.pData );
+ if( eRet != osl_File_E_None )
+ return eRet;
+ rtl::OString aSrcPath = rtl::OUStringToOString( aSrc, osl_getThreadTextEncoding() );
+
+ /* convert destination url to system path */
+ rtl::OUString aDest;
+ osl_getSystemPathFromFileURL( ustrDestURL, &aDest.pData );
+ if( eRet != osl_File_E_None )
+ return eRet;
+ rtl::OString aDestPath = rtl::OUStringToOString( aDest, osl_getThreadTextEncoding() );
+
+ rtl::OString sName = aSrcPath;
+ sal_Int32 nEnd = sName.getLength()-1;
+ if (sName.pData->buffer[nEnd] == '/')
+ --nEnd;
+ sal_Int32 nStart = sName.lastIndexOf( '/', nEnd );
+ sName = sName.copy(nStart, nEnd - nStart + 1);
+
+ int nRet = symlink(aSrcPath.getStr(), (aDestPath + sName).getStr());
+ eRet = nRet != 0 ? osl_File_E_invalidError : osl_File_E_None;
+#endif
+ return eRet;
+}
+
//______________________________________________________________________________
OUString PackageManagerImpl::insertToActivationLayer(
OUString const & mediaType, ::ucbhelper::Content const & sourceContent_,
@@ -536,11 +571,11 @@
destFolder = makeURL( m_activePackages, tempEntry );
}
destFolder += OUSTR("_");
-
+
// prepare activation folder:
::ucbhelper::Content destFolderContent;
create_folder( &destFolderContent, destFolder, xCmdEnv );
-
+
// copy content into activation temp dir:
if (mediaType.matchIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM(
@@ -552,19 +587,49 @@
{
// inflate content:
::rtl::OUStringBuffer buf;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
- buf.append( ::rtl::Uri::encode( sourceContent.getURL(),
+ if (!sourceContent.isFolder())
+ {
+ buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
+ buf.append( ::rtl::Uri::encode( sourceContent.getURL(),
rtl_UriCharClassRegName,
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 ) );
+ }
+ else
+ buf.append( sourceContent.getURL() );
+
buf.append( static_cast<sal_Unicode>('/') );
- sourceContent = ::ucbhelper::Content(
- buf.makeStringAndClear(), xCmdEnv );
+ sourceContent = ::ucbhelper::Content( buf.makeStringAndClear(), xCmdEnv );
+ }
+
+ bool bLink = false;
+ Any request( (deployment::LinkException()) );
+ bool approve = false, abort = false;
+ interactContinuation( request, task::XInteractionApprove::static_type(),
+ xCmdEnv, &approve, &abort );
+
+ if (!abort && approve)
+ bLink = true;
+
+ if (bLink)
+ {
+ if (
+ (!sourceContent.isFolder()) ||
+ (osl_File_E_None != dp_linkFile(sourceContent.getURL().pData, destFolderContent.getURL().pData))
+ )
+ {
+ throw RuntimeException( OUSTR("dp_linkFile() failed!"), 0 );
+ }
+ }
+ else
+ {
+ if (! destFolderContent.transferContent(
+ sourceContent, ::ucbhelper::InsertOperation_COPY,
+ title, NameClash::OVERWRITE ))
+ {
+ throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 );
+ }
}
- if (! destFolderContent.transferContent(
- sourceContent, ::ucbhelper::InsertOperation_COPY,
- title, NameClash::OVERWRITE ))
- throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 );
// write to DB:
dbData->temporaryName = tempEntry;
Index: source/pkgchk/unopkg/unopkg_app.cxx
===================================================================
RCS file: /cvs/framework/desktop/source/pkgchk/unopkg/unopkg_app.cxx,v
retrieving revision 1.6.84.1
diff -u -r1.6.84.1 unopkg_app.cxx
--- openoffice.org.orig/desktop/source/pkgchk/unopkg/unopkg_app.cxx 10 Aug 2007 15:03:53 -0000 1.6.84.1
+++ openoffice.org/desktop/source/pkgchk/unopkg/unopkg_app.cxx 22 Nov 2007 14:46:24 -0000
@@ -91,6 +91,9 @@
" -V, --version version information\n"
" -v, --verbose verbose output to stdout\n"
" -f, --force force overwriting existing extensions\n"
+#ifdef UNX
+" -l, --link attempt to link to instead of copying extensions\n"
+#endif
" --log-file <file> custom log file; default: <cache-dir>/log.txt\n"
" --shared expert feature: operate on shared installation\n"
" deployment context;\n"
@@ -108,6 +111,9 @@
{ RTL_CONSTASCII_STRINGPARAM("version"), 'V', false },
{ RTL_CONSTASCII_STRINGPARAM("verbose"), 'v', false },
{ RTL_CONSTASCII_STRINGPARAM("force"), 'f', false },
+#ifdef UNX
+ { RTL_CONSTASCII_STRINGPARAM("link"), 'l', false },
+#endif
{ RTL_CONSTASCII_STRINGPARAM("log-file"), '\0', true },
{ RTL_CONSTASCII_STRINGPARAM("shared"), '\0', false },
{ RTL_CONSTASCII_STRINGPARAM("deployment-context"), '\0', true },
@@ -212,6 +218,7 @@
OUString subCommand;
bool option_shared = false;
bool option_force = false;
+ bool option_link = false;
bool option_verbose = false;
bool subcmd_add = false;
bool subcmd_gui = false;
@@ -219,11 +226,13 @@
OUString deploymentContext;
OUString cmdArg;
::std::vector<OUString> cmdPackages;
-
+
OptionInfo const * info_shared = getOptionInfo(
s_option_infos, OUSTR("shared") );
OptionInfo const * info_force = getOptionInfo(
s_option_infos, OUSTR("force") );
+ OptionInfo const * info_link = getOptionInfo(
+ s_option_infos, OUSTR("link") );
OptionInfo const * info_verbose = getOptionInfo(
s_option_infos, OUSTR("verbose") );
OptionInfo const * info_log = getOptionInfo(
@@ -270,6 +279,7 @@
else if (!readOption( &option_verbose, info_verbose, &nPos ) &&
!readOption( &option_shared, info_shared, &nPos ) &&
!readOption( &option_force, info_force, &nPos ) &&
+ !readOption( &option_link, info_link, &nPos ) &&
!readArgument( &deploymentContext, info_context, &nPos ) &&
!isBootstrapVariable(&nPos))
{
@@ -331,7 +341,7 @@
Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv(
createCmdEnv( xComponentContext, logFile,
- option_force, option_verbose) );
+ option_force, option_link, option_verbose) );
if (subcmd_add ||
subCommand.equalsAsciiL(
Index: source/pkgchk/unopkg/unopkg_cmdenv.cxx
===================================================================
RCS file: /cvs/framework/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx,v
retrieving revision 1.8
diff -u -r1.8 unopkg_cmdenv.cxx
--- openoffice.org.orig/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx 26 Jun 2007 11:13:26 -0000 1.8
+++ openoffice.org/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx 22 Nov 2007 14:46:24 -0000
@@ -49,6 +49,7 @@
#include "com/sun/star/task/XInteractionAbort.hpp"
#include "com/sun/star/task/XInteractionApprove.hpp"
#include "com/sun/star/deployment/InstallException.hpp"
+#include "com/sun/star/deployment/LinkException.hpp"
#include "com/sun/star/container/ElementExistException.hpp"
#include "com/sun/star/deployment/LicenseException.hpp"
#include "com/sun/star/deployment/VersionException.hpp"
@@ -100,6 +101,7 @@
{
sal_Int32 m_logLevel;
bool m_option_force_overwrite;
+ bool m_option_link;
bool m_option_verbose;
Reference< XComponentContext > m_xComponentContext;
Reference< XProgressHandler > m_xLogFile;
@@ -113,6 +115,7 @@
Reference<XComponentContext> const & xComponentContext,
OUString const & log_file,
bool option_force_overwrite,
+ bool option_link,
bool option_verbose);
// XCommandEnvironment
@@ -137,9 +140,11 @@
Reference<XComponentContext> const & xComponentContext,
OUString const & log_file,
bool option_force_overwrite,
+ bool option_link,
bool option_verbose)
: m_logLevel(0),
m_option_force_overwrite( option_force_overwrite ),
+ m_option_link( option_link ),
m_option_verbose( option_verbose ),
m_xComponentContext(xComponentContext)
{
@@ -268,6 +273,7 @@
lang::WrappedTargetException wtExc;
deployment::LicenseException licExc;
deployment::InstallException instExc;
+ deployment::LinkException linkExc;
deployment::LicenseIndividualAgreementException licAgreementExc;
bool bLicenseException = false;
@@ -313,6 +319,10 @@
bLicenseException = true;
printLicense(licExc.Text, approve, abort);
}
+ else if (request >>= linkExc)
+ {
+ approve = m_option_link;
+ }
else if (request >>= instExc)
{
//Only if the unopgk was started with gui + extension then we user is asked.
@@ -445,10 +455,11 @@
Reference< XComponentContext > const & xContext,
OUString const & logFile,
bool option_force_overwrite,
+ bool option_link,
bool option_verbose)
{
return new CommandEnvironmentImpl(
- xContext, logFile, option_force_overwrite, option_verbose);
+ xContext, logFile, option_force_overwrite, option_link, option_verbose);
}
} // unopkg
Index: source/pkgchk/unopkg/unopkg_shared.h
===================================================================
RCS file: /cvs/framework/desktop/source/pkgchk/unopkg/unopkg_shared.h,v
retrieving revision 1.2.130.1
diff -u -r1.2.130.1 unopkg_shared.h
--- openoffice.org.orig/desktop/source/pkgchk/unopkg/unopkg_shared.h 10 Aug 2007 15:04:16 -0000 1.2.130.1
+++ openoffice.org/desktop/source/pkgchk/unopkg/unopkg_shared.h 22 Nov 2007 14:46:24 -0000
@@ -145,6 +145,7 @@
css::uno::Reference<css::uno::XComponentContext> const & xContext,
::rtl::OUString const & logFile,
bool option_force_overwrite,
+ bool option_link,
bool option_verbose);
//==============================================================================
openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch:
--- NEW FILE openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch ---
--- openoffice.org.orig/desktop/scripts/unopkg.sh 2008-01-14 15:55:26.000000000 +0000
+++ openoffice.org/desktop/scripts/unopkg.sh 2008-02-14 10:52:10.000000000 +0000
@@ -95,6 +95,29 @@
;;
esac
+isshared=0
+for arg in $@
+do
+if [ "$arg" == "--shared" ]; then
+ isshared=1
+fi
+done
+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 ]; 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 --tmpdir unoinstall.XXXXXX`
+ set -- $@ '-env:UserInstallation=file://'$INSTDIR
+ fi
+fi
+
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
for arg in $@
@@ -149,5 +172,8 @@
[ $# -eq 1 -a "oxt" = "`echo $1 | cut -d . -f 2`" -a -n "$DISPLAY" ] && GUI="gui"
# execute binary
-exec "$sd_prog/$sd_binary" $GUI "$@"
+"$sd_prog/$sd_binary" $GUI "$@"
+if [ -n "$INSTDIR" ]; then
+ rm -rf $INSTDIR
+fi
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-8/openoffice.org.spec,v
retrieving revision 1.1347
retrieving revision 1.1348
diff -u -r1.1347 -r1.1348
--- openoffice.org.spec 7 Feb 2008 09:02:34 -0000 1.1347
+++ openoffice.org.spec 18 Feb 2008 09:38:59 -0000 1.1348
@@ -166,6 +166,8 @@
Patch84: workspace.sw24bf02.patch
Patch85: openoffice.org-2.4.0.ooo85321.vcl.pixmapleak.patch
Patch86: openoffice.org-2.4.0.ooo85931.svx.getentrypos.patch
+Patch87: openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch
+Patch88: openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
%define instdir %{_libdir}/openoffice.org
@@ -1127,6 +1129,8 @@
%patch84 -p1 -b .workspace.sw24bf02.patch
%patch85 -p1 -b .ooo85321.vcl.pixmapleak.patch
%patch86 -p1 -b .ooo85931.svx.getentrypos.patch
+%patch87 -p1 -b .ooo83878.unopkg.enablelinking.patch
+%patch88 -p1 -b .ooo86080.unopkg.bodge.patch
%if %{linkopt}
chmod a+x solenv/bin/mklinkscript.pl
@@ -1303,6 +1307,9 @@
$RPM_BUILD_ROOT/%{instdir}/program/configimport -e file://$RPM_BUILD_ROOT/%{instdir}/share/registry %{PATCH4}
#rhbz#151356 set a consistent bootstrap value, unfortunately upstream finally picked a different one
sed -i -e s/org2/org2.0/ $RPM_BUILD_ROOT/%{instdir}/program/bootstraprc
+#give a consistent javasettingsunopkginstall.xml
+$RPM_BUILD_ROOT/%{instdir}/program/unopkg list --shared || :
+rm -rf $RPM_BUILD_ROOT/%{instdir}/share/uno_packages/cache/* || :
#add the debugging libsalalloc_malloc.so.3 library
cp -f solver/680/unxlng*.pro/lib/libsalalloc_malloc.so.3 $RPM_BUILD_ROOT/%{instdir}/program
@@ -2840,6 +2847,8 @@
- Resolves: rhbz#429897 one click print with lpr-only backend fix
- Resolves: rhbz#431606 require jre not java
- Resolves: rhbz#431805 openoffice.org-2.4.0.ooo85931.svx.getentrypos.patch
+- add openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
+- add openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch
* Fri Jan 11 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.3.0-6.11
- Resolves: rhbz#426876 add openoffice.org-2.4.0.ooo85055.psprint.linetoolong.patch
More information about the fedora-extras-commits
mailing list