Skip to content

Commit 2c30bcf

Browse files
authored
Merge pull request #93 from hatlabs/feat/rename-package-to-halpid
Rename Debian package from halpi2-rust-daemon to halpid
2 parents 5bdcd68 + 3f28c48 commit 2c30bcf

9 files changed

Lines changed: 74 additions & 46 deletions

File tree

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 5.0.0
2+
current_version = 5.0.1
33
commit = True
44
tag = False
55

.github/scripts/generate-release-notes.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fi
3131
case "$RELEASE_TYPE" in
3232
prerelease)
3333
cat > release_notes.md <<EOF
34-
## HALPI2 Rust Daemon v${TAG_VERSION} (Pre-release)
34+
## halpid v${TAG_VERSION} (Pre-release)
3535
3636
⚠️ **This is a pre-release build from the main branch. Use for testing only.**
3737
@@ -56,17 +56,17 @@ echo "deb [signed-by=/usr/share/keyrings/hatlabs-apt-key.gpg] https://apt.hatlab
5656
5757
# Update and install
5858
sudo apt update
59-
sudo apt install halpi2-rust-daemon
59+
sudo apt install halpid
6060
\`\`\`
6161
6262
EOF
6363
;;
6464

6565
draft)
6666
cat > release_notes.md <<EOF
67-
## HALPI2 Rust Daemon v${VERSION}
67+
## halpid v${VERSION}
6868
69-
High-performance Rust reimplementation of the HALPI2 power monitor and watchdog daemon.
69+
HALPI2 power monitoring and watchdog daemon.
7070
7171
### Changes
7272
@@ -87,7 +87,7 @@ ${CHANGELOG}
8787
This is the source code release. For Debian packages:
8888
8989
\`\`\`bash
90-
sudo apt install halpi2-rust-daemon
90+
sudo apt install halpid
9191
\`\`\`
9292
9393
See [apt.hatlabs.fi](https://github.com/hatlabs/apt.hatlabs.fi) for repository setup.
@@ -102,9 +102,9 @@ EOF
102102

103103
stable)
104104
cat > release_notes.md <<EOF
105-
## HALPI2 Rust Daemon v${VERSION}
105+
## halpid v${VERSION}
106106
107-
High-performance Rust reimplementation of the HALPI2 power monitor and watchdog daemon.
107+
HALPI2 power monitoring and watchdog daemon.
108108
109109
### Changes
110110
@@ -125,7 +125,7 @@ ${CHANGELOG}
125125
This is the source code release. For Debian packages:
126126
127127
\`\`\`bash
128-
sudo apt install halpi2-rust-daemon
128+
sudo apt install halpid
129129
\`\`\`
130130
131131
See [apt.hatlabs.fi](https://github.com/hatlabs/apt.hatlabs.fi) for repository setup.

.github/scripts/rename-packages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ -z "$VERSION" ] || [ -z "$DISTRO" ] || [ -z "$COMPONENT" ]; then
3838
fi
3939

4040
# Package name and architecture (ARM64 for Raspberry Pi)
41-
PACKAGE_NAME="halpi2-rust-daemon"
41+
PACKAGE_NAME="halpid"
4242
ARCH="arm64"
4343

4444
# cargo-deb now receives the correct Debian version via --deb-version

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
build-release:
1414
uses: hatlabs/shared-workflows/.github/workflows/build-release.yml@main
1515
with:
16-
package-name: halpi2-rust-daemon
17-
package-description: 'HALPI2 hardware daemon (Rust implementation)'
16+
package-name: halpid
17+
package-description: 'HALPI2 power monitoring and watchdog daemon'
1818
apt-distro: any
1919
apt-component: hatlabs
2020
secrets:

AGENTS.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
HALPI2 Rust Daemon is a reimplementation of the HALPI2 power monitor and watchdog daemon in Rust for improved performance, reliability, and resource utilization. It maintains 100% API compatibility with the Python `halpid` version 4.x.
7+
HALPI2 Rust Daemon (`halpid`) is the power monitor and watchdog daemon for HALPI2, written in Rust. It is 100% API-compatible with the legacy Python `halpid` version 4.x.
88

99
## Development Environment
1010

@@ -19,7 +19,7 @@ Open the project in VSCode and select "Reopen in Container". This provides:
1919
### Option 2: Cross-Compilation (Limited)
2020
Cross-compilation from macOS works for building but NOT for testing:
2121
```bash
22-
./run build:cross --release # Compiles for ARM64 Linux
22+
./run cross-build --release # Compiles for ARM64 Linux
2323
```
2424
Note: Tests cannot run via cross-compilation - use dev container instead.
2525

@@ -32,52 +32,57 @@ Use the `./run` script for all development tasks:
3232

3333
### Core Development
3434
- `./run build [--release]` - Build all workspace members
35-
- `./run build:daemon [--release]` - Build halpid daemon only
36-
- `./run build:cli [--release]` - Build halpi CLI only
35+
- `./run build-daemon [--release]` - Build halpid daemon only
36+
- `./run build-cli [--release]` - Build halpi CLI only
3737
- `./run clean` - Clean all build artifacts
3838
- `./run check` - Run cargo check and clippy
39-
- `./run fmt` - Format code with rustfmt
40-
- `./run fmt:check` - Check code formatting
39+
- `./run format` - Format code with rustfmt
40+
- `./run check-format` - Check code formatting
4141

4242
### Cross-Compilation
43-
- `./run build:cross [--release]` - Build for ARM64 Linux (aarch64-unknown-linux-musl)
44-
- `./run cross:setup` - Install cross-compilation tools
43+
- `./run cross-build [--release]` - Build for ARM64 Linux (aarch64-unknown-linux-musl)
44+
- `./run setup-cross` - Install cross-compilation tools
4545

4646
### Testing
4747
- `./run test` - Run all tests
48-
- `./run test:unit` - Run unit tests only
49-
- `./run test:integration` - Run integration tests only
50-
- `./run test:coverage` - Run tests with coverage report
48+
- `./run test-unit` - Run unit tests only
49+
- `./run test-integration` - Run integration tests only
50+
- `./run test-coverage` - Run tests with coverage report
5151

5252
### Package Management
53-
- `./run package:deb` - Build Debian package (native)
54-
- `./run package:deb:cross` - Build Debian package for ARM64
53+
- `./run build-deb` - Build Debian package (native)
54+
- `./run cross-build-deb` - Build Debian package for ARM64
55+
56+
### Docker Build (for macOS/non-Linux development)
57+
- `./run docker-build [--release]` - Build in Docker container
58+
- `./run docker-cross-build [--release]` - Cross-compile for ARM64 Linux in Docker
59+
- `./run docker-build-deb` - Build Debian package for ARM64 in Docker
5560

5661
### Development Utilities
57-
- `./run dev:daemon` - Run daemon in development mode
58-
- `./run dev:clean:all` - Deep clean (cargo + artifacts + packages)
59-
- `./run dev:version:bump <version>` - Bump version to specified version
60-
- `./run dev:version:show` - Show current version
62+
- `./run run-daemon` - Run daemon in development mode
63+
- `./run clean-all` - Deep clean (cargo + artifacts + packages)
64+
- `./run bumpversion <version>` - Bump version to specified version
65+
- `./run version` - Show current version
6166

6267
### CI/CD
63-
- `./run ci:check` - Run CI verification checks
64-
- `./run ci:build` - Full CI build pipeline
68+
- `./run ci-check` - Run CI verification checks
69+
- `./run ci-build` - Full CI build pipeline
6570

6671
### Common Workflows
6772
```bash
6873
# Development cycle
69-
./run build && ./run dev:daemon
74+
./run build && ./run run-daemon
7075

7176
# Full check before commit
72-
./run ci:check
77+
./run ci-check
7378

7479
# Build release for Raspberry Pi
75-
./run build:cross --release
76-
./run package:deb:cross
80+
./run cross-build --release
81+
./run cross-build-deb
7782

7883
# Version management
79-
./run dev:version:show
80-
./run dev:version:bump 5.1.0
84+
./run version
85+
./run bumpversion 5.1.0
8186
```
8287

8388
## Pre-Commit Checklist for Claude Code
@@ -217,7 +222,7 @@ When implementing features, always verify compatibility with the Python version:
217222
**Important**: This daemon is Linux-only. It cannot be built natively on macOS or other platforms due to I2C hardware dependencies (the `i2cdev` crate requires Linux).
218223

219224
**Development Workflow**:
220-
- **On macOS**: Use `./run build:cross` which compiles FOR Linux (target_os = "linux"), so all Linux-specific code is active
225+
- **On macOS**: Use `./run cross-build` which compiles FOR Linux (target_os = "linux"), so all Linux-specific code is active
221226
- **Testing on macOS**: Run tests in Docker container (Linux environment)
222227
- **On Linux**: Native builds work fine with `./run build`
223228

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ members = ["halpid", "halpi", "halpi-common"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "5.0.0"
6+
version = "5.0.1"
77
authors = ["Matti Airas <matti.airas@hatlabs.fi>"]
88
edition = "2024"
99
rust-version = "1.90"
1010
license = "BSD-3-Clause"
1111
repository = "https://github.com/hatlabs/HALPI2-rust-daemon"
1212
homepage = "https://docs.hatlabs.fi/halpi2"
1313

14+
[profile.release]
15+
strip = true
16+
1417
[workspace.dependencies]
1518
# Async runtime
1619
tokio = { version = "1.42", features = ["full"] }

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0
1+
5.0.1

halpid/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ name = "halpid"
3939
path = "src/main.rs"
4040

4141
[package.metadata.deb]
42-
name = "halpi2-rust-daemon"
43-
conflicts = "halpid"
44-
replaces = "halpid"
45-
provides = "halpid"
42+
name = "halpid"
43+
conflicts = "halpi2-rust-daemon"
44+
replaces = "halpi2-rust-daemon"
45+
provides = "halpi2-rust-daemon"
4646
maintainer = "Hat Labs Ltd. <info@hatlabs.fi>"
4747
copyright = "2025, Hat Labs Ltd."
4848
license-file = ["../LICENSE", "0"]
4949
extended-description = """\
50-
HALPI2 power monitoring and watchdog daemon (Rust implementation).
50+
HALPI2 power monitoring and watchdog daemon.
5151
Provides power management, blackout detection, and hardware watchdog
5252
functionality for HALPI2 Raspberry Pi CM4/CM5 carrier boards."""
53-
depends = "$auto"
5453
section = "admin"
5554
priority = "optional"
5655
assets = [
5756
["target/release/halpid", "usr/bin/", "755"],
5857
["target/release/halpi", "usr/bin/", "755"],
5958
["../config/halpid.conf", "etc/halpid/halpid.conf", "644"],
59+
["debian/lintian-overrides", "usr/share/lintian/overrides/halpid", "644"],
6060
]
6161
conf-files = [
6262
"/etc/halpid/halpid.conf",

halpid/debian/lintian-overrides

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Statically linked musl binaries are intentional for zero-dependency deployment
2+
halpid: statically-linked-binary [usr/bin/halpi]
3+
halpid: statically-linked-binary [usr/bin/halpid]
4+
5+
# Static binary embeds libyaml (unsafe-libyaml crate) by design
6+
halpid: embedded-library libyaml [usr/bin/halpid]
7+
8+
# cargo-deb does not generate Debian changelogs
9+
halpid: no-changelog *
10+
11+
# Static musl binary has no dynamic dependencies
12+
halpid: empty-field Depends
13+
14+
# HALPI2 only runs on systemd-based systems (Raspberry Pi OS / HaLOS)
15+
halpid: maintainer-script-calls-systemctl [postinst:*]
16+
halpid: maintainer-script-calls-systemctl [prerm:*]
17+
18+
# Man pages not yet provided
19+
halpid: no-manual-page [usr/bin/halpi]
20+
halpid: no-manual-page [usr/bin/halpid]

0 commit comments

Comments
 (0)