[Midnightbsd-cvs] [MidnightBSD/src] 4dc7c6: bsdinstall: Improve network configuration and fix ...

Lucas Holt noreply at github.com
Sun Apr 19 22:34:14 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 4dc7c6ebe2ececf658adc2ebf83d72e5bd8938c0
      https://github.com/MidnightBSD/src/commit/4dc7c6ebe2ececf658adc2ebf83d72e5bd8938c0
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M usr.sbin/bsdinstall/scripts/netconfig

  Log Message:
  -----------
  bsdinstall: Improve network configuration and fix overwrites

- Use per-interface rc.conf snippets (rc.conf.net.$INTERFACE) to prevent
  overwriting network settings when multiple interfaces are configured.
- Ensure DNS provider settings are applied even if IPv4/IPv6 manual
  configuration is skipped for an interface.
- Move resolv_enable="NO" to a separate rc.conf snippet to ensure it
  persists across multiple netconfig runs.
- Fix a bug where netconfig would exit early if IPv4 and IPv6 were both
  unavailable or skipped.

Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: e11765907b8ec62cf610b4e236f9d00d4a7b191c
      https://github.com/MidnightBSD/src/commit/e11765907b8ec62cf610b4e236f9d00d4a7b191c
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.c
    M sbin/prowld/prowld.h
    M sbin/prowld/supervisor.c

  Log Message:
  -----------
  prowld: Fix pointer alignment assumption for timer tagging

- Move timer tagging macros to prowld.h.
- Add a static_assert to ensure struct job has sufficient alignment (4-byte)
  for the low-bit tagging trick used in kqueue timers.
- Update prowld.c and supervisor.c to use the centralized macros.
- Use TIMER_MASK in the event loop for better clarity.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 702387b312bb3dc4dc93a0d917cd5f4a6f1b332d
      https://github.com/MidnightBSD/src/commit/702387b312bb3dc4dc93a0d917cd5f4a6f1b332d
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.c

  Log Message:
  -----------
  prowld: Fix potential truncation issues in path and pidfile handling

- Add truncation checks to setup_runtime_paths() for snprintf and strlcpy.
- Ensure write_pidfile() checks snprintf return value before writing to avoid
  potential out-of-bounds read if truncation occurs.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: eaa03ca49077e7beb1e10f87d27ebc5143057cba
      https://github.com/MidnightBSD/src/commit/eaa03ca49077e7beb1e10f87d27ebc5143057cba
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/ipc.c
    M sbin/prowld/socket_activation.c
    M sbin/prowld/supervisor.c

  Log Message:
  -----------
  prowld: Implement non-blocking I/O for all IPC and notification fds

- Use SOCK_NONBLOCK for IPC listen socket and socket-activation fds.
- Use accept4() with SOCK_NONBLOCK for incoming IPC clients.
- Use SOCK_NONBLOCK for sd_notify datagram sockets.
- Use MSG_DONTWAIT in all recv() and send() calls from the main loop.
- Properly handle EAGAIN/EWOULDBLOCK in IPC and notification handlers.

This ensures the main event loop never hangs on a slow client or a full
pipe, preventing a potential Denial of Service (DoS) condition.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 0ca0806c6756a8c7455faa7f682173ef5a90034f
      https://github.com/MidnightBSD/src/commit/0ca0806c6756a8c7455faa7f682173ef5a90034f
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M usr.sbin/service/service.sh

  Log Message:
  -----------
  service: Integrate with prowld via prowlctl

As specified in Phase 1 of the prowld specification, service(8) now
acts as a thin wrapper for prowlctl when the prowld daemon is running.

- Redirect 'service -e' to 'prowlctl list --enabled'.
- Redirect 'service -l' to 'prowlctl list'.
- Redirect positional commands (start, stop, status, etc.) to prowlctl
  if the target job is managed by prowld.
- Fall back to traditional rc.d execution if prowld is not available or
  doesn't manage the requested service.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 0431a21dcf89d0453e2c8dec2659e31257384b5d
      https://github.com/MidnightBSD/src/commit/0431a21dcf89d0453e2c8dec2659e31257384b5d
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.h
    M sbin/prowld/unit.c

  Log Message:
  -----------
  prowld: Implement schedule parsing for timer jobs

- Add schedule_t and calendar_schedule_t structures to prowld.h.
- Add schedule field to struct job to store activation triggers.
- Implement parse_schedule() in unit.c to handle periodic and calendar-based
  triggers from unit files.
- Support '*' as a wildcard in calendar fields (mapped to -1 internally).
- This fulfills the parsing requirement for Phase 2 timer jobs.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: d6c6ff988c1b6bb2fdc76577f131b5c66dbda58a
      https://github.com/MidnightBSD/src/commit/d6c6ff988c1b6bb2fdc76577f131b5c66dbda58a
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.c
    M sbin/prowld/prowld.h
    M sbin/prowld/supervisor.c

  Log Message:
  -----------
  prowld: Implement timer job execution logic

- Expand timer tagging to 3 bits (8-byte alignment) to support more timer types.
- Implement periodic interval timers and on-boot delay timers for JOB_TYPE_TIMER.
- Implement a global 60-second calendar tick to process calendar-based jobs.
- Add supervisor handlers for periodic, boot-delay, and calendar events.
- Integrate timer initialization into the daemon startup sequence.
- This completes the core execution logic for Phase 2 timer jobs.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: ce2b55396f2c6992af88ff9d1a886c8b6358f626
      https://github.com/MidnightBSD/src/commit/ce2b55396f2c6992af88ff9d1a886c8b6358f626
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/supervisor.c

  Log Message:
  -----------
  prowld: Enforce throttle_interval during job restarts

- Update supervisor_reap() to use arm_throttle_timer() instead of immediate
  rescheduling when a job needs to restart.
- This ensures the configured throttle_interval is respected before the
  daemon attempts to relaunch a failed or exited service.
- Completes the keep_alive enforcement requirement for Phase 2.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 58b16fe776c744d3af78837eba140b93417f5dd6
      https://github.com/MidnightBSD/src/commit/58b16fe776c744d3af78837eba140b93417f5dd6
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/Makefile
    A sbin/prowl-generator/Makefile
    A sbin/prowl-generator/prowl-generator.c

  Log Message:
  -----------
  prowl-generator: Implement rc.d to prowl-unit migration tool

Add a new utility, prowl-generator(8), that parses legacy rc.d scripts
and emits a basic prowld unit file in JSON/UCL format.

- Extracts PROVIDE, REQUIRE, BEFORE, and KEYWORD: shutdown headers.
- Derives unit label and rc_name automatically.
- Sets the program path to the absolute path of the rc.d script.
- Provides a starting point for manual porting of services.
- Integrates the tool into the sbin build.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 804be353e349949e74aaf15928a3f22390fc5939
      https://github.com/MidnightBSD/src/commit/804be353e349949e74aaf15928a3f22390fc5939
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowl-generator/Makefile
    A sbin/prowl-generator/prowl-generator.8

  Log Message:
  -----------
  prowl-generator: Add man page

Provide manual page for the prowl-generator(8) utility, documenting its
purpose, usage, and mapping of legacy rc.d headers to prowl unit fields.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: f190a0d77084f6e8e7c6bd712fdacca2c676cb14
      https://github.com/MidnightBSD/src/commit/f190a0d77084f6e8e7c6bd712fdacca2c676cb14
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M lib/Makefile
    A lib/libsystemd/Makefile
    A lib/libsystemd/sd-daemon.c
    A lib/libsystemd/sd-daemon.h
    A lib/libsystemd/sd-journal.c
    A lib/libsystemd/sd-journal.h

  Log Message:
  -----------
  libsystemd: Implement systemd compatibility shim

Provide a native MidnightBSD implementation of the libsystemd (and
legacy libsystemd-daemon) client APIs. This allows unmodified Linux
daemons to cooperate with the prowld(8) service manager.

- Readiness notification: sd_notify(), sd_pid_notify() via NOTIFY_SOCKET.
- Socket activation: sd_listen_fds() and family via LISTEN_FDS protocol.
- Watchdog: sd_watchdog_enabled() for keep-alive support.
- Logging: sd_journal_print() and family redirected to syslog(3).
- Environment: sd_booted() returns true when prowld is active.
- Headers are installed in systemd/ subdirectory for compatibility.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 67146ad577b0bb1a16bc63e90ec5cb20f7c50ff1
      https://github.com/MidnightBSD/src/commit/67146ad577b0bb1a16bc63e90ec5cb20f7c50ff1
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/Makefile
    A sbin/prowld/prowl-unit.5
    A sbin/prowld/prowld.conf.5

  Log Message:
  -----------
  prowld: Add configuration and unit file man pages

Complete the Phase 2 documentation requirements by providing detailed
manual pages for:
- prowl-unit(5): Describes the job configuration schema and fields.
- prowld.conf(5): Describes global daemon configuration settings.

Updated the Makefile to include these pages in the system install.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 357bb7caf7f91ca40bba83b151eb6dc3db118cb3
      https://github.com/MidnightBSD/src/commit/357bb7caf7f91ca40bba83b151eb6dc3db118cb3
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/rcshim.c

  Log Message:
  -----------
  prowld: Fix rc.d enablement logic and default behavior

- Update rcconf_is_enabled() to check /etc/defaults/rc.conf first. This
  ensures we correctly handle default enablement states from the base system.
- Refine the rc.conf parser to correctly handle multiple occurrences of a
  variable across different files (later files override earlier ones).
- Change default enablement to 'false' in rcshim_parse_script(). Most
  base system services are disabled by default, and this prevents prowld
  from trying to start all discovered rc.d scripts.
- Improve variable value parsing to handle YES/NO more reliably.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


Compare: https://github.com/MidnightBSD/src/compare/20a62567f424...357bb7caf7f9

To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications


More information about the Midnightbsd-cvs mailing list