summaryrefslogtreecommitdiff
path: root/sys-apps/etckeeper
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
commitcc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch)
tree125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /sys-apps/etckeeper
parent677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff)
gentoo resync : 16.09.2021
Diffstat (limited to 'sys-apps/etckeeper')
-rw-r--r--sys-apps/etckeeper/Manifest5
-rw-r--r--sys-apps/etckeeper/etckeeper-1.18.16-r1.ebuild (renamed from sys-apps/etckeeper/etckeeper-1.18.16.ebuild)5
-rw-r--r--sys-apps/etckeeper/files/etckeeper-conf-update-hook32
-rw-r--r--sys-apps/etckeeper/metadata.xml2
4 files changed, 41 insertions, 3 deletions
diff --git a/sys-apps/etckeeper/Manifest b/sys-apps/etckeeper/Manifest
index d5e3a5e6d356..2a89cac37c3d 100644
--- a/sys-apps/etckeeper/Manifest
+++ b/sys-apps/etckeeper/Manifest
@@ -1,9 +1,10 @@
AUX 99etckeeper 60 BLAKE2B 65268cf8095ebe7e59f4986e44f5a4170bc66f70cbeb6ffc2b1ff4bc9dc89665c0747ca62de89ab604d394663615fd2f0b20e9a219439d0159ecf5a38dcee51f SHA512 b2c49d5a1fe2fb8e59d6b4d85b6e2176a8bf8486cb120698050c84e067c3ec47cbd681a7b1fd1739730380f95e9c7c9092462e1f8e4bb6b9c9986b03da83443f
AUX bashrc-r1 114 BLAKE2B 9988db1b04fe28ed01d5303a524387d5ebac81568f20b3fc3f74fb5cc3d42a2b5365be292a3b674945e69cd1f4db2a63a362f6aa7fdec0f3a6cbb9187d40d143 SHA512 2c3e068413dec16e14b196a1c3eb945af5cbc0be99c9705dce18a7c6d3f70d625aedd2799cad085236923bbeaeafa0edbf7a1f97736ca548b4269257ffbeb01c
AUX etckeeper-1.18.14-gentoo.patch 2836 BLAKE2B ddc957ac78997859f4f5b629b6d1e2d8a661bf55f3c5b5969f6d3fc0e09bea9dffb343a31e062aaf45d3f7d5bbcd39395165141c41aad56a4e60efdd76d6ba99 SHA512 d0389b8d2018f22af75d18781f6c166c50189e51604f341fb4eb259d58741b984a58a80e9db8ab979c4b6867d349655bc19787aabd0f932657e311d2a315f25c
+AUX etckeeper-conf-update-hook 787 BLAKE2B 39f981c9292559b61a48b23ed18055a668731e47d69efbac4838d88f0fdd44c34912b3c17b51d59c967af4e70fbacab9fc56b76467d693440752b15be05a43be SHA512 7b8a81520166be48235519368ae803125e1f3b20b8e2a27d4095db779135387818e63aed987f89282b809e90f3a50a91c0cb738561ea5a8501afcdb8baec3ed6
AUX etckeeper.tmpfilesd 40 BLAKE2B 870679a3ef88348765025038a64480002c014ecad6e6b6f3db09935716a75cd9c315c13857db81e305e65c47da70ad3367dbf0f0a43dbe88c376ca659697497d SHA512 057871c3c0e416dd52a9879a3dba96347359d98ee884098f55351920c5275e4bfe984f68e13662e4e06f876a8c7cb2d4f0dc1f204e3bcdd74601c1e420861280
DIST etckeeper-1.18.14.tar.gz 93528 BLAKE2B b36316b4a92ae7f885a1c0c0974fa69a3c1cee06ab9eb0bbee8c025f76b1dffcd19ac2f92fed49372873f54234ec1e8da023cab98097562d3eecd862ca4d98c7 SHA512 1bc01845d47ce3af1ef56474745843e8be6e005da90a21bed302fe73476fbf1f64b84fae7dac73139c394ca698bd146e1609fa34ebbc6737ba73a6f61e670948
DIST etckeeper-1.18.16.tar.gz 93638 BLAKE2B 0cc91bd23d4d8ceeddcd18c9b6a93fbebdd5146296d565195b38432aa015b9317931e25e741e4639cdf15d7cb8235eaf9cb824f8afaf1c5fc13c954b8c3c294d SHA512 48a9f0089f72d62d68467b17a5a441dbf219c6b5b817b8ef2160b5f50eef6492257393c482a658ce11a97983ed037caa80b92e289049987bde5f8fbb22c98f07
EBUILD etckeeper-1.18.14.ebuild 1705 BLAKE2B 6e4b27820a9de14ea5e1e0f6a588589983e3326a23ec968b0a53e3b486749e31de39cc230a0568bb32e889aea159effd15bb11a9002498c10a2091b196d7cc05 SHA512 d31598fc22846eaef27c8a653b72964de28ef944de6b627032b74cce5e5dce2ad220f56fd34581cf47d9e6bfae0b4c9e146f42758daaead79656995276999a41
-EBUILD etckeeper-1.18.16.ebuild 1927 BLAKE2B 6b7a2f353f7180df8124636c78a883ecf338363ba11bffba2fae5637b27f7f3cd90ae98c7fcbc2b1179e9cc64bf076bc2ba3d94dd67f5b5bff13534ad2629331 SHA512 ca26ddc53de6493165324c92fe5a3cbc3c1754627ae0dc9a18a8f2d1d4b1dbe388c310c701d2012faa51ef605043b1f1e2a23db6a2c9a4c575e0ac29fd9e1ed6
-MISC metadata.xml 784 BLAKE2B c9e0c9c6193bc006043882ca31347e796f8e6669d4ae6121bf4334b24209a69a128ea87fe797711a7bfd3238981017dbc889793eae8f3cdf4271542abe938fd6 SHA512 b896905b4940b22136b9f5a83db6d0625cd99ffbb8e586c2b1c29d8b780db1cd59a9eebaf72bea13a4e134f2014948fcf3c3247d38da06a49f952fd456d13181
+EBUILD etckeeper-1.18.16-r1.ebuild 2102 BLAKE2B 3fcc73bfc31c949e2f24a5e16199499233b28911104ac105cbbeda4976d182bf806e30a5f6953e1196f77e2063a0bf45ecb795d65c9db905e6f5d9d5e3811d7b SHA512 9814cb9059d6c0de1470f80961318671162061c83a9256ebfeb06f15d8b171d9e59f1501195ae7215282bd83b13c00a9356746fb30f85c96327eec1eeaeb6333
+MISC metadata.xml 785 BLAKE2B 7a93b0ed9e98d9e3512a2be8fb0a1f9b1790ab563d6865e46348be6b05c8965937548890ff312d90cc52052c6a177922faacc53fa1eea6f35bec6924bdb69aa9 SHA512 47adfa4031df7a657b55fdf529f4465c704f278804fb9b08ab334e0f44e714b3f106c94a73cd6e0c903c2d2633243d23c93374a35a0ec15686248da6dbd33fde
diff --git a/sys-apps/etckeeper/etckeeper-1.18.16.ebuild b/sys-apps/etckeeper/etckeeper-1.18.16-r1.ebuild
index 7338b278ab35..0591f38928ef 100644
--- a/sys-apps/etckeeper/etckeeper-1.18.16.ebuild
+++ b/sys-apps/etckeeper/etckeeper-1.18.16-r1.ebuild
@@ -71,6 +71,11 @@ if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
fi
_EOF_
fi
+
+ local conf_update_dir="/etc/portage/conf-update.d"
+ insinto "${conf_update_dir}"
+ newins "${FILESDIR}/${PN}-conf-update-hook" "${PN}"
+ fperms 755 "${conf_update_dir}/${PN}"
}
pkg_postinst() {
diff --git a/sys-apps/etckeeper/files/etckeeper-conf-update-hook b/sys-apps/etckeeper/files/etckeeper-conf-update-hook
new file mode 100644
index 000000000000..d0546c8776d3
--- /dev/null
+++ b/sys-apps/etckeeper/files/etckeeper-conf-update-hook
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+set -eu
+
+# etckeeper hook for portage's conf-update hooks (e.g. invoked by
+# dispatch-conf). Requires portage > 3.0.22.
+
+# Do nothing if etckeeper is not initialized.
+if [[ ! -f "/etc/etckeeper/etckeeper.conf" ]]; then
+ exit
+fi
+
+echo "conf-update.d ${@}"
+
+case "${1}" in
+ pre-session)
+ echo "Commiting uncommited changes before starting a configuration update session"
+ etckeeper pre-install
+ ;;
+ post-session)
+ echo "Commiting uncommited changes before after finishing a configuration update session"
+ etckeeper post-install
+ ;;
+ post-update)
+ ACTION=${1}
+ FILE_PATH=${2}
+ FILE=$(basename "${FILE_PATH}")
+
+ echo "Commiting changes for ${FILE}"
+ etckeeper vcs add "${FILE_PATH}"
+ etckeeper vcs commit -m "${FILE}: ${ACTION} (conf-update.d hook)"
+ ;;
+esac
diff --git a/sys-apps/etckeeper/metadata.xml b/sys-apps/etckeeper/metadata.xml
index affe25c2e34c..1e13d47ff99b 100644
--- a/sys-apps/etckeeper/metadata.xml
+++ b/sys-apps/etckeeper/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gyakovlev@gentoo.org</email>