aboutsummaryrefslogtreecommitdiff
path: root/bigtop-packages/src/deb/sqoop2
diff options
context:
space:
mode:
authorSean Mackrory <mackrorysd@apache.org>2015-02-06 11:41:52 -0700
committerEvans Ye <evansye@apache.org>2015-03-05 01:47:28 +0000
commita241ffb3e5c52ea8e41fbd07af539cd62c478cbf (patch)
treedddf60d70230fe6007019061966a0d410c51900e /bigtop-packages/src/deb/sqoop2
parentdefa03814385cebd707aad6553a6a3d6d29b1164 (diff)
BIGTOP-1465. Allow both Sqoop 1.x and Sqoop 1.99.x / Sqoop 2.x to be distributed
Signed-off-by: Evans Ye <evansye@apache.org>
Diffstat (limited to 'bigtop-packages/src/deb/sqoop2')
-rw-r--r--bigtop-packages/src/deb/sqoop2/changelog1
-rw-r--r--bigtop-packages/src/deb/sqoop2/compat2
-rw-r--r--bigtop-packages/src/deb/sqoop2/control39
-rw-r--r--bigtop-packages/src/deb/sqoop2/copyright11
-rwxr-xr-xbigtop-packages/src/deb/sqoop2/rules44
-rw-r--r--bigtop-packages/src/deb/sqoop2/source/format1
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2-client.install6
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2-server.install1
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2-server.postinst21
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2.install11
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2.postinst21
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2.preinst65
-rw-r--r--bigtop-packages/src/deb/sqoop2/sqoop2.prerm46
13 files changed, 269 insertions, 0 deletions
diff --git a/bigtop-packages/src/deb/sqoop2/changelog b/bigtop-packages/src/deb/sqoop2/changelog
new file mode 100644
index 00000000..d4858cd4
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/changelog
@@ -0,0 +1 @@
+--- This is auto-generated
diff --git a/bigtop-packages/src/deb/sqoop2/compat b/bigtop-packages/src/deb/sqoop2/compat
new file mode 100644
index 00000000..4d446d8d
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/compat
@@ -0,0 +1,2 @@
+7
+
diff --git a/bigtop-packages/src/deb/sqoop2/control b/bigtop-packages/src/deb/sqoop2/control
new file mode 100644
index 00000000..0ab8d599
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/control
@@ -0,0 +1,39 @@
+# 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: sqoop2
+Section: misc
+Priority: extra
+Maintainer: Bigtop <dev@bigtop.apache.org>
+Standards-Version: 3.8.0
+Homepage: http://sqoop.apache.org
+
+Package: sqoop2
+Architecture: all
+Depends: bigtop-utils (>= 0.7), hadoop-client, bigtop-tomcat (>= 0.7), sqoop2-client (= ${source:Version})
+Description: Tool for easy imports and exports of data sets between databases and the Hadoop ecosystem
+ Sqoop is a tool that provides the ability to import and export data sets between
+ the Hadoop Distributed File System (HDFS) and relational databases. In Sqoop 2, the tool
+ consists of a server that is configured to interface with the Hadoop cluster, and a
+ lightweight client for executing imports and exports on the server.
+
+Package: sqoop2-client
+Architecture: all
+Depends: bigtop-utils (>= 0.7)
+Description: Lightweight client for Sqoop 2.
+
+Package: sqoop2-server
+Architecture: all
+Depends: sqoop2 (= ${source:Version})
+Description: Server for Sqoop 2.
diff --git a/bigtop-packages/src/deb/sqoop2/copyright b/bigtop-packages/src/deb/sqoop2/copyright
new file mode 100644
index 00000000..fa3369a4
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/copyright
@@ -0,0 +1,11 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://sqoop.apache.org
+Upstream-Name: Sqoop
+
+Files debian/*
+Copyright: 2013, 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".
diff --git a/bigtop-packages/src/deb/sqoop2/rules b/bigtop-packages/src/deb/sqoop2/rules
new file mode 100755
index 00000000..fbd823af
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/rules
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+#
+# 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.
+#
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ # There's no good way to get the RAT plugin to ignore the debian/ directory, so bigtop-empty is used as a decoy
+ rm -rf bigtop-empty
+ mkdir -p bigtop-empty
+ bash debian/do-component-build \
+ -Drat.basedir=$${PWD}/bigtop-empty
+
+override_dh_auto_install:
+ bash -x debian/install_sqoop2.sh \
+ --build-dir=build/sqoop2-* \
+ --doc-dir=/usr/share/doc/sqoop2 \
+ --prefix=debian/tmp \
+ --extra-dir=debian \
+ --dist-dir=dist/target/sqoop2-*
+ bash debian/init.d.tmpl debian/sqoop-server.svc deb debian/tmp/etc/init.d/sqoop2-server
+ dh_install --sourcedir=debian/tmp
diff --git a/bigtop-packages/src/deb/sqoop2/source/format b/bigtop-packages/src/deb/sqoop2/source/format
new file mode 100644
index 00000000..163aaf8d
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2-client.install b/bigtop-packages/src/deb/sqoop2/sqoop2-client.install
new file mode 100644
index 00000000..4a4aa02c
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2-client.install
@@ -0,0 +1,6 @@
+/usr/bin/sqoop2
+/usr/lib/sqoop2/bin/sqoop.sh
+/usr/lib/sqoop2/client-lib
+/usr/lib/sqoop2/LICENSE.txt
+/usr/lib/sqoop2/NOTICE.txt
+
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2-server.install b/bigtop-packages/src/deb/sqoop2/sqoop2-server.install
new file mode 100644
index 00000000..2a0e48f4
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2-server.install
@@ -0,0 +1 @@
+/etc/init.d/sqoop2-server
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2-server.postinst b/bigtop-packages/src/deb/sqoop2/sqoop2-server.postinst
new file mode 100644
index 00000000..fe59f065
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2-server.postinst
@@ -0,0 +1,21 @@
+#!/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.
+
+set -e
+if [ -x "/etc/init.d/sqoop2-server" ]; then
+ update-rc.d sqoop2-server defaults > /dev/null || exit 1
+ invoke-rc.d sqoop2-server start || :
+fi
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2.install b/bigtop-packages/src/deb/sqoop2/sqoop2.install
new file mode 100644
index 00000000..e39f408e
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2.install
@@ -0,0 +1,11 @@
+/usr/bin/sqoop2-server
+/usr/bin/sqoop2-tool
+/etc/sqoop2
+/etc/default/sqoop2-server
+/usr/lib/sqoop2/bin/setenv.sh
+/usr/lib/sqoop2/bin/sqoop-sys.sh
+/usr/lib/sqoop2/webapps
+/usr/lib/sqoop2/tomcat-deployment.sh
+/var/lib/sqoop2
+/usr/lib/bigtop-tomcat/lib/sqoop-tomcat*.jar
+
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2.postinst b/bigtop-packages/src/deb/sqoop2/sqoop2.postinst
new file mode 100644
index 00000000..de15158b
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+# 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.
+
+set -e
+
+update-alternatives --install /etc/sqoop2/conf sqoop2-conf /etc/sqoop2/conf.dist 30
+update-alternatives --install /etc/sqoop2/tomcat-conf sqoop2-tomcat-conf /etc/sqoop2/tomcat-conf.dist 30
+
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2.preinst b/bigtop-packages/src/deb/sqoop2/sqoop2.preinst
new file mode 100644
index 00000000..67632d8e
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2.preinst
@@ -0,0 +1,65 @@
+#!/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 sqoop2-server
+#
+# 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 sqoop >/dev/null || groupadd -r sqoop
+ if ! getent passwd sqoop2 >/dev/null; then
+ # Adding system user: sqoop2 .
+ adduser \
+ --system \
+ --ingroup sqoop \
+ --home /var/lib/sqoop2 \
+ --gecos "Sqoop 2 User" \
+ --shell /bin/false \
+ sqoop2 >/dev/null
+ fi
+ install -d -m 0755 -o sqoop2 -g sqoop /var/log/sqoop2
+ install -d -m 0755 -o sqoop2 -g sqoop /var/lib/sqoop2
+ install -d -m 0755 -o sqoop2 -g sqoop /var/tmp/sqoop2
+ install -d -m 0755 -o sqoop2 -g sqoop /var/run/sqoop2
+ ;;
+
+ 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
diff --git a/bigtop-packages/src/deb/sqoop2/sqoop2.prerm b/bigtop-packages/src/deb/sqoop2/sqoop2.prerm
new file mode 100644
index 00000000..6a820adc
--- /dev/null
+++ b/bigtop-packages/src/deb/sqoop2/sqoop2.prerm
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# 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 sqoop
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ update-alternatives --remove sqoop2-conf /etc/sqoop2/conf.dist || :
+ update-alternatives --remove-all sqoop2-tomcat-conf || :
+ ;;
+
+ 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
+
+