Merge pull request #1261 from zabbix/60_modbus

Added modbus support for RHEL like systems
This commit is contained in:
Alexey Pustovalov 2024-02-26 15:40:15 +09:00 committed by GitHub
commit 836d60b434
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 28 additions and 10 deletions

View File

@ -40,6 +40,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \ iputils \
pcre2 \ pcre2 \
libcurl-minimal \ libcurl-minimal \
libmodbus \
openssl-libs \ openssl-libs \
zlib" && \ zlib" && \
dnf -y install epel-release && \ dnf -y install epel-release && \

View File

@ -40,6 +40,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \ iputils \
pcre2 \ pcre2 \
libcurl \ libcurl \
libmodbus \
openssl-libs \ openssl-libs \
zlib" && \ zlib" && \
microdnf -y install \ microdnf -y install \

View File

@ -58,6 +58,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
iputils \ iputils \
shadow-utils \ shadow-utils \
pcre2 \ pcre2 \
libmodbus \
libcurl" && \ libcurl" && \
curl --tlsv1.2 -sSf -L -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ curl --tlsv1.2 -sSf -L -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \

View File

@ -19,7 +19,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \ set -eux && \
REPOLIST="baseos,appstream,powertools" && \ REPOLIST="baseos,appstream,powertools,epel" && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
bash \ bash \
@ -29,6 +29,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libcurl-devel \ libcurl-devel \
libevent-devel \ libevent-devel \
libssh-devel \ libssh-devel \
libmodbus-devel \
libxml2-devel \ libxml2-devel \
openssl-devel \ openssl-devel \
openldap-devel \ openldap-devel \
@ -45,6 +46,12 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
go-toolset \ go-toolset \
unixODBC-devel" && \ unixODBC-devel" && \
dnf -y module enable mysql && \ dnf -y module enable mysql && \
dnf -y install \
--disablerepo "*" \
--enablerepo "extras" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best epel-release && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "${REPOLIST}" \

View File

@ -17,6 +17,8 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.vendor="Zabbix LLC" \ org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \ set -eux && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
@ -29,6 +31,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libcurl-devel \ libcurl-devel \
libevent-devel \ libevent-devel \
libssh-devel \ libssh-devel \
libmodbus-devel \
libxml2-devel \ libxml2-devel \
openssl-devel \ openssl-devel \
openldap-devel \ openldap-devel \
@ -50,6 +53,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "ol8_baseos_latest" \ --enablerepo "ol8_baseos_latest" \
--enablerepo "ol8_appstream" \ --enablerepo "ol8_appstream" \
--enablerepo "ol8_codeready_builder" \ --enablerepo "ol8_codeready_builder" \
--enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -41,6 +41,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
libcurl-devel \ libcurl-devel \
libevent-devel \ libevent-devel \
libssh-devel \ libssh-devel \
libmodbus-devel \
libxml2-devel \ libxml2-devel \
openssl-devel \ openssl-devel \
openldap-devel \ openldap-devel \
@ -55,6 +56,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
git \ git \
gettext \ gettext \
unixODBC-devel" && \ unixODBC-devel" && \
curl -sSL -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \
rm -rf /tmp/epel-release-latest-8.noarch.rpm && \
microdnf -y module enable mysql && \ microdnf -y module enable mysql && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -63,6 +67,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
--enablerepo "rhel-8-for-x86_64-baseos-rpms" \ --enablerepo "rhel-8-for-x86_64-baseos-rpms" \
--enablerepo "rhel-8-for-x86_64-appstream-rpms" \ --enablerepo "rhel-8-for-x86_64-appstream-rpms" \
--enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \ --enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \
--enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--setopt=keepcache=0 \ --setopt=keepcache=0 \
--best \ --best \

View File

@ -50,8 +50,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \ --enable-webservice \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# Not available for CentOS 8 --with-libmodbus \
# --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-mysql \ --with-mysql \

View File

@ -51,7 +51,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \ --enable-webservice \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-mysql \ --with-mysql \

View File

@ -60,7 +60,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \ --enable-webservice \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-mysql \ --with-mysql \

View File

@ -50,7 +50,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \ --enable-webservice \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-net-snmp \ --with-net-snmp \

View File

@ -51,7 +51,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-webservice \ --enable-webservice \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-net-snmp \ --with-net-snmp \

View File

@ -46,7 +46,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-net-snmp \ --with-net-snmp \

View File

@ -47,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-net-snmp \ --with-net-snmp \

View File

@ -56,7 +56,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
--enable-proxy \ --enable-proxy \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \ --with-libmodbus \
--with-libpcre2 \ --with-libpcre2 \
--with-libxml2 \ --with-libxml2 \
--with-net-snmp \ --with-net-snmp \