You are not logged in.

#1 2016-02-01 08:28:13

Gingko
Member
Registered: 2015-07-04
Posts: 17

[Solved] Automate package creation with signatures

Hello.

I am trying to develop a shell script for managing the process of generating or updating several packages and put them into a private unofficial repository.

I want my packages and my repository database to be signed, and the signature that I use needs a passphrase in order to be applied.

My problem is that this implies calling makepkg, repo-add and/or repo-remove multiple times across the script(s), thus making necessary to enter the passphrase on each call, this is very painful.

I would like to know how to use these pacman utilities (along possibly with others GPG utilities) into a script in such a way that I would have to enter the passphrase not more than once on each invocation of one of my scripts, and/or (better) not more than once all along my shell (bash) session?

I commonly use ssh-agent for a similar use, say using ssh several times across a shell session without entering a passphrase more than once.

I have a utility named gpg-agent that I suppose it is designed to do the same thing when using GPG signatures, but I don't know how to use it with pacman utilities (and actually I don't clearly understand how to use it at all sad ).

Please could somebody help me?

Regards,

Gingko

Last edited by Gingko (2016-02-02 07:20:07)

Offline

#2 2016-02-01 08:33:36

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Automate package creation with signatures

Offline

#3 2016-02-01 15:15:03

Gingko
Member
Registered: 2015-07-04
Posts: 17

Re: [Solved] Automate package creation with signatures

I didn't know this one, thank you very much.

This will be very useful for me in the future.

... although actually this doesn't solve my problem, which is finding the correct way of using gpg-agent for signing pacman package.

But I think that I found why it wasn't working:
Due to an incorrect PATH environment, my gpg version wasn't matching the one of the gpg-agent that I am using.

Gingko

Offline

#4 2016-02-02 05:22:52

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Automate package creation with signatures

Actually keychain can work with gpg-agent too. I didn't notice that the Arch wiki page didn't mention that.

http://www.funtoo.org/Keychain

But, in any case, if you have solved your problem, then please mark your thread as solved.

Offline

#5 2016-02-02 07:17:12

Gingko
Member
Registered: 2015-07-04
Posts: 17

Re: [Solved] Automate package creation with signatures

I know that keychain works with gpg-agent too.

But keychain is "only" a mean to have to enter a passphrase only once across multiple sessions whereas I was still expecting a way to use gpg-agent for entering it once inside a single session, and even inside a single bash script.

So for me it was "just" an eventual next step. smile

I will mark my thread as solved.

Thank you very much.

Gingko

Offline

Board footer

Powered by FluxBB