From 1b65af4df7348b4cba3ca78c4c4039f3109eb232 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Dec 04 2022 20:55:41 +0000 Subject: Set av_dir to /etc/conda; Do not add /usr/condabin to PATH --- diff --git a/0006-shell-assume-shell-plugins-are-in-etc.patch b/0006-shell-assume-shell-plugins-are-in-etc.patch index e275fa9..d00a16e 100644 --- a/0006-shell-assume-shell-plugins-are-in-etc.patch +++ b/0006-shell-assume-shell-plugins-are-in-etc.patch @@ -40,3 +40,15 @@ index 74e0527..67b0ea3 100644 super().__init__(arguments) +diff -up conda-22.11.0/conda/base/context.py.etc conda-22.11.0/conda/base/context.py +--- conda-22.11.0/conda/base/context.py.etc 2022-12-03 23:09:08.993907458 -0700 ++++ conda-22.11.0/conda/base/context.py 2022-12-04 13:53:58.853543455 -0700 +@@ -654,7 +654,7 @@ class Context(Configuration): + """ Directory where critical data for artifact verification (e.g., + various public keys) can be found. """ + # TODO (AV): Find ways to make this user configurable? +- return join(self.conda_prefix, 'etc', 'conda') ++ return '/etc/conda' + + @property + def signing_metadata_url_base(self): diff --git a/conda.spec b/conda.spec index 695ab31..832dc32 100644 --- a/conda.spec +++ b/conda.spec @@ -162,7 +162,8 @@ mkdir -p %{buildroot}%{_localstatedir}/cache/conda/pkgs/cache # install does not create the directory on EL7 install -m 0644 -Dt %{buildroot}/etc/profile.d/ conda/shell/etc/profile.d/conda.{sh,csh} -sed -r -i '1i CONDA_EXE=%{_bindir}/conda' %{buildroot}/etc/profile.d/conda.sh +sed -r -i -e '1i [ -z "$CONDA_EXE" ] && CONDA_EXE=%{_bindir}/conda' \ + -e '/PATH=.*condabin/s|PATH=|[ -d "$(dirname "$CONDA_EXE")/condabin" ] && PATH=|' %{buildroot}/etc/profile.d/conda.sh sed -r -i -e '1i set _CONDA_EXE=%{_bindir}/conda\nset _CONDA_ROOT=' \ -e 's/CONDA_PFX=.*/CONDA_PFX=/' %{buildroot}/etc/profile.d/conda.csh install -m 0644 -Dt %{buildroot}/etc/fish/conf.d/ conda/shell/etc/fish/conf.d/conda.fish