lintian error: source-is-missing
Problem:
I was getting this lintian error for a debian package I was building for a reactjs application.
E: source: source-is-missing build/static/js/787.848931c7.chunk.js
E: source: source-is-missing build/static/js/main.dc45282d.js
Solution
Things I tried to “handle” the lintian error.
Now the error reads
E: source: source-is-missing debian/missing-sources/787.848931c7.chunk.js
E: source: source-is-missing debian/missing-sources/main.dc45282d.js
I was lost as to why lintian was now reporting this. As per this https://sources.debian.org/src/lintian/2.104.0/mail-templates/source-is-missing/
In order to solve this problem, you could:
1. add the source files to “debian/missing-sources” directory.
2. repack the origin tarball and add the missing source files to it.Both ways satisfy the requirement to ship all source code. The second option
might be preferable due to the following reasons [2]:
– Upstream can do it too and you could even supply a patch to them, thus
fulfilling our social contract [3], see particularly §2.
– If source and non-source are in different locations, ftpmasters may
miss the source and (needlessly) reject the package.
– The source isn’t duplicated in every .diff.gz/.debian.tar.* (though
this only really matters for larger sources).
the relevant file were in debian/missing-sources as well as my package.tar file. So I was left with no option but to ignore the error.
$ less <package-name>.lintian-overrides <package-name>: initial-upload-closes-no-bugs <package-name>: source-is-missing debian/missing-sources/787.848931c7.chunk.js <package-name>: source-is-missing debian/missing-sources/main.dc45282d.js
There was no change in the error. The override provided was not matching the error.
$ less debian/source/lintian-overrides <package-name> source: source-is-missing debian/missing-sources/787.848931c7.chunk.js <package-name> source: source-is-missing debian/missing-sources/main.dc45282d.js
In Summary
1. Add the files to debian/missing-sources
2. Keep .lintian-overrides
3. Use debian/sources/lintias-overrides to ignore/match source errors.
Extra
Trying to add the js files in debian/source folder just resulted in more lintian errors
E: <package-name> source: unknown-file-in-debian-source 787.848931c7.chunk.js E: <package-name> source: unknown-file-in-debian-source main.dc45282d.js