compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Josefsson-Ljungdahl
Hi.

I wish to report an issue regarding environment-modules version 4.1.1-1 in
universe/devel. I run Linux Min 19 but this issue lies with Ubuntu. It's
not really a bug, more of a compatibility problem. According to the files
in the package this software is meant to be initialised during login since
it puts a file under /etc/profile.d/ named modules.sh which in turn sources
initialisation files under /usr/share/modules/init depending on the user's
shell. The initialisation fails because some files contain the shebang
#!/bin/sh which means that /bin/dash runs those files in particular a file
which sets up the shell command "module". The commands are then exported as
are a number of environment variables but apparently dash does not entirely
cope with this as the commands are not available when a terminal session is
started although the set environment variables are.

I use bash and I changed /bin/sh to point to /bin/bash instead of
/bin/dash, logged out and logged back in and the initalisaion worked as
expected.

I would suggest that the package be patched to cope with the user's choice
of shell provided it is supported by the package. Needless to say, dash is
not supported.

I do not know if Ubuntu sources /etc/profile during graphical login but
Mint does. In case Ubuntu doesn't I would suggest that the installation of
the package puts a sourcing line in ~/xsessionrc or tells the user to do
so, at least tell the user what to do to make it work.

I would really appreciate this to be done. The software is really handy and
many would welcome a pacage installation that works as intended.

You can find details of my trials and errors here:
https://forums.linuxmint.com/viewtopic.php?f=47&t=279377

If someone wishes to contact me in this matter please send a mail to
gos...@foi.se

Kind regards,

Gösta Ljungdahl
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Robie Basak
Hi,

I would start by making sure a good quality bug report exists against
the Ubuntu package, and if relevant, the Debian package. It would help
if you could report in that bug if the problem is fixed in the latest
version of the package in Debian, and which releases of Ubuntu are
affected. Then it will be more obvious to developers where the fix needs
to be made and what work might be required.

Thanks,

Robie

On Sat, May 04, 2019 at 03:49:51PM +0200, Josefsson-Ljungdahl wrote:
> Hi.
> 
> I wish to report an issue regarding environment-modules version 4.1.1-1 in
> universe/devel. I run Linux Min 19 but this issue lies with Ubuntu. It's
> not really a bug, more of a compatibility problem. According to the files
> in the package this software is meant to be initialised during login since
> it puts a file under /etc/profile.d/ named modules.sh which in turn sources
> initialisation files under /usr/share/modules/init depending on the user's
> shell. The initialisation fails because some files contain the shebang
> #!/bin/sh which means that /bin/dash runs those files in particular a file
> which sets up the shell command "module". The commands are then exported as
> are a number of environment variables but apparently dash does not entirely
> cope with this as the commands are not available when a terminal session is
> started although the set environment variables are.
> 
> I use bash and I changed /bin/sh to point to /bin/bash instead of
> /bin/dash, logged out and logged back in and the initalisaion worked as
> expected.
> 
> I would suggest that the package be patched to cope with the user's choice
> of shell provided it is supported by the package. Needless to say, dash is
> not supported.
> 
> I do not know if Ubuntu sources /etc/profile during graphical login but
> Mint does. In case Ubuntu doesn't I would suggest that the installation of
> the package puts a sourcing line in ~/xsessionrc or tells the user to do
> so, at least tell the user what to do to make it work.
> 
> I would really appreciate this to be done. The software is really handy and
> many would welcome a pacage installation that works as intended.
> 
> You can find details of my trials and errors here:
> https://forums.linuxmint.com/viewtopic.php?f=47&t=279377
> 
> If someone wishes to contact me in this matter please send a mail to
> gos...@foi.se
> 
> Kind regards,
> 
> Gösta Ljungdahl

> -- 
> Ubuntu-devel-discuss mailing list
> Ubuntu-devel-discuss@lists.ubuntu.com
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss



signature.asc
Description: PGP signature
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Robie Basak
On Sun, May 05, 2019 at 08:21:29PM +0200, Josefsson-Ljungdahl wrote:
> Seeing that you have attached a signature it would help if you could point
> me to your public key. You can find mine at public key-servers. The
> fingerprint is: 57AA BFB8 727A 2506 47CC  CB90 2D23 4815 7026 0357. Look
> for gos...@foi.se or perhaps some part or all of dsa1024/70260357.

My key is widely available on public key servers, and also is on the
Debian keyring. If you check my email's signature your client will tell
you what key to fetch, and after fetching it your client will be able to
validate the signature and present the fingerprint. GnuPG can be
configured to do this automatically. You still need to independently
verify the signature out of band (or through the web of trust); there is
no possible shortcut to this. There is no need for me to include my key
or fingerprint separately - that would be redundant.

> Ok, I will make a bug report. I thought about doing it but I was not sure
> whether this would qualify as bug.

I'm not sure I follow. If the issue doesn't qualify as a bug (or a
wishlist bug) then by definition there is no acceptable code change to
make for the package, so what exactly would you be requesting?

If you want to ask for confirmation if the bug is valid, then the best
thing to do is to file it (having done some reasonable research first,
which it seems you have) with as much objective information as possible,
and make sure the report reaches the original authors and is relevant to
them (eg. if the code in question originates from Debian, make sure the
bug exists in Debian's bug tracker and is described in terms of Debian,
not Mint). You will then be able to get confirmation of validity
directly from the source.


signature.asc
Description: PGP signature
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Gunnar Hjalmarsson

On 2019-05-04 15:49, Josefsson-Ljungdahl wrote:

I do not know if Ubuntu sources /etc/profile during graphical login but
Mint does.


Ubuntu does that as well, at least when GDM or LightDM is used. Maybe 
worth mentioning that the scripts in the Ubuntu versions of those DMs 
are run as bash processes. (That was changed a few years ago; previously 
they were run as dash processes.)


--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Gunnar Hjalmarsson

On 2019-05-05 21:38, Josefsson-Ljungdahl wrote:
Den sön 5 maj 2019 kl 21:26 skrev Gunnar Hjalmarsson 
mailto:gunna...@ubuntu.com>>:

Ubuntu does that as well, at least when GDM or LightDM is used. Maybe
worth mentioning that the scripts in the Ubuntu versions of those DMs
are run as bash processes. (That was changed a few years ago;
previously they were run as dash processes.)


OK, that's good but since Ubuntu does have /bin/sh pointing to /bin/dash
and the initialisation procedure sources scripts with #!/bin/sh it
doesn't go all the way in this case.


The shebang line is ignored if a file is sourced, isn't it?

From a quick look at the code in environment-modules I see that it 
seems to test for the BASH_VERSION variable. That makes me think of this 
change of LightDM:


https://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/2168/debian/lightdm-session

which was made in response to:

https://launchpad.net/bugs/1482641

Can this possibly be a reason for the confusion you have observed?

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Josefsson-Ljungdahl
Hi Robie,

Seeing that you have attached a signature it would help if you could point
me to your public key. You can find mine at public key-servers. The
fingerprint is: 57AA BFB8 727A 2506 47CC  CB90 2D23 4815 7026 0357. Look
for gos...@foi.se or perhaps some part or all of dsa1024/70260357.

Ok, I will make a bug report. I thought about doing it but I was not sure
whether this would qualify as bug. According to a colleague of mine Debian
does not let /bin/sh point to /bin/dash if the user has chosen e.g. bash as
his or her shell. But googling just now I'm not so sure. I'll double check
with my colleague. If things are as he says Debian would not be affected
unless the chosen shell i dash, of cource. I'll also find out about Debian
version and version of the environment-modules package. If he has installed
environment-modules I can ask him to check the scripts for #!/bin/sh or
send them to me. But that'll have to suffice. I can't guarantee that it'll
be the latest versions.

Thanks for responding. The Mint fora have not been overly helpful, I must
say.

Best wishes,
Gösta


Den sön 5 maj 2019 kl 19:35 skrev Robie Basak :

> Hi,
>
> I would start by making sure a good quality bug report exists against
> the Ubuntu package, and if relevant, the Debian package. It would help
> if you could report in that bug if the problem is fixed in the latest
> version of the package in Debian, and which releases of Ubuntu are
> affected. Then it will be more obvious to developers where the fix needs
> to be made and what work might be required.
>
> Thanks,
>
> Robie
>
> On Sat, May 04, 2019 at 03:49:51PM +0200, Josefsson-Ljungdahl wrote:
> > Hi.
> >
> > I wish to report an issue regarding environment-modules version 4.1.1-1
> in
> > universe/devel. I run Linux Min 19 but this issue lies with Ubuntu. It's
> > not really a bug, more of a compatibility problem. According to the files
> > in the package this software is meant to be initialised during login
> since
> > it puts a file under /etc/profile.d/ named modules.sh which in turn
> sources
> > initialisation files under /usr/share/modules/init depending on the
> user's
> > shell. The initialisation fails because some files contain the shebang
> > #!/bin/sh which means that /bin/dash runs those files in particular a
> file
> > which sets up the shell command "module". The commands are then exported
> as
> > are a number of environment variables but apparently dash does not
> entirely
> > cope with this as the commands are not available when a terminal session
> is
> > started although the set environment variables are.
> >
> > I use bash and I changed /bin/sh to point to /bin/bash instead of
> > /bin/dash, logged out and logged back in and the initalisaion worked as
> > expected.
> >
> > I would suggest that the package be patched to cope with the user's
> choice
> > of shell provided it is supported by the package. Needless to say, dash
> is
> > not supported.
> >
> > I do not know if Ubuntu sources /etc/profile during graphical login but
> > Mint does. In case Ubuntu doesn't I would suggest that the installation
> of
> > the package puts a sourcing line in ~/xsessionrc or tells the user to do
> > so, at least tell the user what to do to make it work.
> >
> > I would really appreciate this to be done. The software is really handy
> and
> > many would welcome a pacage installation that works as intended.
> >
> > You can find details of my trials and errors here:
> > https://forums.linuxmint.com/viewtopic.php?f=47&t=279377
> >
> > If someone wishes to contact me in this matter please send a mail to
> > gos...@foi.se
> >
> > Kind regards,
> >
> > Gösta Ljungdahl
>
> > --
> > Ubuntu-devel-discuss mailing list
> > Ubuntu-devel-discuss@lists.ubuntu.com
> > Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
>
>
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: compatibility issue in environment-modules version 4.1.1-1

2019-05-05 Thread Josefsson-Ljungdahl
 Den sön 5 maj 2019 kl 21:26 skrev Gunnar Hjalmarsson :

> Ubuntu does that as well, at least when GDM or LightDM is used. Maybe
> worth mentioning that the scripts in the Ubuntu versions of those DMs
> are run as bash processes. (That was changed a few years ago; previously
> they were run as dash processes.)
>

OK, that's good but since Ubuntu does have /bin/sh pointing to /bin/dash
and the initialisation procedure sources scripts with #!/bin/sh it doesn't
go all the way in this case.

/Gösta

Den sön 5 maj 2019 kl 21:26 skrev Gunnar Hjalmarsson :

> On 2019-05-04 15:49, Josefsson-Ljungdahl wrote:
> > I do not know if Ubuntu sources /etc/profile during graphical login but
> > Mint does.
>
> Ubuntu does that as well, at least when GDM or LightDM is used. Maybe
> worth mentioning that the scripts in the Ubuntu versions of those DMs
> are run as bash processes. (That was changed a few years ago; previously
> they were run as dash processes.)
>
> --
> Gunnar Hjalmarsson
> https://launchpad.net/~gunnarhj
>
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss