summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2015-06-29 09:52:09 +0200
committerChristian Hesse2015-06-29 09:52:09 +0200
commite6f38c79ca1df2991e3e7dc4a40023ccbe302009 (patch)
tree15b7f907845ad1b575f2cfddfcd0e74262315046
downloadaur-e6f38c79ca1df2991e3e7dc4a40023ccbe302009.tar.gz
initial import of etckeeper-git 1.18.1.r0.gc1bfd1a-3
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD62
-rw-r--r--etckeeper.service12
-rw-r--r--etckeeper.timer10
4 files changed, 108 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a18a80e5518
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = etckeeper-git
+ pkgdesc = collection of tools to let /etc be stored in a git, hg or bzr repository - git checkout
+ pkgver = 1.18.1.r0.gc1bfd1a
+ pkgrel = 3
+ url = http://kitenet.net/~joey/code/etckeeper/
+ arch = any
+ license = GPL2
+ makedepends = mercurial
+ makedepends = bzr
+ depends = git
+ optdepends = mercurial: use mercurial for version control
+ optdepends = bzr: use bazaar for version control
+ provides = etckeeper
+ conflicts = etckeeper
+ backup = etc/etckeeper/etckeeper.conf
+ source = git://git.kitenet.net/etckeeper
+ source = etckeeper.service
+ source = etckeeper.timer
+ sha256sums = SKIP
+ sha256sums = b92c15e4e2d7211ded184dccf3d4b219031eef4bc5fbe0b8d294e8c0f61195fd
+ sha256sums = 256326aaaf5ce44a1b965e102cccd0cba433a76444ad9053428fb9f16428b8e5
+
+pkgname = etckeeper-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9322da73993
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+# Contributor: mathieu.clabaut <mathieu.clabaut@gmail.com>
+# Contributor: Buce <dmbuce@gmail.com>
+# Contributor: Danie Roux <accounts@danieroux.com>
+
+pkgname=etckeeper-git
+pkgver=1.18.1.r0.gc1bfd1a
+pkgrel=3
+pkgdesc='collection of tools to let /etc be stored in a git, hg or bzr repository - git checkout'
+arch=('any')
+url='http://kitenet.net/~joey/code/etckeeper/'
+license=('GPL2')
+provides=('etckeeper')
+conflicts=('etckeeper')
+depends=('git')
+makedepends=('mercurial' 'bzr')
+optdepends=('mercurial: use mercurial for version control'
+ 'bzr: use bazaar for version control')
+backup=('etc/etckeeper/etckeeper.conf')
+source=('git://git.kitenet.net/etckeeper'
+ 'etckeeper.service'
+ 'etckeeper.timer')
+sha256sums=('SKIP'
+ 'b92c15e4e2d7211ded184dccf3d4b219031eef4bc5fbe0b8d294e8c0f61195fd'
+ '256326aaaf5ce44a1b965e102cccd0cba433a76444ad9053428fb9f16428b8e5')
+
+pkgver() {
+ cd "${srcdir}/etckeeper/"
+
+ if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
+ echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
+ else
+ echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
+ fi
+}
+
+build() {
+ cd "${srcdir}/etckeeper/"
+
+ # fix python
+ sed -i '/^PYTHON=/c PYTHON=python2' Makefile
+ sed -i '1s/python/python2/' zypper-etckeeper.py
+
+ # install path for bash-completion
+ sed -i '/bash_completion/s|$(etcdir)/bash_completion.d|${prefix}/share/bash-completion/completions|' Makefile
+
+ # This does not exist, but we do not want the apt stuff installed.
+ sed -i -e "/^LOWLEVEL_PACKAGE_MANAGER/c LOWLEVEL_PACKAGE_MANAGER=pacman" \
+ -e "/^HIGHLEVEL_PACKAGE_MANAGER/c HIGHLEVEL_PACKAGE_MANAGER=pacman" etckeeper.conf
+}
+
+package() {
+ cd "${srcdir}/etckeeper/"
+
+ make DESTDIR=${pkgdir} install
+
+ # autocommit timer
+ install -D -m0755 debian/cron.daily ${pkgdir}/usr/bin/etckeeper-autocommit
+ install -D -m0644 ${srcdir}/etckeeper.service ${pkgdir}/usr/lib/systemd/system/etckeeper.service
+ install -D -m0644 ${srcdir}/etckeeper.timer ${pkgdir}/usr/lib/systemd/system/etckeeper.timer
+}
+
diff --git a/etckeeper.service b/etckeeper.service
new file mode 100644
index 00000000000..204f43c8bc9
--- /dev/null
+++ b/etckeeper.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Autocommit of changes in /etc directory
+Documentation=man:etckeeper(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=local-fs.target time-sync.target
+Before=shutdown.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/etckeeper-autocommit
+IOSchedulingClass=idle
diff --git a/etckeeper.timer b/etckeeper.timer
new file mode 100644
index 00000000000..364c0892e57
--- /dev/null
+++ b/etckeeper.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Daily autocommit of changes in /etc directory
+Documentation=man:etckeeper(8)
+
+[Timer]
+OnBootSec=15min
+OnUnitActiveSec=1d
+
+[Install]
+WantedBy=multi-user.target