r2695 - in zope2.12/trunk/debian (4 files)

arnau at users.alioth.debian.org arnau at users.alioth.debian.org
Mon Mar 4 11:35:59 UTC 2013


    Date: Monday, March 4, 2013 @ 11:35:58
  Author: arnau
Revision: 2695

As dh_python (>= 2.7.3-1) rewrites shebangs by default, overriding
dh_auto_install to fix shebangs does not work anymore as dh_python2 is
called afterwards, instead use dh_python2 to rewrite them.

Modified:
  zope2.12/trunk/debian/changelog
  zope2.12/trunk/debian/patches/series
  zope2.12/trunk/debian/rules
Deleted:
  zope2.12/trunk/debian/patches/ZODB3-fix_shebang.patch

Modified: zope2.12/trunk/debian/changelog
===================================================================
--- zope2.12/trunk/debian/changelog	2013-02-28 11:04:26 UTC (rev 2694)
+++ zope2.12/trunk/debian/changelog	2013-03-04 11:35:58 UTC (rev 2695)
@@ -10,8 +10,13 @@
   * debian/control:
     + Bump zope.common required version as the debconf template
       has been updated. Closes: #656552.
+  * debian/rules:
+    + As dh_python (>= 2.7.3-1) rewrites shebangs by default, overriding
+      dh_auto_install to fix shebangs does not work anymore as dh_python2 is
+      called afterwards, instead use dh_python2 to rewrite them.
+      - Drop now useless ZODB3-fix_shebang.patch.
 
- -- Arnaud Fontaine <arnau at debian.org>  Thu, 28 Feb 2013 18:21:11 +0900
+ -- Arnaud Fontaine <arnau at debian.org>  Mon, 04 Mar 2013 20:30:46 +0900
 
 zope2.12 (2.12.23-1) unstable; urgency=low
 

Deleted: zope2.12/trunk/debian/patches/ZODB3-fix_shebang.patch
===================================================================
--- zope2.12/trunk/debian/patches/ZODB3-fix_shebang.patch	2013-02-28 11:04:26 UTC (rev 2694)
+++ zope2.12/trunk/debian/patches/ZODB3-fix_shebang.patch	2013-03-04 11:35:58 UTC (rev 2695)
@@ -1,9 +0,0 @@
-Removing the python2.4 limitation.
---- a/source/ZODB3/src/ZODB/scripts/analyze.py
-+++ b/source/ZODB3/src/ZODB/scripts/analyze.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.4
-+#!/usr/bin/env python
- 
- # Based on a transaction analyzer by Matt Kromer.
- 

Modified: zope2.12/trunk/debian/patches/series
===================================================================
--- zope2.12/trunk/debian/patches/series	2013-02-28 11:04:26 UTC (rev 2694)
+++ zope2.12/trunk/debian/patches/series	2013-03-04 11:35:58 UTC (rev 2695)
@@ -2,5 +2,4 @@
 Zope2-remove_documenttemplate_release_script.patch
 Zope2-webdav_urljoin.patch
 Zope2-deb_zopeconf.patch
-ZODB3-fix_shebang.patch
 CVE-2012-5505.patch

Modified: zope2.12/trunk/debian/rules
===================================================================
--- zope2.12/trunk/debian/rules	2013-02-28 11:04:26 UTC (rev 2694)
+++ zope2.12/trunk/debian/rules	2013-03-04 11:35:58 UTC (rev 2695)
@@ -69,19 +69,6 @@
 override_dh_auto_install:
 	make install PYTHON=$(PYTHON) DESTDIR=$(DEBIAN)/$(ZOPE)
 
-#	sed -i '/^#!.*$$/a\import site; site.addsitedir("/usr/lib/$(ZOPE)/lib/python")' $$(find $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/bin -type f ! -type l)
-	for i in `find $(DEBIAN)/$(ZOPE) -type f`; do \
-		if sed '1s,#!.*python[^ ]*\(.*\),#!/usr/lib/zope$(ZVER)/bin/python\1,' $$i > $$i~ ; then \
-			if cmp --quiet $$i $$i~ ; then \
-				rm -f $$i~ ; \
-			else \
-				mv -f $$i~ $$i; \
-				chmod 755 $$i; \
-				echo "Fixed interpreter: $$i"; \
-			fi; else rm -f $$i~ ; \
-		fi; \
-	done
-
         # install the changelogs
 	dh_installchangelogs source/Zope2/doc/CHANGES.rst
 
@@ -107,6 +94,9 @@
 		$(DEBIAN)/$(ZOPE)-sandbox/usr/share/doc/$(ZOPE)-sandbox/README.Ubuntu
 endif
 
+override_dh_python2:
+	dh_python2 --shebang="/usr/lib/zope$(ZVER)/bin/python"
+
 override_dh_fixperms:
 	dh_fixperms --
 	# Setuptools apparently makes every .py file executable during the build.




More information about the pkg-zope-developers mailing list