Debian checkinstall は install=no を無視します。パッケージを自動的にインストールせずにどのようにビルドできますか?

Debian checkinstall は install=no を無視します。パッケージを自動的にインストールせずにどのようにビルドできますか?

さて、ここに私を混乱させる1つのことがあります...ソースからパッケージを構築し、それを使ってcheckinstall.debパッケージを作成しようとしています。私は.debパッケージだけを作成したいのですが、作成したくありません。インストールするそれ。

例を挙げましょう。私はUbuntu 11.04を使用しており、まずfehデフォルトのリポジトリからそのパッケージをインストールしました。バージョン番号は次のとおりです。1.3.4.dfsg.1-3

その後、ビルドを試みます。feh ソースから;を渡す必要があります。new makefehsplendid はコマンドラインから実行できます。

最後に、debパッケージを生成するには、次のコマンドラインを使用します。

sudo checkinstall -D -y \
  --install=no \
  --fstrans=no \
  --reset-uids=yes \
  --pkgname=feh \
  --pkgversion=2.7 \
  --pkgrelease="tar.bz2" \
  --arch=i386 \
  --pkglicense=GPL \
  --maintainer="Debian PhotoTools Maintainers <[email protected]>" \
  --pakdir=../.. \
  --requires=libc6,libice6,libsm6,libx11-6,libxaw7,libxext6,libxmu6,libxt6,dpkg,install-info

わかりました。私が使ったことを参考にしてください。--install=noそこ?彼はそうman checkinstall言った。

--install 生成されたパッケージのインストールを切り替えます。

さて、以下はcheckinstallこのコマンドへの応答です。

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

/usr/bin/checkinstall: eval: line 598: syntax error near unexpected token `newline'
/usr/bin/checkinstall: eval: line 598: `echo Debian PhotoTools Maintainers <[email protected]>'

The package documentation directory ./doc-pak does not exist. 
Should I create a default set of package docs?  [y]: y

Preparing package documentation...OK

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values: 

0 -  Maintainer: [ root@mypc ]
1 -  Summary: [ Package created with checkinstall 1.6.2 ]
2 -  Name:    [ feh ]
3 -  Version: [ 2.7 ]
4 -  Release: [ tar.bz2 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ feh-2.7 ]
9 -  Alternate source location: [  ]
10 - Requires: [ libc6,libice6,libsm6,libx11-6,libxaw7,libxext6,libxmu6,libxt6,dpkg,install-info ]
11 - Provides: [ feh ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue: 

Installing with make install...

========================= Installation results ===========================
installing manuals to /usr/local/share/man
installing docs to /usr/local/share/doc/feh
installing executables to /usr/local/bin
installing fonts to /usr/local/share/feh/fonts
installing images to /usr/local/share/feh/images
installing examples to /usr/local/share/doc/feh/examples

======================== Installation successful ==========================

いいえおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおおお! ! ! ! ! ! ! !

私はこのクソパッケージをインストールしたくありません。だから--install=no大声で叫ぶのです!

その後、明らかにねじれようとする意図で記録が続いた。

Copying documentation directory...
./
./TODO
./AUTHORS
./COPYING
./ChangeLog
./README

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

NOTE: The package will not be installed

冗談を言う」注:このパッケージはインストールされません。「、そうですね、先生checkinstall?もちろんです。仕事が終わると、次のような結果が表示されます。

$ apt-cache show feh | grep Version
Version: 1.10-1

$ feh --version
feh version 2.7
Compile-time switches: curl xinerama 

$ which feh
/usr/local/bin/feh

それがどこから来たのかはわかりません1.10-1(少なくとも言及したようにそうするべきですか1.3.4?)。しかし、明らかに2.7はインストールしないという指示にもかかわらずインストールされます。

もちろん、後で削除してみることもできます。

$ sudo dpkg -r feh
(Reading database ... 202193 files and directories currently installed.)
Removing feh ...
$ sudo dpkg --purge feh
(Reading database ... 202163 files and directories currently installed.)
Removing feh ...
Purging configuration files for feh ...
$ feh --version
feh version 2.7
Compile-time switches: curl xinerama 
$ which feh
/usr/local/bin/feh

...しかし動作しませんdpkg --purgeapt-get remove手動でインストールされた.debパッケージなので、最初は動作しませんでした)。バージョンを提供しないことに加えてdpkg -r(それで何を削除するのかわかりません) - 実際に実行可能ファイルを削除しませんか? !

しかし、ここで何が起こっているのか、checkinstallそれにどのように到達するのかを説明できる人はいますか?ただ同時にインストールせずに.debを作成しますか?ボーナスの質問 - すべてのファイルを削除する方法、含むに実行可能ファイルがインストールされています。明らかに動作しない/usr/local/bin/からですか?dpkg -r

ベストアンサー1

そうですね。今何が起こっているのか理解しているようです。私が逃した鍵は次のとおりです。

Installing with make install...

これはmake install、2.7ソースパッケージが実行されたことを意味します。おそらく、それらの場所が新しい.debに書き込まれるように、これらのファイルが終わる場所を「確認」するためですか?しかし、とにかく新しい2.7 .debは実際にはインストールされていません。したがって、削除することはできず、dpkg -r.deb以降も実行可能ファイルはまだ存在しますdpkg -r

したがって、実行後にこのインストールを削除するには、実際にソースフォルダから呼び出すcheckinstall必要があります。make uninstallfeh

$ make uninstall
rm -f /usr/local/share/man/man1/feh.1 /usr/local/share/man/man1/feh-cam.1
rm -f /usr/local/share/man/man1/gen-cam-menu.1
rm -rf /usr/local/share/doc/feh
rm: cannot remove `/usr/local/share/doc/feh/TODO': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/examples/keys': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/examples/themes': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/examples/buttons': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/AUTHORS': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/ChangeLog': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/README': Permission denied
make: *** [uninstall] Error 1

$ sudo make uninstall
rm -f /usr/local/share/man/man1/feh.1 /usr/local/share/man/man1/feh-cam.1
rm -f /usr/local/share/man/man1/gen-cam-menu.1
rm -rf /usr/local/share/doc/feh
rm -f /usr/local/bin/feh /usr/local/bin/feh-cam /usr/local/bin/gen-cam-menu
rm -rf /usr/local/share/feh/fonts
rm -rf /usr/local/share/feh/images

...最後に新しく作成されたパッケージを試すことができます。

$ sudo dpkg -i feh_2.7-tar.bz2_i386.deb 
Selecting previously deselected package feh.
(Reading database ... 202165 files and directories currently installed.)
Unpacking feh (from feh_2.7-tar.bz2_i386.deb) ...
Setting up feh (2.7-tar.bz2) ...
Processing triggers for man-db ...

$ feh --version
feh version 2.7
Compile-time switches: curl xinerama 

$ sudo dpkg --purge feh
(Reading database ... 202198 files and directories currently installed.)
Removing feh ...
dpkg: warning: while removing feh, directory '/usr/local/share/doc' not empty so not removed.
Processing triggers for man-db ...

$ feh --version
bash: /usr/local/bin/feh: No such file or directory

# or in new terminal 
$ feh --version
The program 'feh' is currently not installed.  You can install it by typing:
sudo apt-get install feh

ああ、わかりました...しかし、プロセスがどのように進行するのかを正確に理解したいと思います...

おすすめ記事