Update 2025-07-16 09:55 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2025-07-16 09:55:17 +02:00
parent 9f365fe933
commit 3b839841ac
6 changed files with 21 additions and 53 deletions

View File

@ -1,20 +0,0 @@
#!/bin/sh
. $HOME/.bin/_config
print "Tarsnap Restore:"
if [ -z "$1" ]; then
doas tarsnap --list-archives | sort
printf "Usage: restore <key_id>\n"
exit 2
fi
_backup="$(doas tarsnap --list-archives | grep "$1")"
if [ -z "$_backup" ]; then
print "No backup with key id $1 found."
exit 1
fi
mkdir "restore_$1"
doas tarsnap --humanize-numbers -xvf "$_backup" -C "restore_$1"
print "Data restored in $(readlink -f "restore_$1")"

View File

@ -1,21 +0,0 @@
#!/bin/sh
. $HOME/.bin/_config
print "Tarsnap Delete:"
if [ -z "$1" ]; then
doas tarsnap --list-archives | sort
printf "Usage: delete <key_id>\n"
exit 2
fi
_delete="$(doas tarsnap --list-archives | grep "$1")"
if [ -z "$_delete" ]; then
print "No backup with key id $1 found."
exit 1
fi
print "Deleting: $_delete"
doas tarsnap -df "$_delete"
print "done."

View File

@ -32,7 +32,7 @@ doas mkdir -p /usr/obj /usr/xobj
doas chown build /usr/obj /usr/xobj doas chown build /usr/obj /usr/xobj
mkkernel() { mkkernel() {
echo "Step: kernel start ($(date)") >> $LOG echo "Step: kernel start ($(date))" >> $LOG
set -xe set -xe
cd /sys/arch/$(machine)/compile/GENERIC.MP cd /sys/arch/$(machine)/compile/GENERIC.MP
doas make clean doas make clean
@ -42,11 +42,11 @@ mkkernel() {
doas make install doas make install
doas what /bsd doas what /bsd
doas ln -f /bsd.booted /bsd.backup doas ln -f /bsd.booted /bsd.backup
echo "Step: kernel done ($(date)") >> $LOG echo "Step: kernel done ($(date))" >> $LOG
} }
mkbase() { mkbase() {
echo "Step: base start ($(date)") >> $LOG echo "Step: base start ($(date))" >> $LOG
set -xe set -xe
cd /usr/src cd /usr/src
doas make obj doas make obj
@ -55,11 +55,11 @@ mkbase() {
doas sysmerge doas sysmerge
cd /dev cd /dev
doas ./MAKEDEV all doas ./MAKEDEV all
echo "Step: base done ($(date)") >> $LOG echo "Step: base done ($(date))" >> $LOG
} }
mkxenocara() { mkxenocara() {
echo "Step: xenocara start ($(date)") >> $LOG echo "Step: xenocara start ($(date))" >> $LOG
set -xe set -xe
doas chown -R sdk /usr/xenocara doas chown -R sdk /usr/xenocara
cd /usr/xenocara cd /usr/xenocara
@ -68,11 +68,11 @@ mkxenocara() {
doas make obj doas make obj
doas make -j${JOBS} build doas make -j${JOBS} build
doas make install doas make install
echo "Step: xenocara done ($(date)") >> $LOG echo "Step: xenocara done ($(date))" >> $LOG
} }
mkrelease() { mkrelease() {
echo "Step: release start ($(date)") >> $LOG echo "Step: release start ($(date))" >> $LOG
set -xe set -xe
doas mkdir -p /data/{OpenBSD,Release} doas mkdir -p /data/{OpenBSD,Release}
doas chown -R build /data doas chown -R build /data
@ -95,7 +95,7 @@ mkrelease() {
cd /usr/src/distrib/$(machine)/iso cd /usr/src/distrib/$(machine)/iso
doas make doas make
doas make install doas make install
echo "Step: release done ($(date)") >> $LOG echo "Step: release done ($(date))" >> $LOG
} }
kernelclean() { kernelclean() {

View File

@ -1,11 +1,20 @@
#!/bin/sh #!/bin/sh
. $HOME/.bin/_config . $HOME/.bin/_config
[ -d "$1" ] || ( printf "Usage: backup <target>\n" && exit 2; ) _target=$(readlink -f "$1" 2> /dev/null)
[ ! "$_target" ] \
&& printf "Usage: backup <target>\n" \
&& exit 2;
print "pass Internet/Tarsnap.key > /root/tarsnap.key ..."
pass Internet/Tarsnap.key | doas tee /root/tarsnap.key > /dev/null
doas chown root:sdk /root/tarsnap.key
doas chmod 640 /root/tarsnap.key
doas chmod 750 /root
print "Tarsnap Backup:" print "Tarsnap Backup:"
_target=$(readlink -f "$1")
_key=$(pwgen -n1 8) _key=$(pwgen -n1 8)
_date=$(date "+%Y-%m-%d %H:%M") _date=$(date "+%Y-%m-%d %H:%M")
_host=$(uname -n) _host=$(uname -n)

View File

@ -2,7 +2,6 @@
mystuff=" mystuff="
/usr/ports/mystuff/x11/st-sdk /usr/ports/mystuff/x11/st-sdk
/usr/ports/mystuff/www/luakit
/usr/ports/mystuff/sysutils/libtree /usr/ports/mystuff/sysutils/libtree
/usr/ports/sysutils/tarsnap /usr/ports/sysutils/tarsnap
" "

1
.kshrc
View File

@ -239,6 +239,7 @@ mygot-clone() {
# other # other
alias portroach="portroach-cli -m codevoid" alias portroach="portroach-cli -m codevoid"
alias ugrep="\ugrep -nI --exclude=tags --exclude=.tags --exclude='cscope.*'" alias ugrep="\ugrep -nI --exclude=tags --exclude=.tags --exclude='cscope.*'"
alias tarsnap="doas \tarsnap"
mystuff() { mystuff() {
cd /usr/ports/mystuff cd /usr/ports/mystuff