Update 2024-01-02 09:47 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2024-01-02 09:47:52 +01:00
parent 149baa5762
commit 113c982b05

View File

@ -6,10 +6,11 @@
# CONFIGURATION
#
ME=sdk
MAKE_JOBS=$(sysctl -n hw.ncpuonline)
FETCH_JOBS=12
CVSROOT=sdk@cvs.openbsd.org:/cvs
CVSROOT=$ME@cvs.openbsd.org:/cvs
case $(hostname -s) in
x13) PKGOPT="-Dsnap"; ;;
@ -22,6 +23,9 @@ esac
# navigation
alias port-jump="_portjump"
alias port-mark="_portmark"
alias port-last="_portlast"
alias port-out="_portout"
# cleaning
alias port-sweep="_portsweep"
@ -37,11 +41,26 @@ alias port-remake="_remake"
alias port-check="_portcheck"
alias port-lib-depends-check="_portlibcheck"
# generating
alias port-modcargo-gen-crates="_portmodcargo_gen"
alias port-modcargo-gen-licenses="_portmodcargo_genlic"
alias port-modgo-gen-modules="_portmodgoupdate"
# source control
alias port-diff="_portdiff"
alias port-diff="_portgendiff"
alias cvs-update="_cvsupdate"
alias cvs-update-all="_cvsupdateall"
alias cvs-diff="_cvsdiff"
alias cvs-commit="_cvscommit"
alias cvs-release="_cvsrelease"
alias cvs-checkout="_cvscheckout"
# dpb
alias proot-rebuild="_prootrebuild"
alias proot-shell="_prootshell"
alias dpb-make="_dpbmake"
#
@ -74,8 +93,8 @@ _remake() {
}
_repackage() {
make clean=package
make package
make clean=packages
FETCH_PACKAGES=No make package
}
_refake() {
@ -88,7 +107,7 @@ _reinstall() {
make reinstall"
}
_portdiff() {(
_portgendiff() {(
pwd | fgrep -q '/usr/ports/' || return 1
set -A N $(make show="PKGNAME EPOCH REVISION")
PN="${N[0]}${N[1]:+v${N[1]}}${N[2]:+p${N[2]}}"
@ -106,9 +125,14 @@ _portclean() {(
doas make fix-permissions
)}
_cvsupdate() {
doas -u sdk cvs -z1 -d $CVSROOT -q up -Pd -A
_cvscommand() {
doas -u $ME cvs -d $CVSROOT $@
}
_cvsupdate() {
_cvscommand -z1 -q up -Pd -A
}
_cvsupdateall() {(
set -x
cd /usr/src && _cvsupdate
@ -117,29 +141,70 @@ _cvsupdateall() {(
cd /usr/www && _cvsupdate
)}
# CVS
alias cvs-diff="doas -u sdk cvs -d $CVSROOT diff -uNp"
alias cvs-commit="doas -u sdk cvs -d $CVSROOT commit"
alias cvs-update="doas -u sdk cvs -z1 -d $CVSROOT -q up -Pd -A"
alias cvs-release="doas -u sdk cvs -d $CVSROOT release"
alias cvs-checkout="doas -u sdk cvs -z 1 -qd $CVSROOT checkout -P"
# PORTS
pmark() { pwd > /var/cache/pmark; }
p() { cd "$(</var/cache/pmark)"; }
pj() { cd "/usr/ports/$(portjump $1)"; }
po() { cd "$(</var/cache/pmark)" && cd "$(make show=WRKSRC)"; }
alias port-modgo-update='make MODGO_VERSION=latest modgo-gen-modules > modules.inc'
# DPB
proot-rebuild() {
doas proot -c /etc/proot.conf
doas chroot /home/dpb pkg_add -Dsnap ccache
_cvsdiff() {
_cvscommand diff -uNp
}
alias proot-do="doas chroot /home/dpb/"
alias dpb-control="ssh openbsd.codevoid.de \"doas nc -U /usr/ports/logs/amd64/control-openbsd-*\""
_cvscommit() {
_cvscommand commit
}
_cvsrelease() {
_cvscommand release
}
_cvscheckout() {
_cvscommand -q -z1 checkout -P
}
_portmark() {
pwd > /var/cache/pmark
}
_portlast() {
cd "$(</var/cache/pmark)"
}
_portout() {
cd "$(</var/cache/pmark)"
cd "$(make show=WRKSRC)"
}
_portlibcheck() {
make port-lib-depends-check
}
_portcheck() {
/usr/ports/infrastructure/bin/portcheck
}
_portmodgoupdate() {
make MODGO_VERSION=latest modgo-gen-modules
}
_portmodcargo_gen() {
make modcargo-gen-crates
}
_portmodcargo_genlic() {
make modcargo-gen-crates-licenses
}
_dpbmake() {
doas chroot /home/dpb /tmp/installdeps.sh $1
doas /usr/ports/infrastructure/bin/dpb -B /home/dpb -c -I $1
}
_prootrebuild() {
doas proot -c /etc/proot.conf
doas chroot /home/dpb pkg_add -Dsnap ccache
{
echo '#!/bin/sh -ex'
echo 'cd /usr/ports/$1'
echo 'FETCH_PACKAGES=-Dsnap make install-depends'
} > /home/dpb/tmp/installdeps.sh
chmod +x /home/dpb/tmp/installdeps.sh
}
_prootshell() {
doas chroot /home/dpb/ ksh -i
}