contrib: buildrpm checking of md5 checksums of downloaded Python and Docutils
authorMads Kiilerich <madski@unity3d.com>
Sat, 18 Oct 2014 21:48:38 +0200
changeset 23141 a440166d03fc
parent 23140 fbd79c2552a6
child 23142 c4ce077588d0
contrib: buildrpm checking of md5 checksums of downloaded Python and Docutils
contrib/buildrpm
contrib/mercurial.spec
--- a/contrib/buildrpm	Sun Nov 02 16:39:02 2014 +0100
+++ b/contrib/buildrpm	Sat Oct 18 21:48:38 2014 +0200
@@ -18,6 +18,7 @@
     --withpython | --with-python)
         shift
         PYTHONVER=2.7.8
+        PYTHONMD5=d4bca0159acb0b44a781292b5231936f
         ;;
     --rpmbuilddir )
         shift
@@ -76,11 +77,18 @@
     cd build
     PYTHON_SRCFILE=Python-$PYTHONVER.tgz
     [ -f $PYTHON_SRCFILE ] || curl -Lo $PYTHON_SRCFILE http://www.python.org/ftp/python/$PYTHONVER/$PYTHON_SRCFILE
+    if [ "$PYTHONMD5" ]; then
+        echo "$PYTHONMD5 $PYTHON_SRCFILE" | md5sum -w -c
+    fi
     ln -f $PYTHON_SRCFILE $RPMBUILDDIR/SOURCES/$PYTHON_SRCFILE
 
     DOCUTILSVER=`sed -ne "s/^%global docutilsname docutils-//p" $specfile`
     DOCUTILS_SRCFILE=docutils-$DOCUTILSVER.tar.gz
     [ -f $DOCUTILS_SRCFILE ] || curl -Lo $DOCUTILS_SRCFILE http://downloads.sourceforge.net/project/docutils/docutils/$DOCUTILSVER/$DOCUTILS_SRCFILE
+    DOCUTILSMD5=`sed -ne "s/^%global docutilsmd5 //p" $specfile`
+    if [ "$DOCUTILSMD5" ]; then
+        echo "$DOCUTILSMD5 $DOCUTILS_SRCFILE" | md5sum -w -c
+    fi
     ln -f $DOCUTILS_SRCFILE $RPMBUILDDIR/SOURCES/$DOCUTILS_SRCFILE
 )
 fi
--- a/contrib/mercurial.spec	Sun Nov 02 16:39:02 2014 +0100
+++ b/contrib/mercurial.spec	Sat Oct 18 21:48:38 2014 +0200
@@ -7,6 +7,7 @@
 %global pythonver %{withpython}
 %global pythonname Python-%{withpython}
 %global docutilsname docutils-0.12
+%global docutilsmd5 4622263b62c5c771c03502afa3157768
 %global pythonhg python-hg
 %global hgpyprefix /usr/%{pythonhg}
 # byte compilation will fail on some some Python /test/ files