[python-HTMLgen] Update with the latest patches

jamatos jamatos at fedoraproject.org
Wed Jul 25 23:47:35 UTC 2012


commit 4c428707a0da0deaf1bd0121f07265c29332dbe8
Author: José Matos <jamatos at fedoraproject.org>
Date:   Thu Jul 26 00:47:22 2012 +0100

    Update with the latest patches

 debian_2.2.2-11.patch => debian_2.2.2-12.patch |   26 ++++++++++++++++++++---
 htmlgen-whrandom-2.2.2.patch                   |   24 ++++++++++++++++++++++
 python-HTMLgen.spec                            |   14 +++++++++---
 3 files changed, 56 insertions(+), 8 deletions(-)
---
diff --git a/debian_2.2.2-11.patch b/debian_2.2.2-12.patch
similarity index 91%
rename from debian_2.2.2-11.patch
rename to debian_2.2.2-12.patch
index 0e37243..fbbb79b 100644
--- a/debian_2.2.2-11.patch
+++ b/debian_2.2.2-12.patch
@@ -1,3 +1,22 @@
+--- htmlgen-2.2.2.orig/Makefile
++++ htmlgen-2.2.2/Makefile
+@@ -62,6 +62,16 @@
+ 	python installp.py -f $(MODULES) $(MODULESC) $(PIL) $(PILC)
+ 	@echo Installation of $(PACKAGE) done.
+ 
++debinstall:
++	if [ -z "$(PYLIBDIR)" ]; then \
++	  echo "Unset PYLIBDIR."; \
++	  exit 1; \
++	fi; \
++	for f in $(MODULES) $(PIL); do \
++	  install -m 644 $$f $(PYLIBDIR)/; \
++	done
++	@echo Installation of $(PACKAGE) done.
++
+ checkin:
+ 	ci -u $(MODULES) $(PIL) $(EXTRAS) $(TEST) Makefile
+ 
 --- htmlgen-2.2.2.orig/HTMLgen.py
 +++ htmlgen-2.2.2/HTMLgen.py
 @@ -284,7 +284,7 @@
@@ -37,7 +56,7 @@
 @@ -19,7 +18,7 @@
  # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  # PERFORMANCE OF THIS SOFTWARE.
- __version__ = '$Id: debian_2.2.2-11.patch,v 1.1 2007/08/28 15:48:47 jamatos Exp $'
+ __version__ = '$Id: HTMLutil.py,v 1.3 1998/05/28 20:14:52 friedric Exp $'
 -import string, regex, os
 +import string, re, os
  import HTMLgen, HTMLcolors
@@ -143,7 +162,7 @@
 +++ htmlgen-2.2.2/NavLinks.py
 @@ -1,4 +1,3 @@
 -#!/usr/bin/env python
- #'$Id: debian_2.2.2-11.patch,v 1.1 2007/08/28 15:48:47 jamatos Exp $'
+ #'$Id: NavLinks.py,v 1.1 1999/02/04 04:54:29 friedric Exp friedric $'
  # COPYRIGHT (C) 1999  ROBIN FRIEDRICH  email:Robin.Friedrich at pdq.net
  # Permission to use, copy, modify, and distribute this software and
 --- htmlgen-2.2.2.orig/Formtools.py
@@ -151,7 +170,7 @@
 @@ -1,4 +1,3 @@
 -#! /usr/bin/env python
  "Provide some supporting classes to simplify Input Forms with HTMLgen"
- #'$Id: debian_2.2.2-11.patch,v 1.1 2007/08/28 15:48:47 jamatos Exp $'
+ #'$Id: Formtools.py,v 1.1 1999/04/19 23:45:36 friedric Exp friedric $'
  # COPYRIGHT (C) 1999  ROBIN FRIEDRICH  email: Robin.Friedrich at pdq.net
 --- htmlgen-2.2.2.orig/ImagePaletteH.py
 +++ htmlgen-2.2.2/ImagePaletteH.py
@@ -201,4 +220,3 @@
      while line:
          if re_dialog.search(line) > -1:
              role, prose = re_dialog.group(1,2)
-
diff --git a/htmlgen-whrandom-2.2.2.patch b/htmlgen-whrandom-2.2.2.patch
new file mode 100644
index 0000000..3bca001
--- /dev/null
+++ b/htmlgen-whrandom-2.2.2.patch
@@ -0,0 +1,24 @@
+diff -ur HTMLgen.debian/HTMLgen.py HTMLgen/HTMLgen.py
+--- HTMLgen.debian/HTMLgen.py	2012-07-26 00:34:27.847945889 +0100
++++ HTMLgen/HTMLgen.py	2012-07-26 00:38:45.515540606 +0100
+@@ -924,7 +924,7 @@
+     def antispam(self, address):
+         """Process a string with HTML encodings to defeat address spiders.
+         """
+-        from whrandom import choice
++        from random import choice
+         buffer = map(None, address)
+         for i in range(0, len(address), choice((2,3,4))):
+             buffer[i] = '&#%d;' % ord(buffer[i])
+diff -ur HTMLgen.debian/ImagePaletteH.py HTMLgen/ImagePaletteH.py
+--- HTMLgen.debian/ImagePaletteH.py	2012-07-26 00:34:27.850945907 +0100
++++ HTMLgen/ImagePaletteH.py	2012-07-26 00:39:31.438815028 +0100
+@@ -70,7 +70,7 @@
+     return ImagePalette(mode, palette * len(mode))
+ 
+ def random(mode = "RGB"):
+-#    from whrandom import randint
++    from random import randint
+     palette = map(lambda a: randint(0, 255), [0]*256*len(mode))
+     return ImagePalette(mode, palette)
+ 
diff --git a/python-HTMLgen.spec b/python-HTMLgen.spec
index 0421a6c..44958b1 100644
--- a/python-HTMLgen.spec
+++ b/python-HTMLgen.spec
@@ -3,7 +3,7 @@
 
 Name:           python-HTMLgen
 Version:        2.2.2
-Release:        17%{?dist}
+Release:        18%{?dist}
 Summary:        A class library for the generation of HTML documents
 
 Group:          Development/Libraries
@@ -11,9 +11,11 @@ License:        MIT
 # For the moment these page have not yet been restored. (jamatos-20070828)
 URL:            http://starship.python.net/lib.html
 Source:         http://starship.python.net/crew/friedrich/HTMLgen.tar.gz
-# Apply debian's patch (with all the debian strict parts stripped).
-Patch:          debian_2.2.2-11.patch	
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# Apply debian's patch (all the non-debian parts)
+# http://patch-tracker.debian.org/patch/nondebian/dl/htmlgen/2.2.2-12
+Patch:          debian_2.2.2-12.patch
+# Replace references to whrandom by random (not yet on debian)
+Patch2:		htmlgen-whrandom-2.2.2.patch
 
 BuildRequires:  python-devel
 BuildArch:      noarch
@@ -26,6 +28,7 @@ which changes from time to time.
 %prep
 %setup -q -n HTMLgen
 %patch -p1
+%patch2 -p1
 
 %build
 
@@ -53,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/*.py[co]
 
 %changelog
+* Wed Jul 25 2012 José Matos <jamatos at fedoraproject.org> - 2.2.2-18
+- Update with the latest patches
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.2-17
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list