App-Development - signing of .rpm package failed

Im currently developing a native SFOS app and im stuck in the signing-process of a released .rpm package.

I tried to follow this documentation but it seems to be outdated. The mentioned commands did not worked for me:

After some investigation i performed this commands on MSYS2 console which worked:

sfdk config --global --push package.signing-user Max Mustermann
sfdk config --global --push package.signing-passphrase test123

if i run the following command, config looks good:

sfdk config --show

# ---- session scope ---------
target = SailfishOS-5.0.0.62-armv7hl

# ---- global scope ---------
package.signing-passphrase = test123
package.signing-user = Max Mustermann

Now if i try to build a package and sign it i get the following error:

sfdk build --sign
Pre-run routine failed: Failed to share GnuPG key with the build engine: The selected GPG key is passphrase protected and no passphrase was specified.

I also tried it with setting the password via passphrase-file “sfdk config --global --push package.signing-passphrase-file ~/passphrase.txt”, but here the file “was not found” but it was there. i also checked the path several times.

Do im doing something wrong here, or does someone has a good documentation how to sign the .rpm package properly with a valid GPG key?

Thank you very much so far, guys!

4 Likes

I can only recommend doing exactly what it says.
I.e. not package.signing-passphrase, which doesn’t seem to be a thing, but package.signing-passphrase-file and actually $HOME instead of ~.

Also, if you’re going to have a file with the passphrase around, why not just have an unprotected key?

And i can only recommend using actual Linux and things tend to just work™.

Edit: the straight-up passphrase does appear to be a thing according to local help - but advice still stands.

1 Like

I got intrigued and tried.
I can get to to work with a password-protected key. package.signing-passphrase however does not appear to work and the online docs have multiple issues. ~ vs $HOME makes no difference for me, but on Winderps all bets are off.

Edit:

I was wrong. Turns out an unsigned package still says “digests OK”. It was just that when i changed from password variable to password file stopped having errors before compilation just to have other errors after instead:

warning: Could not set GPG_TTY to stdin: Inappropriate ioctl for device
gpg: skipped "Full Name": No secret key
gpg: signing failed: No secret key
error: gpg exec failed (2)
Fatal: Failed to sign packages

The actual code looks to be here:

Searching around, i get the feeling a containerized env might not like the fd shenanigans.

3 Likes
3 Likes

Thank You @attah : i tried it indeed on a windows machine. Will test it today without Passwort protected GPG key and also Check your other suggestions.

Forgot to answer: I tested it now with a non protected key which worked. I will also try the other ways, but for now it worked.

Thank You very much!

1 Like