2026/10.1 #16
@@ -70,7 +70,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: [seaweedfs, greptimedb, lavinmq, gitea]
|
||||
package: [seaweedfs, greptimedb, lavinmq, gitea, nifi]
|
||||
container:
|
||||
image: "alpine:3.24"
|
||||
env:
|
||||
@@ -164,6 +164,13 @@ jobs:
|
||||
name: alpine-package-gitea-${{ github.sha }}
|
||||
path: packages/worker-artifacts/gitea
|
||||
|
||||
- name: Download NiFi artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, 'nifi')
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: alpine-package-nifi-${{ github.sha }}
|
||||
path: packages/worker-artifacts/nifi
|
||||
|
||||
- name: Merge package artifacts
|
||||
run: scripts/apk/merge-ci-artifacts.sh
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages
|
||||
| [GreptimeDB](packaging/alpine/local/greptimedb/README.md) | `greptimedb` | `1.2.1` | Source build from upstream release | Provides a current GreptimeDB build and component OpenRC packages before it is available from Alpine community. |
|
||||
| [LavinMQ](packaging/alpine/local/lavinmq/README.md) | `lavinmq` | `2.10.0` | Source build from upstream release | Provides a current LavinMQ build on Alpine 3.24 with matching Crystal support. |
|
||||
| [Gitea](packaging/alpine/local/gitea/README.md) | `gitea` | `1.27.3` | Binary repackaging of official upstream release binaries | Ships current Gitea releases with the expected Alpine runtime layout and OpenRC service. |
|
||||
| [Apache NiFi](packaging/alpine/local/nifi/README.md) | `nifi` | `2.12.0` | Binary repackaging of the official Standard distribution | Provides Apache NiFi 2 with a secure default configuration and OpenRC service. |
|
||||
|
||||
## Use In Production
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
|
||||
pkgname=nifi
|
||||
pkgver=2.12.0
|
||||
pkgrel=0
|
||||
pkgdesc="Reliable system for processing and distributing data"
|
||||
url="https://nifi.apache.org/"
|
||||
arch="x86_64 aarch64"
|
||||
license="Apache-2.0"
|
||||
depends="openjdk21-jre-headless"
|
||||
makedepends="unzip"
|
||||
install="$pkgname.pre-install"
|
||||
pkgusers="nifi"
|
||||
pkggroups="nifi"
|
||||
subpackages="
|
||||
$pkgname-openrc:_openrc:noarch
|
||||
"
|
||||
options="!check !strip !tracedeps"
|
||||
source="
|
||||
$pkgname-$pkgver-bin.zip::https://dlcdn.apache.org/nifi/$pkgver/nifi-$pkgver-bin.zip
|
||||
nifi.confd
|
||||
nifi.initd
|
||||
nifi.wrapper
|
||||
"
|
||||
package() {
|
||||
local _dir
|
||||
|
||||
install -d "$pkgdir"/usr/lib/nifi "$pkgdir"/etc/nifi
|
||||
cp -a "$builddir"/. "$pkgdir"/usr/lib/nifi/
|
||||
chmod -R a+rX "$pkgdir"/usr/lib/nifi
|
||||
|
||||
cp -a "$pkgdir"/usr/lib/nifi/conf/. "$pkgdir"/etc/nifi/
|
||||
rm -r "$pkgdir"/usr/lib/nifi/conf
|
||||
ln -s /etc/nifi "$pkgdir"/usr/lib/nifi/conf
|
||||
|
||||
install -d -m 0750 -o nifi -g nifi "$pkgdir"/var/lib/nifi
|
||||
for _dir in \
|
||||
assets \
|
||||
connector_assets \
|
||||
content_repository \
|
||||
database_repository \
|
||||
diagnostics \
|
||||
extensions \
|
||||
flowfile_repository \
|
||||
nar_repository \
|
||||
provenance_repository \
|
||||
state \
|
||||
status_repository \
|
||||
work; do
|
||||
install -d -m 0750 -o nifi -g nifi "$pkgdir"/var/lib/nifi/$_dir
|
||||
ln -s /var/lib/nifi/$_dir "$pkgdir"/usr/lib/nifi/$_dir
|
||||
done
|
||||
install -d -m 0750 -o nifi -g nifi "$pkgdir"/var/log/nifi
|
||||
ln -s /var/log/nifi "$pkgdir"/usr/lib/nifi/logs
|
||||
ln -s /run/nifi "$pkgdir"/usr/lib/nifi/run
|
||||
|
||||
chown -R nifi:nifi "$pkgdir"/etc/nifi
|
||||
chmod 0750 "$pkgdir"/etc/nifi
|
||||
|
||||
install -Dm755 "$srcdir"/nifi.wrapper "$pkgdir"/usr/bin/nifi
|
||||
}
|
||||
|
||||
_openrc() {
|
||||
pkgdesc="$pkgdesc (OpenRC service)"
|
||||
depends="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
|
||||
install -Dm755 "$srcdir"/nifi.initd "$subpkgdir"/etc/init.d/nifi
|
||||
install -Dm644 "$srcdir"/nifi.confd "$subpkgdir"/etc/conf.d/nifi
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5891039ccf15234bb21c2d1ce65027357ca7603ad8fdfc946dd4b6499ab8061fb07a6a56f8e8c5bb7635d446354ca7cc76ba40e55921818931f193a75f247334 nifi-2.12.0-bin.zip
|
||||
fd576c2d2333aa79f7dac90e83f9cf6e0faed9748ebce0dfc1c18bcd1da0ec1d0da90d4004055bbddcb0f011a0e9efdc08f0eed2f3c19d49b1746019f2be1da9 nifi.confd
|
||||
9f8a005fcd6a6f75a553321c27c672c4c202e8b86ff5fa0a1bd5eb0e7305592e67d8dc6a915d1f1bc01b39916b0fb0e61478cb6ae5aee4ae8b3be36c80c5662a nifi.initd
|
||||
7764c6a53f0fb109ecde4959b438a0eeb669b00eafdbdb2abe5255f4053a237d4e97349594b3bf053abd55a96f8e217aa0cf0fec59a7c14f1db2490e747f713e nifi.wrapper
|
||||
"
|
||||
@@ -0,0 +1,50 @@
|
||||
# Apache NiFi Alpine Package
|
||||
|
||||
Repackages Apache NiFi 2.12.0 Standard for Alpine. The package requires Java
|
||||
21 and retains NiFi 2's secure default: HTTPS listens on `127.0.0.1:8443` and
|
||||
uses generated single-user credentials.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
apk add nifi nifi-openrc
|
||||
rc-update add nifi default
|
||||
rc-service nifi start
|
||||
```
|
||||
|
||||
Open `https://127.0.0.1:8443/nifi` and retrieve the generated credentials:
|
||||
|
||||
```sh
|
||||
grep 'Generated \(Username\|Password\)' /var/log/nifi/nifi-app.log
|
||||
```
|
||||
|
||||
Set fixed single-user credentials as the service account:
|
||||
|
||||
```sh
|
||||
doas -u nifi nifi set-single-user-credentials '<username>' '<password>'
|
||||
rc-service nifi restart
|
||||
```
|
||||
|
||||
## Runtime Layout
|
||||
|
||||
```text
|
||||
/usr/bin/nifi Administration command wrapper
|
||||
/usr/lib/nifi NiFi binaries and bundled NARs
|
||||
/etc/nifi Mutable NiFi configuration and authorization state
|
||||
/var/lib/nifi Repositories, state, extensions, and work files
|
||||
/var/log/nifi Application logs
|
||||
/etc/conf.d/nifi OpenRC account defaults
|
||||
/etc/init.d/nifi OpenRC service
|
||||
```
|
||||
|
||||
Edit `/etc/nifi/nifi.properties` to bind a different HTTPS address, configure
|
||||
TLS, or select LDAP, OIDC, or another supported authentication provider.
|
||||
|
||||
## Package Commands
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=nifi mise run apk:checksum
|
||||
ALPINE_PACKAGE=nifi mise run apk:build
|
||||
ALPINE_PACKAGE=nifi SKIP_BUILD=1 mise run apk:test-install
|
||||
ALPINE_PACKAGE=nifi mise run apk:runtime-test
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
# Defaults for Apache NiFi.
|
||||
NIFI_USER="nifi"
|
||||
NIFI_GROUP="nifi"
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Apache NiFi dataflow service"
|
||||
|
||||
supervisor=supervise-daemon
|
||||
name=nifi
|
||||
command="/usr/lib/nifi/bin/nifi.sh"
|
||||
command_args="run"
|
||||
command_user="${NIFI_USER:-nifi}:${NIFI_GROUP:-nifi}"
|
||||
directory="/usr/lib/nifi"
|
||||
pidfile="/run/nifi/nifi.pid"
|
||||
supervise_daemon_args="--chdir /usr/lib/nifi --env HOME=/var/lib/nifi --pidfile ${pidfile}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns logger
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
local service_owner="${NIFI_USER:-nifi}:${NIFI_GROUP:-nifi}"
|
||||
|
||||
checkpath -d -m 0750 -o "$service_owner" \
|
||||
/run/nifi \
|
||||
/var/lib/nifi \
|
||||
/var/log/nifi
|
||||
}
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S nifi 2>/dev/null
|
||||
adduser -S -D -H -h /var/lib/nifi -s /sbin/nologin \
|
||||
-G nifi -g nifi nifi 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/lib/nifi/bin/nifi.sh "$@"
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apk add nifi nifi-openrc curl
|
||||
|
||||
test -x /usr/bin/nifi
|
||||
test -x /usr/lib/nifi/bin/nifi.sh
|
||||
test -d /etc/nifi
|
||||
test -L /usr/lib/nifi/conf
|
||||
test "$(readlink /usr/lib/nifi/conf)" = /etc/nifi
|
||||
test -d /var/lib/nifi
|
||||
test -d /var/log/nifi
|
||||
test -f /etc/init.d/nifi
|
||||
test -f /etc/conf.d/nifi
|
||||
test -d /usr/lib/nifi/docs
|
||||
test "$(stat -c '%U:%G %a' /var/lib/nifi)" = "nifi:nifi 750"
|
||||
|
||||
rc-update add nifi default || true
|
||||
test -L /etc/runlevels/default/nifi
|
||||
rc-service nifi start
|
||||
|
||||
for _attempt in $(seq 1 300); do
|
||||
if curl --fail --insecure --silent --show-error \
|
||||
https://localhost:8443/nifi/ >/dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
curl --fail --insecure --silent --show-error https://localhost:8443/nifi/ >/dev/null
|
||||
grep -q 'Generated Username' /var/log/nifi/nifi-app.log
|
||||
grep -q 'Generated Password' /var/log/nifi/nifi-app.log
|
||||
rc-service nifi status
|
||||
rc-service nifi stop
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." && pwd)}"
|
||||
# shellcheck source=scripts/apk/test-install-lib.sh
|
||||
. "${repo_root}/scripts/apk/test-install-lib.sh"
|
||||
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-nifi}" "${PACKAGE_VERSION:-2.12.0-r0}" <<'SCRIPT'
|
||||
set -e
|
||||
|
||||
if [ -n "${ALPINE_REPOSITORY_URL}" ]; then
|
||||
if [ -n "${ALPINE_REPOSITORY_KEY_URL}" ]; then
|
||||
apk add --no-cache curl >/dev/null
|
||||
cd /etc/apk/keys
|
||||
curl -fsSLOJ "${ALPINE_REPOSITORY_KEY_URL}"
|
||||
fi
|
||||
printf "%s\n" "${ALPINE_REPOSITORY_URL}" >> /etc/apk/repositories
|
||||
else
|
||||
cp "/repo/${ALPINE_ARCH}"/*.rsa.pub /etc/apk/keys/
|
||||
printf "%s\n" /repo >> /etc/apk/repositories
|
||||
fi
|
||||
apk update
|
||||
apk add "${PACKAGE_NAME}" "${PACKAGE_NAME}-openrc"
|
||||
|
||||
test -x /usr/bin/nifi
|
||||
test -x /usr/lib/nifi/bin/nifi.sh
|
||||
test -d /etc/nifi
|
||||
test -L /usr/lib/nifi/conf
|
||||
test "$(readlink /usr/lib/nifi/conf)" = /etc/nifi
|
||||
test -d /var/lib/nifi
|
||||
test -d /var/log/nifi
|
||||
test -f /etc/init.d/nifi
|
||||
test -f /etc/conf.d/nifi
|
||||
test -d /usr/lib/nifi/docs
|
||||
test "$(stat -c '%U:%G %a' /var/lib/nifi)" = "nifi:nifi 750"
|
||||
|
||||
rc-update add nifi default
|
||||
test -L /etc/runlevels/default/nifi
|
||||
SCRIPT
|
||||
@@ -0,0 +1,3 @@
|
||||
provider="github"
|
||||
repo="apache/nifi"
|
||||
version_prefix="rel/nifi-"
|
||||
Reference in New Issue
Block a user