From c78b49ec132eb5126445ebee7d259d3df7fcaa68 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Wed, 29 Jun 2022 13:17:14 +0200 Subject: don't specify entitlements that are not used (sdremote w/o bluetooth) the network.server entitlement is only needed when the sdremote is enabled, and the bluetooth one only when the bluetooth part is built. Also warn about bluetooth not being built because of obsoleted/removed API. It was "silently" dropped before (lost in the flood of configure output). Change-Id: I38d83aa1132307b5b4b5d6dceba8f9020ffb2373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136617 Tested-by: Jenkins Reviewed-by: Christian Lohmaier --- Makefile.in | 1 + configure.ac | 9 +++++++++ lo.xcent | 29 ----------------------------- lo.xcent.in | 26 ++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 lo.xcent create mode 100644 lo.xcent.in diff --git a/Makefile.in b/Makefile.in index ed231eaade1e..29208d2765cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -225,6 +225,7 @@ distclean : clean compilerplugins-clean $(BUILDDIR)/hardened_runtime.xcent \ $(BUILDDIR)/instsetoo_native/util/openoffice.lst \ $(BUILDDIR)/solenv/lockfile/autoconf.h \ + $(BUILDDIR)/lo.xcent \ $(BUILDDIR)/sysui/desktop/macosx/Info.plist \ $(BUILDDIR)/vs-code*.code-workspace* $(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \; diff --git a/configure.ac b/configure.ac index f66a1392fd45..919c3a8533e0 100644 --- a/configure.ac +++ b/configure.ac @@ -5590,6 +5590,7 @@ if test "$cross_compiling" = "yes"; then config_host.mk.in \ config_host_lang.mk.in \ Makefile.in \ + lo.xcent.in \ bin/bffvalidator.sh.in \ bin/odfvalidator.sh.in \ bin/officeotron.sh.in \ @@ -11760,6 +11761,8 @@ AC_MSG_CHECKING([whether to enable Impress remote control]) if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then AC_MSG_RESULT([yes]) ENABLE_SDREMOTE=TRUE + SDREMOTE_ENTITLEMENT=" com.apple.security.network.server + " AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control]) if test $OS = MACOSX && test "$MACOSX_SDK_VERSION" -ge 101500; then @@ -11767,6 +11770,7 @@ if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then if test "$enable_sdremote_bluetooth" = yes; then AC_MSG_ERROR([macOS SDK $macosx_sdk does not currently support --enable-sdremote-bluetooth]) fi + add_warning "not building the bluetooth part of the sdremote - used api was removed from macOS SDK 10.15" enable_sdremote_bluetooth=no fi # If not explicitly enabled or disabled, default @@ -11816,6 +11820,9 @@ if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then AC_MSG_RESULT([no]) ENABLE_SDREMOTE_BLUETOOTH= SYSTEM_BLUEZ= + SDREMOTE_ENTITLEMENT="$SDREMOTE_ENTITLEMENT + com.apple.security.device.bluetooth + " fi else ENABLE_SDREMOTE= @@ -11824,6 +11831,7 @@ else fi AC_SUBST(ENABLE_SDREMOTE) AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH) +AC_SUBST(SDREMOTE_ENTITLEMENT) AC_SUBST(SYSTEM_BLUEZ) dnl =================================================================== @@ -14681,6 +14689,7 @@ AC_CONFIG_LINKS([include:include]) AC_CONFIG_FILES([config_host.mk config_host_lang.mk Makefile + lo.xcent bin/bffvalidator.sh bin/odfvalidator.sh bin/officeotron.sh diff --git a/lo.xcent b/lo.xcent deleted file mode 100644 index 56bb981916fe..000000000000 --- a/lo.xcent +++ /dev/null @@ -1,29 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.files.bookmarks.app-scope - - com.apple.security.files.bookmarks.document-scope - - com.apple.security.files.bookmarks.collection-scope - - com.apple.security.files.user-selected.read-write - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.device.bluetooth - - com.apple.security.print - - com.apple.security.cs.disable-executable-page-protection - - - com.apple.security.personal-information.addressbook - - - diff --git a/lo.xcent.in b/lo.xcent.in new file mode 100644 index 000000000000..9a0838fbc388 --- /dev/null +++ b/lo.xcent.in @@ -0,0 +1,26 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.bookmarks.app-scope + + com.apple.security.files.bookmarks.document-scope + + com.apple.security.files.bookmarks.collection-scope + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + com.apple.security.print + + com.apple.security.cs.disable-executable-page-protection + + + com.apple.security.personal-information.addressbook + +@SDREMOTE_ENTITLEMENT@ + + -- cgit