rpms/openoffice.org/devel openoffice.org-2.3.1.83876.unopkg.avoida11y.patch, NONE, 1.1 openoffice.org-2.3.1.ooo83877.sal.allowsoftlinkdelete.patch, NONE, 1.1 openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch, NONE, 1.1 openoffice.org.spec, 1.1343, 1.1344

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Thu Nov 22 15:58:11 UTC 2007


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20376

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-2.3.1.83876.unopkg.avoida11y.patch 
	openoffice.org-2.3.1.ooo83877.sal.allowsoftlinkdelete.patch 
	openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch 
Log Message:
facilitate extensions packaging

openoffice.org-2.3.1.83876.unopkg.avoida11y.patch:

--- NEW FILE openoffice.org-2.3.1.83876.unopkg.avoida11y.patch ---
Index: scripts/unopkg.sh
===================================================================
RCS file: /cvs/framework/desktop/scripts/unopkg.sh,v
retrieving revision 1.5
diff -u -r1.5 unopkg.sh
--- openoffice.org.orig/desktop/scripts/unopkg.sh	24 Jan 2006 16:46:34 -0000	1.5
+++ openoffice.org/desktop/scripts/unopkg.sh	22 Nov 2007 14:44:47 -0000
@@ -37,6 +37,8 @@
 # enable file locking
 SAL_ENABLE_FILE_LOCKING=1
 export SAL_ENABLE_FILE_LOCKING
+JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1
+export JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
 
 # resolve installation directory
 sd_cwd="`pwd`"

openoffice.org-2.3.1.ooo83877.sal.allowsoftlinkdelete.patch:

--- NEW FILE openoffice.org-2.3.1.ooo83877.sal.allowsoftlinkdelete.patch ---
Index: osl/unx/file.cxx
===================================================================
RCS file: /cvs/porting/sal/osl/unx/file.cxx,v
retrieving revision 1.16
diff -u -r1.16 file.cxx
--- openoffice.org.orig/sal/osl/unx/file.cxx	18 Jan 2007 14:18:01 -0000	1.16
+++ openoffice.org/sal/osl/unx/file.cxx	22 Nov 2007 14:41:09 -0000
@@ -1749,7 +1813,7 @@
     int nRet=0;
     struct stat aStat;
 
-    nRet = stat(pszPath,&aStat);
+    nRet = lstat(pszPath,&aStat);
     if ( nRet < 0 )
     {
         nRet=errno;

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,48 @@
     {
         // 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,
+                OUString(), NameClash::OVERWRITE ))
+        {
+            throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 );
+        }
     }
-    if (! destFolderContent.transferContent(
-            sourceContent, ::ucbhelper::InsertOperation_COPY,
-            OUString(), 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);
 
 //==============================================================================


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1343
retrieving revision 1.1344
diff -u -r1.1343 -r1.1344
--- openoffice.org.spec	22 Nov 2007 13:51:45 -0000	1.1343
+++ openoffice.org.spec	22 Nov 2007 15:57:36 -0000	1.1344
@@ -152,6 +152,9 @@
 Patch70: openoffice.org-2.3.0.ooo83591.vcl.checkboxes.patch
 Patch71: openoffice.org-2.3.1.ooo82911.sd.insertbackground.patch
 Patch72: workspace.sw8u10bf02.patch
+Patch73: openoffice.org-2.3.1.83876.unopkg.avoida11y.patch
+Patch74: openoffice.org-2.3.1.ooo83877.sal.allowsoftlinkdelete.patch
+Patch75: openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch
 
 %define instdir %{_libdir}/openoffice.org
 
@@ -1103,6 +1106,9 @@
 %patch70 -p1 -b .ooo83591.vcl.checkboxes.patch
 %patch71 -p1 -b .ooo82911.sd.insertbackground.patch
 %patch72 -p1 -b .workspace.sw8u10bf02.patch
+%patch73 -p1 -b .ooo83876.unopkg.avoida11y.patch
+%patch74 -p1 -b .ooo83877.sal.allowsoftlinkdelete.patch
+%patch75 -p1 -b .ooo83878.unopkg.enablelinking.patch
 
 %if %{linkopt}
 chmod a+x solenv/bin/mklinkscript.pl
@@ -2799,9 +2805,16 @@
 %{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu
 
 %changelog
-* Wed Nov 21 2007 Jan Navratil <jnavrati at redhat.com> - 1:2.3.1-9.3
-- Resolves: rhbz#247634 fix openoffice.org-2.3.1.ooo82911.sd.insertbackground.patch
-- Resolves: rhbz#386371 add workspace.sw8u10bf02.patch
+* Thu Nov 22 2007 Caolan McNamara <caolanm at redhat.com> - 1:2.3.1-9.3
+- Resolves: rhbz#247634 add openoffice.org-2.3.1.ooo82911.sd.insertbackground.patch (jnavrati)
+- Resolves: rhbz#386371 add workspace.sw8u10bf02.patch (caolanm)
+- add openoffice.org-2.3.1.83876.unopkg.avoida11y.patch to avoid unopkg
+  crapping out on first run with a11y enabled and no X (caolanm)
+- add openoffice.org-2.3.1.ooo83877.sal.allowsoftlinkdelete.patch to allow
+  sal to delete softlinks (caolanm)
+- add openoffice.org-2.3.1.ooo83878.unopkg.enablelinking.patch to enable
+  linking to unpacked extensions already on the fs when registering (caolanm)
+==> makes extension rpm packaging non-wasteful and safe
 
 * Thu Nov 15 2007 Caolan McNamara <caolanm at redhat.com> - 1:2.3.1-9.2
 - move from firefox to xulrunner




More information about the fedora-extras-commits mailing list