[-]
[+]
|
Changed |
_service:tar_git:sfos-upgrade.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/Olf0/sfos-upgrade.git</param>
<param name="branch">master</param>
- <param name="revision">3.7.2</param>
+ <param name="revision">3.7.8</param>
</service>
</services>
-
|
[-]
[+]
|
Changed |
_service:tar_git:sfos-upgrade-3.7.8.tar.gz/README.md
^
|
@@ -6,7 +6,7 @@
Furthermore the GUI offers no control which SailfishOS version to upgrade to.
In contrast to that, Jolla's [guide how to upgrade SailfishOS at the command line](https://jolla.zendesk.com/hc/en-us/articles/360005795474) offers full control, while lacking any logs or safety checks.<br />
-And it is tedious and error prone to issue multiple, critical commands manually at the command line.
+Furthermore it is tedious and error prone to issue multiple, critical commands manually at the command line.
**sfos-upgrade** performs the steps to upgrade SailfishOS at the command line in an automated manner, while providing extensive safety measures plus full log output at the screen and in a log file.<br />
<br />
|
[-]
[+]
|
Changed |
_service:tar_git:sfos-upgrade-3.7.8.tar.gz/usr/bin/post_sfos-upgrade
^
|
@@ -31,7 +31,7 @@
then pkill $(echo $i) store-client
else break
fi
- sleep 1
+ sleep 1
done
echo
fi
@@ -45,6 +45,8 @@
echo "- Refreshing zypper's caches:"
zypper refresh || exit $?
echo
+ # Syncing, as I could not determine if zypper already does that:
+ sync
fi
# This may have become superfluous with SFOS 3.2.0, see
@@ -52,7 +54,6 @@
# Would need to investigate, but refreshing twice will do no harm, anyway.
echo "- Refreshing pkcon's caches:"
pkcon refresh || exit $?
-
-# Syncing, as I could not determine if pkcon and zypper already do that:
+# Syncing, as I could not determine if pkcon already does that:
sync
|
[-]
[+]
|
Changed |
_service:tar_git:sfos-upgrade-3.7.8.tar.gz/usr/bin/sfos-upgrade
^
|
@@ -2,7 +2,7 @@
set -euC -o posix # Omitting -f (aka -o noglob), because bash 3.2.57(1)-release does not perform a set +f (or +o noglob; plus setopt is not built-in) correctly, which would be needed later!
# Switched to use bash since version 2.1 of this script (in its first line), as this ensures that "-o pipefail"
-# (in line 615) is available, after checking that bash seems to be present in mer-core at least since 2011-10-04
+# (in line 630) is available, after checking that bash seems to be present in mer-core at least since 2011-10-04
# (see https://git.sailfishos.org/mer-core/bash / https://git.merproject.org/mer-core/bash ) and consequently in
# SailfishOS since its beginnings (checked v1.0.0.5 per
# curl https://releases.sailfishos.org/sources/sailfish-1.0.0.5-oss.tar.bz2 | tar -tv | fgrep 'bash' , as no earlier
@@ -191,17 +191,20 @@
# Jolla 1 phones), thus being the oldest one widely tested to upgrade from (and Jolla may assume
# only early developers to have ever obtained an earlier release on their Jolla 1 phones, hence
# not mentioning 1.0.0.5 in Jolla's "official" guides as a stop release).
- if ! recent_stop_releases="$(curl -sS https://jolla.zendesk.com/hc/en-us/articles/201836347 | sed -n '/id="4"/,/id="5"/p' | sed -n '/<ul>/,/<\/ul>/p' | sed -n '/<li>/,/<\/li>/p' | sed 's/<[^>]*>/\n/g' | tr -c '.0-9' '\n' | egrep '^[1-9]\.[0-9]\.[0-9]\.[0-9]$|^[1-9]\.[0-9]\.[0-9]\.[1-9][0-9]$')"
- then
- echo "Warning: Failed to extract the current \"stop releases\" from https://jolla.zendesk.com/hc/en-us/articles/201836347#4.1" >&2
- echo "Hence using an internal, potentially outdated list of stop releases instead." >&2
- if [ -z "$set_ssu" ]
- then echo -n "Do you want to continue?" >&2
- else echo -n "Do you really want to continue?" >&2
- fi
- askyes >&2
- echo >&2
- fi
+ # Unfortunately not working anymore (for details, see https://github.com/Olf0/sfos-upgrade/issues/48#issuecomment-709380565 ff.),
+ # thus disabling this safety measure against an outdated, internal list (above) for now:
+ recent_stop_releases=""
+ #if ! recent_stop_releases="$(curl -sS https://jolla.zendesk.com/hc/en-us/articles/201836347 | sed -n '/id="4"/,/id="5"/p' | sed -n '/<ul>/,/<\/ul>/p' | sed -n '/<li>/,/<\/li>/p' | sed 's/<[^>]*>/\n/g' | tr -c '.0-9' '\n' | egrep '^[1-9]\.[0-9]\.[0-9]\.[0-9]$|^[1-9]\.[0-9]\.[0-9]\.[1-9][0-9]$')"
+ #then
+ # echo "Warning: Failed to extract the current \"stop releases\" from https://jolla.zendesk.com/hc/en-us/articles/201836347#4.1" >&2
+ # echo "Hence using an internal, potentially outdated list of stop releases instead." >&2
+ # if [ -z "$set_ssu" ]
+ # then echo -n "Do you want to continue?" >&2
+ # else echo -n "Do you really want to continue?" >&2
+ # fi
+ # askyes >&2
+ # echo >&2
+ #fi
all_stop_releases="$(echo -e "${recent_stop_releases}\n$known_stop_releases" | grep -v '^$' | sort -u)"
compar0="$(compare_versions "$installed_release" "$upgrade_release")"
case "$compar0" in
@@ -390,15 +393,30 @@
fi
else
free_space="$(df -k / | sed -n '2p' | rev | grep '^/ ' | tr -s ' ' | cut -s -f 3 -d ' ' | rev)"
- if ! [ "$free_space" -ge "524288" ]
- then
- echo "Aborting: Less than 0.5 GiB ($free_space KiB) of free space on the root filesystem!" >&2
- echo "Please clean up or enlarge the root filesystem before retrying." >&2
+ # Note that in contrast to upgrading at the GUI, the RPMs for upgrading are not all downloaded first (and installed after booting into the system-update mode),
+ # but downloaded and installed one by one, hence requiring much less space on persistent storage (i.e., the root filesystem) for upgrading.
+ # OTOH, be aware that the download sizes Jolla mentions in their release notes are only valid for upgrading from the direct predecessor release,
+ # but one may upgrade from one stop release to another, comprising the RPMs of multiple releases.
+ # Furthermore these estimates from Jolla only cover their own default components (RPMs), individually installed RPMs (e.g., from the Jolla Store, OpenRepos or even Jolla's SailfishOS repositories) are not and cannot be accounted for.
+ if ! [ "$free_space" -gt "524288" ]
+ then # This hard ½ GiB limit is an rough estimate of an upper boundary for the sum of all RPM size increases by an upgrade plus space for the package management's indexes, caches etc.
+ echo "Aborting: Less than ½ GiB ($free_space KiB) free space on the root filesystem!" >&2
+ echo "Please clean up or enlarge the root filesystem before retrying, see e.g.:" >&2
+ echo "https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size" >&2
exit 1
- elif ! [ "$free_space" -ge "786432" ]
- then
- echo "Warning: Less than 0.75 GiB ($free_space KiB) of free space on the root filesystem!" >&2
- echo "Please consider to abort and to clean up or enlarge the root filesystem before retrying." >&2
+ elif ! [ "$free_space" -gt "786432" ]
+ then # As the largest SailfishOS upgrades (Jolla's estimates: the sum of the sizes of all updated RPMs (which are installed by default), when directly upgrading from the predecessor release) have been over 600 MiB (e.g., SFOS 3.3.0 -> 3.4.0), a ¾ GiB limit to warn explicitly seems to be reasonable.
+ echo "Warning: Less than ¾ GiB ($free_space KiB) free space on the root filesystem!" >&2
+ echo "Please consider to abort and to clean up or enlarge the root filesystem before retrying, see e.g.:" >&2
+ echo "https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size" >&2
+ echo -n "Do you really want to continue?" >&2
+ askyes >&2
+ echo >&2
+ elif ! [ "$free_space" -ge "1048576" ]
+ then # This 1 GiB limit to emit a soft low space notice is intended to trigger users early to do something about it.
+ echo "Notice: Less than 1 GiB ($free_space KiB) free space on the root filesystem!" >&2
+ echo "Please consider to clean up or enlarge the root filesystem, see e.g.:" >&2
+ echo "https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size" >&2
echo >&2
fi
fi
|