############################################################################## # # checkinstall 1.5.0 # # # ############################ # # # # Installs a compiled program from the program's source directory using # # "make install" or any other command supplied on checkinstall's command # # line. checkinstall will create a Slackware, RPM or Debian compatible # # package and install it using your distribution's standard package # # administration utilities. # # # # This version of checkinstall needs enough free space on the partition # # holding the temp dir (/var/tmp by default) to write there a # # temporary copy of the package. # # # ############################################################################## ====== CONTENTS ====== 1. Introduction 2. Usage 2.1. Download, configure, build 2.2. The "doc-pak" directory 2.3. Package description 2.4. Package creation 2.4.1 Slackware packages 2.4.2 RPM packages 2.4.3 Debian packages 3. Customization and command line switches 4. Notes ====== 1. INTRODUCTION ====== A lot of people has asked me how can they remove from their boxes a program they compiled and installed from source. Some times - very few - the program's author adds an "uninstall" rule to the Makefile, but that's not usually the case. That's my primary reason to write checkinstall. After you ./configure;make your program, It will run "make install" (or whatever you tell it to run) and keep track of every file modified by this installation, using the excellent installwatch utility written by Pancrazio 'Ezio' de Mauro . When "make install" is done, checkinstall will create a Slackware, RPM or Debian package and install it with Slackware's installpkg or "rpm -i" as appropriate, so you can view it's contents in /var/log/packages or remove it with removepkg (for Slackware), "rpm -ql" and "rpm -e" (RPM) or "dpkg -I" and "dpkg -r" (Debian). Additionally, this script will leave a copy of the installed package in the source directory so you can install it wherever you want, which is my second motivation: I don't have to compile the same software again and again every time I need to install it on another box :-). Another nice thing about checkinstall is that it can be run simultaneously by any number of users and each instance will get only the files modified by it's processes and no one else's, unlike some other tools based on a "find / -atime etc etc etc". Not to mention that checkinstall is A LOT faster =) It is important to note that checkinstall can keep track of files modified by any command line, not just a "make install". You can create your own installation script with lots of command in it and then have checkinstall track them for you. IMPORTANT NOTE: Because of a couple of bugs found in checkinstall 1.2, you may have to check the permissions of /tmp and the owner/permissions of /var/checkinstalltmp if you ever ran that version. The /tmp directory should have 1777 permission and be owned by root. /var/checkinstalltmp should be 0700/root:root. See the RELNOTES file for details. ====== 2. USAGE ====== == 2.1 == Download, configure, build o Download your software, i.e. Afterstep-1.8.4.tgz o Extract the files: tar xzvf Afterstep-1.8.4 o cd to the source directory, configure and compile: cd Afterstep-1.8.4 ./configure make == 2.2 == The "doc-pak" directory o Optionally you can make a directory called "doc-pak" whose contents will be installed in /usr/doc/ inside the package you're about to create. checkinstall will remind you about this one if it notices there is no "doc-pak" on the source directory. Good candidates to be there are: README, INSTALL, COPYING, Changelog, TODO, CREDITS, etc. It's up to you what to copy in there. mkdir doc-pak cp README INSTALL COPYING Changelog TODO CREDITS doc-pak As of checkinstall-1.1 if you don't create the "doc-pak" directory then checkinstall will ask if you want it to build a default documentation directory with files having common documentation names like those mentioned in the above paragraph. If you say no, your package will have no documentation. == 2.3 == Package description (Changed in checkinstall-1.3.0) If you create a file named "description-pak" it's contents will be used to include a description and summary in the new package, which will be displayed when you use "pkgtool" or "rpm -qi". For example: Create the file "description-pak": ---------------------- Cut here ---------------------- AfterStep window manager The one and only! This is a window manager with a NexT inspiration. ---------------------- Cut here ---------------------- If checkinstall doesn't find that file it will create one, asking you for a description to put in it. NOTE: Slackware's pkgtool doesn't seem to handle package filenames longer than 8 characters when displaying the package list in the "Remove" section, but the "View" option works OK. I hope that Pat or someone can take the time to fix this. I'll try to fix it myself if i find the time to do it. As a result, I've decided not to prepend every line in the PACKAGE DESCRIPTION section of the /var/log/packages entry with package-name:. It is difficult to read in the /var/log/packages file and it's pretty useless in the pkgtool's remove package section listing. The description are stored "as is". Anyway, it's not that bad.. ;-) == 2.4 == Package creation o You normally would su and make install. Now it's only su: su password: xxxxx o Run checkinstall: checkinstall NOTE: If you give no arguments to checkinstall it will run a "make install". If you give arguments, the first non-option argument will be used as the install command. This is useful when the install command is not "make install" but something else like "make install_packages" or "setup" or whatever, i.e. checkinstall make install_packages checkinstall make modules_install checkinstall install.sh checkinstall setup checkinstall rpm -i my-package-1.0.i386-1.rpm == 2.4.1 == Slackware packages o checkinstall will ask if you want to see the installation results, then run the modified Slackware package maker "makepak". If you want checkinstall to use the original Slackware's "makepkg" then change the MAKEPKG variable inside the checkinstall script and read this: makepkg will ask you a couple of questions: If there are any symbolic links in the installed package it will ask you to remove them and make an installation script to re-create them whenever you install the package. This is a GOOD THING, so answer YES. --> BTW, makepkg doesn't always ask you this (depending on whether you have symbolic links or not) so be careful and read before you answer, you could be answering the wrong question. Read on: makepkg will *always* ask if you want to change the owner, group and permissions of EVERY file in the package to root:root:755. This is BAD most of the times, always answer NO to that question, unless you know what you are doing, of course ;) o In the end, checkinstall will install the package with installpkg so you can remove it later with Slackware's removepkg (Our initial intention :) ). Additionally, it will leave a copy of the package in the source directory, the package's name will be name_of_current_directory-pak.tgz. Using the Afterstep example, the file would be named Afterstep-1.8.4-pak.tgz. The "pak" is added to differentiate this installable package from the source one. This is for Slackware packages, of course. RPM's and Debian packages are created using their standard naming schemes. o NEW in version 1.3.1: You can add a customized installation script which will be run by "installpkg" every time you use it to install your new package. Write it and name it "install-pak" and checkinstall will include it for you. This script can be useful to set up the system to fit the newly installed package: create new users, set permissions, initialize databases, rcscripts, etc. Again, this is for Slackware packages. Support for "preinstall", "postintall", etc. scripts will be added soon for both RPM and Debian packages. == 2.4.2 == RPM package creation support CheckInstall has the ability to build binary RPM packages. After you write the package's description the script will prompt you to choose a package type. If you chose RPM ("R") then it will figure out some sane values and write a minimal spec file. You can of course supply your own file, in this case checkinstall will use the values you put in there to build the rpm and skip the spec file writing step. If any problems arise while building/installing the rpm you'll get a chance to see the log files and figure out what went wrong. So far I've seen -or heard of- checkinstall running and building RPM packages in this distributions: o Slackware 7.x/8.0 o RedHat 6.2/7.x o SuSe 7.x o Mandrake 7.x/8.0 In x86, ppc and sparc, BTW. If you have succesfully used checkinsttall in some other distro I'd really appreciate if you let me know =). == 2.4.3 == Debian package creation support That's right, CheckInstall can now create Debian packages. Do I need to say more? =) The Debian support in CheckInstall is still experimental, so handle with care. It has been reported to work OK in some Debian systems and it certainly works OK in my Slackware development system with dpkg installed. Your mileage may vary. And of course, it it *does* vary, I'd really like it if you send me a message telling me about it so I can fix it ;-). NOTE to non-Debian-based users: =============================== To build Debian packages you need to have dpkg installed. I got mine from: http://www.debian.org/Packages/unstable/base/dpkg.html Also, you need to have all of your basic filesystem structure included ("installed") in your dpkg database, or you won't be able to remove most .deb packages installed (either checkinstall-generated ones or not). dpkg seems to be unwilling to remove things like "/", "/usr" and such, wich are obviously included in nearly every package you install. The way to avoid this particular problem is to have a "base" package installed containing those directories, in this way dpkg won't complain about removing other packages. I've put a "aaa_base-1.0-1.deb" package in the CheckInstall's home page as a work-around for this problem. Install it with "dpkg -i aaa_base-1.0-1.deb" and then forget about it =). "dpkg -I aaa_base-1.0-1.deb" should give you some useful info about the package. ====== 3. CheckInstall customization ====== CHANGE in CheckInstall 1.4.0: The variable declaration section in the checkinstall script has been removed, you should now edit the checkinstallrc file, normally installed under /usr/local/lib/checkinstall. In the checkinstallrc file you will find some variables wich modify checkinstall's default behaviour. They're described here (and are also well commented in the file, BTW). Starting at version 1.4.0, checkinstall supports a lot of command line switches, which if specified will override the options set in the checkinstallrc file. ==================================== The command line options are these: Usage: checkinstall [options] Options: -d<0|1|2> Set debug level -A, --arch= Set architecture -t,--type= Choose packaging system -S Build a Slackware package -R Build a RPM package -D Build a Debian package -si Run an interactive install command --showinstall= Toggle interactive install command -ss Run an interactive Slackware installation script --showslack= Toggle interactive Slackware installation script --exclude= Exclude files/dirs --autodoinst= Toggle the creation of a doinst.sh script --deldoc= Delete doc-pak upon termination --delspec= Delete spec file upon termination --strip= Strip any ELF binaries found inside the package --bk Backup any overwritten files --backup= Toggle Backup --spec= .spec file location --help, -h Show this message --copyright Show Copyright information --version Show version information ======================================== And the checkinstallrc values are these: o DEBUG: Set the debug level (Default: 0) 0 => No debug 1 => Keep all files except the ones inside the package 3 => Keep those files too. o INSTALLWATCH_PREFIX: Prefix to installwatch's library and program o INSTALLWATCH: Location of the installwatch program o BASE_TMP_DIR: Prefix to all checkinstall's temporary files/dirs NEVER, EVER set this to "/tmp" or "/". Setting it to "/tmp" will change /tmp's permission to 700 (definitely no good) and setting it to "/" one will erase all of your files by means of a "rm -rf /*". You have been warned! o ARCHITECTURE: Default target architecture for the package. (Default: empty) If your rpm program is configured to build packages for i686 instead of i386 (for example) then you'll find this handy to avoid the need to tell checkinstall your architecture type every time it is run. The default is auto-detect. o INSTYPE: What kind of packages are we building? (Default: empty) Set it to "S" for Slackware's .tgz, "R" for RedHat and friends' .rpm, "D" for Debian and leave it empty to have checkinstall ask you every time. o RPMFLAGS: RPM install command optional flags. o SHOW_INSTALL: Boolean (0 or 1) (Default: 1) Show -or not- the results of the install command as it runs. Useful for interactive install commands. o SHOW_SLACK_INSTALL: Boolean (0 or 1) (Default: 0) Show -or not- the results of the Slackware's installpkg command as it runs. As the option above, this can be useful for interactive install scripts. o DEL_DOCPAK: Boolean (Default: 1) Delete -or not- the "doc-pak" directory upon program's termination. o DEL_SPEC: Boolean (Default: 1) Delete -or not- the .spec file upon termination. o DEL_DESC: Boolean (Default: 1) Delete -or not- the "description-pak" file. o STRIP_ELF: Boolean (Default: 1) Strip -or not- any ELF binaries found inside the package. o BACKUP: Boolean (Default: 1) Backup -or not- any pre-existent files that would be overwritten by the package installation. o AUTODOINST: Boolean (Default: 1) Write a doinst.sh script wich will be executed everytime you install the package with installpkg. o EXCLUDE: Comma delimited list List of files/directories to be ignored when searching for files to be included in the package. o ACCEPT_DEFAULT: Boolean (Default: 0) Accept default values for all questions? ====== 4. Notes ====== CheckInstall currently is unable to track any file system changes made by statically linked programs. This is being worked on and I hope to have it ready in a couple of weeks or so. Then again, it could be a couple of months, but the important thing is that it will be ready soon ;). Debian support is now included! UPDATE jan-18-2001: RPM support is already in place, inst2rpm supplied the template for the mini-spec file used by checkinstall. Thanks to Jon A. Christopher for writing it. Another thing in the works is the addition of a friendlier interface based on the dialog tool (which will give us curses-like character based menus AND X11 graphical menus at no extra cost =) ) There are some extra features planned like package updating, automated friendly installation process going from extracting the files to the installation including configure options, build, etc. Sometime in the future I will rewrite this in C/Gtk or something, too. Ideas, bug reports, patches, etc: By the way, there is an utility called Spasm which looks somewhat similar to checkinstall. You may want to check it out: http://www.codejunkie.net ========== $Id: README,v 1.5.0.1 2001/07/20 06:51:37 izto Exp $