Merge pull request #9544 from id/build-fix-amzn2-relup
build: fix relup on amzn2
This commit is contained in:
commit
4c5d66ba6b
8
build
8
build
|
@ -195,6 +195,14 @@ make_zip() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
amzn2)
|
||||||
|
case "$PKG_VSN" in
|
||||||
|
4.4.12*)
|
||||||
|
# this is the first version for amzn2, no relup
|
||||||
|
has_relup='no'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
# shellcheck disable=SC2207
|
# shellcheck disable=SC2207
|
||||||
bases=($(relup_db base-vsns "$PKG_VSN"))
|
bases=($(relup_db base-vsns "$PKG_VSN"))
|
||||||
|
|
|
@ -14,7 +14,11 @@ case "$UNAME" in
|
||||||
SYSTEM="${DIST}${VERSION_ID}"
|
SYSTEM="${DIST}${VERSION_ID}"
|
||||||
;;
|
;;
|
||||||
Linux)
|
Linux)
|
||||||
if grep -q -i 'rhel' /etc/*-release; then
|
# /etc/os-release on amazon linux 2 contains both rhel and centos strings
|
||||||
|
if grep -q -i 'amzn' /etc/*-release; then
|
||||||
|
DIST='amzn'
|
||||||
|
VERSION_ID="$(sed -n '/^VERSION_ID=/p' /etc/os-release | sed -r 's/VERSION_ID=(.*)/\1/g' | sed 's/"//g')"
|
||||||
|
elif grep -q -i 'rhel' /etc/*-release; then
|
||||||
DIST='el'
|
DIST='el'
|
||||||
VERSION_ID="$(rpm --eval '%{rhel}')"
|
VERSION_ID="$(rpm --eval '%{rhel}')"
|
||||||
elif grep -q -i 'centos' /etc/*-release; then
|
elif grep -q -i 'centos' /etc/*-release; then
|
||||||
|
|
|
@ -171,6 +171,11 @@ filter_froms(Froms0, AvailableVersionsIndex) ->
|
||||||
fun(Vsn) ->
|
fun(Vsn) ->
|
||||||
not lists:member(Vsn, [<<"4.4.0">>, <<"4.4.1">>])
|
not lists:member(Vsn, [<<"4.4.0">>, <<"4.4.1">>])
|
||||||
end, Froms0);
|
end, Froms0);
|
||||||
|
%% amzn2 is introduced since v4.4.12 and e4.4.12
|
||||||
|
%% exclude tags before them
|
||||||
|
"amzn2" ->
|
||||||
|
Excluded = [list_to_binary(["4.4.", integer_to_list(X)]) || X <- lists:seq(0,11)],
|
||||||
|
lists:filter(fun(Vsn) -> not lists:member(Vsn, Excluded) end, Froms0);
|
||||||
_ ->
|
_ ->
|
||||||
Froms0
|
Froms0
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue