All six steps for building Debian, Fedora, Docker, and GitHub Actions workflows have been successfully implemented!
Files created in debian/ directory:
debian/control- Package metadata, dependencies, and descriptiondebian/rules- Build rules for the packagedebian/changelog- Version historydebian/compat- Compatibility version (13)debian/.gitignore- Git ignore patterns for build artifacts
Key features:
- Targets Debian/Ubuntu
- Builds release
.debpackages for meshcore-cli and missing Python dependencies - Uses Python 3.10+ requirement
- Includes comprehensive package description
Build locally:
debuild -us -uc -b
# Or
dpkg-buildpackage -us -uc -bFile created:
meshcore-cli.spec- RPM specification file
Key features:
- Targets Fedora/RHEL
- Includes all runtime dependencies
- Multi-stage build support
- Man page generation included
- License: MIT
Build locally:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp meshcore-cli.spec ~/rpmbuild/SPECS/
git archive --prefix=meshcore-cli-1.5.7/ --format=tar.gz \
-o ~/rpmbuild/SOURCES/meshcore-cli-1.5.7.tar.gz HEAD
rpmbuild -bb ~/rpmbuild/SPECS/meshcore-cli.specFile created:
Dockerfile- Multi-stage Docker build
Key features:
- Multi-stage build for smaller image size
- Builder stage: Compiles the package
- Runtime stage: Lightweight Python 3.10 base
- Non-root user (meshcore) with UID 1000
- Proper entrypoint:
meshclicommand - Support for all connection types (BLE, TCP, Serial)
- Includes necessary system libraries (dbus, glib2)
Build locally:
docker build -t meshcore-cli:latest .Run the container:
docker run --rm meshcore-cli:latest -h
docker run --rm meshcore-cli:latest -v
docker run -it --device=/dev/ttyUSB0 meshcore-cli:latest chatFile created:
docs/meshcli.1- Complete man page (troff format)
Sections included:
- NAME - Brief description
- SYNOPSIS - Usage syntax
- DESCRIPTION - Detailed explanation
- OPTIONS - All command-line flags with descriptions
- COMMANDS - All available commands organized by category
- CONFIGURATION FILES - Config file locations and purposes
- OUTPUT MODES - JSON and text output explanation
- EXAMPLES - Real-world usage examples
- AUTHOR - Maintainer information
- LICENSE - MIT License reference
Access the man page:
man ./docs/meshcli.1File created:
.github/workflows/build-deb.yml
Workflow features:
- Triggers on: Git tags (v*) and manual dispatch
- Runs on: Debian Bookworm container
- Installs all build dependencies automatically
- Builds separate
.debpackages for meshcore-cli Python dependencies - Builds .deb package using debuild
- Uploads artifacts to workflow (30-day retention)
- Creates GitHub Release with all .deb and .changes files
- Permissions: Write access to contents
Triggered by:
git tag -a v1.5.8 -m "Release 1.5.8"
git push origin v1.5.8File created:
.github/workflows/build-docker.yml
Workflow features:
- Triggers on:
- Pushes to
mainanddevelopbranches - Git tags (v*)
- Pull requests to
main - Manual dispatch
- Pushes to
- Uses Docker buildx for multi-platform builds
- Supports: linux/amd64 and linux/arm64
- Pushes to GitHub Container Registry (GHCR)
- Cache optimization enabled
- Automatic tagging strategy:
latest(for main branch)<branch-name>(for branch pushes)<version>(for semantic version tags)<short-sha>(for commit references)
Registry: ghcr.io/<owner>/meshcore-cli
Pull image:
docker pull ghcr.io/fdlamotte/meshcore-cli:latest
docker pull ghcr.io/fdlamotte/meshcore-cli:v1.5.8.dockerignore- Excludes unnecessary files from Docker build contextBUILDING.md- Comprehensive guide for building locally- Detailed prerequisites for each platform
- Step-by-step build instructions
- Installation verification steps
- Troubleshooting section
- Release procedure
meshcore-cli/
├── debian/ # Debian packaging
│ ├── control # Package metadata
│ ├── rules # Build rules
│ ├── changelog # Version history
│ ├── compat # Compatibility version
│ └── .gitignore
├── docs/
│ └── meshcli.1 # Man page
├── .github/workflows/
│ ├── build-deb.yml # Debian build workflow
│ ├── build-rpm.yml # RPM build workflow
│ └── build-docker.yml # Docker build workflow
├── meshcore-cli.spec # Fedora RPM spec
├── Dockerfile # Docker image definition
├── .dockerignore # Docker build exclusions
└── BUILDING.md # Build documentation
# Update pyproject.toml
sed -i 's/version = "1.5.7"/version = "1.5.8"/' pyproject.toml
# Update debian/changelog
dch -i -v 1.5.8-1 -D unstable "Release 1.5.8"
# Update meshcore-cli.spec
sed -i 's/Version: 1.5.7/Version: 1.5.8/' meshcore-cli.specgit add .
git commit -m "Release version 1.5.8"
git tag -a v1.5.8 -m "Release meshcore-cli 1.5.8"
git push origin main --follow-tags- ✅ Debian .deb package set built and uploaded to Releases
- ✅ Fedora .rpm package built and uploaded to Releases
- ✅ Docker image built and pushed to GHCR
# Check GitHub Releases page for .deb package set and .rpm
# Docker image available at:
docker pull ghcr.io/fdlamotte/meshcore-cli:v1.5.8Users can now install meshcore-cli via:
- Debian/Ubuntu: download all Debian
.debassets, then runsudo apt install ./*.deb - Fedora/RHEL: download all RPM assets, then run
sudo dnf install ./*.rpm - Docker:
docker pull ghcr.io/fdlamotte/meshcore-cli:v1.5.8 - pipx (original):
pipx install meshcore-cli - Nix:
nix run github:meshcore-dev/meshcore-cli#meshcore-cli
- PyPI Publishing: Add
publish-to-pypi.ymlworkflow - Security Scanning: Add Trivy or Snyk for vulnerability scanning
- Automated Testing: Add CI workflow for running tests on push
- Changelog Auto-generation: Add release notes automation
- Container Registry Alternatives: Support Docker Hub, Quay.io, etc.
- Debian Packaging: debian/
- RPM Packaging: meshcore-cli.spec
- Docker: Dockerfile
- Documentation: BUILDING.md
- Man Page: docs/meshcli.1
- GitHub Actions: .github/workflows/
All configurations are ready to use. Simply push a git tag to trigger the build pipelines!