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