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 on Ubuntu Hoary 5.04, 1.0.7~feisty1
28 on Ubuntu Hoary 7.04
29
30 New in userinstall 0.1.1 (Changes since userinstall 0.1)
31 --------------------------------------------------------
32
33 * Fixed an argument parsing error in the user-setup script.
34
35 Configuration
36 -------------
37
38 If the system defaults are not to be used, or if userinstall is not installed
39 as a system package, the userinstall-defaults file supplied with the
40 distribution may be edited to specify the nature and location of the personal
41 package manager. The following settings can be edited:
42
43 DISTNAME This should reflect the distribution being used and need only
44 be altered in special situations. Note that the setup process
45 may not work with different distributions due to library
46 incompatibilities.
47
48 PACKAGEROOT The location of the personal package manager in the
49 filesystem.
50
51 If a completely new userinstall-defaults file is created, it is essential that
52 the above variables be defined so that the scripts know where to create or to
53 find the personal package manager.
54
55 Creating a Personal Package Manager
56 -----------------------------------
57
58 In order to install packages as a non-root user, first invoke the user-setup
59 script; this will create and initialise a basic Debian system with a basic set
60 of packages installed. For example, with userinstall installed as a system
61 package, using the system defaults:
62
63 user-setup
64
65 Or with defaults in the current directory:
66
67 ./user-setup
68
69 It is possible to override the "template" for the system by specifying a
70 "mirror" location. This is useful if you have the CD or DVD image for the
71 distribution already mounted in the filesystem. For example:
72
73 user-setup file:///cdrom
74 user-setup file:///home/me/downloads/kubuntu-7.04-alternate-i386.iso
75
76 An URI must be specified as the "mirror" location, not a normal filename.
77
78 Adding Package Repositories to the Package Manager
79 --------------------------------------------------
80
81 To get access to repositories of packages beyond those provided by the basic
82 distribution, edit the /etc/apt/sources.list file inside the system. The
83 user-path script can help you find the exact location of the file:
84
85 user-path /etc/apt/sources.list
86
87 Or with defaults in the current directory:
88
89 ./user-path /etc/apt/sources.list
90
91 And you can edit the file directly with a text editor (such as vi) as follows:
92
93 vi `user-path /etc/apt/sources.list`
94
95 Or with defaults in the current directory:
96
97 vi `./user-path /etc/apt/sources.list`
98
99 Installing Packages
100 -------------------
101
102 To install packages from other repositories, invoke the user-apt-get script
103 with the options expected by the regular apt-get program. For example:
104
105 user-apt-get --help
106 user-apt-get update
107
108 It may be necessary to install the gnupg package to enable package signature
109 verification:
110
111 user-apt-get install gnupg
112
113 Then, other packages can be installed. For example:
114
115 user-apt-get install python-cmdsyntax
116
117 Provided that the specified packages are known and their dependencies can be
118 met, they will be installed into the system.
119
120 Installing Single Packages
121 --------------------------
122
123 To install individual package files, invoke the user-dpkg-i script with the
124 name of the package file. For example:
125
126 user-dpkg-i /home/me/downloads/python-cmdsyntax_0.91-0ubuntu2_all.deb
127
128 This script will copy the file into the personal package management
129 environment and run dpkg with the -i (install) option.
130
131 Using Packages
132 --------------
133
134 Unlike most packages installed in the usual way by the root user, the installed
135 packages will not reside within a directory hierarchy rooted at / - the top of
136 the filesystem. Instead, they will reside in a location such as the following:
137
138 /home/me/.userinstall
139 /tmp/packages
140
141 (The precise location may be found by running the user-path script.)
142
143 Consequently, to make use of the installed software, it may be necessary to
144 edit your environment in a number of ways so that it may be located and
145 correctly loaded, initialised and executed.
146
147 Using Python Packages
148 ---------------------
149
150 Installed Python packages may be made available to Python by defining the
151 PYTHONPATH to include the directories usually searched by Python, but which
152 are actually located within the personal package management environment. For
153 example, with the Python 2.5 site-packages directory:
154
155 PYTHONPATH=`user-path /usr/lib/python2.5/site-packages/` python2.5
156
157 More complicated extension modules may require further adjustments to the
158 LD_LIBRARY_PATH and PYTHONPATH variables:
159
160 export LD_LIBRARY_PATH=`./user-path /usr/lib`
161 export PYTHONPATH=`./user-path /usr/lib/python2.5/site-packages/`
162 export PYTHONPATH=${PYTHONPATH}:`./user-path /var/lib/python-support/python2.5`