Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to build and submit a package to a launchpad Ubuntu reposiory of mine in a nightly cronjob. To this end, I'll have to

debuild -S

the package which by default requires human interaction since the gpg key used for signing is protected by a password. The cronjob then also fails with an error message of the type

cannot open /dev/tty

which gpg typically uses for the password challenge.

How would I have to set up the system to work around such issues?

share|improve this question
    
Why not just use launchpad's daily-build feature? –  tumbleweed Nov 30 '12 at 13:30
    
I'll try out help.launchpad.net/Packaging/SourceBuilds. –  Nico Schlömer Nov 30 '12 at 17:48

1 Answer 1

Well, for starters you'll need to get the passphrase to your gpg process somehow. You can use any of the following:

  • --passphrase-fd Read the passphrase in through a file descriptor

  • --passphrase-file Read the passphrase in from a file

  • --passphrase Specify the passphrase directly

After that, you'll also want to add --batch and --no-tty. See the gpg man page for more explanation.

share|improve this answer
    
Are those options to debuild as well? gpg is never invoked directly. –  Nico Schlömer Nov 29 '12 at 15:11
    
Ah, I see. I didn't realize you weren't calling gpg directly (not familiar with debuild). A quick google search on debuild & gpg gets some hits, but I don't have more time to look into it right now. Let us know what you figure out! –  ryran Nov 29 '12 at 20:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.