Skip to content

Commit

Permalink
develmaster: Commits for v3.9.19 (#99)
Browse files Browse the repository at this point in the history
* Post release version increase

* Use `gzip`'s default compression level 6 for sources, too

* Minor reshuffling and fix issue #97
  … by adding the missing `sailfishdocs_sfos_releases=""` preset.
  • Loading branch information
Olf0 authored Mar 6, 2023
2 parents a68e9a9 + 0427d48 commit ed0295c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions rpm/sfos-upgrade.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Summary: Scripts for fail-safe upgrading of SailfishOS at the command lin
# is comprised of {alpha,beta,rc,release} postfixed with a natural number
# greater or equal to 1 (e.g., "beta3"). For details and reasons, see
# https://github.com/Olf0/sfos-upgrade/wiki/Git-tag-format
Version: 3.9.18
Release: release10
Version: 3.9.19
Release: release11
Group: Applications/System
Distribution: SailfishOS
License: LGPL-2.1-only
Expand Down Expand Up @@ -68,7 +68,7 @@ Url:
%endif

%define _binary_payload w6.gzdio
%define _source_payload w2.gzdio
%define _source_payload w6.gzdio

%prep
%setup -q
Expand Down
15 changes: 8 additions & 7 deletions usr/bin/sfos-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,21 @@ fi

mylist_sfos_releases="4.5.0.18,4.5.0.16,4.4.0.72,4.4.0.68,4.4.0.64,4.4.0.58,4.3.0.15,4.3.0.12,4.2.0.21,4.2.0.19,4.1.0.24,4.1.0.23,4.0.1.48,4.0.1.45,3.4.0.24,3.4.0.22,3.3.0.16,3.3.0.14,3.2.1.20,3.2.1.19,3.2.0.14,3.2.0.12,3.1.0.12,3.1.0.11,3.0.3.10,3.0.3.9,3.0.3.8,3.0.2.8,3.0.1.14,3.0.1.13,3.0.1.11,3.0.0.11,3.0.0.8,3.0.0.5,2.2.1.23,2.2.1.20,2.2.1.19,2.2.1.18,2.2.0.29,2.1.4.15,2.1.4.14,2.1.4.13,2.1.4.12,2.1.3.7,2.1.3.5,2.1.3.3,2.1.2.3,2.1.1.26,2.1.1.25,2.1.1.24,2.1.1.23,2.1.1.12,2.1.0.11,2.1.0.10,2.1.0.9,2.0.5.6,2.0.4.14,2.0.4.13,2.0.3.14,2.0.3.11,2.0.2.51,2.0.2.48,2.0.2.47,2.0.2.45,2.0.2.43,2.0.1.11,2.0.1.9,2.0.1.7,2.0.0.10,1.1.9.30,1.1.9.28,1.1.9.27,1.1.9.24,1.1.9.23,1.1.7.28,1.1.7.27,1.1.7.25,1.1.7.24,1.1.7.23,1.1.6.27,1.1.6.26,1.1.6.24,1.1.4.29,1.1.4.28,1.1.4.24,1.1.4.22,1.1.2.16,1.1.2.15,1.1.2.13,1.1.2.10,1.1.1.27,1.1.1.26,1.1.1.24,1.1.0.39,1.1.0.38,1.1.0.37,1.1.0.29,1.1.0.26,1.1.0.23,1.1.0.22,1.1.0.19,1.0.8.21,1.0.8.20,1.0.8.19,1.0.8.18,1.0.7.18,1.0.7.16,1.0.7.14,1.0.7.12,1.0.5.19,1.0.5.16,1.0.5.13,1.0.5.12,1.0.5.11,1.0.4.20,1.0.4.16,1.0.4.12,1.0.4.10,1.0.3.8,1.0.3.7,1.0.3.5,1.0.2.5,1.0.1.12,1.0.1.10,1.0.1.6,1.0.0.5,1.0.0.3,1.0.0.1,0.99.6.8,0.99.6.3,0.99.5.11,0.99.5.8,0.99.5.6"
my_recent_sfos_release="$(echo "$mylist_sfos_releases" | cut -f 1 -d ',')"
sailfishdocs_sfos_list=""
sailversion_sfos_releases=""
sailfishdocs_sfos_list=""
sailfishdocs_sfos_releases=""
case "$(compare_versions "$upgrade_release" "$my_recent_sfos_release")$(compare_versions "$installed_release" "$my_recent_sfos_release")" in
g???|??g?) # Only download lists of SailfishOS releases, if the installed release and / or the one to upgrade to is larger than the first entry of the internal list of SailfishOS releases.
sailfishdocs_fail="y"
sailversion_fail="y"
sailfishdocs_fail="y"
# Calling curl with the -k (= --insecure) option, which only disables the certificate validity checks, because after a factory reset the used certificate bundle is much too old (contains outdated root certifictes) to correctly verify the certificate chain.
if sailversion_sfos_releases="$(curl -sSk https://coderus.openrepos.net/whitesoft/sailversion | cut -f 1 -d ' ' | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$')"
then sailversion_fail="n"
fi
sailfishdocs_sfos_list="$(curl -sSkL https://github.com/sailfishos/docs.sailfishos.org/raw/master/Support/Releases/README.md | cut -s -d '|' -f 2,5 | tr -d ' ')"
if sailfishdocs_sfos_releases="$(echo "$sailfishdocs_sfos_list" | cut -s -d '|' -f 1 | grep -o '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*')"
then sailfishdocs_fail="n"
fi
if sailversion_sfos_releases="$(curl -sSk https://coderus.openrepos.net/whitesoft/sailversion | cut -f 1 -d ' ' | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$')"
then sailversion_fail="n"
fi
if [ "$sailfishdocs_fail$sailversion_fail" = "yy" ]
then
echo "Notice: Failed to retrieve a list of recent SailfishOS releases, hence unable to check the validity of version number \"${upgrade_release}\"." >&2
Expand Down Expand Up @@ -229,10 +230,10 @@ else
case "$(compare_versions "$upgrade_release" "$my_recent_sfos_release")$(compare_versions "$installed_release" "$my_recent_sfos_release")" in
g???|??g?) # Only extract Jolla's list of SailfishOS stop releases, if the installed release and / or the one to upgrade to is larger than the first entry of the internal list of SailfishOS releases.
# Deliberately not performing this comparison with the internal list of stop releases, because it must be exactly the same condition as in line 179.
if ! sailfishdocs_stop_releases="$(echo "$sailfishdocs_sfos_list" | fgrep -i 'stoprelease' | cut -s -d '|' -f 1 | grep -o '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*')"
if [ "$sailfishdocs_fail" != "n" ] || ! sailfishdocs_stop_releases="$(echo "$sailfishdocs_sfos_list" | fgrep -i 'stoprelease' | cut -s -d '|' -f 1 | grep -o '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*')"
then
echo "Warning: Failed to extract the current \"stop releases\" from https://github.com/sailfishos/docs.sailfishos.org/tree/master/Support/Releases#readme" >&2
echo "Hence unable to check if \"${upgrade_release}\" is a \"stop release\"." >&2
echo "Hence unable to check if the path from \"${installed_release}\" to \"${upgrade_release}\" contains a \"stop release\"." >&2
if [ -z "$set_ssu" ]
then echo -n "Do you want to continue?" >&2
else echo -n "Do you really want to continue?" >&2
Expand Down

0 comments on commit ed0295c

Please sign in to comment.