Spec file looks ok but it looks like harbour-meecast-event-1.1-4 rpms at OpenRepos are missing all scripts regarding"
# Require Lipstick Weather Widget on SailfishOS > 4.6.0
Yeah, been too busy lately, thinking becomes hazy after a while.
If I understand you correctly, you mean (falls into the category “simple tests”) that these commands generate the same output on SailfishOS 4.6.0 as on an older version (with which I generated the output below), right?
cd /tmp
curl -LO https://openrepos.net/sites/default/files/packages/678/harbour-meecast-event-1.1-4.aarch64.rpm
rpm -q --scripts harbour-meecast-event-1.1-4.aarch64.rpm # Test 1
rpm -qR harbour-meecast-event-1.1-4.aarch64.rpm | fgrep lipstick-jolla-home-qt5-weather-widget-settings # Test 2
Test 1 outputs:
postinstall scriptlet (using /bin/sh):
# Activate Lipstick Weather Widget on SFOS > 4.6.0
postuninstall program: /bin/sh
Test 2 outputs nothing.
The only thing which does not fit then, is that @lakeboy seemed to have indicated that the dconf
key was correctly created and set, after resetting it as a preparatory step for a prior test.
Well, basically yes. The quite sparse (in terms of concise specifications) and scattered RPM documentation distinguishes between “macro expansion at (S)RPM build time” and “macro expansion at (S)RPM install time” (what you called “compilator” and “installer”). The macro expansion in RPM spec files happens in the first of these steps, in which a specific macro is defined; i.e. if a macro is not defined at (S)RPM build time, it is left “as is” (i.e. unexpanded), and may be expanded at (S)RPM install time (or not at all).
The macros at an RPM target machine (for “install time”) can be seen by rpm --showrc
(you might want to append a | less
).
The macros on a build machine are harder to inspect, at OBS you can look at them for e.g. targetting the sailfishos:3.1.0.12
DoD repo or the sailfishos:4.6
(.0.11) DoD repo; within the Sailfish-SDK basically the same macros should be set (depending on the target release set).
This is why I once suggested to try the built RPMs from the Sailfish-OBS if the ones at OpenRepos do not set the dconf
key and/or install lipstick-jolla-home-qt5-weather-widget-setting
, but later I forgot about this idea: The packages Vasvlad built at the Sailfish-OBS should be using sailfishos:4.6
; now I checked that explicitly and the output of “Test 1” and “Test 2” is the same for them as above when downloaded and checked on a SailfishOS release < 4.6.0: Either they are not built correctly (the OBS config for them is a bit strange) or it takes a device with SailfishOS 4.6.0 to see a different result. Is the latter the case?
Ultimately I think your suggestion to perform this evaluation explicitly at “install time” is good, because more fail-safe; I already did this in sailfishos-chum-gui-installer
, but for other reasons (it is a noarch
package, hence there is not really a build process).
Edit: But one cannot easily install an RPM in a spec file by other means than a Requires:
statement. A workaround exists, but that is “heavy lifting”. All this shit because Jolla deems displaying weather information in SailfishOS’ Events View superfluous since Foreca does not work out-of-the-box any longer.