Default to a "stable" clone URL
Some checks are pending
portzap / shellcheck (push) Waiting to run

This commit is contained in:
0x1eef 2024-09-10 21:56:35 -03:00
parent b7c19097e1
commit e5975b2b67
4 changed files with 15 additions and 3 deletions

View file

@ -56,7 +56,7 @@ Install `/home/_portzap/ports/` into `/usr/ports/` <br>
* __$PORTZAP\_CLONEURL__ <br> * __$PORTZAP\_CLONEURL__ <br>
The URL of a git repository <br> The URL of a git repository <br>
Default: https://git.HardenedBSD.org/HardenedBSD/ports.git Default: https://github.com/HardenedBSD/ports
* __$PORTZAP\_INSTALLDIR__ <br> * __$PORTZAP\_INSTALLDIR__ <br>
The directory where the ports collection will be installed <br> The directory where the ports collection will be installed <br>

View file

@ -6,7 +6,7 @@ set -e
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/..)} localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/..)}
libexec="${localbase}"/libexec/portzap libexec="${localbase}"/libexec/portzap
gitdir="/home/_portzap/ports" gitdir="/home/_portzap/ports"
giturl="${PORTZAP_CLONEURL:-https://git.hardenedbsd.org/hardenedbsd/ports.git}" giturl="${PORTZAP_CLONEURL:-https://github.com/hardenedbsd/ports}"
installdir="${PORTZAP_INSTALLDIR:-/usr/ports}" installdir="${PORTZAP_INSTALLDIR:-/usr/ports}"
defaultbranch="hardenedbsd/main" defaultbranch="hardenedbsd/main"
commitfile="${installdir}"/.portzap commitfile="${installdir}"/.portzap

View file

@ -84,7 +84,7 @@ This command requires root privileges
.br .br
The URL of a git repository The URL of a git repository
.br .br
Default: https://git.HardenedBSD.org/HardenedBSD/ports.git Default: https://github.com/HardenedBSD/ports
.sp .sp
.Nm PORTZAP_INSTALLDIR .Nm PORTZAP_INSTALLDIR
.br .br

View file

@ -2,6 +2,18 @@
* vNEXT * vNEXT
**** Change default clone url
After this change, the default clone URL points at
the GitHub mirror: https://github.com/hardenedbsd/ports
This change was made because clone and pull operations
from ~git.hardenedbsd.org~ are not always stable, especially
with big repositories like the ports collection
The default can be changed through the environment variable
~$PORTZAP_CLONEURL~, or by modifying the ~origin~ remote
after a successful clone
**** Fix ~libexec/portzap/scripts/setup-doas~ bug **** Fix ~libexec/portzap/scripts/setup-doas~ bug
This change fixes a bug in ~setup-doas~ that could hang This change fixes a bug in ~setup-doas~ that could hang
the ~portzap setup~ command the ~portzap setup~ command