mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-10 08:37:02 +00:00
Adds FreeBSD as a supported platform. The daemon, fipsctl, TUN datapath and DNS integration build and run there, with a native pkg and an rc.d service. The one piece of genuinely new datapath logic is the TUN framing. FreeBSD's tun rejects every non-IPv4 packet with EAFNOSUPPORT unless TUNSIFHEAD is set, so nothing IPv6 can be sent at all; with it set, every frame carries a 4-byte network-order address-family prefix the way macOS utun does. The ioctl is issued at device creation and the prefix is stripped on read, which gives callers the same raw-IP contract as Linux and macOS. A frame carrying only the header reads as zero bytes and the reader loops treat it as nothing to do. The address family is now taken from libc rather than hardcoded, because AF_INET6 is 30 on Darwin and 28 on FreeBSD. The reader shutdown path, the writer's address-family header and the supervisor's shutdown pipe were all macOS-only and are now shared with FreeBSD, since neither platform wakes a blocked read when the interface goes down. Linux continues to rely on interface deletion. mdns-sd moves from 0.19 to 0.20 for socket-pktinfo 0.4.1, the first release that builds on FreeBSD, which uses IP_RECVDSTADDR and IP_RECVIF instead of Linux-style IP_PKTINFO. This is the only change here that affects every platform rather than just the new one. The config, ACL, hosts and keygen path constants now treat FreeBSD the same as macOS, since both install under /usr/local/etc/fips. Those constants arrived separately on maint and are merged here rather than duplicated: the predicates widen to cover FreeBSD, the platform-gated tests widen with them, and keygen keeps reading the shared SYSTEM_CONFIG_DIR constant rather than reintroducing a literal. Co-authored-by: Johnathan Corgan <johnathan@corganlabs.com>
52 lines
1.4 KiB
Makefile
52 lines
1.4 KiB
Makefile
# FIPS Packaging Makefile
|
|
#
|
|
# Builds release packages for supported target platforms.
|
|
# All outputs are placed in deploy/ at the project root.
|
|
#
|
|
# Usage:
|
|
# make deb Build a Debian/Ubuntu .deb package
|
|
# make tarball Build a systemd install tarball
|
|
# make ipk Build an OpenWrt .ipk package (opkg, OpenWrt 24.x and earlier)
|
|
# make apk Build an OpenWrt .apk package (apk-tools, mandatory on OpenWrt 25+)
|
|
# make aur Build fips-git AUR package and validate with namcap
|
|
# make pkg Build a macOS .pkg installer
|
|
# make freebsd Build a FreeBSD .pkg package (on FreeBSD; use gmake)
|
|
# make zip Build a Windows .zip package
|
|
# make all Build deb and tarball (default)
|
|
# make clean Remove deploy/ directory
|
|
|
|
SHELL := /bin/bash
|
|
PACKAGING_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
PROJECT_ROOT := $(abspath $(PACKAGING_DIR)/..)
|
|
|
|
.PHONY: all deb tarball ipk apk aur pkg freebsd zip clean
|
|
|
|
all: deb tarball
|
|
|
|
deb:
|
|
@bash $(PACKAGING_DIR)/debian/build-deb.sh
|
|
|
|
tarball:
|
|
@bash $(PACKAGING_DIR)/systemd/build-tarball.sh
|
|
|
|
ipk:
|
|
@bash $(PACKAGING_DIR)/openwrt-ipk/build-ipk.sh
|
|
|
|
apk:
|
|
@bash $(PACKAGING_DIR)/openwrt-apk/build-apk.sh
|
|
|
|
aur:
|
|
@bash $(PACKAGING_DIR)/aur/build-aur.sh
|
|
|
|
pkg:
|
|
@bash $(PACKAGING_DIR)/macos/build-pkg.sh
|
|
|
|
freebsd:
|
|
@sh $(PACKAGING_DIR)/freebsd/build-pkg.sh
|
|
|
|
zip:
|
|
@powershell -File $(PACKAGING_DIR)/windows/build-zip.ps1
|
|
|
|
clean:
|
|
rm -rf $(PROJECT_ROOT)/deploy
|