New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 740476 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

ChromeRemoteDesktop causes iOS build to stay dirty

Project Member Reported by sdefresne@chromium.org, Jul 10 2017

Issue description

Build is always considered dirty:
$ ninja -C out/Debug-iphonesimulator
[7/7] STAMP obj/gn_all.stamp
$ ninja -C out/Debug-iphonesimulator
[7/7] STAMP obj/gn_all.stamp
$ ninja -C out/Debug-iphonesimulator -d explain -n
ninja explain: ChromeRemoteDesktopEnterprise.app/ChromeRemoteDesktopEnterprise is dirty
ninja explain: ChromeRemoteDesktopEnterprise.app/_CodeSignature/CodeResources is dirty
ninja explain: obj/ios_internal/remoting/app/ios_remoting_dogfood_app.stamp is dirty
ninja explain: output ChromeRemoteDesktop.app/ChromeRemoteDesktop doesn't exist
ninja explain: ChromeRemoteDesktop.app/ChromeRemoteDesktop is dirty
ninja explain: ChromeRemoteDesktop.app/_CodeSignature/CodeResources is dirty
ninja explain: obj/ios_internal/remoting/app/ios_remoting_google_app.stamp is dirty
ninja explain: obj/ios_internal/remoting/app/all.stamp is dirty
ninja explain: obj/ios_internal/all.stamp is dirty
ninja explain: obj/gn_all.stamp is dirty
ninja explain: obj/All.stamp is dirty
ninja explain: obj/gn_all.stamp is dirty

The interesting line is "output ChromeRemoteDesktop.app/ChromeRemoteDesktop doesn't exist". And effectively, the file does not exist after building:
$ ninja -C out/Debug-iphonesimulator
[7/7] STAMP obj/gn_all.stamp
$ ls out/Debug-iphonesimulator/ChromeRemoteDesktop.app/ChromeRemoteDesktop
ls: out/Debug-iphonesimulator/ChromeRemoteDesktop.app/ChromeRemoteDesktop: No such file or directory


 
Using "ninja -v", the step that should create ChromeRemoteDesktop.app/ChromeRemoteDesktop is the following:

python ../../build/config/ios/codesign.py code-sign-bundle -t=iphonesimulator -i= -e=../../remoting/ios/app/resources/Remoting.entitlements -b=obj/ios_internal/remoting/app/ChromeRemoteDesktop ChromeRemoteDesktop.app

This steps uses the name of the binary from Info.plist which is "chromoting". However, according to Apple documentation [1], the name of the application binary is the name of the application bundle without the .app suffix (and this is hard-coded in the template ios_app_bundle).

The fix will be in two parts:
1. fix Info.plist of ChromeRemoteDesktop to use the correct value for CFBundleExecutable (and CFBundleName),
2. fix codesign.py to fail if CFBundleExecutable value is incorrect for iOS

[1]: https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
Components: Build
Sylvain, could you please set Component when assigning the bug. Thanks!
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c63957149605af2474ac4623ddf0e3413eafacce

commit c63957149605af2474ac4623ddf0e3413eafacce
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Jul 11 12:04:01 2017

Code signing script aborts if iOS bundle is malformed.

According to the Apple documentation [1], the main binary of an iOS
application bundle should have the same name as the bundle without
the .app suffix and if the bundle name is defined it should have the
same value (only required for non-application bundles if resources
are loaded from the bundle).

Change build/config/ios/codesign.py to enforce those requirements and
fix the ios_remoting_app_tmpl used by chrome remoting iOS application.

This fix an incremental build always being considered dirty because
the ios_app_bundle template requires the correct naming of the binary
of the application bundle but did not enforce it previously.

Bug:  740476 
Change-Id: I045dd3a393c96a0240f78bab303a241de967cfcd
Reviewed-on: https://chromium-review.googlesource.com/565401
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485598}
[modify] https://crrev.com/c63957149605af2474ac4623ddf0e3413eafacce/build/config/ios/Module-Info.plist
[modify] https://crrev.com/c63957149605af2474ac4623ddf0e3413eafacce/build/config/ios/codesign.py
[modify] https://crrev.com/c63957149605af2474ac4623ddf0e3413eafacce/build/config/ios/rules.gni
[modify] https://crrev.com/c63957149605af2474ac4623ddf0e3413eafacce/docs/ios/build_instructions.md
[modify] https://crrev.com/c63957149605af2474ac4623ddf0e3413eafacce/remoting/ios/app/remoting_ios_tmpl.gni

Components: -Build
Status: Fixed (was: Started)
Removing incorrect component.

Sign in to add a comment