forked from mirrors/openup
add support for OpenBSD 6.1
This commit is contained in:
parent
9d9e96357e
commit
1980cc8c78
1 changed files with 10 additions and 13 deletions
23
openup
23
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,<name>,,g;s,</name>,,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue