Bug#529371: Regression: compiz-manager wrapper script modifies special ENV environment variable
Package: compiz-core
Version: 0.8.2-1
Severity: normal
Tags: patch
Version 0.8.2-1 reverted the fix for bug #484225. See
<http://git.debian.org/?p=pkg-xorg/app/compiz.git;a=commitdiff;h=c3ee16e2cd783829f0b0b104bc32430cf7da51c5>
for the offending commitdiff. Attached is a patch to fix this
regression.
Description of the problem: The Compiz Manager script
(debian/compiz-manager in the source, installed at /usr/bin/compiz)
modifies the ENV environment variable, which interferes with
interactive POSIX shells (/bin/sh).
For more details on the standard meaning of the ENV environment
variable, see the POSIX specifications at:
<http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html>
<http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03>
<http://www.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117_08>
Upstream bug: <http://bugs.opencompositing.org/show_bug.cgi?id=997>
--- old/debian/compiz-manager 2009-05-18 18:29:12.000000000 -0400
+++ new/debian/compiz-manager 2009-05-18 18:31:55.000000000 -0400
@@ -71,7 +71,6 @@
COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
COMPIZ_PLUGINS=""
-ENV=""
# Use emerald by default if it exist
USE_EMERALD="yes"
@@ -290,27 +289,23 @@
build_env()
{
if check_nvidia; then
- ENV="__GL_YIELD=NOTHING "
+ export __GL_YIELD=NOTHING
fi
if [ "$INDIRECT" = "yes" ]; then
- ENV="$ENV LIBGL_ALWAYS_INDIRECT=1 "
+ export LIBGL_ALWAYS_INDIRECT=1
fi
if check_xgl; then
if [ -f ${LIBGL_NVIDIA} ]; then
- ENV="$ENV LD_PRELOAD=${LIBGL_NVIDIA}"
+ export LD_PRELOAD="${LD_PRELOAD:+${LD_PRELOAD} }${LIBGL_NVIDIA}"
verbose "Enabling Xgl with nVidia drivers...\n"
fi
if [ -f ${LIBGL_FGLRX} ]; then
- ENV="$ENV LD_PRELOAD=${LIBGL_FGLRX}"
+ export LD_PRELOAD="${LD_PRELOAD:+${LD_PRELOAD} }${LIBGL_FGLRX}"
verbose "Enabling Xgl with fglrx ATi drivers...\n"
fi
fi
- ENV="$ENV FROM_WRAPPER=yes"
-
- if [ -n "$ENV" ]; then
- export $ENV
- fi
+ export FROM_WRAPPER=yes
}
build_args()
Reply to: