Help needed in making a package reproducible - delly

Mohd Bilal mdbilal at disroot.org
Thu Aug 11 12:35:25 BST 2022


On 8/10/22 23:19, Chris Lamb wrote:
> Sure thing. So, one telltale sign in the diffoscope output is the
> following hunk:
> 
> │ │ │ │ ├── strings --all --bytes=8 {}
> │ │ │ │ │ @@ -402,15 +402,15 @@
> │ │ │ │ │  GLIBCXX_3.4.29
> │ │ │ │ │  CXXABI_1.3
> │ │ │ │ │  GLIBCXX_3.4
> │ │ │ │ │ -/build/1st/delly-1.0.3/src/htslib/
> │ │ │ │ │ +/build/2/delly-1.0.3/2nd/src/htslib/
> │ │ │ │ │  AWAVAUATUSH
> │ │ │ │ │  []A\A]A^A_
> 
> In other words, your /usr/bin/delly binary is embedding the build
> path.
> 
> Often this is because a package is not obeying CFLAGS/CXXFLAGS etc
> from dpkg-buildflags (which contains the magic -ffile-prefix-map=
> argument), but looking at the build log I think your package is always
> calling g++ in a way that respects this... even when calling Make
> recursively here:
> 
>      .htslib: $(HTSLIBSOURCES)
>                if [ -r src/htslib/Makefile ]; then cd src/htslib &&
>                  autoheader && autoconf && ./configure --disable-s3
>                  --disable-gcs --disable-libcurl --disable-plugins &&
>                  $(MAKE) && $(MAKE) lib-static && cd ../../ && touch
>                  .htslib; fi
> 
> But a quick glance at your package's Makefile suggests that the path
> is coming from:
> 
>      # Submodules
>      PWD = $(shell pwd)
>      EBROOTHTSLIB ?= ${PWD}/src/htslib/
> 
> ... and may very well be related to how the "static-lib" target is
> compiled:
> 
>      # Flags for static compile
>      ifeq (${STATIC}, 1)
>        LDFLAGS += -static -static-libgcc -pthread -lhts -lz -llzma -lbz2
>      else
>        LDFLAGS += -lhts -lz -llzma -lbz2 -Wl,-rpath,${EBROOTHTSLIB}
>      endif
>                                              ^^^^^^^^^^^^^^^^^^^^^^
> 
> Hope this quick message helps put you on the right path...
> 

Thank you so much for your detailed insights regarding this issue. 
Indeed the problem was with htslib dir. The htslib dir is included as a 
git submodule in the upstream source whereas we use the debian packaged 
version of the library for delly. So infact there is no actual use of 
the embedded directory anywhere.

So I've added in a patch to replace  EBROOTHTSLIB with 
/usr/include/htslib for including the installed lib headers and now the 
reprotest passes[1] \o/

[1] - https://salsa.debian.org/med-team/delly/-/jobs/3093815


One again thanks for your help :)

Regards
-- 
╭───────────────────────────────────────────────────╮
│ Mohammed Bilal                                    │
│ 2D65 BC1E B966 5A6E 97F9 730A B3F5 9452 8521 9E1F │
╰───────────────────────────────────────────────────╯
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20220811/394cacd7/attachment.sig>


More information about the Reproducible-builds mailing list