问题描述
我以root身份运行电子包装器时遇到问题。但是,当我以其他用户身份(例如,无业游民)运行它时,它就可以正常工作。
I'm having issue building electron via electron-packager when I run it as root. However, it works just fine when I run it as other user, say, vagrant.
我已经问过有关该问题的问题
I've already asked question regarding the problem here.
但是,我认为,如果我可以将Buildbot配置为在工作者/从属服务器上以非root用户身份运行,那么我可以解决这个问题。
However, I think that if I can configure Buildbot to run as non-root on worker/slave I can get past the issue.
我可以没有找到任何资源来解释这种配置设置。
I just can't find any resources that explain such a configuration setup.
我正在运行Buildbot Master和Worker(Slave)一个单独的Vagrant CentOS7 VM。一切正常,但是调用 npm run-script build-linux
的构建步骤失败,如链接的问题所述。
I'm running Buildbot Master and Worker(Slave) an separate Vagrant CentOS7 VM's. All is working, but build step that calls npm run-script build-linux
fails as described in linked question.
环境信息
Mac OS X 10.11.5
Vagrant version: 1.8.4
Linux CentOS 7 3.10.0-327.18.2.el7.x86_64
Python version: 2.7.5
Buildbot version: 0.8.14
Buildslave version: 0.8.14
Twisted version: 16.3.2
推荐答案
Buildbot从属正在以root用户身份运行,因为我在配置脚本中使用了sudo,即
Buildbot-slave was running as root because I was using sudo in the provisioning script, i.e.
sudo pip install buildbot-slave
仅使用以下方法即可解决:
Fix was simply using:
pip install buildbot-slave
通过主管运行 twistd --nodaemon --no_save -y buildbot.tac&
。
在buildbot.conf文件中设置user = vagrant。需要 vagrant ssh
进入vm才能运行 supervisord -n&
,因为在流浪汉期间通过Provision.sh运行仍然以root身份运行buildslave。
Running twistd --nodaemon --no_save -y buildbot.tac &
via supervisord.Set user=vagrant in buildbot.conf file. Need to vagrant ssh
into vm to run supervisord -n &
, as running that via provision.sh during vagrant up still runs buildslave as root.
感谢@Louis发表评论,指出我的方向正确。
Thanks to comment by @Louis for pointing me in right direction.
这篇关于我如何以非超级用户身份在工作者/从属上运行Buildbot构建步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!