From cffd79c84ec8c200064c7c08abe164737aa8fc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 8 Jan 2024 22:51:10 +0100 Subject: [PATCH 1/3] Fix Dockerfile --- .dockerignore | 13 +++++++++++++ Dockerfile | 7 +++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index ee731c9..c394d20 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,8 +6,21 @@ !/configure !/configure.ac !/install-sh +!/Makefile.am !/Makefile.in !/snmp_bulkget.c !/snmp_bulkget.h !/utils.c !/utils.h +!/check_interfaces.c +!/AUTHORS +!/NEWS +!/COPYING +!/config.guess +!/config.sub +!/missing +!/compile +!/ChangeLog +!/INSTALL +!/depcomp +!/README.md diff --git a/Dockerfile b/Dockerfile index e1f31ee..47ed896 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,17 +7,20 @@ ONBUILD ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y \ build-essential \ + autoconf \ libsnmp-dev \ && rm -rf /var/lib/apt/lists/* COPY . . -RUN ./configure --libexecdir=/src \ +COPY ./README.md ./README +RUN ls -R \ + && ./configure --libexecdir=/src \ && make $target FROM debian:stable-slim ONBUILD ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y \ - libsnmp30 \ + libsnmp40 \ && rm -rf /var/lib/apt/lists/* COPY --from=0 /src/check_interfaces /check_interfaces From 42c58dc6284abbec45944c32fa729855b3ea775f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:51:29 +0100 Subject: [PATCH 2/3] Makefile input update --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index adff27d..59777cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -161,7 +161,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \ - INSTALL NEWS README.md compile config.guess config.sub depcomp \ + INSTALL NEWS README compile config.guess config.sub depcomp \ install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) From c363d2dfd3c18175db059d6b66e61ae698e9e632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 23 Feb 2024 12:00:37 +0100 Subject: [PATCH 3/3] Add missing includes This commit adds some missing includes in the main program file to avoid complaints of the compiler. Additionaly getopt.h is needed to build this on FreeBSD. --- check_interfaces.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/check_interfaces.c b/check_interfaces.c index 622bdad..2c2a189 100644 --- a/check_interfaces.c +++ b/check_interfaces.c @@ -1,9 +1,18 @@ + + +// This one is needed on FreeBSD and it has to be before the others or at least some of them +#include + + #include "snmp_bulkget.h" #include "utils.h" #include #include #include #include +#include +#include +#include /* * text strings to output in the perfdata