Update artifact/package/module names across all three app languages

- 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
This commit is contained in:
Jordan Rose
2022-03-22 15:23:37 -07:00
parent a0c1745f8b
commit 0542686e70
98 changed files with 68 additions and 70 deletions

View File

@@ -60,7 +60,7 @@ jobs:
swift:
- *rust_ios
- 'swift/**'
- 'SignalClient.podspec'
- 'LibSignalClient.podspec'
ignored:
- 'LICENSE'
- '*.md'
@@ -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

View File

@@ -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'

View File

@@ -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
@@ -50,7 +50,7 @@ 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.
@@ -58,8 +58,8 @@ Note that Sonatype is pretty slow; even after the build completes it might take
### 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.

View File

@@ -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])
@@ -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)
}

View File

@@ -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)'"

View File

@@ -4,7 +4,7 @@ plugins {
id 'signing'
}
archivesBaseName = "signal-client-android"
archivesBaseName = "libsignal-android"
version = version_number
group = group_info
@@ -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 {

View File

@@ -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 {
@@ -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'
}
@@ -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 : ""
}

View File

@@ -5,7 +5,7 @@ plugins {
}
sourceCompatibility = 1.8
archivesBaseName = "signal-client-java"
archivesBaseName = "libsignal-client"
version = version_number
group = group_info
@@ -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 {

View File

@@ -334,7 +334,7 @@ public class SessionBuilderTest extends TestCase {
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!
}

View File

@@ -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 {

View File

@@ -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",

2
node/zkgroup.d.ts vendored
View File

@@ -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';

View File

@@ -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');

View File

@@ -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");
}
}
}

View File

@@ -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);
@@ -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,
@@ -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");
}
}
});

View File

@@ -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");
}
}

View File

@@ -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"] }

View File

@@ -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)]

View File

@@ -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)"])]
)
]

View File

@@ -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*],

View File

@@ -5,27 +5,27 @@ 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 \
@@ -33,7 +33,7 @@ If validating SignalClient locally, use the following invocation:
--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.

View File

@@ -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.

View File

@@ -4,7 +4,7 @@
//
import XCTest
import SignalClient
import LibSignalClient
class HsmEnclaveTests: TestCaseBase {

View File

@@ -4,7 +4,7 @@
//
import XCTest
import SignalClient
import LibSignalClient
class PublicAPITests: TestCaseBase {
func testHkdfSimple() {

View File

@@ -4,7 +4,7 @@
//
import XCTest
import SignalClient
import LibSignalClient
class SessionTests: TestCaseBase {
fileprivate func initializeSessions(alice_store: InMemorySignalProtocolStore,

View File

@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
//
@testable import SignalClient
@testable import LibSignalClient
class BadStore: InMemorySignalProtocolStore {
enum Error: Swift.Error {
@@ -16,5 +16,5 @@ class BadStore: InMemorySignalProtocolStore {
// Wrapped here so that the test files don't need to use @testable import.
func sealedSenderMultiRecipientMessageForSingleRecipient(_ message: [UInt8]) throws -> [UInt8] {
return try SignalClient.sealedSenderMultiRecipientMessageForSingleRecipient(message)
return try LibSignalClient.sealedSenderMultiRecipientMessageForSingleRecipient(message)
}

View File

@@ -4,7 +4,7 @@
//
import XCTest
import SignalClient
import LibSignalClient
class ZKGroupTests: TestCaseBase {

View File

@@ -4,7 +4,7 @@
//
import XCTest
@testable import SignalClientTests
@testable import LibSignalClientTests
XCTMain([
testCase(ClonableHandleOwnerTests.allTests),