From: Thomas Frohwein Subject: DIST_TUPLE: fix mv(1) for codeberg To: ports@openbsd.org Date: Mon, 5 Jan 2026 20:44:30 -0800 Hi, It looks like amongst the different code forges/sources for DIST_TUPLE, codeberg is a special case in that it extracts just to ${_project} instead of something like ${_project}-${_id}. The current ports that use codeberg all only use it with '.' at the end of DIST_TUPLE, so without a mv(1). While working on updating games/godot, godotsteam is now hosted on codeberg, too. When pulling this in with DIST_TUPLE += codeberg godotsteam godotsteam v3.20 godotsteam the MODDIST-TUPLE_post-extract fails because DIST_TUPLE gets the directory wrong by including the ${_id}. The diff below fixes this . It doesn't address the WRKDIST at this point for the other ports that already use DIST_TUPLE for codeberg and that all set WRKDIST manually. Fixing that will be a bit more involved... I tested the change with dist-tuple.test [1] which confirms that none of the DIST_TUPLE-derived variables in existing ports change in the existing ports tree. ok? [1] https://github.com/rfht/dist-tuple.test Index: dist-tuple.port.mk =================================================================== RCS file: /cvs/ports/infrastructure/mk/dist-tuple.port.mk,v diff -u -p -r1.19 dist-tuple.port.mk --- dist-tuple.port.mk 28 Dec 2025 17:58:25 -0000 1.19 +++ dist-tuple.port.mk 6 Jan 2026 04:26:42 -0000 @@ -42,7 +42,12 @@ EXTRACT_SUFX.${_template} ?= ${TEMPLATE TEMPLATE_HOMEPAGE.${_template} ?= ${TEMPLATE_HOMEPAGE} HOMEPAGE ?= ${TEMPLATE_HOMEPAGE.${_template}:${_subst}} -. if "${_targetdir}" != "." +. if "${_targetdir}" != "." && "${_template}" == "codeberg" +MODDIST-TUPLE_post-extract += \ + t=${WRKDIST}/${_targetdir}; [[ -d $$t ]] && rmdir $$t \ + || mkdir -p `dirname $$t` ; \ + mv ${WRKDIR}/${_project:T} $$t; +. elif "${_targetdir}" != "." MODDIST-TUPLE_post-extract += \ t=${WRKDIST}/${_targetdir}; [[ -d $$t ]] && rmdir $$t \ || mkdir -p `dirname $$t` ; \