diff options
Diffstat (limited to 'setup_native')
10 files changed, 486 insertions, 14 deletions
diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst index 8835ff0d6ad2..05200fdf938a 100644 --- a/setup_native/prj/build.lst +++ b/setup_native/prj/build.lst @@ -1,4 +1,4 @@ -pk setup_native : transex3 soltools sal xml2cmp NULL +pk setup_native : l10n transex3 soltools sal xml2cmp NULL pk setup_native usr1 - all sn_mkout NULL pk setup_native\scripts\source nmake - u sn_source NULL pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL diff --git a/setup_native/prj/d.lst b/setup_native/prj/d.lst index a573b94fd5cb..9d429454ebba 100644 --- a/setup_native/prj/d.lst +++ b/setup_native/prj/d.lst @@ -8,6 +8,7 @@ mkdir: %_DEST%\bin%_EXT%\userscripts ..\%__SRC%\bin\uninstall %_DEST%\bin%_EXT%\userscripts\uninstall ..\%__SRC%\bin\noarch\fake-db-1.0-0.noarch.rpm %_DEST%\bin%_EXT%\openoffice.org-userland-1.0-0.noarch.rpm +mkdir: %_DEST%\bin%_EXT%\osolsmf ..\%__SRC%\bin\ulfconv %_DEST%\bin%_EXT%\ulfconv ..\%__SRC%\bin\langpackscript.sh %_DEST%\bin%_EXT%\langpackscript.sh ..\%__SRC%\bin\linuxpatchscript.sh %_DEST%\bin%_EXT%\linuxpatchscript.sh @@ -33,6 +34,10 @@ mkdir: %_DEST%\bin%_EXT%\userscripts ..\source\java\openofficeorg_setup.gif %_DEST%\bin%_EXT%\osl\Setup.gif ..\source\java\javaversion.dat %_DEST%\bin%_EXT%\javaversion.dat ..\source\java\javaversion2.dat %_DEST%\bin%_EXT%\javaversion2.dat +..\source\opensolaris\bundledextensions\installed %_DEST%\bin%_EXT%\osolsmf\installed +..\source\opensolaris\bundledextensions\README %_DEST%\bin%_EXT%\osolsmf\README +..\source\opensolaris\bundledextensions\ooo_bundled_extensions.xml %_DEST%\bin%_EXT%\osolsmf\ooo_bundled_extensions.xml +..\source\opensolaris\bundledextensions\svc-ooo_bundled_extensions %_DEST%\bin%_EXT%\osolsmf\svc-ooo_bundled_extensions ..\source\packinfo\solariscopyrightfile %_DEST%\bin%_EXT%\solariscopyrightfile ..\source\packinfo\*.txt %_DEST%\bin%_EXT%\*.txt ..\source\packinfo\*.pcp %_DEST%\bin%_EXT%\*.pcp diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index 81d5649ffec6..ebb16d0ef008 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -46,6 +46,7 @@ BEGIN $savetemppath = ""; $msiinfo_available = 0; $path_displayed = 0; + $localmsidbpath = ""; $plat = $^O; @@ -69,7 +70,7 @@ sub usage { print <<Ende; ---------------------------------------------------------------------- -$prog V1.0 (c) Sun Microsystems 2008 +$prog V1.0 (c) Sun Microsystems 2009 This program installs a Windows Installer installation set without using msiexec.exe. The installation is comparable with an administrative installation using the Windows Installer @@ -150,6 +151,33 @@ sub controlparameter } ############################################################################# +# The program msidb.exe can be located next to the Perl program. Then it is +# not neccessary to find it in the PATH variable. +############################################################################# + +sub check_local_msidb +{ + my $msidbname = "msidb.exe"; + my $perlprogramm = $0; + my $path = $perlprogramm; + + get_path_from_fullqualifiedname(\$path); + + $path =~ s/\\\s*$//; + $path =~ s/\/\s*$//; + + my $msidbpath = ""; + if ( $path =~ /^\s*$/ ) { $msidbpath = $msidbname; } + else { $msidbpath = $path . $separator . $msidbname; } + + if ( -f $msidbpath ) + { + $localmsidbpath = $msidbpath; + print "Using $msidbpath (next to \"admin.pl\")\n"; + } +} + +############################################################################# # Converting a string list with separator $listseparator # into an array ############################################################################# @@ -198,7 +226,8 @@ sub check_system_path } my $patharrayref = convert_stringlist_into_array(\$pathvariable, $local_pathseparator); - my @needed_files_in_path = ("msidb.exe", "expand.exe"); + my @needed_files_in_path = ("expand.exe"); + if ( $localmsidbpath eq "" ) { push(@needed_files_in_path, "msidb.exe"); } # not found locally -> search in path my @optional_files_in_path = ("msiinfo.exe"); print("\nChecking required files:\n"); @@ -386,7 +415,7 @@ sub get_path_from_fullqualifiedname if ( $$longfilenameref =~ /\Q$separator\E/ ) # Is there a separator in the path? Otherwise the path is empty. { - if ( $$longfilenameref =~ /^\s*(\S.*\S\Q$separator\E)(\S.+\S?)/ ) + if ( $$longfilenameref =~ /^\s*(\S.*\Q$separator\E)(\S.+\S?)/ ) { $$longfilenameref = $1; } @@ -486,6 +515,7 @@ sub extract_tables_from_database my ($fullmsidatabasepath, $workdir, $tablelist) = @_; my $msidb = "msidb.exe"; # Has to be in the path + if ( $localmsidbpath ) { $msidb = $localmsidbpath; } my $infoline = ""; my $systemcall = ""; my $returnvalue = ""; @@ -513,6 +543,117 @@ sub extract_tables_from_database } } +######################################################## +# Check, if this installation set contains +# internal cabinet files included into the msi +# database. +######################################################## + +sub check_for_internal_cabfiles +{ + my ($cabfilehash) = @_; + + my $contains_internal_cabfiles = 0; + my %allcabfileshash = (); + + foreach my $filename ( keys %{$cabfilehash} ) + { + if ( $filename =~ /^\s*\#/ ) # starting with a hash + { + $contains_internal_cabfiles = 1; + # setting real filename without hash as key and name with hash as value + my $realfilename = $filename; + $realfilename =~ s/^\s*\#//; + $allcabfileshash{$realfilename} = $filename; + } + } + + return ( $contains_internal_cabfiles, \%allcabfileshash ); +} + +################################################################# +# Exclude all cab files from the msi database. +################################################################# + +sub extract_cabs_from_database +{ + my ($msidatabase, $allcabfiles) = @_; + + my $infoline = ""; + my $fullsuccess = 1; + my $msidb = "msidb.exe"; # Has to be in the path + if ( $localmsidbpath ) { $msidb = $localmsidbpath; } + + my @all_excluded_cabfiles = (); + + if( $^O =~ /cygwin/i ) + { + $msidatabase = qx{cygpath -w "$msidatabase"}; + $msidatabase =~ s/\\/\\\\/g; + $msidatabase =~ s/\s*$//g; + } + else + { + # msidb.exe really wants backslashes. (And double escaping because system() expands the string.) + $msidatabase =~ s/\//\\\\/g; + } + + foreach my $onefile ( keys %{$allcabfiles} ) + { + my $systemcall = $msidb . " -d " . $msidatabase . " -x " . $onefile; + system($systemcall); + push(@all_excluded_cabfiles, $onefile); + } + + \@all_excluded_cabfiles; +} + +################################################################################ +# Collect all DiskIds to the corresponding cabinet files from Media.idt. +################################################################################ + +sub analyze_media_file +{ + my ($filecontent) = @_; + + my %diskidhash = (); + + for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) + { + if ( $i < 3 ) { next; } + + if ( ${$filecontent}[$i] =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ ) + { + my $diskid = $1; + my $cabfile = $4; + + $diskidhash{$cabfile} = $diskid; + } + } + + return \%diskidhash; +} + +sub analyze_customaction_file +{ + my ($filecontent) = @_; + + my $register_extensions_exists = 0; + + my %table = (); + + for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) + { + if ( ${$filecontent}[$i] =~ /^\s*RegisterExtensions\s+/ ) + { + $register_extensions_exists = 1; + last; + } + } + + return $register_extensions_exists; +} + ################################################################################ # Analyzing the content of Directory.idt ################################################################################# @@ -930,6 +1071,10 @@ sub register_one_extension $localextension =~ s/\\/\\\\/g; } + if ( $^O =~ /cygwin/i ) { + $executable = "./" . $executable; + } + my $systemcall = $executable . " add --shared --verbose " . "\"" . $localextension . "\"" . " -env:UserInstallation=file://" . $temppath . " 2\>\&1 |"; print "... $systemcall\n"; @@ -1142,6 +1287,7 @@ $starttime = time(); getparameter(); controlparameter(); +check_local_msidb(); check_system_path(); my $temppath = get_temppath(); @@ -1153,9 +1299,36 @@ create_directory($helperdir); # Get File.idt, Component.idt and Directory.idt from database -my $tablelist = "File Directory Component"; +my $tablelist = "File Directory Component Media CustomAction"; extract_tables_from_database($databasepath, $helperdir, $tablelist); +# Set unpackdir +my $unpackdir = $helperdir . $separator . "unpack"; +create_directory($unpackdir); + +# Reading media table to check for internal cabinet files +my $filename = $helperdir . $separator . "Media.idt"; +if ( ! -f $filename ) { exit_program("ERROR: Could not find required file: $filename !"); } +my $filecontent = read_file($filename); +my $cabfilehash = analyze_media_file($filecontent); + +# Check, if there are internal cab files +my ( $contains_internal_cabfiles, $all_internal_cab_files) = check_for_internal_cabfiles($cabfilehash); + +if ( $contains_internal_cabfiles ) +{ + # Set unpackdir + my $cabdir = $helperdir . $separator . "internal_cabs"; + create_directory($cabdir); + my $from = cwd(); + chdir($cabdir); + # Exclude all cabinet files from database + my $all_excluded_cabs = extract_cabs_from_database($databasepath, $all_internal_cab_files); + print "Unpacking files from internal cabinet file(s)\n"; + foreach my $cabfile ( @{$all_excluded_cabs} ) { unpack_cabinet_file($cabfile, $unpackdir); } + chdir($from); +} + # Unpack all cab files into $helperdir, cab files must be located next to msi database my $installdir = $databasepath; @@ -1166,11 +1339,7 @@ make_absolute_filename_to_relative_filename(\$databasefilename); my $cabfiles = find_file_with_file_extension("cab", $installdir); -if ( $#{$cabfiles} < 0 ) { exit_program("ERROR: Did not find any cab file in directory $installdir"); } - -# Set unpackdir -my $unpackdir = $helperdir . $separator . "unpack"; -create_directory($unpackdir); +if (( $#{$cabfiles} < 0 ) && ( ! $contains_internal_cabfiles )) { exit_program("ERROR: Did not find any cab file in directory $installdir"); } print "Unpacking files from cabinet file(s)\n"; for ( my $i = 0; $i <= $#{$cabfiles}; $i++ ) @@ -1180,8 +1349,8 @@ for ( my $i = 0; $i <= $#{$cabfiles}; $i++ ) } # Reading tables -my $filename = $helperdir . $separator . "Directory.idt"; -my $filecontent = read_file($filename); +$filename = $helperdir . $separator . "Directory.idt"; +$filecontent = read_file($filename); my $dirhash = analyze_directory_file($filecontent); $filename = $helperdir . $separator . "Component.idt"; @@ -1203,8 +1372,16 @@ my $msidatabase = $targetdir . $separator . $databasefilename; my $copyreturn = copy($databasepath, $msidatabase); if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); } -# Registering extensions -register_extensions($unopkgfile, $extensions, $temppath); +# Reading tables +$filename = $helperdir . $separator . "CustomAction.idt"; +$filecontent = read_file($filename); +my $register_extensions_exists = analyze_customaction_file($filecontent); + +if ( $register_extensions_exists ) +{ + # Registering extensions + register_extensions($unopkgfile, $extensions, $temppath); +} # Saving info in Summary Information Stream of msi database (required for following patches) if ( $msiinfo_available ) { write_sis_info($msidatabase); } diff --git a/setup_native/source/opensolaris/bundledextensions/README b/setup_native/source/opensolaris/bundledextensions/README new file mode 100644 index 000000000000..f64c225d9df9 --- /dev/null +++ b/setup_native/source/opensolaris/bundledextensions/README @@ -0,0 +1,80 @@ +================================================================================ +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 diff --git a/setup_native/source/opensolaris/bundledextensions/installed b/setup_native/source/opensolaris/bundledextensions/installed new file mode 100644 index 000000000000..0c8d8df5ae26 --- /dev/null +++ b/setup_native/source/opensolaris/bundledextensions/installed @@ -0,0 +1 @@ +${OOOPACKAGEVERSION} diff --git a/setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml b/setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml new file mode 100644 index 000000000000..66acd508c281 --- /dev/null +++ b/setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> + +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> + +<service_bundle type="manifest" name="ooo_bundled_extensions"> + +<service + name="application/ooo_bundled_extensions" + type="service" + version="1"> + + <create_default_instance enabled="true" /> + <single_instance/> + + <dependency name="service_available" + grouping="require_all" + restart_on="none" + type="service"> + <service_fmri value="svc:/system/filesystem/local:default" /> + </dependency> + + <exec_method + type="method" name="start" + exec="/lib/svc/method/svc-ooo_bundled_extensions start" + timeout_seconds="160"> + <method_context> + <method_credential user="root" group="root" /> + </method_context> + </exec_method> + + + <exec_method + type="method" name="stop" + exec="/lib/svc/method/svc-ooo_bundled_extensions stop" + timeout_seconds="160" > + <method_context> + <method_credential user="root" group="root" /> + </method_context> + </exec_method> + + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" + value="transient" /> + <propval name="ignore_error" + type="astring" value="core,signal" /> + + </property_group> + + <stability value="Unstable" /> + + <template> + <common_name> + <loctext xml:lang="C"> + Installation of OpenOffice.org's bundled extensions. + </loctext> + </common_name> + </template> +</service> + +</service_bundle> diff --git a/setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions b/setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions new file mode 100644 index 000000000000..696277011133 --- /dev/null +++ b/setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions @@ -0,0 +1,108 @@ +#!/sbin/sh + +. /lib/svc/share/smf_include.sh + +#The start method is used for installing and updating the +#extensions. The service keeps a list +#(share/extensions/install/installed) of the extensions which were +#already installed. During installation, the bundled extensions are +#copied to the install folder (share/extensions/install). Finally this +#service, which is part of the office installation package, will be +#started and the start "method" of this script is called. Then all +#extensions in the "install" folder are checked if they are already +#installed by reading the list "installed". Because the list is empty +#at this time, all the extensions will be installed. +# +#If this service is restarted then the script checks if there is an +#extensions which is not yet installed, that is there is no entry for +#it in the 'installed' file. Only if this is the case then that +#extensions will be installed and its path is added to 'installed'. +# +#In case of an update, new versions of existing extensions and +#completely new extensions may be copied to the 'install' folder. Also +#a new 'installed' file will be copied which replaces the existing +#file. The new 'installed' file does not contain any entries of +#installed extensions. Therefore the next time when the start method is +#run all extensions contained in share/extensions/install will be +#installed. + +#Create the folder which contains the temporary user installation +INSTDIR=`/usr/bin/mktemp -d "/tmp/userinstall.XXXXXX"` + +OOO_BASE_DIR="/opt/openoffice.org/basis${OOOBASEVERSION}" + +case "$1" in +'start') + EXTENSIONDIR=/opt/openoffice.org${OOOBRANDPACKAGEVERSION}/share/extension/install + for FILE in $EXTENSIONDIR/*.oxt + do + #We check if the file exist, because if there is no extension + #then $FILE will contain "<..>/*.oxt" + if [ -f "$FILE" ]; then + #Determine if this extension is already installed. We do + #that by checking the file "installed" which contains a + #list of all installed extensions including the full path + EXTENSIONFILE=`basename $FILE` + INSTALLED=`sed -n "/$EXTENSIONFILE/p" $EXTENSIONDIR/installed` + + if [ -z "$INSTALLED" ]; then + #We have not found the name of the extension in the + #list. That is, it has not been installed (with unopkg) yet. + #Therefore we do it now. + echo installing $FILE + /opt/openoffice.org${OOOBRANDPACKAGEVERSION}/program/unopkg add --shared --bundled "$FILE" '-env:UserInstallation=file://$INSTDIR' '-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + #Let us remember that this extensions has been installed + #by adding the path name of the extension to the file + #installed + echo $FILE >> $EXTENSIONDIR/installed + fi + fi + done + + #Now check for extensions which need to be uninstalled + #(unopkg). This is the case if the list of extensions in the file + #installed contains the name of an extension which does not exist + #in the the folder <..>/share/extension/install. +# LINE="" +# NEWCONTENT="" +# REMOVED="" +# LIST=`cat $EXTENSIONDIR/installed` +# #remove blank lines +# LIST=`echo "$LIST" | sed '/^[:blank:]*$/d'` + +# echo "$LIST" | while [ 1 ] +# do +# read LINE || break +# if [ ! -f "$LINE" ]; then +# #The extension file has been removed from +# #share/extension/install. Now we remove the installed +# #extension +# echo removing `basename $LINE` +# /opt/openoffice.org${OOOBRANDPACKAGEVERSION}/program/unopkg remove --shared --bundled "`basename $LINE`" '-env:UserInstallation=file://$INSTDIR' '-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' +# REMOVED=1 +# else +# NEWCONTENT+=$LINE +# NEWCONTENT+="\n" +# fi +# done + +# #Write the new list to the file "installed". It now has all names +# #remove which refered to previously removed extensions (removed +# #from .../share/extension/install) +# if [ "$REMOVED" ]; then +# #remove the last empty line +# NEWCONTENT=`echo "$NEWCONTENT" | sed '/^[:space:]*$/d'` +# echo "$NEWCONTENT" > $EXTENSIONDIR/installed +# fi + + ;; + 'stop') + echo "#### stop ####" + ;; + *) + echo "Usage: $0 { start | stop }" + exit 1 + ;; +esac + +exit $SMF_EXIT_OK diff --git a/setup_native/source/ulfconv/ulfconv.cxx b/setup_native/source/ulfconv/ulfconv.cxx index 6ca6834461f9..7a345f8b365a 100644 --- a/setup_native/source/ulfconv/ulfconv.cxx +++ b/setup_native/source/ulfconv/ulfconv.cxx @@ -199,6 +199,8 @@ void read_encoding_table(char * file, EncodingMap& aEncodingMap) aEncodingMap.insert( EncodingMap::value_type(language, encoding->value) ); } } + + fclose(fp); } /************************************************************************ @@ -311,6 +313,7 @@ int main( int argc, char * const argv[] ) ostream = fopen(outfile, "w"); if ( ostream == NULL ) { fprintf(stderr, "ulfconv: %s : %s\n", outfile, strerror(errno)); + fclose(istream); exit(2); } } @@ -351,4 +354,7 @@ int main( int argc, char * const argv[] ) fputs(buffer, ostream); } } + + fclose(ostream); + fclose(istream); } diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx index 1fe1d2335b88..70c0d9fef1e6 100755 --- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx +++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx @@ -257,6 +257,9 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) // When there is no program folder, there could be no running office if ( dwError == ERROR_FILE_NOT_FOUND ) return ERROR_SUCCESS; + if ( dwError == ERROR_PATH_NOT_FOUND ) + return ERROR_SUCCESS; + // The destination folder should never exist, don't know what to do here if ( dwError == ERROR_ALREADY_EXISTS ) return ERROR_SUCCESS; diff --git a/setup_native/tests/opensolaris/bundledextensions/send_ooo b/setup_native/tests/opensolaris/bundledextensions/send_ooo new file mode 100644 index 000000000000..669e63ceda1b --- /dev/null +++ b/setup_native/tests/opensolaris/bundledextensions/send_ooo @@ -0,0 +1,32 @@ +#! /bin/bash + + +if [ $# = 0 ] +then +echo "usage: send_ooo path_to_pkg_folder + +The files +installed, +ooo_bundled_extension.xml, +svc-ooo_bundled_extension +must be in the current directory. The pkg.depotd or the service +application/pkg/server must listen to port 80" + +exit +fi + + +EXTENSIONPATH=/opt/openoffice.org3/share/extension/install + +eval `pkgsend -s http://localhost:80 open ooo_test@3.2-1` +pkgsend -s http://localhost:80 import $1/openofficeorg-ure +pkgsend -s http://localhost:80 import $1/ooobasis* +pkgsend -s http://localhost:80 import $1/openofficeorg3* + +pkgsend -s http://localhost:80 add file installed mode=644 owner=root group=bin path=${EXTENSIONPATH}/installed restart_fmri=svc:/application/ooo_bundled_extensions:default +pkgsend -s http://localhost:80 add file svc-ooo_bundled_extensions mode=744 owner=root group=bin path=/lib/svc/method/svc-ooo_bundled_extensions +pkgsend -s http://localhost:80 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 + +pkgsend -s http://localhost:80 add set name=description value="OOo 3.2 with dictionaries: en fr es da de" +pkgsend -s http://localhost:80 close + |