rpms/augeas/EL-5 augeas-0.7.2-01-7ac49e29.patch, NONE, 1.1 augeas.spec, 1.27, 1.28

Matthew Booth mdbooth at fedoraproject.org
Fri Jul 2 09:11:32 UTC 2010


Author: mdbooth

Update of /cvs/pkgs/rpms/augeas/EL-5
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv15767

Modified Files:
	augeas.spec 
Added Files:
	augeas-0.7.2-01-7ac49e29.patch 
Log Message:
Add new lens for grub's device.map


augeas-0.7.2-01-7ac49e29.patch:
 lenses/device_map.aug            |   28 ++++++++++++++++++++++++++++
 lenses/tests/test_device_map.aug |   34 ++++++++++++++++++++++++++++++++++
 tests/Makefile.am                |    1 +
 3 files changed, 63 insertions(+)

--- NEW FILE augeas-0.7.2-01-7ac49e29.patch ---
commit 7ac49e29cafbf579608560206f62580078197b2f
Author: Matthew Booth <mbooth at redhat.com>
Date:   Mon Jun 28 15:24:50 2010 +0100

    Device_map: new lens for grub's device.map

diff --git a/lenses/device_map.aug b/lenses/device_map.aug
new file mode 100644
index 0000000..090edd5
--- /dev/null
+++ b/lenses/device_map.aug
@@ -0,0 +1,28 @@
+(* Parsing grub's device.map *)
+
+module Device_map =
+  autoload xfm
+
+  let sep_tab = Sep.tab
+  let eol     = Util.eol
+  let fspath  = Rx.fspath
+  let del_str = Util.del_str
+
+  let comment = Util.comment
+  let empty   = Util.empty
+
+  let dev_name = /(h|f|c)d[0-9]+(,[0-9a-zA-Z]+){0,2}/
+  let dev_hex  = /0x[0-9a-fA-F]+/
+  let dev_dec  = /[0-9]+/
+
+  let device = del_str "(" . key ( dev_name | dev_hex | dev_dec ) .  del_str ")"
+
+  let map = [ device . sep_tab . store fspath . eol ]
+
+  let lns = ( empty | comment | map ) *
+
+  let xfm = transform lns (incl "/boot/grub/device.map")
+
+(* Local Variables: *)
+(* mode: caml *)
+(* End: *)
diff --git a/lenses/tests/test_device_map.aug b/lenses/tests/test_device_map.aug
new file mode 100644
index 0000000..2a7810a
--- /dev/null
+++ b/lenses/tests/test_device_map.aug
@@ -0,0 +1,34 @@
+module Test_device_map =
+
+  let conf = "# this device map was generated by anaconda
+(fd0)     /dev/fda
+(hd0)     /dev/sda
+(cd0)     /dev/cdrom
+(hd1,1)   /dev/sdb1
+(hd0,a)   /dev/sda1
+(0x80)    /dev/sda
+(128)     /dev/sda
+"
+
+  test Device_map.lns get conf =
+    { "#comment" = "this device map was generated by anaconda" }
+    { "fd0" = "/dev/fda" }
+    { "hd0" = "/dev/sda" }
+    { "cd0" = "/dev/cdrom" }
+    { "hd1,1" = "/dev/sdb1" }
+    { "hd0,a" = "/dev/sda1" }
+    { "0x80"  = "/dev/sda" }
+    { "128"   = "/dev/sda" }
+
+  test Device_map.lns put conf after
+    set "hd2,1" "/dev/sdb1"
+  = "# this device map was generated by anaconda
+(fd0)     /dev/fda
+(hd0)     /dev/sda
+(cd0)     /dev/cdrom
+(hd1,1)   /dev/sdb1
+(hd0,a)   /dev/sda1
+(0x80)    /dev/sda
+(128)     /dev/sda
+(hd2,1)\t/dev/sdb1
+"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1e20743..3570c53 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -23,6 +23,7 @@ lens_tests =			\
   lens-cron.sh			\
   lens-darkice.sh		\
   lens-debctrl.sh		\
+  lens-device_map.sh    \
   lens-dhclient.sh		\
   lens-dnsmasq.sh		\
   lens-dpkg.sh			\


Index: augeas.spec
===================================================================
RCS file: /cvs/pkgs/rpms/augeas/EL-5/augeas.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -r1.27 -r1.28
--- augeas.spec	22 Jun 2010 21:45:34 -0000	1.27
+++ augeas.spec	2 Jul 2010 09:11:31 -0000	1.28
@@ -1,12 +1,16 @@
 Name:           augeas
 Version:        0.7.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A library for changing configuration files
 
 Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            http://augeas.net/
 Source0:        http://augeas.net/download/%{name}-%{version}.tar.gz
+# Format of the patch name is augeas-VERSION-NUMBER-HASH where VERSION
+# gives the first version where this patch was applied, NUMBER orders patches
+# against the same version, and HASH is the git commit hash from upstream
+Patch0:         augeas-0.7.2-01-7ac49e29.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  readline-devel libselinux-devel
@@ -43,6 +47,7 @@ The libraries for %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --disable-static
@@ -85,6 +90,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/augeas.pc
 
 %changelog
+* Fri Jul  2 2010 Matthew Booth <mbooth at redhat.com> - 0.7.2-2
+- Add lens for grub's device.map
+
 * Tue Jun 22 2010 David Lutterkort <lutter at redhat.com> - 0.7.2-1
 - Fix ownership of /usr/share/augeas. BZ 569393
 



More information about the scm-commits mailing list