centos:rpm:checkinstall
文書の過去の版を表示しています。
checkinstall
公式:http://asic-linux.com.mx/~izto/checkinstall/ ソースからrpmパッケージを作成するツール
事前準備
主要repoの一発インストール
CentOS 5.x(rpmforgeは一発無理)
rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
CentOS 6.x
rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
開発ツール、他
# yum -y install gcc # yum -y install rpm-build # yum -y install make # yum -y install gettext.x86_64
Git Install from yum repo
※Verが古いので、rpmbuildからのインストール推奨
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm # rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm # yum -y install git
Git Install from rpmbuild
rpmbuild用の環境構築
# yum install rpmdevtools ~省略~ ========================================================================================= パッケージ アーキテクチャ バージョン リポジトリー 容量 ========================================================================================= インストールしています: rpmdevtools noarch 7.5-2.el6 base 109 k 依存性関連でのインストールをします。: elfutils x86_64 0.158-3.2.el6 base 233 k elfutils-libs x86_64 0.158-3.2.el6 base 211 k fakeroot x86_64 1.12.2-22.2.el6 base 73 k fakeroot-libs x86_64 1.12.2-22.2.el6 base 23 k gdb x86_64 7.2-75.el6 base 2.3 M rpm-build x86_64 4.8.0-38.el6_6 updates 127 k unzip x86_64 6.0-2.el6_6 updates 149 k トランザクションの要約 ========================================================================================= インストール 8 パッケージ ~省略~ インストール: rpmdevtools.noarch 0:7.5-2.el6 依存性関連をインストールしました: elfutils.x86_64 0:0.158-3.2.el6 elfutils-libs.x86_64 0:0.158-3.2.el6 fakeroot.x86_64 0:1.12.2-22.2.el6 fakeroot-libs.x86_64 0:1.12.2-22.2.el6 gdb.x86_64 0:7.2-75.el6 rpm-build.x86_64 0:4.8.0-38.el6_6 unzip.x86_64 0:6.0-2.el6_6 完了しました! # rpmdev-setuptree # tree ~/ /root/ ├── rpmbuild │ ├── BUILD │ ├── RPMS │ ├── SOURCES │ ├── SPECS │ └── SRPMS # cd ~/rpmbuild/SOURCES/
rpmbuildに必要な依存ファイルをインストール
# yum install -y zlib-devel openssl-devel curl-devel expat-devel gettext subversion-perl perl-YAML xmlto asciidoc perl-ExtUtils-MakeMaker perl-Error
gitの最新版を取得 ~ rpmbuild
公式:https://git-scm.com/ DL:https://www.kernel.org/pub/software/scm/git/
[ SOURCES]# wget https://www.kernel.org/pub/software/scm/git/git-2.4.5.tar.gz [ SOURCES]# tar xzvf git-2.4.5.tar.gz [ SOURCES]# cp ../SOURCES/git-2.4.5/git.spec ~/rpmbuild/SPECS/ [ SOURCES]# rpmbuild -ba ~/rpmbuild/SPECS/git.spec [ SOURCES]# cd ~/rpmbuild/RPMS/x86_64/ [ x86_64]# ll git-2.4.5-1.el6.x86_64.rpm git-all-2.4.5-1.el6.x86_64.rpm git-arch-2.4.5-1.el6.x86_64.rpm git-cvs-2.4.5-1.el6.x86_64.rpm git-email-2.4.5-1.el6.x86_64.rpm git-gui-2.4.5-1.el6.x86_64.rpm git-svn-2.4.5-1.el6.x86_64.rpm gitk-2.4.5-1.el6.x86_64.rpm gitweb-2.4.5-1.el6.x86_64.rpm perl-Git-2.4.5-1.el6.x86_64.rpm
yumでインストールした古いgitの削除
# yum remove git ~省略~ ========================================================================================= パッケージ アーキテクチャ バージョン リポジトリー 容量 ========================================================================================= 削除: git x86_64 1.7.1-3.el6_4.1 @base 15 M 依存性関連での削除をします。: perl-Git noarch 1.7.1-3.el6_4.1 @base 35 k トランザクションの要約 ========================================================================================= 削除 2 パッケージ ~省略~ 削除しました: git.x86_64 0:1.7.1-3.el6_4.1 依存性の削除をしました: perl-Git.noarch 0:1.7.1-3.el6_4.1 完了しました!
インストール
[ x86_64]# rpm -ivh git-2.4.5-1.el6.x86_64.rpm perl-Git-2.4.5-1.el6.x86_64.rpm [ x86_64]# git --version git version 2.4.5
Install
git repository から最新ソースを取得
# git clone http://checkinstall.izto.org/checkinstall.git # cd checkinstall/
そのままではインストールできないので関連ファイルを修正
# vi Makefile
#CONFDIR=$(PREFIX)/lib/checkinstall CONFDIR=$(PREFIX)
# vi checkinstallrc-dist
# Comma delimited list of files/directories to be ignored #EXCLUDE="" EXCLUDE="/selinux"
# vi installwatch/Makefile
#LIBDIR=$(PREFIX)/lib LBITS := $(shell getconf LONG_BIT) ifeq ($(LBITS),64) LIBDIR=$(PREFIX)/lib64 else LIBDIR=$(PREFIX)/lib endif
# make # make install
パッケージ作成
実行テストを兼ねて、checkinstallのパッケージを作成
CentOS 6.xのみ # mkdir -p /root/rpmbuild/SOURCES # checkinstall checkinstall 1.6.3, Copyright 2010 Felipe Eduardo Sanchez Diaz Duran このソフトウェアはGNU GPLの下でリリースしています。 The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: パッケージのドキュメンテーションを準備..OK 使用するパッケージ方式を選んでください。 Slackwareなら[S], RPMなら[R], Debianなら[D]を入力R ************************************** **** RPM package creation selected *** ************************************** このパッケージは以下の内容で構成されます: 1 - Summary: [ CheckInstall installations tracker, version 1.6.2 ] 2 - Name: [ checkinstall ] 3 - Version: [ 20130419 ] 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で続行します: ~省略~ ********************************************************************** Done. The new package has been saved to /usr/src/redhat/RPMS/x86_64/checkinstall-20130419-1.x86_64.rpm You can install it in your system anytime using: rpm -i checkinstall-20130419-1.x86_64.rpm **********************************************************************
以降は、パッケージを作成したいソースのmakeまで終わらせて、checkinstall実行
centos/rpm/checkinstall.1456205675.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)