diff -u mpich2-1.2/debian/libmpich2-dev.postinst mpich2-1.2/debian/libmpich2-dev.postinst --- mpich2-1.2/debian/libmpich2-dev.postinst +++ mpich2-1.2/debian/libmpich2-dev.postinst @@ -2,8 +2,21 @@ set -e +case "$1" in + configure) + # Continue below + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0; + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0; + ;; +esac + update-alternatives \ - --install /usr/include/mpi mpi /usr/include/mpich2 5 \ + --install /usr/include/mpi mpi /usr/include/mpich2 40 \ --slave /usr/lib/libmpi.so libmpi.so /usr/lib/libmpich.so \ --slave /usr/lib/libmpi++.so libmpi++.so /usr/lib/libmpichcxx.so \ --slave /usr/bin/mpicc mpicc /usr/bin/mpicc.mpich2 \ diff -u mpich2-1.2/debian/changelog mpich2-1.2/debian/changelog --- mpich2-1.2/debian/changelog +++ mpich2-1.2/debian/changelog @@ -1,3 +1,18 @@ +mpich2 (1.2-1ubuntu1.1) karmic-proposed; urgency=low + + * The package uploaded just before the karmic release was done in a + hurry. This update fixes several issues that were missed at the time. + + Suggest mpich2-doc instead of Recommending it. Makes it easier to + co-install with other MPI implementations. + + Conflict with mpd (Debian bug #551932). + + Fix alternatives mess introduced by openmpi and copied into mpich2. + (Debian bug #552429). LP: #460728 + + Binaries names are hardcoded in some places. We remove the .py + suffix for all of them, but did not fix all the occurences of the + binaries names. LP: #488109 + + -- Lucas Nussbaum Sat, 12 Dec 2009 22:20:08 +0100 + mpich2 (1.2-1ubuntu1) karmic; urgency=low * Previous Debian packaging (sync'd from Debian mentors) has been diff -u mpich2-1.2/debian/control mpich2-1.2/debian/control --- mpich2-1.2/debian/control +++ mpich2-1.2/debian/control @@ -13,7 +13,9 @@ Package: mpich2 Architecture: any Depends: libmpich2-1.2 (= ${binary:Version}), ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} -Recommends: mpich2-doc (= ${source:Version}), libmpich2-dev (= ${binary:Version}) +Recommends: libmpich2-dev (= ${binary:Version}) +Suggests: mpich2-doc (= ${source:Version}) +Conflicts: mpd Description: Implementation of the MPI Message Passing Interface standard MPICH2 is a high-performance and widely portable implementation of the Message Passing Interface (MPI) standard (both MPI-1 and MPI-2). It diff -u mpich2-1.2/debian/mpich2.postinst mpich2-1.2/debian/mpich2.postinst --- mpich2-1.2/debian/mpich2.postinst +++ mpich2-1.2/debian/mpich2.postinst @@ -2,12 +2,38 @@ set -e -update-alternatives \ - --install /usr/bin/mpirun mpirun /usr/bin/mpirun.mpich2 5 \ - --slave /usr/share/man/man1/mpirun.1.gz mpirun.1.gz /usr/share/man/man1/mpirun.mpich2.1.gz +case "$1" in + configure) + # Continue below + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0; + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0; + ;; +esac + +# so, we are running with $1 = configure +# mpich2 versions before 1.2.1~rc1-1 were using two alternatives where other +# MPI implementations were using only one, which breaks. Clean up +# our mess. +# SRU special: use 1.2-1ubuntu1, not 1.2.1~rc1-1, and add || true +if [ "$2" != "" ] && dpkg --compare-versions "$2" le "1.2-1ubuntu1"; then + update-alternatives --remove mpiexec /usr/bin/mpiexec.mpich2 || true +fi +if update-alternatives --list mpiexec > /dev/null 2>&1; then + # OK, that case sucks. Apparently, we still have a mpiexec alternative, maybe + # from a different package (like openmpi). In that case, the only thing we + # can do is --remove-all... + update-alternatives --remove-all mpiexec +fi update-alternatives \ - --install /usr/bin/mpiexec mpiexec /usr/bin/mpiexec.mpich2 5 \ + --install /usr/bin/mpirun mpirun /usr/bin/mpirun.mpich2 40 \ + --slave /usr/share/man/man1/mpirun.1.gz mpirun.1.gz /usr/share/man/man1/mpirun.mpich2.1.gz \ + --slave /usr/bin/mpiexec mpiexec /usr/bin/mpiexec.mpich2 \ --slave /usr/share/man/man1/mpiexec.1.gz mpiexec.1.gz /usr/share/man/man1/mpiexec.mpich2.1.gz #DEBHELPER# diff -u mpich2-1.2/debian/mpich2.prerm mpich2-1.2/debian/mpich2.prerm --- mpich2-1.2/debian/mpich2.prerm +++ mpich2-1.2/debian/mpich2.prerm @@ -4,7 +4,6 @@ if [ "$1" != "upgrade" ]; then update-alternatives --remove mpirun /usr/bin/mpirun.mpich2 - update-alternatives --remove mpiexec /usr/bin/mpiexec.mpich2 fi #DEBHELPER# only in patch2: unchanged: --- mpich2-1.2.orig/debian/patches/binaries-without-suffix.patch +++ mpich2-1.2/debian/patches/binaries-without-suffix.patch @@ -0,0 +1,151 @@ +From: Lucas Nussbaum +Subject: Remove .py suffix from binaries + +In Debian, we have a policy of not using language-specific suffixes in +/usr/bin. As a result, mpd* binaries are in /usr/share/mpich2, and +symlinks without .py are put in /usr/bin. But as the result, mpd* look for +the wrong filename in /usr/bin. + +Origin: vendor +Forwarded: yes +--- a/src/pm/mpd/mpd.py ++++ b/src/pm/mpd/mpd.py +@@ -1603,7 +1603,7 @@ class MPD(object): + # python_executable = '\Python24\python.exe' + python_executable = 'python2.4' + fullDirName = man_env['MPDMAN_FULLPATHDIR'] +- manCmd = os.path.join(fullDirName,'mpdman.py') ++ manCmd = os.path.join(fullDirName,'mpdman') + runner = subprocess.Popen([python_executable,'-u',manCmd], # only one 'python' arg + bufsize=0, + env=man_env, +--- a/src/pm/mpd/mpdboot.py ++++ b/src/pm/mpd/mpdboot.py +@@ -76,7 +76,7 @@ def mpdboot(): + fullDirName = path.abspath(path.split(argv[0])[0]) + rshCmd = 'ssh' + user = mpd_get_my_username() +- mpdCmd = path.join(fullDirName,'mpd.py') ++ mpdCmd = path.join(fullDirName,'mpd') + hostsFilename = 'mpd.hosts' + totalnumToStart = 1 # may get chgd below + debug = 0 +@@ -268,7 +268,7 @@ def mpdboot(): + + try: + # stop current (if any) mpds; ignore the output +- getoutput('%s/mpdallexit.py' % (fullDirName)) ++ getoutput('%s/mpdallexit' % (fullDirName)) + if verbose or debug: + print 'running mpdallexit on %s' % (myHost) + except: +@@ -407,20 +407,20 @@ def handle_mpd_output(fd,fd2idx,hostsAnd + (host,msg) ) + tempOut = tempSock.recv(1000) + print tempOut +- try: getoutput('%s/mpdallexit.py' % (fullDirName)) ++ try: getoutput('%s/mpdallexit' % (fullDirName)) + except: pass + exit(-1) + tempSock.close() + else: + mpd_print(1,'failed to connect to mpd on %s' % (host) ) +- try: getoutput('%s/mpdallexit.py' % (fullDirName)) ++ try: getoutput('%s/mpdallexit' % (fullDirName)) + except: pass + exit(-1) + else: + mpd_print(1,'from mpd on %s, invalid port info:' % (host) ) + print port + print fd.read() +- try: getoutput('%s/mpdallexit.py' % (fullDirName)) ++ try: getoutput('%s/mpdallexit' % (fullDirName)) + except: pass + exit(-1) + if verbose: +--- a/src/pm/mpd/mpdcheck.py ++++ b/src/pm/mpd/mpdcheck.py +@@ -461,7 +461,7 @@ if __name__ == '__main__': # so I can + + # see if we can run mpdcheck on remote hosts + for host in hostsFromFile: +- cmd1 = path.join(fullDirName,'mpdcheck.py') + ' -s' ++ cmd1 = path.join(fullDirName,'mpdcheck') + ' -s' + if verbose: + print 'starting server: %s' % (cmd1) + runner1 = Popen3(cmd1,1,0) +@@ -520,7 +520,7 @@ if __name__ == '__main__': # so I can + except: + pass + exit(-1) +- cmd2 = "ssh %s -x -n %s%smpdcheck.py -c %s %s" % (host,fullDirName,path.sep,fqhn1,port) ++ cmd2 = "ssh %s -x -n %s%smpdcheck -c %s %s" % (host,fullDirName,path.sep,fqhn1,port) + if verbose: + print 'starting client: %s' % (cmd2) + runner2 = Popen3(cmd2,1,0) +--- a/src/pm/mpd/mpdchkpyver.py ++++ b/src/pm/mpd/mpdchkpyver.py +@@ -37,7 +37,7 @@ if __name__ == '__main__': + print "mpdchkpyver: your python version must be >= 2.2 ; current version is:", vinfo + exit(-1) + if len(argv) > 1: +- mpdpgm = argv[1] + '.py' ++ mpdpgm = argv[1] + # print "CHKPYVER: PGM=:%s: ARGV[1:]=:%s:" % (mpdpgm,argv[1:]) + try: + execvpe(mpdpgm,argv[1:],environ) # client +--- a/src/pm/mpd/mpdman.py ++++ b/src/pm/mpd/mpdman.py +@@ -1485,7 +1485,7 @@ class MPDMan(object): + mpd_print(0000, 'execing clientPgm=:%s:' % (self.clientPgm) ) + if self.gdb: + fullDirName = os.environ['MPDMAN_FULLPATHDIR'] +- gdbdrv = os.path.join(fullDirName,'mpdgdbdrv.py') ++ gdbdrv = os.path.join(fullDirName,'mpdgdbdrv') + if not os.access(gdbdrv,os.X_OK): + print 'mpdman: cannot execute mpdgdbdrv %s' % gdbdrv + sys.exit(0); +@@ -1524,7 +1524,7 @@ class MPDMan(object): + # python_executable = '\Python24\python.exe' + python_executable = 'python2.4' + fullDirName = os.environ['MPDMAN_FULLPATHDIR'] +- mpdwrapcli = os.path.join(fullDirName,'mpdwrapcli.py') ++ mpdwrapcli = os.path.join(fullDirName,'mpdwrapcli') + wrapCmdAndArgs = [ mpdwrapcli, str(tempListenPort), + self.clientPgm, self.clientPgm ] + self.clientPgmArgs + cli_env.update(os.environ) ###### RMB: MAY NEED VARS OTHER THAN PATH ????? +--- a/src/pm/mpd/newboot.py ++++ b/src/pm/mpd/newboot.py +@@ -64,7 +64,7 @@ def mpdboot(): + fullDirName = path.abspath(path.split(argv[0])[0]) + rshCmd = 'ssh' + user = mpd_get_my_username() +- mpdCmd = path.join(fullDirName,'mpd.py') ++ mpdCmd = path.join(fullDirName,'mpd') + hostsFilename = 'mpd.hosts' + totalnumToStart = 0 + debug = 0 +@@ -345,20 +345,20 @@ def handle_mpd_output(fd,fd2idx,hostsAnd + mpd_print(1,'failed to handshake mpd on %s; recvd output=%s' % (host,msg) ) + tempOut = tempSock.recv(1000) + print tempOut +- try: getoutput('%s/mpdallexit.py' % (fullDirName)) ++ try: getoutput('%s/mpdallexit' % (fullDirName)) + except: pass + exit(-1) + tempSock.close() + else: + mpd_print(1,'failed to connect to mpd on %s' % (host) ) +- try: getoutput('%s/mpdallexit.py' % (fullDirName)) ++ try: getoutput('%s/mpdallexit' % (fullDirName)) + except: pass + exit(-1) + else: + mpd_print(1,'from mpd on %s, invalid port info:' % (host) ) + print port + print fd.read() +- try: getoutput('%s/mpdallexit.py' % (fullDirName)) ++ try: getoutput('%s/mpdallexit' % (fullDirName)) + except: pass + exit(-1) + if verbose: