diff options
Diffstat (limited to 'development')
-rw-r--r-- | development/non_root.mdwn | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/development/non_root.mdwn b/development/non_root.mdwn new file mode 100644 index 0000000..680d7ee --- /dev/null +++ b/development/non_root.mdwn @@ -0,0 +1,61 @@ +# Developing as non root + +Many example tell you to do things like + + sudo python setup.py install + +or + + sudo gem install foo + +or + + ./configure --prefix=/ + make install + +While this is o.k. if you know what you're doing and you give a crap +about package management risking to break other scripts and tools by +introducint new library versions it is often much better to not install +the libraries into a location where other tools can setp on it +(e.g. /usr/lib, /usr/bin or /usr/local/*). + +## Ruby + +Use bundler to pull Gems from [rubygems.org](http://rubygems.org). The *Gemfile* +describes what you want to pull in: + + group :development, :test do + gem 'puppetlabs_spec_helper', :require => false + gem 'puppet-lint', :require => false + gem 'puppet', puppetversion, :require => false + gem 'rake', '~> 10.1.0', :require => false + gem 'rspec-puppet', :require => false + gem 'simplecov', :require => false + end + +With that in place you can run + + sudo apt-get install bundler + bundle install --path=vendor + +and it will fetch the gems and put them into vendor/. No cluttering of +any directories outside your project. + +## NodeJS + +npm + +## GNOME + +jhbuild + +## Generic C/C++ project + +For a limited set of libs you can do: + + PREFIX=$PWD/../installed + ./configure --prefix=$PREFIX + make install + export LD_LIBRARY_PATH=$PREFIX + +see e.g. liblanfahr's ./run |