From 5bdbceaad84c72c4a6babc0610fede3b03285778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 11 Feb 2012 21:11:30 +0000 Subject: [PATCH] make sure .tree files don't get busted again --- libreoffice-ensure-non-broken-xml-tree.patch | 129 +++++++++++++++++++ libreoffice.spec | 7 +- 2 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 libreoffice-ensure-non-broken-xml-tree.patch diff --git a/libreoffice-ensure-non-broken-xml-tree.patch b/libreoffice-ensure-non-broken-xml-tree.patch new file mode 100644 index 0000000..fb18874 --- /dev/null +++ b/libreoffice-ensure-non-broken-xml-tree.patch @@ -0,0 +1,129 @@ +diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk +index 65d5a80..b544f74 100644 +--- a/solenv/gbuild/gbuild.mk ++++ b/solenv/gbuild/gbuild.mk +@@ -313,6 +313,14 @@ gb_XSLTPROCTARGET := $(call gb_Executable_get_target_for_build,xsltproc) + gb_XSLTPROC := $(gb_Helper_set_ld_path) $(gb_XSLTPROCTARGET) + endif + ++ifeq ($(SYSTEM_LIBXML_FOR_BUILD),YES) ++gb_XMLLINTTARGET := ++gb_XMLLINT := xsltproc ++else ++gb_XMLLINTTARGET := $(call gb_Executable_get_target_for_build,xsltproc) ++gb_XMLLINT := $(gb_Helper_set_ld_path) $(gb_XMLLINTTARGET) ++endif ++ + ifeq ($(SYSTEM_PYTHON),YES) + gb_PYTHONTARGET := + gb_PYTHON := $(PYTHON) +diff --git a/solenv/inc/unitools.mk b/solenv/inc/unitools.mk +index 0418fc1..4de797c 100644 +--- a/solenv/inc/unitools.mk ++++ b/solenv/inc/unitools.mk +@@ -42,6 +42,14 @@ XSLTPROC=$(AUGMENT_LIBRARY_PATH) xsltproc + .ENDIF # "$(SYSTEM_LIBXSLT)"!="YES" + .ENDIF + ++.IF "$(XMLLINT)"=="" ++.IF "$(SYSTEM_LIBXML)"!="YES" ++XMLLINT=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xmllint ++.ELSE # "$(SYSTEM_LIBXML)"!="YES" ++XMLLINT=$(AUGMENT_LIBRARY_PATH) xmllint ++.ENDIF # "$(SYSTEM_LIBXML)"!="YES" ++.ENDIF ++ +diff --git a/translations/source/nb/helpcontent2/source/text/scalc.po b/translations/source/nb/helpcontent2/source/text/scalc.po +index 79d8255..eea430f 100644 +--- a/translations/source/nb/helpcontent2/source/text/scalc.po ++++ b/translations/source/nb/helpcontent2/source/text/scalc.po +@@ -177,7 +177,7 @@ msgstr "Bildelinja vises når du setter inn eller + + #: main0203.xhp#tit.help.text + msgid "Drawing Object Properties Bar" +-msgstr "Linja Egenskaper for tegneobjekter" ++msgstr "Linja \"Egenskaper for tegneobjekter\"" + + #: main0203.xhp#hd_id3154346.1.help.text + msgid "Drawing Object Properties Bar" +diff --git a/translations/source/nn/helpcontent2/source/text/scalc.po b/translations/source/nn/helpcontent2/source/text/scalc.po +index 9105195..d8573a3 100644 +--- a/translations/source/nn/helpcontent2/source/text/scalc.po ++++ b/translations/source/nn/helpcontent2/source/text/scalc.po +@@ -179,7 +179,7 @@ msgstr "Biletlinja blir vist når du set inn eller + + #: main0203.xhp#tit.help.text + msgid "Drawing Object Properties Bar" +-msgstr "Linja Eigenskapar for teikneobjekt" ++msgstr "Linja \"Eigenskapar for teikneobjekt\"" + + #: main0203.xhp#hd_id3154346.1.help.text + msgid "Drawing Object Properties Bar" +@@ -207,7 +207,7 @@ msgstr "Bak + + #: main0210.xhp#tit.help.text + msgid "Page Preview Bar" +-msgstr "Linja Førehandsvis sida" ++msgstr "Linja \"Førehandsvis sida\"" + + #: main0210.xhp#hd_id3156023.1.help.text + msgid "Page Preview Bar" +diff --git a/translations/source/nn/helpcontent2/source/text/swriter.po b/translations/source/nn/helpcontent2/source/text/swriter.po +index 80768e6..4aaf28f 100644 +--- a/translations/source/nn/helpcontent2/source/text/swriter.po ++++ b/translations/source/nn/helpcontent2/source/text/swriter.po +@@ -516,7 +516,7 @@ msgstr "Desse hjelpeemna er tilgjengelege for menyar og dialogvindauge." + + #: main0205.xhp#tit.help.text + msgid "Drawing Object Properties Bar" +-msgstr "Verktøylinja Eigenskapar for teikneobjekt" ++msgstr "Verktøylinja \"Eigenskapar for teikneobjekt\" + + #: main0205.xhp#hd_id3154275.1.help.text + msgid "Drawing Object Properties Bar" +@@ -597,7 +597,7 @@ msgstr "Dette er ei oversikt over verktøylinjene i $[officename] Writer.Tabell" ++msgstr "Verktøylinja \"Tabell\"" + + #: main0204.xhp#hd_id3145587.1.help.text + msgid "Table Bar" +diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl +index 8dc7bf4..80befc2 100644 +--- a/helpcontent2/helpers/update_tree.pl ++++ b/helpcontent2/helpers/update_tree.pl +@@ -46,6 +46,7 @@ terminate() if ( ! defined $inpath ); + + my $destpath = $inpath; + my $with_lang = $ENV{WITH_LANG}; ++my $xmllint = $ENV{XMLLINT}; + + + # Always use / directory separators +@@ -308,6 +309,7 @@ sub processtreefiles { + unlink "$tree_dest/$lng/$tv" ; + my $ret=mv $treetmpfile , "$tree_dest/$lng/$tv$inpath" or &terminate("Cannot write to $tree_dest/$lng/$tv$inpath - Error $!"); + my $ret=mv "$tree_dest/$lng/$tv$inpath" , "$tree_dest/$lng/$tv" or &terminate("Cannot write to $tree_dest/$lng/$tv - Error $!"); ++ system("$xmllint --noout --noent $tree_dest/$lng/$tv") == 0 or &terminate("$tree_dest/$lng/$tv is illformed xml (xmllint)" ); + } + } else { + &terminate("Cannot write to $tvout"); +diff --git a/helpcontent2/source/auxiliary/makefile.mk b/helpcontent2/source/auxiliary/makefile.mk +index 45ab373..049879b 100644 +--- a/helpcontent2/source/auxiliary/makefile.mk ++++ b/helpcontent2/source/auxiliary/makefile.mk +@@ -60,9 +60,11 @@ aux_alllangiso_all:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$ + aux_alllangiso:=$(foreach,i,$(aux_alllangiso_all) $(foreach,j,$(help_exist) $(eq,$i,$j $i $(NULL)))) + + WITH_LANG!:=$(aux_alllangiso) +- + .EXPORT : WITH_LANG + ++XMLLINT !:=$(XMLLINT) ++.EXPORT : XMLLINT ++ + LOCTREEFILES:=$(foreach,i,$(aux_alllangiso) $(foreach,j,$(TREEFILES) $(COMMONMISC)$/$i$/$j)) + .ELSE #IF "$(WITH_LANG)"!="" + aux_langdirs:=en-US diff --git a/libreoffice.spec b/libreoffice.spec index 74aa0da..c966cf5 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -34,7 +34,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: 3.5.0.3 -Release: 1%{?dist} +Release: 3%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic Group: Applications/Productivity URL: http://www.documentfoundation.org/develop @@ -123,6 +123,7 @@ Patch13: 0001-move-binfilter-mime-types-into-extra-.desktop-file.patch Patch14: 0001-Resolves-rhbz-788042-skip-splashscreen-with-quicksta.patch Patch15: 0001-Resolves-fdo-43644-survive-registered-but-unavailabl.patch Patch16: 0001-make-hsqldb-build-with-java-1.7.patch +Patch17: libreoffice-ensure-non-broken-xml-tree.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -818,6 +819,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch14 -p1 -b .rhbz788042-skip-splashscreen-with-quicksta.patch %patch15 -p1 -b .fdo43644-survive-registered-but-unavailabl.patch %patch16 -p1 -b .make-hsqldb-build-with-java-1.7.patch +%patch17 -p1 -b .ensure-non-broken-xml-tree.patch # TODO: check this # these are horribly incomplete--empty translations and copied english @@ -2115,6 +2117,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Sat Feb 11 2012 Caolán McNamara - 3.5.0.3-3 +- make sure .tree files don't get busted again + * Tue Feb 07 2012 Stephan Bergmann - 3.5.0.3-2 - junit4 -> junit - Resolves: rhbz#788042 skip splashscreen with quickstarter