summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2024-03-18Fix typoAndrea Gelmini
Change-Id: I40e237a2acfe67cb9b40f1018e1a236616b2fe29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164971 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-03-18reduce symbol visibility in svxNoel Grandin
Change-Id: I6d98aab59799365c9a0052f259cd5c8208d995bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-18find-unneeded-includes: add option to detect unneeded namespacesGabor Kelemen
Sometimes there are unneeded namespaces included, these can be detected from the IWYU output. This mode makes a suggestion to remove these, then in a subsequent normal run some more headers can be detected as unnecessary, whose presence was justified by the "using namespace" statement. Change-Id: I45616537925ec0d09039edf3d9237ffbd13e2410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164939 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-18update output of scriptNoel Grandin
and trim the classes.results file, we are not interested in the low numbers Change-Id: If9ed3178b94cb65b3d8cfdcd7836196cb1a335ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164925 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-18reduce symbol visibility in svxNoel Grandin
Change-Id: I8d103f3607f273677f075ae800f2f8477c751e83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-17reduce symbol visibility in vclNoel Grandin
Change-Id: Ibe6154dc5de6251fb39952caa190d53a6fd1fd89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164926 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-16reduce symbol visibility in vclNoel Grandin
Change-Id: Ia56bb092a4634e301ff8922ae63e6f7ede874d80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-15crashreportScraper: fix version comparisonXisco Fauli
And remove version column, it's not very relevant anyway Change-Id: I9101d5f63aec237cdcbfc6eb3759714cca7c5328 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164849 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-14reduce symbol visibility in vclNoel Grandin
Change-Id: Ifaa37246e79678aa0c548b9ca8a9faf8036b9195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-12improve script to find classes where making the class hiddenNoel Grandin
will provide the biggest benefit Change-Id: I78ae044612ae1fea7496db1b420848f43e552504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-12GetNonEndOfPathToken can be privateCaolán McNamara
Change-Id: Iebf8b84c205eee083ecf8b436520911ba132fe5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-10Adapt CustomTarget_postprocess/check_dynamic_objects to --enable-mergelibs=moreStephan Bergmann
...which, after recent changes, failed now with > [CHK] CustomTarget/postprocess/check_dynamic_objects/check.done > instdir/program/libmergedlo.so has suspicious NEEDED: libgssapi_krb5.so.2 > instdir/program/libmergedlo.so has suspicious NEEDED: libcom_err.so.2 > instdir/program/libmergedlo.so has suspicious NEEDED: libkrb5.so.3 Change-Id: I80de1dd85f06d0e27b73355def68da9df2f6c2cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164606 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-07CppunitTest_sw_ooxmlexport5: turn on set_non_application_font_useXisco Fauli
From bin/replace_missing_fonts.sh: Replacing 'Tahoma' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo77887.docx Replacing 'Thorndale' with 'Liberation Serif' in sw/qa/extras/ooxmlexport/data//ooo96040-2.odt Replacing 'Tahoma' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//ooo96040-2.odt Replacing 'Albany' with 'Liberation Sans' in sw/qa/extras/ooxmlexport/data//ooo96040-2.odt Replacing 'Trebuchet MS' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo77727.docx Replacing 'Times' with 'Liberation Serif' in sw/qa/extras/ooxmlexport/data//fdo77727.docx Replacing 'Tahoma' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo77727.docx Replacing 'Century Gothic' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo77727.docx Replacing 'Lucida Sans Unicode' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo77727.docx Replacing 'Candara' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo77727.docx Replacing 'Tahoma' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo78420.docx Replacing 'Verdana' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo78420.docx Replacing 'Gill Sans MT' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo79822.docx Replacing 'Tahoma' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//fdo79822.docx Change-Id: I298d9007ae6bd59a8a804902524b59ac524618c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164548 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-07CppunitTest_sw_ooxmlexport6: turn on set_non_application_font_useXisco Fauli
From bin/replace_missing_fonts.sh: Replacing 'Kings Caslon Text' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/TestVMLData.docx Replacing 'Impact' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/fdo74110.docx Replacing 'Century Gothic' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/gradient-fill-preservation.docx Replacing 'Kings Caslon Text' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/image_data.docx Replacing 'Segoe UI' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf119054.docx Replacing 'DINPro-Medium' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf128752.docx Replacing 'Open Sans Light' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf153891.docx Replacing 'Lora - regular' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf153891.docx Replacing 'Century Gothic' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf153891.docx Replacing 'Segoe UI' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf153891.docx Replacing 'Times' with 'Liberation Serif' in sw/qa/extras/ooxmlexport/data/tdf93676-1.odt Replacing 'FreeSans' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/tdf93676-1.odt Replacing 'Times' with 'Liberation Serif' in sw/qa/extras/ooxmlexport/data/testOuterShdw.docx Replacing 'Jokerman' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/testOuterShdw.docx Replacing 'Century Gothic' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data/testOuterShdw.docx Replacing 'Calibri Light' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//tdf119054.docx Replacing 'Calibri Light' with 'Noto Sans' in sw/qa/extras/ooxmlexport/data//tdf132514.docx Also remove some replacements in replace_missing_fonts.sh which are not needed Change-Id: Ife0e4a6852907e658b2f2ed42c91b26b5eb06572 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164536 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-07ResetDefaultSystemCurrency can be privateCaolán McNamara
only called by a friend from the same .so Change-Id: I5f63e83325b291b95b0132089dc331f3b7e79362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07IsSpecialStandardFormat can be private, only used internallyCaolán McNamara
and rename to ImpIsSpecialStandardFormat Change-Id: Ie20c83906559f94e545f384807396ec8acf970f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164537 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07replace_missing_fonts: Only replace string if between quotesXisco Fauli
Change-Id: Id7d1b4326cf37250c3ae6d163223e1a492fbfde4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164535 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-07bin: rename script to replace_missing_fontsXisco Fauli
Change-Id: Ib88141919484f363825e0d242b42e9a0e8ab18a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164534 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-07CppunitTest_sw_ooxmlw14export: turn on set_non_application_font_useXisco Fauli
Using bin/replace_string_in_zip.sh: Replacing 'Calibri Light' with 'Noto Sans' in /home/xisco/libreoffice//sw/qa/extras/ooxmlexport/data//TextEffects_StylisticSets_CntxtAlts.docx Replacing 'Segoe Script' with 'Noto Sans' in /home/xisco/libreoffice//sw/qa/extras/ooxmlexport/data//TextEffects_StylisticSets_CntxtAlts.docx Change-Id: I482bfad110e546d0d9a9a0d0bbcca2c9ad63033e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164525 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-05bin: Add initial script to replace missing fontsXisco Fauli
It already contains some replacements I found along the way For now it works with docx, xlsx and pptx files. I have to test it with odf formats. Change-Id: Ia68bc7561f0e41580ad1834a1a345b618f3e688c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164393 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-29add writerfilter to --enable-mergedlibs=moreNoel Grandin
Change-Id: I5b04b5e4a1023fc4da61bdcf148829f899e501d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164152 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-25Create an UNO service to do the cui symbol lookup in vclNoel Grandin
which means I can remove one usage of gb_Library_set_plugin_for, which is blocking linking the cui module into --enable-mergelibs=more Change-Id: Ic6cd48377627f94747037c7247a1cd398738b390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-25Unescape double quotes escaped by another double quote in definesMike Kaganski
Otherwise, e.g. SRCDIR is defined as ""C:/lo/core"", which is not a proper string literal. Change-Id: Id7b503ea21735892b504dbc861f66c250db01e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163902 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-20merge desktop_detector library into vcl libraryNoel Grandin
Noting that the main feature of using a separate library - avoiding linking against SM and ICE - is no longer a thing, since we have not used those in some time. Change-Id: I9ecd6758e97f0fa19b224346aa577a04b46793b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-20simplify this python scriptNoel Grandin
I dont need to exclude the .so files that have been merged, they exist, but they contain only a dummy string Change-Id: I3b008859f4c3d4831025c082dd589e55c46ef078 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163639 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-19hide more symbolsNoel Grandin
using the bin/find-can-be-private-symbols.py script to find classes with large numbers of exported symbols that can hidden. before exported = 58104 imported = 30810 unused_exports = 35433 after exported = 55094 imported = 31073 unused_exports = 32423 Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-15Revert "merge sdui library into sd"Noel Grandin
This reverts commit 2cf7c26293462406d91ee050c6677930065e660b. Reason for revert: <_rene_> noelgrandin: sdui->sd... and what about people not needing that ui? <_rene_> (e.g. --disable-gui and libreoffice-draw-nogui and impress-nogui) <_rene_> i.e. the use case of --convert-to for ppt(x) etc Change-Id: I6755c209e63f34b3fc9f9fdc4af7001b18579e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163348 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-14update find-mergedlib-can-be-private results fileNoel Grandin
so that in future I know that these are false positives Change-Id: Ic52b591f51f28e8f656465417da1d0714450094c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-14merge sdui library into sdNoel Grandin
which eliminates another dynamic-symbol lookup and another complication which was making it harder to do better with --enable-mergedlibs sd is relatively small, so even the combined library is not as big as one of the sw and sc libraries Change-Id: Ibef8077d70a5abc7361c95f5dbb8c43447610188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-13crashreportScraper: no need to go to the last page anymoreXisco Fauli
JJ changed the way the reports are sorted to show the most recent ones on page 1 Change-Id: I59d566ff45fd8a75263b70a1e436e4263422e93b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163239 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-12use more UNLESS_MERGELIBSNoel Grandin
Change-Id: I351a9127fb26369d8f598b6d6519d7e490fa476b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-31qtcreator: Fix generating .pro files for externalsMichael Weghorn
Since commit 3460799175e6c5795aa07c784e16d10ba9081d49 Date: Thu Jan 25 23:41:52 2024 +0600 Clear gb_GbuildToJson_DENYLISTEDMODULES, allow these modules , externals are taken into account in the generation of IDE integrations, causing errors like this when running `make qtcreator-ide-integration` to generate the *.pro files for the QtCreator IDE integration: cd /home/michi/development/git/libreoffice && bin/gbuild-to-ide --ide qtcreator --make make ERROR : creating pro file=/home/michi/development/git/libreoffice/clucene/clucene.pro [Errno 2] No such file or directory: '/home/michi/development/git/libreoffice/clucene/clucene.pro' Traceback (most recent call last): File "/home/michi/development/git/libreoffice/bin/gbuild-to-ide", line 1787, in emit with open(qt_pro_file, mode) as fpro: ^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/michi/development/git/libreoffice/clucene/clucene.pro' Fix this by creating the .pro files in a directory that has the same relative path to the $(BUILDDIR) as the corresponding .mk files have in the $(SRCDIR) rather than in $(BUILDDIR)/$(LIBNAME)/. While both are the same for LO's internal modules, the latter directory does not exist for externals, since they're located underneath a top-level directory called "external". For the simple case of an in-tree build, this now e.g. creates a file `external/clucene/clucene.pro` instead of failing to create a `clucene/clucene.pro` because there's no top-level "clucene" directory. An alternative approach might to just ignore the externals, as this commit implemented it for the codelite integration: commit 41c8e0957369b7b53a3b9cf4b4cf1e49a982a414 Date: Sat Jan 27 21:54:10 2024 +0200 fix codelite-ide-integration externals seems to be part of the list of modules now, but I don't know how to deal with that, so just ignore them. (In that case, they wouldn't be part of the project, speeding up update of the clang code model after changes, but then not providing features like code navigation and autocompletion etc.) Change-Id: Idb04af5f7445955e5dbf9ec3fd8626bbcb09ab11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162837 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-01-30add hy to bin/lo-xlate-langRene Engelhard
Change-Id: I1205da81fc179affa58478860928e74a501d4c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162644 Tested-by: René Engelhard <rene@debian.org> Tested-by: Jenkins Reviewed-by: René Engelhard <rene@debian.org>
2024-01-28fix codelite-ide-integrationNoel Grandin
externals seems to be part of the list of modules now, but I don't know how to deal with that, so just ignore them. Change-Id: Ic42d0b27562247b12cf9393659298cda56d1572c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162648 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-26Clear gb_GbuildToJson_DENYLISTEDMODULES, allow these modulesMike Kaganski
Filter "empty" targets in Visual Studio solutions: it makes little sense to add generated files to projects (they aren't intended for editing in IDE); so most external libraries, which only have "generated" sources, and aren't part of core anyway, would have zero source files in their projects - thus excluded. Handle C++/CLI files; use their specific CXXCLRFLAGS (set them to the source files explicitly, overriding CXXFLAGS set on the project level). While here, do the same with CFLAGS and C files. Do not add H(XX) files (with names identical to C(XX) files) to the VS projects. This adds a tiny subset of all headers, which is inconsistent. Change-Id: I6bd932277287d3444bb547b93f2867d226072d60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162582 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-25Fix typoAndrea Gelmini
Change-Id: Iea9aa138ae2e38635d4a717e8518f83d3775ee9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162411 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-01-25Deduplicate, refactor and simplify GbuildLinkTarget initializationMike Kaganski
Change-Id: I0c2d9823454ff84af2967c20a383b334e4933967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162550 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-25add static libraries to gbuildtojsonMike Kaganski
... and to vs-ide-integration solution. Change-Id: I5085e6a61df4bc03cfe595a1e6b99196f6f73643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162524 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-22Create MAR updates from msi rather than from archiveStephan Bergmann
...as the former is more convenient for release engineering (see the discussion in the comments at <https://gerrit.libreoffice.org/c/core/+/162157/1#message-8d7ebbcc64a87ee8e4a073ae1a05e3b74f5a3d6a> "Also enable --with-package-format=archive for LibreOfficeWin64.conf"). Instead of ONLINEUPDATE_MAR_OLDARCHIVE and ONLINEUPDATE_MAR_OLDMETADATA make variables, the create-partial-info target now only needs an ONLINEUPDATE_MAR_OLDMSI make variable. TODO: There are two issues when comparing the content of msi files (extracted with msiexec /a), which the old code comparing the content of archives had tried to somewhat (but not fully) address with the metadata files that I had invented (and now reverted): For one, msiexec /a also extracts content that would normally be installed somewhere else in the system (e.g., it extracts Fonts, System, and System64 directories). Differences in those directories will cause a MAR update to create those directories in the installation directory, rather than to update the corresponding files in their actual locations. For another, optional components are not recognized as such, but their content must be added to the MAR file as add/patch-if, not as plain add/patch. To work around that, for now *all* files are added as add/patch-if, conditional on the files themselves. Thus, addition of files will cause a MAR update to miss them. (As they now exclusively operate on msi files, the create-update-info and create-partial-info targets are no longer meaningful for non-Windows platforms, so drop the non-Windows bin/update/create_full_mar_for_languages.py part.) Change-Id: Ifb55b5e7d1a201b4f50a27cb449a634b96c2e29b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162399 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-22use portable "command -v" to detect installed programs, part 4Eli Schwartz
The "which" utility is not guaranteed to be installed either, and if it is, its behavior is not portable either. This means that when various programs are installed, the `which` check will report a fatal error because the which tool did not exist and the shell returned a nonzero status when attempting to fork+exec. If it did exist, it might not be an implementation of `which` that returns nonzero when commands do not exist. The general scripting suggestion is to use the "command -v" shell builtin; this is required to exist in all POSIX 2008 compliant shells, and is thus guaranteed to work everywhere. For some in-depth discussions on the topic, see: - https://mywiki.wooledge.org/BashFAQ/081 - https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250 Examples of open-source shells likely to be installed as /bin/sh on Linux, which implement the 15-year-old standard: ash, bash, busybox, dash, ksh, mksh and zsh. This commit updates a couple build scripts to not rely on fixed paths calculated upfront. Checking the location of a tool with cmd=$(which foo) just to run it as `$cmd` is pointless. It's exactly equivalent to run it as `foo`, but less error-prone and easier to read. For one of the scripts, it also simplifies checking for their existence. Personally, I am skeptical it even makes sense to check at all. POSIX mandates they exist, and it's exceedingly unlikely they will not be installed. However, unlike the shell interpreter itself, we don't *know* they are installed, so leave the existing checks in but simplified. Change-Id: I4703c1165eb3a5aeb45fbab18df3222e8f5f9551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160665 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-01-22use portable "command -v" to detect installed programs, part 2Eli Schwartz
The "which" utility is not guaranteed to be installed either, and if it is, its behavior is not portable either. This means that when various programs are installed, the `which` check will report a fatal error because the which tool did not exist and the shell returned a nonzero status when attempting to fork+exec. If it did exist, it might not be an implementation of `which` that returns nonzero when commands do not exist. The general scripting suggestion is to use the "command -v" shell builtin; this is required to exist in all POSIX 2008 compliant shells, and is thus guaranteed to work everywhere. For some in-depth discussions on the topic, see: - https://mywiki.wooledge.org/BashFAQ/081 - https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250 Examples of open-source shells likely to be installed as /bin/sh on Linux, which implement the 15-year-old standard: ash, bash, busybox, dash, ksh, mksh and zsh. This commit updates the build system to configure and build correctly on systems without `which`. Change-Id: I23dbde5c7f104dd610fd5f78c82bf9a7d0cc1930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160663 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-01-19Rename natstepfilter file, to make it not hidden on LinuxMike Kaganski
It turns out, that this also works, despite all the documentation refers to it as '.natstepfilter'. Change-Id: I17ab0662a3de0e0f7db72e31f5e7ed0f00823447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162311 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2024-01-19Add a natstepfilter file to Visual Studio solutionMike Kaganski
Allows to avoid stepping into some functions, like smart pointer's operator->(), when debugging. Change-Id: Ia930ad6b0c94c9caefad8ac026252fced1265fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162304 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-16Remove unused `make upload-update-info`Stephan Bergmann
Change-Id: Ifdec48aaf53b0444c2d7ceef554f64795e2f2c38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162172 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-14ofz#65619 fuzzing needs com.sun.star.i18n.Transliteration.IGNORE_CASE tooCaolán McNamara
Change-Id: Ic084abb703795a8463e85271cb34347323b07863 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162028 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-12Further adapting of create-partial-infoStephan Bergmann
...along the lines of what had already been done for create-update-info, passing files to the mar executable with an -f files.txt instead of on the command line (which could grow too long for Windows), and taking the archive metadata into account. For the latter, `make create-partial-info` now expects a second make variable, ONLINEUPDATE_MAR_OLDMETADATA, in addition to ONLINEUPDATE_MAR_OLDARCHIVE. And there is a new TODO in update/create_partial_update.py that the old and new metadata should be compared for problematic changes. (For now, any such changes would just get lost by an update.) Change-Id: Ide45adedb72958fc32c5b26aa7ebb01530ccf3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161972 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-11Fix `make create-partial-info` (for Windows, at least)Stephan Bergmann
I got lost trying to figure out how the original bin/update/create_partial_update.py code was meant to obtain old and new installation trees to diff, so I simplified that down to the create-partial-info make target now expecting an ONLINEUPDATE_MAR_OLDARCHIVE make variable that points at the old archive install set. (And the --with-online-update-mar-serverurl configure option is gone for good again.) The remaining changes are similar to what was needed in 28bad382face10be75af3875e44dde89fbc78108 "Fix `make create-update-info` (for Windows, at least)". (And the mbsdiff and mar tools expect Windows-style pathnames, but mktemp returns a Unix-style pathname in cygwin shell scripts, so this needed an additional Windows-only external/onlineupdate/cygpath.patch.) Change-Id: I40690210d62e3f26fb2d574914a0dd4323e6cd62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161924 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-11Make create-update-info handle conditional contentStephan Bergmann
That make target operates on an archive, but generates data to be applied to an msi installation, so suffers from any mismatch between archive and msi install sets. Two such mismatches, at least on Windows, are: 1 Files that msi will install outside the LibreOffice installation itself (but which for an archive install set are included under LibreOffice/). This covers (at least) .Net assemblies and associated files that are installed in the GAC (scp2 styles ASSEMBLY and ASSIGNCOMPONENT) and fonts (scp2 style FONT). 2 Files that msi will only install conditionally. This covers optional components (many of which in scp2 are assigned to gid_Module_Optional_... modules) and user interface languages (which in scp2 are assigned to gid_Module_Langpack_... modules). The approach taken here is to create a workdir/installation/LibreOffice/archive/install/metadata file while building an archive install set, and to record any files matching 1 (as "skip" lines) or 2 (as "cond" lines). Then, the create-update-info target uses that metadata file to act accordingly on those files: 1 Files from "skip" lines are simply removed for now from the extracted archive that is passed to Mozilla's make_full_update.sh script. (TODO: That means that changes to such files will not be updated with the MAR update mechanism. This would apparently need some extra processing during the MAR update.) 2 Files from "cond" lines shall be recorded as add-if in the mar file manifest. Mozilla's make_full_update.sh script already has support for emitting add-if vs. plain add, but only for files under distribution/extensions/, which doesn't match our needs. So we generate from the metadata file an ifs file that we pass into the make_full_update.sh script, and patch that script to also take that ifs file into account. (Each line in the ifs file is of the form "testfile" "file" which works as long as none of the pathnames contains double quote characters. The Mozilla script code appears to be confused about the arguments to make_add_instruction(), where this ifs file will be needed: There are calls to make_add_instruction() with two or three arguments across make_full_update.sh and make_incremental_update.sh, but make_add_instruction() checks $1, $2, and $4 (but not $3), so leave that mess alone and pass the ifs file as a global IFSFILE variable instead.) The mar file manifest `add-if "testfile" "file"` adds "file" only if "testfile" is already present, and those two can be different files. TODO: However, for simplicity, for now I always use "file" also as the "testfile" (so that an add-if file only gets updated if it was already present). That avoids having to identify a specific "key file" for each optional component and for each user interface language, where that key file would be used as the add-if testfile. But on the other hand, it means that if an optional component or a user interface language will bring along a completely new file in the future, we will not install that file during a MAR update. What obviously remains to be done is to properly assign each add-if file to a specific key file. (And the current way of identifying add-if files by gid_Module_... names appears to be too simplistic too. For example, there are some gid_Module_Optional_... that are installed unconditionally for msi; but it should be harmless that those files are recorded as add-if rather than as plain add.) Change-Id: I2fdeed92604f3a2d8a0b500b9e3fa421cfb6a9cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161917 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-10Adapt create-update-info to --with-langStephan Bergmann
...where, depending on --without-lang/--with-lang=fu ba bz/--with-lang=ALL, the directory and archive file names appear to vary wildly, so go with a glob approach instead of trying to guess the exact matching names here Change-Id: I07355724f28eea66e619eb8d3d83c3e74217f54f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161885 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-10ofz#65655 build failure, github svn now disabledCaolán McNamara
Change-Id: Id0d0fe466c9081560be9628b72d7002a8e5eadfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161886 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>