Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/contentauth/c2pa-rs into cl…
Browse files Browse the repository at this point in the history
…aim_v2

# Conflicts:
#	sdk/src/claim.rs
  • Loading branch information
mauricefisher64 committed Oct 3, 2024
2 parents b5391ce + 75ec1c9 commit 13889dd
Show file tree
Hide file tree
Showing 100 changed files with 1,809 additions and 776 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ updates:
directory: "make_test_images"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
48 changes: 20 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
rust_version: [stable, 1.74.0]
rust_version: [stable, 1.76.0]

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -41,11 +41,11 @@ jobs:
fail-fast: false
matrix:
target: [aarch64-unknown-linux-gnu]
rust_version: [stable, 1.74.0]
rust_version: [stable, 1.76.0]

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -72,7 +72,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -95,12 +95,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
Expand All @@ -120,7 +118,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -139,31 +137,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install clippy
run: rustup component add clippy
with:
components: clippy

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
env:
RUST_BACKTRACE: "1"
- name: Run Clippy
run: cargo clippy --all-features --all-targets -- -Dwarnings

cargo_fmt:
name: Enforce Rust code format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -178,12 +170,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install nightly Rust toolchain
# Nightly is used here because the docs.rs build
# uses nightly and we use doc_cfg features that are
# not in stable Rust as of this writing (Rust 1.62).
# not in stable Rust as of this writing (Rust 1.76).
uses: dtolnay/rust-toolchain@nightly

- name: Run cargo docs
Expand Down Expand Up @@ -212,10 +204,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Audit crate dependencies
uses: EmbarkStudios/cargo-deny-action@v1
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}

Expand All @@ -224,7 +216,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -241,7 +233,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -253,7 +245,7 @@ jobs:
id: get-latest-tag

- name: Set new version
uses: paulhatch/semantic-version@v5.2.1
uses: paulhatch/semantic-version@v5.4.0
id: set-version
with:
tag_prefix: "v"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_ADMIN_COMMIT_TOKEN }}

- name: Set new proposed version
uses: paulhatch/semantic-version@v5.2.1
uses: paulhatch/semantic-version@v5.4.0
id: set-version
with:
tag_prefix: "v"
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
run: git diff

- name: Commit Cargo.toml and Cargo.lock
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
id: commit
with:
branch: nightly
Expand All @@ -82,7 +82,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: nightly

Expand All @@ -107,7 +107,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: nightly

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_ADMIN_COMMIT_TOKEN }}
Expand All @@ -20,7 +20,7 @@ jobs:
id: get-latest-tag

- name: Set new version
uses: paulhatch/semantic-version@v5.2.1
uses: paulhatch/semantic-version@v5.4.0
id: set-version
with:
tag_prefix: "v"
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Prevent empty release
if: ${{ steps.generate-changelog.outputs.changelog == '' }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed("No changes since prior release")
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
run: git diff

- name: Commit Cargo.toml and changelog
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
id: commit
with:
commit_message: Prepare ${{ steps.set-version.outputs.version }} release
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,36 @@ This project adheres to [Semantic Versioning](https://semver.org), except that

Do not manually edit this file. It will be automatically updated when a new release is published.

## 0.36.0
_23 September 2024_

* (MINOR) ensures release bumps minor version ([#592](https://github.com/contentauth/c2pa-rs/pull/592))
* fix: requires "StatusTracker" to implement "Send" ([#589](https://github.com/contentauth/c2pa-rs/pull/589))

## 0.35.1
_17 September 2024_

* Fix error when trying to sign BMFF content with Builder. ([#582](https://github.com/contentauth/c2pa-rs/pull/582))

## 0.35.0
_12 September 2024_

* upgrades to [email protected], preventing panic on invalid riff files ([#579](https://github.com/contentauth/c2pa-rs/pull/579))
* EC signature DER support ([#581](https://github.com/contentauth/c2pa-rs/pull/581))
* Update base64 requirement from 0.21.2 to 0.22.1 in /sdk ([#519](https://github.com/contentauth/c2pa-rs/pull/519))
* (MINOR) Rust API enhancements and fixes. ([#575](https://github.com/contentauth/c2pa-rs/pull/575))
* Fix GIF off by one with XMP ([#562](https://github.com/contentauth/c2pa-rs/pull/562))

## 0.34.0
_30 August 2024_

* (MINOR) Fragmented BMFF media ([#572](https://github.com/contentauth/c2pa-rs/pull/572))

## 0.33.4
_29 August 2024_

* Depend on url crate version 2.5.2 or newer ([#573](https://github.com/contentauth/c2pa-rs/pull/573))

## 0.33.3
_17 August 2024_

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ We welcome contributions to this project. For information on contributing, prov

## Requirements

The library requires **Rust version 1.74.0** or newer.
The library requires **Rust version 1.76.0** or newer.

### Supported platforms

Expand Down Expand Up @@ -83,7 +83,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
c2pa = "0.33.3"
c2pa = "0.36.0"
```

If you want to read or write a manifest file, add the `file_io` dependency to your `Cargo.toml`.
Expand All @@ -102,7 +102,6 @@ The Rust library crate provides:
* `file_io` enables manifest generation, signing via OpenSSL, and embedding manifests in various file formats.
* `add_thumbnails` will generate thumbnails automatically for JPEG and PNG files. (no longer included with `file_io`)
* `serialize_thumbnails` includes binary thumbnail data in the [Serde](https://serde.rs/) serialization output.
* `xmp_write` enables updating XMP on embed with the `dcterms:provenance` field. (Requires [xmp_toolkit](https://crates.io/crates/xmp_toolkit).)
* `no_interleaved_io` forces fully-synchronous I/O; otherwise, the library uses threaded I/O for some operations to improve performance.
* `fetch_remote_manifests` enables the verification step to retrieve externally referenced manifest stores. External manifests are only fetched if there is no embedded manifest store and no locally adjacent .c2pa manifest store file of the same name.
* `json_schema` is used by `make schema` to produce a JSON schema document that represents the `ManifestStore` data structures.
Expand Down
4 changes: 2 additions & 2 deletions export_schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "export_schema"
version = "0.33.3"
version = "0.36.0"
authors = ["Dave Kozma <[email protected]>"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.74.0"
rust-version = "1.76.0"

[dependencies]
anyhow = "1.0.40"
Expand Down
5 changes: 4 additions & 1 deletion export_schema/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{fs, path::Path};

use anyhow::Result;
use c2pa::{settings::Settings, ManifestDefinition, ManifestStore};
use c2pa::{settings::Settings, Builder, ManifestDefinition, ManifestStore};
use schemars::{schema::RootSchema, schema_for};

fn write_schema(schema: &RootSchema, name: &str) {
Expand All @@ -15,6 +15,9 @@ fn write_schema(schema: &RootSchema, name: &str) {
}

fn main() -> Result<()> {
let builder = schema_for!(Builder);
write_schema(&builder, "Builder");

let manifest_definition = schema_for!(ManifestDefinition);
write_schema(&manifest_definition, "ManifestDefinition");

Expand Down
4 changes: 2 additions & 2 deletions make_test_images/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "make_test_images"
version = "0.33.3"
version = "0.36.0"
authors = ["Gavin Peacock <[email protected]>"]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.74.0"
rust-version = "1.76.0"

[dependencies]
anyhow = "1.0.40"
Expand Down
Loading

0 comments on commit 13889dd

Please sign in to comment.