rpms/augeas/F-13 augeas-0.7.2-10-7ac49e29.patch, NONE, 1.1 augeas.spec, 1.29, 1.30

Matthew Booth mdbooth at fedoraproject.org
Fri Jul 2 08:51:13 UTC 2010


Author: mdbooth

Update of /cvs/pkgs/rpms/augeas/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13777

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


augeas-0.7.2-10-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-10-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/F-13/augeas.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- augeas.spec	30 Jun 2010 01:32:48 -0000	1.29
+++ augeas.spec	2 Jul 2010 08:51:12 -0000	1.30
@@ -1,6 +1,6 @@
 Name:           augeas
 Version:        0.7.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A library for changing configuration files
 
 Group:          System Environment/Libraries
@@ -19,6 +19,7 @@ Patch5:         augeas-0.7.2-06-11b85805
 Patch6:         augeas-0.7.2-07-72c636de.patch
 Patch7:         augeas-0.7.2-08-0695bdd0.patch
 Patch8:         augeas-0.7.2-09-5ee81630.patch
+Patch9:         augeas-0.7.2-10-7ac49e29.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  readline-devel libselinux-devel
@@ -64,6 +65,7 @@ The libraries for %{name}.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %build
 %configure --disable-static
@@ -106,6 +108,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/augeas.pc
 
 %changelog
+* Fri Jul  2 2010 Matthew Booth <mbooth at redhat.com> - 0.7.2-3
+- Add lens for grub's device.map
+
 * Tue Jun 29 2010 David Lutterkort <lutter at redhat.com> - 0.7.2-2
 - Patches based on upstream fix for BZ 600141
 



More information about the scm-commits mailing list