Skip to content

Align meshtasticd packaging with upstream - #80

Merged
vidplace7 merged 1 commit into
mainfrom
upstream-meshtasticd
Jul 1, 2026
Merged

Align meshtasticd packaging with upstream#80
vidplace7 merged 1 commit into
mainfrom
upstream-meshtasticd

Conversation

@vidplace7

@vidplace7 vidplace7 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Align with @GeorgeSapkin's work upstream.
Look how much cleaner this is ❤️

Summary by CodeRabbit

  • New Features

    • Split the release into separate firmware and web-interface components for more flexible installation.
    • The web UI assets are now packaged and installed automatically on the device.
    • Added a UCI-based configuration entry to define the firmware’s config and data locations.
  • Bug Fixes

    • Improved service startup to load and validate configuration from UCI, create required runtime directories, and start the daemon with the correct config.yaml and config.d/*.
    • Updated reload handling to better match OpenWrt service conventions.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 10fb063c-b79a-4ddf-8f16-99c2e995d658

📥 Commits

Reviewing files that changed from the base of the PR and between ac694ce and d2a225e.

📒 Files selected for processing (4)
  • meshtasticd-web/Makefile
  • meshtasticd/Makefile
  • meshtasticd/files/meshtasticd.conf
  • meshtasticd/files/meshtasticd.init
💤 Files with no reviewable changes (1)
  • meshtasticd-web/Makefile
🚧 Files skipped from review as they are similar to previous changes (3)
  • meshtasticd/files/meshtasticd.conf
  • meshtasticd/files/meshtasticd.init
  • meshtasticd/Makefile

📝 Walkthrough

Walkthrough

This PR splits meshtasticd packaging into separate full firmware and web asset packages, adds a frontend download and build step, updates install and package targets, and changes the init script and UCI config to use derived config and data directories.

Changes

Meshtasticd Package Split

Layer / File(s) Summary
Package metadata and dependency restructuring
meshtasticd/Makefile
Updates package metadata, source version handling, maintainer and license fields, frontend version variables, and build dependency inputs.
New package definitions and frontend download
meshtasticd/Makefile
Defines the meshtasticd-full, meshtasticd-web, and meshtasticd-avahi-service packages and adds the frontend tarball download stanza.
Frontend preparation and full firmware compile
meshtasticd/Makefile
Adds frontend extraction and decompression during prepare, then compiles the firmware in a dedicated full build directory with updated PlatformIO flags.
Install paths, conffiles, and package targets
meshtasticd/Makefile
Installs the firmware, web assets, and configuration directories for the new packages, updates conffiles, and changes the final package build targets.
UCI config and init script for derived directories
meshtasticd/files/meshtasticd.conf, meshtasticd/files/meshtasticd.init
Adds UCI options for config and data directories, rewrites start_service() to load and validate them, and keeps the reload trigger registration in the init script.

Sequence Diagram(s)

sequenceDiagram
  participant Makefile as meshtasticd/Makefile
  participant Frontend as frontend tarball
  participant FullBuild as Build/Compile/meshtasticd-full

  Makefile->>Frontend: Download/meshtasticd-web fetches tarball
  Makefile->>Makefile: Build/Prepare/meshtasticd-web extracts assets
  Makefile->>FullBuild: Build/Compile/meshtasticd-full runs platformio
  FullBuild-->>Makefile: emits firmware binary from full build directory
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

A rabbit hops through build and breeze,
Splitting web from firmware with ease.
UCI points the way at night,
procd starts each path just right,
🐇 hop-hop—everything feels snug and sleazy!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: reorganizing meshtasticd packaging to match upstream packaging structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@meshtasticd/files/meshtasticd.init`:
- Around line 14-20: The init script is loading the wrong UCI package, so the
`config_dir` and `data_dir` overrides from `/etc/config/meshtasticd` are never
read. Update the `config_load` call in `meshtasticd.init` to load the
`meshtasticd` package instead of `meshtastic`, keeping the existing
`uci_validate_section` handling for `meshtasticd` intact so startup uses the
configured values.
- Around line 25-28: The startup path in meshtasticd.init does not fail fast
when preparing data_dir, so a bad UCI value or permission issue can still let
the service continue in the wrong directory. Update the init flow around the
mkdir -p and cd logic to explicitly check each operation’s return status and
abort startup if either fails, keeping the behavior localized to the data_dir
setup before the daemon is launched.

In `@meshtasticd/Makefile`:
- Around line 177-189: The `/etc/meshtasticd/ssl` directory is currently being
created by the meshtasticd-web install logic while being marked persistent by
meshtasticd-full, so ownership is split across packages. Update the Makefile so
the package that declares the conffile also creates and owns that path: either
add the directory creation to meshtasticd-full/install or move the conffile
entry into meshtasticd-web/conffiles, and keep the related install/conffile
symbols consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 16d9b644-c294-447a-a419-01354b993a91

📥 Commits

Reviewing files that changed from the base of the PR and between 98f9ea9 and ac694ce.

📒 Files selected for processing (4)
  • meshtasticd-web/Makefile
  • meshtasticd/Makefile
  • meshtasticd/files/meshtasticd.conf
  • meshtasticd/files/meshtasticd.init
💤 Files with no reviewable changes (1)
  • meshtasticd-web/Makefile

Comment thread meshtasticd/files/meshtasticd.init
Comment thread meshtasticd/files/meshtasticd.init
Comment thread meshtasticd/Makefile
@vidplace7
vidplace7 force-pushed the upstream-meshtasticd branch from ac694ce to d2a225e Compare June 30, 2026 22:22
@vidplace7
vidplace7 merged commit 46c8f3f into main Jul 1, 2026
11 checks passed
@vidplace7
vidplace7 deleted the upstream-meshtasticd branch July 1, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant