Application SDK bash: sdk-deploy-rpm: command not found

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 3.4
HARDWARE (XA2, Xperia 10…): Vollaphone, Fairphone2
UI LANGUAGE: EN
REGRESSION: (compared to previous public release: Yes, No, ?): No

DESCRIPTION: Having tested SSH and rsync, uploading files (and ssh terminal) works fine. But deploying RPM ‘stopped’ working. I have successfully been building for weeks (3 apps added to the Jolla store). It. just. stopped.

PRECONDITIONS:

STEPS TO REPRODUCE:

  1. I don’t think you can.

EXPECTED RESULT:

Deploy RPM

ACTUAL RESULT:

bash: sdk-deploy-rpm: command not found

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

From compile:

sending incremental file list
harbour-beamdimension-0.2-1.armv7hl.rpm

sent 849,857 bytes  received 35 bytes  566,594.67 bytes/sec
total size is 849,532  speedup is 1.00
bash: sdk-deploy-rpm: command not found
Deploy failed
15:48:39: The process "/home/mwa/.config/SailfishSDK/libsfdk/build-target-tools/Sailfish OS Build Engine/SailfishOS-3.4.0.24-armv7hl/deploy" exited with code 1.
Error while building/deploying project harbour-beamdimension (kit: SailfishOS-3.4.0.24-armv7hl (in Sailfish OS Build Engine))
When executing step "RPM"
15:48:39: Elapsed time: 00:09.

Well, I couldn’t find anything within the virtual so I determined, delete the component and try again.

  1. Opened the SDK maint. tool. Removed 3.4.x arm
  2. After removal added it back
  3. For some reason, althought the device was still working fine, I had to add a phone again from scratch.

And, after trying to modify a deploy with provides and requires excludes, the same error again.

I’m slowly losing my patience.

Went through this again.

Now, first I’m avoiding doing anything odd:

It seems projects that ‘don’t’ have rpm gymnastics are ‘fine’.

This yaml fragment seems (in one or the other modality) to kill the virtual (how!)_

Macros:
#  - '__provides_exclude_from;^%{_datadir}/%{name}/lib/*$'
#  - '__requires_exclude_from;^%{_datadir}/%{name}/lib/*$'
  - '__requires_exclude;^_imaging*|libfreetype|libjpeg|libopenjp2|libtiff|libfreetype.*$'
  - '__provides_exclude;^_imaging*|libfreetype|libjpeg|libopenjp2|libtiff|libfreetype.*$'
#  - '__provides_exclude;^_imagingtk\\.cpython-38-arm-linux-gnueabihf\\.so|_imagingmorph\\.cpython-37-arm-linux-gnueabihf\\.so|_imagingmath\\.cpython-38-arm-linux-gnueabihf\\.so|_imagingft\\.cpython-38-arm-linux-gnueabihf\\.so|_imagingft\\.cpython-38-arm-linux-gnueabihf\\.so|_imagingft\\.cpython-38-arm-linux-gnueabihf\\.so.*$'
#  - '__requires_exclude;^libfreetype|libjpeg|libopenjp2|libtiff|libfreetype.*$'

Please note that the sdk-deploy-rpm package is installed in the phone and not in the build engine. When you add the phone to the SDK (via Qt Creator), the SDK installs the sdk-deploy-rpm package to the phone.

Ah, that’s interesting. Ok. so if that message occurs, redeploy the phone?

You can just install the sdk-deploy-rpm package to the phone. Something like this:

ssh defaultuser@your.ip.address
devel-su
pkcon install sdk-deploy-rpm
1 Like

thanks! that’s a lot less work :slight_smile:

Do you by any chance know how to manage these library excludes:

  • '__provides_exclude;^
    _imagingtk\.cpython-38-arm-linux-gnueabihf\.so |
    _imagingmorph\.cpython-37-arm-linux-gnueabihf\.so |
    _imagingmath\.cpython-38-arm-linux-gnueabihf\.so |
    _imagingft\.cpython-38-arm-linux-gnueabihf\.so |
    _imagingft\.cpython-38-arm-linux-gnueabihf\.so |
    _imagingft\.cpython-38-arm-linux-gnueabihf\.so.

they are installed in the /usr/share/app/lib/ and work, as such but I can’t get the rpm excludes to function. It’s keeping me from getting several apps in the jolla store ;<

Consider this solved since it’s occuring on the phone and it’s difficult to know if the problem is caused by the SDK or by phone or user behaviour.

It would be much easier to answer if you could 1) point me to the location of the source code of the package you are trying to build, and 2) tell me exactly what it is that you are trying to do.

Sorry, clear: https://github.com/poetaster/harbour-simplecrop

I’m trying to make the package jolla store compliant (it’s functional on openrepos) … to that end, I’ve rebuilt it so that the libs are internal (/usr/share/harbour-simplecrop/libs) and have only ‘not’ succeed in get the provides/requires excluded … https://github.com/poetaster/harbour-simplecrop/blob/main/rpm/harbour-simplecrop.yaml

Sorry, I’m still failing to see exactly what you are trying to do. Looking at your package I see you are:

  • Using TransferEngine (not allowed)
  • linking to libfreetype.so.6, libjpeg.so.62, libopenjp2.so.7 and libtiff.so.5 which are not allowed.

I don’t see any forbidden requires/provides in the package.

In any case, I suggest you get rid of the yaml file completely and work with the spec file instead. The yaml file does not provide any additional value and just makes testing the kind of changes you are making much harder. But this is just my opinion and not an absolute fact :wink:

Ok, I’m working on getting rid of Transfer engine (it’s for sharing in this case).

The linking is not necessary. The python library in use will function without any of those. That’s why I’m trying to do an
'__provides_exclude;^_imagingtk.cpython-38-arm-linux-gnueabihf.so ’ /
and or
‘__requires_exclude’…

The compiled parts _imagingmorph and co work fine without the ```
libfreetype|libjpeg|libopenjp2|libtiff|libfreetype etc.

I should add, the python library works fine without the linked libs but will not work without the compiled libs (_imagingtk.cpython-38-arm-linux-gnueabihf.so)

I see. Then you should try change the build so that it does not link against those libraries. The provides/requires macros won’t help with that.

Ok, that is not the information contained in the FAQ. I was following:

I got the following reject reason: “ERROR [libFooBar.so.1] Cannot require shared library: ‘libFooBar.so.1’”. What can I do?

You most likely have your own libraries packaged to the RPM. Harbour RPM packages should not require any library which is not allowed (see allowed libraries below), also not own provided libraries. To exclude libraries from the ‘Requires section’, which you ship with your RPM, please add the following to the .spec file between the “# >> macros” and “# << macros”. You have to specify each library name!

But I should be able to get rid of the linking, it just makes maintenance a lot more work.

The FAQ should be more clear that the macros won’t help or more clearly elaborate under what conditions the macros will help. Reading the red hat docs makes it clear it’s a bit voodoo as it is.

But that’s a different error the FAQ is talking about. At least I’m not getting “Cannot require shared library” but “Cannot link to shared library”.

How are you ‘getting that’?

On building 3.4->Release->Manual rpm:

First part:
Libraries
=========
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imagingtk.cpython-38-arm-linux-gnueabihf.so] Private shared library shipped
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imagingmorph.cpython-38-arm-linux-gnueabihf.so] Private shared library shipped
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imagingmath.cpython-38-arm-linux-gnueabihf.so] Private shared library shipped
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imagingft.cpython-38-arm-linux-gnueabihf.so] Private shared library shipped
ERROR [/usr/share/harbour-simplecrop/lib/PIL/_imagingft.cpython-38-arm-linux-gnueabihf.so] Cannot link to shared library: libfreetype.so.6
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imagingft.cpython-38-arm-linux-gnueabihf.so] Please see our FAQ here: https://harbour.jolla.com/faq#Shared_Libraries
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imaging.cpython-38-arm-linux-gnueabihf.so] Private shared library shipped
ERROR [/usr/share/harbour-simplecrop/lib/PIL/_imaging.cpython-38-arm-linux-gnueabihf.so] Cannot link to shared library: libjpeg.so.62
ERROR [/usr/share/harbour-simplecrop/lib/PIL/_imaging.cpython-38-arm-linux-gnueabihf.so] Cannot link to shared library: libopenjp2.so.7
ERROR [/usr/share/harbour-simplecrop/lib/PIL/_imaging.cpython-38-arm-linux-gnueabihf.so] Cannot link to shared library: libtiff.so.5
INFO [/usr/share/harbour-simplecrop/lib/PIL/_imaging.cpython-38-arm-linux-gnueabihf.so] Please see our FAQ here: https://harbour.jolla.com/faq#Shared_Libraries

And at the end:

Requires
========
ERROR [libfreetype.so.6] Cannot require shared library: 'libfreetype.so.6'
ERROR [libjpeg.so.62] Cannot require shared library: 'libjpeg.so.62'
ERROR [libjpeg.so.62(LIBJPEG_6.2)] Cannot require shared library: 'libjpeg.so.62(LIBJPEG_6.2)'
ERROR [libopenjp2.so.7] Cannot require shared library: 'libopenjp2.so.7'
ERROR [libtiff.so.5] Cannot require shared library: 'libtiff.so.5'
INFO [harbour-simplecrop] Please see our FAQ here: https://harbour.jolla.com/faq#2.6.0 how to use '__provides_exclude_from' and '__requires_exclude' .spec file to avoid that
FAILED

using requires and provides macros i can change the output but not get rid both. I assume the linking will always die, though that’s a bit strict.

the way I read the faq is remove ‘requires’ and the linking problem should ‘go away’. That doesn’t seem to be the case which I can understand.

Correct me if I am wrong, but mostly the simplest way is to remove the corresponding -devel packages.