[ubuntu-dev] Bug#627405: Reduce usage of sudo
Stefano Rivera
stefanor at debian.org
Mon May 23 16:52:28 UTC 2011
Hi Mehdi (2011.05.20_14:05:45_+0200)
> a lot of scripts do use intensively "sudo". Is it so hard to type
> "sudo $command"?
I agree and am also concerned about these. However, it isn't something
that can be trivially fixed in many of them.
Examples:
sudo defaults to unsetting HOME these days, so sudo pbuilder-dist will
do the wrong thing (read the wrong .pbuilderrc).
In packages that test-build, pbuilder needs to be run as root, but one
doesn't want to prepare the source package as root.
mk-sbuild needs to do some things as root (i.e. playing with LVs), and
some as the user. But running sudo apt-get when the user types mk-sbuild
--help, is rather obnoxious :) (I fixed this in 0.123)
setup-packaging-environment needs to do some things as root, but not
everything. It's meant to be an easy-to-use script, and to do the right
thing.
Now for the good news:
We know we have a bunch of cruft in ubuntu-dev-tools, and are trying to
do something about it. We had a discussion at UDS:
https://blueprints.launchpad.net/ubuntu-dev-tools/+spec/other-o-udt-upstreaming
Many of the problematic scripts are intended to go away, and be merged
with similar scripts that are lacking some necessary bit of
functionality.
mk-sbuild, check-symbols, get-build-deps and reverse-build-depends are
all scheduled for merging.
pbuilder-dist{,-simple} can hopefully be taken over by pbuilder.
> Or, at least, $command should inform the user that some operations are
> performed using "sudo".
For the unfixable scripts, that's probably the best thing to do.
SR
--
Stefano Rivera
http://tumbleweed.org.za/
H: +27 21 465 6908 C: +27 72 419 8559 UCT: x3127
More information about the ubuntu-dev-team
mailing list