File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,11 +208,11 @@ BUILD_EXAMPLE_STATE_MACHINE:
208208 RUN cd /s && /s/example-state-machine
209209
210210rpm-build :
211- FROM +init --base fedora:38
211+ FROM +init --base fedora:45
212212 GIT CLONE https://src.fedoraproject.org/rpms/libmongocrypt.git /R
213213 # Install the packages listed by "BuildRequires" and rpm-build:
214- RUN __install $(awk '/^BuildRequires:/ { print $2 }' / R/libmongocrypt.spec) \
215- rpm-build
214+ RUN __install / R/libmongocrypt.spec
215+ RUN __install rpm-build
216216 DO +COPY_SOURCE
217217 RUN cp -r /s/libmongocrypt/. /R
218218 RUN awk -f /R/etc/rpm/tweak.awk < /R/libmongocrypt.spec > /R/libmongocrypt.2.spec
@@ -224,7 +224,7 @@ rpm-build:
224224
225225rpm-install-runtime :
226226 # Install the runtime RPM
227- FROM +init --base fedora:38
227+ FROM +init --base fedora:45
228228 COPY +rpm-build/RPMS /tmp/libmongocrypt-rpm/
229229 RUN dnf makecache
230230 RUN __install $(find /tmp/libmongocrypt-rpm/ -name 'libmongocrypt-1.*.rpm' )
Original file line number Diff line number Diff line change @@ -21,9 +21,14 @@ if test -f /etc/debian_version ; then
2121 apt-get -y install -- " $@ "
2222elif test -f /etc/redhat-release || grep ' ID="amzn"' /etc/os-release > /dev/null 1>&2 ; then
2323 if test -f /usr/bin/dnf; then
24- # 'dnf' will "do the right thing"
25- # --allow-erasing: see https://github.com/jeroen/curl/issues/350.
26- dnf install -y --allowerasing -- " $@ "
24+ if echo " $@ " | grep -q ' [.]spec' ; then
25+ # We use the build-dep command to let dnf do the heavy lifting from the spec file
26+ dnf build-dep -y --allowerasing " $@ "
27+ else
28+ # 'dnf' will "do the right thing"
29+ # --allow-erasing: see https://github.com/jeroen/curl/issues/350.
30+ dnf install -y --allowerasing " $@ "
31+ fi
2732 elif test -f /usr/bin/yum; then
2833 yum install -y -- " $@ "
2934 # 'yum' happily ignores missing packages. Use 'rpm -q' to check that
You can’t perform that action at this time.
0 commit comments