Compare commits
55
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d85e29b5e | ||
|
|
55ce31db00 | ||
|
|
b40ccdf370 | ||
|
|
7bdcc83050 | ||
|
|
57fc0e658c | ||
|
|
c9543e113b | ||
|
|
450d4815dd | ||
|
|
53747a13cc | ||
|
|
13570ccbd9 | ||
|
|
f89ebac967 | ||
|
|
bded7c8adc | ||
|
|
158fd18984 | ||
|
|
fd0f484d4a | ||
|
|
1716f42970 | ||
|
|
37b6e4cf2c | ||
|
|
a97bafbd92 | ||
|
|
573608a04b | ||
|
|
b94463642a | ||
|
|
fc965e072c | ||
|
|
1c3994a7c4 | ||
|
|
e8333709a5 | ||
|
|
03daf40d6e | ||
|
|
40eaf081ad | ||
|
|
254fa76a7d | ||
|
|
0e6bc657a9 | ||
|
|
d21dadada7 | ||
|
|
b75fa2eac9 | ||
|
|
5e2093afec | ||
|
|
74a31e6f45 | ||
|
|
815a47e19f | ||
|
|
96bd8a20e0 | ||
|
|
0a9ed89a47 | ||
|
|
001bd51931 | ||
|
|
f01d209780 | ||
|
|
f5efea2160 | ||
|
|
e4093a3c9f | ||
|
|
d70e9ce84c | ||
|
|
fed4ad011d | ||
|
|
dae1f755a2 | ||
|
|
b3d5424349 | ||
|
|
13a2d0dd16 | ||
|
|
a2da4acc53 | ||
|
|
2825e1bfef | ||
|
|
fadbde6c6d | ||
|
|
ace376e5c1 | ||
|
|
f8189786c8 | ||
|
|
684b9ded73 | ||
|
|
4b30c5bb93 | ||
|
|
7119330286 | ||
|
|
b0ed3584a1 | ||
|
|
5dd92f94d5 | ||
|
|
fe180c01a7 | ||
|
|
6968a72209 | ||
|
|
ba56882ab8 | ||
|
|
f1af2660eb |
+128
-62
@@ -1,54 +1,43 @@
|
||||
name: Build Alpine Packages
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "17 5 * * 1"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
ALPINE_VERSION: "3.24"
|
||||
ALPINE_ARCHES: "x86_64 aarch64"
|
||||
ALPINE_REGISTRY_BRANCH: "v3.24"
|
||||
ALPINE_REGISTRY_REPOSITORY: "${{ vars.PACKAGE_NAME }}"
|
||||
INSTANCE_URL: "${{ vars.INSTANCE_URL }}"
|
||||
PACKAGE_OWNER: "${{ vars.PACKAGE_OWNER }}"
|
||||
PACKAGE_USER: "${{ secrets.PACKAGE_USER }}"
|
||||
PACKAGE_TOKEN: "${{ secrets.PACKAGE_TOKEN }}"
|
||||
PACKAGER: "${{ gitea.repository_owner }}"
|
||||
ALPINE_RUST_CACHE_ROOT: "/cache/public-alpine-packages/v3.24/rust"
|
||||
TRIVY_VERSION: "0.74.0"
|
||||
TRIVY_SHA256: "2ae6fe3ee734b7fdf11335663e18c75ea12dccc76062f09f164a3b0f8be4371a"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
preflight:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- alpine_version: "3.24"
|
||||
alpine_registry_branch: "v3.24"
|
||||
timeout-minutes: 180
|
||||
container:
|
||||
image: "alpine:${{ matrix.alpine_version }}"
|
||||
env:
|
||||
ALPINE_VERSION: "${{ matrix.alpine_version }}"
|
||||
ALPINE_ARCHES: "x86_64 aarch64"
|
||||
ALPINE_REGISTRY_BRANCH: "${{ matrix.alpine_registry_branch }}"
|
||||
ALPINE_REGISTRY_REPOSITORY: "${{ vars.PACKAGE_NAME }}"
|
||||
INSTANCE_URL: "${{ vars.INSTANCE_URL }}"
|
||||
PACKAGE_OWNER: "${{ vars.PACKAGE_OWNER }}"
|
||||
PACKAGE_USER: "${{ secrets.PACKAGE_USER }}"
|
||||
PACKAGE_TOKEN: "${{ secrets.PACKAGE_TOKEN }}"
|
||||
PACKAGER: "${{ gitea.repository_owner }}"
|
||||
ALPINE_APK_REPO_CACHE: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/apk-repo"
|
||||
CARGO_HOME: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb/cargo"
|
||||
RUSTUP_HOME: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb/rustup"
|
||||
CARGO_TARGET_DIR: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb/target"
|
||||
TRIVY_VERSION: "0.74.0"
|
||||
TRIVY_SHA256: "2ae6fe3ee734b7fdf11335663e18c75ea12dccc76062f09f164a3b0f8be4371a"
|
||||
image: "alpine:3.24"
|
||||
outputs:
|
||||
packages_selected: "${{ steps.package-selection.outputs.packages_selected }}"
|
||||
selected_packages: "${{ steps.package-selection.outputs.selected_packages }}"
|
||||
greptimedb_selected: "${{ steps.package-selection.outputs.greptimedb_selected }}"
|
||||
steps:
|
||||
- name: Prepare Environment
|
||||
run: |
|
||||
printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
|
||||
apk add --no-cache --update abuild-rootbld alpine-sdk atools-apkbuild-lint bash ca-certificates curl doas git jq nodejs rsync shellcheck sudo tar
|
||||
trivy_archive="trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz"
|
||||
curl -fsSL -o "/tmp/${trivy_archive}" "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/${trivy_archive}"
|
||||
echo "${TRIVY_SHA256} /tmp/${trivy_archive}" | sha256sum -c -
|
||||
tar -xzf "/tmp/${trivy_archive}" -C /usr/local/bin trivy
|
||||
mkdir -p "$ALPINE_APK_REPO_CACHE" "$CARGO_HOME" "$RUSTUP_HOME" "$CARGO_TARGET_DIR"
|
||||
chown -R 1000:1000 /cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}
|
||||
apk add --no-cache --update atools-apkbuild-lint bash ca-certificates curl git jq nodejs shellcheck tar
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -70,46 +59,125 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Prepare package cache
|
||||
if: github.event_name != 'schedule'
|
||||
id: package-selection
|
||||
run: |
|
||||
scripts/apk/ci-package-cache.sh prepare
|
||||
run: scripts/apk/ci-package-cache.sh prepare
|
||||
|
||||
- name: Build packages
|
||||
if: github.event_name != 'schedule'
|
||||
- name: Validate selected package matrix
|
||||
run: |
|
||||
for package in ${ALPINE_PACKAGES}; do
|
||||
case "${package}" in
|
||||
seaweedfs|greptimedb|lavinmq|gitea|nifi|rclone-openrc) ;;
|
||||
*)
|
||||
printf 'selected package is missing from the CI build matrix: %s\n' "${package}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
build:
|
||||
needs: preflight
|
||||
if: needs.preflight.outputs.packages_selected == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 180
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: [seaweedfs, greptimedb, lavinmq, gitea, nifi, rclone-openrc]
|
||||
container:
|
||||
image: "alpine:3.24"
|
||||
env:
|
||||
ALPINE_PACKAGE: "${{ matrix.package }}"
|
||||
steps:
|
||||
- name: Prepare Environment
|
||||
run: |
|
||||
printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
|
||||
apk add --no-cache --update abuild-rootbld alpine-sdk bash ca-certificates doas git nodejs sudo
|
||||
mkdir -p "$ALPINE_RUST_CACHE_ROOT"
|
||||
chown -R 1000:1000 /cache/public-alpine-packages/v3.24
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build package
|
||||
if: contains(needs.preflight.outputs.selected_packages, matrix.package)
|
||||
run: |
|
||||
scripts/apk/ci-build.sh
|
||||
if [ -d packages/local ]; then
|
||||
scripts/apk/list-packages.sh
|
||||
fi
|
||||
|
||||
- name: Export GreptimeDB CI assets
|
||||
if: github.event_name != 'schedule' && steps.package-selection.outputs.greptimedb_selected == 'true'
|
||||
run: scripts/apk/export-ci-assets.sh
|
||||
scripts/apk/list-packages.sh
|
||||
|
||||
- name: Check artifact upload support
|
||||
if: github.event_name != 'schedule'
|
||||
id: artifact-upload
|
||||
if: contains(needs.preflight.outputs.selected_packages, matrix.package)
|
||||
run: |
|
||||
if [ -n "${ACTIONS_RUNTIME_TOKEN:-}" ]; then
|
||||
echo "available=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "available=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
test -n "${ACTIONS_RUNTIME_TOKEN:-}" || {
|
||||
echo "artifact upload support is required for split package builds" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Upload generated CI assets
|
||||
if: github.event_name != 'schedule' && steps.package-selection.outputs.greptimedb_selected == 'true' && steps.artifact-upload.outputs.available == 'true'
|
||||
- name: Upload package artifacts
|
||||
if: contains(needs.preflight.outputs.selected_packages, matrix.package)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: greptimedb-musl-binaries-${{ matrix.alpine_registry_branch }}
|
||||
name: alpine-package-${{ matrix.package }}-${{ github.sha }}
|
||||
path: packages/local/
|
||||
retention-days: 1
|
||||
|
||||
verify-and-publish:
|
||||
needs: [preflight, build]
|
||||
if: needs.preflight.outputs.packages_selected == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 180
|
||||
container:
|
||||
image: "alpine:3.24"
|
||||
env:
|
||||
ALPINE_PACKAGES: "${{ needs.preflight.outputs.selected_packages }}"
|
||||
steps:
|
||||
- name: Prepare Environment
|
||||
run: |
|
||||
printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
|
||||
apk add --no-cache --update abuild-rootbld alpine-sdk bash ca-certificates curl doas docker-cli git jq nodejs rsync shellcheck sudo tar
|
||||
trivy_archive="trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz"
|
||||
curl -fsSL -o "/tmp/${trivy_archive}" "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/${trivy_archive}"
|
||||
echo "${TRIVY_SHA256} /tmp/${trivy_archive}" | sha256sum -c -
|
||||
tar -xzf "/tmp/${trivy_archive}" -C /usr/local/bin trivy
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare registry fallback
|
||||
run: |
|
||||
selected_packages="$ALPINE_PACKAGES"
|
||||
scripts/apk/ci-package-cache.sh prepare
|
||||
printf 'ALPINE_PACKAGES=%s\n' "$selected_packages" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Download package artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: packages/worker-artifacts
|
||||
|
||||
- name: Merge package artifacts
|
||||
run: scripts/apk/merge-ci-artifacts.sh
|
||||
|
||||
- name: Export GreptimeDB CI assets
|
||||
if: needs.preflight.outputs.greptimedb_selected == 'true'
|
||||
run: scripts/apk/export-ci-assets.sh
|
||||
|
||||
- name: Upload generated CI assets
|
||||
if: needs.preflight.outputs.greptimedb_selected == 'true'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: greptimedb-musl-binaries-v3.24
|
||||
path: packages/ci-assets/
|
||||
|
||||
- name: Upload local Alpine registry
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: alpine-local-registry-v3.24-${{ github.sha }}
|
||||
path: packages/local/
|
||||
retention-days: 30
|
||||
|
||||
- name: Smoke test
|
||||
if: github.event_name != 'schedule'
|
||||
run: scripts/apk/ci-smoke.sh
|
||||
|
||||
- name: Generate security reports
|
||||
if: github.event_name != 'schedule' && env.ALPINE_SKIP_BUILD != '1'
|
||||
run: |
|
||||
scripts/apk/security-report.sh
|
||||
if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
|
||||
@@ -119,16 +187,14 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Upload security reports
|
||||
if: github.event_name != 'schedule' && env.ALPINE_SKIP_BUILD != '1' && steps.artifact-upload.outputs.available == 'true'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: apk-security-reports-${{ matrix.alpine_registry_branch }}
|
||||
name: apk-security-reports-v3.24
|
||||
path: packages/security-reports/
|
||||
|
||||
- name: Runtime test
|
||||
if: github.event_name != 'schedule' && env.ALPINE_SKIP_BUILD != '1'
|
||||
run: scripts/apk/runtime-test.sh
|
||||
run: ALPINE_RUNTIME_TEST_MODE=docker scripts/apk/runtime-test.sh
|
||||
|
||||
- name: Publish Alpine packages
|
||||
if: github.event_name != 'pull_request' && github.event_name != 'schedule' && env.ALPINE_SKIP_BUILD != '1'
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: scripts/apk/publish-gitea.sh
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
packages/
|
||||
packaging/alpine/*/*/pkg/
|
||||
packaging/alpine/*/*/src/
|
||||
packaging/alpine/*/*/tmp/
|
||||
packaging/alpine/*/*/*.apk
|
||||
packaging/alpine/*/*/*.tar.*
|
||||
!packaging/alpine/*/*/*-vendor.tar.gz
|
||||
|
||||
@@ -19,10 +19,12 @@ https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages
|
||||
|
||||
| Package | APK Name | Package Version | Package Type | Purpose |
|
||||
|-----------------------------------------------------------|--------------|-----------------|----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
| [SeaweedFS](packaging/alpine/local/seaweedfs/README.md) | `seaweedfs` | `4.40` | Binary repackaging of official upstream release tarballs | Ships current SeaweedFS features with Alpine OpenRC role splits. |
|
||||
| [GreptimeDB](packaging/alpine/local/greptimedb/README.md) | `greptimedb` | `1.1.4` | 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.9.1` | 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.0` | Binary repackaging of official upstream release binaries | Ships current Gitea releases with the expected Alpine runtime layout and OpenRC service. |
|
||||
| [SeaweedFS](packaging/alpine/local/seaweedfs/README.md) | `seaweedfs` | `4.48` | Binary repackaging of official upstream release tarballs | Ships current SeaweedFS features with Alpine OpenRC role splits. |
|
||||
| [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.1` | 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` | `28.1.0` | 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. |
|
||||
| [rclone OpenRC](packaging/alpine/local/rclone-openrc/README.md) | `rclone-openrc` | `0.1.0` | OpenRC integration for Alpine's rclone package | Provides reusable, instance-capable OpenRC supervision for rclone commands. |
|
||||
|
||||
## Use In Production
|
||||
|
||||
@@ -167,6 +169,9 @@ weed version
|
||||
|
||||
apk add greptimedb greptimedb-docs greptimedb-standalone-openrc
|
||||
greptime --version
|
||||
|
||||
apk add rclone-openrc
|
||||
rclone version
|
||||
```
|
||||
|
||||
Run package-local runtime tests:
|
||||
@@ -251,10 +256,8 @@ available in the signed local repository.
|
||||
|
||||
### Gitea Workflow
|
||||
|
||||
`.gitea/workflows/build.yml` builds and publishes `v3.24`. Pull requests
|
||||
build only. CI compares source package versions with the published registry,
|
||||
then rebuilds only changed or unpublished packages; local build commands keep
|
||||
using their local caches.
|
||||
The smoke test installs rebuilt artifacts from the local repository and uses
|
||||
the published registry as a fallback for unchanged packages.
|
||||
|
||||
Repository variables:
|
||||
|
||||
|
||||
@@ -43,30 +43,31 @@ url = "https://github.com/nektos/act/releases/download/v0.2.89/act_Windows_x86_6
|
||||
url_api = "https://api.github.com/repos/nektos/act/releases/assets/434891261"
|
||||
|
||||
[[tools.docker-cli]]
|
||||
version = "29.8.0"
|
||||
version = "29.8.2"
|
||||
backend = "aqua:docker/cli"
|
||||
specifiers = ["latest"]
|
||||
|
||||
[tools.docker-cli."platforms.linux-arm64"]
|
||||
url = "https://download.docker.com/linux/static/stable/aarch64/docker-29.8.0.tgz"
|
||||
url = "https://download.docker.com/linux/static/stable/aarch64/docker-29.8.2.tgz"
|
||||
|
||||
[tools.docker-cli."platforms.linux-arm64-musl"]
|
||||
url = "https://download.docker.com/linux/static/stable/aarch64/docker-29.8.0.tgz"
|
||||
url = "https://download.docker.com/linux/static/stable/aarch64/docker-29.8.2.tgz"
|
||||
|
||||
[tools.docker-cli."platforms.linux-x64"]
|
||||
url = "https://download.docker.com/linux/static/stable/x86_64/docker-29.8.0.tgz"
|
||||
checksum = "blake3:3a70b254f51e6a0fb384e1d93bc859c19b975ae979abbec968e378f79335da5d"
|
||||
url = "https://download.docker.com/linux/static/stable/x86_64/docker-29.8.2.tgz"
|
||||
|
||||
[tools.docker-cli."platforms.linux-x64-musl"]
|
||||
url = "https://download.docker.com/linux/static/stable/x86_64/docker-29.8.0.tgz"
|
||||
url = "https://download.docker.com/linux/static/stable/x86_64/docker-29.8.2.tgz"
|
||||
|
||||
[tools.docker-cli."platforms.macos-arm64"]
|
||||
url = "https://download.docker.com/mac/static/stable/aarch64/docker-29.8.0.tgz"
|
||||
url = "https://download.docker.com/mac/static/stable/aarch64/docker-29.8.2.tgz"
|
||||
|
||||
[tools.docker-cli."platforms.macos-x64"]
|
||||
url = "https://download.docker.com/mac/static/stable/x86_64/docker-29.8.0.tgz"
|
||||
url = "https://download.docker.com/mac/static/stable/x86_64/docker-29.8.2.tgz"
|
||||
|
||||
[tools.docker-cli."platforms.windows-x64"]
|
||||
url = "https://download.docker.com/win/static/stable/x86_64/docker-29.8.0.zip"
|
||||
url = "https://download.docker.com/win/static/stable/x86_64/docker-29.8.2.zip"
|
||||
|
||||
[[tools.jq]]
|
||||
version = "1.8.2"
|
||||
@@ -156,48 +157,48 @@ url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellche
|
||||
url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056944"
|
||||
|
||||
[[tools.trivy]]
|
||||
version = "0.74.0"
|
||||
version = "0.75.0"
|
||||
backend = "aqua:aquasecurity/trivy"
|
||||
specifiers = ["latest"]
|
||||
|
||||
[tools.trivy."platforms.linux-arm64"]
|
||||
checksum = "sha256:b94ce1976bbf3c15b514b605ee88be7c6d94a29be2302847ff01cb794d47aad5"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_Linux-ARM64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339429"
|
||||
checksum = "sha256:a1ee9f6ffb7d112b64ff726a2a0717c21175c1114361391f4a132956751a13b3"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_Linux-ARM64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335583"
|
||||
provenance = "cosign"
|
||||
|
||||
[tools.trivy."platforms.linux-arm64-musl"]
|
||||
checksum = "sha256:b94ce1976bbf3c15b514b605ee88be7c6d94a29be2302847ff01cb794d47aad5"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_Linux-ARM64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339429"
|
||||
checksum = "sha256:a1ee9f6ffb7d112b64ff726a2a0717c21175c1114361391f4a132956751a13b3"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_Linux-ARM64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335583"
|
||||
provenance = "cosign"
|
||||
|
||||
[tools.trivy."platforms.linux-x64"]
|
||||
checksum = "sha256:2ae6fe3ee734b7fdf11335663e18c75ea12dccc76062f09f164a3b0f8be4371a"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_Linux-64bit.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339431"
|
||||
checksum = "sha256:c6e65abddb348e25f10549df887045629cf28cc72453cd1c63acb717316b3f3f"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_Linux-64bit.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335432"
|
||||
provenance = "cosign"
|
||||
|
||||
[tools.trivy."platforms.linux-x64-musl"]
|
||||
checksum = "sha256:2ae6fe3ee734b7fdf11335663e18c75ea12dccc76062f09f164a3b0f8be4371a"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_Linux-64bit.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339431"
|
||||
checksum = "sha256:c6e65abddb348e25f10549df887045629cf28cc72453cd1c63acb717316b3f3f"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_Linux-64bit.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335432"
|
||||
provenance = "cosign"
|
||||
|
||||
[tools.trivy."platforms.macos-arm64"]
|
||||
checksum = "sha256:1caada5e0e2091909357c7525d3aa76f4b660b13821bc143b190c7483e31cc11"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_macOS-ARM64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339464"
|
||||
checksum = "sha256:4a77108cccf8e55c8d6823e1e759939a622277e66cd0daa3c1fc621ed69e4568"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_macOS-ARM64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335435"
|
||||
provenance = "cosign"
|
||||
|
||||
[tools.trivy."platforms.macos-x64"]
|
||||
checksum = "sha256:472816f6888dda689d075c30254d4210b4d1035acf365aa72332f584c2f60485"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_macOS-64bit.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339388"
|
||||
checksum = "sha256:291edaa9778acbe4693d067b5ad60ee11570e5ac68296e85595417528ca641e4"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_macOS-64bit.tar.gz"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335728"
|
||||
provenance = "cosign"
|
||||
|
||||
[tools.trivy."platforms.windows-x64"]
|
||||
checksum = "sha256:94c40e0696e4b907a74b7b2e1438d5d72ebaca83115817407f568a002d520842"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.74.0/trivy_0.74.0_windows-64bit.zip"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/514339469"
|
||||
checksum = "sha256:4e43bd71a30f51aee39525f60f2b47043af77eb8df8fe082aae4372b69c6660f"
|
||||
url = "https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_windows-64bit.zip"
|
||||
url_api = "https://api.github.com/repos/aquasecurity/trivy/releases/assets/603335433"
|
||||
provenance = "cosign"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
|
||||
pkgname=gitea
|
||||
pkgver=1.27.3
|
||||
pkgver=28.1.0
|
||||
pkgrel=0
|
||||
pkgdesc="Self-hosted Git service written in Go"
|
||||
url="https://about.gitea.com/"
|
||||
@@ -14,6 +14,7 @@ pkgusers="gitea"
|
||||
pkggroups="www-data"
|
||||
subpackages="
|
||||
$pkgname-doc
|
||||
$pkgname-logrotate:_logrotate:noarch
|
||||
$pkgname-openrc:_openrc:noarch
|
||||
"
|
||||
options="!check !strip !tracedeps"
|
||||
@@ -33,6 +34,7 @@ source="
|
||||
$pkgname-src-$pkgver.tar.gz::https://github.com/go-gitea/gitea/releases/download/v$pkgver/gitea-src-$pkgver.tar.gz
|
||||
gitea.ini
|
||||
gitea.initd
|
||||
gitea.logrotate
|
||||
"
|
||||
builddir="$srcdir/gitea-src-$pkgver"
|
||||
|
||||
@@ -68,10 +70,19 @@ _openrc() {
|
||||
install -Dm755 "$srcdir"/gitea.initd "$subpkgdir"/etc/init.d/gitea
|
||||
}
|
||||
|
||||
_logrotate() {
|
||||
pkgdesc="Log rotation configuration for $pkgname"
|
||||
depends="$pkgname=$pkgver-r$pkgrel logrotate"
|
||||
|
||||
install -Dm644 "$srcdir"/gitea.logrotate \
|
||||
"$subpkgdir"/etc/logrotate.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
67974010369075d56d219b5daaaf3258d0897e94ab62727f68ab2e98f56a4b64f8f0358183c49fe3e60c8a54a1ff1cbdaf6d172e219452fed161d6e828a65917 gitea-1.27.3-linux-amd64.xz
|
||||
28239b94b3d84162e50a49286cb495d005b92725a8359a54d8b5a6d75af689c84805eb110e558112c525c67636ef38ecaaa3f49a99a552d0253b97f4ec96d1c5 gitea-1.27.3-linux-arm64.xz
|
||||
8b22b5b9cb9578a6f228ed2ab87999292a5b283424932b88c6eb97634ca43e142b53d13602b9f1bb8db3d61eddcd83e9f329149cafc2fcf3c1209ca108283ef6 gitea-src-1.27.3.tar.gz
|
||||
431184faffa8996873d92d7b0d16bc4b1a0178d264cd2928d1f49b13ad3e6470d9ede7a18c12112deeeb38f0647ccc0b012e98bcbd96e7b8496a3dc18f5b1fb7 gitea.ini
|
||||
dee8e5f0b088403e70829f193763e3cc9f3a9ab4b4fe7d5dca72e858bdc4859f2b03cd38314086e2bf7a421eb34f6141b92e11679ad6f9980b8a979a6cabb213 gitea-28.1.0-linux-amd64.xz
|
||||
413ed83dab64d0bd20684d1ea5350b58c6e74e5aa6f034ee91004d0ee3edadc2ce242e9a298d434744ed00a7bdc5ff4a369d508d385cd40f3b81c59db061ce3a gitea-28.1.0-linux-arm64.xz
|
||||
619b6ef374153816dfdb24896f455b3d5e96c033eae98f0c6f6ad027f817f57328cca3b239caa1bba8fe3c3f0f89fc87c9dac741f7719bb1c3501577048cb0bd gitea-src-28.1.0.tar.gz
|
||||
4e20b24c34af01a27589a13d9140d559909cc44507febe5de692d7bc154d65f4b01b79d2f1dcce9fed77b60ac3b1a52cc0ec72161e5a2484a4c718d26d3c630d gitea.ini
|
||||
9474d707df8b049c93ec4642f71195adff699e1e812f315cac4295b3ab29eeb9ba8b83bf3307c50b04e072a4a9dc4c4f84ac490ee22291bd50015009795c1598 gitea.initd
|
||||
456a565123b46c0c3a36adbde4c881ee04557a2f1ba492a76205c28f72598bf3b7b96192ddeae4f9ab197fdc75bb5e10a3421574e1bf831192220b4540bb39fc gitea.logrotate
|
||||
"
|
||||
|
||||
@@ -19,6 +19,13 @@ rc-update add gitea default
|
||||
rc-service gitea start
|
||||
```
|
||||
|
||||
Install daily rotation for the OpenRC service log, retaining 14 compressed
|
||||
archives:
|
||||
|
||||
```sh
|
||||
apk add gitea-logrotate
|
||||
```
|
||||
|
||||
Refresh checksums:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Configuration cheat sheet: https://docs.gitea.io/en-us/config-cheat-sheet/
|
||||
# Configuration cheat sheet: https://docs.gitea.com/administration/config-cheat-sheet/
|
||||
# Example configuration: https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini
|
||||
|
||||
RUN_USER = gitea
|
||||
RUN_MODE = prod
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/var/log/gitea/http.log {
|
||||
daily
|
||||
rotate 14
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
su gitea www-data
|
||||
}
|
||||
@@ -5,7 +5,7 @@ repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." &&
|
||||
# shellcheck source=scripts/apk/test-install-lib.sh
|
||||
. "${repo_root}/scripts/apk/test-install-lib.sh"
|
||||
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-gitea}" "${PACKAGE_VERSION:-1.27.0-r1}" <<'SCRIPT'
|
||||
apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-gitea}" "${PACKAGE_VERSION:-28.0.0-r1}" <<'SCRIPT'
|
||||
set -e
|
||||
|
||||
if [ -n "${ALPINE_REPOSITORY_URL}" ]; then
|
||||
@@ -29,7 +29,7 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-gitea}" "${PACKAGE_VERSION:
|
||||
printf "%s\n" /repo >> /etc/apk/repositories
|
||||
fi
|
||||
apk update
|
||||
apk add --upgrade "${PACKAGE_NAME}" "${PACKAGE_NAME}-doc" "${PACKAGE_NAME}-openrc"
|
||||
apk add --upgrade "${PACKAGE_NAME}" "${PACKAGE_NAME}-doc" "${PACKAGE_NAME}-logrotate" "${PACKAGE_NAME}-openrc"
|
||||
installed_after="$(apk list -I "${PACKAGE_NAME}" | awk "{print \$1}")"
|
||||
printf "Installed package after local upgrade: %s\n" "${installed_after}"
|
||||
test "${installed_after}" = "${PACKAGE_NAME}-${PACKAGE_VERSION}"
|
||||
@@ -45,6 +45,9 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-gitea}" "${PACKAGE_VERSION:
|
||||
test -d /usr/share/webapps/gitea/public
|
||||
test -d /usr/share/webapps/gitea/templates
|
||||
test -f /etc/init.d/gitea
|
||||
test -f /etc/logrotate.d/gitea
|
||||
apk info -e logrotate
|
||||
logrotate -d /etc/logrotate.conf
|
||||
|
||||
gitea --version
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Maintainer: Joachim Schlöffel <mjoachim.schloeffel@financial-service-plus.de>
|
||||
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
|
||||
pkgname=greptimedb
|
||||
pkgver=1.1.4
|
||||
pkgrel=0
|
||||
pkgver=1.2.1
|
||||
pkgrel=4
|
||||
pkgdesc="Cloud-native observability database for metrics, logs, and traces"
|
||||
url="https://github.com/GreptimeTeam/greptimedb"
|
||||
arch="x86_64"
|
||||
@@ -12,14 +12,17 @@ makedepends="
|
||||
clang
|
||||
cmake
|
||||
coreutils
|
||||
curl
|
||||
cargo-auditable
|
||||
git
|
||||
lld
|
||||
linux-headers
|
||||
make
|
||||
mold
|
||||
nodejs
|
||||
openssl-dev
|
||||
openssl-libs-static
|
||||
perl
|
||||
pnpm
|
||||
protobuf
|
||||
protobuf-dev
|
||||
rustup
|
||||
@@ -28,12 +31,14 @@ makedepends="
|
||||
zstd-dev
|
||||
zstd-static
|
||||
"
|
||||
checkdepends="cargo-nextest"
|
||||
install="$pkgname.pre-install"
|
||||
subpackages="
|
||||
$pkgname-datanode-openrc:_openrc_datanode:noarch
|
||||
$pkgname-docs:_docs:noarch
|
||||
$pkgname-flownode-openrc:_openrc_flownode:noarch
|
||||
$pkgname-frontend-openrc:_openrc_frontend:noarch
|
||||
$pkgname-logrotate:_logrotate:noarch
|
||||
$pkgname-metasrv-openrc:_openrc_metasrv:noarch
|
||||
$pkgname-standalone-openrc:_openrc_standalone:noarch
|
||||
"
|
||||
@@ -41,7 +46,7 @@ options="net"
|
||||
_dashboard_version="v0.12.0"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/GreptimeTeam/greptimedb/archive/refs/tags/v$pkgver.tar.gz
|
||||
dashboard-$_dashboard_version.tar.gz::https://github.com/GreptimeTeam/dashboard/releases/download/$_dashboard_version/build.tar.gz
|
||||
dashboard-$_dashboard_version.tar.gz::https://github.com/GreptimeTeam/dashboard/archive/refs/tags/$_dashboard_version.tar.gz
|
||||
datanode.toml
|
||||
flownode.toml
|
||||
frontend.toml
|
||||
@@ -49,6 +54,7 @@ source="
|
||||
greptimedb.flownode.confd
|
||||
greptimedb.frontend.confd
|
||||
greptimedb.initd
|
||||
greptimedb.logrotate
|
||||
greptimedb.metasrv.confd
|
||||
greptimedb.standalone.confd
|
||||
metasrv.toml
|
||||
@@ -64,31 +70,45 @@ export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-2}"
|
||||
export CARGO_PROFILE_NIGHTLY_CODEGEN_UNITS="${CARGO_PROFILE_NIGHTLY_CODEGEN_UNITS:-16}"
|
||||
export CARGO_PROFILE_NIGHTLY_DEBUG="${CARGO_PROFILE_NIGHTLY_DEBUG:-false}"
|
||||
export CARGO_PROFILE_NIGHTLY_LTO="${CARGO_PROFILE_NIGHTLY_LTO:-thin}"
|
||||
export CARGO_PROFILE_TEST_DEBUG="${CARGO_PROFILE_TEST_DEBUG:-false}"
|
||||
export LIBRARY_PATH="/usr/lib"
|
||||
export RUSTFLAGS="${RUSTFLAGS:-} -C link-arg=-fuse-ld=mold"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
if [ ! -d "$builddir"/src/servers/dashboard/dist ]; then
|
||||
mv "$srcdir"/dist "$builddir"/src/servers/dashboard/dist
|
||||
fi
|
||||
|
||||
rustup-init \
|
||||
-y \
|
||||
--no-modify-path \
|
||||
--profile minimal \
|
||||
--default-toolchain "$_rust_toolchain"
|
||||
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo fetch \
|
||||
--locked
|
||||
|
||||
local _dashboard_builddir="$srcdir"/dashboard-${_dashboard_version#v}
|
||||
(
|
||||
cd "$_dashboard_builddir"
|
||||
pnpm install --frozen-lockfile --store-dir "$srcdir"/pnpm-store
|
||||
pnpm run build:docker
|
||||
)
|
||||
rm -rf "$builddir"/src/servers/dashboard/dist
|
||||
cp -a "$_dashboard_builddir"/dist "$builddir"/src/servers/dashboard/
|
||||
}
|
||||
|
||||
build() {
|
||||
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo build \
|
||||
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo auditable build \
|
||||
--profile "$_cargo_profile" \
|
||||
--frozen \
|
||||
--locked \
|
||||
--bin greptime \
|
||||
--features servers/dashboard
|
||||
}
|
||||
|
||||
check() {
|
||||
"$CARGO_TARGET_DIR"/"$_cargo_profile"/greptime --version
|
||||
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo nextest run \
|
||||
-p cmd \
|
||||
--lib \
|
||||
--frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
@@ -118,6 +138,14 @@ _openrc_frontend() { _openrc_service frontend; }
|
||||
_openrc_metasrv() { _openrc_service metasrv; }
|
||||
_openrc_standalone() { _openrc_service standalone; }
|
||||
|
||||
_logrotate() {
|
||||
pkgdesc="Log rotation configuration for $pkgname"
|
||||
depends="$pkgname=$pkgver-r$pkgrel logrotate"
|
||||
|
||||
install -Dm644 "$srcdir"/greptimedb.logrotate \
|
||||
"$subpkgdir"/etc/logrotate.d/$pkgname
|
||||
}
|
||||
|
||||
_docs() {
|
||||
pkgdesc="$pkgdesc (configuration examples and reference)"
|
||||
depends=""
|
||||
@@ -127,15 +155,16 @@ _docs() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d60080a82a1dba52ab28d33ba1d9109bd047a6e598dbad17a3d92c82c6aad20b7fffd35cc20571829d8869360040af61195eeb97a14e08d8289e70663ee08664 greptimedb-1.1.4.tar.gz
|
||||
4260acae5bed00a693dceffe9f53d0f8b25fd677b15638e951cf973dc29681f4bacde352c661a12bd78af7be9181a3740812f814fc3c4c8c87ea4eee6ee07e2d dashboard-v0.12.0.tar.gz
|
||||
fc580f6e34df84b4f37219047d751968324c356f3cad352d1515abb4b441515a1ad98f0d01e2de33aac5129a2d7a5335edc4d8888923da7683a084a484769bea greptimedb-1.2.1.tar.gz
|
||||
3f853b6767a86cfa97ec640a17de59b2e798561c9402026e9b3a749907780b9b686149dba8a932b5d61ae538c430deab2410248e5c9e6e1961909000445ee2ee dashboard-v0.12.0.tar.gz
|
||||
29cc3376753487b216748e3f85e12639830e1ac4a763e94f330f87c3651a8ef9de35732958311c0049e1b7cbb4e90a9e602b3aff43297fe088c5ce795a110a79 datanode.toml
|
||||
52790808cb4f5cf0220ac2ab169b623fe76b6318d27d7f003e1197e850373cb915bfd40556098bcb7650f293d751039cb3bccbf9107bb160b8284887794ba975 flownode.toml
|
||||
e3e19ab3c7a345ecf8cf0a507f7fc95dd3b036a4a797385cf77fcf1999f2e4f053042c7bbda8de73ed43ff72e87aad81e4ac6d4a34d01773bbc1f6d0d967d9f7 frontend.toml
|
||||
313ed7d9ccd174b1869f3009e174266cdc414599e0b0f8307c8aaf2b73841eb36ce4c1b2f6244a0358b5a587a4edaa621b781fbd767835088b3fa13623fcc0df greptimedb.datanode.confd
|
||||
daf8efacc8bf2b74abd9f4900f889585295b57333a8a562a722de0596d35f25d5f9149e0879f4140bfdf727caa59c3f55b1380212722df92c588d912275530b8 greptimedb.flownode.confd
|
||||
e3e61b1df00f8172a3b1d4a0d37ed2574a8c5cd27676b4e2ce14d15ad8933d233baabe8da374f715d00cfaee26f665244c1ba00f70197fcc713c4e9af9c3229e greptimedb.frontend.confd
|
||||
c00740aee566b161bbe3610e0e0d6e8340022055750e6778772262474ffd6484d9f58be2fd498beafe28d0943e259e2277930af691bedea7650726e6c8998881 greptimedb.initd
|
||||
f72f52aa8277fc56eb071b5118990b8f4e09d143634c2f7fc54ed1f5ff065631c8630c45fe90d3db1f3ea0540c1ab3154a383d2000b4c5978e889ca02a1b6564 greptimedb.initd
|
||||
775b4db7e7bc6127376b22fed8330b952c5027e3bfbfa29bb6ae034e6c75e7fed8ddfc0ad9761f369acd37398dfbd145cfea210828f2fc0bec9be92b051e6a75 greptimedb.logrotate
|
||||
df495367d85844dcba99e5aa01e5a23fd14799b7521a72d9ea00d29fc0e5fbc5c5d06ee88e88d9637e260f8337249a39d2b0115de58da4899824d20bd844254a greptimedb.metasrv.confd
|
||||
882a79e969cac42adfada22060e6507fb687755a6d266d6728154b3e4da5777d2eaf5ad9bc331ed050448249ca609e6a61977b624d9faf25d83ed975345452cf greptimedb.standalone.confd
|
||||
8120ec338ebe1330d43b20d9b34a8f5f778ea13cb056febd3c8e9dc189d0de2380b90e5474a0990294d7004827c6133d44d2dd3e32d463b9259c47c82592d257 metasrv.toml
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
# GreptimeDB Alpine Package
|
||||
|
||||
Builds `greptime` from the upstream source release and packages OpenRC service
|
||||
subpackages plus `/etc/greptimedb` defaults.
|
||||
Builds `greptime` and its embedded dashboard from their upstream source
|
||||
releases, and packages OpenRC service subpackages plus `/etc/greptimedb`
|
||||
defaults.
|
||||
|
||||
Build command:
|
||||
|
||||
```sh
|
||||
cargo build --profile nightly --locked --bin greptime --features servers/dashboard
|
||||
cargo auditable build --profile nightly --frozen --locked --bin greptime --features servers/dashboard
|
||||
```
|
||||
|
||||
GreptimeDB requires the nightly pinned in its source release
|
||||
(`nightly-2026-03-21`). The package uses Rustup to install that toolchain and
|
||||
uses locked Cargo and pnpm dependency resolution, so `options="net"` is
|
||||
intentional. Cargo dependencies are fetched before compilation; the Rust build
|
||||
then runs frozen. The dashboard is built from the matching `v0.12.0` source tag
|
||||
with its checked-in `pnpm-lock.yaml`.
|
||||
|
||||
## Runtime Layout
|
||||
|
||||
Installs `/usr/bin/greptime` and component OpenRC packages:
|
||||
@@ -20,6 +28,8 @@ Installs `/usr/bin/greptime` and component OpenRC packages:
|
||||
- `greptimedb-datanode-openrc`: `greptime datanode start`
|
||||
- `greptimedb-flownode-openrc`: `greptime flownode start`
|
||||
- `greptimedb-frontend-openrc`: `greptime frontend start`
|
||||
- `greptimedb-logrotate`: daily rotation for the OpenRC service logs, retaining
|
||||
14 compressed archives
|
||||
|
||||
Default TOML files are installed in `/etc/greptimedb`. Standalone ports:
|
||||
|
||||
@@ -92,4 +102,4 @@ ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alp
|
||||
mise run apk:test-install
|
||||
```
|
||||
|
||||
Full builds take close to an hour.
|
||||
Full builds and the targeted upstream Nextest check take close to an hour.
|
||||
|
||||
@@ -6,6 +6,7 @@ description="GreptimeDB ${service_name} service"
|
||||
command="/usr/bin/greptime"
|
||||
command_user="${GREPTIMEDB_USER:-greptimedb}:${GREPTIMEDB_GROUP:-greptimedb}"
|
||||
command_background="yes"
|
||||
retry="TERM/30/KILL/5"
|
||||
pidfile="/run/greptimedb/${RC_SVCNAME}.pid"
|
||||
output_log="${GREPTIMEDB_LOG:-/var/log/greptimedb/${RC_SVCNAME}.log}"
|
||||
error_log="${GREPTIMEDB_ERRLOG:-/var/log/greptimedb/${RC_SVCNAME}.log}"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/var/log/greptimedb/greptimedb.*.log {
|
||||
daily
|
||||
rotate 14
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
su greptimedb greptimedb
|
||||
}
|
||||
@@ -21,3 +21,14 @@ greptime --version
|
||||
|
||||
rc-update add greptimedb.standalone default || true
|
||||
test -L /etc/runlevels/default/greptimedb.standalone
|
||||
|
||||
rc-service greptimedb.standalone start
|
||||
for _attempt in $(seq 1 30); do
|
||||
if wget -qO- http://127.0.0.1:4000/status >/dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
wget -qO- http://127.0.0.1:4000/status >/dev/null
|
||||
wget -qO- http://127.0.0.1:4000/dashboard/ | grep -qi '<!doctype html>'
|
||||
rc-service greptimedb.standalone stop
|
||||
|
||||
@@ -26,6 +26,7 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-greptimedb}" "${PACKAGE_VER
|
||||
"${PACKAGE_NAME}-docs" \
|
||||
"${PACKAGE_NAME}-flownode-openrc" \
|
||||
"${PACKAGE_NAME}-frontend-openrc" \
|
||||
"${PACKAGE_NAME}-logrotate" \
|
||||
"${PACKAGE_NAME}-metasrv-openrc" \
|
||||
"${PACKAGE_NAME}-standalone-openrc"
|
||||
|
||||
@@ -34,5 +35,8 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-greptimedb}" "${PACKAGE_VER
|
||||
ls -1 /etc/greptimedb
|
||||
test -f "/usr/share/doc/${PACKAGE_NAME}/config/config.md"
|
||||
test -f "/usr/share/doc/${PACKAGE_NAME}/config/standalone.example.toml"
|
||||
test -f /etc/logrotate.d/greptimedb
|
||||
apk info -e logrotate
|
||||
logrotate -d /etc/logrotate.conf
|
||||
find /etc/init.d -maxdepth 1 -name "greptimedb.*" -print | sort
|
||||
SCRIPT
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
|
||||
printf 'No generated sources for %s\n' "${package_dir}"
|
||||
@@ -1,15 +1,14 @@
|
||||
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
|
||||
pkgname=lavinmq
|
||||
pkgver=2.9.2
|
||||
pkgrel=0
|
||||
pkgver=2.10.1
|
||||
pkgrel=1
|
||||
pkgdesc="High-performance AMQP and MQTT message queue server"
|
||||
url="https://github.com/cloudamqp/lavinmq"
|
||||
arch="x86_64"
|
||||
license="Apache-2.0"
|
||||
depends="ca-certificates /bin/sh"
|
||||
makedepends="
|
||||
crystal=1.21.0-r0
|
||||
curl
|
||||
crystal>=1.21.0
|
||||
gc-dev
|
||||
help2man
|
||||
libevent-dev
|
||||
@@ -27,17 +26,25 @@ pkgusers="lavinmq"
|
||||
pkggroups="lavinmq"
|
||||
subpackages="
|
||||
$pkgname-doc
|
||||
$pkgname-logrotate:_logrotate:noarch
|
||||
$pkgname-openrc:_openrc:noarch
|
||||
"
|
||||
options="net"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/cloudamqp/lavinmq/archive/refs/tags/v$pkgver.tar.gz
|
||||
$pkgname-$pkgver-shards.tar.gz
|
||||
$pkgname-$pkgver-assets.tar.gz
|
||||
lavinmq.confd
|
||||
lavinmq.initd
|
||||
lavinmq.logrotate
|
||||
use-vendored-build-inputs.patch
|
||||
"
|
||||
|
||||
export CRYSTAL_CACHE_DIR="${CRYSTAL_CACHE_DIR:-$srcdir/crystal-cache}"
|
||||
export SHARDS_CACHE_PATH="${SHARDS_CACHE_PATH:-$srcdir/shards-cache}"
|
||||
prepare() {
|
||||
default_prepare
|
||||
tar -xzf "$srcdir/$pkgname-$pkgver-shards.tar.gz" -C "$builddir"
|
||||
mkdir -p "$builddir/.alpine-assets"
|
||||
tar -xzf "$srcdir/$pkgname-$pkgver-assets.tar.gz" -C "$builddir/.alpine-assets"
|
||||
}
|
||||
|
||||
build() {
|
||||
crystal --version
|
||||
@@ -46,9 +53,7 @@ build() {
|
||||
}
|
||||
|
||||
check() {
|
||||
bin/lavinmq -v
|
||||
bin/lavinmqctl --version
|
||||
bin/lavinmqperf --version
|
||||
crystal spec spec/config_spec.cr
|
||||
}
|
||||
|
||||
package() {
|
||||
@@ -68,8 +73,20 @@ _openrc() {
|
||||
"$subpkgdir"/etc/conf.d/lavinmq
|
||||
}
|
||||
|
||||
_logrotate() {
|
||||
pkgdesc="Log rotation configuration for $pkgname"
|
||||
depends="$pkgname=$pkgver-r$pkgrel logrotate"
|
||||
|
||||
install -Dm644 "$srcdir"/lavinmq.logrotate \
|
||||
"$subpkgdir"/etc/logrotate.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2c9c2740db2f09cefa0f45b20354ba42dc6d83079d078398c370c8b9378c76c16f6f7a4495fbb74a6059f8b418526a95f09a5d94ab32ba97b1e44ed318f1c6af lavinmq-2.9.2.tar.gz
|
||||
1c2c932a0698227abfe8353988ea75b48f9048f183d85410797af5bc14495e2cb4497e72acc8fc9ff9ef8f78e8ebb648a1b40b5cf7f1b86e18597d10297417ff lavinmq-2.10.1.tar.gz
|
||||
d0dfdd5c0e474024f57deb9e31c76e3f176e798c8d21dea53d3aea1b05436bd03fa34e69ccddf322bc89adedce5f379df5a316cddbbdfe12520e5bf672ad8228 lavinmq-2.10.1-shards.tar.gz
|
||||
ae3cea2534b211abbcbd1e4fcb6da73dfaf383a19aef1c45f367cba77492cc20a7ce8283fc42f26c0a023149114c369bed307fb8cde0b8f27fba61165092e986 lavinmq-2.10.1-assets.tar.gz
|
||||
62a609d50f28db960098c4c84ce4f1dad78413366a9a9aca18fe321114d687be3bf7b71924d4ace69bd74383c5ac40d2ee09ae0eef9c1bfe653b97448e42e110 lavinmq.confd
|
||||
1853196e70297b5c4a2207fde50df735620cf6d99c4994644fd676bffaf863d67300ad7ae771c4bbb86fce1a0485c2a7968cf912c5f5bb878e08b15e5a28ba1b lavinmq.initd
|
||||
9999dd6a96bd29a3d0bda1b2110af940b15acf1250a0f3ba6c93d16bd62063ab1c1dfa4c237da99bbb401150517abde59e2c7275f4b72c3eb7c90e1ce61d43b9 lavinmq.logrotate
|
||||
e7617099f745ecbf2f0686830d0a1b28044741ebd543798505b5b3c08f1be96b6cc478eb18f6785af49b100c2f49d837775f0721ac27519ddf3f081e681c581c use-vendored-build-inputs.patch
|
||||
"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# LavinMQ Alpine Package
|
||||
|
||||
Builds LavinMQ from the upstream source release for `x86_64` and packages the
|
||||
OpenRC service plus `/etc/lavinmq` defaults.
|
||||
OpenRC service plus `/etc/lavinmq` defaults. The locked Shards dependencies and
|
||||
frontend assets are versioned, checksummed source inputs, so the build does not
|
||||
need network access.
|
||||
|
||||
Build command:
|
||||
|
||||
@@ -9,8 +11,9 @@ Build command:
|
||||
make
|
||||
```
|
||||
|
||||
LavinMQ 2.9.2 requires Crystal 1.21.0. The package pins Alpine edge's native
|
||||
Crystal package, avoiding a glibc toolchain in the Alpine musl build.
|
||||
LavinMQ 2.10.1 requires Crystal 1.21.0 or newer. The package uses Alpine
|
||||
edge's native Crystal package, avoiding a glibc toolchain in the Alpine musl
|
||||
build.
|
||||
|
||||
## Runtime Layout
|
||||
|
||||
@@ -35,12 +38,47 @@ rc-update add lavinmq default
|
||||
rc-service lavinmq start
|
||||
```
|
||||
|
||||
Install daily rotation for the OpenRC service log, retaining 14 compressed
|
||||
archives:
|
||||
|
||||
```sh
|
||||
apk add lavinmq-logrotate
|
||||
```
|
||||
|
||||
Wrapper settings in `/etc/conf.d/lavinmq`:
|
||||
|
||||
- `LAVINMQ_CONFIG`: config file path passed with `--config`
|
||||
- `LAVINMQ_DATA_DIR`: data directory passed with `-D`
|
||||
- `LAVINMQ_OPTS`: extra LavinMQ arguments appended after package defaults
|
||||
|
||||
## Updating LavinMQ
|
||||
|
||||
1. In `APKBUILD`, set `pkgver` to the new upstream version and reset `pkgrel`
|
||||
to `0`.
|
||||
2. Add versioned vendored archives for the locked Shards dependencies and
|
||||
frontend assets. If the new upstream `shard.lock` and the asset rules in its
|
||||
`Makefile` are unchanged, the existing archives can be reused under the new
|
||||
names:
|
||||
|
||||
```sh
|
||||
cd packaging/alpine/local/lavinmq
|
||||
cp lavinmq-2.10.1-shards.tar.gz lavinmq-<version>-shards.tar.gz
|
||||
cp lavinmq-2.10.1-assets.tar.gz lavinmq-<version>-assets.tar.gz
|
||||
git add -f lavinmq-<version>-shards.tar.gz lavinmq-<version>-assets.tar.gz
|
||||
```
|
||||
|
||||
When `shard.lock` changes, extract the upstream source, run
|
||||
`shards install --production` in it, and create the shards archive with
|
||||
`tar -czf lavinmq-<version>-shards.tar.gz lib`. If the asset rules change,
|
||||
download the files specified by the new `Makefile` to a staging directory
|
||||
and create `lavinmq-<version>-assets.tar.gz` from that directory's contents.
|
||||
3. From the repository root, refresh checksums and build the package:
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=lavinmq mise run apk:checksum
|
||||
ALPINE_PACKAGE=lavinmq mise run apk:build
|
||||
```
|
||||
|
||||
## Package Commands
|
||||
|
||||
Refresh checksums:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
/var/log/lavinmq/lavinmq.log {
|
||||
daily
|
||||
rotate 14
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
su lavinmq lavinmq
|
||||
}
|
||||
@@ -20,7 +20,7 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-lavinmq}" "${PACKAGE_VERSIO
|
||||
printf "%s\n" /repo >> /etc/apk/repositories
|
||||
fi
|
||||
apk update
|
||||
apk add "${PACKAGE_NAME}" "${PACKAGE_NAME}-doc" "${PACKAGE_NAME}-openrc"
|
||||
apk add "${PACKAGE_NAME}" "${PACKAGE_NAME}-doc" "${PACKAGE_NAME}-logrotate" "${PACKAGE_NAME}-openrc"
|
||||
|
||||
test -x /usr/bin/lavinmq
|
||||
test -x /usr/bin/lavinmqctl
|
||||
@@ -30,6 +30,9 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-lavinmq}" "${PACKAGE_VERSIO
|
||||
test "$(stat -c "%U:%G %a" /var/lib/lavinmq)" = "lavinmq:lavinmq 750"
|
||||
test -f /etc/conf.d/lavinmq
|
||||
test -f /etc/init.d/lavinmq
|
||||
test -f /etc/logrotate.d/lavinmq
|
||||
apk info -e logrotate
|
||||
logrotate -d /etc/logrotate.conf
|
||||
test -f /usr/share/doc/lavinmq/README.md
|
||||
test -f /usr/share/doc/lavinmq/changelog
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -8,0 +9 @@
|
||||
+LAVINMQ_ASSET_DIR ?= .alpine-assets
|
||||
@@ -55,2 +56,2 @@
|
||||
-lib: shard.yml shard.lock
|
||||
- shards install --production
|
||||
+lib:
|
||||
+ test -d lib
|
||||
@@ -62,3 +63 @@
|
||||
- curl --fail --retry 5 -sL https://github.com/chartjs/Chart.js/releases/download/v4.0.1/chart.js-4.0.1.tgz | \
|
||||
- tar -zxOf- package/dist/chart.js > $@
|
||||
- [ "038d0a4f9c61f0b35ff70f883e7591403a349542625a4caaf48caa141adedfd5 *$@" = "$$(openssl dgst -sha256 -r $@)" ]
|
||||
+ install -Dm644 "$(LAVINMQ_ASSET_DIR)/chart.js" "$@"
|
||||
@@ -67,3 +66 @@
|
||||
- curl --fail --retry 5 -sL https://github.com/chartjs/Chart.js/releases/download/v4.0.1/chart.js-4.0.1.tgz | \
|
||||
- tar -zxOf- package/dist/chunks/helpers.segment.js > $@
|
||||
- [ "b4746b748fe583a18ef921e341b8b65166c2ebd0b737fde6527b254baaeb1aa1 *$@" = "$$(openssl dgst -sha256 -r $@)" ]
|
||||
+ install -Dm644 "$(LAVINMQ_ASSET_DIR)/helpers.segment.js" "$@"
|
||||
@@ -72,2 +69 @@
|
||||
- curl --fail --retry 5 -sLo $@ https://moment.github.io/luxon/es6/luxon.mjs
|
||||
- [ "b495ad5cabea3439d04387e6622f2c3fa81d319424d9d76d9e7f874ac5a0807a *$@" = "$$(openssl dgst -sha256 -r $@)" ]
|
||||
+ install -Dm644 "$(LAVINMQ_ASSET_DIR)/luxon.js" "$@"
|
||||
@@ -76,3 +72 @@
|
||||
- curl --fail --retry 5 -sLo $@ https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.3.1/dist/chartjs-adapter-luxon.esm.js
|
||||
- sed -i'' -e "s|\(import { _adapters } from\).*|\1 './chart.js'|; s|\(import { DateTime } from\).*|\1 './luxon.js'|" $@
|
||||
- [ "17d7b6567d656a004f86b6b5cbdbe64cb308e9a2ebfa7675caa79ba0bc72ef91 *$@" = "$$(openssl dgst -sha256 -r $@)" ]
|
||||
+ install -Dm644 "$(LAVINMQ_ASSET_DIR)/chartjs-adapter-luxon.esm.js" "$@"
|
||||
@@ -81,2 +75 @@
|
||||
- curl --fail --retry 5 -sLo $@ https://unpkg.com/@stoplight/elements@8.2.0/web-components.min.js
|
||||
- [ "598862da6d551769ebad9d61d4e3037535de573a13d3e0bd1ded4c5fc65c5885 *$@" = "$$(openssl dgst -sha256 -r $@)" ]
|
||||
+ install -Dm644 "$(LAVINMQ_ASSET_DIR)/elements-8.2.0.js" "$@"
|
||||
@@ -85,2 +78 @@
|
||||
- curl --fail --retry 5 -sLo $@ https://unpkg.com/@stoplight/elements@8.2.0/styles.min.css
|
||||
- [ "119784e23ffc39b6fa3fdb3df93f391f8250e8af141b78dfc3b6bed86079f93b *$@" = "$$(openssl dgst -sha256 -r $@)" ]
|
||||
+ install -Dm644 "$(LAVINMQ_ASSET_DIR)/elements-8.2.0.css" "$@"
|
||||
@@ -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-"
|
||||
@@ -0,0 +1,29 @@
|
||||
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
|
||||
pkgname=rclone-openrc
|
||||
pkgver=0.1.0
|
||||
pkgrel=0
|
||||
pkgdesc="Generic, instance-capable OpenRC service for rclone"
|
||||
url="https://rclone.org/"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="openrc rclone"
|
||||
install="$pkgname.pre-install"
|
||||
pkgusers="rclone"
|
||||
pkggroups="rclone"
|
||||
options="!check"
|
||||
source="
|
||||
rclone.confd
|
||||
rclone.initd
|
||||
"
|
||||
|
||||
package() {
|
||||
install -d -m 0750 -o root -g rclone "$pkgdir"/etc/rclone
|
||||
install -d -m 0750 -o rclone -g rclone "$pkgdir"/var/lib/rclone/cache
|
||||
install -Dm644 "$srcdir"/rclone.confd "$pkgdir"/etc/conf.d/rclone
|
||||
install -Dm755 "$srcdir"/rclone.initd "$pkgdir"/etc/init.d/rclone
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
91a05da2c5740a810faf0226ab5fcb3d92a9db56b42c10decaed91481d3129cfc37f5f726a6dc1b5b1246ad4d1386cbe918e109f152969912ea670dbff35fe70 rclone.confd
|
||||
e92ce86aa21ce1a94beb8304c806b4c0045d412477d7a232e37b0f28354af3060de054c5ae3d1ea353b92d19137a0cfa00b0891b0e179aa32bc6b2c7ecdfc7ea rclone.initd
|
||||
"
|
||||
@@ -0,0 +1,59 @@
|
||||
# rclone OpenRC Alpine Package
|
||||
|
||||
Provides a generic, instance-capable OpenRC service for Alpine's `rclone`
|
||||
package. It does not repackage the rclone binary.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
apk add rclone-openrc
|
||||
```
|
||||
|
||||
The package creates the unprivileged `rclone` account, `/etc/rclone` for
|
||||
configuration and credentials, and `/var/lib/rclone/cache` for rclone state.
|
||||
It deliberately does not create remotes, credentials, authorized-key files, or
|
||||
SSH host keys; provision those as machine-specific secrets.
|
||||
|
||||
## Create an Instance
|
||||
|
||||
Copy the template and symlink the generic service under an instance name:
|
||||
|
||||
```sh
|
||||
cp /etc/conf.d/rclone /etc/conf.d/rclone.sftp
|
||||
ln -s rclone /etc/init.d/rclone.sftp
|
||||
```
|
||||
|
||||
For an SFTP server, configure `/etc/conf.d/rclone.sftp`:
|
||||
|
||||
```sh
|
||||
RCLONE_COMMAND="serve sftp"
|
||||
RCLONE_REMOTE="/srv/storage"
|
||||
RCLONE_ARGS="
|
||||
--addr :2022
|
||||
--authorized-keys /etc/rclone/authorized_keys
|
||||
--key /etc/rclone/ssh_host_ed25519_key
|
||||
--log-level INFO
|
||||
"
|
||||
```
|
||||
|
||||
Then enable and start it:
|
||||
|
||||
```sh
|
||||
rc-update add rclone.sftp default
|
||||
rc-service rclone.sftp start
|
||||
```
|
||||
|
||||
Other instances, such as `rclone.webdav` or `rclone.rcd`, use their own
|
||||
`/etc/conf.d/rclone.<name>` file with the same generic init script. The service
|
||||
runs rclone in the foreground under `supervise-daemon`, which restarts it after
|
||||
an unexpected exit. Set `RCLONE_RESPAWN_MAX` to a positive value to limit
|
||||
restart attempts.
|
||||
|
||||
## Package Commands
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=rclone-openrc mise run apk:checksum
|
||||
ALPINE_PACKAGE=rclone-openrc mise run apk:build
|
||||
ALPINE_PACKAGE=rclone-openrc SKIP_BUILD=1 mise run apk:test-install
|
||||
ALPINE_PACKAGE=rclone-openrc mise run apk:runtime-test
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S rclone 2>/dev/null
|
||||
adduser -S -D -H -h /var/lib/rclone -s /sbin/nologin \
|
||||
-G rclone -g rclone rclone 2>/dev/null
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,23 @@
|
||||
# Defaults for rclone OpenRC instances.
|
||||
#
|
||||
# To create an instance, copy this file to /etc/conf.d/rclone.<name> and create
|
||||
# /etc/init.d/rclone.<name> as a symlink to /etc/init.d/rclone. For example:
|
||||
#
|
||||
# cp /etc/conf.d/rclone /etc/conf.d/rclone.sftp
|
||||
# ln -s rclone /etc/init.d/rclone.sftp
|
||||
#
|
||||
# Each instance must set RCLONE_COMMAND. RCLONE_REMOTE is optional because
|
||||
# commands such as "rcd" do not use a remote.
|
||||
RCLONE_COMMAND=""
|
||||
RCLONE_REMOTE=""
|
||||
RCLONE_ARGS=""
|
||||
|
||||
RCLONE_CONFIG="/etc/rclone/rclone.conf"
|
||||
RCLONE_CACHE_DIR="/var/lib/rclone/cache"
|
||||
RCLONE_USER="rclone"
|
||||
RCLONE_GROUP="rclone"
|
||||
|
||||
# Restart a long-running rclone command after an unexpected exit. Set
|
||||
# RCLONE_RESPAWN_MAX to a positive number to limit restart attempts.
|
||||
RCLONE_RESPAWN_DELAY="5"
|
||||
RCLONE_RESPAWN_MAX="0"
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
instance_name="${RC_SVCNAME#rclone.}"
|
||||
description="rclone ${instance_name} service"
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
command="/usr/bin/rclone"
|
||||
command_user="${RCLONE_USER:-rclone}:${RCLONE_GROUP:-rclone}"
|
||||
pidfile="/run/rclone/${RC_SVCNAME}.pid"
|
||||
respawn_delay="${RCLONE_RESPAWN_DELAY:-5}"
|
||||
respawn_max="${RCLONE_RESPAWN_MAX:-0}"
|
||||
supervise_daemon_args="--chdir /var/lib/rclone --pidfile ${pidfile}"
|
||||
command_args="${RCLONE_COMMAND:-} ${RCLONE_REMOTE:-} --config ${RCLONE_CONFIG:-/etc/rclone/rclone.conf} --cache-dir ${RCLONE_CACHE_DIR:-/var/lib/rclone/cache} ${RCLONE_ARGS:-}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns logger
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
local service_owner="${RCLONE_USER:-rclone}:${RCLONE_GROUP:-rclone}"
|
||||
|
||||
if [ -z "${RCLONE_COMMAND:-}" ]; then
|
||||
eerror "RCLONE_COMMAND is required; configure /etc/conf.d/${RC_SVCNAME}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
checkpath -d -m 0750 -o "$service_owner" \
|
||||
/run/rclone \
|
||||
"${RCLONE_CACHE_DIR:-/var/lib/rclone/cache}"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apk add rclone-openrc
|
||||
|
||||
test -x /usr/bin/rclone
|
||||
test -f /etc/conf.d/rclone
|
||||
test -f /etc/init.d/rclone
|
||||
test "$(stat -c '%U:%G %a' /etc/rclone)" = "root:rclone 750"
|
||||
test "$(stat -c '%U:%G %a' /var/lib/rclone/cache)" = "rclone:rclone 750"
|
||||
|
||||
cp /etc/conf.d/rclone /etc/conf.d/rclone.rcd
|
||||
ln -s rclone /etc/init.d/rclone.rcd
|
||||
sed -i 's|^RCLONE_COMMAND=""|RCLONE_COMMAND="rcd"|' /etc/conf.d/rclone.rcd
|
||||
sed -i 's|^RCLONE_ARGS=""|RCLONE_ARGS="--rc-addr 127.0.0.1:5572 --rc-no-auth"|' /etc/conf.d/rclone.rcd
|
||||
|
||||
rc-update add rclone.rcd default || true
|
||||
rc-service rclone.rcd start
|
||||
rc-service rclone.rcd status
|
||||
rc-service rclone.rcd stop
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/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:-rclone-openrc}" "${PACKAGE_VERSION:-}" <<'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}"
|
||||
|
||||
test -x /usr/bin/rclone
|
||||
test -f /etc/conf.d/rclone
|
||||
test -f /etc/init.d/rclone
|
||||
test -d /etc/rclone
|
||||
test "$(stat -c '%U:%G %a' /etc/rclone)" = "root:rclone 750"
|
||||
test "$(stat -c '%U:%G %a' /var/lib/rclone/cache)" = "rclone:rclone 750"
|
||||
|
||||
cp /etc/conf.d/rclone /etc/conf.d/rclone.sftp
|
||||
ln -s rclone /etc/init.d/rclone.sftp
|
||||
rc-update add rclone.sftp default
|
||||
test -L /etc/runlevels/default/rclone.sftp
|
||||
SCRIPT
|
||||
@@ -1,13 +1,13 @@
|
||||
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
|
||||
pkgname=seaweedfs
|
||||
pkgver=4.45
|
||||
pkgrel=0
|
||||
pkgver=4.48
|
||||
pkgrel=3
|
||||
pkgdesc="Distributed storage system for object storage, file systems, and Iceberg tables"
|
||||
url="https://github.com/seaweedfs/seaweedfs"
|
||||
arch="x86_64 aarch64"
|
||||
license="Apache-2.0"
|
||||
depends="ca-certificates /bin/sh"
|
||||
makedepends="build-base cargo rust protobuf-dev"
|
||||
makedepends="build-base cargo go protobuf-dev rust"
|
||||
provides="!$pkgname-openrc cmd:weed=$pkgver-r$pkgrel"
|
||||
install="$pkgname.pre-install"
|
||||
subpackages="
|
||||
@@ -15,6 +15,7 @@ subpackages="
|
||||
$pkgname-bash-completion:_bashcomp:noarch
|
||||
$pkgname-doc
|
||||
$pkgname-filer-openrc:_openrc_filer:noarch
|
||||
$pkgname-logrotate:_logrotate:noarch
|
||||
$pkgname-master-openrc:_openrc_master:noarch
|
||||
$pkgname-s3-openrc:_openrc_s3:noarch
|
||||
$pkgname-sftp-openrc:_openrc_sftp:noarch
|
||||
@@ -24,40 +25,28 @@ subpackages="
|
||||
$pkgname-worker-lance:_worker_lance
|
||||
$pkgname-worker-lance-openrc:_openrc_worker_lance:noarch
|
||||
"
|
||||
options="!check !strip !tracedeps"
|
||||
|
||||
case "$CARCH" in
|
||||
x86_64)
|
||||
_archive="$pkgname-$pkgver-linux-amd64.tar.gz"
|
||||
;;
|
||||
aarch64)
|
||||
_archive="$pkgname-$pkgver-linux-arm64.tar.gz"
|
||||
;;
|
||||
esac
|
||||
options="!strip !tracedeps net"
|
||||
|
||||
source="
|
||||
$pkgname-$pkgver-linux-amd64.tar.gz::https://github.com/seaweedfs/seaweedfs/releases/download/$pkgver/linux_amd64.tar.gz
|
||||
$pkgname-$pkgver-linux-arm64.tar.gz::https://github.com/seaweedfs/seaweedfs/releases/download/$pkgver/linux_arm64.tar.gz
|
||||
$pkgname-$pkgver-src.tar.gz::https://github.com/seaweedfs/seaweedfs/archive/refs/tags/$pkgver.tar.gz
|
||||
admin.toml
|
||||
example-admin.toml
|
||||
credential.toml
|
||||
example-admin.toml
|
||||
example-credential.toml
|
||||
example-filer.toml
|
||||
example-master.toml
|
||||
example-volume.toml
|
||||
example-notification.toml
|
||||
example-replication.toml
|
||||
example-security.toml
|
||||
example-shell.toml
|
||||
filer.toml
|
||||
master.toml
|
||||
notification.toml
|
||||
replication.toml
|
||||
security.toml
|
||||
shell.toml
|
||||
seaweedfs.admin.confd
|
||||
seaweedfs.filer.confd
|
||||
seaweedfs.initd
|
||||
seaweedfs.logrotate
|
||||
seaweedfs.master.confd
|
||||
seaweedfs.s3.confd
|
||||
seaweedfs.sftp.confd
|
||||
@@ -68,28 +57,36 @@ source="
|
||||
weed.bash-completion
|
||||
"
|
||||
|
||||
builddir="$srcdir"
|
||||
_worker_builddir="$builddir/$pkgname-$pkgver/seaweed-worker"
|
||||
_worker_builddir="$srcdir/$pkgname-$pkgver/seaweed-worker"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
tar -xzf "$srcdir/$_archive" -C "$builddir"
|
||||
tar -xzf "$srcdir/$pkgname-$pkgver-src.tar.gz" -C "$builddir"
|
||||
}
|
||||
|
||||
build() {
|
||||
go build -mod=readonly -buildvcs=false -trimpath \
|
||||
-tags "sqlite rclone gocdk" -o "$builddir/weed-bin" ./weed
|
||||
|
||||
cd "$_worker_builddir"
|
||||
cargo build --locked --release -p weed-lance-worker
|
||||
}
|
||||
|
||||
check() {
|
||||
"$builddir/weed-bin" version
|
||||
"$builddir/weed-bin" scaffold -config master >/dev/null
|
||||
"${CARGO_TARGET_DIR:-$_worker_builddir/target}/release/weed-worker" --help >/dev/null
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 "$srcdir"/weed "$pkgdir"/usr/bin/weed
|
||||
install -Dm755 "$builddir"/weed-bin "$pkgdir"/usr/bin/weed
|
||||
install -Dm755 "${CARGO_TARGET_DIR:-$_worker_builddir/target}/release/weed-worker" \
|
||||
"$pkgdir"/usr/bin/weed-worker
|
||||
local _config
|
||||
for _config in admin credential filer master notification replication security shell; do
|
||||
for _config in admin credential filer master security; do
|
||||
install -Dm644 "$srcdir"/$_config.toml \
|
||||
"$pkgdir"/etc/seaweedfs/$_config.toml
|
||||
done
|
||||
for _config in admin credential filer master volume notification replication security shell; do
|
||||
install -Dm644 "$srcdir"/example-$_config.toml \
|
||||
"$pkgdir"/usr/share/doc/$pkgname/examples/$_config.toml
|
||||
done
|
||||
@@ -115,6 +112,14 @@ _openrc_volume() { _openrc_service volume; }
|
||||
_openrc_webdav() { _openrc_service webdav; }
|
||||
_openrc_worker() { _openrc_service worker; }
|
||||
|
||||
_logrotate() {
|
||||
pkgdesc="Log rotation configuration for $pkgname"
|
||||
depends="$pkgname=$pkgver-r$pkgrel logrotate"
|
||||
|
||||
install -Dm644 "$srcdir"/seaweedfs.logrotate \
|
||||
"$subpkgdir"/etc/logrotate.d/$pkgname
|
||||
}
|
||||
|
||||
_worker_lance() {
|
||||
pkgdesc="SeaweedFS Lance table maintenance worker"
|
||||
depends="$pkgname=$pkgver-r$pkgrel libgcc"
|
||||
@@ -137,34 +142,31 @@ _bashcomp() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7307107cc6c48b37ae019bdde4a2d62408b6577d9276f3b8c94764a716aa3dea919165a7bece94c84f834bd55e0cd2861dfeeeb00c57fd37d8964e9baef29ec0 seaweedfs-4.45-linux-amd64.tar.gz
|
||||
2580ccc65fc8704d4534af40475f88dc8e69e807e035d366780ba1dba7df835c591f07ba6414323c79e8ac63565da1533b92724f88eb62096ce15b1a5447a8d9 seaweedfs-4.45-linux-arm64.tar.gz
|
||||
0ec16ea593cf154caf04b53bd81ce9a24276ecc1f6c09f0f91d82ee1218b1c12c4e8ebc79aea5ca166b988e6f8dcaffdb87ef3ff8816a99f14719c054c7fc144 seaweedfs-4.45-src.tar.gz
|
||||
4f24760848c909fdee1ae8569ef7ef7cbec2c885d891a543d7beddee492bddbf266e6789601095a86798d1b00256782c45297ea36cdb527bb6b64980dd02486a admin.toml
|
||||
91a34fec9bb78832f421b54dd823adb1c1690b746083d947c5f72e4ad7670362512bbb920432f42342482774fd8be2b396645ff3bc764b10f328432601733fe3 seaweedfs-4.48-src.tar.gz
|
||||
58be6587b082f45b4dd22ad8ebb1b8bf84cea2a7c0cb6b4ad4a749ac0bfdf92d10d22281a432f9e5a87afa0b940cd0172671a292fbe17803e56425cd940d47f9 admin.toml
|
||||
7f77ad8787629e3defbc89e39e5432482aa50d87ddd723de927a9c6c77b14b1673cbf5b3fc3c18dd7d0eba26fbcd4220d2da6939ed097d0294b24ccd5c002635 credential.toml
|
||||
507b389f6373b5f4d8ca69f27bc806b39bda8edf7f58e4f32720958e7782ee171dd0461bdecb285e5a8bf2cf4ea3d6cbe8b62ae6ac43c2a40d0eb053d50a22f8 example-admin.toml
|
||||
b6ce09d6d83dd70e2797a185171eea3587436fb024a99b4998f714b713244d6f768ef59f67c9b7251650d4f19d414eea231eab92099763d85cd92e41cb2bdc3f credential.toml
|
||||
7105de7053654b8c0502521ce58585915fc831c3152801e1db02b1c5214dc3c3ed31f4fc18000665d8338c7a10ffbf0d248368bef2ef3a6d37d46cd856398366 example-credential.toml
|
||||
fe9b11f24bc10297e8a4c411ff28868aafb153d5bb98711bab0c6c0b59aa267c42057a81adbf46809a87004004dfdc403744cf1bb8bebcf0b7030dcb11ba238a example-filer.toml
|
||||
e5753bd0bcc60dc84428c40ba556c08acae61dec083a5b76640125f637532e7c5759a72cdfd95114222a7a0901a916ec3c4d12f306853cfca0fe9a0b1857893e example-master.toml
|
||||
c6ec4fc7709c42dc6771b5039203c44cbd693742abcd7720936c00b1bd5f99bb2999bb1545680ae4418efedd65d71c234f4602f52ce9d58b1ff7ec53eafb1a1a example-filer.toml
|
||||
59965fd2649a956677c6d4104ff07ff010d6edd1d3733eaa5c5bc01eabe54429c413e35d52ed4a4c0129bfa798e434828b32a5f0ef19dbbe4eab0199faa2738c example-master.toml
|
||||
aea1b3114311304230cb30143825329ef7353a302d094c131ca4e049b847305e2143b76078e6574c6d7d4039c03a2e2d5a4925de80cd7cb2be75b2b522ce47f7 example-volume.toml
|
||||
2c200c28172a5d0b1c80ab28e849287e7af8d103355638fd3183b8614d3e2b1b3482132522663f7c6d844e10e13b8c6e23fb5fba0dec2cc83de45c2f17b33477 example-notification.toml
|
||||
328cfe43d0c2ebf5092a1178af45c37b07593085135c31649754f0df9fd4c043847c13b56c3c7c45194541db8082309c4845c825d7011e4c3e503b1e6576528d example-replication.toml
|
||||
3b45b0f5bf6c5339cfb63c3ddb489b7122e03996ce380c7a244778ef1e7f6c06b4e3e56ea695a2dc3c9c49322a58df865ff50b2904318abafee5e66b2af757f1 example-security.toml
|
||||
b7caad9dff0bb812d4046b8e0285ac4e88a7af3a742a168579df08762da735a025725f78286e17bdd4b19a966a3d7ab88e0e52efbb5cf1c69d7a4ff071390e0f example-security.toml
|
||||
70069f97edf261a2cd0669dd60adad80533609a25d7429254e0c3322d7e80337f5ff69a5581bc39e6a15442098d14d610ce5f0cb14f02c461c8d3dd440b22c56 example-shell.toml
|
||||
be5771a5e1bf626c53f9dffbfa2a400d9b8f9626d55a7b61dcd853753561989427ba872a2638a5e6343f44dea6790678483bd29101d6495dbbfcd3029947b9a7 filer.toml
|
||||
2cd6c73a5e23e0395b6f099dcc3acf9280cbb3e13f54408571e91741c4e6b0dad85f6d4e5a92f23ad541bad57ce295c28bb8450fe11da35acbd4da25848f61e5 master.toml
|
||||
0a1b3d0fd1671744f96e7642fb9aee9b80debd0d9a82f586beb36fe32f9ad440332acd2a8b0ee0b210b912cb281d88ca56fd15e3a2ece61be9dcf96afc00a6f8 notification.toml
|
||||
5a607ce6cdd11ffbe528b9a85e0012b48accefa6ccfeda9d6aa70d92ccf7f219e75c93cd2f1c36f3eb16204b3652a45dcd52ffcb64bceef91d081702b19cef3c replication.toml
|
||||
d21981923b5964cf8365185a4f7c28a14e33ba6f60ad63e797e315544a6c22efdaa72814292824c07ef14554738769e0fd4c670fe797cf77b0226b2595a8b43b security.toml
|
||||
7a91ce9da79b92e5ef42d4915f56a010bceaaa6c96dcef1f7b1821ee208d381aaa88b9cf495248276132e66d3215927f589b7fabc4eae2c2cb195645f904fac7 shell.toml
|
||||
130b9932f99d0a3ec3c30c74eaf1dc441c1a9252da30e2c5365084f2a0679f58531e6180689c24b71f92cf9a7966b02ea25ee31d356e7118cbb82743d0bfcbd9 filer.toml
|
||||
088c3aebc142054af1b54a92a2c5bd30d53be61bdf382f7cae2efef2d917d7b57022d9b494a60f32c7bf56689d4ce2f971e19c98da1d87e27021a3e948035605 master.toml
|
||||
79a078133c259473e601488cd1d8032b74c5fa32da6f34a4ed46efa9736bf5369365a77d775e3d78512b1060cd87012eb40226829eecb30544e1542d165af7d6 security.toml
|
||||
82e2793bf483ffb5b0c8fbe38e6c9df75afe01f824f8414cafd91e4bed5c79c13dae1ca659070401d4968d16ed4b26455b0c6208f777705527bceb2e5f286988 seaweedfs.admin.confd
|
||||
5ad952c37c62a770327bd70f7349fa677406606f0b9bf03fdc8f6c6804701f1e77710ab20d6153f9e0cfb549ec161d68a3316abab9c59837bbe3f91ee99e5ce0 seaweedfs.filer.confd
|
||||
8a25e70ea874d58bf5450c91a54b8016d26b0dac61be7634cfbfc196bc2a21ae539911485ba9f72e515b42684c13e25f86cbd4c1427c29dc751c031613b40d32 seaweedfs.initd
|
||||
19cbd65d701b0995e088f265d88f481f14e214ecbd8a783f7e7b17e811e421a28425f96d073757cc07fbb17e8eb084d14d41f46baee82ee13e043ce0c0c5bde9 seaweedfs.initd
|
||||
816e763164c2cec66509c213ed56cb633f13d1daf48a511d1a9cfdf692a6ad945cf599cb0e706202b8fd522022ce512eae6170422e478abdf95334b0088ac4cc seaweedfs.logrotate
|
||||
57ba77519bb266f0117eaadae3af5ae6bc99bb653668ff526202f327df1c8d93973c0e19dae0c53a19e06389868043c04e53f16f01c851b77fe1387e92cc993b seaweedfs.master.confd
|
||||
22a3ea6c83266a979ea7c848fc74b40fc0f2ade960b273fa11e63d4a72a1328bd688c9918be3e9234cfb19f889fd9c931388bb5c2863cea3500e534b8bd90282 seaweedfs.s3.confd
|
||||
3e9c41bc61cdd9a4c53ece64d847eca26ab7d0ce0cc98e72462c3dbb225a40de10a02201362801015a9c629d77d5c0d54c7228e9d20111fb6f478b2267d2db98 seaweedfs.sftp.confd
|
||||
262cc5132a70a43f9f154d24da16fe2f34f736c0bfdafd56cd341b7f34b48b82aa3a38a93d64206360c391e1167e2b665a3ade5c7eddfe4b322253521629f4e0 seaweedfs.volume.confd
|
||||
84a9caa8f5203a31f2f96ef812dca8e4f7597f8f06ed3f55db38daff167448b0332564a421dcb356405d761c7a9e815656208d431e84b8106951554ab7ef2142 seaweedfs.webdav.confd
|
||||
b586dfbdbcf17591366a7a62c4da6f2b13e1bd5dfb5b066beea114d01057eeb3d81172814655d812c48e02336277b3d70fa9f9550923cfe616e9dd8162661f51 seaweedfs.worker.confd
|
||||
72508778ad85fc9722c4d4e9d862434b0714e0e37315550ae05210090131fc3ad857635ff248cc978199b3612ea3c085b4f34904ec00bb7ceca6258ba0dc26c9 seaweedfs.worker-lance.confd
|
||||
0a06a1ea007a6e4e0110a6208830f080685b81f6e1aae8453a75941ef54e4506155e4c7be125b2eed0b971050d0743118cf1454b6e9d01cf8eec02005125b6b2 seaweedfs.worker-lance.confd
|
||||
2815330810545d17cffd993d93502c934c24af5aeff8f7096bcf0f020f895f1da50b74c356c028b67de552cbd8e4ccfa176636da2642feae99542035e4272171 weed.bash-completion
|
||||
"
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
# SeaweedFS Alpine Package
|
||||
|
||||
Repackages official SeaweedFS 4.39 Linux release tarballs for `x86_64` and
|
||||
`aarch64`.
|
||||
Builds SeaweedFS 4.48 from its upstream source release for `x86_64` and
|
||||
`aarch64`. The package intentionally builds the upstream baseline feature set,
|
||||
with the `sqlite`, `rclone`, and `gocdk` optional Go build tags enabled. Go and
|
||||
Cargo dependencies are resolved from the versions pinned in the upstream
|
||||
`go.sum` and `Cargo.lock` files.
|
||||
|
||||
## Package Commands
|
||||
|
||||
Refresh generated sources:
|
||||
When updating SeaweedFS, generate the config scaffolds and refresh checksums:
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=seaweedfs mise run apk:update-generated
|
||||
ALPINE_PACKAGE=seaweedfs mise run apk:checksum
|
||||
```
|
||||
|
||||
The refresh command generates every SeaweedFS scaffold configuration:
|
||||
`admin`, `credential`, `filer`, `master`, `volume`, `notification`,
|
||||
`replication`, `security`, and `shell`.
|
||||
|
||||
Build:
|
||||
|
||||
```sh
|
||||
@@ -75,13 +82,16 @@ Runtime paths:
|
||||
/etc/init.d/seaweedfs.*
|
||||
```
|
||||
|
||||
Edit `/etc/conf.d/seaweedfs.<role>` for flags and `/etc/seaweedfs/*.toml` for
|
||||
SeaweedFS config. Upstream examples:
|
||||
Edit `/etc/conf.d/seaweedfs.<role>` for flags. The package supplies a small set
|
||||
of safe defaults in `/etc/seaweedfs/`; the complete upstream-generated scaffold
|
||||
configs are available at:
|
||||
|
||||
```text
|
||||
/usr/share/doc/seaweedfs/examples/
|
||||
```
|
||||
|
||||
Copy and customize a scaffold file only when enabling its related feature.
|
||||
|
||||
Enable services:
|
||||
|
||||
```sh
|
||||
@@ -121,6 +131,15 @@ Bash completion:
|
||||
apk add bash-completion seaweedfs-bash-completion
|
||||
```
|
||||
|
||||
Log rotation for the default OpenRC service logs:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs-logrotate
|
||||
```
|
||||
|
||||
This rotates `/var/log/seaweedfs/seaweedfs.*.log` daily and retains 14
|
||||
compressed archives.
|
||||
|
||||
## Upgrade Or Pin
|
||||
|
||||
Upgrade:
|
||||
@@ -133,5 +152,5 @@ rc-service seaweedfs.master restart
|
||||
Pin:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs=4.39-r0
|
||||
apk add seaweedfs=4.47-r3
|
||||
```
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
# Configuration for `weed admin`.
|
||||
#
|
||||
# This package disables automatic maintenance by default. Enable individual
|
||||
# maintenance services deliberately after reviewing the cluster's storage and
|
||||
# replication policy. The setting is persisted in the admin data directory.
|
||||
|
||||
# Disable automatic maintenance until the cluster's storage and replication
|
||||
# policy has been reviewed. This setting is persisted in the admin data directory.
|
||||
[maintenance]
|
||||
enabled = false
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
# Use the existing filer store for credentials by default.
|
||||
[credential.filer_etc]
|
||||
enabled = true
|
||||
|
||||
[credential.postgres]
|
||||
enabled = false
|
||||
hostname = "localhost"
|
||||
port = 5432
|
||||
username = "seaweedfs"
|
||||
password = ""
|
||||
database = "seaweedfs"
|
||||
schema = "public"
|
||||
sslmode = "disable"
|
||||
table_prefix = "sw_"
|
||||
connection_max_idle = 10
|
||||
connection_max_open = 100
|
||||
connection_max_lifetime_seconds = 3600
|
||||
|
||||
[credential.memory]
|
||||
enabled = false
|
||||
|
||||
@@ -68,7 +68,7 @@ port = 3306
|
||||
username = "root"
|
||||
password = ""
|
||||
database = "" # create or use an existing database
|
||||
connection_max_idle = 10
|
||||
connection_max_idle = 50
|
||||
connection_max_open = 50
|
||||
connection_max_lifetime_seconds = 300
|
||||
interpolateParams = false
|
||||
@@ -97,7 +97,7 @@ port = 3306
|
||||
username = "root"
|
||||
password = ""
|
||||
database = "" # create or use an existing database
|
||||
connection_max_idle = 10
|
||||
connection_max_idle = 50
|
||||
connection_max_open = 50
|
||||
connection_max_lifetime_seconds = 300
|
||||
interpolateParams = false
|
||||
@@ -106,13 +106,9 @@ enableUpsert = true
|
||||
upsertQuery = """INSERT INTO `%s` (`dirhash`,`name`,`directory`,`meta`) VALUES (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
|
||||
|
||||
[postgres] # or cockroachdb, YugabyteDB
|
||||
# CREATE TABLE IF NOT EXISTS filemeta (
|
||||
# dirhash BIGINT,
|
||||
# name VARCHAR(65535),
|
||||
# directory VARCHAR(65535),
|
||||
# meta bytea,
|
||||
# PRIMARY KEY (dirhash, name)
|
||||
# );
|
||||
# createTable = true # auto-create filemeta with the default schema
|
||||
# createTable = false # skip table creation (default; for restricted DB roles)
|
||||
# createTable = """CREATE TABLE IF NOT EXISTS "%s" (...)""" # custom template
|
||||
enabled = false
|
||||
hostname = "localhost"
|
||||
port = 5432
|
||||
@@ -127,7 +123,7 @@ sslmode = "disable"
|
||||
# sslkey = "/path/to/client.key" # client private key file
|
||||
# sslrootcert = "/path/to/ca.crt" # CA certificate file
|
||||
# sslcrl = "/path/to/client.crl" # Certificate Revocation List (CRL) (optional)
|
||||
connection_max_idle = 10
|
||||
connection_max_idle = 50
|
||||
connection_max_open = 50
|
||||
connection_max_lifetime_seconds = 300
|
||||
# Set to true when using PgBouncer connection pooler
|
||||
@@ -166,7 +162,7 @@ sslmode = "disable"
|
||||
# sslkey = "/path/to/client.key" # client private key file
|
||||
# sslrootcert = "/path/to/ca.crt" # CA certificate file
|
||||
# sslcrl = "/path/to/client.crl" # Certificate Revocation List (CRL) (optional)
|
||||
connection_max_idle = 10
|
||||
connection_max_idle = 50
|
||||
connection_max_open = 50
|
||||
connection_max_lifetime_seconds = 300
|
||||
# Set to true when using PgBouncer connection pooler
|
||||
|
||||
@@ -52,6 +52,7 @@ copy_2 = 6 # create 2 x 6 = 12 actual volumes
|
||||
copy_3 = 3 # create 3 x 3 = 9 actual volumes
|
||||
copy_other = 1 # create n x 1 = n actual volumes
|
||||
threshold = 0.9 # create threshold
|
||||
reservation_timeout = "5m"# capacity reservation timeout before unreleased reservations expire
|
||||
disable = false # disables volume growth if true
|
||||
|
||||
# configuration flags for replication
|
||||
|
||||
@@ -232,6 +232,15 @@ kek = ""
|
||||
# Cannot be used while /etc/s3/sse_kek exists on the filer — delete it first.
|
||||
key = ""
|
||||
|
||||
# Trusted reverse proxies allowed to set X-Forwarded-For / X-Real-Ip for
|
||||
# aws:SourceIp condition evaluation in S3 bucket and IAM policies. When the
|
||||
# direct TCP peer is in this list, forwarded headers are honored; otherwise
|
||||
# the direct peer address is used (matching AWS S3 semantics). Leave empty to
|
||||
# always use the direct peer, which is the safe default.
|
||||
# Can also be set via env var: WEED_S3_TRUSTED_PROXIES_WHITE_LIST
|
||||
[s3.trusted_proxies]
|
||||
white_list = "" # comma separated; bare IPs or CIDRs, e.g. "10.10.10.0/24"
|
||||
|
||||
# white list. It's checking request ip address.
|
||||
[guard]
|
||||
white_list = ""
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Put this file to one of the location, with descending priority
|
||||
# ./volume.toml
|
||||
# $HOME/.seaweedfs/volume.toml
|
||||
# /etc/seaweedfs/volume.toml
|
||||
# this file is read by volume servers
|
||||
|
||||
[volume.disk.io]
|
||||
# Disk IO probing is disabled by default. When enabled, a volume server can
|
||||
# stop advertising a disk after sustained IO errors or latency degradation.
|
||||
probe = false
|
||||
timeout = "2s"
|
||||
interval = "60s"
|
||||
window = "1m"
|
||||
min.samples = 10
|
||||
max.stat.failures = 5
|
||||
recovery.coef = 0.5
|
||||
|
||||
[volume.disk.io.slow]
|
||||
percent = 20
|
||||
|
||||
[volume.disk.io.error]
|
||||
percent = 10
|
||||
|
||||
# slow threshold per disk type, matched against each -dir's -disk tag.
|
||||
# a disk whose type is not listed here uses the hdd threshold.
|
||||
[volume.disk.io.slow.latency]
|
||||
hdd = "500ms"
|
||||
ssd = "100ms"
|
||||
nvme = "50ms"
|
||||
|
||||
@@ -1,46 +1,4 @@
|
||||
[filer.options]
|
||||
recursive_delete = false
|
||||
|
||||
# Store standalone filer metadata in the package-managed data directory.
|
||||
[leveldb2]
|
||||
enabled = true
|
||||
dir = "/var/lib/seaweedfs/filer/meta"
|
||||
|
||||
[sqlite]
|
||||
enabled = false
|
||||
dbFile = "/var/lib/seaweedfs/filer/filer.db"
|
||||
|
||||
[mysql]
|
||||
enabled = false
|
||||
dsn = "root@tcp(localhost:3306)/seaweedfs?collation=utf8mb4_bin"
|
||||
enable_tls = false
|
||||
hostname = "localhost"
|
||||
port = 3306
|
||||
username = "root"
|
||||
password = ""
|
||||
database = ""
|
||||
connection_max_idle = 10
|
||||
connection_max_open = 50
|
||||
connection_max_lifetime_seconds = 300
|
||||
interpolateParams = false
|
||||
enableUpsert = true
|
||||
|
||||
[postgres]
|
||||
enabled = false
|
||||
hostname = "localhost"
|
||||
port = 5432
|
||||
username = "postgres"
|
||||
password = ""
|
||||
database = "postgres"
|
||||
schema = ""
|
||||
sslmode = "disable"
|
||||
connection_max_idle = 10
|
||||
connection_max_open = 50
|
||||
connection_max_lifetime_seconds = 300
|
||||
pgbouncer_compatible = false
|
||||
enableUpsert = true
|
||||
|
||||
[redis2]
|
||||
enabled = false
|
||||
address = "localhost:6379"
|
||||
password = ""
|
||||
database = 0
|
||||
|
||||
@@ -1,27 +1,3 @@
|
||||
# Disable scheduled maintenance until it is explicitly configured.
|
||||
[master.maintenance]
|
||||
scripts = ""
|
||||
sleep_minutes = 17
|
||||
|
||||
[master.sequencer]
|
||||
type = "raft"
|
||||
sequencer_snowflake_id = 0
|
||||
|
||||
[storage.backend.s3.default]
|
||||
enabled = false
|
||||
aws_access_key_id = ""
|
||||
aws_secret_access_key = ""
|
||||
region = "us-east-2"
|
||||
bucket = ""
|
||||
endpoint = ""
|
||||
storage_class = "STANDARD_IA"
|
||||
|
||||
[master.volume_growth]
|
||||
copy_1 = 7
|
||||
copy_2 = 6
|
||||
copy_3 = 3
|
||||
copy_other = 1
|
||||
threshold = 0.9
|
||||
disable = false
|
||||
|
||||
[master.replication]
|
||||
treat_replication_as_minimums = false
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
[notification.log]
|
||||
enabled = false
|
||||
|
||||
[notification.kafka]
|
||||
enabled = false
|
||||
hosts = ["localhost:9092"]
|
||||
topic = "seaweedfs_filer"
|
||||
offsetFile = "/var/lib/seaweedfs/filer/last.offset"
|
||||
offsetSaveIntervalSeconds = 10
|
||||
sasl_enabled = false
|
||||
sasl_mechanism = "PLAIN"
|
||||
sasl_username = ""
|
||||
sasl_password = ""
|
||||
tls_enabled = false
|
||||
tls_ca_cert = ""
|
||||
tls_client_cert = ""
|
||||
tls_client_key = ""
|
||||
tls_insecure_skip_verify = false
|
||||
|
||||
[notification.aws_sqs]
|
||||
enabled = false
|
||||
aws_access_key_id = ""
|
||||
aws_secret_access_key = ""
|
||||
region = "us-east-2"
|
||||
sqs_queue_name = ""
|
||||
|
||||
[notification.google_pub_sub]
|
||||
enabled = false
|
||||
google_application_credentials = ""
|
||||
project_id = ""
|
||||
topic = ""
|
||||
|
||||
[notification.webhook]
|
||||
enabled = false
|
||||
endpoint = ""
|
||||
bearer_token = ""
|
||||
timeout_seconds = 10
|
||||
max_retries = 3
|
||||
backoff_seconds = 3
|
||||
max_backoff_seconds = 30
|
||||
workers = 5
|
||||
buffer_size = 10000
|
||||
@@ -1,29 +0,0 @@
|
||||
[source.filer]
|
||||
enabled = false
|
||||
grpcAddress = "localhost:18888"
|
||||
directory = "/buckets"
|
||||
excludeDirectories = "/buckets/tmp"
|
||||
|
||||
[sink.local]
|
||||
enabled = false
|
||||
directory = "/var/lib/seaweedfs/backup"
|
||||
is_incremental = false
|
||||
|
||||
[sink.filer]
|
||||
enabled = false
|
||||
grpcAddress = "localhost:18888"
|
||||
directory = "/backup"
|
||||
replication = ""
|
||||
collection = ""
|
||||
ttlSec = 0
|
||||
is_incremental = false
|
||||
|
||||
[sink.s3]
|
||||
enabled = false
|
||||
aws_access_key_id = ""
|
||||
aws_secret_access_key = ""
|
||||
region = "us-east-2"
|
||||
bucket = ""
|
||||
directory = "/"
|
||||
endpoint = ""
|
||||
is_incremental = false
|
||||
@@ -25,6 +25,7 @@ test -x /usr/bin/weed-worker
|
||||
/usr/bin/weed-worker --help >/dev/null
|
||||
test -d /usr/share/doc/seaweedfs/examples
|
||||
test -f /usr/share/doc/seaweedfs/examples/master.toml
|
||||
test -f /usr/share/doc/seaweedfs/examples/volume.toml
|
||||
test -f /usr/share/bash-completion/completions/weed
|
||||
|
||||
weed version
|
||||
@@ -40,3 +41,8 @@ rc-service seaweedfs.filer start
|
||||
rc-service seaweedfs.master status
|
||||
rc-service seaweedfs.volume status
|
||||
rc-service seaweedfs.filer status
|
||||
|
||||
# SeaweedFS needs more than OpenRC's default stop timeout to finish its
|
||||
# graceful volume-server shutdown. Keep the restart path covered.
|
||||
rc-service seaweedfs.volume restart
|
||||
rc-service seaweedfs.volume status
|
||||
|
||||
@@ -16,6 +16,7 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-seaweedfs}" "${PACKAGE_VERS
|
||||
seaweedfs-master-openrc \
|
||||
seaweedfs-volume-openrc \
|
||||
seaweedfs-filer-openrc \
|
||||
seaweedfs-logrotate \
|
||||
seaweedfs-worker-lance-openrc
|
||||
|
||||
test -x /usr/bin/weed
|
||||
@@ -30,6 +31,9 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-seaweedfs}" "${PACKAGE_VERS
|
||||
test -f /etc/init.d/seaweedfs.volume
|
||||
test -f /etc/init.d/seaweedfs.filer
|
||||
test -f /etc/init.d/seaweedfs.worker-lance
|
||||
test -f /etc/logrotate.d/seaweedfs
|
||||
apk info -e logrotate
|
||||
logrotate -d /etc/logrotate.conf
|
||||
test -x /usr/bin/weed-worker
|
||||
/usr/bin/weed-worker --help >/dev/null
|
||||
|
||||
@@ -46,5 +50,6 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-seaweedfs}" "${PACKAGE_VERS
|
||||
apk info -e seaweedfs-bash-completion
|
||||
test -d /usr/share/doc/seaweedfs/examples
|
||||
test -f /usr/share/doc/seaweedfs/examples/master.toml
|
||||
test -f /usr/share/doc/seaweedfs/examples/volume.toml
|
||||
test -f /usr/share/bash-completion/completions/weed
|
||||
SCRIPT
|
||||
|
||||
@@ -2,34 +2,31 @@
|
||||
set -euo pipefail
|
||||
|
||||
package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
configs=(admin credential filer master notification replication security shell)
|
||||
configs=(admin credential filer master volume notification replication security shell)
|
||||
pkgver="$(
|
||||
awk -F= '$1 == "pkgver" { print $2; exit }' "${package_dir}/APKBUILD"
|
||||
)"
|
||||
tmpdir="$(mktemp -d)"
|
||||
repo_root="${REPO_ROOT:-$(cd "${package_dir}/../../../.." && pwd)}"
|
||||
source_archive="${repo_root}/.cache/apk-distfiles/seaweedfs-${pkgver}-src.tar.gz"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "${tmpdir}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
case "$(uname -m)" in
|
||||
x86_64)
|
||||
archive="linux_amd64.tar.gz"
|
||||
;;
|
||||
aarch64|arm64)
|
||||
archive="linux_arm64.tar.gz"
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported host architecture for SeaweedFS generated sources: %s\n' "$(uname -m)" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -fsSL \
|
||||
-o "${tmpdir}/${archive}" \
|
||||
"https://github.com/seaweedfs/seaweedfs/releases/download/${pkgver}/${archive}"
|
||||
tar -xzf "${tmpdir}/${archive}" -C "${tmpdir}" weed
|
||||
if [[ ! -f "${source_archive}" ]]; then
|
||||
source_archive="${tmpdir}/seaweedfs-${pkgver}-src.tar.gz"
|
||||
curl -fsSL \
|
||||
-o "${source_archive}" \
|
||||
"https://github.com/seaweedfs/seaweedfs/archive/refs/tags/${pkgver}.tar.gz"
|
||||
fi
|
||||
tar -xzf "${source_archive}" -C "${tmpdir}"
|
||||
source_dir="${tmpdir}/seaweedfs-${pkgver}"
|
||||
(
|
||||
cd "${source_dir}"
|
||||
go build -mod=readonly -buildvcs=false -trimpath -o "${tmpdir}/weed" ./weed
|
||||
)
|
||||
|
||||
for config in "${configs[@]}"; do
|
||||
"${tmpdir}/weed" scaffold -config "${config}" 2>/dev/null \
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,9 @@ description="SeaweedFS ${service_name} service"
|
||||
command="/usr/bin/weed"
|
||||
command_user="${SEAWEEDFS_USER:-seaweedfs}:${SEAWEEDFS_GROUP:-seaweedfs}"
|
||||
command_background="yes"
|
||||
# SeaweedFS performs a graceful shutdown, including a 10-second final heartbeat.
|
||||
# The OpenRC default stop timeout can expire before that work has completed.
|
||||
retry="TERM/30/KILL/5"
|
||||
pidfile="/run/seaweedfs/${RC_SVCNAME}.pid"
|
||||
output_log="${SEAWEEDFS_LOG:-/var/log/seaweedfs/${RC_SVCNAME}.log}"
|
||||
error_log="${SEAWEEDFS_ERRLOG:-/var/log/seaweedfs/${RC_SVCNAME}.log}"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/var/log/seaweedfs/seaweedfs.*.log {
|
||||
daily
|
||||
rotate 14
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
su seaweedfs seaweedfs
|
||||
}
|
||||
@@ -1,104 +1,3 @@
|
||||
[cors.allowed_origins]
|
||||
values = "*"
|
||||
|
||||
[jwt.signing]
|
||||
key = ""
|
||||
expires_after_seconds = 10
|
||||
|
||||
# Do not expose the administrative UI by default.
|
||||
[access]
|
||||
ui = false
|
||||
|
||||
[filer.expose_directory_metadata]
|
||||
enabled = true
|
||||
|
||||
[jwt.signing.read]
|
||||
key = ""
|
||||
expires_after_seconds = 10
|
||||
|
||||
[jwt.filer_signing]
|
||||
key = ""
|
||||
expires_after_seconds = 10
|
||||
|
||||
[jwt.filer_signing.read]
|
||||
key = ""
|
||||
expires_after_seconds = 10
|
||||
|
||||
[grpc]
|
||||
ca = ""
|
||||
allowed_wildcard_domain = ""
|
||||
|
||||
[grpc.volume]
|
||||
cert = ""
|
||||
key = ""
|
||||
allowed_commonNames = ""
|
||||
|
||||
[grpc.master]
|
||||
cert = ""
|
||||
key = ""
|
||||
allowed_commonNames = ""
|
||||
|
||||
[grpc.filer]
|
||||
cert = ""
|
||||
key = ""
|
||||
allowed_commonNames = ""
|
||||
|
||||
[grpc.s3]
|
||||
cert = ""
|
||||
key = ""
|
||||
allowed_commonNames = ""
|
||||
|
||||
[grpc.admin]
|
||||
cert = ""
|
||||
key = ""
|
||||
allowed_commonNames = ""
|
||||
|
||||
[grpc.worker]
|
||||
cert = ""
|
||||
key = ""
|
||||
allowed_commonNames = ""
|
||||
|
||||
[grpc.client]
|
||||
cert = ""
|
||||
key = ""
|
||||
|
||||
[https.client]
|
||||
enabled = false
|
||||
cert = ""
|
||||
key = ""
|
||||
ca = ""
|
||||
insecure_skip_verify = false
|
||||
|
||||
[https.volume]
|
||||
cert = ""
|
||||
key = ""
|
||||
ca = ""
|
||||
|
||||
[https.master]
|
||||
cert = ""
|
||||
key = ""
|
||||
ca = ""
|
||||
|
||||
[https.filer]
|
||||
cert = ""
|
||||
key = ""
|
||||
ca = ""
|
||||
|
||||
[https.admin]
|
||||
cert = ""
|
||||
key = ""
|
||||
ca = ""
|
||||
|
||||
[admin]
|
||||
user = ""
|
||||
password = ""
|
||||
|
||||
[admin.readonly]
|
||||
user = ""
|
||||
password = ""
|
||||
|
||||
[s3.sse]
|
||||
kek = ""
|
||||
key = ""
|
||||
|
||||
[guard]
|
||||
white_list = ""
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[cluster]
|
||||
default = "c1"
|
||||
|
||||
[cluster.c1]
|
||||
master = "localhost:9333" # comma-separated master servers
|
||||
|
||||
[cluster.c2]
|
||||
master = ""
|
||||
+24
-2
@@ -10,6 +10,7 @@ arches="${ALPINE_ARCHES:-x86_64 aarch64}"
|
||||
packager="${PACKAGER:-local}"
|
||||
selected_packages="${ALPINE_PACKAGE:-${ALPINE_PACKAGES:-}}"
|
||||
skip_build="${ALPINE_SKIP_BUILD:-0}"
|
||||
rust_cache_root="${ALPINE_RUST_CACHE_ROOT:-}"
|
||||
|
||||
if [[ "${skip_build}" == "1" ]]; then
|
||||
printf 'Skipping package build: restored package cache is complete\n'
|
||||
@@ -24,7 +25,7 @@ if [[ "${1:-}" != "--as-builder" && "$(id -u)" == "0" ]]; then
|
||||
printf 'permit nopass :wheel\n' > /etc/doas.d/wheel.conf
|
||||
printf '%%wheel ALL=(ALL) NOPASSWD: ALL\n' > /etc/sudoers.d/wheel
|
||||
chown -R builder:builder "${repo_root}"
|
||||
exec su builder -c "ALPINE_ARCHES='${arches}' ALPINE_REPO_NAME='${repo_name}' ALPINE_PACKAGES='${selected_packages}' PACKAGER='${packager}' '${BASH_SOURCE[0]}' --as-builder"
|
||||
exec su builder -c "ALPINE_ARCHES='${arches}' ALPINE_REPO_NAME='${repo_name}' ALPINE_PACKAGES='${selected_packages}' PACKAGER='${packager}' ALPINE_RUST_CACHE_ROOT='${rust_cache_root}' '${BASH_SOURCE[0]}' --as-builder"
|
||||
fi
|
||||
|
||||
export PACKAGER="${packager}"
|
||||
@@ -49,7 +50,13 @@ if [[ ! -e "${HOME}/.abuild/abuild.conf" && -d "${repo_root}/.cache/abuild" ]];
|
||||
fi
|
||||
|
||||
if ! compgen -G "${HOME}/.abuild/*.rsa" > /dev/null; then
|
||||
abuild-keygen -a -n
|
||||
# APK signatures identify their public key by filename. Matrix workers can
|
||||
# otherwise generate different builder-<timestamp>.rsa keys with the same
|
||||
# name when they start during the same second, making their artifacts
|
||||
# impossible to merge. Use the selected package only while generating the
|
||||
# key so the package metadata retains the configured PACKAGER value.
|
||||
key_identity="${ALPINE_PACKAGE:-ci}"
|
||||
PACKAGER="CI key <ci-${key_identity}@local.invalid>" abuild-keygen -a -n
|
||||
fi
|
||||
|
||||
doas cp "${HOME}"/.abuild/*.rsa.pub /etc/apk/keys/
|
||||
@@ -72,6 +79,21 @@ while IFS= read -r package_dir; do
|
||||
|
||||
printf 'Building %s for %s\n' "$(basename "${package_dir}")" "${arch}"
|
||||
(
|
||||
package_name="$(apk_package_name "${package_dir}")"
|
||||
if [[ -n "${rust_cache_root}" ]]; then
|
||||
case "${package_name}" in
|
||||
greptimedb)
|
||||
export CARGO_HOME="${rust_cache_root}/greptimedb/cargo"
|
||||
export RUSTUP_HOME="${rust_cache_root}/greptimedb/rustup"
|
||||
export CARGO_TARGET_DIR="${rust_cache_root}/greptimedb/target"
|
||||
;;
|
||||
seaweedfs)
|
||||
export CARGO_HOME="${rust_cache_root}/seaweedfs/cargo"
|
||||
export CARGO_TARGET_DIR="${rust_cache_root}/seaweedfs/target"
|
||||
unset RUSTUP_HOME
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cd "${package_dir}"
|
||||
ALPINE_ARCH="${arch}" CARCH="${arch}" abuild -r
|
||||
)
|
||||
|
||||
@@ -29,66 +29,8 @@ registry_key_url() {
|
||||
printf '%s/api/packages/%s/alpine/key\n' "${instance_url%/}" "${owner}"
|
||||
}
|
||||
|
||||
all_packages() {
|
||||
while IFS= read -r package_dir; do
|
||||
apk_package_name "${package_dir}"
|
||||
done < <(apk_all_package_dirs "${repo_root}")
|
||||
}
|
||||
|
||||
mark_all_packages() {
|
||||
printf 'Rebuilding all packages: %s\n' "$1" >&2
|
||||
all_packages
|
||||
}
|
||||
|
||||
diff_base() {
|
||||
local before="${GITHUB_EVENT_BEFORE:-${CI_COMMIT_BEFORE_SHA:-}}"
|
||||
local base_ref="${GITHUB_BASE_REF:-}"
|
||||
|
||||
if [[ -n "${base_ref}" ]] && git rev-parse --verify "origin/${base_ref}" >/dev/null 2>&1; then
|
||||
printf '%s...HEAD\n' "origin/${base_ref}"
|
||||
elif [[ -n "${before}" && ! "${before}" =~ ^0+$ ]] && git rev-parse --verify "${before}^{commit}" >/dev/null 2>&1; then
|
||||
printf '%s..HEAD\n' "${before}"
|
||||
elif git rev-parse --verify HEAD^ >/dev/null 2>&1; then
|
||||
printf 'HEAD^..HEAD\n'
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
changed_packages() {
|
||||
local base changed_paths changed_path package
|
||||
declare -A selected=()
|
||||
|
||||
if ! base="$(diff_base)"; then
|
||||
mark_all_packages "no usable git diff base"
|
||||
return
|
||||
fi
|
||||
if ! changed_paths="$(git diff --name-only "${base}")"; then
|
||||
mark_all_packages "git diff failed for ${base}"
|
||||
return
|
||||
fi
|
||||
|
||||
while IFS= read -r changed_path; do
|
||||
[[ -n "${changed_path}" ]] || continue
|
||||
case "${changed_path}" in
|
||||
scripts/apk/*|.gitea/workflows/build.yml|mise.toml)
|
||||
mark_all_packages "shared build logic changed"
|
||||
return
|
||||
;;
|
||||
packaging/alpine/local/*)
|
||||
package="${changed_path#packaging/alpine/local/}"
|
||||
selected["${package%%/*}"]=1
|
||||
;;
|
||||
esac
|
||||
done <<< "${changed_paths}"
|
||||
|
||||
for package in "${!selected[@]}"; do
|
||||
printf '%s\n' "${package}"
|
||||
done | sort
|
||||
}
|
||||
|
||||
download_registry_metadata() {
|
||||
local arch url
|
||||
local arch url key_dir
|
||||
|
||||
require_registry_config INSTANCE_URL "${instance_url}"
|
||||
require_registry_config PACKAGE_OWNER "${owner}"
|
||||
@@ -99,19 +41,35 @@ download_registry_metadata() {
|
||||
--output "${registry_cache}/${arch}.APKINDEX.tar.gz" \
|
||||
"${url}/${arch}/APKINDEX.tar.gz"
|
||||
done
|
||||
key_dir="${registry_cache}/keys"
|
||||
mkdir -p "${key_dir}"
|
||||
find "${key_dir}" -maxdepth 1 -type f -name '*.rsa.pub' -delete
|
||||
curl --fail --silent --show-error --location \
|
||||
--output "${registry_cache}/registry.rsa.pub" \
|
||||
--remote-name --remote-header-name --output-dir "${key_dir}" \
|
||||
"$(registry_key_url)"
|
||||
registry_key_path="$(find "${key_dir}" -maxdepth 1 -type f -name '*.rsa.pub' -print -quit)"
|
||||
if [[ -z "${registry_key_path}" ]]; then
|
||||
printf 'registry signing key was not downloaded: %s\n' "$(registry_key_url)" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
load_registry_index() {
|
||||
local arch package_name package_version
|
||||
declare -gA registry_packages=()
|
||||
local arch package_name package_version registry_key comparison
|
||||
declare -gA registry_latest_versions=()
|
||||
|
||||
for arch in ${arches}; do
|
||||
while IFS=$'\t' read -r package_name package_version; do
|
||||
[[ -n "${package_name}" && -n "${package_version}" ]] || continue
|
||||
registry_packages["${arch}|${package_name}|${package_version}"]=1
|
||||
registry_key="${arch}|${package_name}"
|
||||
if [[ -z "${registry_latest_versions[${registry_key}]:-}" ]]; then
|
||||
registry_latest_versions["${registry_key}"]="${package_version}"
|
||||
continue
|
||||
fi
|
||||
comparison="$(apk version -t "${package_version}" "${registry_latest_versions[${registry_key}]}")"
|
||||
if [[ "${comparison}" == ">" ]]; then
|
||||
registry_latest_versions["${registry_key}"]="${package_version}"
|
||||
fi
|
||||
done < <(
|
||||
tar -xOzf "${registry_cache}/${arch}.APKINDEX.tar.gz" APKINDEX | awk '
|
||||
/^P:/ { package = substr($0, 3); next }
|
||||
@@ -121,25 +79,34 @@ load_registry_index() {
|
||||
done
|
||||
}
|
||||
|
||||
registry_missing_packages() {
|
||||
local package_dir package_name arch spec spec_name spec_version missing
|
||||
registry_upgrade_packages() {
|
||||
local package_dir package_name arch candidate_spec candidate_version published_version comparison selected
|
||||
|
||||
while IFS= read -r package_dir; do
|
||||
apk_validate_package_dir "${package_dir}"
|
||||
package_name="$(apk_package_name "${package_dir}")"
|
||||
missing=0
|
||||
selected=0
|
||||
for arch in ${arches}; do
|
||||
apk_package_supports_arch "${package_dir}" "${arch}" || continue
|
||||
while IFS= read -r spec; do
|
||||
spec_name="${spec%%=*}"
|
||||
spec_version="${spec#*=}"
|
||||
if [[ -z "${registry_packages[${arch}|${spec_name}|${spec_version}]:-}" ]]; then
|
||||
missing=1
|
||||
printf 'Registry miss: %s (%s, %s)\n' "${package_name}" "${arch}" "${spec}" >&2
|
||||
fi
|
||||
done < <(apk_package_versioned_names "${package_dir}" "${arch}")
|
||||
IFS= read -r candidate_spec < <(apk_package_versioned_names "${package_dir}" "${arch}")
|
||||
candidate_version="${candidate_spec#*=}"
|
||||
published_version="${registry_latest_versions[${arch}|${package_name}]:-}"
|
||||
if [[ -z "${published_version}" ]]; then
|
||||
selected=1
|
||||
printf 'Registry miss: %s (%s, %s)\n' "${package_name}" "${arch}" "${candidate_spec}" >&2
|
||||
continue
|
||||
fi
|
||||
comparison="$(apk version -t "${candidate_version}" "${published_version}")"
|
||||
if [[ "${comparison}" == ">" ]]; then
|
||||
selected=1
|
||||
printf 'Registry upgrade: %s (%s, %s -> %s)\n' \
|
||||
"${package_name}" "${arch}" "${published_version}" "${candidate_version}" >&2
|
||||
else
|
||||
printf 'Registry current: %s (%s, source %s; published %s)\n' \
|
||||
"${package_name}" "${arch}" "${candidate_version}" "${published_version}" >&2
|
||||
fi
|
||||
done
|
||||
[[ "${missing}" == 1 ]] && printf '%s\n' "${package_name}"
|
||||
[[ "${selected}" == 1 ]] && printf '%s\n' "${package_name}"
|
||||
done < <(apk_all_package_dirs "${repo_root}")
|
||||
}
|
||||
|
||||
@@ -151,10 +118,7 @@ prepare() {
|
||||
load_registry_index
|
||||
while IFS= read -r selected; do
|
||||
[[ -n "${selected}" ]] && selected_map["${selected}"]=1
|
||||
done < <(changed_packages)
|
||||
while IFS= read -r selected; do
|
||||
[[ -n "${selected}" ]] && selected_map["${selected}"]=1
|
||||
done < <(registry_missing_packages)
|
||||
done < <(registry_upgrade_packages)
|
||||
|
||||
ALPINE_PACKAGES="$(for selected in "${!selected_map[@]}"; do printf '%s\n' "${selected}"; done | sort | xargs)"
|
||||
if [[ -n "${ALPINE_PACKAGES}" ]]; then
|
||||
@@ -162,7 +126,7 @@ prepare() {
|
||||
printf 'Selected packages for rebuild: %s\n' "${ALPINE_PACKAGES}"
|
||||
else
|
||||
ALPINE_SKIP_BUILD=1
|
||||
printf 'No packages selected for rebuild: registry satisfies source metadata\n'
|
||||
printf 'No packages selected for rebuild: registry has equal or newer package versions\n'
|
||||
fi
|
||||
|
||||
if [[ -n "${GITHUB_ENV:-}" ]]; then
|
||||
@@ -170,10 +134,11 @@ prepare() {
|
||||
printf 'ALPINE_PACKAGES=%s\n' "${ALPINE_PACKAGES}"
|
||||
printf 'ALPINE_SKIP_BUILD=%s\n' "${ALPINE_SKIP_BUILD}"
|
||||
printf 'ALPINE_REGISTRY_URL=%s\n' "$(registry_url)"
|
||||
printf 'ALPINE_REGISTRY_KEY=%s\n' "${registry_cache}/registry.rsa.pub"
|
||||
printf 'ALPINE_REGISTRY_KEY=%s\n' "${registry_key_path}"
|
||||
} >> "${GITHUB_ENV}"
|
||||
fi
|
||||
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
|
||||
printf 'selected_packages=%s\n' "${ALPINE_PACKAGES}" >> "${GITHUB_OUTPUT}"
|
||||
if [[ -n "${ALPINE_PACKAGES}" ]]; then
|
||||
printf 'packages_selected=true\n' >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
|
||||
+17
-13
@@ -6,35 +6,32 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
. "${repo_root}/scripts/apk/package-lib.sh"
|
||||
repo_name="${ALPINE_REPO_NAME:-local}"
|
||||
arch="${ALPINE_ARCH:-$(apk --print-arch)}"
|
||||
packages="${SMOKE_PACKAGES:-seaweedfs seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc greptimedb lavinmq lavinmq-openrc gitea gitea-openrc}"
|
||||
packages="${SMOKE_PACKAGES:-seaweedfs seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc greptimedb lavinmq lavinmq-openrc gitea gitea-openrc rclone-openrc}"
|
||||
repo_dir="${repo_root}/packages/${repo_name}/${arch}"
|
||||
registry_url="${ALPINE_REGISTRY_URL:-}"
|
||||
registry_key="${ALPINE_REGISTRY_KEY:-}"
|
||||
read -r -a package_list <<< "${packages}"
|
||||
declare -A versioned_packages=()
|
||||
declare -A source_packages=()
|
||||
|
||||
while IFS= read -r package_dir; do
|
||||
while IFS= read -r spec; do
|
||||
versioned_packages["${spec%%=*}"]="${spec}"
|
||||
source_packages["${spec%%=*}"]=1
|
||||
done < <(apk_package_versioned_names "${package_dir}" "${arch}")
|
||||
done < <(apk_all_package_dirs "${repo_root}")
|
||||
|
||||
for package in "${package_list[@]}"; do
|
||||
if [[ -z "${versioned_packages[${package}]:-}" ]]; then
|
||||
if [[ -z "${source_packages[${package}]:-}" ]]; then
|
||||
printf 'smoke package is not defined by a source APKBUILD: %s\n' "${package}" >&2
|
||||
exit 2
|
||||
fi
|
||||
package="${versioned_packages[${package}]}"
|
||||
done
|
||||
|
||||
if [[ -d "${repo_dir}" ]]; then
|
||||
cp "${repo_dir}"/*.rsa.pub /etc/apk/keys/
|
||||
echo "${repo_root}/packages/${repo_name}" >> /etc/apk/repositories
|
||||
else
|
||||
if [[ -z "${registry_url}" ]]; then
|
||||
printf 'missing local repository and no registry fallback: packages/%s/%s\n' "${repo_name}" "${arch}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${registry_url}" ]]; then
|
||||
if [[ ! -f "${registry_key}" ]]; then
|
||||
printf 'missing Alpine registry signing key: %s\n' "${registry_key:-<unset>}" >&2
|
||||
exit 1
|
||||
@@ -43,9 +40,11 @@ else
|
||||
echo "${registry_url}" >> /etc/apk/repositories
|
||||
fi
|
||||
|
||||
for index in "${!package_list[@]}"; do
|
||||
package_list[index]="${versioned_packages[${package_list[index]}]}"
|
||||
done
|
||||
if [[ ! -d "${repo_dir}" && -z "${registry_url}" ]]; then
|
||||
printf 'missing local repository and no registry fallback: packages/%s/%s\n' "${repo_name}" "${arch}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apk update
|
||||
apk add "${package_list[@]}"
|
||||
if command -v weed >/dev/null 2>&1; then
|
||||
@@ -65,6 +64,11 @@ if command -v gitea >/dev/null 2>&1; then
|
||||
test -f /etc/gitea/app.ini
|
||||
test -d /var/lib/gitea
|
||||
fi
|
||||
if command -v rclone >/dev/null 2>&1; then
|
||||
rclone version
|
||||
test -f /etc/conf.d/rclone
|
||||
test -f /etc/init.d/rclone
|
||||
fi
|
||||
if ls /etc/init.d/seaweedfs.* >/dev/null 2>&1; then
|
||||
find /etc/init.d -maxdepth 1 -name 'seaweedfs.*' -print | sort
|
||||
fi
|
||||
|
||||
Executable
+103
@@ -0,0 +1,103 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
repo_name="${ALPINE_REPO_NAME:-local}"
|
||||
arches="${ALPINE_ARCHES:-x86_64 aarch64}"
|
||||
artifact_root="${APK_CI_ARTIFACTS_DIR:-${repo_root}/packages/worker-artifacts}"
|
||||
package_root="${APK_CI_PACKAGE_ROOT:-${repo_root}/packages/${repo_name}}"
|
||||
keys_root="$(mktemp -d)"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "${keys_root}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
require_command() {
|
||||
command -v "$1" >/dev/null 2>&1 || {
|
||||
printf 'missing required command: %s\n' "$1" >&2
|
||||
exit 2
|
||||
}
|
||||
}
|
||||
|
||||
copy_key() {
|
||||
local key="$1"
|
||||
local destination="$2"
|
||||
local key_name
|
||||
|
||||
key_name="$(basename "${key}")"
|
||||
if [[ -e "${destination}/${key_name}" ]]; then
|
||||
if cmp -s "${key}" "${destination}/${key_name}"; then
|
||||
return
|
||||
fi
|
||||
printf 'conflicting public keys named %s\n' "${key_name}" >&2
|
||||
exit 1
|
||||
fi
|
||||
cp "${key}" "${destination}/${key_name}"
|
||||
}
|
||||
|
||||
require_command abuild-keygen
|
||||
require_command abuild-sign
|
||||
require_command apk
|
||||
|
||||
if [[ ! -d "${artifact_root}" ]]; then
|
||||
printf 'missing worker artifacts directory: %s\n' "${artifact_root}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf "${package_root}"
|
||||
mkdir -p "${package_root}" "${HOME}/.abuild"
|
||||
|
||||
if ! compgen -G "${HOME}/.abuild/*.rsa" > /dev/null; then
|
||||
abuild-keygen -a -n
|
||||
fi
|
||||
|
||||
shopt -s nullglob
|
||||
merge_private_keys=("${HOME}"/.abuild/*.rsa)
|
||||
merge_public_keys=("${HOME}"/.abuild/*.rsa.pub)
|
||||
shopt -u nullglob
|
||||
|
||||
if [[ "${#merge_private_keys[@]}" -ne 1 || "${#merge_public_keys[@]}" -ne 1 ]]; then
|
||||
printf 'expected exactly one merge signing key in %s/.abuild\n' "${HOME}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for arch in ${arches}; do
|
||||
destination="${package_root}/${arch}"
|
||||
keys_dir="${keys_root}/${arch}"
|
||||
mkdir -p "${destination}"
|
||||
|
||||
while IFS= read -r -d '' apk; do
|
||||
cp "${apk}" "${destination}/"
|
||||
done < <(find "${artifact_root}" -type f -path "*/${arch}/*.apk" -print0)
|
||||
|
||||
shopt -s nullglob
|
||||
apks=("${destination}"/*.apk)
|
||||
shopt -u nullglob
|
||||
if [[ "${#apks[@]}" -eq 0 ]]; then
|
||||
rmdir "${destination}"
|
||||
continue
|
||||
fi
|
||||
|
||||
while IFS= read -r -d '' key; do
|
||||
copy_key "${key}" "${destination}"
|
||||
mkdir -p "${keys_dir}"
|
||||
copy_key "${key}" "${keys_dir}"
|
||||
done < <(find "${artifact_root}" -type f -path "*/${arch}/*.rsa.pub" -print0)
|
||||
if ! compgen -G "${keys_dir}/*.rsa.pub" > /dev/null; then
|
||||
printf 'missing worker signing key for %s artifacts\n' "${arch}" >&2
|
||||
exit 1
|
||||
fi
|
||||
copy_key "${merge_public_keys[0]}" "${destination}"
|
||||
|
||||
(
|
||||
cd "${destination}"
|
||||
apk --keys-dir "${keys_dir}" index --rewrite-arch "${arch}" -o APKINDEX.tar.gz ./*.apk
|
||||
abuild-sign -k "${merge_private_keys[0]}" APKINDEX.tar.gz
|
||||
)
|
||||
done
|
||||
|
||||
if ! compgen -G "${package_root}"/*/*.apk > /dev/null; then
|
||||
printf 'no APK files found in worker artifacts: %s\n' "${artifact_root}" >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -10,6 +10,11 @@ alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
arches="${ALPINE_SECURITY_ARCHES:-${ALPINE_ARCHES:-x86_64}}"
|
||||
reports_dir="${APK_SECURITY_REPORTS_DIR:-${repo_root}/packages/security-reports}"
|
||||
trivy_bin="${TRIVY_BIN:-trivy}"
|
||||
# The GCR pull-through mirror can serve a manifest whose layer has already
|
||||
# expired, returning 404 rather than letting Trivy continue to its fallback.
|
||||
# Use the publisher's registry directly; callers may still select an internal
|
||||
# mirror by setting TRIVY_DB_REPOSITORY.
|
||||
trivy_db_repository="${TRIVY_DB_REPOSITORY:-ghcr.io/aquasecurity/trivy-db:2}"
|
||||
|
||||
require_command() {
|
||||
command -v "$1" >/dev/null 2>&1 || {
|
||||
@@ -166,9 +171,9 @@ while IFS= read -r package_dir; do
|
||||
install_rootfs_docker "${rootfs}" "${arch}" "${specs[@]}"
|
||||
fi
|
||||
|
||||
"${trivy_bin}" filesystem --distro "alpine/${alpine_version}" --scanners vuln --format json --no-progress \
|
||||
"${trivy_bin}" filesystem --db-repository "${trivy_db_repository}" --distro "alpine/${alpine_version}" --scanners vuln --format json --no-progress \
|
||||
--output "${report_dir}/trivy.json" "${rootfs}/installed"
|
||||
"${trivy_bin}" filesystem --distro "alpine/${alpine_version}" --scanners vuln --format cyclonedx --no-progress \
|
||||
"${trivy_bin}" filesystem --db-repository "${trivy_db_repository}" --distro "alpine/${alpine_version}" --scanners vuln --format cyclonedx --no-progress \
|
||||
--output "${report_dir}/sbom.cdx.json" "${rootfs}/installed"
|
||||
jq -e 'type == "object" and has("ArtifactName")' "${report_dir}/trivy.json" >/dev/null
|
||||
jq -e '.bomFormat == "CycloneDX"' "${report_dir}/sbom.cdx.json" >/dev/null
|
||||
|
||||
@@ -5,7 +5,7 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
alpine_version="${ALPINE_VERSION:-3.24}"
|
||||
platform="${ALPINE_BUILD_PLATFORM:-linux/amd64}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
packages="${SMOKE_PACKAGES:-seaweedfs seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc greptimedb lavinmq lavinmq-openrc gitea gitea-openrc}"
|
||||
packages="${SMOKE_PACKAGES:-seaweedfs seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc greptimedb lavinmq lavinmq-openrc gitea gitea-openrc rclone-openrc}"
|
||||
|
||||
if [[ ! -d "${repo_root}/packages/local/${arch}" ]]; then
|
||||
printf 'missing local repository: packages/local/%s\n' "${arch}" >&2
|
||||
@@ -39,6 +39,11 @@ docker run --rm --platform "${platform}" \
|
||||
test -f /etc/gitea/app.ini
|
||||
test -d /var/lib/gitea
|
||||
fi
|
||||
if command -v rclone >/dev/null 2>&1; then
|
||||
rclone version
|
||||
test -f /etc/conf.d/rclone
|
||||
test -f /etc/init.d/rclone
|
||||
fi
|
||||
if ls /etc/init.d/seaweedfs.* >/dev/null 2>&1; then
|
||||
ls -1 /etc/init.d/seaweedfs.* | sort
|
||||
fi
|
||||
|
||||
@@ -76,6 +76,7 @@ Examples:
|
||||
apk add greptimedb greptimedb-docs greptimedb-standalone-openrc
|
||||
apk add lavinmq lavinmq-openrc
|
||||
apk add gitea gitea-openrc
|
||||
apk add rclone-openrc
|
||||
|
||||
Entering ${TEST_SHELL}.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user