Skip to content

Commit

Permalink
add: dremio-bin (#6688)
Browse files Browse the repository at this point in the history
:)

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. <[email protected]>
Co-authored-by: oklopfer <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Nov 21, 2024
1 parent c8422db commit f14ae3a
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ docker-compose-plugin-bin
dolphin-emu-git
dotdrop
drawio-desktop-deb
dremio-bin
dropbox-deb
duf-deb
dunst
Expand Down
12 changes: 12 additions & 0 deletions packages/dremio-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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
60 changes: 60 additions & 0 deletions packages/dremio-bin/dremio-bin.pacscript
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>")
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
}
13 changes: 13 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
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
Expand Down

0 comments on commit f14ae3a

Please sign in to comment.