dbaccess/source/core/misc/dsntypes.cxx |    3 ++-
 dbaccess/source/ui/dlg/generalpage.cxx |    3 +++
 solenv/bin/macosx-codesign-app-bundle  |   16 +++++++++-------
 3 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 3a1f948cb6db0cd2a8abaab11aaf711419762ddc
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Tue Oct 18 13:12:29 2022 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Nov 1 11:15:24 2022 +0100

    macOS sandbox: only use com.apple.application-identifier for main package
    
    when multiple files are signed with that entitlement, the build will
    just be listed with "Not Available for Testing" via Testflight
    
    Change-Id: I92957f24513ab419ddbc4289b53175932111c198
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141497
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit 6e6c6f697b019348161648d9d26398bf64de83ef)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141701
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/solenv/bin/macosx-codesign-app-bundle 
b/solenv/bin/macosx-codesign-app-bundle
index a29b339de744..e569aef24333 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -25,11 +25,14 @@ done
 
 APP_BUNDLE="$1"
 entitlements=
+application_identifier=
 if test -n "$ENABLE_MACOSX_SANDBOX"; then
     # In a sandboxed build executables need the entitlements
     entitlements="--entitlements $BUILDDIR/lo.xcent"
+    application_identifier=`/usr/libexec/PlistBuddy -c "print 
com.apple.application-identifier"  $BUILDDIR/lo.xcent`
+    # remove the key from the entitlement - only use it when signing the whole 
bundle in the final step
+    /usr/libexec/PlistBuddy -c "delete com.apple.application-identifier"  
$BUILDDIR/lo.xcent
     # All data files are in Resources and included in the app bundle signature
-    # through that. I think.
     other_files=''
     # HACK: remove donate menu entries, need to support apple-pay and be 
verified
     # as non profit as a bare minimum to allow asking....
@@ -120,14 +123,13 @@ done
 # CFBundleExecutable from Info.plist, i.e. soffice, plus the contents
 # of the Resources tree.
 #
-# At this stage we also attach the entitlements in the sandboxing case
-#
-# Also omit some files from the Bundle's seal via the resource-rules
-# (bootstraprc and similar that the user might adjust and image files)
 # See also https://developer.apple.com/library/mac/technotes/tn2206/
 
-id=`echo ${PRODUCTNAME} | tr ' ' '-'`
-
+if test -n "$ENABLE_MACOSX_SANDBOX" && test -n "$application_identifier"; then
+    # add back the application-identifier to the entitlements
+    # testflight/beta-testing won't work if that key is used when signing the 
other executables
+    /usr/libexec/PlistBuddy -c "add com.apple.application-identifier string 
$application_identifier"  $BUILDDIR/lo.xcent
+fi
 codesign --force --options=runtime --identifier="${MACOSX_BUNDLE_IDENTIFIER}" 
--sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$APP_BUNDLE" || exit 1
 
 exit 0
commit 6469cb727410eaf088fc4e2c716e00f015cb0551
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Fri Oct 21 15:48:30 2022 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Nov 1 11:15:10 2022 +0100

    tdf#151073 - enable firebird for appstore build w/o experimental mode
    
    also don't default to hsqldb as embedded database when a build is done
    without java support. Mainly to hide an UI bug - apparently the dialog
    should show a non-supported message for known embedded drivers
    at least that is what 04d1e80ac7091ec2bf31c8617e832d5fe15350be suggests
    "
      // this indicates it's really a type which is known in general, but not 
supported on the current platform
      // show a message saying so
      //  eSpecialMessage = smUnsupportedType;
      insertDatasourceTypeEntryData( m_eCurrentSelection, sDisplayName );
      // remember this type so we can show the special message again if the 
user selects this
      // type again (without changing the data source)
      m_eNotSupportedKnownType = m_pCollection->determineType( 
m_eCurrentSelection );
    "
    but that doesn't work, at least not anymore. m_eNotSupportedKnownType was
    since removed, no attempts are made in showing an error/warning message
    returning the hsqldb driver results in an empty (no display string)
    entry as the default element in the dropdown in the dialog, that still
    allows to create a database file (but of course one that you cannot add
    any actual database tables to) without any error message. At the very
    least it is inconsistent with the rest of the dialog's code that clears
    the input name for stuff that shouldn't be shown.
    
    Change-Id: I8419888018be2a556c49d32e40f02c0ac1801930
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141631
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit d0a20b67ae7ee1691409b4a1665853a182c46b7b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141705
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/dbaccess/source/core/misc/dsntypes.cxx 
b/dbaccess/source/core/misc/dsntypes.cxx
index 06eb5545f354..d8ceed402546 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_java.h>
 #include <dsntypes.hxx>
 #include <unotools/confignode.hxx>
 #include <o3tl/safeint.hxx>
@@ -287,7 +288,7 @@ bool ODsnTypeCollection::isEmbeddedDatabase( 
std::u16string_view _sURL )
 
 OUString ODsnTypeCollection::getEmbeddedDatabase()
 {
-    if (officecfg::Office::Common::Misc::ExperimentalMode::get())
+    if (!HAVE_FEATURE_JAVA || 
officecfg::Office::Common::Misc::ExperimentalMode::get())
         return "sdbc:embedded:firebird";
     else
         return "sdbc:embedded:hsqldb";
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 5809b7bd7088..f7017187bf09 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 #include <core_resource.hxx>
 #include "dsnItem.hxx"
 #include "generalpage.hxx"
@@ -154,9 +155,11 @@ namespace dbaui
                 if (m_xEmbeddedDBType->find_text(sDisplayName) == -1 &&
                     
dbaccess::ODsnTypeCollection::isEmbeddedDatabase(sURLPrefix))
                 {
+#if !HAVE_FEATURE_MACOSX_SANDBOX
                     if( 
!officecfg::Office::Common::Misc::ExperimentalMode::get()
                         && sURLPrefix.startsWith("sdbc:embedded:firebird") )
                         continue;
+#endif
                     aDisplayedTypes.emplace_back( sURLPrefix, sDisplayName );
                     m_bIsDisplayedTypesEmpty = false;
                 }

Reply via email to