diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2013-06-04 10:29:57 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2013-06-04 10:29:57 +0200 |
| commit | 9bf3c1a77d2e0fcf8d6eeafa5f3018038129fe02 (patch) | |
| tree | 1d4236e60ff3429f63a4fb85d9924ce4eb52e29b /HACKING | |
| parent | ae3b6bb0f4dc1f69ecb629c9b7ad34588d646039 (diff) | |
doc: Write about patch submission and packaging guidelines.
* HACKING: Update the command names from `guix-build' to `guix build' & co.
(Submitting Patches, Packaging Guidelines): New sections.
* doc/guix.texi (Contributing): New section.
Diffstat (limited to 'HACKING')
| -rw-r--r-- | HACKING | 80 |
1 files changed, 48 insertions, 32 deletions
| @@ -14,7 +14,7 @@ Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> | |||
| 14 | Command-line tools can be used even if you have not run "make install". | 14 | Command-line tools can be used even if you have not run "make install". |
| 15 | To do that, prefix each command with ‘./pre-inst-env’, as in: | 15 | To do that, prefix each command with ‘./pre-inst-env’, as in: |
| 16 | 16 | ||
| 17 | ./pre-inst-env guix-build --help | 17 | ./pre-inst-env guix build --help |
| 18 | 18 | ||
| 19 | Similarly, for a Guile session using the Guix modules: | 19 | Similarly, for a Guile session using the Guix modules: |
| 20 | 20 | ||
| @@ -40,6 +40,16 @@ addition to that, you must not miss [[http://www.emacswiki.org/emacs/ParEdit][Pa | |||
| 40 | directly operate on the syntax tree, such as raising an s-expression or | 40 | directly operate on the syntax tree, such as raising an s-expression or |
| 41 | wrapping it, swallowing or rejecting the following s-expression, etc. | 41 | wrapping it, swallowing or rejecting the following s-expression, etc. |
| 42 | 42 | ||
| 43 | * Packaging Guidelines | ||
| 44 | |||
| 45 | The GNU distribution is about respecting the freedom of users. Consequently, | ||
| 46 | it contains only free software as defined at | ||
| 47 | http://www.gnu.org/philosophy/free-sw.html . | ||
| 48 | |||
| 49 | In addition, we follow the [[http://www.gnu.org/distros/free-system-distribution-guidelines.html][free software distribution guidelines]]. Among other | ||
| 50 | things, this means that the distribution tries hard not to steer users towards | ||
| 51 | obtaining information about non-free software. | ||
| 52 | |||
| 43 | * Adding new packages | 53 | * Adding new packages |
| 44 | 54 | ||
| 45 | Package recipes in Guix look like this: | 55 | Package recipes in Guix look like this: |
| @@ -68,22 +78,55 @@ Package recipes in Guix look like this: | |||
| 68 | #+END_SRC | 78 | #+END_SRC |
| 69 | 79 | ||
| 70 | Such a recipe can be written by hand, and then tested by running | 80 | Such a recipe can be written by hand, and then tested by running |
| 71 | ‘./pre-inst-env guix-build nettle’. | 81 | ‘./pre-inst-env guix build nettle’. |
| 72 | 82 | ||
| 73 | When writing the recipe, the base32-encoded SHA256 hash of the source | 83 | When writing the recipe, the base32-encoded SHA256 hash of the source |
| 74 | code tarball, which can be seen in the example above, can be obtained by | 84 | code tarball, which can be seen in the example above, can be obtained by |
| 75 | running: | 85 | running: |
| 76 | 86 | ||
| 77 | guix-download http://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz | 87 | guix download http://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz |
| 78 | 88 | ||
| 79 | Alternatively, it is possible to semi-automatically import recipes from | 89 | Alternatively, it is possible to semi-automatically import recipes from |
| 80 | the [[http://nixos.org/nixpkgs/][Nixpkgs]] software distribution using this command: | 90 | the [[http://nixos.org/nixpkgs/][Nixpkgs]] software distribution using this command: |
| 81 | 91 | ||
| 82 | guix-import /path/to/nixpkgs/checkout nettle | 92 | guix import /path/to/nixpkgs/checkout nettle |
| 83 | 93 | ||
| 84 | The command automatically fetches and converts to Guix the “Nix | 94 | The command automatically fetches and converts to Guix the “Nix |
| 85 | expression” of Nettle. | 95 | expression” of Nettle. |
| 86 | 96 | ||
| 97 | * Submitting Patches | ||
| 98 | |||
| 99 | Development is done using the Git distributed version control system. Thus, | ||
| 100 | access to the repository is not strictly necessary. We welcome contributions | ||
| 101 | in the form of patches as produced by ‘git format-patch’ sent to | ||
| 102 | bug-guix@gnu.org. Please write commit logs in the [[http://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs][GNU ChangeLog format]]. | ||
| 103 | |||
| 104 | As you become a regular contributor, you may find it convenient to have write | ||
| 105 | access to the repository (see below.) | ||
| 106 | |||
| 107 | * Commit Access | ||
| 108 | |||
| 109 | For frequent contributors, having write access to the repository is | ||
| 110 | convenient. When you deem it necessary, feel free to ask for it on the | ||
| 111 | mailing list. When you get commit access, please make sure to follow the | ||
| 112 | policy below (discussions of the policy can take place on bug-guix@gnu.org.) | ||
| 113 | |||
| 114 | Non-trivial patches should always be posted to bug-guix@gnu.org (trivial | ||
| 115 | patches include fixing typos, etc.) | ||
| 116 | |||
| 117 | For patches that just add a new package, and a simple one, it’s OK to commit, | ||
| 118 | if you’re confident (which means you successfully built it in a chroot setup.) | ||
| 119 | Likewise for package upgrades. We have a mailing list for commit | ||
| 120 | notifications (guix-commits@gnu.org), so people can notice. Before pushing | ||
| 121 | your changes, make sure to run ‘git pull --rebase’. | ||
| 122 | |||
| 123 | For anything else, please post to bug-guix@gnu.org and leave time for a | ||
| 124 | review, without committing anything. If you didn’t receive any reply | ||
| 125 | after two weeks, and if you’re confident, it’s OK to commit. | ||
| 126 | |||
| 127 | That last part is subject to being adjusted, allowing individuals to commit | ||
| 128 | directly on non-controversial changes on parts they’re familiar with. | ||
| 129 | |||
| 87 | * Porting the Guix distro on a new platform | 130 | * Porting the Guix distro on a new platform |
| 88 | 131 | ||
| 89 | ** Introduction | 132 | ** Introduction |
| @@ -137,7 +180,7 @@ GCC, libc, etc. need to be built. To that end, run the following | |||
| 137 | commands: | 180 | commands: |
| 138 | 181 | ||
| 139 | #+BEGIN_SRC sh | 182 | #+BEGIN_SRC sh |
| 140 | ./pre-inst-env guix-build -K \ | 183 | ./pre-inst-env guix build -K \ |
| 141 | -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)' \ | 184 | -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)' \ |
| 142 | --system=i686-linux | 185 | --system=i686-linux |
| 143 | 186 | ||
| @@ -174,30 +217,3 @@ shown above. For example, all the binaries (except for glibc) must be | |||
| 174 | statically-linked; the bootstrap Guile must be relocatable (see patch in | 217 | statically-linked; the bootstrap Guile must be relocatable (see patch in |
| 175 | the Guix distro); the static-binaries tarball must contain the same | 218 | the Guix distro); the static-binaries tarball must contain the same |
| 176 | programs (Coreutils, Grep, sed, Awk, etc.); and so on. | 219 | programs (Coreutils, Grep, sed, Awk, etc.); and so on. |
| 177 | |||
| 178 | * Commit Access | ||
| 179 | |||
| 180 | Development is done using the Git distributed version control system. Thus, | ||
| 181 | access to the repository is not strictly necessary. We welcome contributions | ||
| 182 | in the form of patches as produced by ‘git format-patch’ sent to | ||
| 183 | bug-guix@gnu.org. | ||
| 184 | |||
| 185 | However, for frequent contributors, having write access to the repository is | ||
| 186 | convenient. When you get commit access, please make sure to follow the policy | ||
| 187 | below (discussions of the policy can take place on bug-guix@gnu.org.) | ||
| 188 | |||
| 189 | Non-trivial patches should always be posted to bug-guix@gnu.org (trivial | ||
| 190 | patches include fixing typos, etc.) | ||
| 191 | |||
| 192 | For patches that just add a new package, and a simple one, it’s OK to commit, | ||
| 193 | if you’re confident (which means you successfully built it in a chroot setup.) | ||
| 194 | Likewise for package upgrades. We have a mailing list for commit | ||
| 195 | notifications (guix-commits@gnu.org), so people can notice. Before pushing | ||
| 196 | your changes, make sure to run ‘git pull --rebase’. | ||
| 197 | |||
| 198 | For anything else, please post to bug-guix@gnu.org and leave time for a | ||
| 199 | review, without committing anything. If you didn’t receive any reply | ||
| 200 | after two weeks, and if you’re confident, it’s OK to commit. | ||
| 201 | |||
| 202 | That last part is subject to being adjusted, allowing individuals to commit | ||
| 203 | directly on non-controversial changes on parts they’re familiar with. | ||
