Notes

Home About Contact Archive
GitHub LinkedIn Twitter CoBUG.org

Updating a Rust port on OpenBSD

make sumwhat?!
Posted on Sat, 09 Sep 2023 07:43:38 MDT by Aaron Bieber
Tags: OpenBSD Rust Ports

Updating a Rust port

OpenBSD rust ports have always been a bit tricky for me to update. Remembering the steps is a pain and there isn’t a clear “path” in the docs.

Recently someone asked me for some guidance on how to do an update.. and while writing out the steps I got frustrated and finally put things into a script.

Here is a error-check-less approach to updating a rust port:

#!/bin/sh

set -eu

PORT="$(make show=PKGNAME)"

mv -v crates.inc crates.old
touch crates.inc
make makesum
make modcargo-gen-crates > /tmp/${PORT}.crates.inc
grep ^MODCARGO /tmp/${PORT}.crates.inc > crates.inc
make clean
make makesum
make modcargo-gen-crates-licenses > /tmp/${PORT}.license.inc
grep ^MODCARGO /tmp/${PORT}.license.inc > crates.inc
rm crates.old
make clean
make && make package

Made by qbit. Subscribe via RSS / Atom | Generated using boring and these files.
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE
proof.