Compare commits
9 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a561cb7c4 | ||
|
|
ab2324e5ac | ||
|
|
18aac1659d | ||
|
|
00f84a2348 | ||
|
|
bb59448249 | ||
|
|
18322e5395 | ||
|
|
21d39afcd6 | ||
|
|
b564f3f78b | ||
|
|
53ee1e79ed |
7 changed files with 178 additions and 65 deletions
29
0001-Add-back-conda-and-conda_env-entry-point.patch
Normal file
29
0001-Add-back-conda-and-conda_env-entry-point.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
From ce24f4787ea5647be849590f7eff6f6c1951b504 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 12 Sep 2021 21:04:40 +0200
|
||||
Subject: [PATCH 1/2] Add back conda and conda_env entry point
|
||||
|
||||
Partially reverts 0ccc029997e0dc0a28420a89e0cb39c08ff0b738.
|
||||
'conda init' is designed to fail and emit a warning. Go back
|
||||
to the normal init.
|
||||
---
|
||||
setup.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 84ecb55cca..bb3db39c4d 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -86,7 +86,8 @@ setup(
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
- 'conda=conda.cli.main_pip:main',
|
||||
+ 'conda=conda.cli.main:main',
|
||||
+ 'conda-env = conda_env.cli.main:main',
|
||||
],
|
||||
},
|
||||
install_requires=install_requires,
|
||||
--
|
||||
2.32.0
|
||||
|
||||
30
0002-Go-back-to-ruamel_yaml.patch
Normal file
30
0002-Go-back-to-ruamel_yaml.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
From 4eefe365897af2fcd91b47433140f994777ebd31 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 12 Sep 2021 21:12:27 +0200
|
||||
Subject: [PATCH] Go back to ruamel.yaml
|
||||
|
||||
What a mess conda is!
|
||||
---
|
||||
conda.recipe/run_test.sh | 2 +-
|
||||
setup.py | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index cd9c5715b0..56bb5bbeaf 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -37,9 +37,9 @@ install_requires = [
|
||||
]
|
||||
|
||||
if os.getenv('CONDA_BUILD', None) == '1':
|
||||
- install_requires.append("ruamel_yaml_conda >=0.11.14")
|
||||
+ install_requires.append("ruamel.yaml >=0.11.14")
|
||||
else:
|
||||
- install_requires.append("ruamel_yaml_conda >=0.11.14")
|
||||
+ install_requires.append("ruamel.yaml >=0.11.14")
|
||||
|
||||
|
||||
def package_files(*root_directories):
|
||||
--
|
||||
2.32.0
|
||||
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From d0d6e937582d673d7b319ff9f26d55a39c3b6b7f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 4 Feb 2020 14:15:35 +0100
|
||||
Subject: [PATCH] Fix import of collections.abc.Iterable
|
||||
|
||||
Required for python3.9 compatibility.
|
||||
---
|
||||
conda/_vendor/auxlib/compat.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/conda/_vendor/auxlib/compat.py b/conda/_vendor/auxlib/compat.py
|
||||
index 2cd720e0e5..efb4c111bf 100644
|
||||
--- a/conda/_vendor/auxlib/compat.py
|
||||
+++ b/conda/_vendor/auxlib/compat.py
|
||||
@@ -2,7 +2,6 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import codecs
|
||||
-import collections
|
||||
from itertools import chain
|
||||
import os
|
||||
import sys
|
||||
@@ -17,6 +16,11 @@ from shlex import split
|
||||
from functools import partial
|
||||
from tempfile import NamedTemporaryFile, template
|
||||
|
||||
+try:
|
||||
+ from collections.abc import Iterable # NOQA
|
||||
+except ImportError:
|
||||
+ from collections import Iterable # NOQA
|
||||
+
|
||||
try:
|
||||
from collections import OrderedDict as odict # NOQA
|
||||
except ImportError:
|
||||
@@ -34,7 +38,7 @@ def isiterable(obj):
|
||||
and not isinstance(obj, string_types)
|
||||
and type(obj) is not type)
|
||||
else:
|
||||
- return not isinstance(obj, string_types) and isinstance(obj, collections.Iterable)
|
||||
+ return not isinstance(obj, string_types) and isinstance(obj, Iterable)
|
||||
|
||||
|
||||
# shlex.split() is a poor function to use for anything general purpose (like calling subprocess).
|
||||
88
11658.patch
Normal file
88
11658.patch
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
From 90dbad6b08c7006dc8af2dca0937e45cc57389bb Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Howard <christopher.howard@gtri.gatech.edu>
|
||||
Date: Tue, 26 Jul 2022 14:19:31 -0400
|
||||
Subject: [PATCH 1/3] add usedforsecurity=False for hashlib.md5 for FIPS
|
||||
compliance
|
||||
|
||||
---
|
||||
conda/core/subdir_data.py | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
|
||||
index 80f24cc58d6..b0957329aad 100644
|
||||
--- a/conda/core/subdir_data.py
|
||||
+++ b/conda/core/subdir_data.py
|
||||
@@ -905,8 +905,11 @@ def cache_fn_url(url, repodata_fn=REPODATA_FN):
|
||||
# are looking for the cache under keys without this.
|
||||
if repodata_fn != REPODATA_FN:
|
||||
url += repodata_fn
|
||||
- md5 = hashlib.md5(ensure_binary(url)).hexdigest()
|
||||
- return '%s.json' % (md5[:8],)
|
||||
+ try:
|
||||
+ md5 = hashlib.md5(ensure_binary(url))
|
||||
+ except ValueError:
|
||||
+ md5 = hashlib.md5(ensure_binary(url), usedforsecurity=False)
|
||||
+ return '%s.json' % (md5.hexdigest()[:8],)
|
||||
|
||||
|
||||
def add_http_value_to_dict(resp, http_key, d, dict_key):
|
||||
|
||||
From 5614fe05036d833139a6cabca2ec7dff3868c78b Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Howard <christopher.howard@gtri.gatech.edu>
|
||||
Date: Tue, 26 Jul 2022 14:38:59 -0400
|
||||
Subject: [PATCH 2/3] Add news for FIPS support fix
|
||||
|
||||
---
|
||||
news/11658-add-fips-md5-support | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
create mode 100644 news/11658-add-fips-md5-support
|
||||
|
||||
diff --git a/news/11658-add-fips-md5-support b/news/11658-add-fips-md5-support
|
||||
new file mode 100644
|
||||
index 00000000000..8c7275302a5
|
||||
--- /dev/null
|
||||
+++ b/news/11658-add-fips-md5-support
|
||||
@@ -0,0 +1,19 @@
|
||||
+### Enhancements
|
||||
+
|
||||
+* <news item>
|
||||
+
|
||||
+### Bug fixes
|
||||
+
|
||||
+* Fix MD5 hash generation for FIPS-enabled systems (#11658)
|
||||
+
|
||||
+### Deprecations
|
||||
+
|
||||
+* <news item>
|
||||
+
|
||||
+### Docs
|
||||
+
|
||||
+* <news item>
|
||||
+
|
||||
+### Other
|
||||
+
|
||||
+* <news item>
|
||||
|
||||
From 7bd0dddad07c480a6dd29da1f32971f8ef2da17e Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Howard <christopher.howard@gtri.gatech.edu>
|
||||
Date: Wed, 27 Jul 2022 09:33:18 -0400
|
||||
Subject: [PATCH 3/3] Add TODO for FIPS MD5 refactor when Python 3.9+
|
||||
|
||||
---
|
||||
conda/core/subdir_data.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
|
||||
index b0957329aad..7ab4a1d4f6a 100644
|
||||
--- a/conda/core/subdir_data.py
|
||||
+++ b/conda/core/subdir_data.py
|
||||
@@ -905,6 +905,9 @@ def cache_fn_url(url, repodata_fn=REPODATA_FN):
|
||||
# are looking for the cache under keys without this.
|
||||
if repodata_fn != REPODATA_FN:
|
||||
url += repodata_fn
|
||||
+
|
||||
+ # TODO: remove try-except when conda only supports Python 3.9+, as
|
||||
+ # `usedforsecurity=False` was added in 3.9.
|
||||
try:
|
||||
md5 = hashlib.md5(ensure_binary(url))
|
||||
except ValueError:
|
||||
35
conda.spec
35
conda.spec
|
|
@ -1,7 +1,7 @@
|
|||
%{!?_with_bootstrap: %global bootstrap 0}
|
||||
%bcond_without tests
|
||||
|
||||
Name: conda
|
||||
Version: 4.10.1
|
||||
Version: 4.10.3
|
||||
Release: 2%{?dist}
|
||||
Summary: Cross-platform, Python-agnostic binary package manager
|
||||
|
||||
|
|
@ -17,7 +17,9 @@ Source0: https://github.com/conda/conda/archive/%{version}/%{name}-%{vers
|
|||
Source1: https://raw.githubusercontent.com/tartansandal/conda-bash-completion/1.5/conda
|
||||
Patch0: conda_sys_prefix.patch
|
||||
Patch1: conda_gateways_disk_create.patch
|
||||
Patch2: setup.patch
|
||||
# Use usedforsecurity=False for hashlib.md5 for FIPS compliance
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2326223
|
||||
Patch2: https://github.com/conda/conda/pull/11658.patch
|
||||
# Use system cpuinfo
|
||||
Patch3: conda-cpuinfo.patch
|
||||
# Fix tests on 32bit
|
||||
|
|
@ -29,6 +31,8 @@ Patch10003: 0003-Drop-fs-path-encoding-manipulation-under-python2.patch
|
|||
Patch10004: 0004-Do-not-try-to-run-usr-bin-python.patch
|
||||
Patch10005: 0005-Fix-failing-tests-in-test_api.py.patch
|
||||
Patch10006: 0006-shell-assume-shell-plugins-are-in-etc.patch
|
||||
Patch10007: 0001-Add-back-conda-and-conda_env-entry-point.patch
|
||||
Patch10008: 0002-Go-back-to-ruamel_yaml.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
@ -64,6 +68,7 @@ can only use conda to create and manage new environments.}
|
|||
python%{python3_pkgversion}-frozendict >= 1.2 \
|
||||
python%{python3_pkgversion}-pycosat >= 0.6.3 \
|
||||
python%{python3_pkgversion}-pyOpenSSL >= 16.2.0 \
|
||||
python%{python3_pkgversion}-pyyaml \
|
||||
python%{python3_pkgversion}-requests >= 2.18.4 \
|
||||
python%{python3_pkgversion}-ruamel-yaml >= 0.11.14 \
|
||||
python%{python3_pkgversion}-tqdm >= 4.22.0 \
|
||||
|
|
@ -83,9 +88,12 @@ BuildRequires: %py3_reqs
|
|||
BuildRequires: python%{python3_pkgversion}-cytoolz >= 0.8.2
|
||||
%endif
|
||||
# For tests
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: python-unversioned-command
|
||||
%endif
|
||||
BuildRequires: python%{python3_pkgversion}-mock
|
||||
BuildRequires: python%{python3_pkgversion}-pytest-cov
|
||||
BuildRequires: python%{python3_pkgversion}-pytest-timeout
|
||||
BuildRequires: python%{python3_pkgversion}-responses
|
||||
|
||||
Requires: %py3_reqs
|
||||
|
|
@ -142,12 +150,10 @@ sed -i -e s/linux-64/%{python3_platform}/ tests/data/conda_format_repo/%{python3
|
|||
|
||||
%build
|
||||
# build conda executable
|
||||
%define py_setup utils/setup-testing.py
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
# install conda executable
|
||||
%define py_setup utils/setup-testing.py
|
||||
%py3_install
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/conda/condarc.d
|
||||
|
|
@ -173,6 +179,7 @@ install -m 0644 -Dt %{buildroot}%{bash_completionsdir}/ %SOURCE1
|
|||
|
||||
|
||||
%check
|
||||
%if %{with tests}
|
||||
export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib} conda info
|
||||
|
||||
|
|
@ -189,6 +196,7 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} conda info
|
|||
# them for now.
|
||||
# tests/core/test_initialize.py tries to unlink /usr/bin/python3 and fails when python is a release candidate
|
||||
# tests/core/test_solve.py::test_cuda_fail_1 fails on non-x86_64
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
py.test-%{python3_version} -vv -m "not integration" \
|
||||
--deselect=tests/test_cli.py::TestJson::test_list \
|
||||
--deselect=tests/test_cli.py::TestRun::test_run_returns_int \
|
||||
|
|
@ -199,6 +207,17 @@ py.test-%{python3_version} -vv -m "not integration" \
|
|||
--deselect=tests/core/test_subdir_data.py::test_use_only_tar_bz2 \
|
||||
--deselect=tests/core/test_initialize.py \
|
||||
--deselect=tests/core/test_solve.py::test_cuda_fail_1
|
||||
%else
|
||||
# Whitespace differences
|
||||
# tests/cli/test_config.py::test_channels_*
|
||||
# tests/cli/test_config.py::test_set_*key
|
||||
# tests/cli/test_config.py::test_add_key
|
||||
# tests/common/test_yaml.py::test_yaml_complex
|
||||
rm tests/gateways/test_subprocess.py
|
||||
py.test-%{python3_version} -vv -m "not integration" \
|
||||
-k 'not (test_list or test_run_returns_int or test_run_returns_nonzero_errorlevel or test_run_returns_zero_errorlevel or test_ProgressiveFetchExtract_prefers_conda_v2_format or test_subdir_data_prefers_conda_to_tar_bz2 or test_use_only_tar_bz2 or test_cuda_fail_1 or InitializeTests or test_channels_prepend or test_channels_prepend_duplicate or test_channels_append or test_channels_append_duplicate or test_channels_remove or test_set_key or test_set_map_key or test_add_key or test_yaml_complex or test_set_unconfigured_key)'
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -224,6 +243,12 @@ py.test-%{python3_version} -vv -m "not integration" \
|
|||
|
||||
|
||||
%changelog
|
||||
* Sun Nov 17 2024 Orion Poplawski <orion@nwra.com> - 4.10.3-2
|
||||
- Use usedforsecurity=False for hashlib.md5 for FIPS compliance (rhbz#2326223)
|
||||
|
||||
* Sun Sep 12 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.10.3-1
|
||||
- Update to 4.10.3
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.10.1-2
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
|
|
|
|||
16
setup.patch
16
setup.patch
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/utils/setup-testing.py b/utils/setup-testing.py
|
||||
index 7036d44..19793f8 100755
|
||||
--- a/utils/setup-testing.py
|
||||
+++ b/utils/setup-testing.py
|
||||
@@ -3,10 +3,7 @@
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
import os
|
||||
import sys
|
||||
-if 'develop' in sys.argv:
|
||||
- from setuptools import setup
|
||||
-else:
|
||||
- from distutils.core import setup
|
||||
+from setuptools import setup
|
||||
|
||||
if not (sys.version_info[:2] == (2, 7) or sys.version_info[:2] >= (3, 3)):
|
||||
sys.exit("conda is only meant for Python 2.7 or 3.3 and up. "
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (conda-4.10.1.tar.gz) = 75796b580abcc91c449461302cecb98cd067285ef03d6630c882177b0b0f8f9df56101480943d5a14855ecfca10c5ea7dcb57c569a3ff538add713f82772a6f0
|
||||
SHA512 (conda-4.10.3.tar.gz) = 1f12506229975a04920745eaca2a06d3ef4b2ef76a7bd78473f156dfc64f16b63f0303a2a14cfa25cdb25081de2a24e451cc401184d7a4f77174292b901224c6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue