[arch-commits] Commit in etckeeper/repos (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Thu Nov 12 19:16:26 UTC 2020
Date: Thursday, November 12, 2020 @ 19:16:26
Author: foutrelis
Revision: 753400
archrelease: copy trunk to community-staging-any
Added:
etckeeper/repos/community-staging-any/
etckeeper/repos/community-staging-any/0001-breezy.patch
(from rev 753399, etckeeper/trunk/0001-breezy.patch)
etckeeper/repos/community-staging-any/PKGBUILD
(from rev 753399, etckeeper/trunk/PKGBUILD)
-------------------+
0001-breezy.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 43 ++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
Copied: etckeeper/repos/community-staging-any/0001-breezy.patch (from rev 753399, etckeeper/trunk/0001-breezy.patch)
===================================================================
--- community-staging-any/0001-breezy.patch (rev 0)
+++ community-staging-any/0001-breezy.patch 2020-11-12 19:16:26 UTC (rev 753400)
@@ -0,0 +1,62 @@
+diff --git a/Makefile b/Makefile
+index 73d2411..7e545ba 100644
+--- a/Makefile
++++ b/Makefile
+@@ -21,7 +21,7 @@ FAKEROOT := $(shell command -v fakeroot 2> /dev/null)
+ TESTDIR := $(shell mktemp -u -d)
+
+ build: etckeeper.spec etckeeper.version
+- -$(PYTHON) ./etckeeper-bzr/__init__.py build || echo "** bzr support not built"
++ -$(PYTHON) ./etckeeper-brz/__init__.py build || echo "** brz support not built"
+ -$(PYTHON) ./etckeeper-dnf/etckeeper.py build || echo "** DNF support not built"
+
+ install: etckeeper.version
+@@ -68,7 +68,7 @@ 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"
++ -$(PYTHON) ./etckeeper-brz/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** brz support not installed"
+ echo "** installation successful"
+
+ clean: etckeeper.spec etckeeper.version
+diff --git a/etckeeper-brz/__init__.py b/etckeeper-brz/__init__.py
+new file mode 100644
+index 0000000..5f04ba6
+--- /dev/null
++++ b/etckeeper-brz/__init__.py
+@@ -0,0 +1,34 @@
++#
++# Breezy plugin that runs etckeeper pre-commit when necessary
++
++"""Runs etckeeper pre-commit when necessary."""
++
++from breezy.errors import BzrError
++import os
++
++def etckeeper_startcommit_hook(tree):
++ abspath = getattr(tree, "abspath", None)
++ if abspath is None or not os.path.exists(abspath(".etckeeper")):
++ # Only run the commit hook when this is an etckeeper branch
++ return
++ import subprocess
++ ret = subprocess.call(["etckeeper", "pre-commit", abspath(".")])
++ if ret != 0:
++ raise BzrError("etckeeper pre-commit failed")
++
++try:
++ from breezy.hooks import install_lazy_named_hook
++except ImportError:
++ from breezy.mutabletree import MutableTree
++ MutableTree.hooks.install_named_hook('start_commit',
++ etckeeper_startcommit_hook, 'etckeeper')
++else:
++ install_lazy_named_hook(
++ "breezy.mutabletree", "MutableTree.hooks",
++ 'start_commit', etckeeper_startcommit_hook, 'etckeeper')
++
++if __name__ == "__main__":
++ from distutils.core import setup
++ setup(name="brz-etckeeper",
++ packages=["breezy.plugins.etckeeper"],
++ package_dir={"breezy.plugins.etckeeper":"etckeeper-brz"})
Copied: etckeeper/repos/community-staging-any/PKGBUILD (from rev 753399, etckeeper/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2020-11-12 19:16:26 UTC (rev 753400)
@@ -0,0 +1,43 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+# Contributor: mathieu.clabaut <mathieu.clabaut at gmail.com>
+# Contributor: Buce <dmbuce at gmail.com>
+# Contributor: Danie Roux <accounts at danieroux.com>
+
+pkgname=etckeeper
+_tag='9906edb738bf93494a872d018f77f7e0c4f22ea4' # git rev-parse ${pkgver}
+pkgver=1.18.14
+pkgrel=4
+pkgdesc='Collection of tools to let /etc be stored in a git, hg or bzr repository'
+arch=('any')
+url='https://etckeeper.branchable.com/'
+license=('GPL2')
+depends=('git' 'diffutils' 'sed')
+makedepends=('mercurial' 'breezy')
+optdepends=('mercurial: use mercurial for version control'
+ 'breezy: use bazaar for version control'
+ 'which: etckeeper vcs <subcommand> support')
+backup=('etc/etckeeper/etckeeper.conf')
+source=("git+https://git.kitenet.net/git/etckeeper.git#tag=${_tag}?signed"
+ '0001-breezy.patch')
+sha256sums=('SKIP'
+ 'fbfce54167828db00a2dcec02cf75c5df32302fae5411fd68dfb1a521675be6c')
+validpgpkeys=('E85A5F63B31D24C1EBF0D81CC910D9222512E3C7') # Joey Hess <joeyh at joeyh.name>
+
+prepare() {
+ cd ${pkgname}
+
+ patch -Np1 < ../0001-breezy.patch
+}
+
+build() {
+ cd ${pkgname}
+
+ # We want pacman :D
+ sed -i -e "/^LOWLEVEL_PACKAGE_MANAGER/c LOWLEVEL_PACKAGE_MANAGER=pacman" \
+ -e "/^HIGHLEVEL_PACKAGE_MANAGER/c HIGHLEVEL_PACKAGE_MANAGER=pacman" etckeeper.conf
+}
+
+package() {
+ cd ${pkgname}
+ make DESTDIR="${pkgdir}" systemddir=/usr/lib/systemd/system install
+}
More information about the arch-commits
mailing list