CheckInstallのインストール
概要:任意のソフトウエアをパッケージ管理コマンドRPMによりインストールパッケージを一元管理できるように、任意のソフトウエアのソース・アーカイブから,RPM形式やdeb形式,tgz形式のパッケージが作成できるcheckinstallを導入します。
パッケージ化するための詳しい知識がなくても,ソースからパッケージを手軽に生成できます。 1.事前準備 # yum install git Loaded plugins: downloadonly, fastestmirror, priorities Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package git.x86_64 0:1.7.1-2.el6_0.1 will be installed --> Processing Dependency: perl-Git = 1.7.1-2.el6_0.1 for package: git-1.7.1-2.el6_0.1.x86_64 --> Processing Dependency: perl(Git) for package: git-1.7.1-2.el6_0.1.x86_64 --> Processing Dependency: perl(Error) for package: git-1.7.1-2.el6_0.1.x86_64 --> Running transaction check ---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed ---> Package perl-Git.noarch 0:1.7.1-2.el6_0.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: git x86_64 1.7.1-2.el6_0.1 base 4.6 M Installing for dependencies: perl-Error noarch 1:0.17015-4.el6 base 29 k perl-Git noarch 1.7.1-2.el6_0.1 base 28 k Transaction Summary ========================================================================================== Install 3 Package(s) Total download size: 4.7 M Installed size: 15 M Is this ok [y/N]: y Downloading Packages: (1/3): git-1.7.1-2.el6_0.1.x86_64.rpm | 4.6 MB 00:02 (2/3): perl-Error-0.17015-4.el6.noarch.rpm | 29 kB 00:00 (3/3): perl-Git-1.7.1-2.el6_0.1.noarch.rpm | 28 kB 00:00 ------------------------------------------------------------------------------------------ Total 2.2 MB/s | 4.7 MB 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : 1:perl-Error-0.17015-4.el6.noarch 1/3 Installing : git-1.7.1-2.el6_0.1.x86_64 2/3 Installing : perl-Git-1.7.1-2.el6_0.1.noarch 3/3 Verifying : perl-Git-1.7.1-2.el6_0.1.noarch 1/3 Verifying : git-1.7.1-2.el6_0.1.x86_64 2/3 Verifying : 1:perl-Error-0.17015-4.el6.noarch 3/3 Installed: git.x86_64 0:1.7.1-2.el6_0.1 Dependency Installed: perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-2.el6_0.1 Complete! # yum install rpm-build Loaded plugins: downloadonly, fastestmirror, priorities Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package rpm-build.x86_64 0:4.8.0-27.el6 will be installed --> Processing Dependency: patch >= 2.5 for package: rpm-build-4.8.0-27.el6.x86_64 --> Processing Dependency: /usr/bin/gdb-add-index for package: rpm-build-4.8.0-27.el6.x86_64 --> Running transaction check ---> Package gdb.x86_64 0:7.2-56.el6 will be installed ---> Package patch.x86_64 0:2.6-6.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: rpm-build x86_64 4.8.0-27.el6 base 125 k Installing for dependencies: gdb x86_64 7.2-56.el6 base 2.3 M patch x86_64 2.6-6.el6 base 90 k Transaction Summary ========================================================================================== Install 3 Package(s) Total download size: 2.5 M Installed size: 5.7 M Is this ok [y/N]: y Downloading Packages: (1/3): gdb-7.2-56.el6.x86_64.rpm | 2.3 MB 00:01 (2/3): patch-2.6-6.el6.x86_64.rpm | 90 kB 00:00 (3/3): rpm-build-4.8.0-27.el6.x86_64.rpm | 125 kB 00:00 ------------------------------------------------------------------------------------------ Total 2.0 MB/s | 2.5 MB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : patch-2.6-6.el6.x86_64 1/3 Installing : gdb-7.2-56.el6.x86_64 2/3 Installing : rpm-build-4.8.0-27.el6.x86_64 3/3 Verifying : gdb-7.2-56.el6.x86_64 1/3 Verifying : rpm-build-4.8.0-27.el6.x86_64 2/3 Verifying : patch-2.6-6.el6.x86_64 3/3 Installed: rpm-build.x86_64 0:4.8.0-27.el6 Dependency Installed: gdb.x86_64 0:7.2-56.el6 patch.x86_64 0:2.6-6.el6 Complete! 2. CheckInstallのダウンロード # cd /tmp/work
# git clone http://checkinstall.izto.org/checkinstall.git
Initialized empty Git repository in /tmp/work/checkinstall/.git/
3. CheckInstallソースファイルの修正 # cd checkinstall # vi Makefile # $Id: Makefile,v 1.6.2.1 2008/11/09 07:48:18 izto Exp $ # Where to install. PREFIX=/usr/local BINDIR=$(PREFIX)/sbin LCDIR=$(PREFIX)/lib/checkinstall/locale CONFDIR=$(PREFIX)/lib/checkinstall ↓ CONFDIR=$(PREFIX) # vi checkinstallrc-dist # Comma delimited list of files/directories to be ignored EXCLUDE="" ↓ EXCLUDE="/selinux" # vi installwatch/Makefile # Makefile for installwatch # $Id: Makefile,v 0.7.0.6 2008/11/09 07:49:34 izto Exp $ # Well, the only configurable part is the following variable. # Make sure the directory you specify exists. PREFIX=/usr/local # End of configurable part VERSION=0.7.0beta7 BINDIR=$(PREFIX)/bin LIBDIR=$(PREFIX)/lib ↓ LIBDIR=$(PREFIX)/lib64 4. CheckInstallのコンパイル # make (省略) # make install (省略) 5. checkinstall自身のrpmパッケージ作成 # cd /tmp/work/checkinstall # ./checkinstall checkinstall 1.6.3, Copyright 2010 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: y ← デフォルトの内容を使うものとする。 Preparing package documentation...OK Please choose the packaging method you want to use. Slackware [S], RPM [R] or Debian [D]? R ←「R」を入力して[Enter]を押す。 ************************************** **** RPM package creation selected *** ************************************** This package will be built according to these values: 1 - Summary: [ CheckInstall installations tracker, version 1.6.2 ] 2 - Name: [ checkinstall ] 3 - Version: [ 20120922 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ x86_64 ] 8 - Source location: [ checkinstall ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ checkinstall ] Enter a number to change any of them or press ENTER to continue: ←[Enter]を押す。 Installing with make install... : (省略) : ********************************************************************** Done. The new package has been saved to /root/rpmbuild/RPMS/x86_64/checkinstall-20120922-1.x86_64.rpm You can install it in your system anytime using: rpm -i checkinstall-20120922-1.x86_64.rpm ********************************************************************** 6. checkinstall自身のインストール # cd /root/rpmbuild/RPMS/x86_64 ← パッケージの作成フォルダー。
# rpm -ivh /root/rpmbuild/RPMS/x86_64/checkinstall-20120922-1.x 86_64.rpm
Preparing... ########################################### [100%]
1:checkinstall ########################################### [100%]
# rpm -qi checkinstall ←「checkinstall」のインストールを確認する。
Name : checkinstall Relocations: (not relocatable)
Version : 20120922 Vendor: (none)
Release : 1 Build Date: Sat 22 Sep 2012 01:27:44 AM JST
Install Date: Sat 22 Sep 2012 01:30:19 AM JST Build Host: rad-xen-vweb6
Group : Applications/System Source RPM: checkinstall-20120922-1.src.rpm
Size : 453050 License: GPL
Signature : (none)
Packager : checkinstall-1.6.3
Summary : CheckInstall installations tracker, version 1.6.2
Description :
CheckInstall installations tracker, version 1.6.2
CheckInstall keeps track of all the files created or
modified by your installation script ("make install"
"make install_modules", "setup", etc), builds a
standard binary package and installs it in your
system giving you the ability to uninstall it with your
distribution's standard package management utilities.
Last-modified: 2014-03-11 (火) 02:00:03 (3693d)
|