Received: from cairanne.iap.fr (cairanne.iap.fr [194.167.0.198])
	by milliways.osl.iu.edu (8.13.1/8.13.1/IUCS_2.97) with ESMTP id
	q4UL6Tt8028362
	for <users@open-mpi.org>; Wed, 30 May 2012 17:06:32 -0400
Received: from ver60-1-88-167-236-85.fbx.proxad.net ([88.167.236.85]
	helo=bigegg.iap.fr)
	by cairanne.iap.fr with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.72) (envelope-from <rouberol@iap.fr>) id 1SZq68-0003oO-1m
	for users@open-mpi.org; Wed, 30 May 2012 23:06:28 +0200
Message-ID: <4FC68C3A.6090507@iap.fr>
Date: Wed, 30 May 2012 23:08:10 +0200
From: Stephane Rouberol <rouberol@iap.fr>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:12.0) Gecko/20120421 Thunderbird/12.0
MIME-Version: 1.0
To: users@open-mpi.org
Subject: Building openmpi from src rpm: rpmbuild errors with 'cpio: MD5 sum
	mismatch' (since openmpi 1.4.5)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379,
	Antispam-Data: 2012.5.30.205415
X-PerlMx-Spam: Gauge=IIIIIIII, Probability=8%, Report='
	HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0,
	BODY_SIZE_1300_1399 0, BODY_SIZE_2000_LESS 0,
	BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0,
	__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0,
	__MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0,
	__SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0,
	__URI_NO_MAILTO 0, __URI_NO_PATH 0, __URI_NO_WWW 0,
	__USER_AGENT 0'

Hi
Since 1.4.5 openmpi release, it is no longer possible to build openmpi 
binary with rpmbuild --rebuild if system rpm package version is 4.4.x, 
like in SLES10, SLES11, RHEL/CentOS 5.x.

For instance, on CentOS 5.8 with rpm 4.4.2.3-28.el5_8:

[root@horizon _tmp]# rpmbuild --rebuild openmpi-1.4.5-1.src.rpm
Installing openmpi-1.4.5-1.src.rpm
warning: user jsquyres does not exist - using root
error: unpacking of archive failed on file 
/usr/src/redhat/SPECS/openmpi-1.4.5.spec;4fc65c74: cpio: MD5 sum mismatch
error: openmpi-1.4.5-1.src.rpm cannot be installed

Apparently this problem is due to lack of support of SHA-256 in rpm 4.4.x

Googling suggests
   rpmbuild -bs \
    --define "_source_filedigest_algorithm md5" \
    --define "_binary_filedigest_algorithm md5" \
    package.spec
should be used to produce openmpi src rpms and avoid the problem.

Please note that
- rpmbuild works OK on RHEL/CentOS 5.x with openmpi-1.4.4-1.src.rpm and 
all previous versions
- rpmbuild works OK on with all openmpi versions with rpm 4.8.x from 
RHEL/CentOS 6.x
- I successfully tested 2 workarounds
1) install package with --nomd5, then rpmbuild -ba <specfile>
2) repackage with "old" rpm
rpm2cpio to extract spec file + sources tar
rpmbuild -bs <specfile> to produce new src rpm
Then rpmbuild --rebuild is OK

Regards,
Stephane Rouberol


