Manages a local copy of the HardenedBSD source tree
Find a file
2024-05-11 20:19:45 -03:00
.github/workflows First commit 2024-05-11 16:03:00 -03:00
bin Rename project (srczap -> sourcezap) 2024-05-11 20:19:45 -03:00
libexec/sourcezap Rename project (srczap -> sourcezap) 2024-05-11 20:19:45 -03:00
man/man8 Rename project (srczap -> sourcezap) 2024-05-11 20:19:45 -03:00
share/sourcezap Rename project (srczap -> sourcezap) 2024-05-11 20:19:45 -03:00
.projectile First commit 2024-05-11 16:03:00 -03:00
LICENSE First commit 2024-05-11 16:03:00 -03:00
Makefile Rename project (srczap -> sourcezap) 2024-05-11 20:19:45 -03:00
README.md Rename project (srczap -> sourcezap) 2024-05-11 20:19:45 -03:00

About

srczap manages a local copy of the HardenedBSD source tree. The copy of the source tree is maintained by members of the _srczap group, and a copy of the source tree can be installed into /usr/src/ by root.

Examples

CLI: setup-srczap

This command should be run after installing srczap for the first time:

# Add the '_srczap' user, group and home directory
# This command requires root privileges
# setup-sourcezap

CLI: sourcezap

# Clone the HardenedBSD source tree into /home/_sourcezap/src/
# This command is delegated to the '_sourcezap' user
$ sourcezap clone

# Pull updates into /home/_sourcezap/src/
# This command is delegated to the '_sourcezap' user
$ sourcezap pull

# Install /home/_sourcezap/src/ into /usr/src/
# This command requires root privileges
# sourcezap install

# Start over: erase /usr/src/ and /home/_sourcezap/src/
# This command requires root privileges
$ sourcezap erase

ENVIRONMENT

  • $SOURCEZAP_GITURL
    The URL to a git repository.
    Default: https://git.HardenedBSD.org/HardenedBSD/HardenedBSD.git.

  • $SOURCEZAP_BRANCH
    The git branch to clone and pull updates from.
    Default: hardened/14-stable/master.

  • $SOURCEZAP_INSTALLDIR
    The directory where the source tree will be installed.
    Default: /usr/src/.

Install

Source

The most recent version of sourcezap can be installed directly via git:

$ git clone https://github.com/0x1eef/sourcezap.git
$ cd sourcezap
# make install
# setup-sourcezap
# pw groupmod -n _sourcezap -m <user>

Requirements

  • doas (pkg install doas)
  • git (pkg install git)

Sources

License

BSD Zero Clause.
See LICENSE.