-
Notifications
You must be signed in to change notification settings - Fork 38
Fix issue that prevented freight-cache from working with GnuPG 2.x #73
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
base: master
Are you sure you want to change the base?
Conversation
lib/freight/apt.sh
Outdated
| # | ||
| # https://github.com/freight-team/freight/issues/72 | ||
| # | ||
| GPG_TTY=$(tty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure if this works that way generally, e.g. in a cronjob, could you test that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my testing this works properly even from cron. Not having it and cron reports the same failure as when testing manually. When this is present, freight-cache is happy, and cron is happy.
That said Travis seemed unhappy with not this being exported, so I will update this PR accordingly.
URL: freight-team#72 Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
|
I modified the code a bit to get shellcheck and BATS tests passing, could you please re-test? |
|
@mmoll : the logic on/after line |
|
Im puzzeled, why it doesn't work as expected. However, while testing in my env (debian 9 wityh systemd), I'm getting the following: If I'm exporting GPG_TTY in my shell directly, everything works, but when using freight-cache, even with the original one-liner fix, GPG_TTY is "not on a tty" and gpg fails again... which is bringing me back to the question of GH-72 if the whole siuation can really be work-arounded automatically... |
|
@mmoll : by "when tty fails" you mean "the tty executable is not present/found" or "executable outputs an empty/unexpected string"? |
|
I also had the "not a tty" problem earlier, but I'm no longer sure how to reproduce it. |
|
@mattock "tty fails" -> non-zero exit code |
URL: #72
Signed-off-by: Samuli Seppänen samuli@openvpn.net