vankasteelj / opensubtitles-uploader

Desktop app to upload subtitles to OpenSubtitles, using Node.JS and NWjs
http://vankasteelj.github.io/opensubtitles-uploader/index.html
GNU General Public License v3.0
86 stars 34 forks source link

lintian finds too many issues with opensubtitles-uploader. #62

Open shirishag75 opened 5 years ago

shirishag75 commented 5 years ago

Hi all,

I used lintian to find how the binary was packaged to see what if, any errors are there. Lintian found a whole bunch of them -

$ lintian opensubtitles-uploader_2.5.0-8f3446a57_amd64.deb 
E: opensubtitles-uploader: embedded-library opt/opensubtitles-uploader/lib/libffmpeg.so: libavutil
E: opensubtitles-uploader: embedded-library opt/opensubtitles-uploader/lib/libnode.so: zlib
E: opensubtitles-uploader: embedded-library opt/opensubtitles-uploader/lib/libnw.so: freetype
E: opensubtitles-uploader: embedded-library ... use --no-tag-display-limit to see all (or pipe to a file/program)
E: opensubtitles-uploader: unstripped-binary-or-object opt/opensubtitles-uploader/minidump_stackwalk
W: opensubtitles-uploader: hardening-no-pie opt/opensubtitles-uploader/node_modules/mediainfo-wrapper/lib/linux64/mediainfo
W: opensubtitles-uploader: missing-depends-line
E: opensubtitles-uploader: changelog-file-missing-in-native-package
W: opensubtitles-uploader: unknown-control-file copyright
E: opensubtitles-uploader: no-copyright-file
E: opensubtitles-uploader: description-is-pkg-name OpenSubtitles Uploader
E: opensubtitles-uploader: dir-or-file-in-opt opt/opensubtitles-uploader/
E: opensubtitles-uploader: dir-or-file-in-opt opt/opensubtitles-uploader/README.md
E: opensubtitles-uploader: dir-or-file-in-opt opt/opensubtitles-uploader/app/
E: opensubtitles-uploader: dir-or-file-in-opt ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: opensubtitles-uploader: duplicate-font-file opt/opensubtitles-uploader/app/css/fonts/fontawesome-webfont.ttf also in fonts-glewlwyd
W: opensubtitles-uploader: embedded-javascript-library opt/opensubtitles-uploader/app/js/vendor/jquery-ui.js please use libjs-jquery-ui
W: opensubtitles-uploader: embedded-javascript-library opt/opensubtitles-uploader/app/js/vendor/jquery.js please use libjs-jquery
W: opensubtitles-uploader: embedded-javascript-library opt/opensubtitles-uploader/node_modules/@nodelib/fs.scandir/out/providers/async.js please use libjs-async
W: opensubtitles-uploader: embedded-javascript-library ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: opensubtitles-uploader: non-standard-executable-perm opt/opensubtitles-uploader/node_modules/arr-filter/index.js 0744 != 0755
W: opensubtitles-uploader: non-standard-executable-perm opt/opensubtitles-uploader/node_modules/gulp-jshint/node_modules/arr-diff/index.js 0744 != 0755
W: opensubtitles-uploader: non-standard-executable-perm opt/opensubtitles-uploader/node_modules/gulp-jshint/node_modules/array-slice/index.js 0744 != 0755
W: opensubtitles-uploader: non-standard-executable-perm ... use --no-tag-display-limit to see all (or pipe to a file/program)
E: opensubtitles-uploader: portable-executable-missing-security-features opt/opensubtitles-uploader/node_modules/term-size/vendor/windows/term-size.exe ASLR DEP/NX
E: opensubtitles-uploader: portable-executable-missing-security-features opt/opensubtitles-uploader/node_modules/winresourcer/bin/Resourcer.exe ASLR DEP/NX
E: opensubtitles-uploader: missing-dep-for-interpreter node => nodejs (opt/opensubtitles-uploader/node_modules/ajv/scripts/info) #!node
E: opensubtitles-uploader: missing-dep-for-interpreter node => nodejs (opt/opensubtitles-uploader/node_modules/atob/bin/atob.js) #!node
E: opensubtitles-uploader: missing-dep-for-interpreter node => nodejs (opt/opensubtitles-uploader/node_modules/color-support/bin.js) #!node
E: opensubtitles-uploader: missing-dep-for-interpreter ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: opensubtitles-uploader: script-not-executable opt/opensubtitles-uploader/node_modules/gulp/node_modules/gulp-cli/completion/bash
W: opensubtitles-uploader: script-not-executable opt/opensubtitles-uploader/node_modules/gulp/node_modules/gulp-cli/completion/fish
W: opensubtitles-uploader: script-not-executable opt/opensubtitles-uploader/node_modules/gulp/node_modules/gulp-cli/completion/zsh
W: opensubtitles-uploader: unusual-interpreter opt/opensubtitles-uploader/node_modules/jshint/dist/jshint-rhino.js #!rhino
W: opensubtitles-uploader: executable-not-elf-or-script opt/opensubtitles-uploader/node_modules/gulp-tar/node_modules/arr-diff/index.js
W: opensubtitles-uploader: executable-not-elf-or-script opt/opensubtitles-uploader/node_modules/gulp-jshint/node_modules/arr-diff/index.js
W: opensubtitles-uploader: executable-not-elf-or-script opt/opensubtitles-uploader/node_modules/ambi/node_modules/typechecker/edition-browsers/index.js
W: opensubtitles-uploader: executable-not-elf-or-script ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: opensubtitles-uploader: command-with-path-in-maintainer-script postinst:5 /usr/bin/desktop-file-install
W: opensubtitles-uploader: maintainer-script-should-not-use-recursive-chown-or-chmod postinst:13
E: opensubtitles-uploader: shlib-with-executable-bit opt/opensubtitles-uploader/lib/libffmpeg.so 0755
E: opensubtitles-uploader: shlib-with-executable-bit opt/opensubtitles-uploader/lib/libnode.so 0755
E: opensubtitles-uploader: shlib-with-executable-bit opt/opensubtitles-uploader/lib/libnw.so 0755
E: opensubtitles-uploader: shlib-with-executable-bit ... use --no-tag-display-limit to see all (or pipe to a file/program)

I am sure most of them can be fixed. Both Debian and Ubuntu are doing hardening stuff and other things as shared above.

See specifically https://www.debian.org/doc/manuals/maint-guide/dreq.en.html

You can see of the obvious packaging fixes that can be done at

https://salsa.debian.org/lxqt-team/featherpad

Have a look also at https://wiki.debian.org/Packaging/Intro?action=show&redirect=IntroDebianPackaging as well as https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf

The packaging tutorial is available in multiple languages if you are more comfortable with other languages, see https://salsa.debian.org/debian/packaging-tutorial

vankasteelj commented 5 years ago

You can check my one-click-packager script and improve it: https://github.com/vankasteelj/opensubtitles-uploader/blob/master/dist/deb-maker.sh

shirishag75 commented 4 years ago

you should also look at https://lintian.debian.org/manual/ . You can also look at https://stackoverflow.com/questions/20959644/building-debian-package-for-shell-script maybe that gives you bit more of an insight.