commit 529b7270f0b9737c4af0b5367c38073345771b1a Author: MSVSphere Packaging Team Date: Fri Mar 29 16:11:37 2024 +0300 import pmix-2.2.5-3.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f6e02fd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pmix-2.2.5.tar.bz2 diff --git a/.pmix.metadata b/.pmix.metadata new file mode 100644 index 0000000..c1041c0 --- /dev/null +++ b/.pmix.metadata @@ -0,0 +1 @@ +57cb32a8b621c0147df0947b50e1ddda4254dabc SOURCES/pmix-2.2.5.tar.bz2 diff --git a/SOURCES/0001-Do-not-follow-links-when-doing-chown.patch b/SOURCES/0001-Do-not-follow-links-when-doing-chown.patch new file mode 100644 index 0000000..fe5b886 --- /dev/null +++ b/SOURCES/0001-Do-not-follow-links-when-doing-chown.patch @@ -0,0 +1,119 @@ +From 085f1d8ec56b3fe81ef3a0994d156ddf83342f49 Mon Sep 17 00:00:00 2001 +From: Ralph Castain +Date: Thu, 7 Sep 2023 07:59:57 -0600 +Subject: [PATCH] Do not follow links when doing "chown" + +There is a potential issue with allowing a "chown" operation +to follow user-created links, so let's limit any use of that +function to "lchown" - which directs the "chown" operation to +NOT follow a link. + +Signed-off-by: Ralph Castain +(cherry picked from commit ae62cdf67b19e80fd821420816f09bf0a56a8166) +(cherry picked from commit da036933c2795c1f40d0835e15f17e204e4daf0f) +Signed-off-by: Kamal Heib +--- + src/mca/common/dstore/dstore_base.c | 4 ++-- + src/mca/common/dstore/dstore_segment.c | 4 ++-- + src/mca/gds/ds12/gds_ds12_lock_fcntl.c | 2 +- + src/mca/gds/ds12/gds_ds12_lock_pthread.c | 2 +- + src/mca/ptl/usock/ptl_usock_component.c | 6 +++--- + 5 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/mca/common/dstore/dstore_base.c b/src/mca/common/dstore/dstore_base.c +index 5568c9434778..68eeabdbc4d7 100644 +--- a/src/mca/common/dstore/dstore_base.c ++++ b/src/mca/common/dstore/dstore_base.c +@@ -525,7 +525,7 @@ static int _esh_session_init(pmix_common_dstore_ctx_t *ds_ctx, size_t idx, ns_ma + } + } + if (s->setjobuid > 0){ +- if (0 > chown(s->nspace_path, (uid_t) s->jobuid, (gid_t) -1)){ ++ if (0 > lchown(s->nspace_path, (uid_t) s->jobuid, (gid_t) -1)){ + rc = PMIX_ERROR; + PMIX_ERROR_LOG(rc); + return rc; +@@ -1661,7 +1661,7 @@ pmix_common_dstore_ctx_t *pmix_common_dstor_init(const char *ds_name, pmix_info_ + } + } + if (ds_ctx->setjobuid > 0) { +- if (chown(ds_ctx->base_path, (uid_t) ds_ctx->jobuid, (gid_t) -1) < 0){ ++ if (lchown(ds_ctx->base_path, (uid_t) ds_ctx->jobuid, (gid_t) -1) < 0){ + rc = PMIX_ERR_NO_PERMISSIONS; + PMIX_ERROR_LOG(rc); + goto err_exit; +diff --git a/src/mca/common/dstore/dstore_segment.c b/src/mca/common/dstore/dstore_segment.c +index a219bed9c0bf..4a7c55ea9c8f 100644 +--- a/src/mca/common/dstore/dstore_segment.c ++++ b/src/mca/common/dstore/dstore_segment.c +@@ -109,7 +109,7 @@ PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_create_new_lock_seg(const + + if (setuid > 0){ + rc = PMIX_ERR_PERM; +- if (0 > chown(file_name, (uid_t) uid, (gid_t) -1)){ ++ if (0 > lchown(file_name, (uid_t) uid, (gid_t) -1)){ + PMIX_ERROR_LOG(rc); + goto err_exit; + } +@@ -200,7 +200,7 @@ PMIX_EXPORT pmix_dstore_seg_desc_t *pmix_common_dstor_create_new_segment(pmix_ds + + if (setuid > 0){ + rc = PMIX_ERR_PERM; +- if (0 > chown(file_name, (uid_t) uid, (gid_t) -1)){ ++ if (0 > lchown(file_name, (uid_t) uid, (gid_t) -1)){ + PMIX_ERROR_LOG(rc); + goto err_exit; + } +diff --git a/src/mca/gds/ds12/gds_ds12_lock_fcntl.c b/src/mca/gds/ds12/gds_ds12_lock_fcntl.c +index 759bf4093747..515b3298136f 100644 +--- a/src/mca/gds/ds12/gds_ds12_lock_fcntl.c ++++ b/src/mca/gds/ds12/gds_ds12_lock_fcntl.c +@@ -127,7 +127,7 @@ pmix_status_t pmix_gds_ds12_lock_init(pmix_common_dstor_lock_ctx_t *ctx, const c + } + } + if (0 != setuid) { +- if (0 > chown(lock_ctx->lockfile, uid, (gid_t) -1)) { ++ if (0 > lchown(lock_ctx->lockfile, uid, (gid_t) -1)) { + rc = PMIX_ERROR; + PMIX_ERROR_LOG(rc); + goto error; +diff --git a/src/mca/gds/ds12/gds_ds12_lock_pthread.c b/src/mca/gds/ds12/gds_ds12_lock_pthread.c +index 1c9e9b79bb3e..fe7e64be4194 100644 +--- a/src/mca/gds/ds12/gds_ds12_lock_pthread.c ++++ b/src/mca/gds/ds12/gds_ds12_lock_pthread.c +@@ -113,7 +113,7 @@ pmix_status_t pmix_gds_ds12_lock_init(pmix_common_dstor_lock_ctx_t *ctx, const c + } + memset(lock_ctx->segment->seg_base_addr, 0, size); + if (0 != setuid) { +- if (0 > chown(lock_ctx->lockfile, (uid_t) uid, (gid_t) -1)){ ++ if (0 > lchown(lock_ctx->lockfile, (uid_t) uid, (gid_t) -1)){ + rc = PMIX_ERROR; + PMIX_ERROR_LOG(rc); + goto error; +diff --git a/src/mca/ptl/usock/ptl_usock_component.c b/src/mca/ptl/usock/ptl_usock_component.c +index f65d49ffde79..a6c1fdb496b3 100644 +--- a/src/mca/ptl/usock/ptl_usock_component.c ++++ b/src/mca/ptl/usock/ptl_usock_component.c +@@ -276,16 +276,16 @@ static pmix_status_t setup_listener(pmix_info_t info[], size_t ninfo, + CLOSE_THE_SOCKET(lt->socket); + goto sockerror; + } +- /* chown as required */ ++ /* lchown as required */ + if (lt->owner_given) { +- if (0 != chown(address->sun_path, lt->owner, -1)) { ++ if (0 != lchown(address->sun_path, lt->owner, -1)) { + pmix_output(0, "CANNOT CHOWN socket %s: %s", address->sun_path, strerror (errno)); + CLOSE_THE_SOCKET(lt->socket); + goto sockerror; + } + } + if (lt->group_given) { +- if (0 != chown(address->sun_path, -1, lt->group)) { ++ if (0 != lchown(address->sun_path, -1, lt->group)) { + pmix_output(0, "CANNOT CHOWN socket %s: %s", address->sun_path, strerror (errno)); + CLOSE_THE_SOCKET(lt->socket); + goto sockerror; +-- +2.41.0 + diff --git a/SPECS/pmix.spec b/SPECS/pmix.spec new file mode 100644 index 0000000..95bd713 --- /dev/null +++ b/SPECS/pmix.spec @@ -0,0 +1,256 @@ +Name: pmix +Version: 2.2.5 +Release: 3%{?dist} +Summary: Process Management Interface Exascale (PMIx) +License: BSD +URL: https://pmix.org/ +Source0: https://github.com/pmix/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 + +Patch1: 0001-Do-not-follow-links-when-doing-chown.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: environment(modules) +BuildRequires: flex +BuildRequires: gcc +BuildRequires: libevent-devel +BuildRequires: libtool +BuildRequires: perl-interpreter +BuildRequires: pkgconf +BuildRequires: pkgconfig(hwloc) +BuildRequires: pkgconfig(munge) + +Provides: pmi +Requires: environment(modules) + +%description +The Process Management Interface (PMI) has been used for quite some time as +a means of exchanging wireup information needed for interprocess +communication. Two versions (PMI-1 and PMI-2) have been released as part of +the MPICH effort. While PMI-2 demonstrates better scaling properties than its +PMI-1 predecessor, attaining rapid launch and wireup of the roughly 1M +processes executing across 100k nodes expected for exascale operations remains +challenging. + +PMI Exascale (PMIx) represents an attempt to resolve these questions by +providing an extended version of the PMI standard specifically designed to +support clusters up to and including exascale sizes. The overall objective of +the project is not to branch the existing pseudo-standard definitions - in +fact, PMIx fully supports both of the existing PMI-1 and PMI-2 APIs - but +rather to (a) augment and extend those APIs to eliminate some current +restrictions that impact scalability, and (b) provide a reference +implementation of the PMI-server that demonstrates the desired level of +scalability. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{version} + +%patch1 -p1 + +echo touching lexer sources to recompile them ... +find src -name \*.l -print -exec touch --no-create {} \; + +%build +%{_builddir}/%{name}-%{version}/autogen.pl +%configure \ + --prefix=%{_prefix} \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --disable-static \ + --disable-silent-rules \ + --enable-pmix-binaries \ + --with-tests-examples \ + --enable-shared \ + --enable-pmi-backward-compatibility \ + --with-munge + +%make_build V=1 + +%check +%{__make} check + +%install +%make_install + +# remove libtool archives +find %{buildroot} -name '*.la' | xargs rm -f + +# move libpmi/libpmi2 for environment module usage +install -d -m 0755 %{buildroot}%{_libdir}/%{name}/lib +mv %{buildroot}%{_libdir}/libpmi.so* %{buildroot}%{_libdir}/%{name}/lib +mv %{buildroot}%{_libdir}/libpmi2.so* %{buildroot}%{_libdir}/%{name}/lib + +# set up pmix self-test infra for install +install -d -m 0755 %{buildroot}%{_datadir}/%{name}/test +for f in pmix_client pmix_regex +do + mv test/.libs/$f %{buildroot}%{_datadir}/%{name}/$f +done +mv test/.libs/pmix_test %{buildroot}%{_datadir}/%{name}/test/pmix_test + +# install pmi/pmix environment module file +install -d -m 0755 %{buildroot}%{_modulesdir}/pmi +cat >%{buildroot}%{_modulesdir}/pmi/%{name}-%{_arch} <%{buildroot}%{_libdir}/pkgconfig/%{name}.pc <%{buildroot}%{_libdir}/%{name}/lib/pkgconfig/pmi.pc <%{buildroot}%{_libdir}/%{name}/lib/pkgconfig/pmi2.pc < - 2.2.5-3 +- Rebuilt for MSVSphere 8.10 beta + +* Tue Nov 14 2023 Kamal Heib - 2.2.5-3 +- Add gating test +- Resolves: RHEL-3692 + +* Thu Nov 02 2023 Kamal Heib - 2.2.5-2 +- Fix CVE-2023-41915 +- Resolves: RHEL-3692 + +* Mon Oct 11 2021 Honggang Li - 2.2.5-1 +- Update to 2.2.5 +- Related: rhbz#2008513 + +* Wed Jun 03 2020 Honggang Li - 2.2.4rc1-1 +- Update to 2.2.4rc1 +- Related: rhbz#1840596 + +* Mon Apr 20 2020 Honggang Li - 2.2.3-1 +- Update to 2.2.3 +- Add pmix-devel into CRB repository +- Related: rhbz#1816198, rhbz#1822520 + +* Wed Mar 20 2019 Jarod Wilson - 2.1.1-2 +- Add the --with-tests-examples flag to be able to better verify functionality +- Related: rhbz#1682374 + +* Fri Mar 16 2018 Philip Kovacs - 2.1.1-1 +- Update to 2.1.1 + +* Sun Feb 18 2018 Philip Kovacs - 2.1.0-3 +- Add patch to remove unneeded check for C++ + +* Thu Feb 15 2018 Philip Kovacs - 2.1.0-2 +- Rebuild for libevent soname bump + +* Sat Feb 10 2018 Philip Kovacs - 2.1.0-1 +- Update to 2.1.0 +- Added enviromnent module for pmi/pmix +- Added pkgconfig files for pmix/pmi/pmi2 +- Ensure lexer sources are rebuilt +- Removed obsolete sasl support +- Use new ldconfig_scriplets macro + +* Fri Feb 09 2018 Fedora Release Engineering - 1.2.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.2.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Mar 21 2017 Orion Poplawski - 1.2.2-1 +- Update to 1.2.2 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Sep 7 2016 Orion Poplawski - 1.1.5-1 +- Update to 1.1.5 + +* Fri Jun 10 2016 Orion Poplawski - 1.1.4-1 +- Update to 1.1.4 + +* Tue Mar 8 2016 Orion Poplawski - 1.1.3-1 +- Update to 1.1.3 + +* Mon Nov 16 2015 Orion Poplawski - 1.1.1-1 +- Update to 1.1.1 + +* Sat Nov 14 2015 Orion Poplawski - 1.1.0-1 +- Update to 1.1.0 + +* Tue Sep 1 2015 Orion Poplawski - 1.0.0-1 +- Initial version