Sunday, March 29, 2020

Re: PORTS_PRIVSEP=Yes and doas install

Marc Espie <espie@nerim.net> wrote:
> I've committed a proper fix, acknowledging that INSTALL_CACHE_REPO
> may not work without manual intervention.

According to cvsweb.openbsd.org and obsdacvs.cs.toronto.edu, last
update to pkgpath.mk and bsd.port.mk are from about an hour ago, with
diffs similar to the ones we discussed. The log entry got screweed (it
reads "/tmp/cvseSzodp"), and you missed adding ${_CACHE_REPO} to
PORTS_PRIVSEP'd _INSTALL_CACHE_REPO.

Why running : if install is successful, and not just failing if it
can't create the directory?

Is -o and -g still needed, given it's running as FETCH_USER already?

-Lucas


Index: pkgpath.mk
===================================================================
RCS file: /home/cvs/ports/infrastructure/mk/pkgpath.mk,v
retrieving revision 1.84
diff -u -p -u -p -r1.84 pkgpath.mk
--- pkgpath.mk 29 Mar 2020 12:11:45 -0000 1.84
+++ pkgpath.mk 29 Mar 2020 13:16:50 -0000
@@ -142,9 +142,7 @@ _PSUDO = ${SUDO}
_UPDATE_PLIST_SETUP=FAKE_TREE_OWNER=${BUILD_USER} \
PORTS_TREE_OWNER=$$(id -un) ${SUDO}
_INSTALL_CACHE_REPO = \
- if ${_PFETCH} install -d -o ${FETCH_USER} -g $$(id -g ${FETCH_USER}) ${PACKAGE_REPOSITORY_MODE}; then \
- :; \
- else \
+ if ! ${_PFETCH} install -d ${PACKAGE_REPOSITORY_MODE} ${_CACHE_REPO}; then \
echo >&2 "Can't create ${_CACHE_REPO}; run 'make fix-permissions' as root"; \
exit 1; \
fi

No comments:

Post a Comment