]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Replace yum with dnf
authorNick Porter <nick@portercomputing.co.uk>
Mon, 13 May 2024 08:00:11 +0000 (09:00 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 13 May 2024 08:32:11 +0000 (09:32 +0100)
The default since RHEL 8, which is the oldest FRv4 builds on.

.github/workflows/ci-rpm.yml
Makefile
doc/antora/modules/howto/pages/modules/ldap/bootstrap_openldap/packages.adoc
doc/antora/modules/howto/pages/modules/sql/odbc.adoc
doc/antora/modules/installation/pages/dependencies.adoc
scripts/docker/build/rocky8/Dockerfile
scripts/docker/build/rocky8/Dockerfile.cb
scripts/docker/build/rocky9/Dockerfile
scripts/docker/build/rocky9/Dockerfile.cb
scripts/docker/m4/crossbuild.rpm.m4
scripts/docker/m4/docker.rpm.m4

index ec4dc16e553c3eaff9cf62c4dbcade870477ac1d..7a7bba0e9dc7530c32dde37ad117d1ae6a270a86 100644 (file)
@@ -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() }}
 
index 7c5553f280dc97e07e538ef41997c80087720f9c..15c7aa10e833aa09759275a612f650e88565e508 100644 (file)
--- 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
index ebf5c057f74ea87ff269304c5ecebbeb95767af3..35846d254f98e0e51703b13bcac670b135134dec 100644 (file)
@@ -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
index 9b3f902c723d509faefccdf3062ae71d84ce2699..fc96db71dd680e4fc98b964e93b437e4384cca86 100644 (file)
@@ -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
 ----
 
 
index e910e76561712e782165d175fea93e7f83da1d32..7f13d7a2ee8b26868312b5beefaa19e8302bb629 100644 (file)
@@ -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
 ```
index a5255293def5081a121091001c6311aa619b3347..dc60691c086160ca28b86873e816dab9138ee556 100644 (file)
@@ -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
index 6a6b03e977055a93487983bf57f97a742b24c6ed..914b043762960aa091f11d69ffe533db0265c57d 100644 (file)
@@ -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 \
index 039816beb87be4429a46bd261b8e1cd38df54cf5..4cb02e3035cb6d5cdd3883c2d0382d447a58443b 100644 (file)
@@ -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
index 163e313891cdfa200aeb39ea29f591a4ffa1db5b..ab52b09991ae03c04909b124cdf786952f7807cc 100644 (file)
@@ -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 \
index e2f966293bfe291981aa134d4a372a33449b4bd0..26181aebdf79d314ce318f3909672b1a1adc6a56 100644 (file)
@@ -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 \
index 82a641d5270c78f778853f15d4f30ac9a8492146..477cd7c3ff6f483ff4967665305dbe8e25f15637 100644 (file)
@@ -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