dh_auto_installステップでDebianパッケージのビルドが失敗する

dh_auto_installステップでDebianパッケージのビルドが失敗する

私は非常にシンプルなDebianパッケージを作成しようとしています。main_file2つのファイルがありfunctionsますfunctionsmain_fileecho

Makefile次のようなものがあります。

install:
    cp main_file $(DESTDIR)/usr/bin/main_file
    cp functions $(DESTDIR)/usr/bin/functions

また、以下のようにdebianディレクトリに制御ファイルがあります。

Source: ad
Section: unknown
Priority: extra
Maintainer: James Kelly <[email protected]>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
Homepage: <insert the upstream URL, if relevant>
Package: ad
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Just messing around
 Playing with debian packages

コードを含むディレクトリの上のディレクトリとコードとMakefile

実行すると$ dpkg-depcheck -d ./configureエラーが発生します。

strace: ./configure: command not found
Running strace failed (command line:
strace -e trace=open,execve -f -q -o /tmp/depchwOSqtO ./configure

依存関係がないので重要ではないと思うので、実行するとdpkg-buildpackage -rfakerootエラーが発生します。

dh_auto_clean
dh_auto_clean: failed to write to debian/ad.debhelper.log: Permission denied
END failed--call queue aborted.
make: *** [clean] Error 13
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2

sudo dpkg-buildpackage -rfakeroot最後に、プロセスをさらに実行するとエラーが発生します。

dh_auto_install
make[1]: Entering directory `/home/james/Dummy_Debian/ad-1.0'
cp main_file /home/james/Dummy_Debian/ad-1.0/debian/ad/usr/bin/main_file
cp: cannot create regular file `/home/james/Dummy_Debian/ad-1.0/debian/ad/usr/bin/main_file': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/james/Dummy_Debian/ad-1.0'
dh_auto_install: make -j1 install DESTDIR=/home/james/Dummy_Debian/ad-1.0/debian/ad returned exit code 2
make: *** [binary] Error 29
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

私は一日中この問題に苦しんでいて、おそらく私が間違っている簡単なことだと思います。誰かが私を助けることができれば、私は永遠に感謝します!

編集する:

私のルールファイルはここにあります:

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
    dh  $@

そして私のサンプルコードを含むzipファイルへのリンクです。

ベストアンサー1

debhelper(7) は破損したファイルを含むMakefilebuild( dh_auto_build) および install( dh_auto_install) ファイルを試みるため、変更する必要があるMakefileか、上書きを追加することで無視できますdebian/rules

override_dh_auto_build override_dh_auto_install:  
        @

debian/install以下を含むファイルを作成します。

main_file  /usr/bin
functions  /usr/bin

Debian パッケージングについてもっと読む

おすすめ記事