From 79fdba84b32239300fcc4686d36df10635047537 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 28 Aug 2019 15:16:47 +0200
Subject: [PATCH] software/theia: don't set HOME

I set that to try to be independent from user config files/environment
variables, but that was a bad idea and not needed (I did that to
investigate an issue I had with jedi, but it was not depending on
environment variables - it was depending on the presence of a
buildout.cfg in current directory)
---
 software/theia/buildout.hash.cfg |  2 +-
 software/theia/instance.cfg.in   | 31 +++----------------------------
 2 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/software/theia/buildout.hash.cfg b/software/theia/buildout.hash.cfg
index 08d16831f..e2a9b92b5 100644
--- a/software/theia/buildout.hash.cfg
+++ b/software/theia/buildout.hash.cfg
@@ -15,7 +15,7 @@
 
 [instance]
 filename = instance.cfg.in
-md5sum = 6a0a65ff9f81f907d53c42c65b54442a
+md5sum = f0d19916c838e4ec2bb0a697f997adde
 
 [yarn.lock]
 filename = yarn.lock
diff --git a/software/theia/instance.cfg.in b/software/theia/instance.cfg.in
index 7fb0915c9..b58d41c81 100644
--- a/software/theia/instance.cfg.in
+++ b/software/theia/instance.cfg.in
@@ -2,14 +2,13 @@
 parts =
   monitor-base
   promises
-  .bashrc
   frontend-reload
   publish-connection-parameter
 
 extends = ${monitor-template:rendered}
 
 eggs-directory = ${buildout:eggs-directory}
-develop-eggs-directory = ${buildout:develop-eggs-directory} 
+develop-eggs-directory = ${buildout:develop-eggs-directory}
 offline = true
 
 
@@ -79,37 +78,13 @@ recipe = slapos.cookbook:userinfo
 recipe = slapos.cookbook:wrapper
 wrapper-path = $${directory:services}/$${:_buildout_section_name_}
 command-line =
-  env -i HOME=$${directory:home} LC_ALL=C.UTF-8 USER=$${user:pw-name} LOGNAME=$${user:pw-name} ${theia-wrapper:rendered} --hostname=$${:hostname} --port=$${:port}
+  env LC_ALL=C.UTF-8 ${theia-wrapper:rendered} --hostname=$${:hostname} --port=$${:port}
 
 ip =  $${instance-parameter:ipv4-random}
 hostname =  $${:ip}
 port = 3000
 base-url = http://$${:hostname}:$${:port}/
 
-[.bashrc]
-recipe = slapos.recipe.template:jinja2
-rendered = $${directory:home}/$${:_buildout_section_name_}
-template = inline:
-  export PS1="$ " # because we are in a gowork workspace
-  # XXX .bash_profile is not executed, so we introduce a bashrc.theia file
-  # to allow customizations.
-  if [ -f "$HOME/.bashrc.theia" ] ; then
-    source $HOME/.bashrc.theia
-  fi
-  # If not running interactively, don't do anything
-  case $- in
-      *i*) ;;
-        *) return;;
-  esac
-  # enable color support
-  if [ -x /usr/bin/dircolors ]; then
-      test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
-      alias ls='ls --color=auto'
-  fi
-  # common ls aliases
-  alias ll='ls -l'
-  alias la='ls -A'
-  alias l='ls -CF'
 
 [promises]
 recipe =
@@ -156,4 +131,4 @@ pidfiles = $${:var}/run
 services = $${:etc}/service
 framebuffer = $${:srv}/framebuffer
 fonts = $${:srv}/fonts
-home = $${:srv}/home
\ No newline at end of file
+home = $${:srv}/home
-- 
2.30.9