我正在制作一个示例,将.net应用程序打包到.deb源代码包中。我用Debian教程中的步骤制作了一个存储库,但在我的例子中,它适合于.net应用程序。
回购包含三个步骤(shell文件),因此复制包是一个接一个地运行它们。
最后,您将得到一个名为hello-world的可执行文件,位于./output/src。您可以运行它,然后它打印Hello World。
但是,我的make文件也将其复制到所需的文件夹:
prefix = /usr/local
all:
./build.sh .
install:
# install hello-world $(DESTDIR)$(prefix)/bin
cp hello-world $(DESTDIR)$(prefix)/bin/
clean:
rm -f hello-world(install和cp在这里做同样的工作。同样,遵循本教程)
因此,我希望在./output/src/debian/hello-world/usr/bin中可以找到相同的可执行文件。
但在某一步它就会发生变异。最初的可执行文件是13 Mb,运行良好,这个执行文件是11 Mb,并给出了
Failure processing application bundle; possible file corruption.
Arithmetic overflow while reading bundle.
A fatal error occured while processing application bundle知道是什么造成的吗?我还尝试通过执行debuild --check-option="--no-lintian"禁用lintian,并尝试在googling中搜索禁用剥离。前者没有改变任何东西,我也没有发现任何关于禁用剥离(dh_strip步骤)的内容。
二进制diff告诉我,它是从末尾截断的:

编辑9个小时后:我怀疑,这是因为dh_strip步骤,这很可能是这样做的。但我也想不出怎么禁用它。
发布于 2022-11-02 00:33:09
我也碰上了这个。通过编辑dh_strip文件禁用rules似乎对我有用。
#!/usr/bin/make -f
%:
dh $@
override_dh_strip:
dh_strip --exclude YOUR_ASSEMBLY_NAMEhttps://stackoverflow.com/questions/73443111
复制相似问题