2024-05-11 21:27:22 +02:00
|
|
|
## About
|
|
|
|
|
2024-05-12 01:26:54 +02:00
|
|
|
sourcezap manages a local copy of the
|
2024-05-11 22:49:13 +02:00
|
|
|
[HardenedBSD source tree](https://git.HardenedBSD.org/HardenedBSD/HardenedBSD).
|
2024-05-11 21:27:22 +02:00
|
|
|
The copy of the source tree is maintained by members of
|
2024-05-12 01:26:54 +02:00
|
|
|
the `_sourcezap` group, and a copy of the source tree
|
2024-05-11 21:43:59 +02:00
|
|
|
can be installed into `/usr/src/` by root.
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2024-05-12 01:26:54 +02:00
|
|
|
### CLI: setup-sourcezap
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:26:54 +02:00
|
|
|
This command should be run after installing sourcezap for
|
2024-05-11 22:50:02 +02:00
|
|
|
the first time:
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:26:54 +02:00
|
|
|
# Add the '_sourcezap' user, group and home directory
|
2024-05-12 00:40:06 +02:00
|
|
|
# This command requires root privileges
|
2024-05-12 01:19:45 +02:00
|
|
|
# setup-sourcezap
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
### CLI: sourcezap
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
# Clone the HardenedBSD source tree into /home/_sourcezap/src/
|
|
|
|
# This command is delegated to the '_sourcezap' user
|
|
|
|
$ sourcezap clone
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
# Pull updates into /home/_sourcezap/src/
|
|
|
|
# This command is delegated to the '_sourcezap' user
|
|
|
|
$ sourcezap pull
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 03:53:37 +02:00
|
|
|
# Set a branch other than the default: hardened/14-stable/master
|
|
|
|
# This command is delegated to the '_sourcezap' user
|
|
|
|
$ sourcezap set-branch hardened/13-stable/master
|
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
# Install /home/_sourcezap/src/ into /usr/src/
|
2024-05-12 00:40:06 +02:00
|
|
|
# This command requires root privileges
|
2024-05-12 01:19:45 +02:00
|
|
|
# sourcezap install
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
# Start over: erase /usr/src/ and /home/_sourcezap/src/
|
2024-05-12 00:40:06 +02:00
|
|
|
# This command requires root privileges
|
2024-05-12 01:19:45 +02:00
|
|
|
$ sourcezap erase
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
### ENVIRONMENT
|
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
* __$SOURCEZAP\_GITURL__ <br>
|
2024-05-11 21:27:22 +02:00
|
|
|
The URL to a git repository. <br>
|
2024-05-11 22:49:13 +02:00
|
|
|
Default: https://git.HardenedBSD.org/HardenedBSD/HardenedBSD.git.
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
* __$SOURCEZAP\_INSTALLDIR__ <br>
|
2024-05-11 21:27:22 +02:00
|
|
|
The directory where the source tree will be installed. <br>
|
|
|
|
Default: /usr/src/.
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
**Source**
|
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
The most recent version of sourcezap can be installed directly
|
2024-05-11 21:27:22 +02:00
|
|
|
via git:
|
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
$ git clone https://github.com/0x1eef/sourcezap.git
|
|
|
|
$ cd sourcezap
|
2024-05-11 21:27:22 +02:00
|
|
|
# make install
|
2024-05-12 01:19:45 +02:00
|
|
|
# setup-sourcezap
|
|
|
|
# pw groupmod -n _sourcezap -m <user>
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
* [doas](https://man.openbsd.org/doas) (`pkg install doas`)
|
|
|
|
* [git](https://www.man7.org/linux/man-pages/man1/git.1.html) (`pkg install git`)
|
|
|
|
|
|
|
|
## Sources
|
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
* [GitHub](https://github.com/0x1eef/sourcezap)
|
|
|
|
* [GitLab](https://gitlab.com/0x1eef/sourcezap)
|
|
|
|
* [git.HardenedBSD.org](https://git.HardenedBSD.org/0x1eef/sourcezap)
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/). <br>
|
|
|
|
See [LICENSE](./LICENSE).
|