release: add mport package installation to DVD images - #503
Conversation
Stage a verified package dependency closure and the full blessed mport index on DVD images. Add a bsdinstall package menu that installs curated or searched packages into the target with mport and seeds its repository index. AI-Assisted-by: OpenAI Codex (GPT-5) Signed-off-by: Lucas Holt <luke@foolishgames.com>
The legacy architecture removal deleted the PowerPC and MIPS conditional blocks but left one closing directive behind. Remove it so kmod.mk parses correctly. AI-Assisted-by: OpenAI Codex (GPT-5) Signed-off-by: Lucas Holt <luke@foolishgames.com>
Reviewer's GuideThis PR introduces verified mport application installation from DVD images: release builds stage dependency-complete package selections alongside the full blessed catalog, bsdinstall offers curated and searchable installation flows using /packages and mport, and release tooling is standardized on /usr/mports with related configuration and parser cleanup. Sequence diagram for bsdinstall package installationsequenceDiagram
participant User
participant BSDInstall
participant Media as DVD_/packages
participant Mport
participant Target as Target_system
User->>BSDInstall: packages
BSDInstall->>Media: Read installer.tsv and catalog.tsv
BSDInstall->>Target: Mount DVD packages at /packages
User->>BSDInstall: Select package
BSDInstall->>Target: Seed /var/db/mport/index.db if absent
BSDInstall->>Mport: install -U -c BSDINSTALL_CHROOT install -y package-name
Mport->>Media: Use verified .mport bundles
Mport->>Target: Install package and automatic dependencies
Flow diagram for verified DVD package stagingflowchart TD
A["Blessed mport repository"] --> B["Read complete index.db"]
B --> C["Validate configured package roots"]
C --> D["Resolve dependency closure"]
D --> E["Verify bundle filenames and SHA-256 hashes"]
E --> F["Stage packages, installer.tsv, catalog.tsv, and index.db"]
F --> G["Build dvd1.iso with /packages"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Claude finished @laffer1's task in 2m 51s —— View job Code Review: PR #503 — mport package installation on DVD images
This PR is already merged; below is a post-merge review focused on correctness and security, per the repo's review guidelines. Summary of what I checked
Notes (non-blocking)
No correctness bugs, malloc/free issues (N/A — no C changes), or bounds/security issues found in the diff. |
There was a problem hiding this comment.
🟡 Changes recommended
The new bsdinstall package UI and GCE tooling include verified cases where user actions can silently do nothing and where mports tarball naming is inconsistent, breaking intended behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds offline-capable mport application installation support to dvd1.iso builds by staging a blessed repository subset onto the DVD, integrating a new bsdinstall packages workflow, and standardizing release tooling on /usr/mports.
Changes:
- Stage a verified dependency closure of selected application packages (plus full
index.db) intodvd/packagesduringdvd1.isobuilds. - Add a new
bsdinstall packagesscript and hook it into the automated and “Final Configuration” installer flows, mounting media at/packages. - Fix an unmatched conditional in
sys/conf/kmod.mkand align release tooling paths from/usr/portsto/usr/mports.
File summaries
| File | Description |
|---|---|
| usr.sbin/bsdinstall/scripts/umount | Unmount and clean up the new package-media mountpoint under the target root. |
| usr.sbin/bsdinstall/scripts/packages | New installer workflow for curated + searchable package installation via mport. |
| usr.sbin/bsdinstall/scripts/mount | Mount DVD package media read-only at the mport media path in the target root. |
| usr.sbin/bsdinstall/scripts/Makefile | Install the new packages script as part of bsdinstall scripts. |
| usr.sbin/bsdinstall/scripts/auto | Invoke package installation when DVD package metadata is present; add “Packages” to final menu. |
| usr.sbin/bsdinstall/bsdinstall.8 | Document the new bsdinstall packages subcommand behavior. |
| sys/conf/kmod.mk | Remove an extra .endif to fix conditional structure. |
| release/tools/gce.conf | Update mports fetch path for installed-package sources in GCE image tooling. |
| release/scripts/pkg-stage.sh | Replace pkg(8)-based staging with mport index validation + bundle copying. |
| release/release.sh | Pass staging configuration through to make release and use /usr/mports in the chroot. |
| release/release.conf.sample | Document MPORT_REPOSITORY and DVD_PACKAGE_ROOTS configuration knobs. |
| release/packages.md | New documentation for DVD package staging and installer behavior. |
| release/Makefile | Add staging variables and run pkg-stage.sh to populate dvd/packages for dvd1.iso. |
Review details
Suppressed comments (1)
usr.sbin/bsdinstall/scripts/packages:174
- If a search result row has missing/invalid bundle metadata, install_package will return immediately (valid_bundle fails) with no user-visible error. This makes the menu selection appear to have no effect.
[ "$result" -eq 0 ] || return 0
bundle=$(awk -F "$TAB" -v name="$choice" '$1 == name { print $4; exit }' "$results")
install_package "$choice" "$bundle"
- Files reviewed: 13/13 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| for PACKAGE in ${_INSTALLED_PACKAGES}; do | ||
| chroot ${DESTDIR} \ | ||
| make -C /usr/ports/${PACKAGE} fetch | ||
| make -C /usr/mports/${PACKAGE} fetch |
| while IFS= read -r pkg; do | ||
| bundle=$(awk -F "$TAB" -v name="$pkg" '$1 == name { print $4; exit }' "$CATALOG") | ||
| install_package "$pkg" "$bundle" | ||
| done < "$selection" |
Summary
Validation
A complete dvd1.iso build and installer boot test were not run.
AI contribution checklist
AI-Assisted-by: OpenAI Codex (GPT-5)
Summary by Sourcery
Enable verified application package installation from DVD media while retaining network catalog access and adopting the canonical mports layout.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: