-
Notifications
You must be signed in to change notification settings - Fork 1
guides_packaging
Guide to building and distributing packages across platforms.
- 📋 Übersicht
- ✨ Features
- 🚀 Quick Start
- 📖 Linux Distributions
- 💡 Best Practices
- 🔧 Troubleshooting
- 📚 Weitere Ressourcen
- 📝 Changelog
This document describes how to build and publish ThemisDB packages for various operating systems and package managers.
Stand: 22. Dezember 2025
Version: 1.3.0
Kategorie: 🔨 Build/Deployment
- 🐧 Linux Support - Debian/Ubuntu (.deb), Fedora/RHEL (.rpm), Arch Linux
- 🪟 Windows Support - Chocolatey, WinGet
- 🍎 macOS Support - Homebrew
- 📦 Multi-Package - Support for various package managers
- 🔄 Distribution Submission - Publishing to official repositories
ThemisDB provides Debian packaging files in the debian/ directory for building .deb packages compatible with Debian, Ubuntu, and derivatives.
sudo apt-get install -y debhelper devscripts build-essential \
cmake ninja-build pkg-config \
libssl-dev librocksdb-dev libtbb-dev libarrow-dev \
libboost-system-dev libspdlog-dev nlohmann-json3-dev \
libcurl4-openssl-dev libyaml-cpp-dev libzstd-dev# From the repository root
dpkg-buildpackage -us -uc -b
# Or using debuild
debuild -us -uc -bThe built packages will be placed in the parent directory:
-
themisdb_1.0.0-1_amd64.deb- Main package -
themisdb-dev_1.0.0-1_amd64.deb- Development headers and libraries
sudo dpkg -i ../themisdb_1.0.0-1_amd64.deb
sudo apt-get install -f # Fix any dependency issues# Start the service
sudo systemctl start themisdb
sudo systemctl enable themisdb
# Check status
sudo systemctl status themisdb
# View logs
sudo journalctl -u themisdb -f
# Configuration file
sudo nano /etc/themisdb/config.yaml
# Data directory
ls -la /var/lib/themisdb/- Debian: Follow the Debian New Maintainer's Guide
- Ubuntu PPA: Create a PPA on Launchpad
# Sign the package
debuild -S -sa
# Upload to PPA
dput ppa:your-ppa-name themisdb_1.0.0-1_source.changesThemisDB provides an RPM spec file at themisdb.spec for building RPM packages.
# Fedora/RHEL/CentOS
sudo dnf install -y rpm-build rpmdevtools
sudo dnf install -y gcc-c++ cmake ninja-build git pkg-config \
openssl-devel rocksdb-devel tbb-devel arrow-devel \
boost-devel spdlog-devel json-devel \
libcurl-devel yaml-cpp-devel libzstd-devel# Create RPM build directory structure
rpmdev-setuptree
# Download source tarball
cd ~/rpmbuild/SOURCES
wget https://github.com/makr-code/ThemisDB/archive/v1.0.0.tar.gz
# Copy spec file
cp /path/to/ThemisDB/themisdb.spec ~/rpmbuild/SPECS/cd ~/rpmbuild/SPECS
rpmbuild -ba themisdb.specBuilt packages are placed in:
-
~/rpmbuild/RPMS/x86_64/themisdb-1.0.0-1.x86_64.rpm- Main package -
~/rpmbuild/RPMS/x86_64/themisdb-devel-1.0.0-1.x86_64.rpm- Development package
sudo dnf install ~/rpmbuild/RPMS/x86_64/themisdb-1.0.0-1.x86_64.rpm# Start the service
sudo systemctl start themisdb
sudo systemctl enable themisdb
# Check status
sudo systemctl status themisdb
# Configuration file
sudo nano /etc/themisdb/config.yaml
# Data directory
ls -la /var/lib/themisdb/- Fedora: Follow the Fedora Package Maintainer Guide
- EPEL: Submit to EPEL for RHEL/CentOS compatibility
- Copr: Create a repository on Copr
ThemisDB provides a PKGBUILD file for building Arch Linux packages.
sudo pacman -S base-devel git cmake ninja
sudo pacman -S openssl rocksdb intel-tbb arrow boost spdlog \
nlohmann-json curl yaml-cpp zstd# Create a build directory
mkdir -p ~/build/themisdb
cd ~/build/themisdb
# Copy PKGBUILD and service file
cp /path/to/ThemisDB/PKGBUILD .
cp /path/to/ThemisDB/debian/themisdb.service .
# Build the package
makepkg -siThis will download the source, build ThemisDB, and install it automatically.
# Build without installing
makepkg
# Install the built package
sudo pacman -U themisdb-1.0.0-1-x86_64.pkg.tar.zst# Start the service
sudo systemctl start themisdb
sudo systemctl enable themisdb
# Check status
sudo systemctl status themisdb
# Configuration file
sudo nano /etc/themisdb/config.yaml- Create an account on AUR
- Clone the AUR repository:
git clone ssh://aur@aur.archlinux.org/themisdb.git cd themisdb - Add files:
cp /path/to/PKGBUILD . cp /path/to/themisdb.service . # Generate .SRCINFO makepkg --printsrcinfo > .SRCINFO
- Commit and push:
git add PKGBUILD .SRCINFO themisdb.service git commit -m "Initial commit: themisdb 1.0.0" git push
ThemisDB provides Chocolatey packaging files in packaging/chocolatey/.
- Windows PowerShell or PowerShell Core
- Chocolatey installed
- Visual Studio 2019+ or Build Tools
-
Build ThemisDB for Windows:
.\build.ps1 -BuildType Release -
Create release archive:
# Create distribution directory $version = "1.0.0" $distDir = "dist\themisdb-$version-win64" New-Item -ItemType Directory -Force -Path $distDir\bin # Copy binaries Copy-Item build-msvc\Release\themis_server.exe $distDir\bin\ Copy-Item config\config.yaml $distDir\ # Create ZIP archive Compress-Archive -Path $distDir\* -DestinationPath "themisdb-$version-win64.zip"
-
Calculate SHA256 checksum:
Get-FileHash themisdb-$version-win64.zip -Algorithm SHA256
-
Update
packaging/chocolatey/tools/chocolateyinstall.ps1with the checksum -
Build Chocolatey package:
cd packaging\chocolatey choco pack
choco install themisdb -s . -f- Create an account on Chocolatey Community
- Get your API key from your account settings
- Push the package:
choco apikey --key YOUR-API-KEY --source https://push.chocolatey.org/ choco push themisdb.1.0.0.nupkg --source https://push.chocolatey.org/
ThemisDB provides WinGet manifest files in packaging/winget/manifests/.
- Windows 10 1809+ or Windows 11
- WinGet installed
# Validate manifest
winget validate --manifest packaging\winget\manifests\t\ThemisDB\ThemisDB\1.0.0\
# Install from local manifest
winget install --manifest packaging\winget\manifests\t\ThemisDB\ThemisDB\1.0.0\ThemisDB.ThemisDB.yaml- Fork microsoft/winget-pkgs
- Create a new branch:
git checkout -b themisdb-1.0.0
- Copy manifest files:
mkdir -p manifests/t/ThemisDB/ThemisDB/1.0.0 cp packaging/winget/manifests/t/ThemisDB/ThemisDB/1.0.0/* \ manifests/t/ThemisDB/ThemisDB/1.0.0/ - Update the SHA256 hash in the installer manifest
- Commit and create a pull request to the upstream repository
ThemisDB provides a Homebrew Formula at packaging/homebrew/themisdb.rb.
- macOS 11+
- Homebrew installed
- Xcode Command Line Tools
# Install dependencies
brew install cmake ninja pkg-config openssl@3 rocksdb tbb \
apache-arrow boost spdlog nlohmann-json curl yaml-cpp zstd
# Build from local formula
brew install --build-from-source packaging/homebrew/themisdb.rb# Test the formula
brew test themisdb
# Audit the formula
brew audit --strict themisdb# Start the service
brew services start themisdb
# Check status
brew services list | grep themisdb
# View logs
tail -f /opt/homebrew/var/log/themisdb.log
# Configuration file
nano /opt/homebrew/etc/themisdb/config.yaml- Fork Homebrew/homebrew-core
- Create a new branch:
git checkout -b themisdb
- Add the formula:
cp packaging/homebrew/themisdb.rb Formula/themisdb.rb
- Update the SHA256 hash:
# Download source tarball curl -L https://github.com/makr-code/ThemisDB/archive/v1.0.0.tar.gz \ -o themisdb-1.0.0.tar.gz # Calculate hash shasum -a 256 themisdb-1.0.0.tar.gz # Update in Formula/themisdb.rb
- Test the formula:
brew install --build-from-source Formula/themisdb.rb brew test themisdb brew audit --strict themisdb - Commit and create a pull request
Before submitting to any distribution repository:
- Verify all dependencies are correctly listed
- Test package installation on a clean system
- Test package upgrade from previous version
- Test package removal/uninstallation
- Verify systemd service (Linux) works correctly
- Check file permissions and ownership
- Ensure configuration files are marked as config files
- Test that data directories are preserved on upgrade
- Verify license information is correct
- Update changelog/release notes
Each distribution has specific requirements:
- Debian: Follow Debian Policy Manual
- Fedora: Follow Fedora Packaging Guidelines
- Arch: Follow Arch Packaging Standards
- Chocolatey: Follow Chocolatey Package Guidelines
- WinGet: Follow WinGet Manifest Guidelines
- Homebrew: Follow Homebrew Formula Cookbook
For faster adoption, consider submitting to community-maintained repositories first:
- Ubuntu PPA: Personal Package Archive on Launchpad
- Fedora Copr: Community projects repository
- AUR: Arch User Repository
- Homebrew Tap: Custom Homebrew repository
Example of creating a Homebrew Tap:
# Create tap repository
git clone https://github.com/makr-code/homebrew-themisdb
cd homebrew-themisdb
mkdir Formula
cp ../ThemisDB/packaging/homebrew/themisdb.rb Formula/
# Users can then install with:
# brew tap makr-code/themisdb
# brew install themisdbAll packages should be built manually/offline before distribution. The packaging files provided support building on the target platform or in Docker containers for reproducibility.
For consistent builds across environments, use Docker containers:
Debian/Ubuntu:
docker run -it --rm -v $(pwd):/build ubuntu:22.04
cd /build
apt-get update && apt-get install -y debhelper devscripts build-essential
dpkg-buildpackage -us -uc -bFedora/RHEL:
docker run -it --rm -v $(pwd):/build fedora:39
cd /build
dnf install -y rpm-build rpmdevtools
rpmdev-setuptree
rpmbuild -ba themisdb.specArch Linux:
docker run -it --rm -v $(pwd):/build archlinux:latest
cd /build
pacman -Syu --noconfirm base-devel
makepkgNote: Automated CI/CD builds via GitHub Actions are planned for future releases but should be implemented after initial manual testing and distribution approval.
For packaging issues or questions:
- GitHub Issues: https://github.com/makr-code/ThemisDB/issues
- Documentation: https://makr-code.github.io/ThemisDB/
- Email: service@themisdb.org
- Architecture-ACCESS-MODEL-IMPLEMENTATION-SUMMARY
- Architecture-ADR-003-pg-dump-sql-parser
- Architecture-BASEENTITY-PRINCIPLE
- Architecture-CACHE-STORAGE-INTEGRATION
- Architecture-CMAKE-ARCHITECTURE
- Architecture-CMAKE-FLAGS-REFERENCE
- Architecture-CMAKE-MODULAR-ARCHITECTURE
- Architecture-CONCERNS-ARCHITECTURE-DIAGRAM
- Architecture-CONCERNS-IMPLEMENTATION-SUMMARY
- Architecture-CONTENT-MODEL
- Architecture-COPILOT-THEMISDB-GRAPH-RAG-BACKEND-ARCHITECTURE
- Architecture-CRYPTO-AND-KEYS
- Architecture-FEATURE-FLAGS-REFERENCE
- Architecture-GPU-ARCHITECTURE-REVIEW-TEMPLATE
- Architecture-HTTP-SHUTDOWN-HARDENING
- Architecture-MIGRATION-GUIDE-CONCERNS
- Architecture-MIGRATION-GUIDE-v13-v14
- Architecture-MODULARIZATION-GUIDE
- Architecture-MODULAR-ARCHITECTURE-ROADMAP
- Architecture-MODULE-ARCHITECTURE-INDEX
- Architecture-P1D01-ISSMPLUGIN-DESIGN-REVIEW
- Architecture-P1-D01-ISSMPLUGIN-DESIGN-REVIEW
- Architecture-P1-D08-MAMBA-GOVERNANCE-CONTRACT
- Architecture-P1-P2-IMPLEMENTATION-COMPLETION-INDEX
- Architecture-PHASE0-COMPLETION-ASSESSMENT
- Architecture-PHASE3-QUERYENGINE-DI-ARCHITECTURE
- Architecture-PHASE4-INDEX-MANAGER-DI
- Architecture-POSTGRESQL-WIRE-PROTOCOL
- Architecture-QUERYENGINE-IMPLEMENTATION-GUIDE
- Architecture-QUERY-SCHEDULING
- Architecture-RAFT-CONSENSUS-DESIGN
- Architecture-README
- Architecture-README-SSM-HYBRID-IMPLEMENTATION
- Architecture-REFACTORING-SUMMARY
- Architecture-RESOURCE-POOLING
- Architecture-SOURCE-DIRECTORY-GUIDE
- Architecture-THEMIS-CORE-GUIDE
- Architecture-UNIFIED-ACCESS-MODEL
- Architecture-WAL-GRPC-MTLS-CONFIGURATION
- Architecture-WIRE-PROTOCOL-RETRY
- Architecture-boltzmann-observability-draft
- Architecture-experimental-logarithmic-vector-storage
- Architecture-llm-wiki-mvp-adr
- Architecture-rewrite-engine-architecture
- Architecture-rope-api-architecture
- Architecture-ssm-gguf-mamba-status
- Architecture-ssm-hybrid-analysis
- Architecture-ssm-hybrid-rollout-plan
- Architecture-ssm-plugin-interface-design-review
- Architecture-transaction-coordinators
- Architecture-wiki-secondary-index
- Architecture-wire-protocol
- Governance-DISABLED-STUB-POLICY
- Governance-DOCS-PR-POLICY
- Governance-GA-PROMOTION-SIGN-OFF
- Governance-GITHUB-MILESTONES-SETUP
- Governance-MATURITY-CLAIM-VERIFICATION-CHECKLIST
- Governance-MATURITY-EVIDENCE-REGISTRY
- Governance-MERGE-GATE-BOT-CONFIG
- Governance-MERGE-GATE-STATUS-LIVE
- Governance-PHASE3-ENFORCEMENT-RUNBOOK
- Governance-PHASE-1-CLOSURE-REPORT
- Governance-PHASE-CLOSURE-POLICY
- Governance-PHASE-DEPENDENCY-GRAPH
- Governance-PLUGIN-SUBMODULE-ROLLBACK
- Governance-PRODUCTION-READY-2026-DELIVERY-PLAN
- Governance-PR-VERSION-TARGETING
- Governance-PR-VERSION-TARGETING-BACKFILL
- Governance-QUERY-MODULE-STATUS
- Governance-README
- Governance-RELEASE-PROMOTION-GATE-POLICY
- Governance-RELEASE-VALIDATION-CHECKLIST
- Governance-SECURITY-MODULE-5671-EVIDENCE-SUMMARY
- Governance-SHARDING-P6-RESIDUAL-RISK-ACCEPTANCE
- Governance-SOURCECODE-COMPLIANCE-GOVERNANCE
- Governance-UPDATES-DEVELOPMENT-STATUS-SIGN-OFF
- Governance-WAVE-C-IMPLEMENTATION-COMPLETE
- Module-acceleration-Roadmap
- Module-access-model-Roadmap
- Module-ai-Roadmap
- Module-analytics-Roadmap
- Module-api-Roadmap
- Module-aql-Roadmap
- Module-auth-Roadmap
- Module-base-Roadmap
- Module-cache-Roadmap
- Module-cdc-Roadmap
- Module-chaos-Roadmap
- Module-chimera-Roadmap
- Module-config-Roadmap
- Module-content-Roadmap
- Module-core-Roadmap
- Module-distributed-knowledge-Roadmap
- Module-distributed-tensor-Roadmap
- Module-document-Roadmap
- Module-ethics-ai-Roadmap
- Module-evaluation-Roadmap
- Module-execution-Roadmap
- Module-exporters-Roadmap
- Module-failover-Roadmap
- Module-geo-Roadmap
- Module-governance-Roadmap
- Module-gpu-Roadmap
- Module-graph-Roadmap
- Module-image-analysis-Roadmap
- Module-importers-Roadmap
- Module-index-Roadmap
- Module-ingestion-Roadmap
- Module-llama-cpp-Roadmap
- Module-llm-Roadmap
- Module-llm-streaming-Roadmap
- Module-llm-wiki-Roadmap
- Module-maintenance-Roadmap
- Module-metadata-Roadmap
- Module-network-Roadmap
- Module-observability-Roadmap
- Module-onnx-clip-Roadmap
- Module-performance-Roadmap
- Module-plugins-Roadmap
- Module-process-Roadmap
- Module-projects-Roadmap
- Module-prompt-engineering-Roadmap
- Module-query-Roadmap
- Module-rag-Roadmap
- Module-replication-Roadmap
- Module-retrieval-Roadmap
- Module-rpc-grpc-Roadmap
- Module-scheduler-Roadmap
- Module-scraper-Roadmap
- Module-search-Roadmap
- Module-security-Roadmap
- Module-server-Roadmap
- Module-sharding-Roadmap
- Module-stable-diffusion-Roadmap
- Module-storage-Roadmap
- Module-temporal-Roadmap
- Module-tensor-Roadmap
- Module-themis-Roadmap
- Module-timeseries-Roadmap
- Module-toolbox-Roadmap
- Module-training-Roadmap
- Module-transaction-Roadmap
- Module-updates-Roadmap
- Module-user-storage-encrypted-Roadmap
- Module-utils-Roadmap
- Module-vector-search-Roadmap
- Module-voice-Roadmap
- Module-whisper-Roadmap