2024-05-11 21:27:22 +02:00
|
|
|
## About
|
|
|
|
|
2024-08-08 00:56:45 +02:00
|
|
|
sourcezap is a utility that 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-08-08 00:56:45 +02:00
|
|
|
the `_sourcezap` group, and the copy of the source tree
|
2024-08-12 11:53:00 +02:00
|
|
|
can be installed into `/usr/src/` by root.
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
## CLI
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-11-16 05:19:15 +01:00
|
|
|
### Commands
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-11-16 05:19:15 +01:00
|
|
|
#### Group
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-11-16 05:19:15 +01:00
|
|
|
The following commands are restricted to members of the `_sourcezap` group,
|
|
|
|
and delegated to the `_sourcezap` user via doas(1):
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
* **sourcezap clone** <br>
|
2024-08-12 11:53:00 +02:00
|
|
|
Clone the HardenedBSD source tree into `/home/_sourcezap/src/` <br>
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
* **sourcezap pull** <br>
|
|
|
|
Pull updates into `/home/_sourcezap/src/` <br>
|
2024-05-12 03:53:37 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
* **sourcezap checkout** <br>
|
|
|
|
Checkout a branch other than the default: `hardened/14-stable/master` <br>
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
* **sourcezap sh** <br>
|
|
|
|
Run `/bin/sh` within `/home/_sourcezap/src/` <br>
|
|
|
|
|
2024-11-16 05:19:15 +01:00
|
|
|
#### Root
|
2024-08-07 08:45:25 +02:00
|
|
|
|
2024-11-16 04:58:05 +01:00
|
|
|
The following commands are restricted to root:
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
* **sourcezap rm** <br>
|
|
|
|
Remove the contents of `/usr/src/` and `/home/_sourcezap/src/` <br>
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-07 08:45:25 +02:00
|
|
|
* **sourcezap install** <br>
|
|
|
|
Install `/home/_sourcezap/src/` into `/usr/src/` <br>
|
|
|
|
|
|
|
|
## Environment
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-05-12 04:23:57 +02:00
|
|
|
* __$SOURCEZAP\_CLONEURL__ <br>
|
2024-06-01 06:06:14 +02:00
|
|
|
The URL of a git repository <br>
|
2024-07-08 23:57:15 +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-06-01 06:06:14 +02:00
|
|
|
The directory where the source tree will be installed <br>
|
|
|
|
Default: /usr/src/
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2024-07-08 23:51:18 +02:00
|
|
|
sourcezap is available
|
2024-08-07 08:45:25 +02:00
|
|
|
[from the HardenedBSD ports tree](https://git.HardenedBSD.org/HardenedBSD/ports/-/tree/HardenedBSD/main/hardenedbsd/sourcezap).
|
2024-11-16 04:58:05 +01:00
|
|
|
`pkg install sourcezap` should work too but expect slower updates. After installation
|
|
|
|
of sourcezap, `sourcezap setup` should be run as root and one or more users should
|
|
|
|
be added to the `_sourcezap` group:
|
2024-05-11 21:27:22 +02:00
|
|
|
|
2024-08-17 04:34:33 +02:00
|
|
|
root@localhost# sourcezap setup
|
2024-11-16 04:58:05 +01:00
|
|
|
root@localhost# pw groupmod -n _sourcezap -m myuser
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2024-06-01 08:14:32 +02:00
|
|
|
* [doas](https://man.openbsd.org/doas)
|
|
|
|
* [git](https://www.man7.org/linux/man-pages/man1/git.1.html)
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## Sources
|
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
* [GitHub](https://github.com/0x1eef/sourcezap)
|
|
|
|
* [GitLab](https://gitlab.com/0x1eef/sourcezap)
|
2024-07-08 19:12:25 +02:00
|
|
|
* [git.HardenedBSD.org/@0x1eef](https://git.HardenedBSD.org/0x1eef/sourcezap)
|
|
|
|
* [brew.bsd.cafe/@0x1eef](https://brew.bsd.cafe/0x1eef/sourcezap)
|
2024-05-11 21:27:22 +02:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
2024-06-01 06:06:14 +02:00
|
|
|
[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/) <br>
|
|
|
|
See [LICENSE](./LICENSE)
|