GitHub Pull Requests

Step 0 variant a: User configures the local repository
Clone the github mirror of the Gentoo repository under the remote name "upstream".

Fork the Gentoo repository on GitHub and then add it under the remote name "github" to your local repository.

Step 0 variant b: using git as the main portage tree
Add the following to the file: [gentoo] location = /usr/portage sync-type = git sync-uri = https://github.com/gentoo/gentoo.git auto-sync = yes sync-user = portage:portage

Add the following, changing . #!/bin/bash USER_NAME= find /usr/portage/ -type d -exec setfacl -m u:$USER_NAME:rwx {} \; find /usr/portage/ -type f -exec setfacl -m u:$USER_NAME:rw {} \; find /usr/portage/.git -type d -exec setfacl -m u:$USER_NAME:rwx {} \; find /usr/portage/.git -type f -exec setfacl -m u:$USER_NAME:rw {} \;

Then sync the tree.

Fork the Gentoo repository on GitHub and then add it under the remote name "github" to your local repository.

Add your remote fork you created under the remote name "github" to your local repository.

Step 2: GPG Configuration
Add the following: keyserver hkps://hkps.pool.sks-keyservers.net keyserver-options ca-cert-file=/usr/share/gnupg/sks-keyservers.netCA.pem keyserver-options no-honor-keyserver-url cert-digest-algo SHA512 default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed Now to generate the key:

Select the algorithm Set the key size Specify how long the key should be valid (No more then 5 years) Confirm the information is correct Set your name set your email Set your passphrase, and confirm it. It might take some time if you've chosen a high bit length key. Upload your key to the keyserver.

To get your GPG key run this command. It should be the top line (starting with pub). If you have more than one key with the UID you will need to select the correct key yourself (from the list of returned keys).

You want the keyID from the line that starts with 'pub' and what is after the algorithm and the / eg: pub  rsa4096/0x000000000000000

Step 3: User updates the local repository
Say you are making changes to package app-foo/bar. Create a local branch with your changes:

Make your changes and make sure to run repoman to check for basic errors:

Then commit your changes (if you're closing some bugs on Bugzilla, you can mention them here as suggested by GLEP66):

Step 4: User makes a pull request
Now that you've made your changes and updated your local branch, it's time to send it off to GitHub and make a PR (Pull Request) to the Gentoo Developers.

Start by pushing the branch with your changes to your GitHub repository:

Then create a pull request from your GitHub repository's local branch to the Gentoo repository's master branch. When your changes have been merged, you may delete your local repository's branch with: