# rustlocal/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. By default, if this package is built, it: (a) doesn't delete the "rustlocal" package tree (b) doesn't delete previously cached build objects (c) downloads sources for some Rust libraries and programs un- less they're already present (d) builds some Rust libraries and programs in the "rustlocal" package tree To force actual as opposed to cached compiles, delete the following cache directory tree first: $PRODTREE/rustlocal/rusthome/sccache/ To force a full rebuild from scratch, delete the following package directory tree instead: $PRODTREE/rustlocal/ This will both (a) download updated sources and (b) rebuild from scra- tch. If you do this, you'll need to rebuild the following packages in dir- ectory name order: /src/*_rust/* except for "0010_rustc" /src/*/_rusthigh For a rebuild from scratch, Internet access is required. The results of this type of build are unpredictable. This type of build may very well fail. #--------------------------------------------------------------------- 2. The following procedure: export RUSTOFFLINE=true makelac rustlocal --force rebuilds the same libraries and programs using the same sources. It shouldn't access the Internet. This mode requires that a full build from scratch have been done previously. Cached build objects may be used unless the following cache tree is deleted first: $PRODTREE/rustlocal/rusthome/sccache/ #--------------------------------------------------------------------- 3. In the default mode, this package requires Internet access to bui- ld. Builds are also non-repeatable; i.e., the results may be differ- ent each time and builds may not work at all. This is one of relatively few packages of this type that Laclin sup- ports. #--------------------------------------------------------------------- 4. This package doesn't modify the Rust compiler directory tree at: $PRODTREE/rustc/ #--------------------------------------------------------------------- [buildtimes] # Build times for this package will change dramatically from time to # time. 01.53 hours (or 091.98 minutes) - 2023 dedi Xeon E3-1200 v3 4x2 32GB RAM - rustc 1.87.0 + clang 20.1.5 + sccache with an empty cache - 250224 01.85 hours (or 111.28 minutes) - 2023 dedi Xeon E3-1200 v3 4x2 32GB RAM - using "sscache" from scratch without population - rustc 1.85.0 250513 #--------------------------------------------------------------------- [settings] altpkg = yes compiler = clang configure = none defer = glibc64 license = tbd proddir = none purge = no strip = no tmpsize = 16000M unpack = none setpaths = libpcap rustc #--------------------------------------------------------------------- [depends] libpcap libusb python rustc sccache upx uv #--------------------------------------------------------------------- [build] export RUSTC_BOOTSTRAP=1 OFFLINESW="" if [ "@$RUSTOFFLINE" == "@1" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@yes" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@true" ]; then OFFLINESW=--offline ; fi HERE=`pwd` PP=$PRODTREE/rustlocal BINDIR=$PP/bin TGTDIR=$HERE/target RUSTOFFLINE=$RUSTOFFLINE rm -fr $TGTDIR mkdir -p $BINDIR $TGTDIR cd $PP mkdir -p rusthome cd rusthome export HOME=`pwd` export CARGO_TARGET_DIR=$TGTDIR #--------------------------------------------------------------------- export SCCACHE_CACHE_SIZE="5G" export SCCACHE_DIR=$HOME/sccache export RUSTC_WRAPPER=$BINDIR/sccache mkdir -p $SCCACHE_DIR pkill --full /bin/sccache || true sleep 1 sccache rustc || unset RUSTC_WRAPPER #--------------------------------------------------------------------- PKGLIST=" aardvark-dns bandwhich bartib bat blades cargo-local-registry choose cpc crabz csvlens cubic cyme difftastic diskonaut diskus dtool dua exa faketty fd-find fend git-absorb gitoxide grex havn hexyl htmlq hyperfine jaq jless jql just legdur lemmeknow lfs macchina mdbook mdcat melody meow-cli miniserve monolith mprocs names navi netavark netscanner nowa onefetch pastel petname pik procs qrtool rav1e repoch resvg ripgrep rmesg ruplacer rustracer rustscan s3sync sd silicon skim ss3 starship stringsext systeroid tealdeer tokei trippy uuinfo vsd xan xcp xh xq xsv ytop zellij zet zoxide " #--------------------------------------------------------------------- for pkg in $PKGLIST; do ERR=false echo ==== `date` \ cargo install $OFFLINESW --force $pkg cargo install $OFFLINESW --force $pkg || ERR=true if [ "@$ERR" == "@true" ]; then echo Error: $pkg failed exit 1 fi done #--------------------------------------------------------------------- GITPKG=" " #--------------------------------------------------------------------- for pkg in $GITPKG do echo ==== `date` build of $pkg start cd $HERE deco $PKGDIR_SPECIAL/$pkg-git*.tar* cd $pkg-git* if [ "@$RUSTOFFLINE" \!= "@true" ]; then cargo fetch fi cargo build $OFFLINESW --release cd $CARGO_TARGET_DIR/release/ mv $pkg $BINDIR/ for x in * do trueifexe $x && mv $x $BINDIR/ done cd $HERE echo ==== `date` build of $pkg end done #--------------------------------------------------------------------- badlinks -d $HOME/.cargo/bin/ || true rm -fr $HOME/.cargo/bin/sccache strip $HOME/.cargo/bin/* || true upx --lzma $HOME/.cargo/bin/* || true ln -nsf $HOME/.cargo/bin/* $BINDIR/ badlinks -d $BINDIR/ || true echo ==== `date` instreplinks -d $BINDIR/ /usr/bin/ instreplinks -d $BINDIR/ /usr/bin/ rm -fr $CARGO_TARGET_DIR #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = n/a # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 220911 Added package 220911 Started with 220911 230218 Updated to 230218 240331 Updated to 240331 240728 Reworked package 240728 Added a number of programs 241125 Updated applications to latest sources 241125 Added a number of programs 250525 Updated applications to latest sources 250525 Added a number of programs 250603 Moved "alacritty" to its own package