2023-03-12 02:10:30 +01:00
|
|
|
## About
|
2023-01-14 18:30:29 +01:00
|
|
|
|
2023-06-10 02:25:23 +02:00
|
|
|
portzap is a utility that manages a local copy of the
|
2024-04-02 05:04:19 +02:00
|
|
|
[hardenedbsd ports tree](https://git.hardenedbsd.org/hardenedbsd/ports).
|
2024-04-19 02:31:54 +02:00
|
|
|
The copy of the ports tree is maintained by members of
|
|
|
|
the `_portzap` group, and the copy of the ports tree
|
2024-04-18 22:06:58 +02:00
|
|
|
can be installed to `/usr/ports` by root.
|
|
|
|
|
2023-01-14 18:30:29 +01:00
|
|
|
|
2023-06-10 02:25:23 +02:00
|
|
|
## Examples
|
2023-01-16 02:36:35 +01:00
|
|
|
|
2023-06-10 02:25:23 +02:00
|
|
|
**CLI**
|
2023-06-10 01:47:34 +02:00
|
|
|
|
2024-04-02 04:49:45 +02:00
|
|
|
# Clone the hardenedbsd ports tree into /home/_portzap/ports/.
|
2024-04-08 01:27:18 +02:00
|
|
|
# This command is delegated to the '_portzap' user.
|
2023-06-10 02:25:23 +02:00
|
|
|
$ portzap clone
|
2023-01-14 18:30:29 +01:00
|
|
|
|
2024-04-02 04:49:45 +02:00
|
|
|
# Pull updates into /home/_portzap/ports/.
|
2024-04-08 01:27:18 +02:00
|
|
|
# This command is delegated to the '_portzap' user.
|
2023-06-10 02:25:23 +02:00
|
|
|
$ portzap pull
|
2023-01-14 18:30:29 +01:00
|
|
|
|
2024-04-18 01:30:14 +02:00
|
|
|
# Start over: erase /usr/ports/ and /home/_portzap/ports/.
|
|
|
|
# This command is delegated to the '_portzap' user.
|
|
|
|
$ portzap erase
|
|
|
|
|
2024-04-02 04:49:45 +02:00
|
|
|
# Install /home/_portzap/ports/ into /usr/ports/.
|
2024-04-08 01:27:18 +02:00
|
|
|
# This command requires root privileges.
|
2023-06-10 02:25:23 +02:00
|
|
|
# portzap install
|
2023-01-14 18:30:29 +01:00
|
|
|
|
2024-04-02 04:49:45 +02:00
|
|
|
# Add the portzap user, group and home directory.
|
2024-04-08 01:27:18 +02:00
|
|
|
# This command requires root privileges.
|
|
|
|
# portzap setup
|
2023-06-10 01:47:34 +02:00
|
|
|
|
2024-04-08 21:15:15 +02:00
|
|
|
**ENVIRONMENT**
|
2023-06-10 01:47:34 +02:00
|
|
|
|
2024-04-02 04:49:45 +02:00
|
|
|
* __$PORTZAP\_GITURL__ <br>
|
2024-04-02 04:53:20 +02:00
|
|
|
The URL to a git repository. <br>
|
|
|
|
Default: https://git.hardenedbsd.org/hardenedbsd/ports.git.
|
2023-03-25 09:39:45 +01:00
|
|
|
|
2024-04-17 21:37:16 +02:00
|
|
|
* __$PORTZAP\_BRANCH__ <br>
|
|
|
|
The git branch to clone and pull updates from. <br>
|
|
|
|
Default: hardenedbsd/main.
|
|
|
|
|
2024-04-02 04:49:45 +02:00
|
|
|
* __$PORTZAP\_INSTALLDIR__ <br>
|
2024-04-02 04:53:20 +02:00
|
|
|
The directory where the ports collection will be installed. <br>
|
|
|
|
Default: /usr/ports/.
|
2023-06-10 03:04:38 +02:00
|
|
|
|
2023-06-10 02:25:23 +02:00
|
|
|
## Install
|
2023-03-19 20:03:04 +01:00
|
|
|
|
2024-04-17 19:22:46 +02:00
|
|
|
**Port**
|
|
|
|
|
|
|
|
portzap is available
|
|
|
|
[as a hardenedbsd port](https://git.hardenedbsd.org/hardenedbsd/ports/-/tree/hardenedbsd/main/hardenedbsd/portzap). <br>
|
|
|
|
`pkg install portzap` should work too but expect slower updates.
|
|
|
|
|
|
|
|
**Source**
|
|
|
|
|
|
|
|
The most recent version of portzap can be installed directly
|
|
|
|
via git:
|
|
|
|
|
2024-04-02 08:45:07 +02:00
|
|
|
$ git clone https://github.com/0x1eef/portzap.git
|
|
|
|
$ cd portzap
|
|
|
|
# make install
|
2024-04-08 01:27:18 +02:00
|
|
|
# portzap setup
|
2024-04-02 08:45:07 +02:00
|
|
|
# pw groupmod -n _portzap -m <user>
|
2023-03-19 20:03:04 +01:00
|
|
|
|
2024-04-08 01:27:18 +02:00
|
|
|
## Requirements
|
|
|
|
|
2024-04-17 19:22:46 +02:00
|
|
|
* [doas](https://man.openbsd.org/doas) (`pkg install doas`)
|
|
|
|
* [git](https://www.man7.org/linux/man-pages/man1/git.1.html) (`pkg install git`)
|
2024-04-08 01:27:18 +02:00
|
|
|
|
2023-03-12 02:10:30 +01:00
|
|
|
## Sources
|
2023-01-14 18:45:46 +01:00
|
|
|
|
2023-06-10 02:25:23 +02:00
|
|
|
* [GitHub](https://github.com/0x1eef/portzap)
|
|
|
|
* [GitLab](https://gitlab.com/0x1eef/portzap)
|
|
|
|
* [git.hardenedbsd.org](https://git.hardenedbsd.org/0x1eef/portzap)
|
2023-03-12 02:15:32 +01:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/). <br>
|
|
|
|
See [LICENSE](./LICENSE).
|