readlicense_oo/Package_files.mk | 4 ++++ solenv/bin/macosx-codesign-app-bundle | 31 ++++++++++++++++++++++--------- ucb/source/ucp/file/filtask.cxx | 7 ++++++- 3 files changed, 32 insertions(+), 10 deletions(-)
New commits: commit 3c946d688627ba0c31bcb37dfed4e6e180608854 Author: Tor Lillqvist <[email protected]> Date: Wed Feb 22 17:13:13 2017 +0200 Put also the LICENSE file in Resources on macOS Change-Id: Ia4888050099e74b93af67c58e988b4ae9e2516a1 diff --git a/readlicense_oo/Package_files.mk b/readlicense_oo/Package_files.mk index 1f06bdd..0570a79 100644 --- a/readlicense_oo/Package_files.mk +++ b/readlicense_oo/Package_files.mk @@ -12,7 +12,11 @@ $(eval $(call gb_Package_Package,readlicense_oo_files,$(SRCDIR)/readlicense_oo/l # LICENSE (upper case) is copied without EOL conversion # license.txt is converted, prior to copy, see Package_license.mk ifneq ($(OS),WNT) +ifneq ($(OS),MACOSX) $(eval $(call gb_Package_add_file,readlicense_oo_files,LICENSE,LICENSE)) +else +$(eval $(call gb_Package_add_file,readlicense_oo_files,Resources/LICENSE,LICENSE)) +endif endif ifneq ($(OS),MACOSX) commit ca7f30506cb05f64d4688faba366a12c86bb36dc Author: Tor Lillqvist <[email protected]> Date: Wed Feb 22 14:23:46 2017 +0200 Need <sys/stat.h> when HAVE_FEATURE_MACOSX_SANDBOX Change-Id: I401679ae6cbc8f924126589cfb9f22fb244e7da2 diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index 2f2a758..b64df36 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -17,8 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <sal/config.h> +#if HAVE_FEATURE_MACOSX_SANDBOX +#include <sys/stat.h> +#endif + #include <com/sun/star/beans/IllegalTypeException.hpp> #include <com/sun/star/beans/NotRemoveableException.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -35,7 +41,6 @@ #include <com/sun/star/ucb/NameClash.hpp> #include <com/sun/star/ucb/OpenCommandArgument.hpp> #include <com/sun/star/ucb/Store.hpp> -#include <config_features.h> #include <rtl/uri.hxx> #include "filtask.hxx" commit b06edd5a07f18b0999adc0084b8133eb6481f867 Author: Tor Lillqvist <[email protected]> Date: Wed Feb 22 12:57:46 2017 +0200 Improve error handling and fix some problems Use the -e and -o pipefail bash option to make the script fail more reliably if some command inside a pipeline fails. Use the -u option to catch mistyped variable names. Move the signing of executables in the bundle's Contents/MacOS after signing nested bundles. Change-Id: I21d441bcb2dbfc19b0cb5718b76402b1686d2239 diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle index 50057b6..3db837e 100755 --- a/solenv/bin/macosx-codesign-app-bundle +++ b/solenv/bin/macosx-codesign-app-bundle @@ -1,5 +1,12 @@ #!/bin/bash +# Exit on errors +set -e +# Use of unset variable is an error +set -u +# If any part of a pipeline of commands fails, the whole pipeline fails +set -o pipefail + # Script to sign executables, dylibs and frameworks in an app bundle plus the bundle itself. Called # from installer::simplepackage::create_package() in solenv/bin/modules/installer/simplepackage.pm # and the test-install target in Makefile.in. @@ -58,18 +65,10 @@ while read file; do codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$file" || exit 1 done -# Sign executables - -find "$APP_BUNDLE/Contents/MacOS" -type f | -while read file; do - id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'` - codesign --force --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$file" || exit 1 -done - # Sign included bundles. First .app ones (i.e. the Python.app inside # the LibreOfficePython.framework. Be generic for kicks...) -find "$APP_BUNDLE" -name '*.app' -type d | +find "$APP_BUNDLE"/Contents -name '*.app' -type d | while read app; do fn=`basename "$app"` fn=${fn%.*} @@ -100,6 +99,20 @@ while read bundle; do codesign --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. --sign "$MACOSX_CODESIGNING_IDENTITY" "$bundle" || exit 1 done +# Sign executables + +find "$APP_BUNDLE/Contents/MacOS" -type f | +while read file; do + case "$file" in + */soffice) + ;; + *) + id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'` + codesign --force --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$file" || exit 1 + ;; + esac +done + # Sign the app bundle as a whole which means (re-)signing the # CFBundleExecutable from Info.plist, i.e. soffice, plus the contents # of the Resources tree (which unless you used _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
