Update 2023-04-26 08:32 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2023-04-26 08:32:14 +02:00
parent f7cbf36c18
commit be5fb0ac65
12 changed files with 49 additions and 41 deletions

View File

@ -6,13 +6,13 @@ cd /usr/ports
_ports=$(echo "SELECT PkgPath from Paths;" \ _ports=$(echo "SELECT PkgPath from Paths;" \
| sqlite3 /usr/local/share/sqlports \ | sqlite3 /usr/local/share/sqlports \
| sort -u) | sort -u | sed 's,^,/usr/ports/,g')
_list=$(find /usr/ports/mystuff/*/* /usr/src/*/* /usr/xenocara/*/* /usr/src /usr/xenocara /usr/ports -type d -maxdepth 0) _list=$(find /usr/ports/mystuff/*/* /usr/src/*/* /usr/xenocara/*/* /usr/src /usr/xenocara /usr/ports -type d -maxdepth 0)
echo "$_ports" "$_list" "/usr/src" "/usr/ports" "/usr/www" "/usr/xenocara" \ print "$_ports\n$_list\n/usr/src\n/usr/ports\n/usr/www\n/usr/xenocara" \
| grep -v "/CVS" \ | grep -v "/CVS" \
| while IFS= read -r l; do echo "${#l} $((++n)) $l"; done \ | while IFS= read -r l; do echo "${#l} $((++n)) $l"; done \
| sort -n \ | sort -un \
| cut -d" " -f3- \ | cut -d" " -f3- \
| fzf $EXTRA -e -i -0 -1 +s --preview "tree {1}" | fzf $EXTRA -e -i -0 -1 +s --preview "tree {1}"

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
. $HOME/.bin/_config . $HOME/.bin/_config
SEL=$(printf "Notes\nDocuments\nContacts\nSlides" | $DMENU_CMD -p "Information System") SEL=$(print "Notes\nDocuments\nContacts\nCalendar\nSlides" | $DMENU_CMD -p "Information System")
case $SEL in case $SEL in
Notes) Notes)
@ -26,16 +26,16 @@ case $SEL in
fi fi
;; ;;
Contacts) Contacts)
C=$(contactsearch | $DMENU_CMD -p Contacts -l 25) eval $(gnome-keyring-daemon --start --components=secrets)
if [ ! -z "$C" ]; then dbus-update-activation-environment --all
_file=$(printf "$C" | cut -d" " -f1) export GNOME_KEYRING_CONTROL GNOME_KEYRING_SOCKET GNOME_KEYRING_PID
if [ -f "$PIMDIR/contacts/$_file" ]; then gnome-contacts
texec "vim \"$PIMDIR/contacts/$_file\"" ;;
else Calendar)
printf "Name:\nAddress:\nHome:\nWork:\nMail:\nWeb:\nBirthday:\n" >> "$PIMDIR/contacts/$_file" eval $(gnome-keyring-daemon --start --components=secrets)
texec "vim \"$PIMDIR/contacts/$_file\"" dbus-update-activation-environment --all
fi export GNOME_KEYRING_CONTROL GNOME_KEYRING_SOCKET GNOME_KEYRING_PID
fi gnome-calendar
;; ;;
Slides) Slides)
P=$(ls -1 "$PIMDIR/slides/" | sort -hr | $DMENU_CMD -p Slides -l 25) P=$(ls -1 "$PIMDIR/slides/" | sort -hr | $DMENU_CMD -p Slides -l 25)

View File

@ -2,4 +2,4 @@
. ${HOME}/.bin/_config . ${HOME}/.bin/_config
cd ${PIMDIR}/documents cd ${PIMDIR}/documents
pdfgrep --cache -H "${*}" *.pdf pdfgrep --cache -n -H "${*}" *.pdf

View File

@ -3,19 +3,18 @@ umask 022
JOBS="${JOBS:=$(sysctl -n hw.ncpuonline)}" JOBS="${JOBS:=$(sysctl -n hw.ncpuonline)}"
export GLOBAL_AUTOCONF_CACHE="/var/ccache/config.cache" # export CCACHE_DIR="/var/ccache"
export CCACHE_DIR="/var/ccache" # export CCACHE_SLOPPINESS="locale,time_macros,random_seed"
export CCACHE_SLOPPINESS="locale,time_macros,random_seed" #
# # base llvm?
# base llvm? # export LLVM_CCACHE_BUILD=1
export LLVM_CCACHE_BUILD=1 # export LLVM_CCACHE_DIR="/var/ccache"
export LLVM_CCACHE_DIR="/var/ccache" # export CMAKE_CXX_COMPILER_LAUNCHER="ccache"
export CMAKE_CXX_COMPILER_LAUNCHER="ccache" # export CMAKE_C_COMPILER_LAUNCHER="ccache"
export CMAKE_C_COMPILER_LAUNCHER="ccache" #
# FLAGS="-fno-stack-protector -fno-ret-protector -mno-retpoline -march=native"
FLAGS="-fno-stack-protector -fno-ret-protector -mno-retpoline -march=native" # export CC="/opt/ccache/bin/cc $FLAGS"
export CC="/opt/ccache/bin/cc $FLAGS" # export CXX="/opt/ccache/bin/c++ $FLAGS"
export CXX="/opt/ccache/bin/c++ $FLAGS"
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: ${0} [kernel, base, xenocara, release, all] [clean]" echo "Usage: ${0} [kernel, base, xenocara, release, all] [clean]"

View File

@ -5,7 +5,7 @@ then
exit 0 exit 0
fi fi
_mystuff=$(find /usr/ports/mystuff \ _mystuff=$(find /usr/ports/mystuff /usr/ports/openbsd-wip \
-mindepth 2 \ -mindepth 2 \
-maxdepth 2 \ -maxdepth 2 \
-type d \ -type d \

View File

@ -1,8 +1,6 @@
#!/bin/sh #!/bin/sh
cat | sed 's/^WANTLIB[[:blank:]+=]*//g' \ cat | sed 's/^WANTLIB[[:blank:]+=]*//g' \
| tr ' ' '\n' \ | tr ' ' '\n' \
| sort -u \ | sort -u \
| fmt -w60 \ | fmt -w60 \
| sed 's/^/WANTLIB += /g' | sed 's/^/WANTLIB += /g;1s/^WANTLIB += /WANTLIB = /'
# | sed '1s/^WANTLIB += /WANTLIB = /'

View File

@ -1,6 +1,6 @@
asterisk = "*"; asterisk = "*";
prompt = ""; prompt = "";
font = "FuraCodeNerdFont-14"; font = "FuraCodeNerdFont-13";
bottom = false; bottom = false;
prompt_fg = "#FFFFFF"; prompt_fg = "#FFFFFF";

5
.kshrc
View File

@ -126,6 +126,7 @@ alias vimrc="vim ~/.vimrc"
alias exrc="vim ~/.exrc" alias exrc="vim ~/.exrc"
alias ebay="chrome https://www.ebay-kleinanzeigen.de/m-nachrichten.html &" alias ebay="chrome https://www.ebay-kleinanzeigen.de/m-nachrichten.html &"
alias sbl="chrome https://scottsbasslessons.com &"
alias remake="make clean=all; make" alias remake="make clean=all; make"
# remind # remind
@ -193,7 +194,7 @@ pkg_reset() { pkg_delete -cIX $(</home/sdk/.pkglist); }
# servers # servers
x() { ssh -t home.codevoid.de 'tmux -u attach || tmux -u'; } x() { ssh -t home.codevoid.de 'tmux -u attach || tmux -u'; }
t() { ssh -t tweety.home.codevoid.de 'tmux -u attach || tmux -u'; } t() { ssh -t tweety.dhcp.codevoid.de 'tmux -u attach || tmux -u'; }
o() { ssh -t openbsd.codevoid.de 'tmux -u attach || tmux -u'; } o() { ssh -t openbsd.codevoid.de 'tmux -u attach || tmux -u'; }
scr() { [ -z "$1" ] && doas wsconsctl -n display.brightness \ scr() { [ -z "$1" ] && doas wsconsctl -n display.brightness \
@ -499,7 +500,7 @@ doupload-gopher() {
######################################################################## ########################################################################
YTDL_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4506.0 Safari/537.36" YTDL_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4506.0 Safari/537.36"
YTDL_OPTS="-i --no-part --abort-on-unavailable-fragment --buffer-size 16K --fragment-retries 100 --http-chunk-size 10M" YTDL_OPTS="-i --no-part --cookies-from-browser chromium --abort-on-unavailable-fragment --buffer-size 16K --fragment-retries 100 --http-chunk-size 10M"
ytdl() { ytdl() {
local FMT="bestvideo[ext=mp4][height<=1080]+bestaudio[ext=m4a]/best[ext=mp4]/best" local FMT="bestvideo[ext=mp4][height<=1080]+bestaudio[ext=m4a]/best[ext=mp4]/best"
yt-dlp $YTDL_OPTS --user-agent "$YTDL_AGENT" -f "$FMT" "$@"; yt-dlp $YTDL_OPTS --user-agent "$YTDL_AGENT" -f "$FMT" "$@";

View File

@ -21,6 +21,6 @@ SSLType IMAPS
Channel private Channel private
Far :server: Far :server:
Near :local: Near :local:
Patterns * !Virtual/* Patterns * !Virtual/* !INBOX
SyncState * SyncState *
Sync Pull New Flags Delete Sync Pull New Flags Delete

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh -e
# needs converters/qprint # needs converters/qprint
# mutt: macro pager,attach ^S "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>" # mutt: macro pager,attach ^S "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>"
clear clear
printf '\n---------------------------------------------------------------------\n' printf '\n---------------------------------------------------------------------\n'
grep -E 'Subject: |^Index|^RCS|^diff --git|^file +|^[-+]{3} ' "${1}" grep -E 'Subject: |^Index|^RCS|^diff --git|^file +|^[-+]{3} ' "${1}"
printf '---------------------------------------------------------------------\n\n' printf '---------------------------------------------------------------------\n\n'
@ -12,6 +13,8 @@ printf "Apply patch on path? "
read -r _path read -r _path
_path=$(dev-dirs $_path) _path=$(dev-dirs $_path)
print "Using: $_path"
printf "Fix quoted-printable mangeled patch? [y/N]: " printf "Fix quoted-printable mangeled patch? [y/N]: "
read -r _qprint read -r _qprint
@ -23,5 +26,11 @@ esac
printf "Strip? [0]: " printf "Strip? [0]: "
read -r _strip read -r _strip
${_catcmd} "${1}" | doas patch -Ep${_strip:=0} -d ${_path:=/usr/ports} echo "DIR: $(pwd)"
echo "CMD: ${_catcmd} "${1}" | doas -u sdk patch -E -pp${_strip:=0} -d ${_path}"
sleep 1 && print 3
sleep 1 && print 2
sleep 1 && print 1
${_catcmd} "${1}" | doas -u sdk patch -E -p${_strip:=0} -d ${_path}
cd ${_path} && doas su cd ${_path} && doas su

View File

@ -7,7 +7,7 @@ ServerAliveCountMax 240
AddKeysToAgent yes AddKeysToAgent yes
#IPQoS lowdelay throughput #IPQoS lowdelay throughput
CanonicalizeHostname yes CanonicalizeHostname yes
CanonicalDomains home.codevoid.de codevoid.de uugrn.org openbsd.org CanonicalDomains dhcp.codevoid.de codevoid.de uugrn.org openbsd.org
ForwardX11 no ForwardX11 no
ForwardX11Trusted no ForwardX11Trusted no
ForwardAgent no ForwardAgent no

5
.vimrc
View File

@ -49,11 +49,10 @@ nmap ga <Plug>(EasyAlign)
augroup code augroup code
au! au!
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
au BufRead,BufNewFile Makefile,/usr/src/*.c,/usr/src/*.h,*.gmk setl sw=8 sts=8 noet au BufRead,BufNewFile Makefile,/usr/src/*.c,/usr/src/*.h,*.gmk setl sw=8 ts=8 noet
augroup end augroup end
" visual sugar " visual sugar
set textwidth=72
set formatprg=par\ -w72q set formatprg=par\ -w72q
hi LineNr ctermfg=15 hi LineNr ctermfg=15
@ -69,6 +68,8 @@ hi VertSplit ctermbg=NONE ctermfg=246 cterm=NONE
hi FoldColumn ctermbg=NONE ctermfg=251 cterm=NONE hi FoldColumn ctermbg=NONE ctermfg=251 cterm=NONE
hi Folded ctermbg=233 ctermfg=251 cterm=NONE hi Folded ctermbg=233 ctermfg=251 cterm=NONE
hi SpellBad ctermbg=NONE ctermfg=124
match ErrorMsg '\(TODO\|FIXME\|XXX\|: error:.*\|\s\+$\| \+\ze\t\)' match ErrorMsg '\(TODO\|FIXME\|XXX\|: error:.*\|\s\+$\| \+\ze\t\)'
" vi compatible options (from .exrc) " vi compatible options (from .exrc)