Skip to content

Commit 96101ca

Browse files
hrodrigcursoragent
andcommitted
docs(bsd): sync port examples to 1.0.0
Align FreeBSD/OpenBSD port docs with v1.0.0 tarballs and databases: (drop top-level db:). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fc602a6 commit 96101ca

7 files changed

Lines changed: 31 additions & 31 deletions

File tree

contrib/BSD-PORTS-STEP-BY-STEP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Use when you want to test the port **before** GoReleaser publishes assets.
9191

9292
1. Complete application release: **`make release-check`**, merge **`develop``main`**, tag **`v<VERSION>`**, CI/GoReleaser publishes assets.
9393
2. Confirm on [GitHub Releases](https://github.com/hrodrig/pgwd/releases), for example:
94-
- `pgwd_v0.6.7_openbsd_amd64.tar.gz`
95-
- `pgwd_v0.6.7_freebsd_amd64.tar.gz`
94+
- `pgwd_v1.0.0_openbsd_amd64.tar.gz`
95+
- `pgwd_v1.0.0_freebsd_amd64.tar.gz`
9696
- `.deb`, `.rpm`, Linux archives, container image, etc.
9797
3. **`gmake port-openbsd-sync`** (and **`port-freebsd-sync`** if needed) on **`main`** or **`develop`** at the released **`VERSION`**.
9898
4. On each BSD VM: refresh **`/usr/ports/sysutils/pgwd`**, **`make fetch`** (or copy distfile to **`DISTDIR`**), **`make makesum`**, **`make package FETCH_PACKAGES=No`**, **`make install`**.

contrib/freebsd/PORT-RELEASE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Steps to create or update the pgwd port for a new release.
1111

1212
**`ONLY_FOR_ARCHS`** in the port **`Makefile`** must match assets on the GitHub release for that **`PORTVERSION`**:
1313

14-
| FreeBSD `ARCH` | Release tarball suffix | In release today (v0.6.7) |
14+
| FreeBSD `ARCH` | Release tarball suffix | In release today (v1.0.0) |
1515
|----------------|------------------------|---------------------------|
1616
| amd64 | `_freebsd_amd64` | yes |
1717
| aarch64 | `_freebsd_arm64` | yes |
@@ -23,7 +23,7 @@ QA for Bugzilla: document the FreeBSD version and arch you tested (e.g. FreeBSD
2323

2424
1. **Bump version** in `contrib/freebsd/Makefile`:
2525
```bash
26-
# Edit PORTVERSION= 0.5.10 → new version
26+
# Edit PORTVERSION= 1.0.0 → new version
2727
```
2828

2929
2. **Commit and release** pgwd (tag, `make release`). The GitHub release must include **`pgwd_vX.Y.Z_freebsd_amd64.tar.gz`** and **`pgwd_vX.Y.Z_freebsd_arm64.tar.gz`** (see **Supported architectures**). Goreleaser does not publish **freebsd/riscv64** today.
@@ -41,7 +41,7 @@ QA for Bugzilla: document the FreeBSD version and arch you tested (e.g. FreeBSD
4141
1. **Create/checkout branch:**
4242
```bash
4343
cd ~/ports
44-
git checkout -b add-pgwd-port # or update-pgwd-0.5.11 for updates
44+
git checkout -b add-pgwd-port # or update-pgwd-1.0.0 for updates
4545
```
4646

4747
2. **Update files** (if not already copied):
@@ -77,7 +77,7 @@ QA for Bugzilla: document the FreeBSD version and arch you tested (e.g. FreeBSD
7777
7. **Commit:**
7878
```bash
7979
git add sysutils/pgwd/
80-
git commit -m "New port: sysutils/pgwd - Postgres Watch Dog" # or "Update sysutils/pgwd to 0.5.11"
80+
git commit -m "New port: sysutils/pgwd - Postgres Watch Dog" # or "Update sysutils/pgwd to 1.0.0"
8181
```
8282

8383
8. **Submit to Bugzilla:**
@@ -100,7 +100,7 @@ QA for Bugzilla: document the FreeBSD version and arch you tested (e.g. FreeBSD
100100

101101
| Variable | Example |
102102
|----------|---------|
103-
| PORTVERSION | 0.6.7 |
103+
| PORTVERSION | 1.0.0 |
104104
| ONLY_FOR_ARCHS | amd64 aarch64 |
105105
| DISTFILES | pgwd_v${PORTVERSION}_freebsd_${ARCH:S/aarch64/arm64/}.tar.gz |
106106
| MASTER_SITES | https://github.com/hrodrig/pgwd/releases/download/v${PORTVERSION}/ |

contrib/freebsd/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ After `make install` (or `make reinstall`), verify the installed binary:
4242
pgwd -version
4343
```
4444

45-
If `make install` reports that an older package is already installed (for example `pgwd-0.5.10`), use:
45+
If `make install` reports that an older package is already installed (for example `pgwd-0.6.8`), use:
4646

4747
```bash
4848
make reinstall
@@ -54,15 +54,15 @@ This deinstalls the previous package and registers the new one cleanly.
5454

5555
The port normally fetches **DISTFILES** from **MASTER_SITES** (GitHub releases). To build or test **install** / **plist** against a tarball you built locally (no matching release on GitHub yet):
5656

57-
1. **Match the filename** in **DISTFILES** for your architecture (e.g. `pgwd_v0.6.4_freebsd_amd64.tar.gz` when **PORTVERSION** is `0.6.4`). From the pgwd repo root, **`make port-freebsd-sync`** updates **PORTVERSION** in this **Makefile** from the **`VERSION`** file.
57+
1. **Match the filename** in **DISTFILES** for your architecture (e.g. `pgwd_v1.0.0_freebsd_amd64.tar.gz` when **PORTVERSION** is `1.0.0`). From the pgwd repo root, **`make port-freebsd-sync`** updates **PORTVERSION** in this **Makefile** from the **`VERSION`** file.
5858

5959
To generate that exact tarball layout/name locally (without running the full snapshot matrix), run from repo root:
6060

6161
```bash
6262
make dist-freebsd
6363
```
6464

65-
Output goes to `dist/pgwd_v<version>_freebsd_<arch>.tar.gz` using `VERSION` (for example `dist/pgwd_v0.6.4_freebsd_amd64.tar.gz`).
65+
Output goes to `dist/pgwd_v<version>_freebsd_<arch>.tar.gz` using `VERSION` (for example `dist/pgwd_v1.0.0_freebsd_amd64.tar.gz`).
6666

6767
2. **Option A — copy into DISTDIR:** From the port directory:
6868

@@ -79,7 +79,7 @@ The port normally fetches **DISTFILES** from **MASTER_SITES** (GitHub releases).
7979
```bash
8080
cd ~/ports/sysutils/pgwd
8181
mkdir -p /tmp/pgwd-dist
82-
cp /path/to/pgwd/dist/pgwd_v0.6.4_freebsd_amd64.tar.gz /tmp/pgwd-dist/
82+
cp /path/to/pgwd/dist/pgwd_v1.0.0_freebsd_amd64.tar.gz /tmp/pgwd-dist/
8383
make makesum MASTER_SITES=file:///tmp/pgwd-dist/
8484
make fetch MASTER_SITES=file:///tmp/pgwd-dist/
8585
make install
@@ -102,7 +102,7 @@ pgwd reads `/etc/pgwd/pgwd.conf` by default. Copy the example and edit:
102102
```bash
103103
mkdir -p /etc/pgwd
104104
cp /usr/local/etc/pgwd/pgwd.conf.example /etc/pgwd/pgwd.conf
105-
vi /etc/pgwd/pgwd.conf # client, db.url, notifications, etc.
105+
vi /etc/pgwd/pgwd.conf # client, databases[].url, notifications, etc.
106106
```
107107

108108
## Daemon (rc.d)
@@ -206,10 +206,10 @@ interval: 60
206206
dry_run: false
207207

208208
# Deprecated: DISCOVER_MY_PASSWORD removed in 0.9.x — use Secret-backed password in URL
209-
db:
210-
url: "postgres://postgres:YOUR_PASSWORD@localhost:25432/mydb"
211-
threshold:
212-
levels: "75,85,95"
209+
databases:
210+
- url: "postgres://postgres:YOUR_PASSWORD@localhost:25432/mydb"
211+
threshold:
212+
levels: "75,85,95"
213213

214214
kube:
215215
context: "my-context"

contrib/openbsd/PORT-RELEASE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ Use **BSD `make`** inside **`/usr/ports/sysutils/pgwd`**, not **`gmake`** from t
9595

9696
```sh
9797
cd /usr/ports/sysutils/pgwd
98-
ver=$(make -V PKGNAME | sed 's/^pgwd-//') # e.g. 0.6.7
99-
dist=$(make -V DISTFILES) # e.g. pgwd_v0.6.7_openbsd_amd64.tar.gz
98+
ver=$(make -V PKGNAME | sed 's/^pgwd-//') # e.g. 1.0.0
99+
dist=$(make -V DISTFILES) # e.g. pgwd_v1.0.0_openbsd_amd64.tar.gz
100100
echo "PKGNAME=$ver DISTFILES=$dist"
101101
```
102102

@@ -234,7 +234,7 @@ rcctl enable pgwd
234234
```sh
235235
mkdir -p /etc/pgwd
236236
cp /usr/local/share/examples/pgwd/pgwd.conf.example /etc/pgwd/pgwd.conf
237-
vi /etc/pgwd/pgwd.conf # db.url, client, notifications, etc.
237+
vi /etc/pgwd/pgwd.conf # databases[].url, client, notifications, etc.
238238

239239
rcctl start pgwd
240240
rcctl check pgwd # expect pgwd(ok)
@@ -256,7 +256,7 @@ make test-platforms-ping PLATFORM=pgwd-openbsd
256256
make test-platforms PLATFORM=pgwd-openbsd
257257
```
258258

259-
Set **`pgwd_version`** in **`testing/platforms/inventory/hosts.yml`** to match the release (e.g. **`0.6.7`**) or use **`pgwd_local_package`** pointing at **`dist/pgwd_v...tar.gz`**.
259+
Set **`pgwd_version`** in **`testing/platforms/inventory/hosts.yml`** to match the release (e.g. **`1.0.0`**) or use **`pgwd_local_package`** pointing at **`dist/pgwd_v...tar.gz`**.
260260

261261
### B8. Port vs tarball (rc.d location)
262262

@@ -268,7 +268,7 @@ Set **`pgwd_version`** in **`testing/platforms/inventory/hosts.yml`** to match t
268268
### B9. Lab shortcut (no full ports tree)
269269

270270
```sh
271-
doas sh /tmp/pgwd-port/test-install-from-dist.sh /tmp/pgwd_v0.6.7_openbsd_amd64.tar.gz /tmp/pgwd-port
271+
doas sh /tmp/pgwd-port/test-install-from-dist.sh /tmp/pgwd_v1.0.0_openbsd_amd64.tar.gz /tmp/pgwd-port
272272
```
273273

274274
Useful for debugging **do-install** layout; **not** a substitute for **B5** before submitting the port.

contrib/openbsd/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The release tarball (`pgwd_v*_openbsd_amd64.tar.gz`) includes the rc.d script at
2626

2727
```bash
2828
# Extract and install binary
29-
tar xzf pgwd_v0.5.10_openbsd_amd64.tar.gz
29+
tar xzf pgwd_v1.0.0_openbsd_amd64.tar.gz
3030
doas install -m755 pgwd /usr/local/bin/
3131

3232
# Copy rc.d script (from tarball)
@@ -35,7 +35,7 @@ doas install -m555 share/openbsd/rc.d/pgwd /etc/rc.d/pgwd
3535
# Config (required; tarball includes etc/pgwd/pgwd.conf.example)
3636
doas mkdir -p /etc/pgwd
3737
doas cp etc/pgwd/pgwd.conf.example /etc/pgwd/pgwd.conf
38-
doas vi /etc/pgwd/pgwd.conf # edit client, db.url, etc.
38+
doas vi /etc/pgwd/pgwd.conf # edit client, databases[].url, etc.
3939

4040
# Enable and start
4141
doas rcctl enable pgwd
@@ -82,10 +82,10 @@ interval: 60
8282
dry_run: false
8383

8484
# Deprecated: DISCOVER_MY_PASSWORD removed in 0.9.x — use Secret-backed password in URL
85-
db:
86-
url: "postgres://postgres:YOUR_PASSWORD@localhost:25432/mydb"
87-
threshold:
88-
levels: "75,85,95"
85+
databases:
86+
- url: "postgres://postgres:YOUR_PASSWORD@localhost:25432/mydb"
87+
threshold:
88+
levels: "75,85,95"
8989

9090
kube:
9191
context: "my-context" # Use context name from kubeconfig, not cluster name
@@ -105,7 +105,7 @@ notifications:
105105

106106
**Grafana:** Loki logs include a `client` label. Filter by `{app="pgwd", client="pgwd-vps-01"}` to see logs from this instance.
107107

108-
**Troubleshooting:** If you see "context X does not exist", use the **context** name from `kubectl config get-contexts`, not the cluster name. The `db.url` host must be `localhost` and the port must match `kube.local_port`.
108+
**Troubleshooting:** If you see "context X does not exist", use the **context** name from `kubectl config get-contexts`, not the cluster name. The database URL host must be `localhost` and the port must match `kube.local_port`.
109109

110110
## Commands
111111

contrib/openbsd/port/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pgwd -config /etc/pgwd/pgwd.conf -dry-run -interval 0
116116

117117
## Test with a local tarball (before a GitHub release)
118118

119-
1. Match **DISTFILES** (e.g. **`pgwd_v0.6.7_openbsd_amd64.tar.gz`** after **`gmake port-openbsd-sync`**).
119+
1. Match **DISTFILES** (e.g. **`pgwd_v1.0.0_openbsd_amd64.tar.gz`** after **`gmake port-openbsd-sync`**).
120120

121121
2. Build from repo root:
122122

@@ -130,7 +130,7 @@ pgwd -config /etc/pgwd/pgwd.conf -dry-run -interval 0
130130
4. **Option B — `file://`:**
131131

132132
```sh
133-
cp /path/to/pgwd/dist/pgwd_v0.6.7_openbsd_amd64.tar.gz /tmp/pgwd-dist/
133+
cp /path/to/pgwd/dist/pgwd_v1.0.0_openbsd_amd64.tar.gz /tmp/pgwd-dist/
134134
cd /usr/ports/sysutils/pgwd
135135
make fetch MASTER_SITES=file:///tmp/pgwd-dist/
136136
make install

contrib/openbsd/port/test-install-from-dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Install pgwd like the OpenBSD port (do-install + @rcscript) without a full /usr/ports tree.
33
# Use on lab VMs that only have the port skeleton + local distfile.
44
#
5-
# doas sh test-install-from-dist.sh /tmp/pgwd_v0.6.7_openbsd_amd64.tar.gz
5+
# doas sh test-install-from-dist.sh /tmp/pgwd_v1.0.0_openbsd_amd64.tar.gz
66
#
77
# Optional second arg: directory containing files/pgwd (default: script dir, then files/)
88

0 commit comments

Comments
 (0)