[weasel-commit] Source: newt=0.52.10-1

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Sat, 23 Jan 2010 08:24:46 -0500

================================
newt:source=0.52.10-1 (previous: 0.52.6-1)
cvc rdiff newt -1 /weasel.rpath.org@wgl:3-devel/0.52.10-1
================================
0.52.10-1 Filip Brcic (brcha@xxxxxxx) Sat Jan 23 08:24:35 2010
    version bump + metadata

newt.recipe: changed
Index: newt.recipe
====================================================================
contents(size sha1)
inode(mtime)
--- newt.recipe /weasel.rpath.org@wgl:3-devel/0.52.6-1
+++ newt.recipe /weasel.rpath.org@wgl:3-devel/0.52.10-1
@@ -1,46 +1,63 @@
 #
-# Copyright (c) 2004-2007 rPath, Inc.
-# This file is distributed under the terms of the MIT License.
-# A copy is available at http://www.rpath.com/permanent/mit-license.html
+# Copyright (c) 2010 Filip Brcic <brcha@xxxxxxxxxxxx>
+# Distributed under the terms of the GNU General Public License v3
 #
 
 loadInstalled('tcl')
-loadSuperClass('rpmpackage')
-loadSuperClass('python')
-class Newt(RPMPackageRecipe, AutoPackageRecipe, Python.VersionMixIn):
+loadInstalled('python')
+class Newt(AutoPackageRecipe, Python.VersionMixIn):
     name = 'newt'
-    version = '0.52.6'
-    rpmRelease = '3.fc7'
+    version = '0.52.10'
 
-    buildRequires = [ 'python:devel', 'python:runtime', 'slang:devel',
-        'popt:devel', 'tcl:devel', ]
+    buildRequires = [
+        'popt:devel', 'python:devel', 'slang:devel', 'tcl:devel',
+        ]
+
+    shortDesc  = 'Newt toolkit'
+    longDesc   = 'Redhat\'s Newt windowing toolkit'
+    url        = 'https://fedorahosted.org/newt/'
+    licenses   = [ 'LGPL-2' ]
+    categories = [ 'Development/Libraries' ]
+
+    def unpack(r):
+        r.setDefaultPython()
+        r.addArchive('https://fedorahosted.org/releases/n/e/newt/')
+
+        r.macros.tclmajorminor = '.'.join(Tcl.version.split('.')[:-1])
+        r.Replace('-ltcl8.4', '-ltcl%(tclmajorminor)s',
+                  'Makefile.in',
+                  allowNoChange=True)
+
+        r.Replace('instroot', 'DESTDIR', 'Makefile.in')
+
+        r.addPatch('newt-CVE-2009-2905.patch')
 
     def configure(r):
-        r.setDefaultPython()
-        # First set tcl version to proper
-        r.macros.tclmajorminor = '.'.join(Tcl.version.split('.')[:-1])
-        r.Replace('-ltcl8.4', '-ltcl%(tclmajorminor)s', 'Makefile.in', 
allowNoChange=True)
+        r.disableParallelMake()
+        r.Configure(
+            ' --with-gpm-support'
+            ' --with-tcl'
+            ' --enable-nls'
+            )
 
-        if Arch.x86_64:
-            # Build 32bit version
-            macros32 = r.macros.copy()
-            macros32.cc = '"gcc -m32"'
-            macros32.cxx = '"g++ -m32"'
-            macros32.libdir = '%(prefix)s/lib'
-            r.Run('cp -a %(builddir)s %(builddir)s/../32bit')
-            r.Configure(dir='../32bit', overrideMacros=macros32)
-            r.Make(dir='../32bit', overrideMacros=macros32)
-            r.MakeInstall('libdir=%(libdir)s', rootVar='instroot',
-                          dir='../32bit', overrideMacros=macros32)
+    def make(r):
+        r.Make(
+            ' CC="%(cc)s"'
+            ' PYTHONVERS="python%(pyver)s"'
+            ' RPM_OPT_FLAGS="%(cflags)s"'
+            )
 
-            r.NonMultilibComponent(exceptions='.*')
+    def makeinstall(r):
+        r.MakeInstall(
+            ' prefix=%(prefix)s'
+            ' libdir=%(libdir)s'
+            ' PYTHONVERS="python%(pyver)s"'
+            ' RPM_OPT_FLAGS="ERROR"' # catch building in makeinstall
+            )
 
-        r.Configure()
+        r.Doc('peanuts.py', 'popcorn.py', 'tutorial.sgml')
+        r.Install('whiptail.1', '%(mandir)s/man1/')
 
-    # Do not configure with --with-gpm-support; bugs affect anaconda
-    def makeinstall(r):
-        r.MakeInstall('libdir=%(libdir)s', rootVar='instroot')
-        r.CompilePython('%(libdir)s/python*')
-        r.Doc('tutorial.sgml', 'peanuts.py', 'popcorn.py')
+    def policy(r):
         r.Requires('slang:devel', '%(includedir)s/newt.h')
         r.ComponentSpec('tcl', '%(libdir)s/whiptcl.so')


newt-CVE-2009-2905.patch: new
--- /dev/null
+++ newt-CVE-2009-2905.patch
@@ -0,0 +11 @@
+diff -up newt-0.52.10/textbox.c.orig newt-0.52.10/textbox.c
+--- newt-0.52.10/textbox.c.orig        2008-07-30 14:42:55.000000000 +0200
++++ newt-0.52.10/textbox.c     2009-09-21 14:59:24.000000000 +0200
+@@ -179,7 +179,7 @@ static void doReflow(const char * text, 
+ 
+     if (resultPtr) {
+       /* XXX I think this will work */
+-      result = malloc(strlen(text) + (strlen(text) / width) + 2);
++      result = malloc(strlen(text) + (strlen(text) / (width - 1)) + 2);
+       *result = '\0';
+     }

newt-0.52.10.tar.gz: new
newt-0.52.6.tar.gz: removed
newt-0.52.6-3.fc7.src.rpm: removed

Committed by: brcha

Other related posts: