diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | etckeeper.conf | 2 | ||||
-rw-r--r-- | pacman-post-install.hook | 14 | ||||
-rw-r--r-- | pacman-pre-install.hook | 15 |
4 files changed, 35 insertions, 1 deletions
@@ -35,6 +35,11 @@ ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt) mkdir -p $(DESTDIR)$(etcdir)/cruft/filters-unex $(INSTALL_DATA) cruft_filter $(DESTDIR)$(etcdir)/cruft/filters-unex/etckeeper endif +ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman) + mkdir -p $(DESTDIR)$(prefix)/share/libalpm/hooks + $(INSTALL_DATA) ./pacman-pre-install.hook $(DESTDIR)$(prefix)/share/libalpm/hooks/etckeeper-pre-install.hook + $(INSTALL_DATA) ./pacman-post-install.hook $(DESTDIR)$(prefix)/share/libalpm/hooks/etckeeper-post-install.hook +endif ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman-g2) mkdir -p $(DESTDIR)$(etcdir)/pacman-g2/hooks $(INSTALL_DATA) pacman-g2.hook $(DESTDIR)$(etcdir)/pacman-g2/hooks/etckeeper diff --git a/etckeeper.conf b/etckeeper.conf index 19fc894..0d268bd 100644 --- a/etckeeper.conf +++ b/etckeeper.conf @@ -30,7 +30,7 @@ DARCS_COMMIT_OPTIONS="-a" #AVOID_COMMIT_BEFORE_INSTALL=1 # The high-level package manager that's being used. -# (apt, pacman-g2, yum, dnf, zypper etc) +# (apt, pacman, pacman-g2, yum, dnf, zypper etc) HIGHLEVEL_PACKAGE_MANAGER=apt # The low-level package manager that's being used. diff --git a/pacman-post-install.hook b/pacman-post-install.hook new file mode 100644 index 0000000..f3e0671 --- /dev/null +++ b/pacman-post-install.hook @@ -0,0 +1,14 @@ +# etckeeper post-install hook for Pacman 5 and newer + +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = etckeeper post-install hook +When = PostTransaction +Exec = /usr/bin/etckeeper post-install +Depends = etckeeper diff --git a/pacman-pre-install.hook b/pacman-pre-install.hook new file mode 100644 index 0000000..7d636dc --- /dev/null +++ b/pacman-pre-install.hook @@ -0,0 +1,15 @@ +# etckeeper pre-install hook for Pacman 5 and newer + +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = etckeeper pre-install hook +When = PreTransaction +Exec = /usr/bin/etckeeper pre-install +Depends = etckeeper +AbortOnFail |