Skip to content

Commit

Permalink
Update v1.x.y-legacy branch with commits from master branch (#294)
Browse files Browse the repository at this point in the history
* Update README.md

* Update with commits for 2.2.1

* Update with commits for 2.2.1

* Update with commits for 2.2.1

* Update with commits for 2.2.1

* [spec file] Cherry-pick changes for 2.2.1

* Update LICENSE

* Update with commits for 2.2.1

* [README] Restore very last bullet point
  • Loading branch information
Olf0 authored Mar 20, 2023
2 parents 57400d3 + 325211d commit 015ae98
Show file tree
Hide file tree
Showing 8 changed files with 554 additions and 39 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ assignees: ''
#### STEPS TO REPRODUCE


#### ATTACH LOG-FILE

Upload the log-file from `/var/log/harbour-storeman-installer.log.txt` here.


#### ADDITIONAL INFORMATION

<sub>\[Please consider which other pieces of information may be relevant: Denote if this is not always reproducible, if this is a regression (then name to which older version), attach relevant data such as log files or the systemd journal, provide screenshots etc.\]</sub>
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/help-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ assignees: ''
#### STEPS TO REPRODUCE


#### ATTACH LOG-FILE

Upload the log-file from `/var/log/harbour-storeman-installer.log.txt` here.


#### ADDITIONAL INFORMATION

<sub>\[Please consider which other pieces of information may be relevant: Denote if this is not always reproducible, if this is a regression (then name to which older version), attach relevant data such as log files or the systemd journal, provide screenshots etc.\]</sub>
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- name: Prepare
run: mkdir RPMS

- name: Build armv7hl on 3.1.0.12
- name: Build i486 on 3.1.0.12
uses: coderus/github-sfos-build@old-stable
with:
release: 3.1.0.12
arch: armv7hl
arch: i486

- name: Upload build result
uses: actions/upload-artifact@v3
Expand Down
510 changes: 485 additions & 25 deletions LICENSE

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# Storeman Installer

**The Storeman Installer for SailfishOS performs the initial installation of the [Storeman OpenRepos client application](https://github.com/storeman-developers/harbour-storeman). Storeman Installer selects, downloads and installs the correct variant of the Storeman application built for the CPU-architecture of the device and the installed SailfishOS release from the SailfishOS-OBS.**
**The Storeman Installer for SailfishOS performs the initial installation of the [Storeman OpenRepos client application](https://github.com/storeman-developers/harbour-storeman#readme). Storeman Installer selects, downloads and installs the correct variant of the Storeman application built for the CPU-architecture of the device and the installed SailfishOS release from the SailfishOS-OBS.**

### Background

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 <&nbsp;0.2.9 (requires SailfishOS ≥&nbsp;3.1.0), one should reinstall Storeman via the Storeman Installer. After an initial installation of Storeman ≥&nbsp;0.3.0, further updates of Storeman will be performed within Storeman, as usual.

The Storeman Installer works on any SailfishOS release ≥&nbsp;3.1.0 and all supported CPU-architectures (armv7hl, i486 and aarch64). The current Storeman Installer RPM can be obtained from [its "latest release" page at GitHub](https://github.com/storeman-developers/harbour-storeman-installer/releases/latest), [OpenRepos.net](https://openrepos.net/content/olf/storeman-installer) and [the SailfishOS-OBS](https://build.merproject.org/package/show/home:olf:harbour-storeman/harbour-storeman-installer).
The Storeman Installer works on any SailfishOS release ≥&nbsp;3.1.0 and all supported CPU-architectures (armv7hl, i486 and aarch64). The current Storeman Installer RPM can be obtained from its ["latest release" page at GitHub](https://github.com/storeman-developers/harbour-storeman-installer/releases/latest), [OpenRepos.net](https://openrepos.net/content/olf/storeman-installer) and [the SailfishOS-OBS](https://build.merproject.org/package/show/home:olf:harbour-storeman/harbour-storeman-installer).

RPMs of [older Storeman releases are also available at OpenRepos](https://openrepos.net/content/olf/storeman-legacy), e.g., v0.1.8 which works on SailfishOS 2.2.1 and may work on older SailfishOS 2 releases.

### Important notes

* If you experience issues with Storeman Installer, please take a look at its log file `/var/log/harbour-storeman-installer.log.txt`. If that does not reveal to you what is going wrong, please check first if an issue report describing this issue [is already filed at GitHub](https://github.com/storeman-developers/harbour-storeman-installer/issues), then you might file a new issue report there and attach the log file to it, or enhance an extant bug report; alternatively (but this is really a much worse choice) and usually with much longer response times from me and no real issue tracking due to the lack of any integration, you can describe your issue in [a comment at OpenRepos](https://openrepos.net/content/olf/storeman-installer#comments) with a link to your log file copied to a data-sharing service like Pastebin etc.
* If you experience issues with Storeman Installer, please take a look at its log file `/var/log/harbour-storeman-installer.log.txt`. If that does not reveal to you what is going wrong, please check first if an issue report describing this issue is [already filed at GitHub](https://github.com/storeman-developers/harbour-storeman-installer/issues), then you might file a new issue report there and attach the log file to it, or enhance an extant bug report.
* If you experience issues when installing, removing or updating packages after a SailfishOS upgrade, try running `devel-su pkcon refresh` in a terminal app.
* Before software can be build for a SailfishOS release at the SailfishOS-OBS, Jolla must create a corresponding "download on demand (DoD)" OBS-repository. It might take a little time after a new "general availability (GA)" SailfishOS release is published before the corresponding "DoD" repository is being made available, during which installing or updating Storeman by the Storeman Installer or Storeman's self-updating on a device with the new SailfishOS release already installed will not succeed, because Storeman cannot be compiled for this new SailfishOS release by the Sailfish-OBS, yet; consequently this is always the case during the "closed beta (cBeta)" and "early access (EA)" phases of a new SailfishOS release. Hence one has to manually download and install, or update Storeman built for the last prior SailfishOS GA via `pkcon install-local <downloaded RPM file>` 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, 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 Storeman 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). Be aware, that the license you implicitly accept by using Storeman excludes any liability.
* When Storeman Installer fails to install anything (i.e, a minute after installing it the icon of Storeman has not appeared on the launcher / desktop), most likely the preceding or the following bullet point is the reason.
* 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).
* 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.

### Installation instructions

* Initial installation without having Storeman or SailfishOS:Chum already installed
1. Enable "System → Security → Untrusted software → Allow untrusted software" in the SailfishOS Settings app.
2. Download the current Storeman Installer RPM from [its "latest release" page at GitHub](https://github.com/storeman-developers/harbour-storeman-installer/releases/latest), [OpenRepos.net](https://openrepos.net/content/olf/storeman-installer) or [the SailfishOS-OBS](https://build.merproject.org/package/show/home:olf:harbour-storeman/harbour-storeman-installer).
2. Download the current Storeman Installer RPM from its ["latest release" page at GitHub](https://github.com/storeman-developers/harbour-storeman-installer/releases/latest), [OpenRepos.net](https://openrepos.net/content/olf/storeman-installer) or the [SailfishOS-OBS](https://build.merproject.org/package/show/home:olf:harbour-storeman/harbour-storeman-installer).
3. Tap on the "File downloaded" notification on your SailfishOS device or select the downloaded RPM file in a file-manager app and choose "Install" in its pulley menu; then confirm the installation.
4. Preferably disable "Allow untrusted software" again.

Expand All @@ -44,7 +45,7 @@ RPMs of [older Storeman releases are also available at OpenRepos](https://openre
* Installing [Storeman Installer 1.3.1](https://github.com/storeman-developers/harbour-storeman-installer/releases/tag/1.3.1) and all later versions also automatically removes an installed Storeman (*harbour-storeman* package) <&nbsp;0.2.99, which eliminates the former necessity to manually remove ("uninstall") an old Storeman.
* [Storeman Installer 1.3.8](https://github.com/storeman-developers/harbour-storeman-installer/releases/tag/1.3.8) and all later versions create a persistent log file `/var/log/harbour-storeman-installer.log.txt`.
* Storeman Installer 2 runs "unattended": I.e., without any manual steps, after its installation has been triggered, until Storeman is installed.
* Storeman Installer is slow, because it calls `pkcon` two (releases before v1.3.8) to three times (releases from v[1.3.8](https://github.com/storeman-developers/harbour-storeman-installer/releases/tag/1.3.8) on), which acts quite slowly. The minimal run time for Storeman Installer 2 is about 7 seconds, the typical run time is rather 10 seconds (measured from the moment Storeman Installer's installation has been triggered, until ultimately Storeman is installed). This is already a lot, but I rarely experienced a stalled Packagekit daemon (for which `pkcon` is just a command line front-end, communicating with the daemon via D-Bus) during heavy testing, which can be observed with the crude `pkmon` utility (`Ctrl-C` gets you out.:smiley:), so Storeman Installer now tries to detect these "hangs" and to counter them: If that happens, its run time can be up to slightly more than 1 minute. In the worst case a stalled PackageKit daemon (and with it its `pkcon` client process(es)) stalls Storeman Installer, until the PackageKit daemon reaches its idle time out of 300 seconds (5 minutes; this could theoretically happen three times, resulting in a likely unsuccessful run time of more than 15 minutes).
* Storeman Installer is slow, because it calls `pkcon` two (releases before v1.3.8) to three times (releases from v[1.3.8](https://github.com/storeman-developers/harbour-storeman-installer/releases/tag/1.3.8) on), which acts quite slowly. The minimal run time for Storeman Installer 2 is about 7 seconds, the typical run time is rather 10 seconds (measured from the moment Storeman Installer's installation is triggered, until Storeman is installed and its icon is displayed at the "launcher"). This is already a lot, but rarely the Packagekit daemon stalled (`packagekitd`, for which `pkcon` is just a command line front-end, communicating with the daemon via D-Bus) during heavy testing, which can be observed with the crude `pkmon` utility (`Ctrl-C` gets you out.:smiley:), so the Storeman Installer now tries to detect these "hangs" and to counter them: If that happens, its run time can be up to slightly more than 1 minute. In the worst case a stalled PackageKit daemon (and with it its `pkcon` client process(es)) stalls Storeman Installer, until the PackageKit daemon reaches its idle time out of 300 seconds (5 minutes; this could theoretically happen three times, resulting in a likely unsuccessful run time of more than 15 minutes).
* You can follow Storeman Installer's actions with a `tail -f /var/log/harbour-storeman-installer.log.txt`, but mind that this file has to exist before telling `tail` to read it. Storeman Installer will create this log file during its installation, but here you want to start the `tail -f` right *before* that happens. This can be easly achieved by:<br />
`[defaultuser@sailfishos ] devel-su`<br />
`[root@sailfishos ] touch /var/log/harbour-storeman-installer.log.txt`<br />
Expand Down
5 changes: 5 additions & 0 deletions bin/harbour-storeman-installer
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ logentry="[Debug] Installed, now running: $pkgname"
printf "\n%s\n" "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 7 printf "%s\n" "$logentry"

# Log some status data:
printf "\n%s" 'From /etc/os-release: '; source /etc/os-release; printf "%s\n" "$ID $VERSION_ID $SAILFISH_FLAVOUR"
printf "\n%s\n" 'Output of `ssu status`, UID omitted:'; ssu s | fgrep -iv 'UID:'
printf "\n%s\n" '"storeman" entries from `ssu lr`:'; ssu lr | fgrep storeman | tr -s ' '

# Out of occasional bad experience when pkcon is being hammered with
# commands, also prefix `pkcon repo-set-data` with a second sleep:
sleep 1
Expand Down
36 changes: 36 additions & 0 deletions rpm/harbour-storeman-installer.rpmlintrc
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
# References: An exceptionally comprehensive example rpmlintrc file
# https://github.com/coreos/tectonic-rpms/blob/master/rpmlint-config
# but adheres to the old syntax, not the new TOML one: https://toml.io/en/
# See also https://fedoraproject.org/wiki/Common_Rpmlint_issues and
# https://en.opensuse.org/openSUSE:Packaging_checks#Building_Packages_in_spite_of_errors

# On behalf of Jolla's tar_git / SailfishOS-OBS:
# - It re-writes the DistURL, rendering it inconsistent
addFilter('invalid-url DistURL obs:')
# - It has a limited list of FLOSS-licenses, most SDPX-IDs are missing
addFilter('invalid-license')
# - It extracts strange changelog entries out of Git, if a %%changelog section is used
addFilter('incoherent-version-in-changelog')
# - It sometimes re-writes the %version-%release strings of package names,
# when referencing (only) a branch (i.e., not a git tag), for example,
# 0.5.2-1 to 0.5.2+main.20230129011931.1.g584263a-1.8.1.jolla
addFilter('filename-too-long-for-joliet')

# On behalf of the SailfishOS:Chum specification:
# - which re-uses the spec file tag "Url:"
addFilter('tag-in-description Url:')
# - which also re-uses the spec file tag "Icon:"
addFilter('tag-in-description Icon:')
# - which makes one easily do
addFilter('description-line-too-long')
setBadness('description-line-too-long', 0)

# On our own behalf:
# - This is how it ought to be
addFilter('non-standard-gid /usr/bin/.* ssu')
# - So is this: We shall not be executable by everyone, only the root user and the group ssu
addFilter('non-standard-executable-perm /usr/bin/.* 754')
setBadness('non-standard-executable-perm', 0)
# - This is also how it ought to be: It is in a comment!
addFilter('dangerous-command-in-%post rm')


13 changes: 8 additions & 5 deletions rpm/harbour-storeman-installer.spec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Summary: Installs Storeman for SailfishOS
License: MIT
License: LGPL-2.1-only
Name: harbour-storeman-installer
# The Git release tag format must adhere to just <version>. The <version>
# field adheres to semantic versioning and the <release> field comprises a
# natural number greater or equal to 1, which may be prefixed with one of
# {alpha,beta,rc,release} (e.g., "beta3"). For details and reasons, see
# https://github.com/storeman-developers/harbour-storeman-installer/wiki/Git-tag-format
Version: 1.5.0
Release: release1
Version: 1.5.1
Release: release2
Group: Applications/System
URL: https://github.com/storeman-developers/%{name}
# These "Source0:" lines below require that the value of %%{name} is also the
# These "Source0:" line below requires that the value of %%{name} is also the
# project name at GitHub and the value of %%{version} is also the name of a
# correspondingly set git-tag.
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Expand Down Expand Up @@ -68,7 +68,7 @@ Storeman Installer selects, downloads and installs the right variant of
the Storeman OpenRepos client application built for the CPU-architecture
of the device and its installed SailfishOS release.

%if "%{?vendor}" == "chum"
%if 0%{?_chum}
PackageName: Storeman Installer for SailfishOS
Type: desktop-application
Categories:
Expand Down Expand Up @@ -97,6 +97,9 @@ Url:
Donation: https://openrepos.net/donate
%endif

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

%prep
%setup -q

Expand Down

0 comments on commit 015ae98

Please sign in to comment.