Skip to content

Commit

Permalink
develmaster: Commits for v2.2.5 (#306)
Browse files Browse the repository at this point in the history
* [harbour-storeman-installer.spec] Post release version increase

* [cache-docker-images_github-ci.md] Add better analysis of Docker Cache and Rootless Docker

* [cache-docker-images_github-ci.md] Make time-relavive statement (yesterday) absolute (2023-01-07)

* [cache-docker-images_github-ci.md] Fix formatting

* [cache-docker-images_github-ci.md] More details WRT `cached-dependencies `

* Update cache-docker-images_github-ci.md

* [cache-docker-images_github-ci.md] Fix typos etc.

* [cache-docker-images_github-ci.md] Add issue severity statement

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* Update cache-docker-images_github-ci.md

* [build.yml] Introduce recent beautification from Storeman

* [README.md] Not offered at SailfishOS:Chum any longer

* [README.md] Rectify statement logically

* Update README.md

* Escape backticks (#304)

* Escape backticks
  The commands between them are actually evaluated, leading to lots of
confusing help output in the log file.

* Revert change on one line

---------

Co-authored-by: nephros <nemo@geminipda>

* No comma after "i.e." and "e.g." in British English (#305)

* [double-fork-in-shell.md] No comma after "i.e." and "e.g." in BE

* [cache-docker-images_github-ci.md] No comma after "i.e." and "e.g." in BE

* [rpm/harbour-storeman-installer.rpmlintrc] No comma after "i.e." in BE

* [.github/workflows/build.yml] No comma after "i.e." in BE

* [rpm/harbour-storeman-installer.spec] No comma after "i.e." and "e.g." in BE

* [bin/harbour-storeman-installer] No comma after "i.e." and "e.g." in BE

* [LICENSE] Update contributors

* [LICENSE] Add mail addresses of contributors

* [build.yml] Improve wording of title

---------

Co-authored-by: Peter G <[email protected]>
Co-authored-by: nephros <nemo@geminipda>
  • Loading branch information
3 people authored Mar 29, 2024
2 parents a16c41c + d9efda4 commit aa9f46a
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 62 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: CI on SFOS 3.1.0
name: CI on SDK for 3.1.0

on:
push:
tags:
# Mind that '*' does not match a slash ('/'), in contrast to '**',
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- 'release*/*'
- 'rc*/*'
- 'beta*/*'
Expand All @@ -12,13 +14,30 @@ on:
- master
- devel
- 'v*-legacy'
# Allows to run this workflow manually from the Actions tab.
workflow_dispatch:

defaults:
run:
# Note that 'bash' provides -o pipefail, in contrast to the default (i.e. unspecified, which also uses bash) or 'sh',
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
shell: sh

# Do not use concurrency in order to enforce checking every commit of a Pull Request.
# See, e.g.: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
#concurrency:
#group: ci-${{ github.ref_name }}
# 'false' (default) allows for two concurrent runs, one executing and one freshly enqueued; 'true' for only one; no 'concurrency:' defined for multiple.
#cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-22.04
env:
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 2 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
steps:

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -37,6 +56,9 @@ jobs:
- name: Build i486 on 3.1.0.12
uses: coderus/github-sfos-build@old-stable
with:
# Solely build for i486 on 3.1.0, because this is a noarch RPM and i486 matches the architecture of the host (compiling faster than cross-compilation)
# and 3.1.0 is the oldest supported release hence with the smallest Docker image to download from Docker hub.
# See also https://github.com/sailfishos-patches/patchmanager/pull/437#issuecomment-1615317003
release: 3.1.0.12
arch: i486

Expand All @@ -45,3 +67,4 @@ jobs:
with:
name: RPM-build-results
path: RPMS/

5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,9 @@ DAMAGES.
WWW-Link to this software:
https://github.com/storeman-developers/harbour-storeman-installer

Copyright (C) 2021-2022 Petr Tsymbarovich (osetr)
2021-2023 olf <[email protected]>
Copyright (C) 2021-2022 Petr Tsymbarovich (osetr / mentaljam) <[email protected]>
2021-2024 olf <[email protected]>
2024 Peter G. (nephros) <[email protected]>

This software is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ Starting with version 0.2.9, Storeman is built by the help of the SailfishOS-OBS

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) and [OpenRepos.net](https://openrepos.net/content/olf/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.
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.
* If you experience issues when installing, removing or updating packages after a SailfishOS upgrade, try running `devel-su pkcon refresh` in a terminal app.
* 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).
* 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
* Initial installation without having Storeman 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) or [OpenRepos.net](https://openrepos.net/content/olf/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.

* Installation via Storeman (i.e., updating from Storeman <&nbsp; 0.2.9)
* <sup>If you have [olf's repository at OpenRepos](https://openrepos.net/user/5928/programs) enabled, *Storeman Installer* shall be offered as an update candidate for the outdated *Storeman* installed: Just accept this offer.<br />Otherwise:</sup>
* Installation via Storeman (i.e. updating from Storeman <&nbsp;0.2.9)
* <sup>If you have [olf's repository at OpenRepos](https://openrepos.net/user/5928/programs) enabled, *Storeman Installer* should be offered as an update candidate for the outdated *Storeman* installed: Just accept this offer.<br />Otherwise:</sup>
1. Search for *Installer*.
2. Select the *Storeman Installer* by *olf*.
3. Enable olf's repository in the top pulley menu.
Expand All @@ -39,6 +39,6 @@ RPMs of [older Storeman releases are also available at OpenRepos](https://openre
* [Storeman Installer 1.3.1](https://github.com/storeman-developers/harbour-storeman-installer/releases/tag/1.3.1) and all later versions are offered as an update candidate for Storeman, if an RPM repository is enabled, which offers the *harbour-storeman-installer* package and Storeman (*harbour-storeman* package) <&nbsp;0.2.99 is already installed.
* 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 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 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).<br />
Also note that SailfishOS sometimes fails to show an icon of a freshly installed app on the launcher ("homescreen") until SailfishOS is rebooted (rsp. more precisely: Lipstick is restarted).
16 changes: 8 additions & 8 deletions bin/harbour-storeman-installer
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ufC # "-u" (error when using uninitialised variables),
# despite minor errors.
set -o pipefail # May not be supported, busybox's ash and bash do.
export LC_ALL=POSIX # For details see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02
export POSIXLY_CORRECT=1 # Can have side-effects, see e.g., https://github.com/Olf0/sfos-upgrade/issues/73
export POSIXLY_CORRECT=1 # Can have side-effects, see e.g. https://github.com/Olf0/sfos-upgrade/issues/73
# Ultimately this ensures an almost consistent behaviour across shell implementations.

# Specify bash as interpreter of this script (in its first line), as this ensures
Expand All @@ -28,7 +28,7 @@ export POSIXLY_CORRECT=1 # Can have side-effects, see e.g., https://github.com/

# This script is designed to be called fully detached (by a "double fork"
# / a "daemonize") as the last statement of the %posttrans scriptlet
# (the last executed) of an RPM spec file or directly (e.g., in a shell).
# (the last executed) of an RPM spec file or directly (e.g. in a shell).

# Memorise how we were called (argument checks are primarily intended for interactive use):
mypid="$$"
Expand Down Expand Up @@ -72,7 +72,7 @@ source /etc/os-release; logentry="[Debug] From /etc/os-release: $ID $VERSION_ID
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 7 printf '%s' "$logentry"

ssus="$(ssu s | grep -iv 'UID:\? ')"; logentry='[Debug] `ssu status`, UID omitted:'
ssus="$(ssu s | grep -iv 'UID:\? ')"; logentry='[Debug] \`ssu status\`, UID omitted:'
printf '\n%s\n%s\n' "$(date -Iseconds) $logentry" "$ssus"
systemd-cat -t "$called" -p 7 printf '%s %s' "$logentry" "$(printf '%s' "$ssus" | sed 's/$/, /g' | tr -d '\n')"

Expand Down Expand Up @@ -143,7 +143,7 @@ do
logentry="[Warning] Failed to refresh harbour-storeman-obs repository, because error-code $retc was returned by: $logentry"
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 4 printf '%s' "$logentry"
logentry="[Notice] Trying to terminate (i.e., sending SIGTERM to) all processes named (ID) `pkcon`, then sleeping for $wait seconds."
logentry="[Notice] Trying to terminate (i.e. sending SIGTERM to) all processes named (ID) \`pkcon\`, then sleeping for $wait seconds."
printf '%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 5 printf '%s' "$logentry"
killall -q -TERM pkcon
Expand All @@ -156,7 +156,7 @@ do
logentry="[Error] Failed to refresh harbour-storeman-obs repository, because error-code $retc was returned by: $logentry"
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 3 printf '%s' "$logentry"
logentry="[Warning] Trying to interrupt (i.e., sending SIGINT to) all processes named (ID) `pkcon`, then sleeping for $wait seconds."
logentry="[Warning] Trying to interrupt (i.e. sending SIGINT to) all processes named (ID) \`pkcon\`, then sleeping for $wait seconds."
printf '%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 4 printf '%s' "$logentry"
killall -q -INT pkcon
Expand All @@ -170,7 +170,7 @@ do
logentry="[Error] Failed to refresh harbour-storeman-obs repository, because error-code $retc was returned by: $logentry"
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 3 printf '%s' "$logentry"
logentry="[Warning] Trying to hang-up (i.e., sending SIGHUP to) all processes named (ID) `pkcon`, then sleeping for $i seconds and ultimately killing them."
logentry="[Warning] Trying to hang-up (i.e. sending SIGHUP to) all processes named (ID) \`pkcon\`, then sleeping for $i seconds and ultimately killing them."
printf '%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 4 printf '%s' "$logentry"
killall -q -HUP pkcon
Expand Down Expand Up @@ -210,7 +210,7 @@ do
systemd-cat -t "$3" -p 6 printf '%s' "[Info] Self-removal in 20 seconds: $2";\
eval $2)' sh_rm_inst-storeman "$mypid" "$logentry" "$called"
# The first 15 characters of the spawned process' name
# (to be used for, e.g., `ps` and `pgrep` / `pkill`) are:
# (to be used for, e.g. `ps` and `pgrep` / `pkill`) are:
# sh_rm_inst-stor
fi
done
Expand All @@ -230,7 +230,7 @@ setsid --fork sh -c '(sleep 1;\
systemd-cat -t "$3" -p 6 printf '%s' "[Info] Executing: $2";\
eval $2)' sh_do_inst-storeman "$mypid" "$logentry" "$called"
# The first 15 characters of the spawned process' name
# (to be used for, e.g., `ps` and `pgrep` / `pkill`) are:
# (to be used for, e.g. `ps` and `pgrep` / `pkill`) are:
# sh_do_inst-stor
# Double-fork / "Daemonise" ("SysV-style") in shell code, (ab)using this
# interpreter instance for the preamble (setting the environment):
Expand Down
Loading

0 comments on commit aa9f46a

Please sign in to comment.