sourcezap/README.md

81 lines
2.3 KiB
Markdown
Raw Normal View History

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-06-01 06:06:14 +02:00
root@localhost# 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
2024-06-01 06:06:14 +02:00
user@localhost$ 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
2024-06-01 06:06:14 +02:00
user@localhost$ sourcezap pull
2024-05-11 21:27:22 +02:00
2024-05-12 04:32:08 +02:00
# Checkout a branch other than the default: hardened/14-stable/master
# This command is delegated to the '_sourcezap' user
2024-06-01 06:06:14 +02:00
user@localhost$ sourcezap checkout 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-06-01 06:06:14 +02:00
root@localhost# sourcezap install
2024-05-11 21:27:22 +02:00
2024-05-12 04:55:58 +02:00
# Remove the contents of /usr/src/ and /home/_sourcezap/src/
2024-05-12 00:40:06 +02:00
# This command requires root privileges
2024-06-01 06:06:14 +02:00
root@localhost# sourcezap rm
2024-05-11 21:27:22 +02:00
2024-06-01 06:06:14 +02:00
### Environment
2024-05-11 21:27:22 +02:00
* __$SOURCEZAP\_CLONEURL__ <br>
2024-06-01 06:06:14 +02:00
The URL of 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-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
**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-06-01 08:58:10 +02:00
user@localhost$ git clone https://git.hardenedbsd.org/0x1eef/sourcezap.git
2024-06-01 06:06:14 +02:00
user@localhost$ cd sourcezap
root@localhost# make install
root@localhost# setup-sourcezap
root@localhost# pw groupmod -n _sourcezap -m <user>
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)
* [git.HardenedBSD.org](https://git.HardenedBSD.org/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)