Skip to content

Releases

0.3.0

Choose a tag to compare

@github-actions github-actions released this 04 Dec 06:40
bb73daf

Upgrading

  • Custom MobDeliverServer.Storage implementations: get_manifest/3
    must return {:error, :not_found} for a missing manifest. A publish now
    reads the current manifest (twice: before uploading blobs and again
    before writing the manifest); any other error stops it with
    {:error, {:get_manifest, reason}}. The publisher therefore needs read
    access to the storage, not only write access.
  • Storage without the new optional lock/4 callback keeps working, but
    must serialise publishes to one app and channel itself.
  • Rotating keys over an existing manifest now needs
    --replace-unverified (replace_unverified: true): the current
    manifest isn't signed by the new key. That's in addition to --force,
    which is still needed when the new key doesn't match the project's
    trusted_publish_key.
  • A publish killed mid-run can leave Storage.FS's
    .locks/<app>/<channel> file behind under the publish directory;
    every later publish to that channel fails with {:error, {:locked, path}} until you delete that file (rm <out>/.locks/<app>/<channel>)
    once the process named in it is gone.
  • Overlapping Storage.FS publishes to the same channel used to both
    succeed; the second now fails with {:error, {:locked, path}}.
  • An explicit :issued_at that isn't later than the current manifest's is
    refused with {:error, {:issued_at_not_after_current, issued_at, current}}.

Changed

  • A publish is dated after the manifest it replaces (MOB-486). mob_deliver
    0.4.0 and later devices refuse a manifest that isn't newer than the
    newest they've verified (its replay floor), so two publishes in one second, or one after a publish dated
    in the future, would have been refused by every device that saw the
    previous one. The new issued_at is now one second after the replaced
    manifest's when the clock isn't already later; an explicit
    :issued_at that isn't later is {:error, {:issued_at_not_after_current, issued_at, current}}, and a replaced
    manifest without a readable issued_at stops the publish with
    {:error, :unreadable_current_manifest} (--replace-unverified doesn't
    get past it: fix or remove that manifest). Only a
    replaced manifest the publishing key signed for the same app and
    channel dates the new one: any other (unsigned, another key's, another
    app's or channel's — e.g. planted on a static host's branch, dated
    years ahead to hold back every later publish) stops the publish with
    {:error, {:unverified_current_manifest, reason}} and no manifest is
    written (blobs uploaded before a re-check found it stay, unreferenced,
    for prune). replace_unverified: true / mix mob_deliver.publish --replace-unverified publishes over it, dated by the clock alone (a
    key rotation, a manifest replaced on purpose).
  • A publish reads the manifest it replaces, writes its blobs and its
    manifest under the storage's new optional lock/4 callback.
    Storage.FS implements it with an exclusive lock file
    (.locks/<app>/<channel>): an overlapping publish to the same channel
    is {:error, {:locked, path}} instead of racing to an older-dated
    current manifest. Storage without lock/4 must serialise publishes.
  • issued_at: nil is {:error, {:invalid, :issued_at, nil}} (it used to
    publish a manifest without one, or raise).

Added

  • replace_unverified: true / mix mob_deliver.publish --replace-unverified: publish over a current manifest the publishing
    key didn't sign for this app and channel.
  • Optional MobDeliverServer.Storage callback lock/4, implemented by
    Storage.FS with a lock file.
  • README: static hosting (GitHub Pages, a bucket) for mob_deliver 0.4.1's
    endpoint_type: :static: the publish directory served as it is, what
    that makes public, and to deploy only manifests/ and beam/.
  • MobDeliverServer.Manifest.verify/2: checks a manifest body's signature
    against a public key.

0.2.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 00:47

Added

  • mix mob_deliver.prune and MobDeliverServer.Storage.FS.prune/2 —
    delete blobs no manifest in the store references any more (every app
    and channel), after a grace period (--older-than, default 7d, by
    file mtime); --dry-run reports only. Blobs dropped by a publish
    within the grace period are kept, so a device that fetched the
    previous manifest can still download them. To know that,
    Storage.FS.put_manifest/4 now keeps the manifest it replaces under
    replaced/<app>/<channel>/ (pruned with the same grace period).
  • mix mob_deliver.publish refuses a signing key whose public half
    doesn't match the project's config :mob_deliver, :trusted_publish_key
    (every device built from that config would reject the manifest with
    :invalid_signature); --force publishes anyway with a warning, e.g.
    during a key rotation. Projects without that setting aren't checked.
  • MobDeliverServer.valid_app_version?/1 and gate_fields/1.

Changed

  • min_app_version must be dotted numeric (1, 1.4, 1.4.0): the
    form the client's forced-update gate compares. publish/2 and the
    task used to accept any non-empty string, which the client ignores
    (leaving the gate open). force_update_after without
    min_app_version is rejected too: the client ignores such a deadline.
    The publish task checks both flags, with a message naming the flag,
    before compiling.

Fixed

  • README "Development" described mob_deliver as both a Hex and a path
    dependency for the interop tests; it's Hex by default, or the checkout
    at MOB_DELIVER_PATH.

0.1.0-dev

Choose a tag to compare

@github-actions github-actions released this 30 Sep 10:08

Added

  • MobDeliverServer.Manifest — canonical signing payload (wire format
    v1), Ed25519 sign/2, key file format
    (ed25519-private:<base64 seed>) and public_key_string/1 for the
    client's trusted_publish_key. Pinned to mob_deliver's golden vector.
  • MobDeliverServer.build/2 — compiles a mobile/ tree against the
    current code path into stripped, deterministic, content-addressed
    BEAMs keyed like the manifest ("MyApp.HomeScreen", ":my_mod").
  • MobDeliverServer.publish/2 — writes blobs, then the signed manifest,
    through the MobDeliverServer.Storage behaviour;
    MobDeliverServer.Storage.FS ships (beam/<sha>,
    manifests/<app>/<channel>.json, temp-file + fsync + rename writes).
  • MobDeliverServer.Plug — POST /manifest and GET /beam/:sha256
    with the wire's content types and cache headers, strong ETags / 304,
    body-size limit, SHA and name validation before storage is touched.
  • mix mob_deliver.gen.key and mix mob_deliver.publish.
  • Interop tests against the real client (MobDeliver.Manifest.verify/3,
    MobDeliver.Client.fetch_manifest/1, fetch_beam/2).

0.1.0

Choose a tag to compare

@github-actions github-actions released this 30 Sep 10:21

Added

  • MobDeliverServer.Manifest — canonical signing payload (wire format
    v1), Ed25519 sign/2, key file format
    (ed25519-private:<base64 seed>) and public_key_string/1 for the
    client's trusted_publish_key. Pinned to mob_deliver's golden vector.
  • MobDeliverServer.build/2 — compiles a mobile/ tree against the
    current code path into stripped, deterministic, content-addressed
    BEAMs keyed like the manifest ("MyApp.HomeScreen", ":my_mod").
  • MobDeliverServer.publish/2 — writes blobs, then the signed manifest,
    through the MobDeliverServer.Storage behaviour;
    MobDeliverServer.Storage.FS ships (beam/<sha>,
    manifests/<app>/<channel>.json, temp-file + fsync + rename writes).
  • MobDeliverServer.Plug — POST /manifest and GET /beam/:sha256
    with the wire's content types and cache headers, strong ETags / 304,
    body-size limit, SHA and name validation before storage is touched.
  • mix mob_deliver.gen.key and mix mob_deliver.publish.
  • Interop tests against the real client (MobDeliver.Manifest.verify/3,
    MobDeliver.Client.fetch_manifest/1, fetch_beam/2).