Closed leofidus closed 6 years ago
@leofidus Are you running this on linux?
Yes, this is running on Debian 9
@leofidus On latest master I added some extra logging in that area for when signing fails, hopefully you'll be able to figure it out 👍
If you can't I recommend using the prebuilt docker image to run Nucleus, it's what we use so it should always work 😄
Thanks, that helped a lot. It now shows the error message as
Failed to sign RPM file
Output:
error: Macro % has illegal name (%define)
error: Macro % has illegal name (%define)
error: Macro % has illegal name (%define)
You must set "%_gpg_name" in your macro file
The problem is double quoting/escaping. https://github.com/atlassian/nucleus/blob/master/src/files/utils/yum.ts#L62 calls getSignRpmCommand
with (among other things) `"_gpg_name ${keyId}"`
. That's nessesary for the docker variant of getSignRpmCommand
because that code path doesn't escape by itself, but the linux path already lets node escape properly, leading to the _gpg_name parameter being escaped twice and thus breaking. Removing the quotes from the invocation in line 62 solves the problem on linux.
I'm not sure what the best fix is. In my opinion the linux path (letting the caller not worry about escaping) is better. But in any case, the handling of the args array should be uniform in both code paths in getSignRpmCommand
@leofidus Its not all Linux distros having this issue, as mentioned the docker image works perfectly fine (which is Linux based). If you can find a way that works for all three cases (Linux, docker and non-linux) I'll gladly accept a PR for it :smile:
When trying to publish a release draft, I get the following log output:
However, when I run
rpmsign -D "_gpg_name 3727E90CE90B5FC1" --addsign 0.1.2-vipfy-desktop-0.1.2.x86_64.rpm
on the rpm file generated by electron-forge it shows no output and exits with code 0. What could be causing his issue, or how could I go about debugging it?I'm running the current master branch of nucleus.