Hatena::ブログ(Diary)

comuttの日記 このページをアンテナに追加 RSSフィード

2009-10-04

CentOS 5.3 に checkinstall を入れるの巻き

| 21:43 |  CentOS 5.3 に checkinstall を入れるの巻きを含むブックマーク

git で最新版を取得してみる

http://asic-linux.com.mx/~izto/checkinstall/checkinstall.git/

を見て、仰せの通りに取得

$ git clone http://checkinstall.izto.org/checkinstall.git

コンパイル&インストール。が・・・

INSTALL を見て、これまた(ほぼ)仰せの通りに。

$ make
$ sudo make install
$ sudo /usr/local/sbin/checkinstall

checkinstall すると、以下を聞かれた。特に特別なことはしなかった。

使用するパッケージ方式を選んでください。
Slackwareなら[S], RPMなら[R], Debianなら[D]を入力

入力 ===> R

変更するものの番号を入力してください。Enterで続行します:

入力 ===> Return

**********************************************************************

 Done. The new package has been saved to

 /usr/src/redhat/RPMS/i386/checkinstall-20091004-1.i386.rpm
 You can install it in your system anytime using:

      rpm -i checkinstall-20091004-1.i386.rpm

**********************************************************************

と言われたので、正直に

skomatsu@brazill ~/checkinstall-current/checkinstall
$ cd /usr/src/redhat/RPMS/i386/

skomatsu@brazill /usr/src/redhat/RPMS/i386
$ ls -la
合計 152
drwxr-xr-x 2 root root   4096 10月  4 19:59 .
drwxr-xr-x 9 root root   4096 10月  4 19:52 ..
-rw-r--r-- 1 root root 129911 10月  4 19:59 checkinstall-20091004-1.i386.rpm

skomatsu@brazill /usr/src/redhat/RPMS/i386
$ sudo rpm -ivh checkinstall-20091004-1.i386.rpm
準備中...                ########################################### [100%]
   1:checkinstall           ########################################### [100%]
エラー: アーカイブの伸長に失敗: ファイル /selinux/context;4ac88039: cpio: open失敗 - 許可がありません

しょぼーん(´・ω・)

回避策

で、ぐーぐるさんにお伺いしたところ、以下のメーリングリストの投稿を発見。

http://checkinstall.izto.org/cklist/msg00776.html

On Mon, 29 Aug 2005, Paul Smith wrote:

On 8/29/05, honey@xxxxxxxxx <honey@xxxxxxxxx> wrote:

I am using checkinstall 1.6.0 on Fedora Core 4, which creates my rpms

without any problems. However, when I go to install the rpm, I get the

following message:

# rpm -i mypackage-1.6.1-1.i386.rpm

error: unpacking of archive failed on file /selinux/context;43132312:

cpio: open failed - Permission denied

#

Any advice?

--exclude=/selinux

What for, Honey, is the line above?

Use the following command line in FC4:

checkinstall --fstrans=no --exclude=/selinux

ので、--fstrans=noは付けずに以下を実行。

skomatsu@brazill ~/checkinstall-current/checkinstall
$ sudo /usr/local/sbin/checkinstall --exclude=/selinux

skomatsu@brazill ~/checkinstall-current/checkinstall
$ cd /usr/src/redhat/RPMS/i386/

skomatsu@brazill /usr/src/redhat/RPMS/i386
$ sudo rpm -ivh checkinstall-20091004-1.i386.rpm
Preparing...                ########################################### [100%]
   1:checkinstall           ########################################### [100%]

出来た!

補足

なお、--fstrans=noを付けると、

Some of the files created by the installation are inside the home directory: /home

You probably don't want them to be included in the package.
Do you want me to list them?  [n]: 

と言われてしまった。

対象のファイル達は、

/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-de.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-es.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-id.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-it.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-ja.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-no.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-pt_BR.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-ru.mo
/home/skomatsu/checkinstall-current/checkinstall/locale/checkinstall-zh_CN.mo

だった。

単純に n と答えればよいのかなとも思ったけど、

なんか良くなさそうだったので、--fstrans=no は外した。

ちなみに、--fstrans自体は

--fstrans=<yes|no>             Enable/disable the filesystem translation code

ということで、ファイルシステム(パス?)を変換する/しない、ということみたい。

リンク元