Spaceman
From Gnuffy
Spaceman is Gnuffy's wonderful package manager. It is very fast and easy to use. You can get the latest version at
http://linux01.gwdg.de/~nlissne/spaceman-current.tar.bz2 if you do not want to get the whole svn tree.
Spaceman is BETA software and suffering from children's diseases. Don't be scared if it doesn't work as you expected it to do and please report bugs and wishes.
If you want to create a repository yourself, also read: PKGBUILD, Repositories
For more explicit information, see the Installation Howto.
Contents |
Basic package managing commands
Searching packages
spaceman -s <keyword>
searches for keyword in package names The <keyword> can be a grep-style regexp, i.e. if you want to list all packages named "bash" but you dont want packages like "bashburn" or "bash-completion" to appear in the results, you can use "spaceman -s ^bash$" or if you want See "man grep" for details about grep regexp.
spaceman -S <keyword>
searches for keyword in package name or description Of course, <keyword> can be a grep-style regexp again.
Hint: if you don't want to see description and URL in the search-results, you can add --short to get 1 result per line (pkgname and repository/signer only).
Installation of packages
spaceman -i <pkgname> [pkgname] [pkgname]...
installs the given package(s) to your system. If there are more than one package matching your request (like with "spaceman -i libgl") you get a dialog to chose the package you want. <pkgname> may or may not include version-number and release-number. If you include a version number you can also search with expressions like spaceman -i "bash>=3" which would result in bash-version with at least version 3.0 - Please keep in mind to use quotes around "bash>=3" to prevent the shell redirecting the output to a file called "=3"
Normally, spaceman will automatically resolve dependencies and add any package needed by the packages you install. If you don't want it to check dependencies for some reason, you can add -d or --nodeps, to prevent it.
If your system seems broken for some reason, and you actually want to install a package and re-install all dependency of the package (although these dependencies are installed already) the addition of --deep will pull in any dependency and subdependency to your installation list.
Deinstallation of packages
spaceman -R <pkgname> [pkgname] [pkgname]...
removes the given package(s). When spaceman removes packages it will check if the package to remove is a dependency of another package installed and if the dependencies of the package to remove are still dependencies of other packages installed (or otherwise may be removed, too) - it will not automatically remove more than you gave on command line, but offers to select more packages if they are not needed anymore (as seen by dependency tree) or will not work without the package you remove (reverse-dependencies).
Spaceman's basic output
There are several dialogs you will see quite often.
Search results
When calling spaceman -i, spaceman -s or any other command that searches the package list, spaceman will output them in a certain layout. For example:
spaceman-0.8.2.beta.2375-1 3A8EC1C3 (new key-ID! repository name: blackpenguin) secure package manager for gnuffy src/bin URL: http://gnuffy.chaotika.org - approx. build-time: <1 minute
Or
inkscape-0.46-4 arch-extra (not signed) A vector-based drawing program - svg compliant src/bin URL: http://inkscape.sourceforge.net/
On the left hand side, you see, from up to down:
- The name and version of the package. If you use spaceman's default colors, installed packages will be printed out in yellow color, uninstalled in your terminal's default color.
- A description of the package as described in its pkgdesc (see PKGBUILD).
- The URL of the project's home page (or, if someone used spaceman --interactive or --newpkgbuild and didn't adjust the url variable, its download directory. Fix it up!)
On the right hand side, you see, from up to down:
- The name of the repository and the GPG key a package is signed with, if it is. Otherwise, you get the information "not signed" which, by default, is colored red. If it is a Gnuffy repository, the information will be - by default - green for trusted and yellow for used repositories.
- Available types of the package: src for source means that a PKGBUILD is available and you can build the package using spaceman -bi pkgname. bin for binary means spaceman -i pkgname will install the binary package. If only "src" is available, spaceman -i pkgname will start the build process.
- Approximated build time. Keep in mind that it is only for orientation because the build time depends on your machine.
Choice between packages
When calling spaceman -i <pkg>, it might happen that there are different versions of a package, possibly out of different repositories. For example, if you try to install inkscape, you might get
There is more than one package matching 'inkscape':
name version repository/signed by
1 X inkscape 0.46-4 arch-extra (not signed)
2 · inkscape-svn 18529-1 (PKGBUILD) aur-attic (not signed)
You can browse through the different results using the up and down arrow keys. The selected entry, indicated by the X after the index number and, if you use default colors, the green color, is what spaceman would install if you had called it with the parameter --dontask. Autoselecting is done by counting the number of packages that are already installed from a certain repository, so on an average Gnuffy, this would be arch-extra or arch-core. After the index number and the selection indicator, you see package name and version; after that the notice (PKGBUILD) if the package is only available as PKGBUILD. The last column contains repository name and GPG key ID.
If you use the up and down keys, you will see that the information on bottom of the dialog changes. You get the standard search result output (see above). Press F10 to continue.
File conflicts
If you want to install a package and spaceman finds that installing the package would overwrite a file that already exists on your system, it asks you what to do now. The dialog might look like the following:
Package htop-0.8-1 has conflicts.
This is not necessarily a problem, but please examine what is going on.
Select files to exclude from extraction (to keep them unchanged)
Going to overwrite any file not selected here with version from htop-0.8-1.
owner filename
-> 1 · unknown /usr/bin/htop
As the dialog appears, no file is by standard selected to be protected. You can use the up and down keys to browse through the results and press Enter or the index number to select one. Selected files are indicated by the X after the index number and, if you use default colors, green color. Selected files will be kept as they are and not be overwritten. If you want to cancel completely, just press Ctrl-C. Files that are not selected will be overwritten. You can add files that you want never to be overwritten to /etc/spaceman/NoUpgrade.
In the "owner" column you can see if the file belongs to an already installed package, then you see the package's name, or if its origin is "unknown" (as in the example above).
Pressing F10 will end the dialog and continue with protecting selected and overwriting unselected files.
Files that have been changed after installation
When installing packages that are already installed, for example in case of updates, spaceman checks the timestamps of all files that belong to the installed version of the package. If spaceman detects a file that has been changed after the installation date and time of the respective package (for example a config file that you edited), it opens a dialog that might look like the following:
WARNING: detected files that has been changed after installation
Please select any file that should be protected from overwriting.
A protected file is registered in /etc/spaceman/manually_changed_files and the original version from the
package-archive is installed as filename.orig.htop- while the file itself is kept unchanged.
If you want a file already registered in /etc/spaceman/manually_changed_files to be overwritten by the original
version from the package - unselect it here and it will be removed from /etc/spaceman/manually_changed_files
filename date of install/update date of last change
-> 1 · /usr/bin/htop 2008/07/20 02:34 2008/07/20 02:35
You can navigate using the up and down keys. Select files to be protected from overwriting by pressing Enter or their index number. Again, selection is indicated by an X behind the index number instead of the dot. Files that are not protected will be overwritten when you press F10. Press Ctrl+C to cancel the whole process. Add files that you don't ever want to be overwritten to /etc/spaceman/NoUpgrade.
Removing packages and (reverse) dependencies
If you want to deinstall a package spaceman checks as well for dependencies as for reverse dependencies. Dependencies of the package you want to remove that do not have any other reverse dependencies are likely to be useless waste on your system afterwards, so you are given the chance to select them for removal.
Reverse dependencies are packages that depend on the package you want to remove. For example, if firefox depends on xulrunner, xulrunner is a dependency of firefox and firefox is a reverse dependency of xulrunner. So, spaceman -R xulrunner would show you firefox as a reverse dependency of xulrunner and give you the chance to select it for removal.
Navigation and selecting works as described for the dialogs above.
After you went through the dependencies and reverse dependencies of the package you want to remove and the dependencies and reverse dependencies if its dependencies and reverse dependencies, you get
Last chance to quit or deselect packages! The following packages are tagged for remove: -> 1 X htop-0.8-1
This is the last chance to quit or deselect packages. So if you notice that you did something terribly wrong, nothing is lost up to now and you can safely press Ctrl+C without having done any changes to your system.
Spaceman's configuration files
The spaceman configuration files reside inside /etc/spaceman. The names of the files are self-explanatory, but there might anyway be some questions.
- freezed.packages lists packages which are freezed to their current versions. Control the content of this file with spaceman --freeze <pkgname>. You can use comments here because there is no package named e.g. "#filesystem-0.7-8".
- NoUpgrade lists files which may not be overwritten. You can also use comments here because there is no file "#/usr/bin/irssi" or something similar to that.
- keys.(blocked|trusted|used) lists keys which are blocked, trusted and used. The same thing with the comments again. See repositories article for further information on blocked/trusted/used keys.
- manually_changed_files: if you update a package, spaceman compares the change dates of the files with the installation date of the package. if one or more files have been changed after the installation of the package, spaceman will give you the chance to keep them and prevent him from overwriting. These files will be listed here.
- ignored.updates contains a list of updates that have been ignored. Spaceman won't offer them again.
- mirrors lists mirrors of repositories.
- exclude: if you want to prevent spaceman from ever creating certain files, put them here
- repository.equivalents: one list of repositories that will be handled as one per line
- spaceman.conf is the spaceman configuration file.
Spaceman's variables
You have the possibility to set many variables which control spaceman's use of files and directories. Usually, you would not want to use most of them. They have sane default values. You only need to set them for very special purposes.
- SPACEMAN_ROOTDIR is the variable which sets spaceman's rootdir. If you install Gnuffy out of another system, you surely want to
export SPACEMAN_ROOTDIR=/mnt/gnuffy
or whatever that future root directory might be. You must set this variable in the shell; there is no use putting it into spaceman.conf because spaceman expects this file to be inside $SPACEMAN_ROOTDIR/etc/spaceman/spaceman.conf by default.
- Setting SPACEMAN_CONFIGFILE in the shell changes this circumstance.
Other variables are defined in the spaceman function clean_init. As it would usually be not reasobable to change their values, I will not list them here. The concerned variables are quite well commented, you will find it easy to understand their function if you know what you want to do.
If you want to change the value of one of these variables, there is no need in editing spaceman itself: They do only receive their default value if they do not already have a value. So you would, if you know what you are doing, just add them to /etc/spaceman/spaceman.conf with the desired content.
Hints and bugs
Spaceman needs curl if you want to publish your own repositories. Wget is sufficient for installation of Gnuffy and use of spaceman.
There are several known bugs which are not fixed yet. Be also aware aware of the fact that, if one version works, the next one is not sure to do so.....
A really serious problem is the following one: spaceman mounts / somewhere inside $spaceman_rootdir/var/whatever and forgets to unmount it almost every time you press Ctrl-C. Avoid pressing Control-c.
And don't try to remove $SPACEMAN_ROOTDIR after using spaceman, which could have the same effect as typing rm -rf / because spaceman does not unmount your root directory in some cases. Make sure everything is unmounted before removing the directory.
There is an emergency-unmount script in our svn. Notice that, the more often you use spaceman, press ctrl-c and the stuff is not unmounted, the longer this script will take to do it.
And a last tip for you...: there is a command which will help you in many situations.
# spaceman --help

