Running etckeeper on Void Linux
2025-03-25
First, install etckeeper
.
Then create or edit /etc/.gitignore
file to include files that shouldn't be versioned (such as resolv.conf
).
Then as root run etckeeper init
and etckeeper commit "first commit"
Then create a symbolic link from /etc/cron.daily/etckeeper
to /etc/etckeeper/daily
.
Then create these three executable files:
/usr/local/bin/xbps-install
:
#!/usr/bin/env perl
use v5.40;
use English '$UID';
my $binary = trim((`which -a xbps-install`)[1]) or die "No deep xbps-install binary found";
!system('etckeeper pre-install') or die "Couldn't execute 'etckeeper pre-install'\n" unless $UID;
!system($binary, @ARGV) or die "Couldn't execute this: $binary @ARGV\n";
!system('etckeeper post-install') or die "Couldn't execute 'etckeeper post-install'\n" unless $UID;
/usr/local/bin/xbps-remove
:
#!/usr/bin/env perl
use v5.40;
use English '$UID';
my $binary = trim((`which -a xbps-remove`)[1]) or die "No deep xbps-remove binary found";
!system('etckeeper pre-install') or die "Couldn't execute 'etckeeper pre-install'\n" unless $UID;
!system($binary, @ARGV) or die "Couldn't execute this: $binary @ARGV\n";
!system('etckeeper post-install') or die "Couldn't execute 'etckeeper post-install'\n" unless $UID;
/etc/cron.daily/01-record_manual_packages
:
#!/bin/sh
xpkg -m > /etc/my_list_of_manual_pkgs
__DONE__
Comments
Write your comment: