From 1014d88286497487542527e869d6579fa48fe686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Nov 2017 08:59:41 +0100 Subject: [PATCH] Update to 3.2.1 Patches which were upstreamed are dropped. --- .gitignore | 1 + 0001-hydra-improve-localhost-detection.patch | 163 ------------------ ...pm-remshell-include-MPL-when-linking.patch | 32 ---- ...-pm-gforker-include-MPL-when-linking.patch | 13 -- mpich.spec | 13 +- sources | 2 +- 6 files changed, 8 insertions(+), 216 deletions(-) delete mode 100644 0001-hydra-improve-localhost-detection.patch delete mode 100644 0001-pm-remshell-include-MPL-when-linking.patch delete mode 100644 0002-pm-gforker-include-MPL-when-linking.patch diff --git a/.gitignore b/.gitignore index f1a6732..80e0efc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /mpich-3.1.tar.gz /mpich-3.1.4.tar.gz /mpich-3.2.tar.gz +/mpich-3.2.1.tar.gz diff --git a/0001-hydra-improve-localhost-detection.patch b/0001-hydra-improve-localhost-detection.patch deleted file mode 100644 index ce46d98..0000000 --- a/0001-hydra-improve-localhost-detection.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 305dad8388ea27b4d1bf1202e90ad6947ae0ab26 Mon Sep 17 00:00:00 2001 -From: Pavan Balaji -Date: Thu, 21 Jan 2016 17:01:42 -0600 -Subject: [PATCH] hydra: improve localhost detection. - -Be more forgiving for systems that do not resolve "localhost" or -equivalent names very well (e.g., they are not added to /etc/hosts). -Try them out, and if nothing works, fallback to "is not local" mode. - -Thanks to Orion Poplawski for the suggestion. ---- - src/pm/hydra/utils/sock/sock.c | 89 +++++++++++++++++++++++------------------- - 1 file changed, 48 insertions(+), 41 deletions(-) - -diff --git a/src/pm/hydra/utils/sock/sock.c b/src/pm/hydra/utils/sock/sock.c -index 86b25077aac2..dc56c767f544 100644 ---- a/src/pm/hydra/utils/sock/sock.c -+++ b/src/pm/hydra/utils/sock/sock.c -@@ -492,7 +492,7 @@ HYD_status HYDU_sock_get_iface_ip(char *iface, char **ip) - HYD_status HYDU_sock_is_local(char *host, int *is_local) - { - struct hostent *ht; -- char *host_ip = NULL, *local_ip = NULL, *lhost_ip = NULL; -+ char *host_ip = NULL, *lhost_ip = NULL; - char lhost[MAX_HOSTNAME_LEN]; - struct sockaddr_in sa; - struct ifaddrs *ifaddr, *ifa; -@@ -516,54 +516,63 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local) - - /* STEP 1: If "host" matches the local host name, return */ - if (gethostname(lhost, MAX_HOSTNAME_LEN) < 0) { -- HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "gethostname returned an error\n"); -+ /* We can't figure out what my localhost name is. *sigh*. We -+ * could return an error here, but we will just punt it to the -+ * upper layer saying that we don't know if it is local. We -+ * cannot try steps 2 and 3 either, since we don't have our -+ * local hostname. */ -+ goto fn_exit; - } - else if (!strcmp(lhost, host)) { - *is_local = 1; - goto fn_exit; - } -+ else { -+ /* we have our local hostname, but that does not match the -+ * provided hostname. Let's try to get our remote IP address -+ * first. If we can't get that, we can give up. */ -+ /* If we are unable to resolve the remote host name, it need -+ * not be an error. It could mean that the user is using an -+ * alias for the hostname (e.g., an ssh config alias) */ -+ if ((ht = gethostbyname(host)) == NULL) -+ goto fn_exit; - -+ memset((char *) &sa, 0, sizeof(struct sockaddr_in)); -+ memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length); - -- /* STEP 2: If the IP address associated with "host" and the IP address local -- * host resolves to match, return */ -- -- if ((ht = gethostbyname(lhost)) == NULL) { -- HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "gethostbyname error on %s: %s\n", -- lhost, hstrerror(h_errno)); -+ /* Find the IP address of the host */ -+ host_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf, -+ MAX_HOSTNAME_LEN)); -+ HYDU_ASSERT(host_ip, status); - } - -- memset((char *) &sa, 0, sizeof(struct sockaddr_in)); -- memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length); -- -- /* Find the IP address of the host */ -- lhost_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf, -- MAX_HOSTNAME_LEN)); -- HYDU_ASSERT(lhost_ip, status); -+ /* OK, if we are here, we got the remote IP. We have two ways of -+ * getting the local IP: gethostbyname or getifaddrs. We'll try -+ * both. */ - -- /* If we are unable to resolve the remote host name, it need not be an -- * error. It could mean that the user is using an alias for the hostname -- * (e.g., an ssh config alias) */ -- if ((ht = gethostbyname(host)) == NULL) -- goto fn_exit; -+ /* STEP 2: Let's try the gethostbyname model */ - -- memset((char *) &sa, 0, sizeof(struct sockaddr_in)); -- memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length); -+ if ((ht = gethostbyname(lhost))) { -+ memset((char *) &sa, 0, sizeof(struct sockaddr_in)); -+ memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length); - -- /* Find the IP address of the host */ -- host_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf, -- MAX_HOSTNAME_LEN)); -- HYDU_ASSERT(host_ip, status); -+ /* Find the IP address of the host */ -+ lhost_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf, -+ MAX_HOSTNAME_LEN)); -+ HYDU_ASSERT(lhost_ip, status); - -- /* See if the IP address of the hostname we got matches the IP address -- * to which the local host resolves */ -- if (!strcmp(lhost_ip, host_ip)) { -- *is_local = 1; -- goto fn_exit; -+ /* See if the IP address of the hostname we got matches the IP -+ * address to which the local host resolves */ -+ if (!strcmp(lhost_ip, host_ip)) { -+ *is_local = 1; -+ goto fn_exit; -+ } - } - -+ /* Either gethostbyname didn't resolve or we didn't find a match. -+ * Either way, let's try the getifaddr model. */ - -- /* STEP 3: Find all local IP addresses and try to match the host IP -- * with it. */ -+ /* STEP 3: Let's try the getifaddr model */ - - if (getifaddrs(&ifaddr) == -1) - HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "getifaddrs failed\n"); -@@ -573,21 +582,21 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local) - if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) { - struct sockaddr_in *sa_ptr = (struct sockaddr_in *) ifa->ifa_addr; - -- local_ip = HYDU_strdup((char *) -+ lhost_ip = HYDU_strdup((char *) - inet_ntop(AF_INET, (const void *) &(sa_ptr->sin_addr), buf, - MAX_HOSTNAME_LEN)); -- HYDU_ASSERT(local_ip, status); -+ HYDU_ASSERT(lhost_ip, status); - -- /* STEP 3: For each local IP address, see if it matches the "host" -+ /* For each local IP address, see if it matches the "host" - * IP address */ -- if (!strcmp(host_ip, local_ip)) { -+ if (!strcmp(host_ip, lhost_ip)) { - *is_local = 1; - freeifaddrs(ifaddr); - goto fn_exit; - } - -- HYDU_FREE(local_ip); -- local_ip = NULL; -+ HYDU_FREE(lhost_ip); -+ lhost_ip = NULL; - } - } - -@@ -596,8 +605,6 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local) - fn_exit: - if (host_ip) - HYDU_FREE(host_ip); -- if (local_ip) -- HYDU_FREE(local_ip); - if (lhost_ip) - HYDU_FREE(lhost_ip); - return status; --- -1.9.1 - diff --git a/0001-pm-remshell-include-MPL-when-linking.patch b/0001-pm-remshell-include-MPL-when-linking.patch deleted file mode 100644 index c200c48..0000000 --- a/0001-pm-remshell-include-MPL-when-linking.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d3d7f0d571607c3547396045093c77364cfaec0b Mon Sep 17 00:00:00 2001 -From: Ken Raffenetti -Date: Fri, 28 Aug 2015 14:28:37 -0700 -Subject: [PATCH] pm/remshell: include MPL when linking - ---- - src/pm/remshell/Makefile.mk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/pm/remshell/Makefile.mk b/src/pm/remshell/Makefile.mk -index ea366a9e..0ec937d9 100644 ---- a/src/pm/remshell/Makefile.mk -+++ b/src/pm/remshell/Makefile.mk -@@ -16,13 +16,13 @@ if BUILD_PM_REMSHELL - if PRIMARY_PM_REMSHELL - bin_PROGRAMS += src/pm/remshell/mpiexec - src_pm_remshell_mpiexec_SOURCES = src/pm/remshell/mpiexec.c --src_pm_remshell_mpiexec_LDADD = src/pm/util/libmpiexec.a -+src_pm_remshell_mpiexec_LDADD = src/pm/util/libmpiexec.a $(mpllib) - # we may not want to add AM_CPPFLAGS for this program - src_pm_remshell_mpiexec_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) - else !PRIMARY_PM_REMSHELL - bin_PROGRAMS += src/pm/remshell/mpiexec.remshell - src_pm_remshell_mpiexec_remshell_SOURCES = src/pm/remshell/mpiexec.c --src_pm_remshell_mpiexec_remshell_LDADD = src/pm/util/libmpiexec.a -+src_pm_remshell_mpiexec_remshell_LDADD = src/pm/util/libmpiexec.a $(mpllib) - # we may not want to add AM_CPPFLAGS for this program - src_pm_remshell_mpiexec_remshell_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) - endif !PRIMARY_PM_REMSHELL --- -1.9.1 - diff --git a/0002-pm-gforker-include-MPL-when-linking.patch b/0002-pm-gforker-include-MPL-when-linking.patch deleted file mode 100644 index d7ca01d..0000000 --- a/0002-pm-gforker-include-MPL-when-linking.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git mpich-3.2/src/pm/gforker/Makefile.mk~ mpich-3.2/src/pm/gforker/Makefile.mk -index 3a156057b9..afb7b41a01 100644 ---- mpich-3.2/src/pm/gforker/Makefile.mk~ -+++ mpich-3.2/src/pm/gforker/Makefile.mk -@@ -22,7 +22,7 @@ src_pm_gforker_mpiexec_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) - else !PRIMARY_PM_GFORKER - bin_PROGRAMS += src/pm/gforker/mpiexec.gforker - src_pm_gforker_mpiexec_gforker_SOURCES = src/pm/gforker/mpiexec.c --src_pm_gforker_mpiexec_gforker_LDADD = src/pm/util/libmpiexec.a -+src_pm_gforker_mpiexec_gforker_LDADD = src/pm/util/libmpiexec.a $(mpllib) - # we may not want to add AM_CPPFLAGS for this program - src_pm_gforker_mpiexec_gforker_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) - endif !PRIMARY_PM_GFORKER diff --git a/mpich.spec b/mpich.spec index 5358778..ddd027f 100644 --- a/mpich.spec +++ b/mpich.spec @@ -1,9 +1,8 @@ Summary: A high-performance implementation of MPI Name: mpich -Version: 3.2 -Release: 10%{?dist} +Version: 3.2.1 +Release: 1%{?dist} License: MIT -Group: Development/Libraries URL: http://www.mpich.org/ Source0: http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz @@ -11,10 +10,7 @@ Source1: mpich.macros Source2: mpich.pth.py2 Source3: mpich.pth.py3 Patch0: mpich-modules.patch -Patch1: https://trac.mpich.org/projects/mpich/raw-attachment/ticket/2299/0001-pm-remshell-include-MPL-when-linking.patch -Patch2: 0002-pm-gforker-include-MPL-when-linking.patch Patch3: 0003-soften-version-check.patch -Patch4: 0001-hydra-improve-localhost-detection.patch BuildRequires: gcc-gfortran BuildRequires: hwloc-devel >= 1.8 @@ -174,7 +170,7 @@ mpich support for Python 3. #Try and work around 'unused-direct-shlib-dependency' rpmlint warnning sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -make %{?_smp_mflags} VERBOSE=1 +%make_build VERBOSE=1 %install %make_install @@ -256,6 +252,9 @@ make check VERBOSE=1 %{python3_sitearch}/%{name}.pth %changelog +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-1 +- Update to latest bugfix release (#1512188) + * Thu Aug 03 2017 Fedora Release Engineering - 3.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index 6ca4e2b..ecf8934 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f414cfa77099cd1fa1a5ae4e22db508a mpich-3.2.tar.gz +SHA512 (mpich-3.2.1.tar.gz) = 659a11cf02302f27eb1db77667dd4c7a4f8008b1d73f5f0f0f28ee6b5d9cca2130bac3d010a132136ba15a25a738ec9cbda67255133aeb42f0d82a2ded23d23d