summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-01 05:57:45 +0100
committerSam James <sam@gentoo.org>2022-10-01 05:57:45 +0100
commit6185a73c8a11a8f9ff823020f676c2d4f4af9755 (patch)
treea817a531de04fe6ae9ba340f7afc56d9b4749e8d
parentnet-mail/notmuch: don't install removed nmbug (diff)
downloadgentoo-6185a73c8a11a8f9ff823020f676c2d4f4af9755.tar.gz
gentoo-6185a73c8a11a8f9ff823020f676c2d4f4af9755.tar.bz2
gentoo-6185a73c8a11a8f9ff823020f676c2d4f4af9755.zip
sys-apps/etckeeper: add 1.18.18
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-apps/etckeeper/Manifest1
-rw-r--r--sys-apps/etckeeper/etckeeper-1.18.18.ebuild97
-rw-r--r--sys-apps/etckeeper/files/etckeeper-1.18.18-gentoo.patch70
3 files changed, 168 insertions, 0 deletions
diff --git a/sys-apps/etckeeper/Manifest b/sys-apps/etckeeper/Manifest
index 5786d8857e91..96587a2bd2a7 100644
--- a/sys-apps/etckeeper/Manifest
+++ b/sys-apps/etckeeper/Manifest
@@ -1,2 +1,3 @@
DIST etckeeper-1.18.16.tar.gz 93638 BLAKE2B 0cc91bd23d4d8ceeddcd18c9b6a93fbebdd5146296d565195b38432aa015b9317931e25e741e4639cdf15d7cb8235eaf9cb824f8afaf1c5fc13c954b8c3c294d SHA512 48a9f0089f72d62d68467b17a5a441dbf219c6b5b817b8ef2160b5f50eef6492257393c482a658ce11a97983ed037caa80b92e289049987bde5f8fbb22c98f07
DIST etckeeper-1.18.17.tar.gz 100705 BLAKE2B afbd800d0d808997d1f618d81abf5b9c756384db4f4e0a9984349e9c512fc03ab04c04e9d968f99b5ff0eaf59727e4673fd107a0f6e04f14a0327c9247a39124 SHA512 6e75d0f38c8d27ba290ab6e1a51d50ca7a736c958da7a1edb792a5c7f1eedd4848adbb43571425f127bf2c5fe39d5b7887968b09178ca5385ec0abeaeb6cfa00
+DIST etckeeper-1.18.18.tar.gz 101845 BLAKE2B 2072b54db4023211e85fcbed82bd93412eb02707d5447b297bf98e65f1d534e02e790612d9771ae433a07aa6a462dd9b5c5528207d2bcfd4059232417e3186e1 SHA512 57b2f7297c0b71e3d39a7838dd3e6599bb3f1275d86200be9d7986f46f0392aa0ba130cb38ba7a5757fcb5d6fa33b4d32233237dba15e8ce9fb8c52565cf251b
diff --git a/sys-apps/etckeeper/etckeeper-1.18.18.ebuild b/sys-apps/etckeeper/etckeeper-1.18.18.ebuild
new file mode 100644
index 000000000000..b63426712a0e
--- /dev/null
+++ b/sys-apps/etckeeper/etckeeper-1.18.18.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 prefix systemd tmpfiles
+
+DESCRIPTION="A collection of tools to let /etc be stored in a repository"
+HOMEPAGE="https://etckeeper.branchable.com/"
+SRC_URI="https://git.joeyh.name/index.cgi/etckeeper.git/snapshot/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+SLOT="0"
+IUSE="cron test"
+
+BDEPEND="test? (
+ dev-util/bats
+ dev-vcs/git
+)"
+
+RDEPEND="app-portage/portage-utils
+ cron? ( virtual/cron )
+ || (
+ dev-vcs/git
+ dev-vcs/mercurial
+ dev-vcs/darcs
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ # TODO: submit upstream
+ "${FILESDIR}"/${PN}-1.18.18-gentoo.patch
+)
+
+src_prepare() {
+ default
+ hprefixify *.d/* etckeeper
+ local systemdunitdir="$(systemd_get_systemunitdir)"
+ systemdunitdir="${systemdunitdir#${EPREFIX}}"
+ sed -i \
+ -e s'@zsh/vendor-completions@zsh/site-functions@' \
+ -e s"@/lib/systemd/system@"${systemdunitdir}"@" \
+ Makefile || die
+ rm -v init.d/60darcs-deleted-symlinks || die
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+
+ doenvd "$(prefixify_ro "${FILESDIR}"/99${PN})"
+
+ newbashcomp bash_completion ${PN}
+ dodoc doc/README.mdwn
+ newdoc "${FILESDIR}"/bashrc-r1 bashrc.example
+
+ rm -rv "${ED}/var/cache" || die
+ newtmpfiles "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf
+
+ if use cron ; then
+ exeinto /etc/cron.daily
+ newexe - etckeeper <<'_EOF_'
+#!/bin/sh
+set -e
+if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
+ . /etc/etckeeper/etckeeper.conf
+ if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
+ /etc/etckeeper/daily
+ fi
+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() {
+ tmpfiles_process "${PN}.conf"
+
+ elog "${PN} supports git, mercurial and darcs"
+ elog "This ebuild just ensures at least one is installed!"
+ elog
+ elog "You may want to adjust your /etc/portage/bashrc"
+ elog "see the example file in /usr/share/doc/${PF}"
+ elog
+ elog "To initialise your etc-dir as a repository run:"
+ elog "${PN} init -d /etc"
+}
diff --git a/sys-apps/etckeeper/files/etckeeper-1.18.18-gentoo.patch b/sys-apps/etckeeper/files/etckeeper-1.18.18-gentoo.patch
new file mode 100644
index 000000000000..298671c90004
--- /dev/null
+++ b/sys-apps/etckeeper/files/etckeeper-1.18.18-gentoo.patch
@@ -0,0 +1,70 @@
+From 5ac7b1861a7e23935bc09cacfa6675d8a086877e Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sun, 26 Jan 2020 23:24:54 -0800
+Subject: [PATCH] 1.18.18-gentoo
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/Makefile
++++ b/Makefile
+@@ -68,7 +68,6 @@ ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper)
+ mkdir -p $(DESTDIR)$(prefix)/lib/zypp/plugins/commit
+ $(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py
+ endif
+- -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed"
+ echo "** installation successful"
+
+ clean: etckeeper.spec etckeeper.version
+--- a/etckeeper.conf
++++ b/etckeeper.conf
+@@ -33,11 +33,21 @@ DARCS_COMMIT_OPTIONS="-a"
+
+ # The high-level package manager that's being used.
+ # (apt, pacman, pacman-g2, yum, dnf, zypper, apk, xbps etc)
+-HIGHLEVEL_PACKAGE_MANAGER=apt
++#HIGHLEVEL_PACKAGE_MANAGER=apt
++
++# Gentoo specific:
++# For portage this is emerge
++# For paludis this is cave
++HIGHLEVEL_PACKAGE_MANAGER=emerge
+
+ # The low-level package manager that's being used.
+ # (dpkg, rpm, pacman, pacmatic, pacman-g2, apk, xbps etc)
+-LOWLEVEL_PACKAGE_MANAGER=dpkg
++#LOWLEVEL_PACKAGE_MANAGER=dpkg
++
++# Gentoo specific:
++# For portage this is qlist
++# For paludis this is cave
++LOWLEVEL_PACKAGE_MANAGER=qlist
+
+ # To push each commit to a remote, put the name of the remote here.
+ # (eg, "origin" for git). Space-separated lists of multiple remotes
+--- a/list-installed.d/50list-installed
++++ b/list-installed.d/50list-installed
+@@ -30,5 +30,9 @@ else
+ apk info -v | sort
+ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = xbps ]; then
+ xbps-query -l | awk '{print $2}' | sed -r 's/-([^-]+)$/ \1/g;'
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = qlist ]; then
++ qlist -ICv
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = cave ]; then
++ cave print-packages -r installed
+ fi
+ fi
+--- a/update-ignore.d/01update-ignore
++++ b/update-ignore.d/01update-ignore
+@@ -107,8 +107,12 @@ writefile () {
+ comment "new versions of conffiles, stored by xbps"
+ ignore "*.new-*_[0-9]*"
+ nl
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "qlist" -o "$LOWLEVEL_PACKAGE_MANAGER" = "cave" ]; then
++ comment "new and old versions of conffiles, stored by emerge"
++ ignore "._cfg*"
++ nl
+ fi
+-
++
+ comment "old versions of files"
+ ignore "*.old"
+ # Not currently ignored as admins tend to rely on these files.