summaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-12-28 16:36:43 +0100
committerGuido Günther <agx@sigxcpu.org>2014-12-28 16:39:01 +0100
commit95a74041c81aa4fb78d3c90044779285a0765126 (patch)
treec4f4f1715e0a87a6fe988194a578ebad54932557 /development
parentaa54abca935a50ee9650e511c5b95797bb5ac89e (diff)
Start document explaining how to not clutter $system
Diffstat (limited to 'development')
-rw-r--r--development/non_root.mdwn61
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