Skip to content

Commit b78d0d4

Browse files
committed
Bump HAProxy to 3.2.16-r0 and upstream to ls78
- Update HAProxy pin from 3.2.15-r0 to 3.2.16-r0 - Update upstream LinuxServer reference to 3.2.16-r0-ls78 - Add scripts/check-updates.sh for automated dependency checking - Fix stale base image pin in Makefile (3.21 -> 3.23) - Improve fs-update skill with exact extraction commands, git safety checks, and corrected upstream URL/path
1 parent 4efd967 commit b78d0d4

8 files changed

Lines changed: 342 additions & 49 deletions

File tree

.claude/skills/fs-update/SKILL.md

Lines changed: 110 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,97 @@ User invokes `/fs-update`.
1414

1515
## Workflow
1616

17-
### Step 1: Sync with remote
17+
### Step 1: Sync with remote and verify repository state
18+
19+
```bash
20+
# Ensure we are on the main branch
21+
git rev-parse --abbrev-ref HEAD
22+
```
23+
24+
Abort with a warning if not on `main`.
25+
26+
```bash
27+
# Ensure working tree is clean
28+
git diff --quiet && git diff --cached --quiet
29+
```
30+
31+
If there are uncommitted changes, stash them or abort and warn the user.
1832

1933
```bash
2034
git pull
2135
```
2236

23-
### Step 2: Check all dependencies (run in parallel)
37+
### Step 2: Check all dependencies
38+
39+
Run the automated checker script first:
2440

25-
#### 2a. HA base image
41+
```bash
42+
./scripts/check-updates.sh
43+
```
2644

27-
Read the current base image tag from `socket-proxy/build.yaml`. Then check for the latest available tag:
45+
This script extracts current pins and queries remote APIs / Docker for latest versions. It exits non-zero when updates are available and prints a summary table.
2846

47+
If the script is missing or a check fails, fall back to the manual checks below.
48+
49+
#### Manual fallback checks
50+
51+
**2a. HA base image**
52+
53+
Current tag (extract with):
2954
```bash
30-
# Check what's available — look at the GitHub container registry
55+
grep -oP 'amd64-base:\K[0-9.]+' socket-proxy/build.yaml
3156
```
3257

33-
Use `WebFetch` to check `https://github.com/home-assistant/docker-base/pkgs/container/amd64-base` for the latest tag. Compare to the current pin in `socket-proxy/build.yaml`.
58+
Latest: use `FetchURL` on `https://github.com/home-assistant/docker-base/pkgs/container/amd64-base` or query Alpine Docker Hub as a proxy:
59+
```bash
60+
curl -s "https://hub.docker.com/v2/repositories/library/alpine/tags/?name=3.&page_size=20" | jq -r '.results[].name' | grep -E '^3\.[0-9]+$' | sort -V | tail -1
61+
```
3462

35-
#### 2b. HAProxy version
63+
**2b. HAProxy version**
3664

37-
Check what HAProxy version is available in the **current** (and if changed, the **new**) base image:
65+
Current pin (extract with):
66+
```bash
67+
grep -oP 'haproxy=\K[0-9.r-]+' socket-proxy/Dockerfile
68+
```
3869

70+
Latest in the current base image:
3971
```bash
40-
docker run --rm ghcr.io/home-assistant/amd64-base:<TAG> sh -c "apk update >/dev/null 2>&1 && apk list -a haproxy"
72+
docker run --rm ghcr.io/home-assistant/amd64-base:<TAG> sh -c "apk update >/dev/null 2>&1 && apk list -a haproxy" | grep -oP 'haproxy-\K[0-9.r-]+' | head -1
4173
```
4274

43-
Compare to the pin in `socket-proxy/Dockerfile` (the `apk add --no-cache haproxy=X.X.X` line).
75+
> If Docker is unavailable, skip this check and note it in the report.
4476
45-
If the base image is being updated, re-check HAProxy availability in the new image.
77+
**2c. Upstream LinuxServer**
4678

47-
#### 2c. Upstream LinuxServer
79+
Current pin (extract with):
80+
```bash
81+
grep -oP 'UPSTREAM_PIN="linuxserver/docker-socket-proxy:\K[^"]+' socket-proxy/rootfs/etc/services.d/socket-proxy/run
82+
```
4883

49-
Use `WebFetch` to check `https://github.com/linuxserver/docker-socket-proxy/releases` for the latest release tag. Compare to:
50-
- The comment in `socket-proxy/build.yaml` line 1
51-
- The `UPSTREAM_PIN` variable in `socket-proxy/rootfs/etc/services.d/socket-proxy/run`
84+
Latest release: use `FetchURL` on `https://github.com/linuxserver/docker-socket-proxy/releases/latest` (redirects to the latest release page) or:
85+
```bash
86+
curl -s "https://api.github.com/repos/linuxserver/docker-socket-proxy/releases/latest" | jq -r '.tag_name'
87+
```
88+
89+
**2d. Pre-commit hooks**
90+
91+
```bash
92+
pre-commit autoupdate --dry-run 2>&1 || echo "pre-commit not available"
93+
```
5294

53-
#### 2d. Pre-commit hooks
95+
**2e. GitHub Actions versions**
5496

97+
Current pins (extract with):
5598
```bash
56-
cd /home/ferg/code/ha_app_socket_proxy && pre-commit autoupdate --dry-run 2>&1 || echo "pre-commit not available"
99+
grep -oP 'uses:[[:space:]]+\K[^@]+@[^[:space:]]+' .github/workflows/ci.yaml | sort -u
57100
```
58101

59-
#### 2e. GitHub Actions versions
102+
For each unique `owner/repo@vN`, use `FetchURL` on `https://github.com/{owner}/{repo}/releases/latest` or:
103+
```bash
104+
curl -s "https://api.github.com/repos/{owner}/{repo}/releases/latest" | jq -r '.tag_name'
105+
```
60106

61-
Read `.github/workflows/ci.yaml` and note every pinned action (e.g. `actions/checkout@v4`, `actions/setup-python@v5`). For each action, use `WebFetch` to check the latest major version tag on GitHub (e.g. `https://github.com/actions/checkout/releases/latest` and `https://github.com/actions/setup-python/releases/latest`). Compare to the versions pinned in the workflow file.
107+
Only flag an update when the **major version** changes (e.g. `v5``v6`).
62108

63109
### Step 3: Report findings
64110

@@ -67,11 +113,11 @@ Present a markdown summary table:
67113
| Dependency | Current | Latest | Update needed? |
68114
|---|---|---|---|
69115
| HA base image | 3.23 | ... | ... |
70-
| HAProxy | 3.2.13-r0 | ... | ... |
71-
| Upstream LS | 3.2.13-r0-ls70 | ... | ... |
116+
| HAProxy | 3.2.15-r0 | ... | ... |
117+
| Upstream LS | 3.2.15-r0-ls75 | ... | ... |
72118
| Pre-commit hooks | ... | ... | ... |
73-
| actions/checkout | v4 | ... | ... |
74-
| actions/setup-python | v5 | ... | ... |
119+
| actions/checkout | v6 | ... | ... |
120+
| actions/setup-python | v6 | ... | ... |
75121

76122
**If nothing needs updating, stop here and inform the user.**
77123

@@ -81,27 +127,24 @@ Update files per dependency type. Always read each file before editing.
81127

82128
#### HA base image update
83129
- `socket-proxy/build.yaml` — both `aarch64` and `amd64` entries
84-
- `CLAUDE.md`version pins section and any build commands referencing the tag
85-
- `/home/ferg/.claude/projects/-home-ferg-code-ha-app-socket_proxy/memory/MEMORY.md`version pins
130+
- `Makefile``BUILD_FROM` in the `build` target
131+
- `tests/test_addon.sh`the `docker build` command in the "Docker build" section
86132

87133
#### HAProxy update
88134
- `socket-proxy/Dockerfile` — the `apk add --no-cache haproxy=` line
89-
- `CLAUDE.md` — version pins section
90-
- `/home/ferg/.claude/projects/-home-ferg-code-ha-app-socket-proxy/memory/MEMORY.md` — version pins
91135

92136
#### Upstream LinuxServer update
93137
- `socket-proxy/build.yaml` — line 1 comment
94138
- `socket-proxy/rootfs/etc/services.d/socket-proxy/run``UPSTREAM_PIN` variable
95-
- `socket-proxy/rootfs/templates/haproxy.cfg` — fetch the upstream file from `https://raw.githubusercontent.com/linuxserver/docker-socket-proxy/main/root/defaults/haproxy.cfg` and diff against the local copy. If changed, replace the local copy entirely.
96-
- If upstream added new ACL endpoints, also update these files per the consistency requirements in CLAUDE.md:
139+
- `socket-proxy/rootfs/templates/haproxy.cfg` — fetch the upstream file from `https://raw.githubusercontent.com/linuxserver/docker-socket-proxy/main/root/templates/haproxy.cfg` (note: path changed from `root/defaults/` to `root/templates/`) and diff against the local copy. Do **not** blindly replace the local copy — this project adds custom `@@ALLOWED_SRC_ACL@@` and `@@ALLOWED_SRC_REJECT@@` placeholders and an attribution header that upstream does not have. Only adopt new upstream ACL endpoint rules or other structural changes, preserving the local additions.
140+
- If upstream added new ACL endpoints, also update these files per the consistency requirements in `AGENTS.md`:
97141
- `socket-proxy/config.yaml` — new schema entry with default value
98142
- `socket-proxy/rootfs/etc/services.d/socket-proxy/run` — bashio read + env var export
99143
- `socket-proxy/translations/en.yaml` — UI label and description
100-
- `CLAUDE.md` — upstream reference
101144

102145
#### Pre-commit hooks update
103146
```bash
104-
cd /home/ferg/code/ha_app_socket_proxy && pre-commit autoupdate
147+
pre-commit autoupdate
105148
```
106149

107150
#### GitHub Actions update
@@ -110,49 +153,73 @@ Edit `.github/workflows/ci.yaml` to update any pinned action versions to their l
110153
### Step 5: Bump version
111154

112155
Determine bump type:
113-
- **Patch** — dependency-only updates (base image, HAProxy pin, pre-commit hooks)
156+
- **Patch** — dependency-only updates (base image, HAProxy pin, pre-commit hooks, GitHub Actions)
114157
- **Minor** — upstream LinuxServer update that adds new features/endpoints
158+
- **Major** — breaking changes (rare for this add-on)
115159

116160
Update these files (read each first):
117161
1. `socket-proxy/config.yaml``version` field (line 6)
118162
2. `socket-proxy/rootfs/etc/services.d/socket-proxy/run``ADDON_VERSION` variable (keep in sync with config.yaml)
119-
3. `socket-proxy/CHANGELOG.md` — add new version entry at the top, below the `# Changelog` heading
163+
3. `socket-proxy/CHANGELOG.md` — add new version entry at the top, below the `# Changelog` heading. Follow the existing format:
164+
165+
```markdown
166+
## X.Y.Z
167+
168+
- Bump HAProxy from A.B.C-rX to D.E.F-rY
169+
- Bump upstream reference to linuxserver/docker-socket-proxy D.E.F-rY-lsZ
170+
- Update pre-commit hooks: ...
171+
- Update GitHub Actions: ...
172+
```
120173

121174
### Step 6: Verify
122175

123-
Run tests and build sequentially:
176+
Run the full verification suite sequentially:
124177

125178
```bash
126-
cd /home/ferg/code/ha_app_socket_proxy && make test
179+
make lint
127180
```
128181

129182
```bash
130-
cd /home/ferg/code/ha_app_socket_proxy && make build
183+
make test
131184
```
132185

133-
If either fails, diagnose and fix before proceeding.
186+
```bash
187+
make build
188+
```
189+
190+
If any step fails, diagnose and fix before proceeding. Do not commit broken changes.
134191

135192
### Step 7: Commit and push
136193

137-
Stage changed files explicitly (never use `git add -A` or `git add .`):
194+
Stage changed files explicitly (never use `git add -A` or `git add .`). Use `git status` to see which files were actually modified, then stage only those:
138195

139196
```bash
140197
git add socket-proxy/Dockerfile socket-proxy/build.yaml socket-proxy/config.yaml \
141198
socket-proxy/CHANGELOG.md socket-proxy/rootfs/etc/services.d/socket-proxy/run \
142-
socket-proxy/rootfs/templates/haproxy.cfg CLAUDE.md \
199+
socket-proxy/rootfs/templates/haproxy.cfg \
143200
.pre-commit-config.yaml socket-proxy/translations/en.yaml \
144201
.github/workflows/ci.yaml
145202
```
146203

147-
Only stage files that were actually modified. Use `git status` to confirm.
204+
Only stage files that were actually modified. Verify with:
205+
206+
```bash
207+
git diff --cached --name-only
208+
```
209+
210+
If no files are staged, stop and inform the user.
211+
212+
Commit with a descriptive message summarizing what was updated. Make no reference to Claude, Anthropic, or AI in the commit message. Example formats:
148213

149-
Commit with a descriptive message summarizing what was updated. Make no reference to Claude or Anthropic in the commit message. Example format:
214+
```
215+
Bump HAProxy to 3.2.16-r0 and upstream to ls78
216+
```
150217

151218
```
152-
Bump HAProxy to X.X.X and base image to Y.Y
219+
Bump base image to Alpine 3.24 and HAProxy to 3.2.17-r0
153220
```
154221

155-
Then push:
222+
Then push only if there is a commit to push:
156223

157224
```bash
158225
git push

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test:
1919

2020
build:
2121
docker build \
22-
--build-arg BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.21 \
22+
--build-arg BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.23 \
2323
-t socket-proxy-test \
2424
socket-proxy/
2525

0 commit comments

Comments
 (0)