Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genkey.sh in fbs/gpg-generator has windows line endings and fails #306

Closed
rgrellmann opened this issue Dec 28, 2024 · 5 comments
Closed

Comments

@rgrellmann
Copy link

Hi, I have bought a license for fbs Pro.

OS: Linux Mint 21.3
Python 3.12.8
fbs Pro 1.2.5
pyinstaller 6.11.1
PyQT 6.8.0

Command: fbs gengpgkey

Error message:
subprocess.CalledProcessError: Command '['docker', 'run', '-t', '-v', '/dev/urandom:/dev/random', 'fbs/gpg-generator', '/root/genkey.sh', 'Foo Bar', '[email protected]', 'foobar']' returned non-zero exit status 1.

After manually executing the genkey.sh script in the docker container I found the error message:
bash: ./genkey.sh: cannot execute: required file not found
This message is a bit misleading, it is caused by Windows line endings in the genkey.sh script.
After eliminating the Carriage Return characters with sed -i 's/\r$//' /root/genkey.sh the script worked.
But of course this change does not persist when I exit the running container.

Please fix the docker image.

@mherrmann
Copy link
Owner

Hi and thank you for buying Pro. I cannot reproduce this. Could it be that you have git config core.autocrlf set to true?

@rgrellmann
Copy link
Author

My git config setting is "input".
I realized that genkey.sh is included in the zip file I downloaded after the purchase of Pro. When I extract genkey.sh from the zip file, grep "\r" genkey.sh shows all lines of genkey.sh.

@mherrmann
Copy link
Owner

You're right. I had git config core.autocrlf set to true when building the last two fbs Pro versions.

When did you buy Pro? So I can give you access to the fixed version.

@rgrellmann
Copy link
Author

I bought it 2024-12-19.
Meanwhile I found a workaround: as genkey.sh is copied into the docker image, and can be found in (venv)/lib/python3.12/site-packages/fbs/builtin_commands/_gpg, i was able to fix it and the key was generated successfully.

Thank you for your great software and your quick response!

As you mentioned that you are planning to create a fixed version: please check the executable bit of fbs/installer/mac/create-dmg/create-dmg. On MacOS i got a "permission denied" because it was attempted to execute create-dmg, but the executable bit is not set in the downloaded .tar.gz file.

@mherrmann
Copy link
Owner

Both issues should be fixed now in 1.2.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants