public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/etckeeper/, sys-apps/etckeeper/files/
Date: Wed,  4 Jan 2023 09:59:58 +0000 (UTC)	[thread overview]
Message-ID: <1672826351.578e0fcd9c0fa170e7106997c07bac71b9ab0239.gyakovlev@gentoo> (raw)

commit:     578e0fcd9c0fa170e7106997c07bac71b9ab0239
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  4 09:46:54 2023 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jan  4 09:59:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=578e0fcd

sys-apps/etckeeper: add 1.18.19

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-apps/etckeeper/Manifest                        |   1 +
 sys-apps/etckeeper/etckeeper-1.18.19.ebuild        | 104 +++++++++++++++++++++
 .../files/etckeeper-1.18.19-backticks-EOF.patch    |  37 ++++++++
 3 files changed, 142 insertions(+)

diff --git a/sys-apps/etckeeper/Manifest b/sys-apps/etckeeper/Manifest
index df174c8a9e2d..012bc415a070 100644
--- a/sys-apps/etckeeper/Manifest
+++ b/sys-apps/etckeeper/Manifest
@@ -1 +1,2 @@
 DIST etckeeper-1.18.18.tar.gz 101845 BLAKE2B 2072b54db4023211e85fcbed82bd93412eb02707d5447b297bf98e65f1d534e02e790612d9771ae433a07aa6a462dd9b5c5528207d2bcfd4059232417e3186e1 SHA512 57b2f7297c0b71e3d39a7838dd3e6599bb3f1275d86200be9d7986f46f0392aa0ba130cb38ba7a5757fcb5d6fa33b4d32233237dba15e8ce9fb8c52565cf251b
+DIST etckeeper-1.18.19.tar.gz 110687 BLAKE2B fe0b1a7cc108b81e15d03fad6f2e10538a4ff991fcbac132bd18930501ea3681786f5e20a942b32c621b6a595bb61d2dc99e33ef4f040e2958a6d8cafa7e4763 SHA512 8b4776f04c98996f0dd1c68694d026cc61e8b8c3b1163a18b98bce37eea95a4676c31bde172996b392fa48e160515a61ddd466798d9e70f4b3dd56615046df16

diff --git a/sys-apps/etckeeper/etckeeper-1.18.19.ebuild b/sys-apps/etckeeper/etckeeper-1.18.19.ebuild
new file mode 100644
index 000000000000..0174a070e7e3
--- /dev/null
+++ b/sys-apps/etckeeper/etckeeper-1.18.19.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2023 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=(
+	"${FILESDIR}/etckeeper-1.18.19-backticks-EOF.patch" # sent upstream
+)
+
+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}"@" \
+		-e '/etckeeper-bzr\/__init__\.py/d' \
+		Makefile || die
+
+	# pre-configure for portage.
+	sed -i \
+		-e 's/^HIGHLEVEL_PACKAGE_MANAGER=apt/HIGHLEVEL_PACKAGE_MANAGER=emerge/' \
+		-e 's/^LOWLEVEL_PACKAGE_MANAGER=dpkg/LOWLEVEL_PACKAGE_MANAGER=qlist/' \
+		etckeeper.conf || 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.19-backticks-EOF.patch b/sys-apps/etckeeper/files/etckeeper-1.18.19-backticks-EOF.patch
new file mode 100644
index 000000000000..cf47e8108bef
--- /dev/null
+++ b/sys-apps/etckeeper/files/etckeeper-1.18.19-backticks-EOF.patch
@@ -0,0 +1,37 @@
+From 88cc70458f1dd902d001b63148b0df534b1ebdf6 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Wed, 4 Jan 2023 01:29:09 -0800
+Subject: [PATCH] init.d/50vcs-pre-commit-hook: replace backticks
+
+it's in EOF block, so bash tries to execute backticked commands despite
+being commented out.
+
+Initialized empty Git repository in /etc/.git/
+/etc/etckeeper/init.d/50vcs-pre-commit-hook: line 11: rev-parse: command not found
+Usage: grep [OPTION]... PATTERNS [FILE]...
+Try 'grep --help' for more information.
+/etc/etckeeper/init.d/50vcs-pre-commit-hook: line 11: worktree: command not found
+
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ init.d/50vcs-pre-commit-hook | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/init.d/50vcs-pre-commit-hook b/init.d/50vcs-pre-commit-hook
+index 6e0669c..166540d 100755
+--- a/init.d/50vcs-pre-commit-hook
++++ b/init.d/50vcs-pre-commit-hook
+@@ -34,8 +34,8 @@ set -e
+ #
+ ################################################################################
+ 
+-# Using `rev-parse` + `grep` rather than for instance parsing output from
+-# `worktree list` since the worktree command is not present in older git version
++# Using 'rev-parse' + 'grep' rather than for instance parsing output from
++# 'worktree list' since the worktree command is not present in older git version
+ # and parsing it would be slightly more complex.
+ if git rev-parse --git-dir | grep -q /.git/worktrees
+ then
+-- 
+2.39.0
+


             reply	other threads:[~2023-01-04 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  9:59 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-11 12:00 [gentoo-commits] repo/gentoo:master commit in: sys-apps/etckeeper/, sys-apps/etckeeper/files/ Georgy Yakovlev
2022-10-01  4:57 Sam James
2022-05-15  1:15 Sam James
2021-09-13 10:34 Georgy Yakovlev
2020-03-31 12:57 Georgy Yakovlev
2020-01-27  8:25 Georgy Yakovlev
2018-02-07  8:51 Michael Palimaka
2017-02-01 13:45 Manuel Rüger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1672826351.578e0fcd9c0fa170e7106997c07bac71b9ab0239.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox