rpms/system-config-bind/F-8 system-config-bind-4.0.2-listen-on.patch, NONE, 1.1 system-config-bind.spec, 1.71, 1.72

Jaroslav Reznik jreznik at fedoraproject.org
Mon Sep 15 12:12:45 UTC 2008


Author: jreznik

Update of /cvs/pkgs/rpms/system-config-bind/F-8
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6787

Modified Files:
	system-config-bind.spec 
Added Files:
	system-config-bind-4.0.2-listen-on.patch 
Log Message:
* Mon Sep 15 2008 Jaroslav Reznik <jreznik at redhat.com> - 4.0.2-11
- Fixes error when adding listen-on (rhbz#449046)


system-config-bind-4.0.2-listen-on.patch:

--- NEW FILE system-config-bind-4.0.2-listen-on.patch ---
diff -up system-config-bind-4.0.2/NamedConfOptions.py.listen-on system-config-bind-4.0.2/NamedConfOptions.py
--- system-config-bind-4.0.2/NamedConfOptions.py.listen-on	2005-08-03 16:45:38.000000000 +0200
+++ system-config-bind-4.0.2/NamedConfOptions.py	2008-09-15 13:26:21.000000000 +0200
@@ -376,6 +376,7 @@ O = { 
             'type': int,
             'range': [0,65535],
             'syntax': True,
+	    'port': True,
             'default': 53
           }
         },
@@ -398,6 +399,7 @@ O = { 
             'type': int,
             'range': [0,65535],
             'syntax': True,
+	    'port': True,
             'default': 53
           }
         },
@@ -1006,6 +1008,7 @@ O = { 
       'attrs': [ { 'port':
                    {  'name': _('Port'),
                       'syntax': True,
+		      'port': True,
                       'type': int,
                       'range':[0,65535],
                       'default':53
diff -up system-config-bind-4.0.2/Options.py.listen-on system-config-bind-4.0.2/Options.py
--- system-config-bind-4.0.2/Options.py.listen-on	2005-05-05 05:40:26.000000000 +0200
+++ system-config-bind-4.0.2/Options.py	2008-09-15 13:25:28.000000000 +0200
@@ -101,6 +101,30 @@ class Options:
                                                     break
                                         name=aname
                                     debug( '    ATTR <',name,'> =',v)
+                                elif( attr.has_key('port') ):
+                                    # this hack is due to rhbz#449046 - parser serves everything
+                                    # before { token as one big key; so we have to correct it here
+                                    debug( '    ATTR PORT HACK',name)
+                                    aname = vals.pop(0)
+                                    if(type(aname)!=dict):
+                                        debug( '    ATTR SKIP',name)
+                                        value[name]=None
+                                        continue
+                                    for dictkey in aname.keys():
+                                        if (dictkey.find(name)==0):
+                                            debug('    ATTR PORT in', dictkey)
+                                            # parse name attr's value  
+                                            v=dictkey.split(' ')[1]   
+                                            value[name]=v
+                                            debug( '    ATTR <',name,'> =',v)                                          
+                                            # now repair vals with proper values
+                                            vals=[aname[dictkey]]
+                                            debug('    ATTR PORT HACK NEW VALS', vals)
+                                    if(len(vals)==0):
+                                        vals=[aname]
+                                        value[name]=None
+                                        debug('    ATTR PORT HACK NEW VALS', vals)   
+                                        continue				    
                                 elif( attr.has_key('syntax') ):
                                     debug( '    ATTR SKIP',name)
                                     value[name]=None
@@ -282,8 +306,15 @@ class Options:
                 if v.has_key(name):
                     if attr.has_key('syntax'):
                         s += name + ' '
-                    s+=str(v[name]) + ' '        
-        return s[:-1]+';'
+                    if( hasattr(v[name],'out')):
+                        s += v[name].out() + ' '
+                    else:
+                        s+=str(v[name]) + ' ' 
+        # ACL output is terminated by ';' - we don't need it
+        if (s[-2]==';'):
+            return s[:-1]
+        else:     
+            return s[:-1]+';'
 
     def update(s):
         debug( 'UPDATE OPTIONS', s.key)


Index: system-config-bind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-bind/F-8/system-config-bind.spec,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- system-config-bind.spec	26 May 2008 15:17:11 -0000	1.71
+++ system-config-bind.spec	15 Sep 2008 12:12:15 -0000	1.72
@@ -1,7 +1,7 @@
 Summary: 	BIND DNS Configuration Tool
 Name: 		system-config-bind
 Version: 	4.0.2
-Release: 	10%{?dist}
+Release: 	11%{?dist}
 URL:            http://fedorahosted.org/system-config-bind
 License: 	GPLv2+
 Group: 		Applications/System
@@ -15,6 +15,7 @@
 Patch6:		system-config-bind-4.0.2-DNSSECkey-record-column.patch
 Patch7:		system-config-bind-4.0.4-srv.patch
 Patch8:		system-config-bind-4.0.2-slaves-perm.patch
+Patch9:		system-config-bind-4.0.2-listen-on.patch
 BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root
 BuildArch: 	noarch
 BuildRequires:  python, gettext, make, intltool
@@ -45,6 +46,7 @@
 %patch6 -p1
 %patch7 -p2 -b .srv
 %patch8 -p2 -b .slaves-perm
+%patch9 -p1 -b .listen-on
 
 %build
 make 
@@ -111,6 +113,9 @@
 fi
 
 %changelog
+* Mon Sep 15 2008 Jaroslav Reznik <jreznik at redhat.com> - 4.0.2-11
+- Fixes error when adding listen-on (rhbz#449046)
+
 * Mon May 26 2008 Radek Brich <rbrich at redhat.com> - 4.0.2-10
 - set proper permissions on zone files moved to slaves/
   (bz#444285, bz#444286)




More information about the fedora-extras-commits mailing list