diff --git a/README.md b/README.md index 4a00c702..bbf98738 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The [Storeman Installer](https://github.com/storeman-developers/harbour-storeman * If you experience issues when installing, removing or updating packages after a SailfishOS upgrade, try running `devel-su pkcon refresh` in a terminal app. * Starting with version 0.2.9, Storeman is built by the help of the SailfishOS-OBS and initially installed by the Storeman Installer (or manually). To update from Storeman < 0.2.9 (needs SailfishOS ≥ 3.1.0), one should reinstall Storeman via the Storeman Installer (which installs the current Storeman release, and since Storeman Installer 1.3.0 automatically removes a Storeman < 0.3.0 before that) or manually remove Storeman < 0.2.9 and install Storeman ≥ 0.3.0. After an initial installation of Storeman ≥ 0.3.0, further updates of Storeman will be performed within Storeman, as usual. -* Before software can be build for a SailfishOS release at the SailfishOS-OBS, Jolla must create a [corresponding "download on demand (DoD)" OBS-repository](https://build.sailfishos.org/project/subprojects/sailfishos). It may take a little time after a new SailfishOS release is published before the corresponding "DoD" repository is being made available, during which installing Storeman by the Storeman Installer or updating Storeman by itself on a device with the new SailfishOS release already installed does not work, because Storeman cannot be compiled for this new SailfishOS release at the Sailfish-OBS, yet; consequently this is always the case for "closed beta (cBeta)" releases of SailfishOS. In such a situation one has to manually download Storeman built for the last prior SailfishOS "general availability (GA)" release (e.g. from [its releases section at GitHub](https://github.com/storeman-developers/harbour-storeman/releases) or [the SailfishOS-OBS](https://build.sailfishos.org/project/show/home:olf:harbour-storeman)), then install or update Storeman via `pkcon install-local `, and hope that there is no change in the new SailfishOS release which breaks Storeman; if there is, please report that soon at [Storeman's issue tracker](https://github.com/storeman-developers/harbour-storeman/issues). +* Before software can be build for a new SailfishOS release at the SailfishOS-OBS, Jolla must create a [corresponding "download on demand (DoD)" OBS-repository](https://build.sailfishos.org/project/subprojects/sailfishos). Before that is employed by Jolla, Storeman's download repository for this new SailfishOS release will usually be mapped to the prior SailfishOS release by [its OBS-meta-configuration](https://build.sailfishos.org/project/meta/home:olf:harbour-storeman), in hope that there is no change in the new SailfishOS release which breaks Storeman; if there is, please report that soon at [Storeman's issue tracker](https://github.com/storeman-developers/harbour-storeman/issues). * Disclaimer: Storeman and its installer may still have flaws, kill your kittens or break your SailfishOS installation! Although this is very unlikely after years of testing by many users, new flaws may be introduced in any release (as for any software). Mind that the license you implicitly accept by using Storeman or Storeman Installer excludes any liability. ## Translating Storeman (l10n / i18n) diff --git a/rpm/harbour-storeman.changes b/rpm/harbour-storeman.changes index 9dbab39a..8874a7ec 100644 --- a/rpm/harbour-storeman.changes +++ b/rpm/harbour-storeman.changes @@ -1,5 +1,8 @@ +* Mon Nov 11 2024 olf - 0.7.2 +- Rework OBS repository handling, part 2: Improve (#498) + * Mon Nov 04 2024 olf - 0.7.1 -- Handle `storeman-obs` repository well, when Storeman was not installed by the Storeman Installer +- Handle `harbour-storeman-obs` SailfishOS-OBS-repository for self-updating well, when Storeman was not installed by the Storeman Installer - Rework OBS repository handling, part 1: Unify and simplify * Sun Mar 24 2024 olf - 0.7.0 diff --git a/rpm/harbour-storeman.spec b/rpm/harbour-storeman.spec index 2a84d3fb..ebd713ac 100644 --- a/rpm/harbour-storeman.spec +++ b/rpm/harbour-storeman.spec @@ -3,7 +3,7 @@ Name: harbour-storeman Summary: OpenRepos client application for SailfishOS # The tag must adhere to semantic versioning: Among multiple other # reasons due to its use for `qmake5` in line 107. See https://semver.org/ -Version: 0.7.1 +Version: 0.7.2 # The tag comprises one of {alpha,beta,rc,release} postfixed with a # natural number greater or equal to 1 (e.g., "beta3") and may additionally be # postfixed with a plus character ("+"), the name of the packager and a release @@ -119,41 +119,50 @@ desktop-file-install --delete-original --dir=%{buildroot}%{_datadir}/application # Mind to keep these two %%post scripltets synchronised! # The %%post scriptlet is deliberately run when installing *and* updating: ssu_ur=no -ssu_lr="$(ssu lr | grep '^ - ' | cut -f 3 -d ' ')" -if echo "$ssu_lr" | grep -Fq mentaljam-obs +if grep -q '^mentaljam-obs=' %{_sysconfdir}/ssu/ssu.ini then ssu rr mentaljam-obs ssu_ur=yes fi # Add harbour-storeman-obs repository configuration, depending on the installed -# SailfishOS release (3.1.0 is the lowest supported, see line 35 ff.): +# SailfishOS release (3.1.0 is the lowest supported, see line 35 ff.). +# Set empty default value failing the following tests, because VERSION_ID +# should become overwritten by source'ing /etc/os-release: +VERSION_ID='' source %{_sysconfdir}/os-release sailfish_version="$(echo "$VERSION_ID" | cut -s -f 1-3 -d '.' | tr -d '.')" -# Must be an all numerical string of at least three digits: -if echo "$sailfish_version" | grep -q '^[0-9][0-9][0-9][0-9]*$' +# sailfish_version must be an all numerical string of at least three digits: +if ! echo "sailfish_version" | grep -q '^[0-9][0-9][0-9][0-9]*$' then - if [ "$sailfish_version" -lt 460 ] - then ssu ar %{name}-obs 'https://repo.sailfishos.org/obs/home:/olf:/%{name}/%%(release)_%%(arch)/' - else ssu ar %{name}-obs 'https://repo.sailfishos.org/obs/home:/olf:/%{name}/%%(releaseMajorMinor)_%%(arch)/' + echo "Error: VERSION_ID=$VERSION_ID => sailfish_version=$sailfish_version" >&2 +else + # Ensure that the repo config is correct: If it is missing or a fixed + # SFOS-release number was used, set it anew. + release_macro="$(grep '^harbour-storeman-obs=' %{_sysconfdir}/ssu/ssu.ini | grep -o '/[[:graph:]][[:graph:]][[:graph:]][[:graph:]]*/$' | grep -o '%%(release[[:alpha:]]*)')" + if [ $sailfish_version -ge 460 ] && [ "$release_macro" != '%%(releaseMajorMinor)' ] + then + ssu ar harbour-storeman-obs 'https://repo.sailfishos.org/obs/home:/olf:/harbour-storeman/%%(releaseMajorMinor)_%%(arch)/' + ssu_ur=yes + elif [ $sailfish_version -lt 460 ] && [ "$release_macro" != '%%(release)' ] + then + ssu ar harbour-storeman-obs 'https://repo.sailfishos.org/obs/home:/olf:/harbour-storeman/%%(release)_%%(arch)/' + ssu_ur=yes fi - ssu_ur=yes -# Should be enhanced to proper debug output, also writing to systemd-journal: -else echo "Error: VERSION_ID=$VERSION_ID => sailfish_version=$sailfish_version" >&2 fi if [ $ssu_ur = yes ] then ssu ur fi # BTW, `ssu`, `rm -f`, `mkdir -p` etc. *always* return with "0" ("success"), hence # no appended `|| true` needed to satisfy `set -e` for failing commands outside of -# flow control directives (if, while, until etc.). Furthermore on Fedora Docs it -# is indicated that solely the final exit status of a whole scriptlet is crucial: +# flow control directives (if, while, until etc.). Furthermore Fedora Docs etc. +# state that solely the final exit status of a whole scriptlet is crucial: # See https://docs.pagure.org/packaging-guidelines/Packaging%3AScriptlets.html # or https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax # committed on 18 February 2019 by tibbs ( https://pagure.io/user/tibbs ) in # https://pagure.io/packaging-committee/c/8d0cec97aedc9b34658d004e3a28123f36404324 -# Hence I have the impression, that only the main section of a spec file is -# interpreted in a shell invoked with the option `-e', but not the scriptlets -# (`%%pre*`, `%%post*`, `%%trigger*` and `%%file*`). +# Hence only the main section of a spec file and likely also `%%()` +# statements are executed in a shell invoked with the option `-e', but not the +# scriptlets: `%%pre*`, `%%post*`, `%%trigger*` and `%%file*` exit 0 %postun