Date: Tue, 23 Mar 2021 06:42:44 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r569008 - head/lang/rust-bootstrap Message-ID: <202103230642.12N6gi5w079268@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Tue Mar 23 06:42:43 2021 New Revision: 569008 URL: https://svnweb.freebsd.org/changeset/ports/569008 Log: lang/rust-bootstrap: Add the bootstrap freefall sync script Added: head/lang/rust-bootstrap/sync.sh (contents, props changed) Modified: head/lang/rust-bootstrap/Makefile Modified: head/lang/rust-bootstrap/Makefile ============================================================================== --- head/lang/rust-bootstrap/Makefile Tue Mar 23 06:39:47 2021 (r569007) +++ head/lang/rust-bootstrap/Makefile Tue Mar 23 06:42:43 2021 (r569008) @@ -1,5 +1,8 @@ # $FreeBSD$ +# Once the bootstraps are available on pkg.FreeBSD.org run sync.sh +# to upload them to ~/public_distfiles on freefall in preparation +# for the next lang/rust update. PORTNAME= rust PORTVERSION= 1.50.0 PORTREVISION= 1 Added: head/lang/rust-bootstrap/sync.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/rust-bootstrap/sync.sh Tue Mar 23 06:42:43 2021 (r569008) @@ -0,0 +1,35 @@ +#!/bin/sh +# Upload Rust bootstraps available on pkg.FreeBSD.org to your +# ~/public_distfiles on freefall for the next lang/rust update. +# Change ABI below to select from which build to fetch the packages +# from. +set -xeu +: "${PORTSDIR=/usr/ports}" +: "${DATADIR=/tmp/rust-bootstrap}" + +version=$(make -C "${PORTSDIR}/lang/rust" PORTVERSION) +date=$(fetch -qo- https://static.rust-lang.org/dist/channel-rust-stable-date.txt) + +export ABI=FreeBSD:13:amd64 +export INSTALL_AS_USER=1 +export PKG_DBDIR="${DATADIR}/pkgdb" +pkg update -f -r FreeBSD +pkg fetch -r FreeBSD -o "${DATADIR}" -yg "*-rust-bootstrap-${version}*" + +find "${DATADIR}/All" -name "*rust-bootstrap-${version}*.txz" \ + -execdir tar -xvf {} \; + +dir="public_distfiles/rust/${date}" +cd "${DATADIR}/All/usr/local/rust-bootstrap" +mkdir -p tmp +for arch in $(ls); do + if [ "$arch" == "amd64" ]; then + find $arch -name '*.tar.xz' -exec mv {} tmp \; + else + find $arch -name '*.tar.xz' -and -not -name '*x86_64*' -exec mv {} tmp \; + fi +done +cd tmp +tar -cf- . | ssh freefall.freebsd.org "mkdir -p \"${dir}\" && tar -C \"${dir}\" -xvf-" +cd / +rm -r "${DATADIR}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103230642.12N6gi5w079268>