Skip to content

Commit 8457dd4

Browse files
Merge pull request #76 from fledge-iot/FOGL-7373
2 parents 8f5ecb2 + 7c7df4e commit 8457dd4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/RPM/SPECS/fledge.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Prefix: /usr/local
1818
%if 0%{?centos} < 9 || 0%{?rhel} < 9
1919
Requires: dbus-devel, glib2-devel, boost, openssl, rh-python36, yum-utils, gcc, autoconf, curl, libtool, rsyslog, wget, zlib, libuuid, avahi, sudo, krb5-workstation, curl-devel
2020
%else
21-
Requires: dbus-devel, glib2-devel, boost, openssl, python3-devel, yum-utils, gcc, autoconf, curl, libtool, rsyslog, wget, zlib, libuuid, avahi, sudo, krb5-workstation, curl-devel, chkconfig
21+
Requires: dbus-devel, glib2-devel, boost, openssl, python3-devel, yum-utils, gcc, autoconf, curl, libtool, rsyslog, wget, zlib, libuuid, avahi, sudo, krb5-workstation, curl-devel, chkconfig, sqlite
2222
%endif
2323
AutoReqProv: no
2424

plugins/packages/RPM/SPECS/plugin.spec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ PKG_NAME="__PACKAGE_NAME__"
111111
set -e
112112

113113

114+
OS_VERSION=$(cat /etc/os-release | grep 'VERSION_ID=' | cut -f2 -d= | sed 's/"//g')
114115

115116
set_files_ownership () {
116117
chown -R root:root /usr/local/fledge/__INSTALL_DIR__
@@ -127,10 +128,8 @@ fi
127128

128129
# Install any Python dependencies
129130
if [ -f /usr/local/fledge/__INSTALL_DIR__/requirements.txt ]; then
130-
bash << EOF
131-
scl enable rh-python36 bash
132-
pip install -Ir /usr/local/fledge/__INSTALL_DIR__/requirements.txt
133-
EOF
131+
if [[ ${OS_VERSION} == *"7"* ]]; then source scl_source enable rh-python36 bash; fi
132+
python3 -m pip install -Ir /usr/local/fledge/__INSTALL_DIR__/requirements.txt
134133
fi
135134

136135
echo __PLUGIN_NAME__ __PLUGIN_TYPE__ plugin is installed.

0 commit comments

Comments
 (0)