`bzr builddeb -- -us -uc` 失败

`bzr builddeb -- -us -uc` 失败

[PS:我真正想要实现的是学习如何打包新软件]

我按照说明进行操作https://packaging.ubuntu.com/html/packaging-new-software.html#building-the-package

当我执行时bzr builddeb -- -us -uc,显示这些错误:

❯ bzr builddeb -- -us -uc
Building using working tree
Building package in normal mode
Purging the build dir: /home/xxx/test/build-area/hello-2.10
Looking for a way to retrieve the upstream tarball
Upstream tarball already exists in build directory, using that
Building the package in /home/song/test/build-area/hello-2.10, using debuild -us -uc
 dpkg-buildpackage -rfakeroot -us -uc -ui
dpkg-buildpackage: info: source package hello
dpkg-buildpackage: info: source version 2.10-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by xxx <[email protected]>
 dpkg-source --before-build hello-2.10
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
dh clean
   dh_auto_clean
    make -j16 -O distclean
make[1]: Entering directory '/home/xxx/test/build-area/hello-2.10'
There seems to be no Makefile in this directory.
You must run ./configure before running 'make'.
GNUmakefile:106: recipe for target 'abort-due-to-no-makefile' failed
make[1]: *** [abort-due-to-no-makefile] Error 1
make[1]: Leaving directory '/home/xxx/test/build-area/hello-2.10'
dh_auto_clean: make -j16 -O distclean returned exit code 2
debian/rules:18: recipe for target 'clean' failed
make: *** [clean] Error 25
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
debuild: fatal error at line 1152:
dpkg-buildpackage -rfakeroot -us -uc -ui failed
bzr: ERROR: The build failed.

然后查看构建目录:

❯ ls
ABOUT-NLS  aclocal.m4  AUTHORS  build-aux  ChangeLog  ChangeLog.O  config.in  configure  configure.ac  contrib  COPYING  debian  doc  GNUmakefile  hello.1  INSTALL  lib  m4  maint.mk  Makefile.am  Makefile.in  man  NEWS  po  README  README-dev  README-release  src  tests  THANKS  TODO

有人可以看看并给出一些建议吗?

答案1

Benjamin Allot 在发射台错误@steeldriver 在评论中发布。

问题是 dh_auto_clean 调用“make -j4 distclean”,但是 Makefile 尚未由“configure”生成。

解决方法是添加

override_dh_auto_clean:

在你的 debian/rules 文件中。

相关内容