diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2020-03-19 11:23:31 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-03-19 11:23:31 +0100 |
commit | 59ac7623101c6c728819291199d8683d49d5f95e (patch) | |
tree | 57899effb14693299d48a217b7e1689c42a4b6b1 /solenv | |
parent | 53e0c512d39795ecd4e23191ae5a6a9bd63ba4a9 (diff) | |
parent | 6229fc671b90ccceaf01067c92f08127f72d0f42 (diff) |
Merge branch 'libreoffice-6-4' into
distro/lhm/libreoffice-6-4+backports
Change-Id: I6ce433221ed737d2783c4518d9884d6a82e04e77
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/simplepackage.pm | 34 | ||||
-rw-r--r-- | solenv/gbuild/CliLibrary.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/platform/macosx.mk | 12 |
3 files changed, 38 insertions, 11 deletions
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index 78a09e78e5e5..b32f77d3bef6 100644 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -391,7 +391,7 @@ sub create_package chdir $localfrom; - if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && $ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" ) { + if ( $ENV{'MACOSX_CODESIGNING_IDENTITY'} ) { my @lp_sign = ('codesign', '--verbose', '--sign', $ENV{'MACOSX_CODESIGNING_IDENTITY'}, '--deep', $appfolder); if (system(@lp_sign) == 0) { $infoline = "Success: \"@lp_sign\" executed successfully!\n"; @@ -405,7 +405,7 @@ sub create_package { my $subdir = "$tempdir/$packagename/$volume_name_classic_app.app/Contents/Resources"; if ( ! -d $subdir ) { installer::systemactions::create_directory($subdir); } - if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && $ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" ) + if ( $ENV{'MACOSX_CODESIGNING_IDENTITY'} ) { $systemcall = "$ENV{'SRCDIR'}/solenv/bin/macosx-codesign-app-bundle $localtempdir/$folder/$volume_name_classic_app.app"; print "... $systemcall ...\n"; @@ -425,7 +425,35 @@ sub create_package } } } + elsif ($volume_name_classic_app eq 'LibreOffice SDK' || $volume_name_classic_app eq 'LibreOfficeDev SDK') + { + if ( $ENV{'MACOSX_CODESIGNING_IDENTITY'} ) + { + my $sdkbindir = "$localtempdir/$folder/$allvariables->{'PRODUCTNAME'}$allvariables->{'PRODUCTVERSION'}_SDK/bin"; + opendir(my $dh, $sdkbindir); + foreach my $sdkbinary (readdir $dh) { + next unless -f "$sdkbindir/$sdkbinary"; + $systemcall = "codesign --force --verbose --options=runtime --identifier='$ENV{MACOSX_BUNDLE_IDENTIFIER}.$sdkbinary' --sign '$ENV{MACOSX_CODESIGNING_IDENTITY}' --entitlements $ENV{SRCDIR}/hardened_runtime.xcent $sdkbindir/$sdkbinary > /tmp/codesign_losdk_$sdkbinary.log 2>&1"; + print "... $systemcall ...\n"; + my $returnvalue = system($systemcall); + $infoline = "Systemcall: $systemcall\n"; + push( @installer::globals::logfileinfo, $infoline); + if ($returnvalue) + { + $infoline = "ERROR: Could not execute \"$systemcall\"!\n"; + push( @installer::globals::logfileinfo, $infoline); + } + else + { + $infoline = "Success: Executed \"$systemcall\" successfully!\n"; + push( @installer::globals::logfileinfo, $infoline); + unlink "/tmp/codesign_losdk_$sdkbinary.log"; + } + } + closedir($dh); + } + } my $megabytes = 1500; $megabytes = 2000 if $ENV{'ENABLE_DBGUTIL'}; $systemcall = "cd $localtempdir && hdiutil create -megabytes $megabytes -srcfolder $folder $archive -ov -fs HFS+ -volname \"$volume_name\" -format UDBZ"; @@ -695,3 +723,5 @@ sub create_simple_package } 1; + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/solenv/gbuild/CliLibrary.mk b/solenv/gbuild/CliLibrary.mk index e0adb83db978..5c6c3f9b935d 100644 --- a/solenv/gbuild/CliLibrary.mk +++ b/solenv/gbuild/CliLibrary.mk @@ -41,6 +41,9 @@ $(call gb_Output_announce,$(2),$(true),CSC,3) $(CLI_CSCFLAGS) \ -target:library \ -out:$(1) \ + $(if $(call gb_LinkTarget__symbols_enabled,$(1)),\ + -debug:pdbonly \ + -pdb:$(call gb_LinkTarget__get_pdb_filename,$(WORKDIR)/LinkTarget/Library/$(notdir $(1)))) \ -keyfile:$(CLI_KEYFILE) \ -reference:System.dll \ $(foreach assembly,$(CLI_ASSEMBLIES),-reference:$(assembly)) \ diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index eec2b052cb7e..e7362a503395 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -90,11 +90,9 @@ $(if $(filter Executable,$(1)),\ $$(call gb_Library_get_layer,$(2))) endef -# We sign executables right after linking below. But not dylibs, -# because many of them are built by ad-hoc or 3rd-party mechanisms. So -# as we would need to sign those separately anyway, we do it for the -# gbuild-built ones, too, after an app bundle has been constructed, in -# the solenv/bin/macosx-codesign-app-bundle script. +# We cannot sign executables early since Mojave/Catalina would treat them as +# restricted binary and ignore any DYLD_LIBRARY_PATH setting - So all +# signing is handled by the solenv/bin/macosx-codesign-app-bundle script. # And the soffice executable needs to be signed last in # macosx-codesign-app-bundle, as codesign would fail complaining that other # parts of the app have not yet been signed: @@ -129,10 +127,6 @@ $(call gb_Helper_abbreviate_dirs,\ $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl app $(LAYER) $(1) &&) \ $(if $(filter Library Bundle CppunitTest,$(TARGETTYPE)),\ $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl $(LAYER) $(1) &&) \ - $(if $(MACOSX_CODESIGNING_IDENTITY), \ - $(if $(filter Executable,$(TARGETTYPE)), \ - $(if $(filter-out $(call gb_Executable_get_target,soffice_bin),$(1)), \ - codesign --identifier=$(MACOSX_BUNDLE_IDENTIFIER).$(notdir $(1)) --sign $(MACOSX_CODESIGNING_IDENTITY) --options=runtime --force $(1) &&))) \ $(if $(filter Library,$(TARGETTYPE)),\ otool -l $(1) | grep -A 5 LC_ID_DYLIB \ > $(WORKDIR)/LinkTarget/$(2).exports.tmp && \ |