diff --git a/libexec/portzap/portzap-clone b/libexec/portzap/portzap-clone index ffe982b..bbf3d7c 100755 --- a/libexec/portzap/portzap-clone +++ b/libexec/portzap/portzap-clone @@ -27,7 +27,10 @@ set -x umask ${mode} doas -u _portzap "${git}" clone "${giturl}" "${gitdir}" cd "${gitdir}" +set +x +echo "[-] Adjust filemode. This might take a while" doas -u _portzap "${git}" config core.filemode off +doas -u root /bin/chmod -R ${mode} "${gitdir}" echo "[-] git checkout ${branch}" if ! doas -u _portzap "${git}" \ checkout -t \ diff --git a/libexec/portzap/portzap-pull b/libexec/portzap/portzap-pull index 1d35ce0..126a3a9 100755 --- a/libexec/portzap/portzap-pull +++ b/libexec/portzap/portzap-pull @@ -51,7 +51,7 @@ cd "${gitdir}" remote=$("${git}" remote | head -n1) if [ "$(git branch --show-current)" != "${branch}" ]; then change_branch "${remote}" "${branch}" - echo "[-] Adjust filemode for new branch. This might take a while" + echo "[-] Adjust filemode. This might take a while" doas -u root /bin/chmod -R "${mode}" "${gitdir}" fi set -x diff --git a/share/portzap/doas.conf b/share/portzap/doas.conf index 5d0e9fa..bdb2b97 100644 --- a/share/portzap/doas.conf +++ b/share/portzap/doas.conf @@ -2,6 +2,6 @@ # portzap permit nopass root as _portzap cmd /usr/local/bin/git permit nopass :_portzap as _portzap cmd /usr/local/bin/git -permit nopass :_portzap as root cmd /bin/chmod args -R u=rwX,g=rwX,o= /home/_portzap/ports -permit nopass :_portzap as root cmd /bin/chmod args -R u=rwX,g=rwX,o= /home/_portzap/ports/.git +permit nopass :_portzap as root cmd /bin/chmod args -R ug=rwX,o= /home/_portzap/ports +permit nopass :_portzap as root cmd /bin/chmod args -R ug=rwX,o= /home/_portzap/ports/.git permit nopass :_portzap as root cmd /usr/sbin/chown args -R _portzap:_portzap /home/_portzap/ports/.git