#!/usr/bin/env bash # Files listed here would not be store in the symbolestore-server. # The format is a string with files e.g. # EXCLUDE_LIST="python.exe # file.dll # next_file.exe" # # It removes "python.exe", "file.dll", and "next_file.exe" from what's # added to the symstore. Separator is the newline EXCLUDE_LIST="python.exe" # List files here where it's ok for this script to find more than one # occurrence in the build tree. Files _not_ included here will generate # an error, if duplicates are found. # # Same format as for EXCLUDE_LIST above MOREPDBS_OKLIST="libcurl.dll libcrypto-3.dll libssl-3.dll freebl3.dll libeay32.dll nspr4.dll nss3.dll nssckbi.dll nssdbm3.dll nssutil3.dll plc4.dll plds4.dll smime3.dll softokn3.dll sqlite3.dll ssl3.dll ssleay32.dll" verbose_none() { do_none= } add_pdb() { extension=$1 pdbext=$2 list=$3 stats_notfound=0 stats_found=0 stats_morefound=0 declare -a pdball echo "Collect $extension" ret=$(find "${INSTDIR}/" -type f -name "*.${extension}" | grep -vF "$EXCLUDE_LIST") while IFS= read -r file do ${VERBOSE} -n "Found: $file" # store dll/exe itself (needed for minidumps) if [ $WITHEXEC == 1 ] ; then cygpath -w "$file" >> "$list" ${VERBOSE} " insert" else ${VERBOSE} " " fi # store pdb file filename=$(basename "$file" ".${extension}") pdball+=($(grep -i "/${filename}${pdbext}" <<< ${ALL_PDBS})) if [ -n "${pdball[0]}" ]; then cygpath -w "${pdball[0]}" >> "$list" fi case ${#pdball[@]} in 0) ((++stats_notfound)) ${VERBOSE} " PDB not found" ;; 1) ((++stats_found)) ${VERBOSE} " ${pdball[0]} insert" ;; *) ((++stats_morefound)) if [ -z "$(echo $file | grep -F "$MOREPDBS_OKLIST")" ]; then echo "Error: found duplicate PDBs:" for morepdbs in ${pdball[@]} ; do echo " $morepdbs" done exit 1 else ${VERBOSE} " ${pdball[0]} insert (is in more okay list)" fi ;; esac unset pdball done < /dev/null 2>&1 || { echo "symstore.exe is expected in the PATH" exit 1 } # defaults MAX_KEEP=5 SYM_PATH=${WORKDIR}/symstore COMMENT="" COMCMD="" WITHEXEC=1 VERBOSE=verbose_none USAGE="Usage: $0 [-h|-k |-p |-c |-n|-v] -h: this cruft -c specifies a comment for the transaction -n do not store exe/dll on the symbol server -k : keep this number of old symbol versions around (default: ${MAX_KEEP}. Set to 0 for unlimited) -v verbose mode, output detail report of files -p : specify full path to symbol store tree If no path is specified, defaults to ${SYM_PATH}. " # process args while : do case "$1" in -k|--keep) MAX_KEEP="$2"; shift 2;; -p|--path) SYM_PATH="$2"; shift 2;; -c|--comment) COMCMD="/c"; COMMENT="$2"; shift 2;; -n|--noexec) WITHEXEC=0; shift ;; -v|--verbose) VERBOSE=echo; shift ;; -h|--help) echo "${USAGE}"; exit 0;; -*) echo "${USAGE}" >&2; exit 1;; *) break;; esac done if [ $# -gt 0 ]; then echo "${USAGE}" >&2 exit 1 fi # populate symbol store from here TMPFILE=$(mktemp) || exit 1 trap '{ rm -f ${TMPFILE}; }' EXIT # collect all PDBs ALL_PDBS=$(find "${WORKDIR}/" -type f -name "*.pdb") # add dlls and executables add_pdb dll .pdb "${TMPFILE}" add_pdb exe .pdb "${TMPFILE}" add_pdb bin .bin.pdb "${TMPFILE}" # stick all of it into symbol store symstore.exe add /compress /f "@$(cygpath -w "${TMPFILE}")" /s "$(cygpath -w "${SYM_PATH}")" /t "${PRODUCTNAME}" /v "${LIBO_VERSION_MAJOR}.${LIBO_VERSION_MINOR}.${LIBO_VERSION_MICRO}.${LIBO_VERSION_PATCH}${LIBO_VERSION_SUFFIX}${LIBO_VERSION_SUFFIX_SUFFIX}" "${COMCMD}" "${COMMENT}" rm -f "${TMPFILE}" # Cleanup symstore, older revisions will be removed. Unless the # .dll/.exe changes, the .pdb should be shared, so with incremental # tinderbox several revisions should not be that space-demanding. if [ "${MAX_KEEP}" -gt 0 -a -d "${SYM_PATH}/000Admin" ]; then to_remove=$(ls -1 "${SYM_PATH}/000Admin" | grep -v '\.txt' | grep -v '\.deleted' | sort | head -n "-${MAX_KEEP}") for revision in $to_remove; do echo "Remove $revision from symstore" symstore.exe del /i "${revision}" /s "$(cygpath -w "${SYM_PATH}")" done fi ov-5.0'>distro/collabora/lov-5.0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-07python3: upgrade to release 3.8.13Taichi Haradaguchi
Remove some code in external/python3/darwin.patch.0 as it was fixed upstream(https://bugs.python.org/issue45405). Change-Id: Ie6bfb2456f96a63adbf0dbcb9c902dc56f1151ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139493 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-07external/python3: Clang 13 trunk implements --print-multiarch nowStephan Bergmann
...since <https://github.com/llvm/llvm-project/commit/a921d2d2fb46b898794091e7410426c518a4f0cc> "[Driver] Add -print-multiarch", which causes an issue when building ExternalProject_python3 on macOS: > checking build system type... x86_64-apple-darwin19.6.0 > checking host system type... x86_64-apple-darwin19.6.0 [...] > checking for the platform triplet based on compiler characteristics... darwin configure: error: internal configure error for the platform triplet, please file a bug report > make[1]: *** [/Users/stephan/Software/lo/core/external/python3/ExternalProject_python3.mk:80: /Users/stephan/Software/lo/core/workdir/ExternalProject/python3/build] Error 1 as workdir/UnpackedTarball/python3/configure.ac computes PLATFORM_TRIPLET as "darwin", and instead of computing MULTIARCH as empty (as `$CC --print-multiarch` used to just print > clang: error: unsupported option '--print-multiarch' > clang: error: no input files to stderr), it now computes it as e.g. "x86_64-apple-darwin19.6.0" (or whatever -target is explicitly set to in $CC), so the check that they have equal values if they are bot nonempty fails now when building against Clang 13 trunk. (This is not yet an issue with any Apple Clang version, though.) Until this is eventually fixed upstream at <https://github.com/python/cpython>, just keep pretending that `clang --print-multiarch` would cause no stdout output on macOS when determining MULTIARCH. Change-Id: Ic1b27c6791b327d5709a9d61a6d675c3fa8989bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-29external/python3: Work around macOS Clang trunk errorStephan Bergmann
..."target does not support '.file' without a number", which was introduced into LLVM with <http://llvm.org/viewvc/llvm-project?view=revision&revision=349976> "[MC] Enable .file support on COFF and diagnose it on unsupported targets", stating: "The 'single parameter' .file directive appears to be an ELF-only featurea [sic] that is intended to insert the main source filename into the string table table [sic]." And <https://sourceware.org/binutils/docs-2.31/as/File.html> states about the default single (file name) argument version: "This statement may go away in future: it is only recognized to be compatible with old as programs." As external/python3 builds just fine on macOS with that .file directive removed, lets just do that for now. Change-Id: Ib28c29d0cacd151437447ccb2f6cfb8925e3e85a Reviewed-on: https://gerrit.libreoffice.org/65704 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>