Bug 1437351 - Update mp4parse import script for v0.10.0. r?kinetik draft
authorRalph Giles <giles@mozilla.com>
Tue, 13 Feb 2018 15:54:01 -0800
changeset 754933 f693a15fb2b401a32fca44c3d77b01894fbc1cd1
parent 754870 e293877d13a5236119adb706c97c55ea9e11868b
child 754934 407c65acf3c753aaf278f1449aa63c3c8c452047
push id99063
push userbmo:giles@thaumas.net
push dateWed, 14 Feb 2018 17:26:43 +0000
reviewerskinetik
bugs1437351
milestone60.0a1
Bug 1437351 - Update mp4parse import script for v0.10.0. r?kinetik Port our build patch and request the v0.10.0 tag by default. MozReview-Commit-ID: 6TSCsgtZ8UT
media/mp4parse-rust/mp4parse-cargo.patch
media/mp4parse-rust/mp4parse_capi/Cargo.toml
media/mp4parse-rust/update-rust.sh
--- a/media/mp4parse-rust/mp4parse-cargo.patch
+++ b/media/mp4parse-rust/mp4parse-cargo.patch
@@ -1,50 +1,55 @@
 diff --git a/media/libstagefright/binding/mp4parse/Cargo.toml b/media/libstagefright/binding/mp4parse/Cargo.toml
 index ff9422c..814c4c6 100644
 --- a/media/libstagefright/binding/mp4parse/Cargo.toml
 +++ b/media/libstagefright/binding/mp4parse/Cargo.toml
-@@ -20,18 +20,12 @@ exclude = [
+@@ -19,13 +19,9 @@
+   "*.mp4",
  ]
  
 -[badges]
 -travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" }
  
  [dependencies]
- byteorder = "1.0.0"
+ byteorder = "1.2.1"
 -afl = { version = "0.3", optional = true }
 -abort_on_panic = { version = "1.0.0", optional = true }
  bitreader = { version = "0.3.0" }
- num-traits = "0.1.37"
+ num-traits = "0.2.0"
  mp4parse_fallible = { version = "0.0.1", optional = true }
+@@ -33,6 +29,3 @@
  
  [dev-dependencies]
  test-assembler = "0.1.2"
- 
+-
 -[features]
 -fuzz = ["afl", "abort_on_panic"]
+
 diff --git a/media/libstagefright/binding/mp4parse_capi/Cargo.toml b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
 index a30e045..a965f06 100644
 --- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
 +++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-@@ -18,20 +18,13 @@ exclude = [
+@@ -18,22 +18,13 @@
    "*.mp4",
  ]
  
 -[badges]
 -travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" }
 +build = false
  
  [dependencies]
- byteorder = "1.0.0"
+ byteorder = "1.2.1"
+-env_logger = "0.5.3"
+ log = "0.4"
  
  # To enable fallible memory allocation, add 'features = ["mp4parse_fallible"]'
  # in mp4parse brace.
--mp4parse = {version = "0.9.1", path = "../mp4parse"}
-+mp4parse = {version = "0.9.1", path = "../mp4parse", features = ["mp4parse_fallible"]}
- num-traits = "0.1.37"
- 
+-mp4parse = {version = "0.10.0", path = "../mp4parse"}
++mp4parse = {version = "0.10.0", path = "../mp4parse", features = ["mp4parse_fallible"]}
+ num-traits = "0.2.0"
+-
 -[build-dependencies]
--cbindgen = "0.3.1"
+-cbindgen = "0.4.3"
 -
 -[features]
 -fuzz = ["mp4parse/fuzz"]
 -
--- a/media/mp4parse-rust/mp4parse_capi/Cargo.toml
+++ b/media/mp4parse-rust/mp4parse_capi/Cargo.toml
@@ -13,17 +13,18 @@ license = "MPL-2.0"
 
 repository = "https://github.com/mozilla/mp4parse-rust"
 
 # Avoid complaints about trying to package test files.
 exclude = [
   "*.mp4",
 ]
 
-build = false
+[badges]
+travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" }
 
 [dependencies]
 byteorder = "1.0.0"
 
 # To enable fallible memory allocation, add 'features = ["mp4parse_fallible"]'
 # in mp4parse brace.
 mp4parse = {version = "0.9.1", path = "../mp4parse", features = ["mp4parse_fallible"]}
 num-traits = "0.1.37"
--- a/media/mp4parse-rust/update-rust.sh
+++ b/media/mp4parse-rust/update-rust.sh
@@ -1,36 +1,28 @@
 #!/bin/sh -e
 # Script to update mp4parse-rust sources to latest upstream
 
 # Default version.
-VER=ec45de038401d060d826ed87d71e4c67b33a8db3
+VER="v0.10.0"
 
 # Accept version or commit from the command line.
 if test -n "$1"; then
   VER=$1
 fi
 
 echo "Fetching sources..."
 rm -rf _upstream
 git clone https://github.com/mozilla/mp4parse-rust _upstream/mp4parse
 git clone https://github.com/alfredoyang/mp4parse_fallible _upstream/mp4parse_fallible
 pushd _upstream/mp4parse
 git checkout ${VER}
 echo "Verifying sources..."
-pushd mp4parse
 cargo test
 popd
-echo "Constructing C api header..."
-pushd mp4parse_capi
-cargo build
-echo "Verifying sources..."
-cargo test
-popd
-popd
 rm -rf mp4parse
 mkdir -p mp4parse/src
 cp _upstream/mp4parse/mp4parse/Cargo.toml mp4parse/
 cp _upstream/mp4parse/mp4parse/src/*.rs mp4parse/src/
 mkdir -p mp4parse/tests
 cp _upstream/mp4parse/mp4parse/tests/*.rs mp4parse/tests/
 cp _upstream/mp4parse/mp4parse/tests/*.mp4 mp4parse/tests/
 rm -rf mp4parse_capi