summaryrefslogtreecommitdiff
path: root/repo/augeas
diff options
context:
space:
mode:
Diffstat (limited to 'repo/augeas')
-rw-r--r--repo/augeas/acf.aug7
-rw-r--r--repo/augeas/augeas.xibuild44
-rw-r--r--repo/augeas/awall.aug9
-rw-r--r--repo/augeas/fix-test.patch13
4 files changed, 73 insertions, 0 deletions
diff --git a/repo/augeas/acf.aug b/repo/augeas/acf.aug
new file mode 100644
index 0000000..377c0a8
--- /dev/null
+++ b/repo/augeas/acf.aug
@@ -0,0 +1,7 @@
+(* Copyright (C) 2016 Kaarle Ritvanen *)
+
+module Acf =
+
+autoload xfm
+
+let xfm = transform IniFile.lns_loose (incl "/etc/acf/acf.conf")
diff --git a/repo/augeas/augeas.xibuild b/repo/augeas/augeas.xibuild
new file mode 100644
index 0000000..2064482
--- /dev/null
+++ b/repo/augeas/augeas.xibuild
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+NAME="augeas"
+DESC="A configuration editing tool"
+
+MAKEDEPS=" autoconf automake libxml2 readline libtool"
+
+PKG_VER=1.12.0
+SOURCE="http://download.augeas.net/augeas-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+acf.aug
+awall.aug
+fix-test.patch
+"
+
+prepare() {
+ apply_patches
+ autoreconf -f -i
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-static \
+ --enable-shared \
+ --disable-gnulib-tests
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+ rm -rf "$PKG_DEST"/usr/lib/charset.alias
+ # Upstream packaging mistake, this should never have been installed
+ rm -f "$PKG_DEST"/usr/bin/dump
+
+ local lens
+ for lens in acf awall; do
+ install -m 644 "$BUILD_ROOT"/$lens.aug "$PKG_DEST"/usr/share/augeas/lenses
+ done
+}
diff --git a/repo/augeas/awall.aug b/repo/augeas/awall.aug
new file mode 100644
index 0000000..e4432d2
--- /dev/null
+++ b/repo/augeas/awall.aug
@@ -0,0 +1,9 @@
+(* Copyright (C) 2018 Kaarle Ritvanen *)
+
+module Awall =
+
+autoload xfm
+
+let xfm = transform Json.lns (
+ incl "/etc/awall/*.json" . incl "/etc/awall/*/*.json"
+)
diff --git a/repo/augeas/fix-test.patch b/repo/augeas/fix-test.patch
new file mode 100644
index 0000000..540aeba
--- /dev/null
+++ b/repo/augeas/fix-test.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/test-preserve.sh b/tests/test-preserve.sh
+index 40b8689..f3e9b87 100755
+--- a/tests/test-preserve.sh
++++ b/tests/test-preserve.sh
+@@ -40,7 +40,7 @@ if [ $? != 0 ] ; then
+ exit 1
+ fi
+
+-act_group=$(ls -l $hosts | sed -e 's/ */ /g' | cut -d ' ' -f 4)
++act_group=$(stat -c "%G" $hosts)
+ act_mode=$(ls -l $hosts | cut -b 1-10)
+ if [ $selinux = yes ] ; then
+ act_con=$(stat --format=%C $hosts | cut -d ':' -f 3)