Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit f38d467

Browse files
author
Release Manager
committed
Trac #31584: Fix suitesparse/cvxopt /usr/local leakage
We fix a simple bug in our build system: The value of `SAGE_SUITESPARSE_LOCALINSTALL` is set in `build/pkgs/suitesparse/spkg-configure.m4` but is not actually passed on to `build/pkgs/cvxopt/spkg-install.in`. A different variable, `SAGE_SUITESPARSE_PREFIX`, is passed by `build/bin/sage-build-env- config.in` from the configure stage to the build stage, but it is never set or used. {{{ $ git grep SAGE_SUITESPARSE build/bin/sage-build-env-config.in:export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@" build/pkgs/cvxopt/spkg-install.in:if test "x$SAGE_SUITESPARSE_LOCALINSTALL" != "x"; then build/pkgs/suitesparse/spkg-configure.m4: AC_SUBST(SAGE_SUITESPARSE_LOCALINSTALL, ['$SAGE_LOCAL']) build/pkgs/suitesparse/spkg-configure.m4: AC_SUBST(SAGE_SUITESPARSE_LOCALINSTALL, ['']) }}} As a result, `suitesparse` from `/usr/local` can leak in, as observed in https://trac.sagemath.org/ticket/31567?replyto=25#comment:25 Clearly these two variables were intended to be the same variable. We fix this. This unified variable, `SAGE_SUITESPARSE_PREFIX`, is analogous to other variables `SAGE_..._PREFIX`. URL: https://trac.sagemath.org/31584 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Michael Orlitzky
2 parents 22a1199 + 52537d1 commit f38d467

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=a38ba439948866832495e453b2febed61a232256
3-
md5=72ad56533ec90f5bcec51d4005387f15
4-
cksum=2631020116
2+
sha1=e50050ec2ee230ad38ac794636ada8c96f62f586
3+
md5=d3778f173c5d6dd83f69826398c8410d
4+
cksum=4238671374
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1a6e82a160b277ae72ecfd7406060a28ab9c3eb4
1+
c2359582ba43e8c9b6883f6d52d70f16ffb9fac5

build/pkgs/cvxopt/spkg-install.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export CVXOPT_BLAS_LIB="$(cvxopt_output l blas)"
6565
export CVXOPT_BLAS_LIB_DIR="$(pkg-config --variable=libdir blas)"
6666
export CVXOPT_LAPACK_LIB="$(cvxopt_output l lapack)"
6767

68-
if test "x$SAGE_SUITESPARSE_LOCALINSTALL" != "x"; then
69-
export CVXOPT_SUITESPARSE_LIB_DIR="${SAGE_LOCAL}"
70-
export CVXOPT_SUITESPARSE_INC_DIR="${SAGE_LOCAL}/include"
68+
if test "x$SAGE_SUITESPARSE_PREFIX" != "x"; then
69+
export CVXOPT_SUITESPARSE_LIB_DIR="${SAGE_SUITESPARSE_PREFIX}"
70+
export CVXOPT_SUITESPARSE_INC_DIR="${SAGE_SUITESPARSE_PREFIX}/include"
7171
fi
7272

7373
export CVXOPT_BUILD_GLPK=1

build/pkgs/suitesparse/spkg-configure.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ SAGE_SPKG_CONFIGURE([suitesparse], [
1717
sage_spkg_install_suitesparse=yes])
1818
], [], [], [
1919
AS_IF([test x$sage_spkg_install_suitesparse = xyes], [
20-
AC_SUBST(SAGE_SUITESPARSE_LOCALINSTALL, ['$SAGE_LOCAL'])
20+
AC_SUBST(SAGE_SUITESPARSE_PREFIX, ['$SAGE_LOCAL'])
2121
], [
22-
AC_SUBST(SAGE_SUITESPARSE_LOCALINSTALL, [''])
22+
AC_SUBST(SAGE_SUITESPARSE_PREFIX, [''])
2323
])
2424
])

0 commit comments

Comments
 (0)