Skip to content

Commit

Permalink
mastersfos3.1: Commits for v2.2.7 (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
Olf0 authored Nov 4, 2024
2 parents 0ca9016 + 321648f commit 928d143
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .tx/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
git:
# Basic setup guide for GitHub:
# https://help.transifex.com/en/articles/6265125-github-via-transifex-ui
# https://help.transifex.com/en/articles/6265125
filters:
- filter_type: file
# All supported i18n types (hard to find): https://docs.transifex.com/formats
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.merproject.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.merproject.org/project/show/home:olf:harbour-storeman)), then install or update Storeman via `pkcon install-local <downloaded RPM file>`, 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 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 <downloaded RPM file>`, 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).
* 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)
Expand Down
2 changes: 1 addition & 1 deletion qml/pages/TranslationsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Page {

MenuItem {
text: "Storeman@Transifex"
onClicked: Qt.openUrlExternally("https://www.transifex.com/mentaljam/harbour-storeman")
onClicked: Qt.openUrlExternally("https://app.transifex.com/mentaljam/harbour-storeman")
}

MenuStatusLabel { }
Expand Down
4 changes: 4 additions & 0 deletions rpm/harbour-storeman.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Mon Nov 04 2024 olf <[email protected]> - 0.7.1
- Handle `storeman-obs` repository well, when Storeman was not installed by the Storeman Installer
- Rework OBS repository handling, part 1: Unify and simplify

* Sun Mar 24 2024 olf <[email protected]> - 0.7.0
- Remove `User=` specification from D-Bus service file (#473) by @nephros, closes issue #301

Expand Down
24 changes: 18 additions & 6 deletions rpm/harbour-storeman.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Name: harbour-storeman
Summary: OpenRepos client application for SailfishOS
# The <version> 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.0
Version: 0.7.1
# The <release> 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
Expand Down Expand Up @@ -113,19 +113,32 @@ desktop-file-install --delete-original --dir=%{buildroot}%{_datadir}/application
%{buildroot}%{_datadir}/applications/%{name}.desktop

%post
# This is a shortened version of the %%post scriptlet of Storeman Installer,
# omitting a lots of detailed comments, also omitting creating and recording a
# log-file.
# 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
then
ssu rr mentaljam-obs
rm -f /var/cache/ssu/features.ini
ssu_ur=yes
fi
if ! echo "$ssu_lr" | grep -Fq %{name}-obs
# Add harbour-storeman-obs repository configuration, depending on the installed
# SailfishOS release (3.1.0 is the lowest supported, see line 35 ff.):
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]*$'
then
ssu ar %{name}-obs 'https://repo.sailfishos.org/obs/home:/olf:/%{name}/%%(release)_%%(arch)/'
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)/'
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
Expand All @@ -139,15 +152,14 @@ fi
# 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 called with the option `-e', but not the scriptlets
# interpreted in a shell invoked with the option `-e', but not the scriptlets
# (`%%pre*`, `%%post*`, `%%trigger*` and `%%file*`).
exit 0

%postun
if [ $1 = 0 ] # Removal
then
ssu rr %{name}-obs
rm -f /var/cache/ssu/features.ini
ssu ur
# Remove a %%{name}-installer log-file, if extant:
rm -f %{_localstatedir}/log/%{name}-installer.log.txt
Expand Down
3 changes: 3 additions & 0 deletions scripts/update_translators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import requests
import json

# This API is deprectated and does not work any longer:
URL = 'http://www.transifex.com/api/2/project/harbour-storeman/languages/'
# Either use Transifex's Python library: https://developers.transifex.com/reference/api-python-sdk
# Or use Transifex's REST API: https://developers.transifex.com/reference/get_languages

def credentials():
'''Get Transifex user name and password'''
Expand Down

0 comments on commit 928d143

Please sign in to comment.