. ${BUILDFILE%/*}/common.sh pkgver=20180826 package() { preamble # #### etckeeper depends+=(etckeeper pristine-etc-keeper) # [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. # # [etckeeper]: https://www.parabola.nu/packages/community/any/etckeeper/ add-unit etc/systemd/system/multi-user.target.wants/etckeeper.timer add-file etc/systemd/system/etckeeper-init.service < .installed-packages.txt # stage the file as part of the current commit if [ "\$VCS" = git ]; then # this will do nothing if the file is unchanged. git add .installed-packages.txt fi EOF # By default, etckeeper only updates the .gitignore file on init. # Let's not ever make our admins have to manually run `etckeeper # update-ignore`. add-file -m755 etc/etckeeper/pre-commit.d/25update-ignore <<'EOF' #!/bin/bash set -e etckeeper update-ignore EOF # The etckeeper update-ignore hook is customized to ignore a couple # more files in `/etc` (and avoid ignoring `/etc/mtab`). add-file -m755 etc/etckeeper/update-ignore.d/02custom <<'_EOF_' #!/bin/bash sed -i '/^# end section managed by etckeeper$/,$d' .gitignore cat >> .gitignore <