HardySimpson / zlog

A reliable, high-performance, thread safe, flexsible, clear-model, pure C logging library.
Apache License 2.0
2.25k stars 720 forks source link

issues when packaging on Debian #270

Open yuzibo opened 1 month ago

yuzibo commented 1 month ago

hi,

Thanks for your work. Now I am packaging it on Debian, but when I enable the test running on Debian, I got the error:

89% tests passed, 2 tests failed out of 19                                                                                            

Total Test time (real) = 24907.00 sec                                                                                                 

The following tests FAILED:
          4 - test_conf2 (Failed) 
         11 - test_multithread (SEGFAULT)
Errors while running CTest
make[1]: *** [Makefile:74: test] Error 8
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
        rm -fr -- /tmp/dh-xdg-rundir-TKrW8Dj8
dh_auto_test: error: cd obj-x86_64-linux-gnu && make -j16 test ARGS\+=--verbose ARGS\+=-j16 returned exit code 2
make: *** [debian/rules:16: binary] Error 25                                                                                          
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Now I post this to here to remind me to look at this deeply when I have time. thanks.

yuzibo commented 1 month ago

As the title indicates, there are many issues found when packaging on Debian, so I record this one by one on here.

yuzibo commented 1 month ago
libzlog1: file-references-package-build-path [usr/lib/x86_64-linux-gnu/libzlog.so.1.2.18]

lintian's warning about file-references-package-build-path

lintian-explain-tags file-references-package-build-path
N:
I: file-references-package-build-path
N:
N:   The listed file or maintainer script appears to reference the build path used to build the package as specified in the Build-Path
N:   field of the .buildinfo file.
N:
N:   This is likely to cause the package to be unreproducible, but it may also indicate that the package will not work correctly outside
N:   of the maintainer's own system.
N:
N:   Please note that this tag will not appear unless the .buildinfo file contains a Build-Path field. That field is optional. You may
N:   have to set DEB_BUILD_OPTIONS=buildinfo=+path or use --buildinfo-option=--always-include-path with dpkg-buildpackage when building.
N:
N:   Please refer to https://reproducible-builds.org/, https://wiki.debian.org/ReproducibleBuilds/BuildinfoFiles, and the
N:   dpkg-genbuildinfo(1) manual page for details.
N:
N:   Visibility: info
N:   Show-Always: no
N:   Check: files/contents

I have tried many methods like the above mention but no good results, so I record this here.

yuzibo commented 1 month ago
I: libzlog1: hardening-no-bindnow [usr/lib/x86_64-linux-gnu/libzlog.so.1.2.18]

The lintian hits is below:

$ lintian-explain-tags hardening-no-bindnow
N:
I: hardening-no-bindnow
N:
N:   This package provides an ELF binary that lacks the "bindnow" linker flag.
N:
N:   This is needed (together with "relro") to make the "Global Offset Table" (GOT) fully read-only. The bindnow feature trades startup
N:   time for improved security. Please consider enabling this feature or consider overriding the tag (possibly with a comment about
N:   why).
N:
N:   If you use dpkg-buildflags, you may have to add hardening=+bindnow or hardening=+all to DEB_BUILD_MAINT_OPTIONS.
N:
N:   The relevant compiler flags are set in LDFLAGS.
N:
N:   Please refer to https://wiki.debian.org/Hardening for details.
N:
N:   Visibility: info
N:   Show-Always: no
N:   Check: binaries/hardening

But the issue was always existed.