From f14ae3a1d5b3cbba7dea78073ca02a21d0a27aa4 Mon Sep 17 00:00:00 2001 From: Luca Fabbian Date: Thu, 21 Nov 2024 14:26:44 +0100 Subject: [PATCH] add: `dremio-bin` (#6688) :) Since there is no official way to install this open source software in Ubuntu, I thought I could contribute. The script is mostly inspired from the docker and android studio ones. --------- Co-authored-by: V. <150687949+vigress8@users.noreply.github.com> Co-authored-by: oklopfer <104327997+oklopfer@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- packagelist | 1 + packages/dremio-bin/.SRCINFO | 12 +++++ packages/dremio-bin/dremio-bin.pacscript | 60 ++++++++++++++++++++++++ srclist | 13 +++++ 4 files changed, 86 insertions(+) create mode 100644 packages/dremio-bin/.SRCINFO create mode 100644 packages/dremio-bin/dremio-bin.pacscript diff --git a/packagelist b/packagelist index dd18b1c27b..e31cef9aff 100644 --- a/packagelist +++ b/packagelist @@ -100,6 +100,7 @@ docker-compose-plugin-bin dolphin-emu-git dotdrop drawio-desktop-deb +dremio-bin dropbox-deb duf-deb dunst diff --git a/packages/dremio-bin/.SRCINFO b/packages/dremio-bin/.SRCINFO new file mode 100644 index 0000000000..d17b543a9d --- /dev/null +++ b/packages/dremio-bin/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = dremio-bin + gives = dremio + pkgver = 4.9.1 + pkgdesc = Dremio: Data Lakehouse Platform Powered by Apache Iceberg + url = https://www.dremio.com/ + arch = amd64 + depends = openjdk-8-jdk + maintainer = Luca Fabbian + source = https://download.dremio.com/community-server/4.9.1-202010230218060541-2e764ed0/dremio-community-4.9.1-202010230218060541-2e764ed0.tar.gz + sha256sums = ccd0ac89c9d3dc13eee8eba0f3f489b3f9efc7a897c1c550d919fcc294c749f9 + +pkgname = dremio-bin diff --git a/packages/dremio-bin/dremio-bin.pacscript b/packages/dremio-bin/dremio-bin.pacscript new file mode 100644 index 0000000000..125677bf14 --- /dev/null +++ b/packages/dremio-bin/dremio-bin.pacscript @@ -0,0 +1,60 @@ +pkgname="dremio-bin" +gives="dremio" +pkgver="4.9.1" +fullver="4.9.1-202010230218060541-2e764ed0" +depends=("openjdk-8-jdk") +url="https://www.dremio.com/" +pkgdesc="Dremio: Data Lakehouse Platform Powered by Apache Iceberg" +maintainer=("Luca Fabbian ") +arch=('amd64') +sha256sums=("ccd0ac89c9d3dc13eee8eba0f3f489b3f9efc7a897c1c550d919fcc294c749f9") +source=("https://download.dremio.com/community-server/${fullver}/${gives}-community-${fullver}.tar.gz") + +build() { + mkdir -p "${pkgdir}/opt/${pkgname}" + mkdir -p "${pkgdir}/usr/bin" + mkdir -p "${pkgdir}/lib/systemd/system" +} + +package() { + cp -r "${gives}-community-${fullver}"/* "${pkgdir}/opt/${pkgname}" + + # shellcheck disable=SC2016 + echo '#!/bin/bash +# Set the JAVA_HOME for this script +export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 +export PATH=$JAVA_HOME/bin:$PATH + +# Forward execution to dremio script +bash "/opt/'"${pkgname}"'/bin/dremio" "$@"' | tee "${pkgdir}/usr/bin/dremio" > /dev/null + chmod +x "${pkgdir}/usr/bin/dremio" + + echo '[Unit] +Description=Dremio Daemon Server +Documentation=https://docs.dremio.com +Wants=network-online.target +After=network-online.target + +[Service] +User=root +Group=root +ExecStart=/usr/bin/dremio start-fg +Restart=on-failure +LimitNOFILE=65536 + + +[Install] +WantedBy=multi-user.target' | tee "${pkgdir}/lib/systemd/system/dremio.service" > /dev/null +} + +post_install() { + if [[ -f /bin/systemctl ]]; then + sudo systemctl enable dremio.service --now + fi +} + +post_remove() { + if [[ -f /bin/systemctl ]]; then + sudo rm "/etc/systemd/system/multi-user.target.wants/dremio.service" && echo "Removed /etc/systemd/system/multi-user.target.wants/dremio.service" + fi +} diff --git a/srclist b/srclist index 65a82d1912..3b6407815b 100644 --- a/srclist +++ b/srclist @@ -2144,6 +2144,19 @@ pkgbase = drawio-desktop-deb pkgname = drawio-desktop-deb --- +pkgbase = dremio-bin + gives = dremio + pkgver = 4.9.1 + pkgdesc = Dremio: Data Lakehouse Platform Powered by Apache Iceberg + url = https://www.dremio.com/ + arch = amd64 + depends = openjdk-8-jdk + maintainer = Luca Fabbian + source = https://download.dremio.com/community-server/4.9.1-202010230218060541-2e764ed0/dremio-community-4.9.1-202010230218060541-2e764ed0.tar.gz + sha256sums = ccd0ac89c9d3dc13eee8eba0f3f489b3f9efc7a897c1c550d919fcc294c749f9 + +pkgname = dremio-bin +--- pkgbase = dropbox-deb gives = dropbox pkgver = 2020.03.04