netdata/packaging: Netdata binary packages generation - spec file refinement, support for nightlies (RPM) (#6369)
Detailed list of changes: * netdata/packaging: First round of netdata.spec refactoring - package dependencies - Remove freeipmi/nfacct plugin flags. We auto-detect all plugins by decision - Start refactor of package dependencies - Add missing dependencies, with respect to distro peculiarities - Adjust existing dependencies, so that distro-specific package names is applied * netdata/packaging: add packaging trigger mechanism on binary-packages-specfile-cleanup to help testing * netdata/packaging: WIP - Allow building nightly versions for RPM (Still investigating the right version scheme) * netdata/packaging: Attempt to fix syntax errors - wow travis, mercy * netdata/packaging: tiny nits and fixes 1) there was a syntax error in version definition 2) bring default deploy repo name at the top, then overwrite when latest is published 3) Leave a comment * netdata/packaging: Move these core package requirements to the right section * netdata/packaging: libuv requires >= 1, missed to add that on devel libs * netdata/packaging: some comments, also when you put logrotate in our conf directory, link it to actual log rotate * netdata/packaging: Adjust configure options on spec file (align with netdata-installer.sh) * netdata/packaging: In order to properly support packaging both latest and stable releases, you need to star that extraction part, folder name contains the version with the hash that we cant tell * netdata/packaging: until we fix versioning, bring the original unprocessed spec file and pass the version we like in * netdata/packaging: fix version string in the spec file * netdata/packaging: Replace source path, we need to work with whatever we downloaded (to be refined) * netdata/packaging: [ci skip] you mixed the paths, reverse them * netdata/packaging: [ci skip] attempt to fix source path when needed * netdata/packaging: fixes and nits 1) generalize the spec file refinement method 2) Do both replacement that way 3) Adjust file names and paths * netdata/packaging: Replace Source0 explicitly and also make sure you remove extra new lines that may confuse the replacement later * netdata/packaging: [ci skip] move env outside, add some more log * netdata/packaging: [ci skip] adjust logic of replacing tag lines in spec file * netdata/packaging: [ci skip] Alas, fetch the archive, rename the structure to the new version, repack and proceed * netdata/packaging: [ci skip] Extract to specific path * netdata/packaging: [ci skip] replace problematic tar call with the respective pythonized one * netdata/packaging: [ci skip] Add new friendly octal format for chmod * netdata/packaging: [ci skip] more checks * netdata/packaging: [ci skip] dont chmod, chown the whole folder after extraction * netdata/packaging: nit * netdata/packaging: [ci skip] attempt to fix permissions differently * netdata/packaging: [ci skip] Another hack, attempt to fix permissions on the host directly * netdata/packaging: [ci skip] fine, do the move also on the host, pointless to run all through the container * netdata/packaging: [ci skip] Do the move through the container. Also, move a more specific folder * netdata/packaging: [ci skip] move as w00t * netdata/packaging: [ci skip] fix * netdata/packaging: sync permissions handling, round two * netdata/packaging: scratch those hacks, we should do latest differently * netdata/packaging: [ci skip] Set up rpm version string depending on whether we are on latest or not * netdata/packaging: [ci skip] Branch the code here, latest build up should be on the commit rather the tar files * netdata/packaging: Attempt to handle latest version build up * netdata/packaging: [ci skip] Dont continue processing if the file was not generated. Also do the tagging before autoreconf * netdata/packaging: [ci skip] fixes and nits * netdata/packaging: [ci skip] When doing annotated tags, you need to provide a message otherwise an editor pops up and will block the build * netdata/packaging: on the latest code case go all the way host level operations * netdata/packaging: [ci skip] Do not modify version, no longer need it because we properly generated the package with the right version * netdata/packaging: [ci skip] fix sensors line, you missed the Recommends keyword * netdata/packaging: Some code style (remove tabification from some tags) and also remove Recommends, we start with required packages for build and runtime and then we document further needs * netdata/packaging: [ci skip] Make sure you get epel in there, its needed * netdata/packaging: [ci skip] Fix bogus date * netdata/packaging: [ci skip] add these packages to include functionality * netdata/packaging: [ci skip] more fine grained dependency handling * netdata/packaging: [ci skip] Dependency hell - do not depend on libnetacctfilter if on el/7 * netdata/packaging: [ci skip] Be serious, that is not what you do when building the package silly * netdata/packaging: [ci skip] define directory attributes too * netdata/packaging: [ci skip] mystery unfold - comment out as we need to figure out how to handle missing directories that our installer creates if necessary * netdata/packaging: [ci skip] Make sure you properly set deployment repo based on commit message * netdata/packaging: [ci skip] Install these packages for specific versions, remove optimisations for now * netdata/packaging: [ci skip] Make package yanking flexible, so that we can manage both netdata and netdata-edge cleanup properly * netdata/packaging: [ci skip] Actually, set user at travis layer and let the script consume it only. We need to be sure the same user is used on yanking and the deployment process * netdata/packaging: [ci skip] wow pkatsoul * netdata/packaging: Dont forget to install some of the enabled plugins * netdata/packaging: nfacct.plugin not really working on rhel, disable temporarily * netdata/packaging: include installed directories to package * netdata/packaging: [ci skip] nits * netdata/packaging: fixes * netdata/packaging: [ci skip] dont add ghost files * netdata/packaging: [ci skip] Dont do that, make install already places the files in the right location. Also, seems that libexec is not really getting overriden there * netdata/packaging: [ci skip] Extreme - override _libexecdir macro * Revert "netdata/packaging: [ci skip] Dont do that, make install already places the files in the right location. Also, seems that libexec is not really getting overriden there" This reverts commit 320102c96284e4622266f6f089d6ce87319976f3. That wasnt really the problem here * netdata/packaging: [ci skip] Include contents of dir here * netdata/packaging: fixes * netdata/packaging: [ci skip] Fixes and additions - Tighter permissions for some files - Introduce go.d plugin install (likely broken like this, dont recall if bash style code is fine here) - Raise the path overrides to the spec level, otherwise we build with the overrides and package with the defaults * netdata/packaging: [ci skip] Missed an invalid variable. These files are under our current path, no need for complexity * netdata/packaging: [ci skip] bring sha method onboard * netdata/packaging: [ci skip] Wrong path provided, should be under build root * netdata/packaging: [ci skip] Add registry directory * netdata/packaging: [ci skip] add missing config directory definitions * netdata/packaging: [ci skip] Fix missing dirs * netdata/packaging:[ci fix] hos * netdata/packaging: [ci skip] Fixes and additions - Change versioning to v1.15.0.114 from v1.15.0114 - Add CUPS, Xenstat, json-c * netdata/packaging: [ci skip] fix package dependencies on the builder setup, otherwise spec will fail * netdata/packaging: [ci skip] limit xenstat to suse and fedora for now * netdata/packaging: [ci skip] separate fedora and suse cases, unfortunately suse has different package names.... * netdata/packaging: [ci skip] yajl is not the same package everywhere, of course * netdata/packagin: [ci skip] skip xenstat for now * netdata/packaging: [ci skip] remove the vvvvvvvvv * netdata/packaging: [ci skip] one more fix attempt * netdata/packaging: [ci skip] Spec file extraction is different when building from stable. We *must* fetch it from the tarball rather than the local one * netdata/packaging: [ci skip] spec_file defined on all cases, latest or stable. Also move latest spec file copy after make dist operation, that is where is suppose to be * netdata/packaging: [ci skip] Tag source with the local version, as we build upon the very latest * netdata/packaging: oopsie -- remove json-c from that place, it was forgotten * netdata/packaging: fix packaging, even though devel is consistent between fedora and suse, the binary one is not .... (also fix default perms to be root:netdata rather root:root) * netdata/packaging: Suse love - again, libuuid-devel same, but libuuid is named libuuid1 on suse...... * netdata/packaging: [ci skip] libcap same.... * netdata/packaging: [ci skip] use the noreplace directive for the configuration files * netdata/packaging: [ci skip] Bring back master as the triggering repository * netdata/packaging: [ci skip] attempt to enable/disable service where necessary. Default preset action requires further setup, so we override that * Revert "netdata/packaging: [ci skip] Bring back master as the triggering repository" This reverts commit 9b25a622dc5f12b1539f6863bab52d7bb225fd8d. ** Reverting as we need to test further the service enable action ** * netdata/packaging: [ci skip] revert this change - not the right way, we have empty files * netdata/packaging: [ci skip] Add daemon-reload option, to make sure systemd learns about the newly installed service * netdata/packaging: [ci skip] Attempt to silence codacy by factoring out the few small methods for common usage, then kill directories to reduce complexity adn thats it * netdata/packaging: [ci skip] Just making sure codacy reprocess everything * netdata/packaging: [ci skip] missed one adjustment * netdata/packaging: python style - print shouldnt have space before open parenthesis. Also, add restart on all cases on the spec file * netdata/packaging: [ci skip] fix syntax * netdata/packaging: [ci skip] syntax fixes 2 * netdata/packaging: [ci skip] another miss * netdata/packaging: [ci skip] You need to explicitly trigger a restart, apparently * netdata/packaging: [ci skip] override packaging user definition temporarily, to get things going on testing