• sysutils/containers-common: applying patches to fetched go modules

    From Dave Cottlehuber@dch@skunkwerks.at to muc.lists.freebsd.ports on Mon Oct 20 13:20:15 2025
    From Newsgroup: muc.lists.freebsd.ports

    sysutils/containers-common needs a patch to one of the fetched modules, to build successfully, thanks bapt@ for helping with that.

    It seems the usual copy & make makepatch tricks don't work because its not
    part of the original source tree, but part of the fetches.

    I worked around it using sed (see below) but it's not ideal.

    Are there any better approaches?

    # https://git.sr.ht/~dch/ports/commit/dc78093

    diff --git a/sysutils/containers-common/Makefile b/sysutils/containers-common/Makefile
    index 2575753505f76d78c80f48651f49bfa71e4e167e..2e08837cd389df27704da7af2e172dac3f9ec56b 100644
    --- a/sysutils/containers-common/Makefile
    +++ b/sysutils/containers-common/Makefile
    @@ -29,6 +29,10 @@ IMAGEVERSION= 5.36.2
    SKOPEOVERSION= 1.20.0
    STORAGEVERSION= 1.59.1

    +post-patch:
    + ${SED} -I '' /golangci/d ${WRKSRC_storage}/tests/tools/Makefile
    + ${SED} -I '' -Ee s/go-md2man../go-md2man/ ${WRKSRC_storage}/tests/tools/Makefile
    +
    do-build:
    ${GMAKE} -C ${WRKSRC_common}/docs
    ${GMAKE} -C ${WRKSRC_storage} install.tools


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Gleb Popov@arrowd@freebsd.org to muc.lists.freebsd.ports on Mon Oct 20 16:33:40 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Mon, Oct 20, 2025 at 4:20rC>PM Dave Cottlehuber <dch@skunkwerks.at> wrote:

    sysutils/containers-common needs a patch to one of the fetched modules, to build successfully, thanks bapt@ for helping with that.

    It seems the usual copy & make makepatch tricks don't work because its not part of the original source tree, but part of the fetches.
    Judging from the "${WRKSRC_storage}" usage in post-patch, I think the
    problem is that "make makepatch" only operates under ${WRKSRC}.
    Same goes for "make patch" - it will apply patches against ${WRKSRC}.
    For Haskell ports I made Uses/cabal.mk to put Haskell dependencies
    into ${WRKSRC}/cabal_deps rather than ${WRKDIR}/cabal_deps exactly
    for this reason.
    In your case you can stay with post-patch (it looks nice to me) or you
    can symlink ${WRKSRC_storage} somewhere under ${WRKSRC} to let
    patch/makepatch machinery kick in.
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2