blob: 1cbd7790df069f663c1c8de3a0f31835013d449a (
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
|
. ${BUILDFILE%/*}/common.sh
pkgver=20160712.2
depends=(etckeeper pristine-etc-keeper)
package() {
cd "$pkgdir"
# [https://www.parabola.nu/packages/community/any/etckeeper/
# etckeeper] is configured to use git (the default) to keep track of
# changes in `/etc`. The systemd unit etckeeper.timer is enabled,
# which makes a commit (if necessary) daily. It will also run before
# and after pacman via libalpm hooks.
add-unit etc/systemd/system/multi-user.target.wants/etckeeper.timer
# In addition to etckeeper keeping track of the current configuration,
# lukeshu's
# [https://www.parabola.nu/packages/pcr/any/pristine-etc-keeper-git/
# pristine-etc-keeper] maintains a branch of what `/etc` would be like
# if we never made any changes from the default files. The clean
# version of etc is available as the clean remote's master
# branch. Doing a git diff clean/master master should be helpful in
# investigating how things have been configured.
add-unit etc/systemd/system/multi-user.target.wants/pristine-etc-keeper.timer
# The etckeeper update-ignore hook is customized to ignore a couple
# more files in `/etc` (and avoid ignoring `/etc/mtab`). We ignore
# `resolv.conf` because it is managed by
# [https://www.parabola.nu/packages/core/any/openresolv/
# openresolv/resolvconf].
add-file -m755 etc/etckeeper/update-ignore.d/02custom <<_EOF_
#!/bin/bash
sed -i '/^# end section managed by etckeeper\$/,\$d' .gitignore
cat >> .gitignore <<EOF
# end section managed by etckeeper
!/mtab
/group-
/gshadow-
/passwd-
/shadow-
/resolv.conf
EOF
_EOF_
# For files in subdirectories of `/etc`, we use separate `.gitignore`
# files in each directory:
add-file etc/ca-certificates/.gitignore <<EOF
/trust-source/blacklist/
/trust-source/anchors/
/extracted/
EOF
add-file etc/ssl/.gitignore <<EOF
/certs/*.0
/certs/*.1
/certs/*.pem
/certs/java/cacerts
/.ssh/
EOF
add-file etc/udev/.gitignore <<EOF
/hwdb.bin
EOF
add-file etc/pacman.d/.gitignore <<EOF
/gnupg/
EOF
}
|