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

rpm sign fwrite failed for large file through expect #443

Closed
ChrisJergens opened this issue May 16, 2018 · 2 comments
Closed

rpm sign fwrite failed for large file through expect #443

ChrisJergens opened this issue May 16, 2018 · 2 comments

Comments

@ChrisJergens
Copy link

Hello,
I have been using expect with rpm addsign for a few years, never really had a problem with it. But recently my teams introduced a new package which is quite large, 905Mb big. And when the sign script runs this always fails, and I can only find this error.
error: /var/tmp/rpm-tmp.YgXyPZ: Fwrite failed:
Which I believe comes from sign/rpmgensig.c copyFile

I have no problems signing this large file manually, but through expect it always fail. The leftover file in /var/tmp is always 880 bytes short. I sign tons of files every day without a problem.

Any clues or help about what might be causing this would be very much appreciated. Thank you.

@ChrisJergens
Copy link
Author

Of course just after I pull my hair out, I found the issue.
Expect has default timeout of 10 seconds for a command, and this is the first time any package signing has taken that long. Signing this big file takes ~16 seconds.
So I've added 'set timeout 30' to my expect script, and signing completes without error. Eureka.

@ffesti
Copy link
Contributor

ffesti commented May 16, 2018

Note that since rpm-4.12.0 signing large packages should be faster if
%__gpg_reserved_space 4096
is set in the macros file. This reserves room for the signature so the package file does not need to be rewritten. You may want to consider updating the rpm version used on your signing server.

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