aboutsummaryrefslogtreecommitdiff
path: root/HACKING
blob: 20cc9ea6ea99911e8b23f9a930dd51f42814e4eb (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
-*- mode: org; coding: utf-8; -*-

#+TITLE: Hacking GNU Guix and Its Incredible Distro

Copyright © 2012, 2013, 2014, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
Copyright © 2015, 2017 Mathieu Lirzin <mthl@gnu.org>
Copyright © 2017 Leo Famulari <leo@famulari.name>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

* Contributing

See the manual for useful hacking informations, either by running

  info -f doc/guix.info "Contributing"

or by checking the [[http://www.gnu.org/software/guix/manual/guix.html#Contributing][web copy of the manual]].

* Commit Access

For frequent contributors, having write access to the repository is
convenient.  When you deem it necessary, feel free to ask for it on the
mailing list.  When you get commit access, please make sure to follow the
policy below (discussions of the policy can take place on guix-devel@gnu.org.)

Non-trivial patches should always be posted to guix-patches@gnu.org (trivial
patches include fixing typos, etc.)  This mailing list fills the
patch-tracking database at [[https://bugs.gnu.org/guix-patches]]; see
"Contributing" in the manual for details.

For patches that just add a new package, and a simple one, it’s OK to commit,
if you’re confident (which means you successfully built it in a chroot setup,
and have done a reasonable copyright and license auditing.)  Likewise for
package upgrades, except upgrades that trigger a lot of rebuilds (for example,
upgrading GnuTLS or GLib.)  We have a mailing list for commit notifications
(guix-commits@gnu.org), so people can notice.  Before pushing your changes,
make sure to run ‘git pull --rebase’.

All commits that are pushed to the central repository on Savannah must be
signed with an OpenPGP key, and the public key should be uploaded to your user
account on Savannah and to public key servers, such as ‘pgp.mit.edu’.  To
configure Git to automatically sign commits, run:

  git config commit.gpgsign true
  git config user.signingkey CABBA6EA1DC0FF33

You can prevent yourself from accidentally pushing unsigned commits to
Savannah by using the pre-push Git hook called located at ‘etc/git/pre-push’:

  cp etc/git/pre-push .git/hooks/pre-push

When pushing a commit on behalf of somebody else, please add a Signed-off-by
line at the end of the commit log message (e.g. with ‘git am --signoff’).
This improves tracking of who did what.

For anything else, please post to guix-patches@gnu.org and leave time for a
review, without committing anything.  If you didn’t receive any reply
after two weeks, and if you’re confident, it’s OK to commit.

That last part is subject to being adjusted, allowing individuals to commit
directly on non-controversial changes on parts they’re familiar with.
(disk-get-primary-partition-count (disk-new d1-device))) (test-assert (let* ((disk (disk-new d1-device)) (partitions (disk-partitions disk)) (boot-partition (find normal-partition? partitions))) (partition-get-flag boot-partition PARTITION-FLAG-BOOT))) ;; Image i2. (define i2-image #$(system-image i2)) (define d2-device (get-device i2-image)) (test-equal "gpt" (disk-type-name (disk-probe d2-device))) (test-equal 1 (disk-get-primary-partition-count (disk-new d2-device))) (test-equal "test" (let* ((disk (disk-new d2-device)) (partitions (disk-partitions disk)) (boot-partition (find normal-partition? partitions))) (partition-get-name boot-partition))) ;; Image i3. (define i3-image #$(system-image i3)) (define d3-device (get-device i3-image)) (test-equal "msdos" (disk-type-name (disk-probe d3-device))) (test-equal 2 (disk-get-primary-partition-count (disk-new d3-device))) ;; Image i4. (define i4-image #$(system-image i4)) (define d4-device (get-device i4-image)) (test-equal "gpt" (disk-type-name (disk-probe d4-device))) (test-equal 2 (disk-get-primary-partition-count (disk-new d4-device))) ;; Image i5. (define i5-image #$(system-image i5)) (define d5-device (get-device i5-image)) (define (sector->byte sector) (/ (* sector (device-sector-size d5-device)) MEBIBYTE-SIZE)) (test-equal "gpt" (disk-type-name (disk-probe d5-device))) (test-equal 2 (disk-get-primary-partition-count (disk-new d5-device))) (test-equal '("fat32" "ext4") (map (compose filesystem-type-name partition-fs-type) (filter data-partition? (disk-partitions (disk-new d5-device))))) ;; The first partition has a 1MiB offset has a 128MiB size. The ;; second partition should then start at 129MiB. (test-equal '(1 129) (map (compose sector->byte partition-start) (filter data-partition? (disk-partitions (disk-new d5-device))))) ;; Image i6. (define i6-image #$(system-image i6)) (define d6-device (get-device i6-image)) (test-equal "gpt" (disk-type-name (disk-probe d6-device))) (test-end))))) (gexp->derivation "images-test" test)) (define %test-images (system-test (name "images") (description "Build and test basic system images.") (value (run-images-test))))