X2Go Bug report logs - #1133
Inconsistent Perl used by server or its agent on connect

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Ted Toal <twtoal@ucdavis.edu>

Date: Tue, 10 Jan 2017 21:20:02 UTC

Severity: normal

Tags: not-a-bug

Found in version 4.0.1.20

Done: Stefan Baur <X2Go-ML-1@baur-itcs.de>

Bug is archived. No further changes may be made.

Full log


Message #52 received at 1133@bugs.x2go.org (full text, mbox, reply):

Received: (at 1133) by bugs.x2go.org; 11 Jan 2017 17:41:48 +0000
From twtoal@ucdavis.edu  Wed Jan 11 18:41:47 2017
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.4 required=3.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,RCVD_IN_SORBS_SPAM,URIBL_BLOCKED autolearn=no version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 66E563CDDE
	for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 18:41:47 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 9pXGLoVReEGi for <1133@bugs.x2go.org>;
	Wed, 11 Jan 2017 18:41:40 +0100 (CET)
Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 1649E3CDDD
	for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 18:41:40 +0100 (CET)
Received: by mail-pf0-f193.google.com with SMTP id f144so14362514pfa.2
        for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 09:41:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=ucdavis-edu.20150623.gappssmtp.com; s=20150623;
        h=mime-version:subject:from:in-reply-to:date:cc
         :content-transfer-encoding:message-id:references:to;
        bh=FCOjrOidOcRj0Wjhwka20X2yw68T5LQgW65sRBQLtug=;
        b=LYdGdW7rLCUxWIO64aE1USO0M1w7+LmBxJjsW9AQeAqkyI+80Go+KDswuAY3sqZxKP
         SSbJeKV0r505+gVUnyY+IECC+7iAlqxBLMK2Z9LUCVdfEqfgDFTpgM/tGFrEK2Ygz/7z
         pVFawhCi2xfGIm61rIhm9utNvpJJdhJR1jxvFAZHV5lRpeBF00HdubZP1EV5G6FGtTqw
         qKlIgddpPSmQg0LhBbA7TZFJ3P+/If5O7cHssSO1ccwvPfTb3y3kyuRF5tuN1ZVwf64P
         sqxmHC0/mOpvT/s1sVrwq/bo6eGYAwZrJekmYMJNRvIPvqKaMylNrxWiPok3pNWBoSKD
         SXRA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
         :content-transfer-encoding:message-id:references:to;
        bh=FCOjrOidOcRj0Wjhwka20X2yw68T5LQgW65sRBQLtug=;
        b=Y0DT9o2dJ7ZHWKp9EhYPTTs2/4yFxLSwBjWvO94Z3SzbriZiI5DJNV4rT1KpfyTLKX
         BEq5rFSeIhCBecWKQyfSDfZDVTtngs+irsanOVPa8KkiyM7DoRhX1suKUtDLE/qrR4GY
         hbFg+T5jiyMojnw6A5HdmvxspkgPLE0nxovn6WM8/wE5vaLvXKf+Wg2Y34qMQFhedccg
         LvdB75y/+wkwpJDOohMiR2/dY3x4t6I02Ehy1pCXffxmaPXSNUKXYpkyeZ+aG7mYhOlA
         ePpoIoQ0dygMKE2PzgO7Ra9qULGQrhHgbmURDqgWsrn/YIoviCOOiuOtZf3nHHvgthoU
         k1mQ==
X-Gm-Message-State: AIkVDXLmtCuxeTNvlLeyhcO0TK7Lorbx3pz+yJ8aTVWsQOZxY+GUlq8pzSmsoQ/zMsnkow==
X-Received: by 10.99.116.22 with SMTP id p22mr12088672pgc.161.1484156498603;
        Wed, 11 Jan 2017 09:41:38 -0800 (PST)
Received: from dhcp22-gc1.genomecenter.ucdavis.edu (dhcp22-gc1.genomecenter.ucdavis.edu. [128.120.136.85])
        by smtp.gmail.com with ESMTPSA id r1sm15429137pgn.48.2017.01.11.09.41.36
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 11 Jan 2017 09:41:36 -0800 (PST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Subject: Re: [X2Go-Dev] Bug#1133: Bug#1133: Inconsistent Perl used by server
 or its agent on connect
From: Ted Toal <twtoal@ucdavis.edu>
In-Reply-To: <7b997594-addb-eced-9c41-1d520f712fa8@baur-itcs.de>
Date: Wed, 11 Jan 2017 09:41:35 -0800
Cc: 1133@bugs.x2go.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <9C7ACD7C-175E-4E19-8322-E3950DAD7159@ucdavis.edu>
References: <BF57B030-7BF4-4307-9333-49782AB84D74@ucdavis.edu>
 <7a1f025f-6a4f-9c6a-ffe6-4d18a712da86@baur-itcs.de>
 <E4861E92-0216-40D2-91E6-A6A693F5E30B@ucdavis.edu>
 <836dd91e-6bc3-35e1-3759-e66b55715b1b@baur-itcs.de>
 <35BC44E5-C0D7-4B77-A09E-FBD00AD5193E@ucdavis.edu>
 <7b997594-addb-eced-9c41-1d520f712fa8@baur-itcs.de>
To: Stefan Baur <X2Go-ML-1@baur-itcs.de>
X-Mailer: Apple Mail (2.3259)
Sorry for the mixup about lower case l and capital I.  I don’t know that using a different font would have helped in this case.  I had the wrong one specified and you found it and used it despite the font.  Btw, the web site where I found the option (perlmaven.com) also used a font that didn’t distinguish it, which is how it propagated to me.

Perhaps that option on the shebang is not the best way to handle this.  But you are wrong to think that people should not or will not be setting PERL5LIB in their .bashrc.  It is normal practice among Perl users, and in fact I would guess that the majority of Perl users do so.  And that breaks x2go.  x2go should never assume that the environment variables used by a program it is invoking, especially /usr/lib/perl, will be set the way it wants them set, after .bashrc has run.

ted



> On Jan 11, 2017, at 1:05 AM, Stefan Baur <X2Go-ML-1@baur-itcs.de> wrote:
> 
> Control: close -1
> thanks
> 
> [re-sent as the original message went to Ted's personal mailbox only]
> 
> Am 11.01.2017 um 02:48 schrieb Ted Toal:
>>> perl has the -l option for specifying the PERL5LIB path.  That
> option can, and I think should, be used on the shebang of the x2go perl
> scripts:
>>> 
>>> #!/usr/bin/perl -l /usr/lib/perl5
>>> 
>>> or something like that.  I know the shebang line allows args.
> 
> Ted,
> 
> while we agree that options *can* be used on the shebang line, I
> disagree that they should be used in our scripts for specifying
> something that *is the default*.
> You would, indeed, change the shebang to "#!/usr/bin/perl -T" if you
> wanted to run the script in taint mode, which is a non-default setting.
> 
> Also, the parameter to set the library path is not -l (lower-case L),
> but -I (upper-case i).  I would suggest using a font that displays them
> differently, it makes coding a lot easier.
> 
> Why explicitly setting the PERL5LIB path in the shebang line is a bad
> idea can be shown like this:
> 
> First, run
> perl -e 'print "@INC\n";'
> to display the default.
> 
> On my system, this returns:
> /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2
> /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20
> /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20
> /usr/share/perl/5.20 /usr/local/lib/site_perl .
> 
> Next, run
> perl -I /foo -e 'print "@INC\n";'
> which corresponds to setting -I /foo on the shebang line.
> 
> On my system, this returns:
> /foo /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2
> /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20
> /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20
> /usr/share/perl/5.20 /usr/local/lib/site_perl .
> 
> Notice how the search path is extended, not replaced, by /foo ending up
> at the beginning.
> 
> Now let's see what happens when combining -I *and* a set PERL5LIB variable:
> PERL5LIB=/bar perl -I /foo -e 'print "@INC\n";'
> 
> This results in:
> /foo /bar /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2
> /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20
> /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20
> /usr/share/perl/5.20 /usr/local/lib/site_perl .
> 
> You can see that /foo and /bar are added to the search path, with the
> value of -I taking precedence, as in being listed and thus searched
> first, over PERL5LIB.
> 
> And this is exactly NOT what a user expects, even though it would solve
> your percieved problem:
> 
> Standard Unix practice is that when an environment variable is set, it
> should take precedence over any default, and a command line option set
> should take precedence over any environment variable.
> 
> Adding -I /path/to/libs at the shebang line would break what is expected
> behavior.
> 
> No one keeps you from running a search and replace on all X2Go-related
> scripts after installing them, though ...
> 
> However, I would strongly recommend against that and suggest un-setting
> PERL5LIB in .bashrc when an X2Go-related bash invocation is detected,
> instead.
> 
> Why this doesn't work for you the way it does for us is what we're
> tracking in Bug #1134, so again, closing this bug.
> 
> Kind Regards,
> Stefan Baur
> -- 
> BAUR-ITCS UG (haftungsbeschränkt)
> Geschäftsführer: Stefan Baur
> Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
> Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
> 
> 


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Sat Nov 23 20:13:00 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.