[MediaWiki-commits] [Gerrit] integration/config[master]: fab: change sudo prefix

2017-09-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379186 )

Change subject: fab: change sudo prefix
..


fab: change sudo prefix

'sudo -ni' makes sudo to start a login shell and pass the command to the
shell with '-c'.

Hence:
   sudo('foo')

Ends up as:

  /bin/bash -c foo

That is not matched by the sudo rules and causes troubles.

Instead, have sudo set the target user $HOME environment variable
instead of using the invoker $HOME.

Bug: T167845
Change-Id: If96cc82d7fb773310833e8e2c8bf448c8690191d
---
M fabfile.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Hashar: Looks good to me, but someone else must approve
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/fabfile.py b/fabfile.py
index cc7d361..9119d9c 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -15,7 +15,7 @@
 from fabric.api import *  # noqa
 from fabric.contrib.console import confirm
 
-env.sudo_prefix = 'sudo -ni '
+env.sudo_prefix = 'sudo -H '
 env.use_ssh_config = True
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/379186
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If96cc82d7fb773310833e8e2c8bf448c8690191d
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] integration/config[master]: fab: change sudo prefix

2017-09-20 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379186 )

Change subject: fab: change sudo prefix
..

fab: change sudo prefix

'sudo -ni' makes sudo to start a login shell and pass the command to the
shell with '-c'.

Hence:
   sudo('foo')

Ends up as:

  /bin/bash -c foo

That is not matched by the sudo rules and causes troubles.

Instead, have sudo set the target user $HOME environment variable
instead of using the invoker $HOME.

Bug: T167845
Change-Id: If96cc82d7fb773310833e8e2c8bf448c8690191d
---
M fabfile.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/86/379186/1

diff --git a/fabfile.py b/fabfile.py
index 7747120..e32b8c5 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -13,7 +13,7 @@
 from fabric.api import *  # noqa
 from fabric.contrib.console import confirm
 
-env.sudo_prefix = 'sudo -ni '
+env.sudo_prefix = 'sudo -H '
 env.use_ssh_config = True
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/379186
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If96cc82d7fb773310833e8e2c8bf448c8690191d
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits