jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
419 stars 65 forks source link

Debian compilation warnings / Lintian policy violations #418

Closed tsunulukai closed 3 years ago

tsunulukai commented 3 years ago

myMPD version: 6.11.0

Describe the bug

During package compilation a few warning/errors are generated by lintian It does not prevent building a package that works fine.

lintian
-------

Setup apt archive
-----------------

[... output omitted for brevity ...] 

Install lintian build dependencies (apt-based resolver)
-------------------------------------------------------
[... output omitted for brevity ...] 

W: mympd source: package-depends-on-hardcoded-libc mympd depends
E: mympd source: source-is-missing dist/htdocs/sw.min.js
E: mympd source: source-is-missing htdocs/js/home.js line length is 12944 characters (>512)
E: mympd source: source-is-missing htdocs/test/api.js line length is 1163 characters (>512)
E: mympd source: source-is-missing htdocs/test/blns.js line length is 554 characters (>512)
E: mympd source: source-is-missing dist/htdocs/js/i18n.min.js
E: mympd source: source-is-missing dist/htdocs/js/keymap.min.js
E: mympd source: source-is-missing dist/htdocs/js/long-press-event.min.js
W: mympd source: debian-rules-missing-recommended-target build-arch
W: mympd source: debian-rules-missing-recommended-target build-indep
E: mympd: debian-changelog-file-missing
E: mympd: no-copyright-file
W: mympd: description-synopsis-starts-with-article
W: mympd: non-standard-dir-perm etc/ 0775 != 0755
W: mympd: non-standard-dir-perm lib/ 0775 != 0755
W: mympd: non-standard-dir-perm lib/systemd/ 0775 != 0755
W: mympd: non-standard-dir-perm lib/systemd/system/ 0775 != 0755
W: mympd: non-standard-dir-perm usr/ 0775 != 0755
W: mympd: non-standard-dir-perm usr/bin/ 0775 != 0755
W: mympd: binary-without-manpage usr/bin/mympd
W: mympd: binary-without-manpage usr/bin/mympd-config
W: mympd: binary-without-manpage usr/bin/mympd-script
W: mympd: maintainer-script-ignores-errors postinst
W: mympd: maintainer-script-ignores-errors postrm

E: Lintian run failed (policy violation)

+------------------------------------------------------------------------------+
| Post Build                                                                   |
+------------------------------------------------------------------------------+

[... output omitted for brevity ...] 

+------------------------------------------------------------------------------+
| Summary                                                                      |
+------------------------------------------------------------------------------+

Build Architecture: amd64
Build Type: binary
Build-Space: 87172
Build-Time: 55
Distribution: buster-amd64
Host Architecture: amd64
Install-Time: 24
Job: /root/builder/mympd_6.11.0-1.dsc
Lintian: fail
Machine Architecture: amd64
Package: mympd
Package-Time: 89
Source-Version: 6.11.0-1
Space: 87172
Status: successful
Version: 6.11.0-1
--------------------------------------------------------------------------------
Finished at 2021-01-30T15:31:36Z
Build needed 00:01:29, 87172k disk space

To Reproduce

Steps to reproduce the behavior:

  1. Build package for amd64 arch using https://github.com/jcorporation/myMPD/files/4658795/build-mympd-debian.sh.txt
  2. Observe the warning/errors happenning just before the Post-Build process

Expected behavior

The different permissions issues should be fixed (775 --> 755) Some other warning/errors could be worth investigating. I'll leave the assessment to your discretion :)

Builder plattform:

jcorporation commented 3 years ago

On permission errors: my build script sets an umask 0022 before running the build and install commands.

the source missing errors are strange...

I have ignored all the other warnings, but a build without errors would be good.

tsunulukai commented 3 years ago

Lintian is a helper tool that checks Debian software packages for common inconsistencies and errors.

When building debian packages using sbuild, post-processing them with lintian is in the standard build toolchain pipeline. Opensuse builder seems not to use lintian in its pipeline, hence the reason you don't see such errors in their build log (https://build.opensuse.org/package/live_build_log/home:jcorporation/myMPD/Debian_10/x86_64)

I never took the time to scroll through the myMPD sbuild output before, but every build I remember compiling always had the Lintian: fail in the build log summary.

I tried again with v6.4.0 and got more or less the same errors/warnings from the Lintian helper:

W: mympd source: package-depends-on-hardcoded-libc mympd depends
E: mympd source: source-is-missing dist/htdocs/sw.min.js
E: mympd source: source-is-missing htdocs/test/blns.js line length is 554 characters (>512)
E: mympd source: source-is-missing dist/htdocs/js/i18n.min.js
E: mympd source: source-is-missing dist/htdocs/js/keymap.min.js
W: mympd source: debian-rules-missing-recommended-target build-arch
W: mympd source: debian-rules-missing-recommended-target build-indep
E: mympd: debian-changelog-file-missing
E: mympd: no-copyright-file
W: mympd: non-standard-dir-perm etc/ 0775 != 0755
W: mympd: non-standard-dir-perm lib/ 0775 != 0755
W: mympd: non-standard-dir-perm lib/systemd/ 0775 != 0755
W: mympd: non-standard-dir-perm lib/systemd/system/ 0775 != 0755
W: mympd: non-standard-dir-perm usr/ 0775 != 0755
W: mympd: non-standard-dir-perm usr/bin/ 0775 != 0755
W: mympd: binary-without-manpage usr/bin/mympd
W: mympd: binary-without-manpage usr/bin/mympd-config
W: mympd: maintainer-script-ignores-errors postinst
W: mympd: maintainer-script-ignores-errors postrm

Once again, myMPD just runs fine even though lintian returns warnings/errors on the package, but as debian uses lintian output as a filter for automatic package rejections, it'd be best practice to fix those issues :)

Each error/warning tag is explained with more details on the lintian website:

dir-permissions warning is indeed strange with the 0022 umask...

jcorporation commented 3 years ago

The build.ah script uses the umask not the cross compile script. I think I should merge this scripts together.

Note for me: set -euo pipefail should be set.

The source is missing errors are triggered from long lines, but this is ok. The files are minimized javascript files.

payback007 commented 3 years ago

I had also some issure during compilation process but a ./build.sh installdeps did it. Afterwards compilation process was running without issues and the update to version 6.11 was possible.

jcorporation commented 3 years ago

v6.11.0 has a new dependency for libpcre

jcorporation commented 3 years ago

It seems lintian from buster shows more errors as my linitian on ubuntu. By integrating this extra build scripts in the central myMPD build.sh scripts the non-standard-dir-perm are fixed.

It is more effort necessary to fix all this errors then I thought. I will add --no-run-lintian and emit a warning in the build script.

I leave this issue open. Eventually someone takes time to fix this non-critical errors and warnings.

jcorporation commented 3 years ago

All errors are now fixed and almost all warnings.