[tbb-commits] [tor-browser-build/master] Bug 34012: Bump cbindgen to 0.14.3

sysrqb at torproject.org sysrqb at torproject.org
Fri Jul 17 03:48:22 UTC 2020


commit afde138413480325be06b290b652397e85cdff5a
Author: Georg Koppen <gk at torproject.org>
Date:   Thu Jun 11 10:11:29 2020 +0000

    Bug 34012: Bump cbindgen to 0.14.3
    
    We add a new project to not interfere with non-mobile toolchain
    requirements for now until both series are moved to the non-ESR release
    train.
---
 projects/fenix-cbindgen/build  | 32 ++++++++++++++++++++++++++++++++
 projects/fenix-cbindgen/config | 16 ++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/projects/fenix-cbindgen/build b/projects/fenix-cbindgen/build
new file mode 100644
index 0000000..c63a783
--- /dev/null
+++ b/projects/fenix-cbindgen/build
@@ -0,0 +1,32 @@
+#!/bin/bash
+[% c("var/set_default_env") -%]
+distdir=/var/tmp/dist
+builddir=/var/tmp/build/[% project %]
+mkdir -p $distdir/[% project %]
+tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/rust') %]
+export PATH="/var/tmp/dist/fenix-rust/bin:$PATH"
+mkdir -p /var/tmp/build
+tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
+
+# Now prepare the offline build
+# Move the directory for hardcoding the path in .cargo/config
+mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
+tar -C $builddir -xjf cbindgen-vendor-[% c('version') %].tar.bz2
+cd $builddir
+mkdir .cargo
+cat > .cargo/config << 'EOF'
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "/var/tmp/build/fenix-cbindgen/vendor"
+EOF
+
+cargo build --release --frozen --target x86_64-unknown-linux-gnu
+mv target/x86_64-unknown-linux-gnu/release/cbindgen $distdir/[% project %]
+
+cd $distdir
+[% c('tar', {
+        tar_src => [ project ],
+        tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
+    }) %]
diff --git a/projects/fenix-cbindgen/config b/projects/fenix-cbindgen/config
new file mode 100644
index 0000000..c081451
--- /dev/null
+++ b/projects/fenix-cbindgen/config
@@ -0,0 +1,16 @@
+# vim: filetype=yaml sw=2
+version: 0.14.3
+git_url: https://github.com/eqrion/cbindgen
+git_hash: cc2876f709808a52d132a5f84e53ca1964eb92db # v0.14.3
+filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
+
+var:
+  container:
+    use_container: 1
+input_files:
+  - project: container-image
+  - name: rust
+    project: fenix-rust
+  # `cargo vendor vendor` in the `cbindgen` directory has vendored the sources.
+  - URL: https://people.torproject.org/~gk/mirrors/sources/cbindgen-vendor-[% c('version') %].tar.bz2
+    sha256sum: cc47db55a1c937e7bcd1cbd8664964656a4922bc35175d95c4015d452f2dcb2b





More information about the tbb-commits mailing list