X Tutup
The Wayback Machine - https://web.archive.org/web/20221214161123/https://github.com/netdata/netdata/pull/13927
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

Split plugins to individual packages for DEB/RPM packaging. #13927

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

Ferroin
Copy link
Member

@Ferroin Ferroin commented Nov 1, 2022

Summary

This continues the trend that was started a few years back with the CUPS and IPMI collectors of using separate packages for individual plugins. The following plugins are being split to their own packages in this PR:

  • NFACCT
  • charts.d
  • slabinfo
  • perf
  • eBPF (as a soft dependency so it gets installed by default, eBPF code will be in it’s own separate package from the plugin).
  • python.d (as a soft dependency so it gets installed by default).
  • go.d (as a soft dependency so it gets installed by default).
  • apps (as a soft dependency so it gets installed by default, this will also be a hard dependency for the ebpf plugin).

Long term, I hope to decouple the packaging of the Go plugin and the eBPF programs from the main agent repository so that those can be updated on their own.

Test Plan

Local testing is probably most easily done by building the packages locally.

With this PR, there should be additional packages created for each of the plugins listed above, plus one extra package called netdata-plugin-ebpf-code. Oracle Linux, CentOS, and Alma Linux should not include the nfacct plugin, as they do not have the required dependencies available.

Because of how RPM and dpkg handle soft dependencies when installing package files directly (instead of from a repository), metadata inspection will be required to verify the soft dependencies outlined in the description above. RPM package metadata can be inspected by running rpm -qip on the package file. DEB package metadata cna be inspected by running dpkg-deb -I on the package file.

Additional Information

Fixes: #7857

This PR has two goals:

  • Make life simpler for users who are only using a subset of the plugins we ship by not making them install things they will not use.
  • Make life simpler for us by reducing the total amount of data that a user needs to download when they install or update Netdata.

This PR also includes an assortment of cleanups and minor fixes for the existing DEB/RPM packaging code, such as properly splitting out postinst scripts to their dependent packages for the DEB packages, tidying up the file list for the spec file, and formatting package descriptions more consistently.

@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Nov 1, 2022
@Ferroin Ferroin force-pushed the split-plugin-packages branch 5 times, most recently from 7227565 to ffb4d47 Compare Nov 3, 2022
Ferroin added 3 commits Nov 3, 2022
This ensures they have accurate and cnocise descriptions of what they
do, and that the descriptions are the same for both the RPM and DEB
packages.
Most users do not actually use it, so make life easier for them by
reducing our dependency footprint and cutting down on how much they need
to download.
@Ferroin Ferroin force-pushed the split-plugin-packages branch 4 times, most recently from 4e7702f to e2b7912 Compare Nov 3, 2022
The code is in a separate package to simplify handling updates for it
separately from the main agent code in the future.

The eBPF plugin will still be installed by default in most cases when
installing the Netdata Agent
@Ferroin Ferroin force-pushed the split-plugin-packages branch from e2b7912 to ac11488 Compare Nov 3, 2022
The python.d plugin will still be installed by default in most cases
when installing the Netdata Agent
@Ferroin Ferroin force-pushed the split-plugin-packages branch from dc0d11a to 349ffd1 Compare Nov 4, 2022
The go.d plugin will still be installed by default in most cases when
installing the Netdata Agent
@Ferroin Ferroin force-pushed the split-plugin-packages branch from c892b95 to cd52ffa Compare Nov 4, 2022
Ferroin added 5 commits Nov 4, 2022
The apps plugin will still be installed by default in most cases when
installing the Netdata Agent
We should be modifying permissions and filecaps for plugins in the
specific packages that install those plugins.
This should get rid of the duplicate files warnings, as well as probably
producing a more technically correct RPM.
They should be folded at 76 characters.
@Ferroin Ferroin force-pushed the split-plugin-packages branch 2 times, most recently from b419d53 to cc2a449 Compare Nov 4, 2022
@Ferroin Ferroin force-pushed the split-plugin-packages branch from cc2a449 to c008477 Compare Nov 4, 2022
@Ferroin Ferroin force-pushed the split-plugin-packages branch from 2c38db9 to 0800831 Compare Nov 7, 2022
All platforms we build RPMs for have both netns and systemd support, so
quit supporting platforms that don’t in our spec file.
@Ferroin Ferroin force-pushed the split-plugin-packages branch from d322a68 to e74c0da Compare Nov 7, 2022
@Ferroin Ferroin marked this pull request as ready for review Nov 11, 2022
@Ferroin Ferroin requested a review from a team Nov 11, 2022
@thiagoftsm thiagoftsm self-requested a review Nov 14, 2022
@thiagoftsm
Copy link
Contributor

thiagoftsm commented Nov 15, 2022

@Ferroin I was taking a look in the Actions to verify the final result of CI, and I observed an unexpected result:

bash-5.2$ rpm2targz netdata-plugin-ebpf-code-1.36.0-1.el8.x86_64.rpm 
bash-5.2$ rpm2targz netdata-plugin-ebpf-1.36.0-1.el8.x86_64.rpm 
bash-5.2$ tar -xvf netdata-plugin-ebpf-code-1.36.0-1.el8.x86_64.tar.gz 
./
./usr/
./usr/libexec/
./usr/libexec/netdata/
./usr/libexec/netdata/plugins.d/
./usr/libexec/netdata/plugins.d/ebpf.d/

My expectation was to see all binaries from latest release inside this package, but I am seeing only a directory. Is this really expected?

@Ferroin
Copy link
Member Author

Ferroin commented Nov 15, 2022

@Ferroin I was taking a look in the Actions to verify the final result of CI, and I observed an unexpected result:

bash-5.2$ rpm2targz netdata-plugin-ebpf-code-1.36.0-1.el8.x86_64.rpm 
bash-5.2$ rpm2targz netdata-plugin-ebpf-1.36.0-1.el8.x86_64.rpm 
bash-5.2$ tar -xvf netdata-plugin-ebpf-code-1.36.0-1.el8.x86_64.tar.gz 
./
./usr/
./usr/libexec/
./usr/libexec/netdata/
./usr/libexec/netdata/plugins.d/
./usr/libexec/netdata/plugins.d/ebpf.d/

My expectation was to see all binaries from latest release inside this package, but I am seeing only a directory. Is this really expected?

No, that’s definitely not expected.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files listed twice in RPM builds
2 participants
X Tutup