Difference between revisions of "DeveloperWiki:Signing Packages"

From ArchWiki
Jump to: navigation, search
(Open questions)
(Optional: Get your key signed by CAcert)
Line 33: Line 33:
 
# Save the signed key from the CAcert website and import it
 
# Save the signed key from the CAcert website and import it
 
## <code>gpg --import <filename></code>
 
## <code>gpg --import <filename></code>
# You might want to send your new signed key to a keyserver
+
# You could also export it again for uploading it on e.g. your webspace: <code>gpg --export --armor pierre@archlinux.de > pierre@archlinux.de.asc</code>
 +
 
 +
==Publish your public key==
 +
# Send your new signed key to a keyserver
 
## Check your key id with <code>gpg -k</code>
 
## Check your key id with <code>gpg -k</code>
 
## <code>gpg --send-keys 9741E8AC</code>
 
## <code>gpg --send-keys 9741E8AC</code>
## You could also export it again for uploading it on e.g. your webspace: <code>gpg --export --armor pierre@archlinux.de > pierre@archlinux.de.asc</code>
+
# Add your key finger print to your profile at https://www.archlinux.org/devel/profile/
 +
 
 +
==Backup==
 
# You should create a backup of your keys and make sure to not forget the passphrase!
 
# You should create a backup of your keys and make sure to not forget the passphrase!
  

Revision as of 13:00, 30 October 2011

Warning: This is just a draft and work in progress. Don't even read it.

Choose an UID

  • Use a valid e-mail address. Means no obfuscation.
  • The e-mail address should be reliable (so don't use the one you got from your ISP a random free mail address).
  • The UID has also to be the same as the PACKAGER variable you use to build packages
  • An UID looks like this: Pierre Schmitz <pierre@archlinux.de>

Recommendation

  • Use your real name. It has to be exactly the one that can be found on official documents like your passport or driver's license. Have a look at http://wiki.cacert.org/PracticeOnNames
  • If in doubt you should prefer using your archlinux.org address

Create a key pair

  1. install gnupg
  2. gpg --gen-key
    1. you may use the default options which is a 2048 Bit RSA key for encryption and signing which does not expire
  3. Also create a revoke key for later use
    1. gpg -o ~/.gnupg/pierre@archlinux.de-revoke.asc --gen-revoke pierre@archlinux.de
    2. Make sure to create a backup of this file and remove it from your system afterwards
  4. Backup your private key: gpg --export-secret-keys pierre@archlinux.de > pierre@archlinux.de-private.asc

Optional: Get your key signed by CAcert

  1. Get the CAcert key and import it:
    1. wget https://www.cacert.org/certs/cacert.asc
    2. gpg --import cacert.asc
  2. Trust this key:
    1. gpg --edit-key gpg@cacert.org
    2. >trust
    3. >5
  3. Export your key:
    1. gpg --export --armor pierre@archlinux.de > pierre@archlinux.de.asc
    2. Paste the content of that file into the form on the CAcert website to get your signed public key.
  4. Save the signed key from the CAcert website and import it
    1. gpg --import <filename>
  5. You could also export it again for uploading it on e.g. your webspace: gpg --export --armor pierre@archlinux.de > pierre@archlinux.de.asc

Publish your public key

  1. Send your new signed key to a keyserver
    1. Check your key id with gpg -k
    2. gpg --send-keys 9741E8AC
  2. Add your key finger print to your profile at https://www.archlinux.org/devel/profile/

Backup

  1. You should create a backup of your keys and make sure to not forget the passphrase!

Sign your packages

  1. Install devtools 0.9.22 or later
  2. add SIGNPKG=y to your ~/.makepkg.conf
  3. If you want to sign with a specific key also add GPGKEY=<id>
  4. commitpkg and its aliases like extrapkg or testingpkg will now sign your packages and upload the package including its signature.