From 1980cc8c78450fe9fcd4c1171e2c7aea3e121659 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Thu, 27 Apr 2017 11:04:37 +0200 Subject: [PATCH] add support for OpenBSD 6.1 --- openup | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/openup b/openup index 2bcc0ba..fd8c880 100755 --- a/openup +++ b/openup @@ -43,7 +43,7 @@ PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)" VUXML_URL="https://stable.mtier.org/vuxml/$(uname -r | tr -d '.').xml" # fetch command (must behave like "ftp -o"); e.g. "wget -qO" -FETCH="ftp -Vo" +FETCH="ftp -MVo" # exclusion list: pkg names without version/flavor, separated by space EXCLUDE_PKG="" @@ -170,10 +170,10 @@ update_pkg() { check_vuxml() { local _BP_MATCH _OUTDATED _PKG_MATCH _b _e _p - # XXX5.6 drop redirect to /dev/null when 5.6 is out of support - ${FETCH} ${_TMPVUXML} ${VUXML_URL} >/dev/null || bye_bye + ${FETCH} ${_TMPVUXML} ${VUXML_URL} || bye_bye perl -pi -e 's,\$ARCH,'"${_ARCH}"',g' ${_TMPVUXML} + _BP_MATCH="$(grep binpatch ${_TMPVUXML} | sed -e 's,,,g;s,,,g;s,\$ARCH,'"${_ARCH}"',g' | sort -u)" for _e in ${EXCLUDE_PKG}; do set -A _BP_MATCH -- ${_BP_MATCH} @@ -234,8 +234,8 @@ fi # regex taken from fw_update(1) set -A _REL -- $(sysctl -n kern.version | sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q') _REL_INT="$(echo ${_REL[0]} | tr -d '.')" -_OPENUP_MINREL=59 -_OPENUP_VERSION=24 +_OPENUP_MINREL=60 +_OPENUP_VERSION=25 if [ -n "${_REL[1]}" -a "${_REL[1]}" != "-stable" ]; then _badrel=1; fi if [ "${_REL_INT}" -lt "${_OPENUP_MINREL}" ]; then _badrel=1; fi if [ -n "${_badrel}" ]; then @@ -243,14 +243,9 @@ if [ -n "${_badrel}" ]; then exit 1 fi -# XXX5.6 drop when 5.6 is out of support -if [ "${_REL_INT}" -ge 57 ]; then - FETCH="ftp -MVo" -fi - while getopts 'KSce' arg; do case ${arg} in - K) nokrn=1 ;; + K) if [ "${_REL_INT}" -lt 61 ]; then nokrn=1; fi ;; S) nosig=1; pkgopt="${pkgopt} -Dnosig -Dunsigned" ;; c) checkrun=1 ;; e) showenv=1 ;; @@ -297,8 +292,10 @@ if [ "${checkrun}" ]; then check_vuxml else [ -z "${nosig}" ] && get_key - rm_old_bp - update_binpatches + if [ "${_REL_INT}" -lt 61 ]; then + rm_old_bp + update_binpatches + fi update_pkg fi