-
Notifications
You must be signed in to change notification settings - Fork 55
Add some notes on signing configuration while building Servo on OpenHarmony platform #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RichardTjokroutomo
wants to merge
2
commits into
servo:main
Choose a base branch
from
RichardTjokroutomo:ohos-notes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -133,31 +133,39 @@ When using the `hvigor` tool, this can be accomplished by setting a static `sign | |||||||||
| The `signingConfigs` property is an array of objects with the following structure: | ||||||||||
|
|
||||||||||
| ```json | ||||||||||
| { | ||||||||||
| "name": "default", | ||||||||||
| "type": "<OpenHarmony or HarmonyOS>", | ||||||||||
| "material": { | ||||||||||
| "certpath": "/path/to/app-signing-certificate.cer", | ||||||||||
| "storePassword": "<encrypted password>", | ||||||||||
| "keyAlias": "debugKey", | ||||||||||
| "keyPassword": "<encrypted password>", | ||||||||||
| "profile": "/path/to/signed-profile-certificate.p7b", | ||||||||||
| "signAlg": "SHA256withECDSA", | ||||||||||
| "storeFile": "/path/to/java-keystore-file.p12" | ||||||||||
| [ | ||||||||||
| { | ||||||||||
| "name": "default", | ||||||||||
| "type": "<OpenHarmony or HarmonyOS>", | ||||||||||
| "material": { | ||||||||||
| "certpath": "/path/to/app-signing-certificate.cer", | ||||||||||
| "storePassword": "<encrypted password>", | ||||||||||
| "keyAlias": "debugKey", | ||||||||||
| "keyPassword": "<encrypted password>", | ||||||||||
| "profile": "/path/to/signed-profile-certificate.p7b", | ||||||||||
| "signAlg": "SHA256withECDSA", | ||||||||||
| "storeFile": "/path/to/java-keystore-file.p12" | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
| ] | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Here `<encrypted password>` is a hexadecimal string representation of the plaintext password after being encrypted. | ||||||||||
| The key and salt used to encrypt the passwords are generated by DevEco Studio IDE and are stored on-disk alongside the certificate files and keystore, usually under `<USER HOME>/.ohos/config/openharmony`. | ||||||||||
| The key and salt used to encrypt the passwords are generated by DevEco Studio IDE and are stored on-disk alongside the certificate files and keystore, usually under `<USER HOME>/.ohos`. | ||||||||||
|
|
||||||||||
| You can use the IDE to generate the information needed for password encryption, the required application and profile certificate files, and the keystore itself. | ||||||||||
| To generate the information needed for password encryption, the required application and profile certificate files, and the keystore itself, you can clone a [sample ArkTS app](https://github.com/jschwe/ServoDemo) and open it on DevEco Studio IDE. Note that since signing information is tied to the bundle name, not all ArkTS app will work, and therefore it is **highly** recommended to use the sample ArkTS app mentioned above. | ||||||||||
|
|
||||||||||
| 1. Open Project Structure dialog from `File > Project Structure` menu. | ||||||||||
| 2. Under the 'Signing Config' tab, enable the 'Automatically generate signature' checkbox. | ||||||||||
|
|
||||||||||
| **NOTE: The signature autogenerated above is intended only for development and testing. For production builds and distribution via an App Store, the relevant configuration needs to be obtained from the App Store provider.** | ||||||||||
|
|
||||||||||
| >For Linux users, DevEco Studio is only available on Windows and MacOS. To proceed, **you will need another Windows / MacOS machine with DevEco Studio IDE installed** to create the signing keys. If you're developing for OpenHarmony boards (such as HopeRun development board), then you can name the `SigningConfigs` `default`. Otherwise, set it to `hos` if you're developing Servo for HarmonyOS devices (such as Huawei Mate series phones). | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| > | ||||||||||
| > Once the keys have been generated, you will need to move the entire directory that stores the keys (usually under `<USER HOME>/.ohos/`) generated by DevEco Studio from your Windows / MacOS machine. | ||||||||||
| > | ||||||||||
| > Additionally, you also need to copy `SigningConfigs` from `build-profile.json5` generated by DevEco Studio from your Windows / MacOS machine to a `.json` file in your Linux machine. This will serve as a "signing material" `mach` can later refer. | ||||||||||
jschwe marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| Once generated, it is necessary to point `mach` to the above "signing material" configuration using the `SERVO_OHOS_SIGNING_CONFIG` environment variable. | ||||||||||
| The value of the variable must be a file path to a valid `.json` file with the same structure as the `signingConfigs` property given above, but with `certPath`, `storeFile` and `profile` given as *paths relative to the json file*, instead of absolute paths. | ||||||||||
|
|
||||||||||
|
|
||||||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.