1 Introduction
2 ------------
3
4 The userinstall distribution consists of a number of scripts, together with a
5 short configuration file, which allows non-root users to set up and use their
6 own package and dependency management facilities and to download and install
7 Debian packages without having to obtain root privileges. The software within
8 installed packages may then be used, subject to certain constraints such as
9 program environments, library paths, and so on. In effect, userinstall
10 provides a personal package manager.
11
12 Contact, Copyright and Licence Information
13 ------------------------------------------
14
15 The current Web page for userinstall at the time of release is:
16
17 http://www.boddie.org.uk/paul/userinstall.html
18
19 Copyright and licence information can be found in the docs directory - see
20 docs/COPYING.txt and docs/gpl-3.0.txt for more information.
21
22 Dependencies
23 ------------
24
25 fakeroot Tested with 1.5.10ubuntu2
26 fakechroot Tested with 2.5-1.1
27 debootstrap Tested with 0.3.3.2ubuntu3
28
29 Configuration
30 -------------
31
32 If the system defaults are not to be used, or if userinstall is not installed
33 as a system package, the userinstall-defaults file supplied with the
34 distribution may be edited to specify the nature and location of the personal
35 package manager. The following settings can be edited:
36
37 DISTNAME This should reflect the distribution being used and need only
38 be altered in special situations.
39 PACKAGEROOT The location of the personal package manager in the
40 filesystem.
41
42 If a completely new userinstall-defaults file is created, it is essential that
43 the above variables be defined so that the scripts know where to create or to
44 find the personal package manager.
45
46 Creating a Personal Package Manager
47 -----------------------------------
48
49 In order to install packages as a non-root user, first invoke the user-setup
50 script; this will create and initialise a basic Debian system with a basic set
51 of packages installed. For example, with userinstall installed as a system
52 package, using the system defaults:
53
54 user-setup
55
56 Or with defaults in the current directory:
57
58 ./user-setup
59
60 It is possible to override the "template" for the system by specifying a
61 "mirror" location. This is useful if you have the CD or DVD image for the
62 distribution already mounted in the filesystem. For example:
63
64 user-setup file:///cdrom
65 user-setup file:///home/me/downloads/kubuntu-7.04-alternate-i386.iso
66
67 An URI must be specified as the "mirror" location, not a normal filename.
68
69 Adding Package Repositories to the Package Manager
70 --------------------------------------------------
71
72 To get access to repositories of packages beyond those provided by the basic
73 distribution, edit the /etc/apt/sources.list file inside the system. The
74 user-path script can help you find the exact location of the file:
75
76 user-path /etc/apt/sources.list
77
78 Or with defaults in the current directory:
79
80 ./user-path /etc/apt/sources.list
81
82 And you can edit the file directly with a text editor (such as vi) as follows:
83
84 vi `user-path /etc/apt/sources.list`
85
86 Or with defaults in the current directory:
87
88 vi `./user-path /etc/apt/sources.list`
89
90 Installing Packages
91 -------------------
92
93 To install packages from other repositories, invoke the user-apt-get script
94 with the options expected by the regular apt-get program. For example:
95
96 user-apt-get --help
97 user-apt-get update
98 user-apt-get install python-cmdsyntax
99
100 Provided that the specified packages are known and their dependencies can be
101 met, they will be installed into the system.
102
103 Installing Single Packages
104 --------------------------
105
106 To install individual package files, invoke the user-dpkg-i script with the
107 name of the package file. For example:
108
109 user-dpkg-i /home/me/downloads/python-cmdsyntax_0.91-0ubuntu2_all.deb
110
111 This script will copy the file into the personal package management
112 environment and run dpkg with the -i (install) option.
113
114 Using Packages
115 --------------
116
117 Unlike most packages installed in the usual way by the root user, the installed
118 packages will not reside within a directory hierarchy rooted at / - the top of
119 the filesystem. Instead, they will reside in a location such as the following:
120
121 /home/me/.userinstall
122 /tmp/packages
123
124 (The precise location may be found by running the user-path script.)
125
126 Consequently, to make use of the installed software, it may be necessary to
127 edit your environment in a number of ways so that it may be located and
128 correctly loaded, initialised and executed.
129
130 Using Python Packages
131 ---------------------
132
133 Installed Python packages may be made available to Python by defining the
134 PYTHONPATH to include the directories usually searched by Python, but which
135 are actually located within the personal package management environment. For
136 example, with the Python 2.5 site-packages directory:
137
138 PYTHONPATH=`user-path /usr/lib/python2.5/site-packages/` python2.5
139
140 More complicated extension modules may require further adjustments to the
141 LD_LIBRARY_PATH and PYTHONPATH variables:
142
143 export LD_LIBRARY_PATH=`./user-path /usr/lib`
144 export PYTHONPATH=`./user-path /usr/lib/python2.5/site-packages/`
145 export PYTHONPATH=${PYTHONPATH}:`./user-path /var/lib/python-support/python2.5`