Skip to content

Commit

Permalink
Update artifact/package/module names across all three app languages
Browse files Browse the repository at this point in the history
- Java: org.whispersystems:signal-client-java ->
    org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
    org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
    org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
    github.com/signalapp/libsignal
  • Loading branch information
jrose-signal committed Mar 23, 2022
1 parent a0c1745 commit 0542686
Show file tree
Hide file tree
Showing 98 changed files with 68 additions and 70 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
swift:
- *rust_ios
- 'swift/**'
- 'SignalClient.podspec'
- 'LibSignalClient.podspec'
ignored:
- 'LICENSE'
- '*.md'
Expand Down Expand Up @@ -192,8 +192,7 @@ jobs:
- name: Verify that the JNI bindings are up to date
run: rust/bridge/jni/bin/gen_java_decl.py --verify

- name: Build libsignal-client-java
run: ./gradlew build
- run: ./gradlew build
working-directory: java
env:
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk-bundle
Expand Down
10 changes: 5 additions & 5 deletions SignalClient.podspec → LibSignalClient.podspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#
# Copyright 2020-2021 Signal Messenger, LLC.
# Copyright 2020-2022 Signal Messenger, LLC.
# SPDX-License-Identifier: AGPL-3.0-only
#

Pod::Spec.new do |s|
s.name = 'SignalClient'
s.name = 'LibSignalClient'
s.version = '0.14.0'
s.summary = 'A Swift wrapper library for communicating with the Signal messaging service.'

s.homepage = 'https://github.com/signalapp/libsignal-client'
s.homepage = 'https://github.com/signalapp/libsignal'
s.license = 'AGPL-3.0-only'
s.author = { 'Jack Lloyd' => 'jack@signal.org', 'Jordan Rose' => 'jrose@signal.org' }
s.source = { :git => 'https://github.com/signalapp/libsignal-client.git', :tag => "swift-#{s.version}" }
s.author = { 'Signal Developers' => 'ios@signal.org' }
s.source = { :git => 'https://github.com/signalapp/libsignal.git', :tag => "v#{s.version}" }

s.swift_version = '5'
s.platform = :ios, '10'
Expand Down
8 changes: 4 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Making a libsignal-client release
# Making a libsignal release

## 0. Make sure all CI tests are passing on the latest commit

Expand Down Expand Up @@ -50,16 +50,16 @@ Note that both the tag *and* the branch need to be pushed.

### Android: Sonatype

1. Wait for the "Publish JNI Artifacts to GitHub Release" action to complete. These artifacts, though not built reproducibly, will be included in the "testable" jar that supports running on macOS and Windows as well.
1. Wait for the "Publish JNI Artifacts to GitHub Release" action to complete. These artifacts, though not built reproducibly, will be included in the `libsignal-client` and `libsignal-server` jars to support running on macOS and Windows as well.
2. Set the environment variables `SONATYPE_USERNAME`, `SONATYPE_PASSWORD`, `KEYRING_FILE`, `SIGNING_KEY`, and `SIGNING_KEY_PASSSWORD`.
3. Run `make -C java publish_java` to build through Docker.

Note that Sonatype is pretty slow; even after the build completes it might take a while for it to show up.

### Node: NPM

In the signalapp/libsignal-client repository on GitHub, run the "Publish to NPM" action. Use the tag you just made as the "Git Tag" and leave the "NPM Tag" as "latest".
In the signalapp/libsignal repository on GitHub, run the "Publish to NPM" action. Use the tag you just made as the "Git Tag" and leave the "NPM Tag" as "latest".

### iOS: Let the iOS team know

They build all their CocoaPods on a dedicated build server, including libsignal-client.
They build all their CocoaPods on a dedicated build server, including libsignal.
4 changes: 2 additions & 2 deletions bin/update_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main():
os.chdir(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))

if len(sys.argv) > 1:
update_version('SignalClient.podspec', PODSPEC_PATTERN, sys.argv[1])
update_version('LibSignalClient.podspec', PODSPEC_PATTERN, sys.argv[1])
update_version(os.path.join('java', 'build.gradle'), GRADLE_PATTERN, sys.argv[1])
update_version(os.path.join('node', 'package.json'), NODE_PATTERN, sys.argv[1])
update_version(bridge_path('ffi'), CARGO_PATTERN, sys.argv[1])
Expand All @@ -51,7 +51,7 @@ def main():
return 0

package_versions = {
'swift': read_version('SignalClient.podspec', PODSPEC_PATTERN),
'swift': read_version('LibSignalClient.podspec', PODSPEC_PATTERN),
'java': read_version(os.path.join('java', 'build.gradle'), GRADLE_PATTERN),
'node': read_version(os.path.join('node', 'package.json'), NODE_PATTERN)
}
Expand Down
4 changes: 2 additions & 2 deletions java/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ publish_java: docker_image
-v $(KEYRING_VOLUME):/home/libsignal/keyring \
$(DOCKER_IMAGE) \
sh -c "cd src/java; ./gradlew clean publish \
-PwhisperSonatypeUsername='$(SONATYPE_USERNAME)' \
-PwhisperSonatypePassword='$(SONATYPE_PASSWORD)' \
-PsonatypeUsername='$(SONATYPE_USERNAME)' \
-PsonatypePassword='$(SONATYPE_PASSWORD)' \
-Psigning.secretKeyRingFile='/home/libsignal/keyring/$(KEYRING_FILE_ROOT)' \
-Psigning.keyId='$(SIGNING_KEY)' \
-Psigning.password='$(SIGNING_KEY_PASSWORD)'"
10 changes: 5 additions & 5 deletions java/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'signing'
}

archivesBaseName = "signal-client-android"
archivesBaseName = "libsignal-android"
version = version_number
group = group_info

Expand Down Expand Up @@ -69,12 +69,12 @@ afterEvaluate {
name = archivesBaseName
packaging = 'aar'
description = 'Signal Protocol cryptography library for Android'
url = 'https://github.com/signalapp/libsignal-client'
url = 'https://github.com/signalapp/libsignal'

scm {
url = 'scm:git@github.com:signalapp/libsignal-client.git'
connection = 'scm:git@github.com:signalapp/libsignal-client.git'
developerConnection = 'scm:git@github.com:signalapp/libsignal-client.git'
url = 'scm:git@github.com:signalapp/libsignal.git'
connection = 'scm:git@github.com:signalapp/libsignal.git'
developerConnection = 'scm:git@github.com:signalapp/libsignal.git'
}

licenses {
Expand Down
8 changes: 4 additions & 4 deletions java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def version_number = "0.14.0"

subprojects {
ext.version_number = version_number
ext.group_info = "org.whispersystems"
ext.group_info = "org.signal"

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
Expand Down Expand Up @@ -63,7 +63,7 @@ task downloadNonLinuxLibraries(type: Download) {
def extraResources = ['signal_jni.dll', 'libsignal_jni.dylib']

src(extraResources.collect {
'https://github.com/signalapp/libsignal-client/releases/download/v' + version_number + '/' + it
'https://github.com/signalapp/libsignal/releases/download/v' + version_number + '/' + it
})
dest 'shared/resources'
}
Expand All @@ -80,9 +80,9 @@ def getReleaseRepositoryUrl() {
}

def getRepositoryUsername() {
return hasProperty('whisperSonatypeUsername') ? whisperSonatypeUsername : ""
return hasProperty('sonatypeUsername') ? sonatypeUsername : ""
}

def getRepositoryPassword() {
return hasProperty('whisperSonatypePassword') ? whisperSonatypePassword : ""
return hasProperty('sonatypePassword') ? sonatypePassword : ""
}
10 changes: 5 additions & 5 deletions java/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

sourceCompatibility = 1.8
archivesBaseName = "signal-client-java"
archivesBaseName = "libsignal-client"
version = version_number
group = group_info

Expand Down Expand Up @@ -68,12 +68,12 @@ publishing {
pom {
name = archivesBaseName
description = 'Signal Protocol cryptography library for Java'
url = 'https://github.com/signalapp/libsignal-client'
url = 'https://github.com/signalapp/libsignal'

scm {
url = 'scm:git@github.com:signalapp/libsignal-client.git'
connection = 'scm:git@github.com:signalapp/libsignal-client.git'
developerConnection = 'scm:git@github.com:signalapp/libsignal-client.git'
url = 'scm:git@github.com:signalapp/libsignal.git'
connection = 'scm:git@github.com:signalapp/libsignal.git'
developerConnection = 'scm:git@github.com:signalapp/libsignal.git'
}

licenses {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public void testBadSignedPreKeyStoreError() throws InvalidKeyException, Untruste
plaintext = bobSessionCipher.decrypt(incomingMessage);
throw new AssertionError("Decrypt should have failed!");
} catch (InvalidKeyIdException e) {
throw new AssertionError("libsignal-client swallowed the exception");
throw new AssertionError("libsignal swallowed the exception");
} catch (TestBadSignedPreKeysStore.CustomException e) {
// success!
}
Expand Down
8 changes: 4 additions & 4 deletions java/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ publishing {
pom {
name = archivesBaseName
description = 'Signal Protocol cryptography library for Java (server-side)'
url = 'https://github.com/signalapp/libsignal-client'
url = 'https://github.com/signalapp/libsignal'

scm {
url = 'scm:git@github.com:signalapp/libsignal-client.git'
connection = 'scm:git@github.com:signalapp/libsignal-client.git'
developerConnection = 'scm:git@github.com:signalapp/libsignal-client.git'
url = 'scm:git@github.com:signalapp/libsignal.git'
connection = 'scm:git@github.com:signalapp/libsignal.git'
developerConnection = 'scm:git@github.com:signalapp/libsignal.git'
}

licenses {
Expand Down
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@signalapp/signal-client",
"name": "@signalapp/libsignal-client",
"version": "0.14.0",
"license": "AGPL-3.0-only",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion node/zkgroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
//

// Make it possible to import from '@signalapp/signal-client/zkgroup'.
// Make it possible to import from '@signalapp/libsignal-client/zkgroup'.
export * from './dist/zkgroup';
2 changes: 1 addition & 1 deletion node/zkgroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
//

// Make it possible to import from '@signalapp/signal-client/zkgroup'.
// Make it possible to import from '@signalapp/libsignal-client/zkgroup'.
module.exports = require('./dist/zkgroup');
4 changes: 2 additions & 2 deletions rust/bridge/ffi/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ pub unsafe extern "C" fn signal_init_logger(max_level: LogLevel, logger: FfiLogg
Ok(_) => {
log::set_max_level(log::Level::from(max_level).to_level_filter());
log::info!(
"Initializing libsignal-client version:{}",
"Initializing libsignal version:{}",
env!("CARGO_PKG_VERSION")
);
log_panics::init();
}
Err(_) => {
log::warn!("logging already initialized for libsignal-client; ignoring later call");
log::warn!("logging already initialized for libsignal; ignoring later call");
}
}
}
8 changes: 4 additions & 4 deletions rust/bridge/jni/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl JniLogger {
);
let args = jni_args!((
level.into() => int,
env.new_string("libsignal-client")? => java.lang.String,
env.new_string("libsignal")? => java.lang.String,
env.new_string(message)? => java.lang.String,
) -> void);
let result = env.call_static_method(&self.logger_class, "log", args.sig, &args.args);
Expand Down Expand Up @@ -127,7 +127,7 @@ fn set_max_level_from_java_level(max_level: jint) {
// Keep this in sync with SignalProtocolLogger.java.
let level = match max_level {
// The jni crate uses trace! in its own implementation.
2 => panic!("invalid log level (must be DEBUG or higher for libsignal-client)"),
2 => panic!("invalid log level (must be DEBUG or higher for libsignal)"),
3 => JavaLogLevel::Debug,
4 => JavaLogLevel::Info,
5 => JavaLogLevel::Warn,
Expand All @@ -154,13 +154,13 @@ pub unsafe extern "C" fn Java_org_signal_libsignal_internal_Native_Logger_1Initi
Ok(_) => {
set_max_level_from_java_level(max_level);
log::info!(
"Initializing libsignal-client version:{}",
"Initializing libsignal version:{}",
env!("CARGO_PKG_VERSION")
);
log_panics::init();
}
Err(_) => {
log::warn!("logging already initialized for libsignal-client; ignoring later call");
log::warn!("logging already initialized for libsignal; ignoring later call");
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions rust/bridge/node/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ pub(crate) fn init_logger(mut cx: FunctionContext) -> JsResult<JsUndefined> {
Ok(_) => {
set_max_level_from_js_level(max_level);
log::info!(
"Initializing libsignal-client version:{}",
"Initializing libsignal version:{}",
env!("CARGO_PKG_VERSION")
);
log_panics::init();
}
Err(_) => {
log::warn!("logging already initialized for libsignal-client; ignoring later call");
log::warn!("logging already initialized for libsignal; ignoring later call");
}
}

Expand Down
1 change: 0 additions & 1 deletion rust/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ version = "0.1.0"
authors = ["Ehren Kret <ehren@signal.org>", "Jack Lloyd <jack@signal.org>"]
edition = "2018"
license = "AGPL-3.0-only"
repository = "https://github.com/signalapp/libsignal-client"

[dependencies]
aes = { version = "0.7.4", features = ["ctr"] }
Expand Down
2 changes: 1 addition & 1 deletion rust/protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#![warn(clippy::unwrap_used)]
#![deny(unsafe_code)]

// TODO(https://github.com/signalapp/libsignal-client/issues/285): it should be an aspiration to
// TODO(https://github.com/signalapp/libsignal/issues/285): it should be an aspiration to
// eventually warn and then error for public members without docstrings. Also see
// https://doc.rust-lang.org/rustdoc/what-to-include.html for background.
// #![warn(missing_docs)]
Expand Down
12 changes: 6 additions & 6 deletions swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ import PackageDescription
let rustBuildDir = "../target/debug/"

let package = Package(
name: "SignalClient",
name: "LibSignalClient",
products: [
.library(
name: "SignalClient",
targets: ["SignalClient"]
name: "LibSignalClient",
targets: ["LibSignalClient"]
)
],
dependencies: [],
targets: [
.systemLibrary(name: "SignalFfi"),
.target(
name: "SignalClient",
name: "LibSignalClient",
dependencies: ["SignalFfi"],
exclude: ["Logging.m"]
),
.testTarget(
name: "SignalClientTests",
dependencies: ["SignalClient"],
name: "LibSignalClientTests",
dependencies: ["LibSignalClient"],
linkerSettings: [.unsafeFlags(["-L\(rustBuildDir)"])]
)
]
Expand Down
2 changes: 1 addition & 1 deletion swift/PodLibLint.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Disable arm64 simulator builds for `pod lib lint`.
// Not only does SignalClient not support it yet,
// Not only does LibSignalClient not support it yet,
// but neither do some of its indirect dependencies.
//
// This *ought* to be limited to [sdk=iphonesimulator*],
Expand Down
14 changes: 7 additions & 7 deletions swift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ This is a binding to the Signal client code in rust/, implemented on top of the

# Use as CocoaPod

1. Make sure you are using `use_frameworks!` in your Podfile. SignalClient is a Swift pod and as such cannot be compiled as a plain library.
1. Make sure you are using `use_frameworks!` in your Podfile. LibSignalClient is a Swift pod and as such cannot be compiled as a plain library.

2. Add 'SignalClient' and 'SignalCoreKit' as dependencies in your Podfile:
2. Add 'LibSignalClient' and 'SignalCoreKit' as dependencies in your Podfile:

pod 'SignalClient', git: 'https://github.com/signalapp/libsignal-client.git'
pod 'LibSignalClient', git: 'https://github.com/signalapp/libsignal.git'
pod 'SignalCoreKit', git: 'https://github.com/signalapp/SignalCoreKit.git'

3. Use `pod install` or `pod update` to build the Rust library for all targets. You may be prompted to install Rust dependencies (`cbindgen`, `rust-src`, `xargo`).

4. Build as usual. The Rust library will automatically be linked into the built SignalClient.framework.
4. Build as usual. The Rust library will automatically be linked into the built LibSignalClient.framework.


## Development as a CocoaPod

Instead of a git-based dependency, use a path-based dependency to treat SignalClient as a development pod. Since [`prepare_command`s][pc] are not run for path-based dependencies, you will need to build the Rust library yourself. (Xcode should prompt you to do this if you forget.)
Instead of a git-based dependency, use a path-based dependency to treat LibSignalClient as a development pod. Since [`prepare_command`s][pc] are not run for path-based dependencies, you will need to build the Rust library yourself. (Xcode should prompt you to do this if you forget.)

CARGO_BUILD_TARGET=x86_64-apple-ios swift/build_ffi.sh --release

The CocoaPod is configured to use the release build of the Rust library.

If validating SignalClient locally, use the following invocation:
If validating LibSignalClient locally, use the following invocation:

XCODE_XCCONFIG_FILE=swift/PodLibLint.xcconfig pod lib lint \
--platforms=ios \
--include-podspecs=../SignalCoreKit/SignalCoreKit.podspec \
--skip-import-validation \
--verbose

You will also need to have [SignalCoreKit][] checked out; the above command assumes you have checked it out as a sibling directory to libsignal-client.
You will also need to have [SignalCoreKit][] checked out; the above command assumes you have checked it out as a sibling directory to libsignal.

When exposing new APIs to Swift, you will need to add the `--generate-ffi` flag to your
`build_ffi.sh` invocation.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//

import XCTest
@testable import SignalClient
@testable import LibSignalClient

private struct FakeHandle {
// We're using the tuple to guarantee in-memory layout for this test.
Expand Down
Loading

0 comments on commit 0542686

Please sign in to comment.