Sfdk does not handle rpmbuild options properly

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.0.1
HARDWARE (XA2, Xperia 10…): SDK
UI LANGUAGE: -

DESCRIPTION:

When using sfdk command in form

sfdk build -j4 /.../tbuilder/project/src/systemdatascope -- --define="sailfishos 4.0"

I get

error: failed to stat .../project/build/SailfishOS-4.0.1.48-i486/systemdatascope.spec/--define=sailfishos 4.0: No such file or directory

after the package is compiled. In this example, .../project/build/SailfishOS-4.0.1.48-i486/systemdatascope.spec is a directory from which the build was run (I had my reasons to set this unusual name for a directory).

STEPS TO REPRODUCE:

  1. See description above

EXPECTED RESULT:

Compile and package RPM

ACTUAL RESULT:

Failed at the final stages of packaging

Thank you for reporting this. You can work it around by omitting -- when path to project/-dir is specified too (either of them terminate regular option processing currently):

sfdk build -j4 /.../tbuilder/project/src/systemdatascope --define="sailfishos 4.0"

1 Like

rpmbuild options handling is fixed in Sailfish SDK 3.6, which was released to Early Access users just a while ago.

1 Like