VirtualBox

Changeset 83675 in vbox


Ignore:
Timestamp:
Apr 10, 2020 5:49:31 PM (5 years ago)
Author:
vboxsync
Message:

GAs/darwin/Installer: Add previously missing executable signing (just kexts were signed), and introduce the usual central code signing support (which also includes notarization).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/darwin/Installer/Makefile.kmk

    r82968 r83675  
    186186                --identifier org.VirtualBox.mpkg.GuestAdditions \
    187187                --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    188                 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
     188                $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
    189189                $@
     190ifdef VBOX_SIGNING_MODE
     191 if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
     192        @# Sign the created pkg.
     193        $(call VBOX_SIGN_PKG_FN,$@,org.VirtualBox.mpkg.GuestAdditions)
     194  if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
     195        @# Notarize the signed pkg (includes stapling).
     196        $(call VBOX_NOTARIZE_FILE_FN,$@,org.virtualbox.VBoxGuestAdditions.$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD).$(VBOX_SVN_REV))
     197  endif
     198 endif
     199endif
    190200
    191201        @# Cleanup.
     
    273283                --install-location /Library/Extensions/ \
    274284                --ownership preserve \
    275                 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
     285                $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
    276286                $@
     287ifdef VBOX_SIGNING_MODE
     288 if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
     289        @# Sign the created pkg.
     290        $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.vboxguestadditionskexts)
     291 endif
     292endif
    277293        @# Cleanup
    278294        sudo rm -Rf \
     
    333349        # Add Uninstall.tool
    334350        $(INSTALL) -m 0755 $(VBOX_ADD_PATH_DI_SRC)/DiskImage/Uninstall.tool  "$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/"
     351ifdef VBOX_SIGNING_MODE
     352        $(call VBOX_SIGN_FILE_FN,"$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/Uninstall.tool",org.virtualbox.app.guestadditions.uninstaller)
     353endif
    335354
    336355        @# Install launchd stuff
     
    341360        $(INSTALL) -m 644 $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditionsToolsAndServices/org.virtualbox.additions.vboxservice.plist \
    342361                                                                                 "$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/LaunchDaemons/"
     362
     363        @# Sign the binaries.
     364ifdef VBOX_SIGNING_MODE
     365 ifdef VBOX_WITH_COMBINED_PACKAGE
     366        $(foreach binary, $(VBOX_DI_VB_GA_BINARIES) \
     367                ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,"$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/$(binary)",org.virtualbox.app.guestadditions.$(notdir $(binary))) )
     368        $(foreach binary, $(VBOX_DI_VB_GA_BINARIES) \
     369                ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,"$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/$(binary)-x86",org.virtualbox.app.guestadditions.$(notdir $(binary))-x86) )
     370        $(foreach binary, $(VBOX_DI_VB_GA_BINARIES) \
     371                ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,"$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/$(binary)-amd64",org.virtualbox.app.guestadditions.$(notdir $(binary))-amd64) )
     372 else
     373        $(foreach binary, $(VBOX_DI_VB_GA_BINARIES) \
     374                ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,"$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/$(binary)",org.virtualbox.app.guestadditions.$(notdir $(binary))) )
     375        $(foreach binary, $(VBOX_DI_VB_GA_BINARIES) \
     376                ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,"$(VBOX_PATH_PACK_TMP)/$(VBOX_GA_PKG).root/Library/Application Support/VirtualBox Guest Additions/$(binary)-$(KBUILD_TARGET_ARCH)",org.virtualbox.app.guestadditions.$(notdir $(binary))-$(KBUILD_TARGET_ARCH)) )
     377 endif
     378endif
    343379
    344380        @# Correct ownership
     
    353389                --install-location "/Library/" \
    354390                --ownership preserve \
    355                 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
     391                $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
    356392                $@
     393ifdef VBOX_SIGNING_MODE
     394 if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
     395        @# Sign the created pkg.
     396        $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.vboxguestadditions)
     397 endif
     398endif
    357399        @# Cleanup
    358400        sudo rm -Rf \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette