From 05d08d723000ba765afb45c648d1e4219c73e93c Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Mon, 31 Aug 2026 14:38:46 +0200 Subject: [PATCH 1/2] fix(cmake): set cmake var APPLICATION_REV_DOMAIN_INSTALLER Use a legacy installer identifier for migrating a branded client to a new bundle identifier, letting PackageKit recognize the new package as an upgrade of the existing receipt. Signed-off-by: Camila Ayres --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a3635da6ff59..7584b6b997ec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,10 +56,8 @@ if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX) endif() # need this logic to not mess with re/uninstallations via macosx.pkgproj -if(${APPLICATION_REV_DOMAIN} STREQUAL "com.owncloud.desktopclient") - set(APPLICATION_REV_DOMAIN_INSTALLER "com.ownCloud.client") -else() - set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN}) +if(NOT DEFINED APPLICATION_REV_DOMAIN_INSTALLER) + set(APPLICATION_REV_DOMAIN_INSTALLER "${APPLICATION_REV_DOMAIN}") endif() option( APPLICATION_DISPLAY_LEGACY_IMPORT_DIALOG "Display legacy import dialog" ON ) From 6907af374401bbc8dfe69457fc3674c631363352 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Mon, 31 Aug 2026 14:45:39 +0200 Subject: [PATCH 2/2] fix(osx): set BUNDLE_CAN_DOWNGRADE Enables atomic replacement of the outer @APPLICATION_NAME@.app payload during install/upgrade instead of PackageKit's default file by file diff. Without this, installing a rebranded client over an existing install like a legacy client receipt being upgraded via APPLICATION_REV_DOMAIN_INSTALLER can leave stale files from the previous bundle mixed with the new payload, producing an invalid code signature ("a sealed resource is missing or invalid") that fails Gatekeeper/launchd validation on next boot. Signed-off-by: Camila Ayres --- admin/osx/macosx.pkgproj.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/osx/macosx.pkgproj.cmake b/admin/osx/macosx.pkgproj.cmake index dc741bd0ff51c..b807a48d7eebc 100644 --- a/admin/osx/macosx.pkgproj.cmake +++ b/admin/osx/macosx.pkgproj.cmake @@ -17,6 +17,8 @@ CHILDREN + BUNDLE_CAN_DOWNGRADE + CHILDREN GID