From: Nick Porter Date: Mon, 13 May 2024 08:00:11 +0000 (+0100) Subject: Replace yum with dnf X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c65cbb0706aceb582c27a68636940599643a823;p=thirdparty%2Ffreeradius-server.git Replace yum with dnf The default since RHEL 8, which is the oldest FRv4 builds on. --- diff --git a/.github/workflows/ci-rpm.yml b/.github/workflows/ci-rpm.yml index ec4dc16e553..7a7bba0e9dc 100644 --- a/.github/workflows/ci-rpm.yml +++ b/.github/workflows/ci-rpm.yml @@ -84,24 +84,24 @@ jobs: echo 'gpgcheck=1' >> /etc/yum.repos.d/ltb-project.repo echo 'gpgkey=https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project' >> /etc/yum.repos.d/ltb-project.repo rpm --import https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project - yum install -y epel-release + dnf install -y epel-release - name: Enable PowerTools / CRB run: | - yum install -y yum-utils dnf-plugins-core - yum config-manager --enable PowerTools || : - yum config-manager --enable powertools || : - yum config-manager --enable crb || : + dnf install -y dnf-utils dnf-plugins-core + dnf config-manager --enable PowerTools || : + dnf config-manager --enable powertools || : + dnf config-manager --enable crb || : - name: Enable EPEL for Rocky Linux 9 if: ${{ matrix.env.NAME == 'rocky-9' }} run: | - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm # For pkill - name: Enable procps-ng run: | - yum install -y procps-ng + dnf install -y procps-ng - name: Set up NetworkRADIUS extras repository run: | @@ -115,7 +115,7 @@ jobs: - name: Install common tools run: | - yum install -y rpm-build openssl make gcc perl git-core + dnf install -y rpm-build openssl make gcc perl git-core - uses: actions/checkout@v4 with: @@ -127,7 +127,7 @@ jobs: # - name: Install build dependencies run: | - yum-builddep -y freeradius.spec && yum-builddep -y freeradius.spec + dnf builddep -y freeradius.spec && dnf builddep -y freeradius.spec working-directory: freeradius/redhat - name: Build RPMs @@ -151,7 +151,7 @@ jobs: # Build eapol_test using a minimal make environment to avoid configuring - name: Build eapol_test run: | - yum install -y libnl3-devel which + dnf install -y libnl3-devel which [ -r /opt/rh/devtoolset-8/enable ] && source /opt/rh/devtoolset-8/enable || : scripts/ci/eapol_test-build.sh mv scripts/ci/eapol_test/eapol_test ../rpms @@ -170,7 +170,7 @@ jobs: # - name: "Debug: Package dependancies for tmate" run: | - yum install -y xz + dnf install -y xz ln -s /bin/true /bin/apt-get if: ${{ github.ref == 'refs/heads/ci-debug' && failure() }} @@ -226,24 +226,24 @@ jobs: echo 'gpgcheck=1' >> /etc/yum.repos.d/ltb-project.repo echo 'gpgkey=https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project' >> /etc/yum.repos.d/ltb-project.repo rpm --import https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project - yum install -y epel-release + dnf install -y epel-release - name: Enable PowerTools / CRB run: | - yum install -y yum-utils dnf-plugins-core - yum config-manager --enable PowerTools || : - yum config-manager --enable powertools || : - yum config-manager --enable crb || : + dnf install -y dnf-utils dnf-plugins-core + dnf config-manager --enable PowerTools || : + dnf config-manager --enable powertools || : + dnf config-manager --enable crb || : - name: Enable EPEL for Rocky Linux 9 if: ${{ matrix.env.NAME == 'rocky-9' }} run: | - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm # For pkill - name: Enable procps-ng run: | - yum install -y procps-ng + dnf install -y procps-ng - name: Load RPMs uses: actions/download-artifact@v4 @@ -252,7 +252,7 @@ jobs: - name: Install RPMs run: | - yum install -y *.rpm + dnf install -y *.rpm - name: Config check run: | @@ -264,7 +264,7 @@ jobs: # - name: Install pre-built eapol_test run: | - yum install -y libnl3 make gdb which + dnf install -y libnl3 make gdb which mv eapol_test /usr/local/bin chmod +x /usr/local/bin/eapol_test @@ -296,7 +296,7 @@ jobs: # - name: "Debug: Package dependancies for tmate" run: | - yum install -y xz + dnf install -y xz ln -s /bin/true /bin/apt-get if: ${{ github.ref == 'refs/heads/ci-debug' && failure() }} diff --git a/Makefile b/Makefile index 7c5553f280d..15c7aa10e83 100644 --- a/Makefile +++ b/Makefile @@ -527,8 +527,8 @@ rpmbuild/SOURCES/freeradius-server-$(PKG_VERSION).tar.bz2: freeradius-server-$(P @cp $< $@ rpm: rpmbuild/SOURCES/freeradius-server-$(PKG_VERSION).tar.bz2 - @if ! $(SUDO) yum-builddep ${YUM_BUILDDEP_FLAGS} -q -C --assumeno redhat/freeradius.spec 1> rpmbuild/builddep.log 2>&1; then \ - echo "ERROR: Required dependencies not found, install them with: yum-builddep redhat/freeradius.spec"; \ + @if ! $(SUDO) dnf builddep ${YUM_BUILDDEP_FLAGS} -q -C --assumeno redhat/freeradius.spec 1> rpmbuild/builddep.log 2>&1; then \ + echo "ERROR: Required dependencies not found, install them with: dnf builddep redhat/freeradius.spec"; \ cat rpmbuild/builddep.log; \ exit 1; \ fi diff --git a/doc/antora/modules/howto/pages/modules/ldap/bootstrap_openldap/packages.adoc b/doc/antora/modules/howto/pages/modules/ldap/bootstrap_openldap/packages.adoc index ebf5c057f74..35846d254f9 100644 --- a/doc/antora/modules/howto/pages/modules/ldap/bootstrap_openldap/packages.adoc +++ b/doc/antora/modules/howto/pages/modules/ldap/bootstrap_openldap/packages.adoc @@ -23,7 +23,7 @@ OpenLDAP LTB packages available under the "Packaging and OpenLDAP extensions" heading https://ltb-project.org/documentation[here]. You should add the appropriate repository definitions and install the `openldap` -package (`yum install openldap` or `apt-get install openldap`). +package (`dnf install openldap` or `apt-get install openldap`). === Define site specific variables Change the values here to match local paths and your site specific diff --git a/doc/antora/modules/howto/pages/modules/sql/odbc.adoc b/doc/antora/modules/howto/pages/modules/sql/odbc.adoc index 9b3f902c723..fc96db71dd6 100644 --- a/doc/antora/modules/howto/pages/modules/sql/odbc.adoc +++ b/doc/antora/modules/howto/pages/modules/sql/odbc.adoc @@ -97,7 +97,7 @@ Install the MS SQL Tools package: [source,shell] ---- -yum install mssql-tools +dnf install mssql-tools ---- Verify that non-ODBC connectivity to the database server functions correctly @@ -153,7 +153,7 @@ Install the package for Microsoft ODBC Driver for SQL Server: [source,shell] ---- -yum install msodbcsql17 unixodbc +dnf install msodbcsql17 unixodbc ---- diff --git a/doc/antora/modules/installation/pages/dependencies.adoc b/doc/antora/modules/installation/pages/dependencies.adoc index e910e765617..7f13d7a2ee8 100644 --- a/doc/antora/modules/installation/pages/dependencies.adoc +++ b/doc/antora/modules/installation/pages/dependencies.adoc @@ -33,7 +33,7 @@ https://talloc.samba.org/talloc/doc/html/index.html ``` # subscription-manager repos --enable rhel-7-server-optional-rpms -# yum install libtalloc-dev +# dnf install libtalloc-dev ``` === kqueue @@ -54,5 +54,5 @@ _kqueue is already available, there is nothing to install._ ``` # subscription-manager repos --enable rhel-7-server-optional-rpms -# yum install libkqueue-dev +# dnf install libkqueue-dev ``` diff --git a/scripts/docker/build/rocky8/Dockerfile b/scripts/docker/build/rocky8/Dockerfile index a5255293def..dc60691c086 100644 --- a/scripts/docker/build/rocky8/Dockerfile +++ b/scripts/docker/build/rocky8/Dockerfile @@ -11,9 +11,9 @@ RUN rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial # # Install build tools # -RUN yum groupinstall -y "Development Tools" +RUN dnf groupinstall -y "Development Tools" -RUN yum install -y rpmdevtools openssl dnf-utils +RUN dnf install -y rpmdevtools openssl dnf-utils # @@ -61,21 +61,21 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\ RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project # Enable EPEL repository for freetds and hiredis -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm # Enable powertools repo -RUN yum config-manager --enable powertools +RUN dnf config-manager --enable powertools # Enable epel-testing, currently needed for hiredis-devel -RUN yum config-manager --enable epel-testing +RUN dnf config-manager --enable epel-testing # # Install build dependencies # # Run twice, it doesn't always get everything with one invocation RUN [ -e redhat/freeradius.spec ] && \ - yum-builddep -y redhat/freeradius.spec && \ - yum-builddep -y redhat/freeradius.spec + dnf builddep -y redhat/freeradius.spec && \ + dnf builddep -y redhat/freeradius.spec # # Create RPM build environment @@ -136,16 +136,16 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\ # EPEL repository for freetds and hiredis -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ - && yum install -y dnf-utils \ - && yum config-manager --enable epel-testing +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ + && dnf install -y dnf-utils \ + && dnf config-manager --enable epel-testing ARG radiusd_uid=95 ARG radiusd_gid=95 RUN groupadd -g ${radiusd_gid} -r radiusd \ && useradd -u ${radiusd_uid} -g radiusd -r -M -d /home/radiusd -s /sbin/nologin radiusd \ - && yum install -y /tmp/*.rpm + && dnf install -y /tmp/*.rpm WORKDIR / COPY scripts/docker/etc/docker-entrypoint.sh.rpm docker-entrypoint.sh diff --git a/scripts/docker/build/rocky8/Dockerfile.cb b/scripts/docker/build/rocky8/Dockerfile.cb index 6a6b03e9770..914b0437629 100644 --- a/scripts/docker/build/rocky8/Dockerfile.cb +++ b/scripts/docker/build/rocky8/Dockerfile.cb @@ -10,17 +10,17 @@ FROM ${from} as build # Install devtools like make and git and the EPEL # repository for freetds and hiredis # -RUN yum update -y -RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \ +RUN dnf update -y +RUN dnf install -y rpmdevtools openssl epel-release git procps dnf-utils \ rsync dnf-plugins-core -RUN yum config-manager --set-enabled powertools +RUN dnf config-manager --set-enabled powertools # # Install GCC that has the requisite support for C11 keywords and atomics # -RUN yum install -y gcc-toolset-9 +RUN dnf install -y gcc-toolset-9 # @@ -28,16 +28,16 @@ RUN yum install -y gcc-toolset-9 # # - doxygen & JSON.pm -RUN yum install -y doxygen graphviz perl-JSON +RUN dnf install -y doxygen graphviz perl-JSON # - antora (npm needed) RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash - -RUN yum install -y nodejs +RUN dnf install -y nodejs RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7 # - pandoc RUN curl -o - -L $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*tar.gz" | cut -d '"' -f 4) | tar xzvf - -C /tmp/ RUN mv /tmp/pandoc-*/bin/* /usr/local/bin # - asciidoctor -RUN yum install -y rubygems-devel +RUN dnf install -y rubygems-devel RUN gem install asciidoctor # @@ -85,13 +85,13 @@ WORKDIR freeradius-server RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[4-9]*\.[0-9x]*\.x|master)$");\ do \ git checkout $i; \ - [ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \ + [ -e redhat/freeradius.spec ] && dnf builddep -y redhat/freeradius.spec; \ done # # A few extra packages needed for tests # -RUN yum install -y \ +RUN dnf install -y \ libnl3-devel \ libyubikey-devel \ oathtool \ diff --git a/scripts/docker/build/rocky9/Dockerfile b/scripts/docker/build/rocky9/Dockerfile index 039816beb87..4cb02e3035c 100644 --- a/scripts/docker/build/rocky9/Dockerfile +++ b/scripts/docker/build/rocky9/Dockerfile @@ -8,17 +8,12 @@ FROM ${from} as build RUN rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 -# -# Ensure yum is installed. Some docker images only have microdnf -# -RUN if [ ! -e /usr/bin/yum ]; then if [ -e /usr/bin/dnf ]; then dnf install -y yum; else microdnf install -y yum; fi; fi - # # Install build tools # -RUN yum groupinstall -y "Development Tools" +RUN dnf groupinstall -y "Development Tools" -RUN yum install -y rpmdevtools openssl dnf-utils +RUN dnf install -y rpmdevtools openssl dnf-utils # @@ -56,19 +51,19 @@ RUN git clean -fdxx \ # # Enable EPEL repository for freetds and hiredis -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm # Enable Code Ready Builder repo (CentOS powertools equivalent) -RUN yum install -y yum-utils -RUN yum config-manager --enable crb +RUN dnf install -y dnf-utils +RUN dnf config-manager --enable crb # # Install build dependencies # # Run twice, it doesn't always get everything with one invocation RUN [ -e redhat/freeradius.spec ] && \ - yum-builddep -y redhat/freeradius.spec && \ - yum-builddep -y redhat/freeradius.spec + dnf builddep -y redhat/freeradius.spec && \ + dnf builddep -y redhat/freeradius.spec # # Create RPM build environment @@ -118,23 +113,21 @@ RUN rpm --import https://packages.networkradius.com/pgp/packages@networkradius.c # Other requirements # -RUN if [ ! -e /usr/bin/yum ]; then if [ -e /usr/bin/dnf ]; then dnf install -y yum; else microdnf install -y yum; fi; fi - # Needed for mysql-libs on Rocky 9 -RUN yum install -y yum-utils -RUN yum config-manager --enable crb +RUN dnf install -y dnf-utils +RUN dnf config-manager --enable crb # EPEL repository for freetds and hiredis -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ - && yum install -y dnf-utils \ - && yum config-manager --enable epel-testing +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ + && dnf install -y dnf-utils \ + && dnf config-manager --enable epel-testing ARG radiusd_uid=95 ARG radiusd_gid=95 RUN groupadd -g ${radiusd_gid} -r radiusd \ && useradd -u ${radiusd_uid} -g radiusd -r -M -d /home/radiusd -s /sbin/nologin radiusd \ - && yum install -y /tmp/*.rpm + && dnf install -y /tmp/*.rpm WORKDIR / COPY scripts/docker/etc/docker-entrypoint.sh.rpm docker-entrypoint.sh diff --git a/scripts/docker/build/rocky9/Dockerfile.cb b/scripts/docker/build/rocky9/Dockerfile.cb index 163e313891c..ab52b09991a 100644 --- a/scripts/docker/build/rocky9/Dockerfile.cb +++ b/scripts/docker/build/rocky9/Dockerfile.cb @@ -6,38 +6,33 @@ ARG from=rockylinux/rockylinux:9 FROM ${from} as build -# -# Ensure yum is installed. Some docker images only have dnf or microdnf -# -RUN if [ ! -e /usr/bin/yum ]; then if [ -e /usr/bin/dnf ]; then dnf install -y yum; else microdnf install -y yum; fi; fi - # # Install devtools like make and git and the EPEL # repository for freetds and hiredis # -RUN yum update -y -RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \ +RUN dnf update -y +RUN dnf install -y rpmdevtools openssl epel-release git procps dnf-utils \ rsync dnf-plugins-core -RUN yum config-manager --set-enabled crb +RUN dnf config-manager --set-enabled crb # # Documentation build dependencies # # - doxygen & JSON.pm -RUN yum install -y doxygen graphviz perl-JSON +RUN dnf install -y doxygen graphviz perl-JSON # - antora (npm needed) RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash - -RUN yum install -y nodejs +RUN dnf install -y nodejs RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7 # - pandoc RUN curl -o - -L $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*tar.gz" | cut -d '"' -f 4) | tar xzvf - -C /tmp/ RUN mv /tmp/pandoc-*/bin/* /usr/local/bin # - asciidoctor -RUN yum install -y rubygems-devel +RUN dnf install -y rubygems-devel RUN gem install asciidoctor # @@ -73,13 +68,13 @@ WORKDIR freeradius-server RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[4-9]*\.[0-9x]*\.x|master)$");\ do \ git checkout $i; \ - [ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \ + [ -e redhat/freeradius.spec ] && dnf builddep -y redhat/freeradius.spec; \ done # # A few extra packages needed for tests # -RUN yum install -y \ +RUN dnf install -y \ libnl3-devel \ libyubikey-devel \ oathtool \ diff --git a/scripts/docker/m4/crossbuild.rpm.m4 b/scripts/docker/m4/crossbuild.rpm.m4 index e2f966293bf..26181aebdf7 100644 --- a/scripts/docker/m4/crossbuild.rpm.m4 +++ b/scripts/docker/m4/crossbuild.rpm.m4 @@ -1,25 +1,20 @@ ARG from=DOCKER_IMAGE FROM ${from} as build -# -# Ensure yum is installed. Some docker images only have dnf or microdnf -# -RUN if [ ! -e /usr/bin/yum ]; then if [ -e /usr/bin/dnf ]; then dnf install -y yum; else microdnf install -y yum; fi; fi - # # Install devtools like make and git and the EPEL # repository for freetds and hiredis # -RUN yum update -y -RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \ +RUN dnf update -y +RUN dnf install -y rpmdevtools openssl epel-release git procps dnf-utils \ rsync`'ifelse(OS_VER, `7',, ` dnf-plugins-core') ifelse(OS_VER, `7', `dnl # # Install GCC that has the requisite support for C11 keywords and atomics # -RUN yum install -y centos-release-scl -RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ +RUN dnf install -y centos-release-scl +RUN dnf install -y devtoolset-8-gcc devtoolset-8-gcc-c++ ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc # @@ -31,16 +26,16 @@ RUN rm /etc/yum.repos.d/CentOS-SCLo-scl.repo ')dnl ifelse(OS_VER, `8', `dnl -RUN yum config-manager --set-enabled powertools +RUN dnf config-manager --set-enabled powertools # # Install GCC that has the requisite support for C11 keywords and atomics # -RUN yum install -y gcc-toolset-9 +RUN dnf install -y gcc-toolset-9 ')dnl ifelse(OS_VER, `9', `dnl -RUN yum config-manager --set-enabled crb +RUN dnf config-manager --set-enabled crb ')dnl # @@ -50,16 +45,16 @@ define(`NODE_VER', `20')dnl define(`ANTORA_VER', `3.1.7')dnl # - doxygen & JSON.pm -RUN yum install -y doxygen graphviz perl-JSON +RUN dnf install -y doxygen graphviz perl-JSON # - antora (npm needed) RUN curl -sL https://rpm.nodesource.com/setup_`'NODE_VER.x | bash - -RUN yum install -y nodejs +RUN dnf install -y nodejs RUN npm i -g @antora/cli@ANTORA_VER @antora/site-generator-default@ANTORA_VER # - pandoc RUN curl -o - -L $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*tar.gz" | cut -d '"' -f 4) | tar xzvf - -C /tmp/ RUN mv /tmp/pandoc-*/bin/* /usr/local/bin # - asciidoctor -RUN yum install -y rubygems-devel +RUN dnf install -y rubygems-devel RUN gem install asciidoctor # @@ -112,13 +107,13 @@ WORKDIR freeradius-server RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[4-9]*\.[0-9x]*\.x|master)$");\ do \ git checkout $i; \ - [ -e redhat/freeradius.spec ] && yum-builddep EXTRA_DISABLE -y redhat/freeradius.spec; \ + [ -e redhat/freeradius.spec ] && dnf builddep EXTRA_DISABLE -y redhat/freeradius.spec; \ done # # A few extra packages needed for tests # -RUN yum install -y \ +RUN dnf install -y \ libnl3-devel \ libyubikey-devel \ oathtool \ diff --git a/scripts/docker/m4/docker.rpm.m4 b/scripts/docker/m4/docker.rpm.m4 index 82a641d5270..477cd7c3ff6 100644 --- a/scripts/docker/m4/docker.rpm.m4 +++ b/scripts/docker/m4/docker.rpm.m4 @@ -8,20 +8,15 @@ ifelse(OS_VER, 9, `dnl RUN rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 ') -# -# Ensure yum is installed. Some docker images only have dnf or microdnf -# -RUN if [ ! -e /usr/bin/yum ]; then if [ -e /usr/bin/dnf ]; then dnf install -y yum; else microdnf install -y yum; fi; fi - # # Install build tools # -RUN yum groupinstall -y "Development Tools" +RUN dnf groupinstall -y "Development Tools" ifelse(OS_VER, 7,`dnl -RUN yum install -y rpmdevtools -RUN yum install -y openssl +RUN dnf install -y rpmdevtools +RUN dnf install -y openssl ',` -RUN yum install -y rpmdevtools openssl dnf-utils +RUN dnf install -y rpmdevtools openssl dnf-utils ') # @@ -72,18 +67,18 @@ RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project changequote({`}, {'})dnl # Enable EPEL repository for freetds and hiredis -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-OS_VER.noarch.rpm +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-OS_VER.noarch.rpm ifelse(OS_VER, 8, ` # Enable powertools repo -RUN yum config-manager --enable powertools +RUN dnf config-manager --enable powertools # Enable epel-testing, currently needed for hiredis-devel -RUN yum config-manager --enable epel-testing +RUN dnf config-manager --enable epel-testing ')dnl ifelse(OS_VER, 9, ` # Enable Code Ready Builder repo (CentOS powertools equivalent) -RUN yum install -y yum-utils -RUN yum config-manager --enable crb +RUN dnf install -y dnf-utils +RUN dnf config-manager --enable crb ')dnl # @@ -91,8 +86,8 @@ RUN yum config-manager --enable crb # # Run twice, it doesn't always get everything with one invocation RUN [ -e redhat/freeradius.spec ] && \ - yum-builddep -y redhat/freeradius.spec && \ - yum-builddep -y redhat/freeradius.spec + dnf builddep -y redhat/freeradius.spec && \ + dnf builddep -y redhat/freeradius.spec # # Create RPM build environment @@ -155,25 +150,23 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\ })dnl changequote({`}, {'})dnl -RUN if [ ! -e /usr/bin/yum ]; then if [ -e /usr/bin/dnf ]; then dnf install -y yum; else microdnf install -y yum; fi; fi - ifelse(OS_VER, 9, `dnl # Needed for mysql-libs on Rocky 9 -RUN yum install -y yum-utils -RUN yum config-manager --enable crb +RUN dnf install -y dnf-utils +RUN dnf config-manager --enable crb ')dnl # EPEL repository for freetds and hiredis -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-OS_VER.noarch.rpm \ - && yum install -y dnf-utils \ - && yum config-manager --enable epel-testing +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-OS_VER.noarch.rpm \ + && dnf install -y dnf-utils \ + && dnf config-manager --enable epel-testing ARG radiusd_uid=95 ARG radiusd_gid=95 RUN groupadd -g ${radiusd_gid} -r radiusd \ && useradd -u ${radiusd_uid} -g radiusd -r -M -d /home/radiusd -s /sbin/nologin radiusd \ - && yum install -y /tmp/*.rpm + && dnf install -y /tmp/*.rpm WORKDIR / COPY scripts/docker/etc/docker-entrypoint.sh.PKG_TYPE docker-entrypoint.sh