User:Maffblaster/Drafts/Gentoo Primers/The Gentoo Developer Primer

This document should not be considered a replacement for the old Developer Handbook. Eventually this article may get merged into the Developer Handbook. Right now it is simply to be used as a draft space of steps necessary for developers to become connected and productive in the Gentoo sphere. New developers should travel down through the list.

Developer init
New developers have quite a few things to setup before they're 'fully integrated' into the Gentoo ecosystem. For developers that are unfamiliar with processes and job duties of system administration (perhaps more code-savvy and less infrastructure oriented developers), configuring these things can be a confusing and difficult. Because of the sheer amount of tasks, it's also easy to

SSH
SSH keys will need to be generated so that woodpecker, and potentially Gentoo development machine, can be accessed. The recruiter(s) will assist in this process, but essentially generate a 4096-bit RSA key:

Master keys
It is best practice for developers to generate a master key pair, then generate subkeys from the master key pair for signing. Generated keys are to follow the specifications outlined in GLEP 63. In short, Gentoo developers are to use a master key type of RSA at 4096 bits (RSAv4 or later). Developers who have already generated a master key that does not meet this minimum standard will need to generate a new set of keys (sorry!).

After emerging, issue the following commands:

Copy and paste the following GLEP 63 approved configuration template into :

Generate the master key pair:

At the dialog, choose the option (should be the default. For key length, be sure to enter  . Enter a value of   for the key expiration. Enter your real name, the email address to be associated with this key, and a comment if desired. The comment is simply for your reference. Those with multiple master keys may enter a descriptor describing the purpose of this key in this field. When data entry is complete, confirm the entries by pressing the  key (O as in Oscar). Next, enter a strong passphrase (include at least one integer number or GPG will complain).

GPG should now be generating a master key pair! This will take some time and will benefit from system resource usage. Updating some software, playing a game, or reviewing bugs is a nice way to pass the time. When finished, the keys will be present in the directory!

Subkeys
Signing keys

Pinentry
pinentry should be configured based on developer preference. There are a few visual interfaces to pinentry: Qt, GTK, and ncurses. Adjust the use flags for the program as neccessary. If the KDE or GNOME desktop environments are being used, it is likely either the  (or perhaps  ) or the   USE flags have respectively been set.

After adjusting USE flags and recompiling as necessary, be sure to use to select the appropriate user interface. In the example below the Qt 5 interface has been selected:

Next configure the developers file to prompt for a password via pinentry:

Finally, fill in the file. The following example will tell GPG to use the (which then calls  for password input). It sets the default GPG to use when encrypting documents, then finally defines some digest preferences:

Woodpecker
Woodpecker is primary used to setup a developer's LDAP information and add developer mail addresses to email alaises. These changes are actioned using the script.

Each change will require you to enter a password.

LDAP
LDAP is used in order to maintain Gentoo internal information about developers.

To add yourself to some roles for Gentoo, execute the following command:

Although you can name them whatever you'd like, your roles should match your project affiliations defined on by your project involvement.

Set lon/lat (look where you're located at here):

GPG key
expects the GPG signing key to be passed in fingerprint format. The following command will show the fingerprint format for subkeys:

In the above example  is the signing key in the fingerprint format.

Wiki
Visit the Developer Central page and click the "Getting started" link in order to connect your LDAP information to the wiki.

Git
All Gentoo developers should have GPG (PGP) and SSH keys (generated in the Keys section above). Git needs to interface with both keys. This is done in order to verify and validate identity.

In this example  is the part that would be added a value to the PORTAGE_GPG_KEY variable inside :

The options can be added via by running the following commands:

When the above commands have been entered, the developer's git configuration file should look something like the following:

IRC
Most developers stay connected 24/7 to IRC in order to catch any mentions of their nickname. There are various strategies of staying connected. Some developers leave their main workstation connected to the internet, others might pay for an IRC cloud service.

For those wishing to host IRC themselves, the IRC guide is a great place to start.

Forums

 * Create a forums account (optional).

Blog
May Gentoo developers have blogs. This section will present a few options for Gentoo developers.

The first option is Developer website on Woodpecker.

Second is Wordpress, via https://blogs.gentoo.org.

If none of these options work, you can always host the blog somewhere else. As long as it has an RSS feed, Gentoo Planet can pull in the Gentoo related postings.

Portage configuration
Package maintainers will need to provide Portage with their GPG signing (denoted by the ) key information in 0xlong format. This is a different format than expects on Woodpecker. Use the following command to display keys in the proper format:

In this example  is the part that would be added a value to the PORTAGE_GPG_KEY variable inside :

Tooling
When attempting to preform fine work, having sharp, precise tools is a must. This section of the developer primer will hopefully provide aid in helping developers streamline their workflow. The goal is an increase in productivity.

Email clients
Depending on the selected email client, getting setting configured properly to filter incoming messages into nicely organized directories and remove nasty spam can take some time and effort. It is important that every developer take the time to properly configure the email client of choice for developer related duties for a few reasons. A well thought out configuration at the beginning will:


 * Save time.
 * For most every developer, checking mail is only one of the streams of communication that will need checked on a regular basis. The less time spent checking mail the more time can be invested into checking other communication streams such as IRC, comments on GitHub, or other Gentoo project sites. Ideally Gentoo developers will be spending the majority of their time on coding, ebuild maintenance, hacking on infrastructure, or other Developer/SysOp duties.


 * Gain efficiency.
 * An efficient person is a productive person. Having the mail client sort and prioritize messages offloads cycles to a CPU rather than a human brain, which allows the human brain to concentrate on what is important.

Thunderbird
Useful link for spam filtering:


 * https://support.mozilla.org/en-US/kb/thunderbird-and-junk-spam-messages

Remember that Mozilla's spam filter needs training, so it may take some time (a week or two) for it to learn what is spam what is not. Be sure to check whatever folder is dedicated to Junk every once in a while to be sure important messages are not being marked as Junk!