You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by se...@apache.org on 2022/09/13 00:57:06 UTC
[bigtop] branch master updated: BIGTOP-3809: Fix tez deb package build fails (#1006)
This is an automated email from the ASF dual-hosted git repository.
sekikn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 8ba31619 BIGTOP-3809: Fix tez deb package build fails (#1006)
8ba31619 is described below
commit 8ba31619ccb37a29856ba182be31294a58c55535
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Tue Sep 13 08:57:01 2022 +0800
BIGTOP-3809: Fix tez deb package build fails (#1006)
---
bigtop-packages/src/deb/tez/tez.install | 6 +--
bigtop-packages/src/deb/tez/tez.postinst | 40 ++++++++++++++++++++
bigtop-packages/src/deb/tez/tez.preinst | 64 ++++++++++++++++++++++++++++++++
bigtop-packages/src/deb/tez/tez.prerm | 47 +++++++++++++++++++++++
4 files changed, 154 insertions(+), 3 deletions(-)
diff --git a/bigtop-packages/src/deb/tez/tez.install b/bigtop-packages/src/deb/tez/tez.install
index dbcba693..3705f01e 100644
--- a/bigtop-packages/src/deb/tez/tez.install
+++ b/bigtop-packages/src/deb/tez/tez.install
@@ -1,3 +1,3 @@
-usr/lib/tez
-usr/share/man/man1
-etc/tez/conf
+/usr/lib/tez
+/usr/share/man/man1
+/etc/tez/conf.dist
diff --git a/bigtop-packages/src/deb/tez/tez.postinst b/bigtop-packages/src/deb/tez/tez.postinst
new file mode 100644
index 00000000..1d59ae51
--- /dev/null
+++ b/bigtop-packages/src/deb/tez/tez.postinst
@@ -0,0 +1,40 @@
+#!/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 tez
+
+tez_pkg_name=tez
+
+set -e
+
+case "$1" in
+ configure)
+ # Install config alternatives
+ chown -R tez:tez /var/log/tez
+ update-alternatives --install /etc/${tez_pkg_name}/conf ${tez_pkg_name}-conf /etc/${tez_pkg_name}/conf.dist 30
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/bigtop-packages/src/deb/tez/tez.preinst b/bigtop-packages/src/deb/tez/tez.preinst
new file mode 100644
index 00000000..ba503dff
--- /dev/null
+++ b/bigtop-packages/src/deb/tez/tez.preinst
@@ -0,0 +1,64 @@
+#!/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 tez
+#
+# 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 tez >/dev/null || groupadd -r tez
+ if ! getent passwd tez >/dev/null; then
+ # Adding system user: tez .
+ adduser \
+ --system \
+ --ingroup tez \
+ --home /var/lib/tez \
+ --gecos "Tez User" \
+ --shell /bin/false \
+ tez >/dev/null
+ fi
+ install -d -m 0755 -o tez -g tez /var/log/tez
+ install -d -m 0755 -o tez -g tez /var/lib/tez
+ ;;
+
+ 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/tez/tez.prerm b/bigtop-packages/src/deb/tez/tez.prerm
new file mode 100644
index 00000000..f8659cf3
--- /dev/null
+++ b/bigtop-packages/src/deb/tez/tez.prerm
@@ -0,0 +1,47 @@
+#!/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 tez
+#
+# see: dh_installdeb(1)
+
+tez_pkg_name=tez
+
+set -e
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ update-alternatives --remove ${tez_pkg_name}-conf /etc/${tez_pkg_name}/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
+
+