Skip to content

Commit

Permalink
BIGTOP-4023: Add ranger deb packaging support (#1197)
Browse files Browse the repository at this point in the history
* BIGTOP-4023: Add ranger deb packaging support

* add postgresql dependency
fix copyright and ranger.postinst.tpl file typo

---------

Co-authored-by: jialiang <jialiangcaimd@gmail.com>
  • Loading branch information
JiaLiangC and JiaLiangC authored Oct 19, 2023
1 parent f4d65ae commit c4b34b2
Show file tree
Hide file tree
Showing 10 changed files with 486 additions and 1 deletion.
1 change: 1 addition & 0 deletions bigtop-packages/src/deb/ranger/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- NOTE: this gets auto-generated
1 change: 1 addition & 0 deletions bigtop-packages/src/deb/ranger/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12
120 changes: 120 additions & 0 deletions bigtop-packages/src/deb/ranger/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Source: ranger
Section: misc
Priority: optional
Maintainer: Bigtop <dev@bigtop.apache.org>
Build-Depends: debhelper (>= 7.0.50~)
Standards-Version: 3.9.4
Homepage: http://ranger.apache.org/

Package: ranger
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Apache Ranger is a framework to enable,
monitor and manage comprehensive data security across the Hadoop platform.
The vision with Ranger is to provide comprehensive security across the Apache Hadoop ecosystem.
With the advent of Apache YARN, the Hadoop platform can now support a true data lake architecture.
Enterprises can potentially run multiple workloads, in a multi tenant environment.
Data security within Hadoop needs to evolve to support multiple use cases for data access,
while also providing a framework for central administration of security policies and monitoring of user access.


Package: ranger-admin
Architecture: all
Depends: adduser, postgresql (>= 8.1), bigtop-utils (>= 0.7), python | python2
Description: Ranger-admin is admin component associated with the Ranger framework

Package: ranger-usersync
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger-usersync is user/group synchronization component associated with the Ranger framework

Package: ranger-kms
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger-kms is key management server component associated with the Ranger framework


Package: ranger-tagsync
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger-tagsync is tag synchronizer component associated with the Ranger framework

Package: ranger-hdfs-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger HDFS plugin component runs within namenode to provide enterprise security using ranger framework

Package: ranger-yarn-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger YARN plugin component runs within resourcemanager to provide enterprise security using ranger framework

Package: ranger-hive-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger Hive plugin component runs within hiveserver2 to provide enterprise security using ranger framework

Package: ranger-hbase-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger HBASE plugin component runs within master and region servers as co-processor to provide enterprise security using ranger framework

Package: ranger-knox-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger KNOX plugin component runs within knox proxy server to provide enterprise security using ranger framework

Package: ranger-storm-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger STORM plugin component runs within storm to provide enterprise security using ranger framework

Package: ranger-kafka-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger KAFKA plugin component runs within kafka to provide enterprise security using ranger framework

Package: ranger-atlas-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger ATLAS plugin component runs within atlas to provide enterprise security using ranger framework

Package: ranger-solr-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger SOLR plugin component runs within solr to provide enterprise security using ranger framework

Package: ranger-sqoop-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger SQOOP plugin component runs within sqoop to provide enterprise security using ranger framework

Package: ranger-kylin-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger KYLIN plugin component runs within kylin to provide enterprise security using ranger framework

Package: ranger-elasticsearch-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger ELASTICSEARCH plugin component runs within elasticsearch to provide enterprise security using ranger framework

Package: ranger-presto-plugin
Architecture: all
Depends: adduser, bigtop-utils (>= 0.7), python | python2
Description: Ranger PRESTO plugin component runs within presto to provide enterprise security using ranger framework
11 changes: 11 additions & 0 deletions bigtop-packages/src/deb/ranger/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Format: http://dep.debian.net/deps/dep5
Source: http://ranger.apache.org/
Upstream-Name: Apache Ranger

Files: *
Copyright: 2014-2019, The Apache Software Foundation
License: Apache-2.0

License: Apache-2.0
On Debian systems, the complete text of the Apache 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
37 changes: 37 additions & 0 deletions bigtop-packages/src/deb/ranger/ranger.postinst.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# postinst script for ranger

set -e

case "$1" in
configure)
update-alternatives --install /etc/ranger/conf ranger-conf @etc_ranger@/conf.dist 30
chown ranger:ranger -R /var/run/ranger /var/log/ranger @var_lib_ranger@
;;

abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

#DEBHELPER#
62 changes: 62 additions & 0 deletions bigtop-packages/src/deb/ranger/ranger.preinst.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# preinst script for ranger
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
install|upgrade)
getent group ranger >/dev/null || groupadd -r ranger
if ! getent passwd ranger >/dev/null; then
# Adding system user: ranger.
adduser \
--system \
--ingroup ranger \
--home @var_lib_ranger@ \
--gecos "Ranger User" \
--shell /bin/bash \
ranger >/dev/null
fi
;;

abort-upgrade)
;;

*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
57 changes: 57 additions & 0 deletions bigtop-packages/src/deb/ranger/ranger.prerm.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# prerm script for ranger
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
remove|upgrade|deconfigure)
update-alternatives --remove ranger-conf @etc_ranger@/conf.dist || :
;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0


Loading

0 comments on commit c4b34b2

Please sign in to comment.