Skip to content

Commit dba89d9

Browse files
committed
xrtdeps : fix and update Fedora package list
- Added logic to detect Fedora version from /etc/os-release. - Introduced conditional inclusion of openssl-static, protobuf-static, and python2-sphinx based on Fedora version: - openssl-static for Fedora ≤ 35 - protobuf-static for Fedora ≤ 38 - python2-sphinx for Fedora < 32, otherwise python3-sphinx for Fedora ≥ 32 - Cleaned up redundant entries in the package list (FD_LIST). - Improved error handling for unavailable packages with --skip-broken option in dnf. - Ensured compatibility with Fedora's evolving package ecosystem by addressing deprecated packages. Signed-off-by: Marco Dos Santos Oliveira <marco.dossantosoliveira@sunrise.ch>
1 parent 342cbee commit dba89d9

File tree

1 file changed

+78
-63
lines changed

1 file changed

+78
-63
lines changed

src/runtime_src/tools/scripts/xrtdeps.sh

Lines changed: 78 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -247,69 +247,84 @@ ub_package_list()
247247

248248
fd_package_list()
249249
{
250-
FD_LIST=(\
251-
boost-devel \
252-
boost-filesystem \
253-
boost-program-options \
254-
boost-static \
255-
cmake \
256-
cppcheck \
257-
curl \
258-
dkms \
259-
dmidecode \
260-
elfutils-devel \
261-
elfutils-libs \
262-
gcc \
263-
gcc-c++ \
264-
gdb \
265-
git \
266-
glibc-static \
267-
gnuplot \
268-
gnutls-devel \
269-
gtest-devel \
270-
json-glib-devel \
271-
kernel-devel-$(uname -r) \
272-
kernel-headers-$(uname -r) \
273-
libcurl-devel \
274-
libdrm-devel \
275-
libffi-devel \
276-
libjpeg-turbo-devel \
277-
libpng12-devel \
278-
libstdc++-static \
279-
libtiff-devel \
280-
libudev-devel \
281-
libuuid-devel \
282-
libyaml-devel \
283-
lm_sensors \
284-
make \
285-
ncurses-devel \
286-
ocl-icd \
287-
ocl-icd-devel \
288-
opencl-headers \
289-
opencv \
290-
openssl-devel \
291-
openssl-static \
292-
pciutils \
293-
perl \
294-
pkgconfig \
295-
protobuf-compiler \
296-
protobuf-devel \
297-
protobuf-static \
298-
python \
299-
python-pip \
300-
python2-sphinx \
301-
python3 \
302-
python3-pip \
303-
redhat-lsb \
304-
rapidjson-devel \
305-
rpm-build \
306-
strace \
307-
systemd-devel \
308-
systemd-devel \
309-
systemtap-sdt-devel \
310-
unzip \
311-
zlib-static \
312-
)
250+
FD_LIST=(\
251+
boost-devel \
252+
boost-filesystem \
253+
boost-program-options \
254+
cmake \
255+
cppcheck \
256+
curl \
257+
dkms \
258+
dmidecode \
259+
elfutils-devel \
260+
elfutils-libs \
261+
gcc \
262+
gcc-c++ \
263+
gdb \
264+
git \
265+
glibc-static \
266+
gnuplot \
267+
gnutls-devel \
268+
gtest-devel \
269+
json-glib-devel \
270+
kernel-devel-$(uname -r) \
271+
kernel-headers-$(uname -r) \
272+
libcurl-devel \
273+
libdrm-devel \
274+
libffi-devel \
275+
libjpeg-turbo-devel \
276+
libpng12-devel \
277+
libstdc++-static \
278+
libtiff-devel \
279+
libudev-devel \
280+
libuuid-devel \
281+
libyaml-devel \
282+
lm_sensors \
283+
make \
284+
ncurses-devel \
285+
ocl-icd \
286+
ocl-icd-devel \
287+
opencl-headers \
288+
opencv \
289+
openssl-devel \
290+
pciutils \
291+
perl \
292+
pkgconfig \
293+
protobuf-compiler \
294+
protobuf-devel \
295+
python \
296+
python-pip \
297+
python3 \
298+
python3-pip \
299+
redhat-lsb \
300+
rapidjson-devel \
301+
rpm-build \
302+
strace \
303+
systemd-devel \
304+
systemtap-sdt-devel \
305+
unzip \
306+
zlib-static \
307+
)
308+
309+
# Detect Fedora version
310+
FEDORA_VERSION=$(grep "^VERSION_ID=" /etc/os-release | cut -d'=' -f2 | tr -d '"')
311+
312+
# Add openssl-static if Fedora <= 35
313+
if (( FEDORA_VERSION <= 35 )); then
314+
FD_LIST+=("openssl-static")
315+
fi
316+
317+
# Add protobuf-static if Fedora <= 38
318+
if (( FEDORA_VERSION <= 38 )); then
319+
FD_LIST+=("protobuf-static")
320+
fi
321+
322+
# Add python2-sphinx if Fedora < 32, else python3-sphinx
323+
if (( FEDORA_VERSION < 32 )); then
324+
FD_LIST+=("python2-sphinx")
325+
else
326+
FD_LIST+=("python3-sphinx")
327+
fi
313328
}
314329

315330

0 commit comments

Comments
 (0)