Commit graph

330 commits

Author SHA1 Message Date
f125413729 Update error logging
Few notable changes:
  - Write error messages to stderr
  - Keep the error messages brief
  - Centralize error logging via libexec/portzap/print-err
2024-05-22 18:28:20 -03:00
b94c97006d v0.11.0 2024-05-22 13:52:39 -03:00
b2b17ba5da Update isportzap-member 2024-05-21 23:27:14 -03:00
b5a80bafdf Update portzap-pull 2024-05-21 22:38:34 -03:00
eb3ebcc627 Prefix errors with ERR 2024-05-21 22:35:16 -03:00
cae03458b9 Reduce diff with sourcezap 2024-05-21 22:29:30 -03:00
dbd97d9562 Add 'portzap checkout'
A copy of the same sourcezap command ('sourcezap checkout')
2024-05-21 22:25:37 -03:00
8625d945b9 Fix outdated docs (README, man page) 2024-05-21 21:32:55 -03:00
08b4fd0c76 Fix typo in README 2024-05-21 21:28:35 -03:00
7622c69881 Drop punctuation from 'usage' (copy sourcezap) 2024-05-21 21:24:10 -03:00
397be0b927 Replace portzap-erase with portzap-rm 2024-05-21 21:22:39 -03:00
62a6fd7712 Fix / improve docs 2024-05-11 17:45:59 -03:00
ee84071329 Switch from #!/bin/sh -e to set -e
Switch to set -e.
The shebang variant doesn't apply to subshells.
2024-05-11 14:51:26 -03:00
7c68dd5d1a Set mode within run_install 2024-04-20 19:31:33 -03:00
ece4abb9ca Man page update 2024-04-20 18:58:04 -03:00
afc2706b98 Another man page update 2024-04-20 18:16:11 -03:00
8e18374cc5 Another man page update 2024-04-20 18:14:27 -03:00
9a2a85e3bf Fix order of items in SYNOPSIS 2024-04-20 17:59:42 -03:00
bcc78a8a8d v0.10.1 2024-04-20 17:22:43 -03:00
7e928ab194 Replace hardcoded reference to ${mode} 2024-04-20 17:05:49 -03:00
76138faa39 Assign ${mode} in libexec/portzap/git-* 2024-04-20 16:47:08 -03:00
0a5f1cc6d6 Fix shellcheck (unused variable, false positives) 2024-04-20 11:10:40 -03:00
6ed089e6fb v0.10.0 2024-04-20 11:03:29 -03:00
aafb3aaec1 Readd verbose output in 'portzap pull' 2024-04-20 10:53:58 -03:00
bd84f7f134 Honor umask
This change is a revert of previous commits that worked around
the umask not being honored. This commit runs git with the correct
umask, and avoids any need to run chmod manually. The number of
doas.conf rules has been reduced to 2.
2024-04-20 05:24:14 -03:00
6250b5f995 Call chmod after 'git pull'
Similar to clone, the umask is not honored. Fix with recursive
chmod.
2024-04-20 03:18:10 -03:00
105b4f6594 Alter default umask / mode
'/home/_portzap/ports/' and '/usr/ports/' have reduced permissions for
members of the '_portzap' group, who now possess read-only permissions
for both directories.

The 'portzap erase' command must be run by root, since members of the
'_portzap' group can't delete contents of either of those directories
anymore.
2024-04-20 02:23:20 -03:00
94493d6040 Allow checkout after clone to fail
When $PORTZAP_BRANCH happens to be the default branch,
'git checkout' will exit with an error. Ignore.
2024-04-20 01:55:51 -03:00
1739b7d794 Run chmod after clone
The umask appears to be ignored (maybe it is reset after running
'git config core.filemode off' ?). Run chmod to fix.
2024-04-20 01:40:13 -03:00
c1a76f5f88 Fix bug caught by shellcheck 2024-04-20 00:30:24 -03:00
5b363c9eac Alternate mode syntax 2024-04-20 00:28:10 -03:00
318b893299 Assign ${mode} in portzap-install 2024-04-19 23:40:03 -03:00
300dd161c2 Handle 'git checkout' error gracefully
Previous commit was focused on portzap-pull.
This one covers portzap-clone.
2024-04-19 10:00:50 -03:00
bfdc145d92 Handle 'git checkout' error gracefully 2024-04-19 10:00:50 -03:00
c447d7eb9d Handle 'git checkout' error gracefully 2024-04-19 09:49:21 -03:00
5619e94670 Quote '_portzap' 2024-04-19 08:00:37 -03:00
2c85e47fdb Add ${mode}, ${owner} to portzap-pull 2024-04-19 07:58:20 -03:00
1572ea4c1d Rephrase another error message 2024-04-19 07:43:38 -03:00
589702e7e3 Handle file mode change when switching branch 2024-04-19 07:29:29 -03:00
a4a6253062 Rephrase error message 2024-04-19 06:30:06 -03:00
3e0f09c060 Fix 'make deinstall' 2024-04-19 06:24:05 -03:00
3168b47a45 Reduce doas.conf rules
This commit reduces the number of doas.conf rules to 4.
libexec/ scripts now query access permissions rather than
bin/portzap doing it.
2024-04-19 06:22:03 -03:00
b688aa3f78 Add root constraint to libexec/portzap/portzap-install 2024-04-19 05:55:13 -03:00
2ab35924c8 Replace 'portzap setup' with 'setup-portzap' 2024-04-19 05:49:49 -03:00
61f3e3ae08 Fix quotes in bin/portzap 2024-04-19 05:30:51 -03:00
ae5893a685 Replace hard-coded references to /usr/local 2024-04-19 05:23:28 -03:00
94500c260c Resolve VERSION without '..' 2024-04-19 04:56:39 -03:00
dd0e6c84d7 Replace '$rootdir' with '$localbase' 2024-04-19 04:54:25 -03:00
049f1a5255 Fix shellcheck errors 2024-04-19 04:54:25 -03:00
4aaa685b3d Switch branch in 'portzap pull'
This commit covers a few changes:

* The 'portzap pull' command now switches to '$PORTZAP_BRANCH'
  if 'git branch --show-current' returns a different branch.

* The 'portzap pull' command fixes permissions and ownership on
  '/home/_portzap/ports/.git' before running any git commands. The
  owner and permissions can change by interacting with the
  git repository directly, as a user other than '_portzap'.

* doas.conf has been changed to be slightly more strict
2024-04-19 04:15:12 -03:00