1
0
Fork 0
forked from mirrors/openup

Use -M for ftp(1) on 5.7 and beyond.

This commit is contained in:
Antoine Jacoutot 2015-04-29 11:20:28 +02:00
commit 54e3e59628

15
openup
View file

@ -23,22 +23,31 @@
### DO NOT EDIT THIS FILE!!! ### ### DO NOT EDIT THIS FILE!!! ###
### User defined variables: overrides are read from /etc/openup.conf ### ### User defined variables: overrides are read from /etc/openup.conf ###
######################################################################## ########################################################################
# URL to the latest openup version # URL to the latest openup version
OPENUP_URL="https://stable.mtier.org/openup" OPENUP_URL="https://stable.mtier.org/openup"
# signify(1) public key # signify(1) public key
PKG_PUBKEY_URL="https://stable.mtier.org/mtier-$(uname -r | tr -d '.')-pkg.pub" PKG_PUBKEY_URL="https://stable.mtier.org/mtier-$(uname -r | tr -d '.')-pkg.pub"
# PKG_PATH for currently running OpenBSD release # PKG_PATH for currently running OpenBSD release
PKG_PATH_MAIN="http://ftp.fr.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)" PKG_PATH_MAIN="http://ftp.fr.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)"
# PKG_PATH for the corresponding release stable service # PKG_PATH for the corresponding release stable service
PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)" PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)"
# PKG_PATH addition for the corresponding LTS release stable service # PKG_PATH addition for the corresponding LTS release stable service
#PKG_PATH_UPDATE_LTS="https://user%domain.tld:password@stable.mtier.org/updates-lts/$(uname -r)/$(arch -s)" #PKG_PATH_UPDATE_LTS="https://user%domain.tld:password@stable.mtier.org/updates-lts/$(uname -r)/$(arch -s)"
# URL to the latest vuxml (vulnerabilities database) # URL to the latest vuxml (vulnerabilities database)
VUXML_URL="https://stable.mtier.org/vuxml/$(uname -r | tr -d '.').xml" VUXML_URL="https://stable.mtier.org/vuxml/$(uname -r | tr -d '.').xml"
# fetch command (must behave like "ftp -o"); e.g. "wget -qO" # fetch command (must behave like "ftp -o"); e.g. "wget -qO"
FETCH="ftp -Vo" FETCH="ftp -Vo"
# exclusion list: pkg names without version/flavor, separated by space # exclusion list: pkg names without version/flavor, separated by space
EXCLUDE_PKG="" EXCLUDE_PKG=""
######################################################################## ########################################################################
### End of user defined variables ### ### End of user defined variables ###
######################################################################## ########################################################################
@ -155,6 +164,7 @@ update_pkg() {
check_vuxml() { check_vuxml() {
local _BP_MATCH _OUTDATED _PKG_MATCH _b _e _p 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} >/dev/null || bye_bye
perl -pi -e 's,\$ARCH,'"${_ARCH}"',g' ${_TMPVUXML} perl -pi -e 's,\$ARCH,'"${_ARCH}"',g' ${_TMPVUXML}
@ -232,6 +242,11 @@ if [ -n "${_badrel}" ]; then
exit 1 exit 1
fi fi
# XXX5.6 drop when 5.6 is out of support
if [ "${_REL_INT}" -ge 57 ]; then
FETCH="ftp -MVo"
fi
while getopts 'KSc' arg; do while getopts 'KSc' arg; do
case ${arg} in case ${arg} in
K) nokrn=1 ;; K) nokrn=1 ;;