0

I'm making an example packing a .net app into .deb source package. I made a repo with steps implemented from Debian's tutorial, but in my case adapted for the .net app.

The repo contains three steps (shell files), so reproducing the package is running them one by one.

In the end you get an executable called hello-world located at ./output/src. You can run it, and it prints Hello World.

My make file, however, also copies it to the required folder:

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 and cp are doing the same job here AFAIK. Again, following the tutorial)

So I expect the same executable to be found at ./output/src/debian/hello-world/usr/bin.

But at some step it gets mutated. The original executable is 13 Mb and runs fine, and this one is 11 Mb and gives

Failure processing application bundle; possible file corruption.
Arithmetic overflow while reading bundle.
A fatal error occured while processing application bundle

Any idea what caused that? I also tried disabling lintian by doing debuild --check-option="--no-lintian" and tried googling about disabling stripping. The former didn't change anything and I didn't find anything on disabling stripping (dh_strip step).

Binary diff tells me, that it was truncated from the end: screenshot showing that the corrupt executable is the original's first 30823 lines

Edit after 9 hours: I suspect, that it's because of the dh_strip step, which is what probably does it. But I also can't figure out how to disable it either.

WhiteBlackGoose
  • 110
  • 2
  • 8

1 Answers1

0

I was also running into this. Disabling dh_strip by editing the rules file seemed to work for me.

#!/usr/bin/make -f
%:
    dh $@
 
override_dh_strip:
    dh_strip --exclude YOUR_ASSEMBLY_NAME
Andrew Miller
  • 105
  • 1
  • 9