-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the Storeman Installer so complicated to use? #2
Comments
Reading https://forum.sailfishos.org/t/ssu-features-are-not-updated-on-removal-of-the-settings-files/7364 Edit: Ah, this comment section explains it: After the own |
Because the RPM database is locked while all the SPEC scripts are executed. So you cannot call rpm, zypper, or pkcon to install/remove/update packages in the SPEC scripts. My very first idea of the Storeman installer was fully automatic installation. But I had to switch to the desktop icon approach. |
O.K., so it needs some kind of indirection, but (ab)using the user for this is IMHO a bad approach. Ideas:
Generally, I believe this must be a long solved task to let the installation of an RPM trigger a script, which was deployed by this RPM. Though I have not started searching the web for this. |
PR is welcome😉 I didn't manage to implement it better myself |
... still I will keep thinking about this. |
It's more about RPM SPEC files and shell scripting. I tried to detach the script and tried timers (but not units). I think a timer unit is really a good idea. @Olf0, can you try to implement it? UPD: If you find a working way of automatic installation we can then use it for the Chum GUI! |
I know. ;-\ |
Not anytime soon (except when using Jolla's definition of "soon"): Maybe still in November, likely before the end of the year. |
Sorry, this is becoming Jolla-style "soon": I will not start with this before February, earliest. Please do not rely on me: If you find the time (and you already have a head-start, as you were experimenting with this in the past), go ahead. |
I think I discovered a way, the one SSU is using:
|
If I read this correctly, the approach ssu takes to upgrading itself and manipulating the rpm database actually gives us a road map for moving away from the installer altogether and just doing the needed rpm db updates directly in the harbour-storeman .spec? Is this the gist? |
No, this is solely about Storeman Installer. Its job is to install the variant of Storeman (CPU-architecture ("arch") and SFOS release) which fits to the device. For this to work under all circumstances, Storeman Installer must stay a The gist is, that this approach would allow upon installing Storeman Installer to automatically remove any old Storeman release currently installed and immediately and automatically (i.e. without user interaction) download and install the appropriate Storeman variant (this is what it already does, but the user needs to start Storeman Installer manually). |
Hmm. Since the installation of Storeman is 'always' initially 'manual', is it really necessary to have a noarch 'installer'? I believe I see the utility if one assumes that users may not know the %arch they are using but that's about it, isn't it? On both 3.4 phones I have i only just now noticed that they were still 0.2.3. If I recall correctly, those were installed directly from openrepos rpms. And there is nothing currently keeping a user from directly installing storeman, ist there? As for the SFOS release, do I understand this correctly: it's just because of how obs is being used? To use a chum example: |
So you consider sending users to build.sailfishos.org/home:mentaljam with the message "Make sure you pick the right RPM" as appropriate?
There is:
No, take a look at the Storeman's GH-repo branches: The code has to differ slightly for various SFOS releases.
Yes, but not for "installing oneself", i.e. Storeman proper. See, now you have been successfully looping back to why Storeman Installer exists. |
No, I thought the road map leads us to the use of chum. But that is essentially what is stated on the storeman-installer info page in Storeman itself :)
I just did. The code does not differ (the c++, I mean). Meta data does. But I'm probably missing something. |
I'm assuming that you mean installation of the rpm/ssu metadata? All apps are installed by pkcon/rpm/zypper whether or not they are 'installed' by harbour/storeman/chum, or? |
No, see #2 (comment).
Well, almost: All package management tools ultimately use |
In any case, as my own 3.4 devices demonstrate, currently a user might not even KNOW there is an update. |
Which you have found a solution for with the 'self-installation' of ssu :) Now we are going in cricles. I'll stop and try to find some time to take this apart further. I mentioned it to rinigus last night. But this week I won't find any time, I'm afraid. |
Ok. Lastly, I went through the process of removal on 3.4 and install from openrepos. The noarch installer makes perfect sense here. I get it. I had just never noticed, having always installed manually. |
In the interest of actually working on code, @olf, is it possible for you to create a branch here that includes your changes (as per pulls here). Then I would take a crack at the approach that you discerned in |
So what? This is the slightly unfortunate situation mentaljam created about a year ago, because OpenRepos cannot handle releases for different SFOS release versions. IMO this has deviated far enough from the topic "Why is the Storeman Installer so complicated to use?" to be called "off topic". The existence of Storeman Installer has proper reasons.
The planned switch from build.sailfishos.org:home:mentaljam to build.sailfishos.org:sailfishos:chum does not resolve the issue of "bootstrapping", which Storeman Installer addresses.
Yes IIRC, AFAIR QML code. Even if it is really only metadata, mentaljam, @rinigus and I have not found a better way of handling this, yet. If you do, please describe it. |
So, I went through the branches with meld. There is no substantial difference but a puzzle: The pro file, in current master contains this file: .github/workflows/build.yml \ I'm unable, even after submodule inits to find this. |
???
The single submodule is also on its way out (and exists for a completely different purpose). |
Thank you for reminding me that automatically triggering the installation of Storeman Installer and removing an old Storeman release is also part of this issue, not only the automatic installation of a current Storeman. I addressed this with Storeman Installer v1.3.0 and with an additional fix in v1.3.1 Storeman Installer provides these new properties:
The latter two points require to have an RPM repository enabled, which offers Storeman Installer ≥ 1.3.0. |
mentaljam commented on Nov 1, 2021:
So it seems I might be the right one to address this. I finally started analysing and addressing this issue, explore solutions etc., because I had some spare time at the start of December 2022; but not as much it ultimately needed!
I implemented "2½" variants, all basically working nicely: Via a systemd timer unit (which triggers a systemd service unit), a sole systemd service unit and as a fully detached shell script.
Concurrently to developing Storeman Installer v2, which runs "unattended" (i.e. without any manual steps, after its installation has been triggered, until Storeman is installed), I developed these enhancements for Storeman Installer v1, which now resides in the branch v1.x.y-legacy. Its current (and likely last) release is v1.4.3.
Side noteFor analysing the hierarchy of the spawned processes, specifically the aspects, in which session group they reside, and who the session leader is (oneself or not), I also created a heavily instrumented variant, which is based on the outdated v2.0.22 of the detached.script variant, and resides in the branch defer-via-script-test. Its only release is v2.0.44.
|
@mentaljam, please upload the RPM of Storeman Installer Why
Reasoning: Though Storeman Installer v1.3.1 and later is offered as an update-candidate for all Storeman < 0.2.99 (on SailfishOS ≥ 3.1.0), all installations of Storeman ≥ 0.2.9 already should have received newer Storeman releases as update-candidates months ago, and one of these Storeman updates should have added the new Storeman repos the at SailfishOS-OBS. But if a user does not have my repository at OpenRepos enabled, someone who has a Storeman < 0.2.9 installed (on SailfishOS ≥ 3.1.0) will never be notified about an available update. Uploading [a] Storeman Installer P.S.: May I remind you of this question, as originally posed in the first real paragraph of this message, and later again as point 2 of this message? I would gladly patch them to run well under recent SailfishOS releases; if my know-how turns out to be insufficient, I can usually count on nephros. |
@Olf0, I am grateful to you for the all the contribution to Storeman that you have made and continue to do. With great regret, I must say that after 8 years "on board" I still returned to android. Now I cannot continue to participate in the development of Storeman. I'll add a notion on the ORN page about discontinues |
For readers: Storeman Issue 290 and these two threads at FSO [1] & [2] provide the necessary context to understand this conversation.
As usual with Open Source Software developed in one's spare time, this is self-motivated and has been (partially; not the SailfishOS:Chum debate) fun.
That is really sad!
Please, let us ponder a little bit, how to implement that:
|
@mentaljam, the "discontinue statement" on your Storeman Installer project page is fine. For Recorder, Mashka and Beerware, I quickly created these project page placeholders you can link to:
Please mind to also transfer the three corresponding GitHub projects (Recorder, Mashka and Beerware) to Storeman Developers, because that is much more elegant than cloning them ("fork" in GH-parlance), as transferring also moves the issue tracker, technically redirects HTTP-requests to the old location etc. Thank you for these nice pieces of software and helping to migrate them, so I can try to keep them alive! |
When performing the migration from Storeman 0.2.9 to Storeman 0.2.10 (which resulted in issue #1), I wondered why this whole procedure has to be so complex for the user?
I.e. the usage description at https://openrepos.net/content/osetr/storeman-installer lets the user perform multiple steps, especially when migrating from Storeman ≤ 0.2.9!
Specific questions:
Storeman
manually, before installingStoreman Installer
?IMO you could execute in the
%post
section of the spec fileif ! ssu lr | grep -qF mentaljam-obs; then
pkcon -y remove storeman || true
rm -f /var/cache/ssu/features.ini && ssu ur && ssu er mentaljam-obs || true
fi
Edit (2022-12-23): This can and should be achieved via a
Conflicts:
,Obsoletes:
andProvides:
triple in the spec file, as implemented in Storeman Installer v1.3.1.%post
section of the spec file?Then the desktop icons etc. would become superfluous, but most importantly, the user does not have to manually start the
Storeman Installer
(at the GUI or CLI) any more!Storeman
just would be installed by installing theStoreman Installer
.Plus two minor questions for checks & balances:3. Why does the%postun
script notssu rr mentaljam-obs
?Well, it might be better to use a separate repo then (e.g.
mentaljam-storeman
), but IMO one should properly (and fully) restore the state before the initial installation after an uninstalling.4. Do I understand correctly that with
%{_datadir}/%{ssu_features_dir}/mentaljam-obs.ini
in place plus anssu er mentaljam-obs
that is fully equivalent tossu ar mentaljam-obs http://repo.merproject.org/obs/home:/mentaljam/%(release)_%(arch)/ && ssu er mentaljam-obs
?Due to issue #1 I was searching for an
ssu ar
command and wondered, if one can really do without it; i.e. if anssu ar
really does nothing more than creating anini
-file?But as you are much more experienced in the topic "package management on SFOS" than me, I likely missed something crucial.
The text was updated successfully, but these errors were encountered: