freight-team / freight

A modern take on the Debian archive.
Other
107 stars 37 forks source link

Support gpg2 in freight cache passphrase file option #84

Closed hnakamur closed 6 years ago

hnakamur commented 6 years ago

Please see https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase for gpg's --pinentry loopback option.

mmoll commented 6 years ago

@hnakamur Could you reformat the code according to the shfmt output in the tests? @mattock Could you have a look? I guess that would solve GH-72 more completely then what we have now.

hnakamur commented 6 years ago

@mmoll Could you tell me more detailed explanation about the code format? I had followed the format of the code lib/freight/apt.sh#L212-L228. There were redundant backslashes \ after &&, so I removed them and push a new commit d05b107.

hnakamur commented 6 years ago

Ah, I looked at the result of Travis CI and got it! I'm fixing it now.

mattock commented 6 years ago

@mmoll I will try this PR out early next.

mattock commented 6 years ago

Sorry for the delay in reviewing this. The check for --pinentry-mode loopback is a really nice one. I tested this PR with Ubuntu 16.04 / GnuPG 1.4.20 and automatic retrieval of the GnuPG passphrase from a file worked fine.

I was able to reproduce my original GnuPG 2.x problem by removing pinentry-curses package and by using the current freight version in our apt repositories (0.3.11). When I installed freight with this patch applied the problem went away.

Consider this an ACK/approval of this PR :+1:

mmoll commented 6 years ago

merged, thanks @hnakamur!