summaryrefslogtreecommitdiffstats
path: root/Misc/RPM
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-02-15 21:27:03 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2004-02-15 21:27:03 (GMT)
commitd3c810ed31c4f113501c43a9ea792523309e5abc (patch)
tree8ef5baa6f75f137268553fbcfa4356a6513f1557 /Misc/RPM
parenta79449e7a2c34daa622c01b66b8a8bd681089176 (diff)
downloadcpython-d3c810ed31c4f113501c43a9ea792523309e5abc.zip
cpython-d3c810ed31c4f113501c43a9ea792523309e5abc.tar.gz
cpython-d3c810ed31c4f113501c43a9ea792523309e5abc.tar.bz2
Patch #892673: Replace /usr/local/bin/python with
/usr/bin/env python'%{binsuffix} Backported to 2.3.
Diffstat (limited to 'Misc/RPM')
-rw-r--r--Misc/RPM/python-2.3.spec39
1 files changed, 38 insertions, 1 deletions
diff --git a/Misc/RPM/python-2.3.spec b/Misc/RPM/python-2.3.spec
index 1f2741b..d699f59 100644
--- a/Misc/RPM/python-2.3.spec
+++ b/Misc/RPM/python-2.3.spec
@@ -30,7 +30,7 @@
#################################
%define name python
-%define version 2.3.2
+%define version 2.3.3
%define libvers 2.3
%define release 1pydotorg
%define __prefix /usr
@@ -127,6 +127,11 @@ formats.
%endif
%changelog
+* Sat Feb 07 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.3-2pydotorg]
+- Adding code to remove "#!/usr/local/bin/python" from particular files and
+ causing the RPM build to terminate if there are any unexpected files
+ which have that line in them.
+
* Mon Oct 13 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.2-1pydotorg]
- Adding code to detect wether documentation is available to build.
@@ -261,6 +266,38 @@ mkdir -p "$RPM_BUILD_ROOT"/var/www/html/python
)
%endif
+# fix the #! line in installed files
+for file in \
+ usr/lib/python2.3/Tools/scripts/parseentities.py \
+ usr/lib/python2.3/cgi.py \
+ usr/lib/python2.3/Tools/faqwiz/faqw.py
+do
+ sed 's|^#!.*python|#!/usr/bin/env python'"%{binsuffix}"'|' \
+ "$RPM_BUILD_ROOT"/"$file" >/tmp/fix-python-path.$$
+ cat /tmp/fix-python-path.$$ >"$RPM_BUILD_ROOT"/"$file"
+ rm -f /tmp/fix-python-path.$$
+done
+
+# check to see if there are any straggling #! lines
+find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
+ | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
+if [ -s /tmp/python-rpm-files.$$ ]
+then
+ echo '*****************************************************'
+ cat /tmp/python-rpm-files.$$
+ cat <<@EOF
+ *****************************************************
+ There are still files referencing /usr/local/bin/python in the
+ install directory. They are listed above. Please fix the .spec
+ file and try again. If you are an end-user, you probably want
+ to report this to jafo-rpms@tummy.com as well.
+ *****************************************************
+@EOF
+ rm -f /tmp/python-rpm-files.$$
+ exit 1
+fi
+rm -f /tmp/python-rpm-files.$$
+
########
# CLEAN
########