From caa9e3bb1e3b125a79f509036c1fb2526541a3f5 Mon Sep 17 00:00:00 2001 From: olf Date: Thu, 7 Nov 2024 04:42:58 +0100 Subject: [PATCH 1/6] Init v0.7.2 (#493) * [harbour-storeman.spec] Post release version increase * [harbour-storeman.changes] Add stub for v0.7.2 * [harbour-storeman.changes] Expand and rectify entry for 0.7.1 --- rpm/harbour-storeman.changes | 5 ++++- rpm/harbour-storeman.spec | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rpm/harbour-storeman.changes b/rpm/harbour-storeman.changes index 9dbab39a..29cfd704 100644 --- a/rpm/harbour-storeman.changes +++ b/rpm/harbour-storeman.changes @@ -1,5 +1,8 @@ +* Wed Nov 06 2024 olf - 0.7.2 +- + * 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..32ebd6b6 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 From 03f889d2e3a3dd0144f6b13ec0e7f2bbb2a7ce6e Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 8 Nov 2024 05:42:25 +0100 Subject: [PATCH 2/6] [harbour-storeman.spec] Rework OBS repository handling, part 2: Improve (#498) --- rpm/harbour-storeman.spec | 41 ++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/rpm/harbour-storeman.spec b/rpm/harbour-storeman.spec index 32ebd6b6..ebd713ac 100644 --- a/rpm/harbour-storeman.spec +++ b/rpm/harbour-storeman.spec @@ -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 From c2adcb7950d3b544f2e0796e57ecff86f232b964 Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 8 Nov 2024 05:58:37 +0100 Subject: [PATCH 3/6] [README.md] Adapto to recent changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 4fb8e89b8be87e4759cbfab11a4830fe494aff19 Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 8 Nov 2024 06:09:45 +0100 Subject: [PATCH 4/6] [harbour-storeman.changes] Finalise entry for v0.7.2 --- rpm/harbour-storeman.changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/harbour-storeman.changes b/rpm/harbour-storeman.changes index 29cfd704..84744239 100644 --- a/rpm/harbour-storeman.changes +++ b/rpm/harbour-storeman.changes @@ -1,5 +1,5 @@ -* Wed Nov 06 2024 olf - 0.7.2 -- +* Fri Nov 08 2024 olf - 0.7.2 +- Rework OBS repository handling, part 2: Improve (#498) * Mon Nov 04 2024 olf - 0.7.1 - Handle `harbour-storeman-obs` SailfishOS-OBS-repository for self-updating well, when Storeman was not installed by the Storeman Installer From 15d55d6492e4e967ca10942ee954f3df7207422a Mon Sep 17 00:00:00 2001 From: olf Date: Mon, 11 Nov 2024 00:25:28 +0100 Subject: [PATCH 5/6] [harbour-storeman.changes] Update date to actual release date --- rpm/harbour-storeman.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/harbour-storeman.changes b/rpm/harbour-storeman.changes index 84744239..759aae81 100644 --- a/rpm/harbour-storeman.changes +++ b/rpm/harbour-storeman.changes @@ -1,4 +1,4 @@ -* Fri Nov 08 2024 olf - 0.7.2 +* Man Nov 11 2024 olf - 0.7.2 - Rework OBS repository handling, part 2: Improve (#498) * Mon Nov 04 2024 olf - 0.7.1 From c6e63b28587888b807daa00aa38f8d1624b67da7 Mon Sep 17 00:00:00 2001 From: olf Date: Mon, 11 Nov 2024 00:27:57 +0100 Subject: [PATCH 6/6] [harbour-storeman.changes] Fix typo in previous commit --- rpm/harbour-storeman.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/harbour-storeman.changes b/rpm/harbour-storeman.changes index 759aae81..8874a7ec 100644 --- a/rpm/harbour-storeman.changes +++ b/rpm/harbour-storeman.changes @@ -1,4 +1,4 @@ -* Man Nov 11 2024 olf - 0.7.2 +* Mon Nov 11 2024 olf - 0.7.2 - Rework OBS repository handling, part 2: Improve (#498) * Mon Nov 04 2024 olf - 0.7.1