Manages a local copy of the HardenedBSD source tree
Find a file
0x1eef f7ba4150cc
Some checks are pending
sourcezap / shellcheck (push) Waiting to run
RELNOTES => CHANGELOG
2024-08-09 23:34:00 -03:00
.github/workflows Update .github/ 2024-05-11 20:29:04 -03:00
bin Add 'sourcezap sh' 2024-08-07 03:45:25 -03:00
libexec/sourcezap Call issourcezap-member before ${gitdir} check 2024-08-09 22:51:35 -03:00
man/man8 Add 'sourcezap sh' 2024-08-07 03:45:25 -03:00
share/sourcezap RELNOTES => CHANGELOG 2024-08-09 23:34:00 -03:00
.projectile First commit 2024-05-11 16:03:00 -03:00
Makefile Fix shellcheck errors (includes a bug in setup-user) 2024-07-26 22:36:35 -03:00
README.md Update README 2024-08-07 19:56:45 -03:00

About

sourcezap is a utility that manages a local copy of the HardenedBSD source tree. The copy of the source tree is maintained by members of the _sourcezap group, and the copy of the source tree can be installed into /usr/ports/ by root.

CLI

CLI: setup-sourcezap

setup-sourcezap should be run after installing sourcezap for the first time.
There is no harm in running setup-sourcezap multiple times:

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

CLI: group

The following commands are delegated to the _sourcezap user and restricted to members of the _sourcezap group. The restrictions are enforced by sourcezap and to a lesser extent by doas(1):

  • sourcezap clone
    Clone the HardenedBSD ports tree into /home/_sourcezap/src/

  • sourcezap pull
    Pull updates into /home/_sourcezap/src/

  • sourcezap checkout
    Checkout a branch other than the default: hardened/14-stable/master

  • sourcezap sh
    Run /bin/sh within /home/_sourcezap/src/

CLI: superuser

The following commands are restricted to root.
The restrictions are enforced by sourcezap:

  • sourcezap rm
    Remove the contents of /usr/src/ and /home/_sourcezap/src/

  • sourcezap install
    Install /home/_sourcezap/src/ into /usr/src/

Environment

Install

sourcezap is available from the HardenedBSD ports tree. pkg install sourcezap should work too but expect slower updates. The most recent version of sourcezap can be installed via git:

# Clone
user@localhost$ git clone https://git.hardenedbsd.org/0x1eef/sourcezap.git
user@localhost$ cd sourcezap

# Install
root@localhost# make install
root@localhost# setup-sourcezap

# Add user to '_sourcezap' group
root@localhost# pw groupmod -n _sourcezap -m <user>

Requirements

Sources

License

BSD Zero Clause
See LICENSE