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