![即使对代码进行了微小的更改,构建 Debian 软件包也会失败](https://linux22.com/image/195480/%E5%8D%B3%E4%BD%BF%E5%AF%B9%E4%BB%A3%E7%A0%81%E8%BF%9B%E8%A1%8C%E4%BA%86%E5%BE%AE%E5%B0%8F%E7%9A%84%E6%9B%B4%E6%94%B9%EF%BC%8C%E6%9E%84%E5%BB%BA%20Debian%20%E8%BD%AF%E4%BB%B6%E5%8C%85%E4%B9%9F%E4%BC%9A%E5%A4%B1%E8%B4%A5.png)
我可以make
使用以下过程构建 Debian 软件包:
apt-get source make
cd make-*
dpkg-buildpackage --build=binary --no-sign
但是一旦我对代码进行任何更改,即使改变字符串中的一个字符,然后构建在测试期间失败:
1 Test in 1 Category Failed (See .diff* files in work dir for details) :-(
make[4]: *** [Makefile:1373: check-regression] Error 1
make[4]: Leaving directory '/mnt/src/deb/MAKE/make-dfsg-4.2.1/debian/build-make-guile'
make[3]: *** [Makefile:1114: check-am] Error 2
make[3]: Leaving directory '/mnt/src/deb/MAKE/make-dfsg-4.2.1/debian/build-make-guile'
make[2]: *** [Makefile:820: check-recursive] Error 1
make[2]: Leaving directory '/mnt/src/deb/MAKE/make-dfsg-4.2.1/debian/build-make-guile'
dh_auto_test: error: cd debian/build-make-guile && make -j8 check VERBOSE=1 returned exit code 2
make[1]: *** [debian/rules:50: override_dh_auto_test] Error 255
make[1]: Leaving directory '/mnt/src/deb/MAKE/make-dfsg-4.2.1'
make: *** [debian/rules:24: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
我已经粘贴了完整的输出这里
如何构建包含自定义更改的包?
答案1
理想情况下,您应该更新测试套件以考虑您的更改。
然而,可以完全避免测试套件,使用标准化的构建选项:
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc