Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of Javascript libraries in context of debian #5052

Closed
lhw opened this issue Dec 21, 2018 · 8 comments
Closed

Handling of Javascript libraries in context of debian #5052

lhw opened this issue Dec 21, 2018 · 8 comments
Labels
area/packaging Packaging and operating systems support feature request New features

Comments

@lhw
Copy link
Contributor

lhw commented Dec 21, 2018

Question summary

While packaging netdata for debian we are currently and have been running into the situation that we need to verify and provide a non-minimized version of every js library and css file with the package. As per debian standards minimized version count as compiled source even if it still plaintext. And I do agree with that decision.

Well... there are a lot of them, 33 to be precise. This causes an immense amount of work every time we release a new upstream version as we have to check each and every file for changes and if there are any we need to find the corresponding non-minimized version, sometimes even from cherry-picked git commits. It feels like we spend most of our time for this package with trying to find the corresponding information.
(https://salsa.debian.org/debian/netdata/tree/master/debian/missing-sources)

For the latest release we kind of lost interest in doing this work and just plain ignore all the errors that spring up in the build process from debian but that is not a good solution.
(https://salsa.debian.org/debian/netdata/blob/master/debian/source/lintian-overrides)

We would really love a better solution to this. Maybe provide the JavaScript libraries non-minified version and minify them for redistributables? Or provide a list of changes or some kind of registry for the used files. But I am all up for suggestions. I know most other distributions packages will not be affected by this as much as debian but maybe there are more people interested in this as well.

OS / Environment

debian/any

Component Name

JavaScript Libraries/CSS

@Ferroin
Copy link
Member

Ferroin commented Dec 21, 2018

I have a feeling people who do security auditing would be very interested in this too. Personally, I'm in favor of the first option you listed (have the files in full-form in the repo, minify them during the build if possible).

@FedericoCeratto
Copy link
Contributor

I recommend shipping non-minified and unmodified libraries and ideally consider decreasing the quantity and size of the libraries.

(As a side note, I wonder if it is worth performing minification for the Netdata use-case. It's often used on local, high-bandwidth connections, there are infrequent page reloads and most of the transferred data is to populate the charts)

@cakrit cakrit added area/packaging Packaging and operating systems support feature request New features labels Dec 21, 2018
@ktsaou
Copy link
Member

ktsaou commented Dec 30, 2018

hm... I was not aware of this problem. Thank you @lhw for reporting it!

Well, I think we could provide both versions of the files.

I think we should not provide just the unminified version of them, because this would require people installing from source to have a toolchain to minify them.

I would prefer the files to be distributed minified, since a lot of users install netdata in IoT environments that network is not that abundant.

So, a good balance seems to provide both versions.
Would this be better for you?


PS: @cakrit I see there are a few files that are not needed any more. @gmosx has removed support for js libraries that were not that useful in netdata (they didn't support all chart types, they were extremely slow, etc). Please check dashboard.js for the js libraries it uses and remove the rest.

@FedericoCeratto
Copy link
Contributor

FedericoCeratto commented Dec 30, 2018

Providing both versions would work. A clear naming scheme e.g. foo.version-number.js and foo.version-number.min.js would be helpful.

@gmosx
Copy link
Contributor

gmosx commented Dec 31, 2018

I added #5086 to remove unused external JS libraries.

@Ferroin
Copy link
Member

Ferroin commented Mar 4, 2020

Unless I'm mistaken, this should be indirectly fixed by the new dashboard.

Longer term, I'm hoping to have a separate package for the dashboard, which should simplify this significantly.

@Ferroin
Copy link
Member

Ferroin commented Aug 10, 2021

Te aforementioned split dashboard package may be done as part of the followup work after the installer overhaul.

@ilyam8 Other than the above bit, this can be collected for product to look at.

@ilyam8
Copy link
Member

ilyam8 commented Aug 16, 2021

Closing this feature request. We will re-evaluate the request internally.

@ilyam8 ilyam8 closed this as completed Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support feature request New features
Projects
None yet
Development

No branches or pull requests

7 participants