summaryrefslogtreecommitdiff
path: root/patch-checklist.bash
blob: 424e3e3a03ab3327787a0ed8c3d328bda226eb45 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
# Script to run through package checklist
# (ideally a part of CI for new PRs)

while getopts :p: OPT; do
    case $OPT in
	p|+p)
	    PACKAGE=$OPTARG
	    ;;
	*)
	    echo "usage: ${0##*/} [+-p ARG} [--] ARGS..."
	    exit 2
    esac
done
shift $(( OPTIND - 1 ))
OPTIND=1

if [ ! $PACKAGE ]
then
    echo "Specify a package to test with -p"
    exit 1
fi

./bootstrap
./configure
make -j4

DEVGUIX="./pre-inst-env guix"

# 1. Check the cryptographic signature
# (use the hash and link maintainers provide in the build)

# 2. Take time to edit synopsis

# 3. Lint
$DEVGUIX lint $PACKAGE

# 4. Style
$DEVGUIX style $PACKAGE

# 5. Build
$DEVGUIX build $PACKAGE

# 6. Build dependents
$DEVGUIX build --dependents=1 $PACKAGE

# 7. Check package does not install bundled copies of software

# 8. Check size (avoid texlive)
$DEVGUIX size $PACKAGE

# 9. Check dependent packages are not affected
$DEVGUIX refresh --list-dependent $PACKAGE

# 10. Check if build is deterministic
$DEVGUIX build -q --rounds=2 --check $PACKAGE
if [ $? ]
then
    echo "Build check succeeded!"
else
    echo "Build check failed. $PACKAGE may not be deterministic."
fi

# 11. Gender neutral wording.

# 12. Make sure your patch only contains related changes.

# 13. Style (repeated)

# 14. Use mirrors of github repos: don't use GitHub archives.

# 15. Check if Guix builds (see building from Git)
# skipping. done at the start.

# 16. Run a guix pull
# -q to make sure local channel settings are ignored
$DEVGUIX pull -q --url=$PWD --profile=/tmp/guix.temp --disable-authentication