Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM public.ecr.aws/docker/library/node:20-alpine AS wasm

WORKDIR /tmp/pkgs

# Pinned versions match upstream's CDN_DEFAULTS in wasm-provider.ts at v2.8.4.
# Pinned versions match upstream's CDN_DEFAULTS in wasm-provider.ts at v2.8.7.
# Bump these together with the BentoPDF base image tag.
ARG PYMUPDF_VERSION=0.11.16
ARG GS_VERSION=0.1.1
Expand All @@ -35,7 +35,7 @@ RUN set -eux; \
mv cpdf/dist/* cpdf/ && rmdir cpdf/dist

# ---- final stage: layer onto upstream's prebuilt -simple image -------------
FROM ghcr.io/alam00000/bentopdf-simple:v2.8.4
FROM ghcr.io/alam00000/bentopdf-simple:v2.8.7

COPY --from=wasm --chown=nginx:nginx /tmp/pkgs/pymupdf/ /usr/share/nginx/html/wasm/pymupdf/
COPY --from=wasm --chown=nginx:nginx /tmp/pkgs/gs/ /usr/share/nginx/html/wasm/gs/
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"check": "tsc --noEmit"
},
"dependencies": {
"@start9labs/start-sdk": "2.0.5"
"@start9labs/start-sdk": "2.0.9"
},
"devDependencies": {
"@types/node": "^22.19.0",
Expand Down
50 changes: 21 additions & 29 deletions s9pk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ INGREDIENTS := $(shell start-cli s9pk list-ingredients 2>/dev/null)
# Resolve the actual git dir so this works inside git worktrees, where .git
# is a file pointing at <main>/.git/worktrees/<name> rather than a directory.
GIT_DIR := $(shell git rev-parse --git-dir 2>/dev/null)
GIT_DEPS := $(if $(GIT_DIR),$(GIT_DIR)/HEAD $(GIT_DIR)/index)
# These are rebuild triggers (the manifest embeds the commit hash), not build
# requirements — pack degrades to a null gitHash on its own. $(wildcard) drops
# whichever don't exist: a freshly `git init`ed repo has no index until the
# first `git add`, and a hard prerequisite on it halts make with "No rule to
# make target".
GIT_DEPS := $(if $(GIT_DIR),$(wildcard $(GIT_DIR)/HEAD $(GIT_DIR)/index))
ARCHES ?= x86 arm riscv
# TARGETS is the list of leaf make-targets the build matrix fans out over.
# Defaults to the arches; variant packages override (e.g. immich, ollama, vllm
Expand Down Expand Up @@ -63,12 +68,12 @@ x86 x86_64: arch/x86_64
arm arm64 aarch64: arch/aarch64
riscv riscv64: arch/riscv64

$(BASE_NAME).s9pk: $(INGREDIENTS) $(GIT_DEPS)
$(BASE_NAME).s9pk: $(INGREDIENTS) $(GIT_DEPS) | check-deps
@$(MAKE) --no-print-directory ingredients
@echo " Packing '$@'..."
start-cli s9pk pack -o $@

$(BASE_NAME)_%.s9pk: $(INGREDIENTS) $(GIT_DEPS)
$(BASE_NAME)_%.s9pk: $(INGREDIENTS) $(GIT_DEPS) | check-deps
@$(MAKE) --no-print-directory ingredients
@echo " Packing '$@'..."
start-cli s9pk pack --arch=$* -o $@
Expand All @@ -77,33 +82,18 @@ ingredients: $(INGREDIENTS)
@echo " Re-evaluating ingredients..."

install: | check-deps check-init
@HOST=$$(awk -F'/' '/^host:/ {print $$3}' ~/.startos/config.yaml); \
if [ -z "$$HOST" ]; then \
echo "Error: You must define \"host: http://server-name.local\" in ~/.startos/config.yaml"; \
exit 1; \
fi; \
S9PK=$$(ls -t *.s9pk 2>/dev/null | head -1); \
if [ -z "$$S9PK" ]; then \
@if [ -z "$$(ls *.s9pk 2>/dev/null)" ]; then \
echo "Error: No .s9pk file found. Run 'make' first."; \
exit 1; \
fi; \
printf "\n🚀 Installing %s to %s ...\n" "$$S9PK" "$$HOST"; \
S9PK=$$(start-cli s9pk select) || exit 1; \
printf "\n🚀 Installing %s ...\n" "$$S9PK"; \
start-cli package install -s "$$S9PK"

publish: | all
@REGISTRY=$$(awk -F'/' '/^registry:/ {print $$3}' ~/.startos/config.yaml); \
if [ -z "$$REGISTRY" ]; then \
echo "Error: You must define \"registry: https://my-registry.tld\" in ~/.startos/config.yaml"; \
exit 1; \
fi; \
S3BASE=$$(awk -F'/' '/^s9pk-s3base:/ {print $$3}' ~/.startos/config.yaml); \
if [ -z "$$S3BASE" ]; then \
echo "Error: You must define \"s3base: https://s9pks.my-s3-bucket.tld\" in ~/.startos/config.yaml"; \
exit 1; \
fi; \
command -v s3cmd >/dev/null || \
@command -v s3cmd >/dev/null || \
(echo "Error: s3cmd not found. It must be installed to publish using s3." && exit 1); \
printf "\n🚀 Publishing to %s; indexing on %s ...\n" "$$S3BASE" "$$REGISTRY"; \
printf "\n🚀 Publishing ...\n"; \
for s9pk in *.s9pk; do \
age=$$(( $$(date +%s) - $$(stat -c %Y "$$s9pk") )); \
if [ "$$age" -gt 3600 ]; then \
Expand All @@ -116,9 +106,13 @@ publish: | all

check-deps:
@command -v start-cli >/dev/null || \
(echo "Error: start-cli not found. Please see https://docs.start9.com/latest/developer-guide/sdk/installing-the-sdk" && exit 1)
(echo "Error: start-cli not found. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
@command -v npm >/dev/null || \
(echo "Error: npm not found. Please install Node.js and npm." && exit 1)
(echo "Error: npm not found. Install Node.js and npm. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
@command -v git >/dev/null || \
(echo "Error: git not found. Install git. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
@command -v jq >/dev/null || \
(echo "Error: jq not found. Install jq. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)

check-init:
@if [ ! -f ~/.startos/developer.key.pem ]; then \
Expand All @@ -128,14 +122,12 @@ check-init:

javascript/index.js: $(shell find startos -type f) tsconfig.json node_modules
npm run check
@if [ -f node_modules/@start9labs/start-sdk/lint.mjs ]; then node node_modules/@start9labs/start-sdk/lint.mjs; else echo " ⚠ SDK lint runner not found; skipping (update @start9labs/start-sdk)"; fi
npm run build

node_modules: package-lock.json
node_modules: package-lock.json package.json
npm ci

package-lock.json: package.json
npm i

clean:
@echo "Cleaning up build artifacts..."
@rm -rf $(PACKAGE_ID).s9pk $(PACKAGE_ID)_x86_64.s9pk $(PACKAGE_ID)_aarch64.s9pk $(PACKAGE_ID)_riscv64.s9pk javascript node_modules
16 changes: 10 additions & 6 deletions startos/versions/current.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'

export const current = VersionInfo.of({
version: '2.8.4:1',
version: '2.8.7:0',
releaseNotes: {
en_US: 'Rebuilt on StartOS SDK 2.0.5. No changes to functionality.',
en_US:
'Updates BentoPDF to v2.8.7, a security release that fixes vulnerabilities present in all earlier versions — upgrading is strongly recommended. Also brings the v2.8.5–v2.8.6 improvements (custom rotate, alternate/mix pages, split-PDF refactor, multi-tool drag-and-drop) and OCR, HEIC, and email-parsing fixes. Rebuilt on StartOS SDK 2.0.9.',
es_ES:
'Reconstruido con StartOS SDK 2.0.5. Sin cambios en la funcionalidad.',
de_DE: 'Neu erstellt mit StartOS SDK 2.0.5. Keine funktionalen Änderungen.',
pl_PL: 'Przebudowano na StartOS SDK 2.0.5. Bez zmian w funkcjonalności.',
fr_FR: 'Reconstruit avec le SDK StartOS 2.0.5. Aucun changement fonctionnel.',
'Actualiza BentoPDF a v2.8.7, una versión de seguridad que corrige vulnerabilidades presentes en todas las versiones anteriores — se recomienda encarecidamente actualizar. También incluye las mejoras de v2.8.5–v2.8.6 (rotación personalizada, páginas alternas/mixtas, refactorización de la división de PDF, arrastrar y soltar en la multiherramienta) y correcciones de OCR, HEIC y análisis de correo. Reconstruido con StartOS SDK 2.0.9.',
de_DE:
'Aktualisiert BentoPDF auf v2.8.7, eine Sicherheitsversion, die Schwachstellen in allen früheren Versionen behebt — ein Update wird dringend empfohlen. Enthält außerdem die Verbesserungen aus v2.8.5–v2.8.6 (benutzerdefinierte Drehung, alternierende/gemischte Seiten, Split-PDF-Überarbeitung, Multi-Tool-Drag-and-Drop) sowie Korrekturen für OCR, HEIC und E-Mail-Verarbeitung. Neu erstellt mit StartOS SDK 2.0.9.',
pl_PL:
'Aktualizuje BentoPDF do v2.8.7 — wydania bezpieczeństwa naprawiającego podatności obecne we wszystkich wcześniejszych wersjach; zdecydowanie zalecana aktualizacja. Zawiera też usprawnienia z v2.8.5–v2.8.6 (własny obrót, naprzemienne/mieszane strony, przebudowa dzielenia PDF, przeciąganie i upuszczanie w multinarzędziu) oraz poprawki OCR, HEIC i analizy e-maili. Przebudowano na StartOS SDK 2.0.9.',
fr_FR:
'Met à jour BentoPDF vers la v2.8.7, une version de sécurité corrigeant des vulnérabilités présentes dans toutes les versions antérieures — la mise à jour est fortement recommandée. Inclut aussi les améliorations des v2.8.5–v2.8.6 (rotation personnalisée, pages alternées/mixtes, refonte de la division de PDF, glisser-déposer multi-outils) et des corrections OCR, HEIC et d’analyse d’e-mails. Reconstruit avec le SDK StartOS 2.0.9.',
},
migrations: {
up: async ({ effects }) => {},
Expand Down
Loading