This is an automated email from the ASF dual-hosted git repository.
guyuqi pushed a commit to branch openEuler-support
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/openEuler-support by this push:
new 2516f527d BIGTOP-3824: add support for ranger (#1143)
2516f527d is described below
commit 2516f527ddb48247220d0761d450b96b3a19adb1
Author: MacChen01 <[email protected]>
AuthorDate: Tue Sep 12 10:09:03 2023 +0800
BIGTOP-3824: add support for ranger (#1143)
---
.../puppet/modules/ranger/manifests/init.pp | 15 ++++++++----
bigtop-packages/src/rpm/ranger/SPECS/ranger.spec | 27 ++++++++++++++++++----
2 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/bigtop-deploy/puppet/modules/ranger/manifests/init.pp
b/bigtop-deploy/puppet/modules/ranger/manifests/init.pp
index d1654c6fc..bdbc36647 100644
--- a/bigtop-deploy/puppet/modules/ranger/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/ranger/manifests/init.pp
@@ -75,10 +75,17 @@ class ranger {
path => ["/bin", "/usr/bin"],
require => Exec['/usr/lib/ranger-admin/set_globals.sh'],
}
-
- service { 'ranger-admin':
- ensure => running,
- require => Exec['systemctl daemon-reload'],
+
+ if ($operatingsystem == 'openEuler') {
+ exec { 'ranger-admin':
+ command => "/usr/sbin/usermod -G root ranger && /sbin/service
ranger-admin start",
+ require => Exec['systemctl daemon-reload'],
+ }
+ } else {
+ service { 'ranger-admin':
+ ensure => running,
+ require => Exec['systemctl daemon-reload'],
+ }
}
}
}
diff --git a/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
b/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
index 794d98677..d09376acd 100644
--- a/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
+++ b/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
@@ -120,7 +120,10 @@ Requires: coreutils, insserv
# CentOS 5 does not have any dist macro
# So I will suppose anything that is not Mageia or a SUSE will be a
RHEL/CentOS/Fedora
-%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# using the openeuler-lsb replace redhat-lsb in openEuler
+%if 0%{?openEuler}
+Requires: coreutils, openeuler-lsb
+%elif %{!?suse_version:1}0 && %{!?mgaversion:1}0
# Required for init scripts
Requires: coreutils, redhat-lsb
%endif
@@ -150,7 +153,10 @@ Requires: coreutils, insserv
# CentOS 5 does not have any dist macro
# So I will suppose anything that is not Mageia or a SUSE will be a
RHEL/CentOS/Fedora
-%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# using the openeuler-lsb replace redhat-lsb in openEuler
+%if 0%{?openEuler}
+Requires: coreutils, openeuler-lsb
+%elif %{!?suse_version:1}0 && %{!?mgaversion:1}0
# Required for init scripts
Requires: coreutils, redhat-lsb
%endif
@@ -180,7 +186,10 @@ Requires: coreutils, insserv
# CentOS 5 does not have any dist macro
# So I will suppose anything that is not Mageia or a SUSE will be a
RHEL/CentOS/Fedora
-%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# using the openeuler-lsb replace redhat-lsb in openEuler
+%if 0%{?openEuler}
+Requires: coreutils, openeuler-lsb
+%elif %{!?suse_version:1}0 && %{!?mgaversion:1}0
# Required for init scripts
Requires: coreutils, redhat-lsb
%endif
@@ -210,7 +219,10 @@ Requires: coreutils, insserv
# CentOS 5 does not have any dist macro
# So I will suppose anything that is not Mageia or a SUSE will be a
RHEL/CentOS/Fedora
-%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# using the openeuler-lsb replace redhat-lsb in openEuler
+%if 0%{?openEuler}
+Requires: coreutils, openeuler-lsb
+%elif %{!?suse_version:1}0 && %{!?mgaversion:1}0
# Required for init scripts
Requires: coreutils, redhat-lsb
%endif
@@ -236,12 +248,17 @@ AutoReq: no
# Required for init scripts
Requires: coreutils, insserv
%endif
+
# CentOS 5 does not have any dist macro
# So I will suppose anything that is not Mageia or a SUSE will be a
RHEL/CentOS/Fedora
-%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# using the openeuler-lsb replace redhat-lsb in openEuler
+%if 0%{?openEuler}
+Requires: coreutils, openeuler-lsb
+%elif %{!?suse_version:1}0 && %{!?mgaversion:1}0
# Required for init scripts
Requires: coreutils, redhat-lsb
%endif
+
%if 0%{?mgaversion}
Requires: chkconfig, xinetd-simple-services, zlib, initscripts
%endif