commit 37dad2ac97eccb383da13facce8cc30776b1bc48
Author: Richard Shaw <hobbes1069(a)gmail.com>
Date: Thu Oct 10 08:07:36 2019 -0500
Remove mongod requires and move config info to SETUP.
Fix Requires for java to comply with guidelines.
Try JAVA_HOME instead of forcing java 1.8.0 via alternatives.
SETUP | 6 ++++++
unifi.spec | 19 +++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/SETUP b/SETUP
index 6478a33..4c37e6e 100644
--- a/SETUP
+++ b/SETUP
@@ -29,6 +29,12 @@ For RHEL/CentOS/SL etc, you will also need Fedora EPEL repository
installed for
#### All systems ###
####################
+Since MongoDB was removed from Fedora[1] it must be installed separately. The
+EL7 community package[1] from MongoDB works on Fedora as well.
+
+[1]
https://fedoraproject.org/wiki/Changes/MongoDB_Removal
+[2]
https://www.mongodb.com/download-center/community
+
Enable the unifi service and the firewall config:
# firewall-cmd --permanent --add-service=unifi
diff --git a/unifi.spec b/unifi.spec
index ce15591..a0eb9a1 100644
--- a/unifi.spec
+++ b/unifi.spec
@@ -5,7 +5,7 @@
Name: unifi
Version: 5.11.46
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Ubiquiti UniFi controller
License: Proprietary
@@ -29,8 +29,8 @@ BuildRequires: firewalld-filesystem
BuildRequires: %{_bindir}/execstack
#
https://fedoraproject.org/wiki/Changes/MongoDB_Removal
-Requires: /usr/bin/mongod
-Requires: java-1.8.0-openjdk-headless
+#Requires: /usr/bin/mongod
+Requires: java-headless = 1:1.8.0
Requires(post): policycoreutils-python-utils
Requires(postun): policycoreutils-python-utils
@@ -187,11 +187,11 @@ install -pm 0755 Linux/%{unifi_arch}/*.so
%{buildroot}%{_libdir}/%{name}/
for lib in $(ls %{buildroot}%{_libdir}/%{name}/*.so); do
ln -sr $lib %{buildroot}%{_datadir}/unifi/lib/native/Linux/%{unifi_arch}
done
+
# Try to fix java VM warning about running execstack on libubnt_webrtc_jni.so
find %{buildroot}%{_libdir} -name libubnt_webrtc_jni.so -exec execstack -c {} \;
%endif
-
# Install logrotate config
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
@@ -205,9 +205,11 @@ install -p %{SOURCE100} %{SOURCE101} .
#
install -pm 0755 %{SOURCE6} %{buildroot}%{_datadir}/unifi/bin/mongod
-# Install empty sysconfig file for packaging.
+# Install sysconfig file.
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
-touch %{buildroot}%{_sysconfdir}/sysconfig/%{name}
+cat > %{buildroot}%{_sysconfdir}/sysconfig/%{name} <<EOL
+JAVA_HOME=/usr/lib/jvm/java-1.8.0
+EOL
%pre
@@ -279,6 +281,11 @@ fi
%changelog
+* Thu Oct 10 2019 Richard Shaw <hobbes1069(a)gmail.com> - 5.11.46-3
+- Remove mongod requires and move config info to SETUP.
+- Fix Requires for java to comply with guidelines.
+- Try JAVA_HOME instead of forcing java 1.8.0 via alternatives.
+
* Thu Oct 03 2019 Richard Shaw <hobbes1069(a)gmail.com> - 5.11.46-2
- Change requirement from policycoreutils-python to policycoreutils-python-utils
so Python 3 is used instead of Python 2 to manage selinux contexts.