Page MenuHomeFreeBSD

devel/cargo: update to 0.7.0
ClosedPublic

Authored by jbeich on Dec 15 2015, 5:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 28, 6:55 AM
Unknown Object (File)
Mon, Dec 23, 7:19 AM
Unknown Object (File)
Oct 30 2024, 6:24 PM
Unknown Object (File)
Sep 29 2024, 7:46 AM
Unknown Object (File)
Sep 29 2024, 7:46 AM
Unknown Object (File)
Sep 29 2024, 7:46 AM
Unknown Object (File)
Sep 29 2024, 6:39 AM
Unknown Object (File)
Sep 18 2024, 10:50 PM
Subscribers
None

Details

Summary

I didn't like a few things, so...

  • Update to 0.7.0 (release)
  • Switch :registry to .tar.xz, shaves a few megabytes
  • Add an option to build with already installed Cargo
  • Generate registry tarball with BOOTSTRAP=off (for extra deps)
  • Require recent lang/rust to build; I didn't have time to test old versions of lang/rust or lang/rust-nightly
  • Drop cargo-nightly and rust-nightly hacks. The latter is still supported via RUST_PORT=lang/rust-nightly in environment, make.conf, Makefile.local
  • Drop MAKE_JOBS_UNSAFE, builds fine with MAKE_JOBS_NUMBER=32 (unless cargo build ignored --jobs on my 4 core Intel CPU)
  • Don't use OpenSSL port on 11.0-CURRENT (no RPATH in bootstrap)
  • Don't install licenses under DOCSDIR
  • Don't use _GH0 GitHub versioning for :registry distfile
  • Don't depend on lang/python2 when only lang/python27 is used
  • Simplify manpage directory substitution
  • Fix LICENSE_FILE when used with LICENSE_COMB != single
  • Fix gen-registry when WRKDIRPREFIX == MAKEOBJDIRPREFIX
  • Cleanup gen-registry target
  • Respect PREFIX != /usr/local
  • Prepare CARGO_BOOT_SIG for i386 and DragonFly
  • Pet portlint in pkg-descr
  • Minor style not mentioned explicitly
Test Plan

poudriere testport -P log - http://sprunge.us/acWF

Check dependencies (in a fresh jail):

$ pkg install -y cargo
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 7 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        cargo: 0.7.0
        openssl: 1.0.2_5
        rust: 1.5.0
        libedit: 3.1.20150325_1
        curl: 7.46.0_1
        ca_root_nss: 3.20.1
        libssh2: 1.6.0_1,2

The process will require 188 MiB more space.
[102amd64-default] [1/7] Installing libedit-3.1.20150325_1...
[102amd64-default] [1/7] Extracting libedit-3.1.20150325_1: 100%
[102amd64-default] [2/7] Installing ca_root_nss-3.20.1...
[102amd64-default] [2/7] Extracting ca_root_nss-3.20.1: 100%
[102amd64-default] [3/7] Installing openssl-1.0.2_5...
[102amd64-default] [3/7] Extracting openssl-1.0.2_5: 100%
[102amd64-default] [4/7] Installing rust-1.5.0...
[102amd64-default] [4/7] Extracting rust-1.5.0: 100%
[102amd64-default] [5/7] Installing curl-7.46.0_1...
[102amd64-default] [5/7] Extracting curl-7.46.0_1: 100%
[102amd64-default] [6/7] Installing libssh2-1.6.0_1,2...
[102amd64-default] [6/7] Extracting libssh2-1.6.0_1,2: 100%
[102amd64-default] [7/7] Installing cargo-0.7.0...
[102amd64-default] [7/7] Extracting cargo-0.7.0: 100%

Building Cargo with already installed package (in a fresh jail).

$ pkg install -qy cargo
$ make WITHOUT=BOOTSTRAP -C/usr/ports/devel/cargo
===>  License APACHE20  MIT accepted by the user
===>   cargo-0.7.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by cargo-0.7.0 for building
===>  Extracting for cargo-0.7.0
=> SHA256 Checksum OK for cargo-registry-0.7.0.tar.xz.
=> SHA256 Checksum OK for rust-lang-cargo-0.7.0_GH0.tar.gz.
=> SHA256 Checksum OK for rust-lang-rust-installer-4915c75_GH0.tar.gz.
===>  Patching for cargo-0.7.0
===>  Applying FreeBSD patches for cargo-0.7.0
===>   cargo-0.7.0 depends on executable: cmake - not found
===>   Installing existing package /packages/All/cmake-3.4.1.txz
[102amd64-default] Installing cmake-3.4.1...
[102amd64-default] `-- Installing expat-2.1.0_3...
[102amd64-default] `-- Extracting expat-2.1.0_3: 100%
[102amd64-default] `-- Installing cmake-modules-3.4.1...
[102amd64-default] `-- Extracting cmake-modules-3.4.1: 100%
[102amd64-default] `-- Installing libarchive-3.1.2_4,1...
[102amd64-default] |   `-- Installing lzo2-2.09...
[102amd64-default] |   `-- Extracting lzo2-2.09: 100%
[102amd64-default] `-- Extracting libarchive-3.1.2_4,1: 100%
[102amd64-default] `-- Installing jsoncpp-0.6.0.r2_2...
[102amd64-default] `-- Extracting jsoncpp-0.6.0.r2_2: 100%
[102amd64-default] Extracting cmake-3.4.1: 100%
===>   cargo-0.7.0 depends on executable: cmake - found
===>   Returning to build of cargo-0.7.0
===>   cargo-0.7.0 depends on package: rust>=1.5.0 - found
===>   cargo-0.7.0 depends on file: /usr/local/lib/libcrypto.so.8 - found
===>   cargo-0.7.0 depends on executable: gmake - not found
===>   Installing existing package /packages/All/gmake-4.1_2.txz
[102amd64-default] Installing gmake-4.1_2...
[102amd64-default] `-- Installing indexinfo-0.2.4...
[102amd64-default] `-- Extracting indexinfo-0.2.4: 100%
[102amd64-default] `-- Installing gettext-runtime-0.19.6...
[102amd64-default] `-- Extracting gettext-runtime-0.19.6: 100%
[102amd64-default] Extracting gmake-4.1_2: 100%
===>   cargo-0.7.0 depends on executable: gmake - found
===>   Returning to build of cargo-0.7.0
===>   cargo-0.7.0 depends on file: /usr/local/bin/python2.7 - not found
===>   Installing existing package /packages/All/python27-2.7.10_1.txz
[102amd64-default] Installing python27-2.7.10_1...
[102amd64-default] `-- Installing libffi-3.2.1...
[102amd64-default] `-- Extracting libffi-3.2.1: 100%
[102amd64-default] Extracting python27-2.7.10_1: 100%
Message from python27-2.7.10_1:
===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
===>   cargo-0.7.0 depends on file: /usr/local/bin/python2.7 - found
===>   Returning to build of cargo-0.7.0
===>   cargo-0.7.0 depends on executable: pkgconf - not found
===>   Installing existing package /packages/All/pkgconf-0.9.12_1.txz
[102amd64-default] Installing pkgconf-0.9.12_1...
[102amd64-default] Extracting pkgconf-0.9.12_1: 100%
===>   cargo-0.7.0 depends on executable: pkgconf - found
===>   Returning to build of cargo-0.7.0
===>   cargo-0.7.0 depends on shared library: libssh2.so - found (/usr/local/lib/libssh2.so)
===>   cargo-0.7.0 depends on shared library: libcurl.so - found (/usr/local/lib/libcurl.so)
===>  Configuring for cargo-0.7.0
===>   FreeBSD 10 autotools fix applied to /wrkdirs/usr/ports/devel/cargo/work/.cargo/registry/src/github.com-88ac128001ac3a9a/libssh2-sys-0.1.33/libssh2/config.rpath
configure: looking for configure programs
configure: found cmp
configure: found mkdir
configure: found printf
configure: found cut
configure: found head
configure: found grep
configure: found xargs
configure: found cp
configure: found find
configure: found uname
configure: found date
configure: found tr
configure: found sed
configure: found cmake
configure: found curl
configure: recreating config.tmp
configure:
configure: processing ./configure args
configure:
configure: CFG_PREFIX           := /usr/local
configure: CFG_LOCAL_RUST_ROOT  :=
configure: CFG_RUSTC            := /usr/local/bin/rustc (rustc 1.5.0)
configure: CFG_BUILD            := x86_64-unknown-freebsd
configure: CFG_HOST             := x86_64-unknown-freebsd
configure: CFG_TARGET           := x86_64-unknown-freebsd
configure: CFG_LOCALSTATEDIR    := /var/lib
configure: CFG_SYSCONFDIR       := /etc
configure: CFG_DATADIR          := /usr/local/share
configure: CFG_INFODIR          := /usr/local/share/info
configure: CFG_MANDIR           := /usr/local/man
configure: CFG_LIBDIR           := /usr/local/lib
configure: CFG_LOCAL_CARGO      := /usr/local/bin/cargo
configure:
configure: validating ./configure args
configure:
configure:
configure: looking for build programs
configure:
configure: CFG_PYTHON           := /usr/local/bin/python2.7
configure: CFG_CC               := /usr/bin/cc (FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512)
configure: CFG_RUSTDOC          := /usr/local/bin/rustdoc (rustdoc 1.5.0)
configure:
configure: writing configuration
configure:
configure: CFG_SRC_DIR          := /wrkdirs/usr/ports/devel/cargo/work ...
configure: CFG_BUILD_DIR        := /wrkdirs/usr/ports/devel/cargo/work ...
configure: CFG_CONFIGURE_ARGS   := --prefix=/usr/local --mandir=/usr/l ...
configure: CFG_PREFIX           := /usr/local
configure: CFG_BUILD            := x86_64-unknown-freebsd
configure: CFG_HOST             := x86_64-unknown-freebsd
configure: CFG_TARGET           := x86_64-unknown-freebsd
configure: CFG_LIBDIR           := /usr/local/lib
configure: CFG_MANDIR           := /usr/local/man
configure: CFG_RUSTC            := /usr/local/bin/rustc
configure: CFG_RUSTDOC          := /usr/local/bin/rustdoc
configure:
configure: cp /wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0/Makefile.in ./Makefile
configure: mv config.tmp config.mk
configure:
configure: complete
configure:
configure:
===>  Building for cargo-0.7.0
gmake[1]: Entering directory '/wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0'
/usr/local/bin/rustc -V
rustc 1.5.0
/usr/local/bin/cargo --version
cargo 0.7.0 (built 2015-12-15)
/usr/local/bin/cargo build --target x86_64-unknown-freebsd --release  --jobs 32
   Compiling winapi v0.2.5
   Compiling regex-syntax v0.2.2
   Compiling glob v0.2.10
   Compiling semver v0.2.0
   Compiling libc v0.2.2
   Compiling gcc v0.3.19
   Compiling bitflags v0.1.1
   Compiling pkg-config v0.3.6
   Compiling rustc-serialize v0.3.16
   Compiling libc v0.1.12
   Compiling matches v0.1.2
   Compiling crossbeam v0.1.6
   Compiling strsim v0.3.0
   Compiling winapi-build v0.1.1
   Compiling num_cpus v0.2.7
   Compiling log v0.3.3
   Compiling ws2_32-sys v0.2.1
   Compiling kernel32-sys v0.1.4
   Compiling kernel32-sys v0.2.1
   Compiling advapi32-sys v0.1.2
   Compiling memchr v0.1.7
   Compiling rand v0.3.12
   Compiling filetime v0.1.7
   Compiling term v0.2.13
   Compiling time v0.1.34
   Compiling aho-corasick v0.3.4
   Compiling tar v0.3.2
   Compiling miniz-sys v0.1.7
   Compiling cmake v0.1.8
   Compiling openssl-sys v0.7.0
   Compiling curl-sys v0.1.28
   Compiling libz-sys v0.1.9
   Compiling flate2 v0.2.11
   Compiling libgit2-sys v0.3.7
   Compiling libssh2-sys v0.1.33
   Compiling regex v0.1.41
   Compiling env_logger v0.3.2
   Compiling uuid v0.1.18
   Compiling toml v0.1.23
   Compiling docopt v0.6.76
   Compiling url v0.2.38
   Compiling git2 v0.3.3
   Compiling curl v0.2.14
   Compiling crates-io v0.1.0 (file:///wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0)
   Compiling git2-curl v0.3.0
   Compiling cargo v0.7.0 (file:///wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0)
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0'
===>  Staging for cargo-0.7.0
===>   cargo-0.7.0 depends on executable: rustc - found
===>   cargo-0.7.0 depends on file: /usr/local/lib/libcrypto.so.8 - found
===>   Generating temporary packing list
gmake[1]: Entering directory '/wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0'
rm -rf target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image
mkdir -p target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/bin target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/lib/cargo target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/man/man1 target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/share/doc/cargo target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/share/zsh/site-functions target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/etc/bash_completion.d
cp target/x86_64-unknown-freebsd/release/cargo target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/bin
cp src/etc/cargo.1 target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/man/man1
cp src/etc/_cargo target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/share/zsh/site-functions/_cargo
cp src/etc/cargo.bashcomp.sh target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/etc/bash_completion.d/cargo
cp README.md target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image/share/doc/cargo
rm -Rf target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-overlay
mkdir -p target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-overlay
cp README.md target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-overlay
echo "0.7.0 (built 2015-12-15)" > target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-overlay/version
sh src/rust-installer/gen-installer.sh --product-name=Rust --rel-manifest-dir=rustlib --success-message=Rust-is-ready-to-roll. --image-dir=target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image --work-dir=./target/x86_64-unknown-freebsd/release/dist --output-dir=./target/x86_64-unknown-freebsd/release/dist --non-installed-overlay=target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-overlay --package-name=cargo-0.7.0-x86_64-unknown-freebsd --component-name=cargo --legacy-manifest-dirs=rustlib,cargo
gen-installer: looking for programs
gen-installer:
gen-installer: found tar
gen-installer: found cp
gen-installer: found rm
gen-installer: found mkdir
gen-installer: found echo
gen-installer: found tr
gen-installer: found awk
gen-installer:
gen-installer: processing arguments
gen-installer:
gen-installer: CFG_PRODUCT_NAME     := Rust
gen-installer: CFG_COMPONENT_NAME   := cargo
gen-installer: CFG_PACKAGE_NAME     := cargo-0.7.0-x86_64-unknown-freebsd
gen-installer: CFG_REL_MANIFEST_DIR := rustlib
gen-installer: CFG_SUCCESS_MESSAGE  := Rust-is-ready-to-roll.
gen-installer: CFG_LEGACY_MANIFEST_DIRS := rustlib,cargo
gen-installer: CFG_NON_INSTALLED_OVERLAY := target/x86_64-unknown-freebsd/relea ...
gen-installer: CFG_BULK_DIRS        :=
gen-installer: CFG_IMAGE_DIR        := target/x86_64-unknown-freebsd/relea ...
gen-installer: CFG_WORK_DIR         := ./target/x86_64-unknown-freebsd/rel ...
gen-installer: CFG_OUTPUT_DIR       := ./target/x86_64-unknown-freebsd/rel ...
gen-installer:
gen-installer: validating arguments
gen-installer:
gen-install-script: looking for install programs
gen-install-script:
gen-install-script: found sed
gen-install-script: found chmod
gen-install-script: found cat
gen-install-script:
gen-install-script: processing arguments
gen-install-script:
gen-install-script: CFG_PRODUCT_NAME     := Rust
gen-install-script: CFG_REL_MANIFEST_DIR := rustlib
gen-install-script: CFG_SUCCESS_MESSAGE  := Rust-is-ready-to-roll.
gen-install-script: CFG_OUTPUT_SCRIPT    := ./target/x86_64-unknown-freebsd/rel ...
gen-install-script: CFG_LEGACY_MANIFEST_DIRS := rustlib,cargo
gen-install-script:
gen-install-script: validating arguments
gen-install-script:
rm -Rf target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd-image
target/x86_64-unknown-freebsd/release/dist/cargo-0.7.0-x86_64-unknown-freebsd/install.sh --prefix="/usr/local" --destdir="/wrkdirs/usr/ports/devel/cargo/work/stage"
install: creating uninstall script at /wrkdirs/usr/ports/devel/cargo/work/stage/usr/local/lib/rustlib/uninstall.sh
install: installing component 'cargo'

    Rust is ready to roll.

gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/cargo/work/cargo-0.7.0'
====> Compressing man pages (compress-man)

Building a consumer e.g., a window manager (in a fresh jail).

$ pkg install -qy cargo git pkgconf libXinerama
$ git clone -q https://github.com/Kintaro/wtftw
$ cd wtftw
$ cargo build --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading winapi-build v0.1.1
 Downloading libc v0.1.12
 Downloading bitflags v0.1.1
 Downloading winapi v0.2.4
 Downloading pkg-config v0.3.6
 Downloading dylib v0.0.1
 Downloading num v0.1.27
 Downloading rustc-serialize v0.3.16
 Downloading x11 v2.2.1
 Downloading zombie v0.0.2
 Downloading getopts v0.2.14
 Downloading rand v0.3.11
 Downloading log v0.3.3
 Downloading libc v0.2.1
 Downloading advapi32-sys v0.1.2
   Compiling libc v0.1.12
   Compiling getopts v0.2.14
   Compiling winapi-build v0.1.1
   Compiling pkg-config v0.3.6
   Compiling rustc-serialize v0.3.16
   Compiling advapi32-sys v0.1.2
   Compiling bitflags v0.1.1
   Compiling log v0.3.3
   Compiling libc v0.2.1
   Compiling dylib v0.0.1
   Compiling zombie v0.0.2
   Compiling x11 v2.2.1
   Compiling winapi v0.2.4
   Compiling rand v0.3.11
   Compiling num v0.1.27
   Compiling wtftw_core v0.3.1 (file:///usr/home/holo/wtftw)
   Compiling wtftw_xlib v0.4.0 (file:///usr/home/holo/wtftw)
   Compiling wtftw v0.4.4 (file:///usr/home/holo/wtftw)

$ ./target/release/wtftw
thread '<main>' panicked at 'Exiting', xlib/src/xlib_window_system.rs:71

$ DISPLAY=:0 ./target/release/wtftw

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jbeich retitled this revision from to devel/cargo: update to 0.7.0.
jbeich updated this object.
jbeich edited the test plan for this revision. (Show Details)
jbeich added a reviewer: dumbbell.
This revision was automatically updated to reflect the committed changes.