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