nagios-plugins-linux
                                
                                
                                
                                    nagios-plugins-linux copied to clipboard
                            
                            
                            
                        [Feature Request] Binary packages for releases
🚀 Feature Request
Describe the solution you'd like
Hi Davide, Have you considered using GitHub's CI or something similar to provide Debian/Fedora packages along with the source for each release?
Hi Louis. I thought about it but never tried to implement such a feature. In particular I do not know how and where to stock the final artifacts.
The packages at the moment can be only generated locally, with docker or podman, using the commands  make -C packages ....
Yes I did eventually manage to generate a Debian package :)
As for where to store: you can use releases for this, I see you already include tarballs there.
The trickiest part would be the build, then. If I'm reading this correctly, you can use Docker with GH actions, which seems pretty neat.
Actually the deb I created with Buster doesn't contain the binaries. I don't really know what happened. The build never worked from the git repo, I got:
make --no-print-directory distdir-am
NEWS not updated; not releasing
I eventually managed to run make -C packages debian-buster from the v29 release tarball but the resulting deb doesn't contan the binaries :/
The make produces several .deb files because in v29 iwe switch to a multi-packages setup. Maybe you just checked the meta-package? It should be the only one that does not contain any binary.
I was looking at nagios-plugins-linux-memory_28-2_amd64.deb (no idea why it is named 28 because I built it from v29) and it did not contain the binary.
A build from a clean git clone also fails: multibuild.sh: error: no such file: /tmp/nagios-plugins-linux/packages/docker-shell-helpers/docker-shell-helpers.sh.
Am I missing something here?
I did not include the packages because of the high number. Several distributions are supported and each in a few different versions. If you have any idea for improving the situation I'll be glad to discuss and implement it
I was looking at
nagios-plugins-linux-memory_28-2_amd64.deb(no idea why it is named 28 because I built it from v29) and it did not contain the binary. A build from a clean git clone also fails:multibuild.sh: error: no such file: /tmp/nagios-plugins-linux/packages/docker-shell-helpers/docker-shell-helpers.sh.Am I missing something here?
I think you forgot the git clone --recursive flag, as explained in the README.
I think you forgot the
git clone --recursiveflag, as explained in the README.
I completely missed the submodule, my bad.
Still, there is something weird going on: the build resulted in e.g. nagios-plugins-linux-nbprocs_28-2_amd64.deb and said file does not contain the binary:
drwxr-xr-x root/root         0 2021-07-11 12:44 ./
drwxr-xr-x root/root         0 2021-07-11 12:44 ./usr/
drwxr-xr-x root/root         0 2021-07-11 12:44 ./usr/share/
drwxr-xr-x root/root         0 2021-07-11 12:44 ./usr/share/doc/
drwxr-xr-x root/root         0 2021-07-11 12:44 ./usr/share/doc/nagios-plugins-linux-nbprocs/
-rw-r--r-- root/root      1838 2021-07-11 12:44 ./usr/share/doc/nagios-plugins-linux-nbprocs/changelog.Debian.gz
-rw-r--r-- root/root        92 2021-07-11 12:44 ./usr/share/doc/nagios-plugins-linux-nbprocs/changelog.gz
-rw-r--r-- root/root      1089 2021-07-11 12:44 ./usr/share/doc/nagios-plugins-linux-nbprocs/copyright
The build process also required manual input:
*** info: creating the origin package nagios-plugins-linux_29.orig.tar.xz...                                                                                                                                       
*** info: creating the deb package and build files for version 29...                                                                                                                                               
This package has a Debian revision number but there does not seem to be                                                                                                                                            
an appropriate original tar file or .orig directory in the parent directory;                                                                                                                                       
(expected one of nagios-plugins-linux_28.orig.tar.gz, nagios-plugins-linux_28.orig.tar.bz2,                                                                                                                        
nagios-plugins-linux_28.orig.tar.lzma,  nagios-plugins-linux_28.orig.tar.xz or nagios-plugins-linux-29.orig)                                                                                                       
continue anyway? (y/n) y                                                                                                                                                                                           
I did not include the packages because of the high number.
Maybe you could make one archive per distro and that archive would contain all checks? Otherwise, I guess you'd need to host the files somewhere else.
Ok. I can reproduce the issue, sorry :/
Back from holiday... Sorry for the delay. Should be fixed in PR#90. I will do some more tests in the evening, but if you can test yourself meanwhile I'll appreciate :)