@comment $OpenBSD$
@comment ---------------------------------------------------------------------
@comment TEMPLATE packing list. The web tier (dozens of *.pm / template / static
@comment files) is NOT enumerated here — regenerate this file authoritatively on
@comment an OpenBSD build host after a fake install:
@comment     make plist        # ports tree
@comment or inspect the list that ../make-package.sh produces from `find`.
@comment The blocks below (binaries, rc scripts, config, examples, state dirs)
@comment are the stable, hand-maintained parts and document the intended markers.
@comment ---------------------------------------------------------------------
@conflict ogmaprotect-*
@pkgpath sysutils/ogmaprotect

@comment --- daemon binaries + control tool (relative to ${TRUEPREFIX}) ---
sbin/ogmaprotect-alertd
sbin/ogmaprotect-arpd
sbin/ogmaprotect-authd
sbin/ogmaprotect-dhcpd
sbin/ogmaprotect-diag-sweep
sbin/ogmaprotect-diagd
sbin/ogmaprotect-dnsd
sbin/ogmaprotect-gwmond
sbin/ogmaprotect-hasync
sbin/ogmaprotect-healthd
sbin/ogmaprotect-netd
sbin/ogmaprotect-ipsecd
sbin/ogmaprotect-logd
sbin/ogmaprotect-pfd
sbin/ogmaprotect-routed
sbin/ogmaprotect-rtd
sbin/ogmaprotect-sysd
sbin/ogmaprotect-timed
@comment 10.E6 S3: the update-manifest fetch helper (the third libtls egress
@comment helper; sysd execs it). Non-daemon; allow-listed in check-daemon-inventory.sh.
sbin/ogmaprotect-updfetch
sbin/ogmaprotect-updstage
sbin/ogmaprotect-webhook
sbin/ogmaprotectctl
@comment 10.E1 S2: the firstboot/convergence provisioner (POSIX sh). A non-daemon
@comment sbin helper (like ogmaprotectctl); allow-listed in check-daemon-inventory.sh.
sbin/ogmaprotect-setup
@comment 10.E9 S1: the fsck auto-repair /etc/rc patch applier (POSIX sh). A
@comment non-daemon sbin helper; allow-listed in check-daemon-inventory.sh.
@comment Kept in lock-step with the Makefile install row by t/fsck_rc_patch.t.
sbin/ogma-fsck-rc-apply
@comment 10.E9 S2: the appliance image edition's Class-B /cfg save-back (POSIX
@comment sh, run every minute from the image's root crontab and at shutdown).
@comment Inert on the software edition (the image marker is its gate). A
@comment non-daemon sbin helper; allow-listed in check-daemon-inventory.sh.
@comment Kept in lock-step with the Makefile install row by t/image_rc_patch.t.
sbin/ogma-cfg-save
@comment 10.E9 S2 part 2 (Appliance D-A7): the boot-ok writer (exec'd by sysd
@comment once the management plane is up; resets the A/B boot counter on /mbr)
@comment and the A/B root apply (finish / rollback / inactive -- the post-write
@comment half 10.E10 S2 calls). Root-only sh; inert on the software edition.
@comment Non-daemon sbin helpers; allow-listed in check-daemon-inventory.sh.
@comment Kept in lock-step with the Makefile install rows by t/image_rc_patch.t.
sbin/ogma-image-bootok
sbin/ogma-image-apply

@comment --- manual pages (10.E5, L6-07: the consolidated CLI reference) ---
@comment Kept in lock-step with the Makefile install row by t/ctl_man_page.t,
@comment which also cross-checks the page's COMMANDS against the CLI dispatch.
@man man/man8/ogmaprotectctl.8

@comment --- rc.d service scripts ---
@rcscript ${RCDIR}/ogmaprotect_alertd
@rcscript ${RCDIR}/ogmaprotect_arpd
@rcscript ${RCDIR}/ogmaprotect_authd
@rcscript ${RCDIR}/ogmaprotect_dhcpd
@rcscript ${RCDIR}/ogmaprotect_diagd
@rcscript ${RCDIR}/ogmaprotect_dnsd
@rcscript ${RCDIR}/ogmaprotect_gwmond
@rcscript ${RCDIR}/ogmaprotect_healthd
@rcscript ${RCDIR}/ogmaprotect_netd
@rcscript ${RCDIR}/ogmaprotect_ipsecd
@rcscript ${RCDIR}/ogmaprotect_logd
@rcscript ${RCDIR}/ogmaprotect_pfd
@rcscript ${RCDIR}/ogmaprotect_routed
@rcscript ${RCDIR}/ogmaprotect_rtd
@rcscript ${RCDIR}/ogmaprotect_sysd
@rcscript ${RCDIR}/ogmaprotect_timed
@comment 10.E1 S2: the firstboot ONE-SHOT (runs the provisioner at boot then exits).
@comment NOT a daemon (not in the inventory); enabled LAST by the operator/image.
@rcscript ${RCDIR}/ogmaprotect_setup

@comment --- license + Required Notice (PolyForm Small Business 1.0.0) ---
@comment PolyForm §Notices requires the terms + Required Notice to travel with
@comment every copy; installed by the product Makefile install: target.
/etc/ogmaprotect/LICENSE
/etc/ogmaprotect/NOTICE

@comment 10.E6 (§7 D2 / VD-E6-22): the OpenBSD release this package was BUILT
@comment against, plus version/arch/rev/date provenance. Plain `key: value`,
@comment 0644, generated by scripts/gen-release-info.sh at install time -- never
@comment hand-kept. A byte-identical copy ships beside the artifact and is
@comment listed IN the signed SHA256 manifest. @arch pins the CPU architecture,
@comment NOT the OS release, so without this row a cross-release package
@comment installs clean, verifies clean, and then every daemon dies with
@comment `can't load library`.
/etc/ogmaprotect/RELEASE-INFO

@comment 10.C6 S7b: the generated drift-domain manifest that DRIVES ogmaprotectctl
@comment status (M11). Read-only 0644 root:wheel; regenerated by the Makefile from
@comment ops.c + daemon_inventory, installed by the product install: target.
/etc/ogmaprotect/drift_registry.json

@comment 10.E9 S1 (PHASE-BOOT-FSCK-RESILIENCE.md §2.0): the helper the PATCHED
@comment /etc/rc sources at the fsck exit-8 point, before `pfctl -f` and after
@comment its /var/run wipe. Root-owned 0644 in the package's own directory --
@comment a root consumer sourcing an operator-writable file would be root code
@comment execution, which is why it is here and not under /etc/examples. Inert
@comment until the operator applies the patch; a patched rc with this file
@comment absent falls back to stock behaviour. Lock-step: t/fsck_rc_patch.t.
/etc/ogmaprotect/rc.fsck.subr
@comment 10.E9 S2 (PHASE-BOOT-FSCK-RESILIENCE.md §2.4): the appliance IMAGE
@comment edition's rc helper (mount /cfg read-write for good, the /cfg-saved
@comment fsck marker read BEFORE the overlay, library_aslr=NO enforcement,
@comment the boot record) -- sourced by the image-patched /etc/rc, same
@comment directory and rule as rc.fsck.subr. Every entry point tests the image
@comment marker, so on the software edition this file is inert. Lock-step:
@comment t/image_rc_patch.t.
/etc/ogmaprotect/rc.image.subr
@comment (The save-list ogma-cfg-save reads, /etc/ogmaprotect/cfg-savelist, is
@comment NOT a package file: the image build generates it from the tree's
@comment durable-paths manifest through the 10.E9 S2a guard's projection.)

@comment 10.E6 S3 (s7 D10b / K-flat-carry): the package-shipped copy of the release
@comment signing pubkey -- the trust root sysd's update-manifest verifier hands to
@comment signify -V. A plain row (NOT @sample -- replaced verbatim on upgrade), 0644.
@comment Distinct from the /etc/signify/ anchor the customer installs for pkg_add.
/etc/ogmaprotect/signify/ogmaprotect-05-pkg.pub

@comment --- editable config: shipped as .sample, copied into place on install
@comment so operator edits survive upgrades. (The .sample file is the packed one;
@comment @sample names the live destination.) ---
/etc/ogmaprotect/ogmaprotect.conf.sample
@sample /etc/ogmaprotect/ogmaprotect.conf

@comment --- example / reference files (plain, read-only, copied manually) ---
/etc/examples/ogmaprotect/README.authdb
/etc/examples/ogmaprotect/README.httpd
@comment 10.E8 S3 (D13a): the root-local break-glass runbook (lost admin, expired
@comment cert, mgmt lockout, support-access custody). Kept in lock-step with the
@comment Makefile install block by t/recovery_runbook.t.
/etc/examples/ogmaprotect/README.recovery
@comment 10.E4 S2 (D11): the rebuild/restore runbook (replacement hardware,
@comment root-key custody, what a restore does not recover). The DISASTER
@comment sibling of README.recovery. Kept in lock-step with the Makefile
@comment install block by t/restore_runbook.t and t/recovery_runbook.t.
/etc/examples/ogmaprotect/README.restore
@comment VD-E3-21 (10.E3 S4's deliverable, installed by the hygiene batch): the
@comment support triage runbook — reading a support bundle, symptom -> section.
@comment Kept in lock-step with the Makefile install block AND byte-identical to
@comment its docs/ master by t/support_runbook.t.
/etc/examples/ogmaprotect/README.support
@comment 10.E6 AP0 (Gate-0 §7 D-A10): the appliance unit's quick-start -- the
@comment pre-installed anchor (verify, do not redo), upgrade by name off the
@comment 10.E6.1 repository, the update check's OFF default. The factory bench
@comment checklist greps it on the unit before boxing. Kept in lock-step with
@comment the Makefile install block by t/factory_bench_checklist.t.
/etc/examples/ogmaprotect/README.appliance
/etc/examples/ogmaprotect/httpd.conf.snippet
/etc/examples/ogmaprotect/newsyslog.conf.ogmaprotect
/etc/examples/ogmaprotect/slowcgi.conf.example
@comment 10.E1 S2: the httpd.conf the provisioner installs to /etc/httpd.conf, the
@comment fail-closed firstboot pf bootstrap it loads before httpd, and the appliance
@comment rc.firsttime example (the Lite SKU enables the ogmaprotect_setup one-shot).
/etc/examples/ogmaprotect/httpd.conf
/etc/examples/ogmaprotect/pf.boot.conf
/etc/examples/ogmaprotect/rc.firsttime.sample
@comment 10.E9 S1: the fsck auto-repair /etc/rc patch, shipped INERT (the package
@comment never edits /etc/rc); `ogma-fsck-rc-apply enable` applies it from here.
@comment Lock-step with the Makefile install row: t/fsck_rc_patch.t.
/etc/examples/ogmaprotect/rc.fsck.patch
@comment 10.E9 S2: the appliance image edition's /etc/rc hooks patch -- a
@comment REFERENCE copy (contrib/resflash/build.sh applies it at image build;
@comment nothing on a running box applies it). Lock-step: t/image_rc_patch.t.
/etc/examples/ogmaprotect/rc.image.patch
@comment The daemon-inventory projection (scripts/daemon_inventory.gen). On the box
@comment so `ogmaprotect-setup bootstrap` reads the boot ORDER from the same C table
@comment every other surface is reconciled against (10.C9), not a hand-kept copy.
/etc/examples/ogmaprotect/daemon_inventory

@comment --- web tier (REGENERATE with `make plist`) ---
@comment /var/www/htdocs/ogmaprotect/cgi/ogmaprotect.pl
@comment /var/www/htdocs/ogmaprotect/lib/OgmaProtect/*.pm
@comment /var/www/htdocs/ogmaprotect/lib/OgmaProtect/Handlers/*.pm
@comment /var/www/htdocs/ogmaprotect/lib/OgmaProtect/Template/*.pm
@comment /var/www/htdocs/ogmaprotect/templates/*
@comment /var/www/htdocs/ogmaprotect/static/*

@comment --- runtime state dirs with special ownership/modes ---
@comment Created at install; user data under /var/db is left in place on delete.
@exec install -d -m 0750 /var/db/ogmaprotect
@exec install -d -m 0750 /var/db/ogmaprotect/config
@exec install -d -m 0750 /var/db/ogmaprotect/revisions
@exec install -d -m 0750 /var/db/ogmaprotect/staging
@exec install -d -m 0750 /var/db/ogmaprotect/staging/exports
@exec install -d -m 0700 /var/db/ogmaprotect/secrets
@comment 10.E6 S3: the sysd-only update-signal leaf (D10b: high-water mark, verdict
@comment record, daily-check flag). Never in a backup, never HA-synced (P11 class).
@exec install -d -m 0700 /var/db/ogmaprotect/update
@exec install -d -o root -g www -m 0770 /var/db/ogmaprotect/staging/uploads
@exec install -d -m 0755 /var/www/staging
@exec install -d -o root -g www -m 0770 /var/www/staging/exports
@exec install -d -o root -g www -m 0770 /var/www/staging/uploads
@exec install -d -m 1777 /var/www/tmp
@exec install -d -o root -g www -m 0770 /var/www/run
@unexec rmdir /var/www/run 2>/dev/null || true
@unexec rmdir /var/www/tmp 2>/dev/null || true
