Added modbus support for RHEL like systems

This commit is contained in:
Alexey Pustovalov 2024-02-10 03:34:39 +09:00
parent 9bd9330c52
commit 70db1d079d
13 changed files with 27 additions and 4 deletions

View File

@ -38,6 +38,7 @@ RUN set -eux && \
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

@ -38,6 +38,7 @@ RUN set -eux && \
iputils \ iputils \
pcre2 \ pcre2 \
libcurl \ libcurl \
libmodbus \
openssl-libs \ openssl-libs \
zlib" && \ zlib" && \
microdnf -y install \ microdnf -y install \

View File

@ -56,6 +56,7 @@ RUN set -eux && \
iputils \ iputils \
shadow-utils \ shadow-utils \
pcre2 \ pcre2 \
libmodbus \
libcurl-minimal" && \ libcurl-minimal" && \
curl -sSL -o /tmp/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ curl -sSL -o /tmp/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \

View File

@ -43,6 +43,7 @@ RUN set -eux && \
iputils \ iputils \
pcre2 \ pcre2 \
libcurl-minimal \ libcurl-minimal \
libmodbus \
smartmontools \ smartmontools \
sudo \ sudo \
openssl-libs" && \ openssl-libs" && \

View File

@ -43,6 +43,7 @@ RUN set -eux && \
iputils \ iputils \
pcre2 \ pcre2 \
libcurl \ libcurl \
libmodbus \
smartmontools \ smartmontools \
sudo \ sudo \
openssl-libs" && \ openssl-libs" && \

View File

@ -63,6 +63,7 @@ RUN set -eux && \
pcre2 \ pcre2 \
smartmontools \ smartmontools \
sudo \ sudo \
libmodbus \
libcurl-minimal" && \ libcurl-minimal" && \
curl -sSL -o /tmp/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ curl -sSL -o /tmp/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \ rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \

View File

@ -19,7 +19,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
REPOLIST="baseos,appstream,crb" && \ REPOLIST="baseos,appstream,crb,epel" && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
bash \ bash \
@ -29,6 +29,7 @@ RUN set -eux && \
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 \
@ -44,6 +45,7 @@ RUN set -eux && \
gettext \ gettext \
go-toolset \ go-toolset \
unixODBC-devel" && \ unixODBC-devel" && \
dnf -y install 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-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"]
RUN set -eux && \ RUN set -eux && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
@ -28,6 +30,7 @@ RUN set -eux && \
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 \
@ -47,6 +50,7 @@ RUN set -eux && \
--enablerepo "ol9_baseos_latest" \ --enablerepo "ol9_baseos_latest" \
--enablerepo "ol9_appstream" \ --enablerepo "ol9_appstream" \
--enablerepo "ol9_codeready_builder" \ --enablerepo "ol9_codeready_builder" \
--enablerepo="ol9_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs ${INSTALL_PKGS} && \

View File

@ -0,0 +1,6 @@
[ol9_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

View File

@ -40,6 +40,7 @@ RUN set -eux && \
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 \
@ -54,6 +55,9 @@ RUN set -eux && \
git \ git \
gettext \ gettext \
unixODBC-devel" && \ unixODBC-devel" && \
curl -sSL -o /tmp/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-9.noarch.rpm && \
rm -rf /tmp/epel-release-latest-9.noarch.rpm && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -62,6 +66,7 @@ RUN set -eux && \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-baseos-rpms" \
--enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \ --enablerepo "rhel-9-for-$ARCH_SUFFIX-appstream-rpms" \
--enablerepo "codeready-builder-for-rhel-9-$ARCH_SUFFIX-rpms" \ --enablerepo "codeready-builder-for-rhel-9-$ARCH_SUFFIX-rpms" \
--enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \

View File

@ -51,7 +51,7 @@ RUN set -eux && \
--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 set -eux && \
--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 set -eux && \
--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 \