• RFD/CFT: www/angie: use upstream versions for all modules; using intermediate variables for DISTVERSION/PORTREVISION?

    From Sebastian Oswald@sko@rostwald.de to muc.lists.freebsd.ports on Fri Oct 17 11:50:44 2025
    From Newsgroup: muc.lists.freebsd.ports

    --Sig_/aWOBfDQ_4R0.bckATF2GjgD
    Content-Type: multipart/mixed; boundary="MP_/QIPqEw.4iQXvORk2crjdxaV"

    --MP_/QIPqEw.4iQXvORk2crjdxaV
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    Hello All,

    I recently inherited maintaniership of www/angie and its related
    angie-module-* ports.
    Those modules were all set up as slave ports and always inherited the
    version nmuber from www/angie.

    I wanted to fix this for a while now, because it made it rather tedious
    for me (and essentially all users) to keep track of the actual module
    versions and upstream version changes/updates. Of course, portscout also
    could not determine the correct version of the modules and inform me of
    updates (I subscribed to all the upstream git repos instead).

    It turned out this inheritance also implicated, that setting a
    PORTREVISION in one of the module/slave ports propagates to the
    www/angie version and thus breaking the build (as there is no such
    revision for www/angie).
    This just happened and made me finally tackle this problem to prevent
    such accidents in the future.

    Sadly, I couldn't find another master/slave ports family that uses
    distinct versions for the master and slaves, and the porters handbook unfortunately is a bit scarce on information about master/slave ports
    and their implications or nuances. (And if there is already a mechanism
    in place to deal with this specific problem)

    So after lots of testing I think I found a viable solution that isn't
    too invasive and allows me keeping the modules as slave ports instead
    of copying (and maintaining) almost the entire contents of the www/angie Makefile 27 times...

    Please have a look at the attached patch and its commit message,
    explaining the changes an reasons for them in detail. The diff to www/angie/Makefile that makes it all happen is located at the end of the
    patch.
    For convenience here is the important snippet of the resulting Makefile:

    =3D=3D=3D=3D=3D
    PORTNAME?=3D angie
    MASTER_DISTVERSION=3D 1.10.2
    MASTER_PORTREVISION=3D 1 =20

    [...]

    .if ${PORTNAME} =3D=3D angie
    DISTVERSION=3D ${MASTER_DISTVERSION}
    PORTREVISION=3D ${MASTER_PORTREVISION}
    LICENSE_FILE=3D ${WRKSRC}/LICENSE
    LIB_DEPENDS=3D libpcre2-8.so:devel/pcre2
    USE_RC_SUBR=3D angie
    ALL_TARGET=3D build
    SUB_FILES=3D angie.conf.sample \
    default.conf.sample \
    example.conf.sample \
    pkg-message
    .else
    # module build; module Makefiles set the PORTVERSION
    PORTEPOCH=3D 1
    LICENSE_FILE?=3D ${WRKSRC_module}/LICENSE
    BUILD_DEPENDS+=3D pcre2>=3D0:devel/pcre2
    RUN_DEPENDS+=3D angie>=3D${MASTER_DISTVERSION}:www/angie
    ALL_TARGET?=3D modules
    CONFIGURE_ADD?=3D --add-dynamic-module=3D${WRKSRC_module}
    .endif
    =3D=3D=3D=3D=3D

    Before proposing this patch for commit, I'd like to get some feedback
    about my chosen solution and especially, if it is acceptable to use
    custom variables (MASTER_DISTVERSION and MASTER_PORTREVISION) as
    intermediates for the DISTVERSION and PORTREVISION.
    In essence, I needed a mechanism to carry on the www/angie DISTVERSION
    when building a module, without some of the implications DISTVERSION
    brings with it. Depending on correct overrides of DISTVERSION always
    caused a lot of exceptions and edge-cases I had to handle individually
    (e.g. with various additional .if blocks). It also meant I had to
    define the the www/angie in an additional variable for module builds,
    leading to multiple points where a version update needs to be reflected
    (i.e. an accident waiting to happen).
    Defining DISTVERSION for the master and PORTVERSION for the slaves or
    defining one from the other and similar tricks using both also were no
    option, because defining both is forbidden and fails the sanity check.
    So the IMHO cleanest and safest solution was the use of those
    intermediate variables to have a single point of truth for the version.

    Thanks in advance for any feedback or hints on improvements/changes I should/have to make (or if this approach is complete nonsense).
    I really want this change to be safer and more future-proof than the
    current state, not make it even more dangerous and opaque.

    Regards,
    Sebastian

    --=20
    Sebastian Oswald
    GnuPG-Key-ID: 0x313F3181

    --MP_/QIPqEw.4iQXvORk2crjdxaV
    Content-Type: text/x-patch
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: attachment;
    filename=www-angie_use-upstream-version-numbers-for-modules.patch

    =46rom 6fe8f5cc26948073a02451434c9a376ee5bf0efe Mon Sep 17 00:00:00 2001
    From: Charlie Root <sko@rostwald.de>
    Date: Fri, 17 Oct 2025 09:53:18 +0200
    Subject: [PATCH] www/angie*: use upstream version numbers for modules MIME-Version: 1.0
    Content-Type: text/plain; charset=3DUTF-8
    Content-Transfer-Encoding: 8bit

    Previously all angie-module-* ports inherited the version number
    of the angie version they were built against. This made it hard
    to track their actual versions and very opaque for the user.

    The modules are slave ports to www/angie, inheriting its Makefile
    during built.
    This led to unwanted behaviour like the PORTREVISION in a module
    propagating to the master port (www/angie) version number and
    breaking the build. (We found out the hard way=E2=84=A2)

    To adopt upstream versions to the modules while ensuring slave
    (module) and master (angie) version numbers and modifiers
    (PORTREVISION) don't cross-pollinate, but still keeping the
    master/slave architecture, we need a small kludge.

    This means the www/angie-module-* Makefiles need to set the
    PORTVERSION instead of DISTVERSION. This also circumvents possible
    problems with some "special" versioning conventions chosen by some
    upstream maintainers that are incompatible with the way DISTVERSION
    works.
    Modules that only have a git hash still inherit the www/angie version
    and need to be bumped via PORTREVISION in case of updates. (Both
    modules in question did not receive any updates for >3 years)

    In www/angie/Makefile the DISTVERSION and PORTREVISION have to be
    set as MASTER_DISTVERSION and MASTER_PORTREVISION. The Makefile then
    handles defining DISTVERSION and PORTREVISION according to the type
    of build (angie or module).

    To ensure all modules being properly upgraded after this change, we
    have to introduce the PORTEPOCH to all module ports. We could only
    set PORTEPOCH for those with a lower version number than www/angie,
    but having all modules on the same epoch makes it much easier to spot inconsistencies. So for the sake of sanity and POLA, we bump all www/angie-module* ports to the same EPOCH.
    ---
    www/angie-module-auth-jwt/Makefile | 3 ++-
    www/angie-module-auth-spnego/Makefile | 3 ++-
    www/angie-module-auth-totp/Makefile | 3 ++-
    www/angie-module-brotli/Makefile | 3 ++-
    www/angie-module-cache-purge/Makefile | 3 ++-
    www/angie-module-dav-ext/Makefile | 3 ++-
    www/angie-module-echo/Makefile | 3 ++-
    www/angie-module-enhanced-memcached/Makefile | 3 ++-
    www/angie-module-eval/Makefile | 3 ++-
    www/angie-module-geoip2/Makefile | 3 ++-
    www/angie-module-headers-more/Makefile | 3 ++-
    www/angie-module-jwt/Makefile | 3 ++-
    www/angie-module-keyval/Makefile | 3 ++-
    www/angie-module-lua/Makefile | 5 +++--
    www/angie-module-ndk/Makefile | 3 ++-
    www/angie-module-njs/Makefile | 3 ++-
    www/angie-module-postgres/Makefile | 3 ++-
    www/angie-module-redis2/Makefile | 3 ++-
    www/angie-module-rtmp/Makefile | 3 ++-
    www/angie-module-set-misc/Makefile | 3 ++-
    www/angie-module-subs/Makefile | 1 +
    www/angie-module-testcookie/Makefile | 1 +
    www/angie-module-upload/Makefile | 3 ++-
    www/angie-module-vod/Makefile | 3 ++-
    www/angie-module-xslt/Makefile | 1 +
    www/angie/Makefile | 11 +++++++----
    26 files changed, 55 insertions(+), 27 deletions(-)

    diff --git a/www/angie-module-auth-jwt/Makefile b/www/angie-module-auth-jwt= /Makefile
    index 6c78be4c6638..83064a517015 100644
    --- a/www/angie-module-auth-jwt/Makefile
    +++ b/www/angie-module-auth-jwt/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-auth-jwt
    -GH_TUPLE=3D kjdev:nginx-auth-jwt:0.9.0:module
    +PORTVERSION=3D 0.9.0
    +GH_TUPLE=3D kjdev:nginx-auth-jwt:${PORTVERSION}:module

    COMMENT=3D Angie auth-jwt dynamic module

    diff --git a/www/angie-module-auth-spnego/Makefile b/www/angie-module-auth-= spnego/Makefile
    index 41803c80b2d9..4ea5c096e3d6 100644
    --- a/www/angie-module-auth-spnego/Makefile
    +++ b/www/angie-module-auth-spnego/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-auth-spnego
    -GH_TUPLE=3D stnoonan:spnego-http-auth-nginx-module:v1.1.3:module +PORTVERSION=3D v1.1.3
    +GH_TUPLE=3D stnoonan:spnego-http-auth-nginx-module:${PORTVERSION}:module

    COMMENT=3D Angie auth-spnego dynamic module

    diff --git a/www/angie-module-auth-totp/Makefile b/www/angie-module-auth-to= tp/Makefile
    index 702a9ba40684..30e8c2fe9a10 100644
    --- a/www/angie-module-auth-totp/Makefile
    +++ b/www/angie-module-auth-totp/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-auth-totp
    -GH_TUPLE=3D 61131:nginx-http-auth-totp:1.1.0:module
    +PORTVERSION=3D 1.1.0
    +GH_TUPLE=3D 61131:nginx-http-auth-totp:${PORTVERSION}:module

    COMMENT=3D Angie auth-totp dynamic module

    diff --git a/www/angie-module-brotli/Makefile b/www/angie-module-brotli/Mak= efile
    index 2ec4cb655895..ad9aa681fd73 100644
    --- a/www/angie-module-brotli/Makefile
    +++ b/www/angie-module-brotli/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-brotli
    -GH_TUPLE=3D google:ngx_brotli:v1.0.0rc:module
    +PORTVERSION=3D v1.0.0rc
    +GH_TUPLE=3D google:ngx_brotli:${PORTVERSION}:module

    COMMENT=3D Angie Brotli dynamic module

    diff --git a/www/angie-module-cache-purge/Makefile b/www/angie-module-cache= -purge/Makefile
    index b7bdee160341..4c4fa1177406 100644
    --- a/www/angie-module-cache-purge/Makefile
    +++ b/www/angie-module-cache-purge/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-cache-purge
    -GH_TUPLE=3D nginx-modules:ngx_cache_purge:2.5.4:module
    +PORTVERSION=3D 2.5.4
    +GH_TUPLE=3D nginx-modules:ngx_cache_purge:${PORTVERSION}:module

    COMMENT=3D Angie cache_purge dynamic module

    diff --git a/www/angie-module-dav-ext/Makefile b/www/angie-module-dav-ext/M= akefile
    index d403b808d478..1bb577b98d58 100644
    --- a/www/angie-module-dav-ext/Makefile
    +++ b/www/angie-module-dav-ext/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-dav-ext
    -GH_TUPLE=3D arut:nginx-dav-ext-module:v3.0.0:module
    +PORTVERSION=3D v3.0.0
    +GH_TUPLE=3D arut:nginx-dav-ext-module:${PORTVERSION}:module

    COMMENT=3D Angie dav-ext dynamic module

    diff --git a/www/angie-module-echo/Makefile b/www/angie-module-echo/Makefile index 94804caec685..bfe5e547c48e 100644
    --- a/www/angie-module-echo/Makefile
    +++ b/www/angie-module-echo/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-echo
    -GH_TUPLE=3D openresty:echo-nginx-module:v0.63:module
    +PORTVERSION=3D v0.63
    +GH_TUPLE=3D openresty:echo-nginx-module:${PORTVERSION}:module

    COMMENT=3D Angie echo dynamic module

    diff --git a/www/angie-module-enhanced-memcached/Makefile b/www/angie-modul= e-enhanced-memcached/Makefile
    index 54e3891d54e4..3f04a8beab93 100644
    --- a/www/angie-module-enhanced-memcached/Makefile
    +++ b/www/angie-module-enhanced-memcached/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-enhanced-memcached
    -GH_TUPLE=3D bpaquet:ngx_http_enhanced_memcached_module:v0.3:module +PORTVERSION=3D v0.3
    +GH_TUPLE=3D bpaquet:ngx_http_enhanced_memcached_module:${PORTVERSION}:modu= le

    COMMENT=3D Angie enhanced memcached dynamic module

    diff --git a/www/angie-module-eval/Makefile b/www/angie-module-eval/Makefile index 94a108b14c46..694824ce4bba 100644
    --- a/www/angie-module-eval/Makefile
    +++ b/www/angie-module-eval/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-eval
    -GH_TUPLE=3D openresty:nginx-eval-module:2016.06.10:module
    +PORTVERSION=3D 2016.06.10
    +GH_TUPLE=3D openresty:nginx-eval-module:${PORTVERSION}:module

    COMMENT=3D Angie eval dynamic module

    diff --git a/www/angie-module-geoip2/Makefile b/www/angie-module-geoip2/Mak= efile
    index 7df133590ec7..b1e5dc8ff757 100644
    --- a/www/angie-module-geoip2/Makefile
    +++ b/www/angie-module-geoip2/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-geoip2
    -GH_TUPLE=3D leev:ngx_http_geoip2_module:3.4:module
    +PORTVERSION=3D 3.4
    +GH_TUPLE=3D leev:ngx_http_geoip2_module:${PORTVERSION}:module

    COMMENT=3D Angie GeoIP2 dynamic module

    diff --git a/www/angie-module-headers-more/Makefile b/www/angie-module-head= ers-more/Makefile
    index b2879e7f6f9f..a54f0820cd4a 100644
    --- a/www/angie-module-headers-more/Makefile
    +++ b/www/angie-module-headers-more/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-headers-more
    -GH_TUPLE=3D openresty:headers-more-nginx-module:v0.39:module +PORTVERSION=3D v0.39
    +GH_TUPLE=3D openresty:headers-more-nginx-module:${PORTVERSION}:module

    COMMENT=3D Angie headers-more dynamic module

    diff --git a/www/angie-module-jwt/Makefile b/www/angie-module-jwt/Makefile index 2644023a3c9c..6c46db4c1495 100644
    --- a/www/angie-module-jwt/Makefile
    +++ b/www/angie-module-jwt/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-jwt
    -GH_TUPLE=3D max-lt:nginx-jwt-module:v3.4.3:module
    +PORTVERSION=3D v3.4.3
    +GH_TUPLE=3D max-lt:nginx-jwt-module:${PORTVERSION}:module

    COMMENT=3D Angie JWT dynamic module

    diff --git a/www/angie-module-keyval/Makefile b/www/angie-module-keyval/Mak= efile
    index 432310743eb8..5ab1fc6f11ea 100644
    --- a/www/angie-module-keyval/Makefile
    +++ b/www/angie-module-keyval/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-keyval
    -GH_TUPLE=3D kjdev:nginx-keyval:0.3.0:module
    +PORTVERSION=3D 0.3.0
    +GH_TUPLE=3D kjdev:nginx-keyval:${PORTVERSION}:module

    COMMENT=3D Angie keyval dynamic module

    diff --git a/www/angie-module-lua/Makefile b/www/angie-module-lua/Makefile index 4dd019336620..a7f8095c41c6 100644
    --- a/www/angie-module-lua/Makefile
    +++ b/www/angie-module-lua/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-lua
    -GH_TUPLE=3D openresty:lua-nginx-module:v0.10.28:lua
    +PORTVERSION=3D v0.10.28
    +GH_TUPLE=3D openresty:lua-nginx-module:${PORTVERSION}:lua
    GH_TUPLE+=3D openresty:stream-lua-nginx-module:v0.0.16:lua_stream
    GH_TUPLE+=3D vision5:ngx_devel_kit:v0.3.4:ndk

    @@ -16,7 +17,7 @@ CONFIGURE_ADD=3D --add-dynamic-module=3D${WRKSRC_lua} \
    CONFIGURE_ENV=3D LUAJIT_INC=3D${LUAJIT_INCDIR} \
    LUAJIT_LIB=3D${LOCALBASE}/lib

    -RUN_DEPENDS=3D angie-module-ndk=3D=3D${PKGVERSION}:www/angie-module-ndk \ +RUN_DEPENDS=3D angie-module-ndk=3D=3Dv0.3.4,2:www/angie-module-ndk \
    lua-resty-core>=3D0.1.29:www/lua-resty-core

    USES=3D luajit:luajit-openresty
    diff --git a/www/angie-module-ndk/Makefile b/www/angie-module-ndk/Makefile index dc0e57861dae..0d18c38a26de 100644
    --- a/www/angie-module-ndk/Makefile
    +++ b/www/angie-module-ndk/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-ndk
    -GH_TUPLE=3D vision5:ngx_devel_kit:v0.3.4:module
    +PORTVERSION=3D v0.3.4
    +GH_TUPLE=3D vision5:ngx_devel_kit:${PORTVERSION}:module

    COMMENT=3D Angie NDK dynamic module

    diff --git a/www/angie-module-njs/Makefile b/www/angie-module-njs/Makefile index f69739a1be2f..811546e5e206 100644
    --- a/www/angie-module-njs/Makefile
    +++ b/www/angie-module-njs/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-njs
    -GH_TUPLE=3D nginx:njs:0.9.1:module
    +PORTVERSION=3D 0.9.1
    +GH_TUPLE=3D nginx:njs:${PORTVERSION}:module

    COMMENT=3D Angie NJS dynamic module

    diff --git a/www/angie-module-postgres/Makefile b/www/angie-module-postgres= /Makefile
    index b672ce013b86..597e7419958e 100644
    --- a/www/angie-module-postgres/Makefile
    +++ b/www/angie-module-postgres/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-postgres
    -GH_TUPLE=3D FRiCKLE:ngx_postgres:1.0rc7:module
    +PORTVERSION=3D 1.0rc7
    +GH_TUPLE=3D FRiCKLE:ngx_postgres:${PORTVERSION}:module

    COMMENT=3D Angie postgres dynamic module

    diff --git a/www/angie-module-redis2/Makefile b/www/angie-module-redis2/Mak= efile
    index 2ab1a5856835..29de8fe5da4a 100644
    --- a/www/angie-module-redis2/Makefile
    +++ b/www/angie-module-redis2/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-redis2
    -GH_TUPLE=3D openresty:redis2-nginx-module:v0.15:module
    +PORTVERSION=3D v0.15
    +GH_TUPLE=3D openresty:redis2-nginx-module:${PORTVERSION}:module

    COMMENT=3D Angie redis2 dynamic module

    diff --git a/www/angie-module-rtmp/Makefile b/www/angie-module-rtmp/Makefile index 1baca0453d21..a83fba0f30bf 100644
    --- a/www/angie-module-rtmp/Makefile
    +++ b/www/angie-module-rtmp/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-rtmp
    -GH_TUPLE=3D arut:nginx-rtmp-module:v1.2.2:module
    +PORTVERSION=3D v1.2.2
    +GH_TUPLE=3D arut:nginx-rtmp-module:${PORTVERSION}:module

    COMMENT=3D Angie RTMP dynamic module

    diff --git a/www/angie-module-set-misc/Makefile b/www/angie-module-set-misc= /Makefile
    index 64b5078e7f96..0350797c7b34 100644
    --- a/www/angie-module-set-misc/Makefile
    +++ b/www/angie-module-set-misc/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-set-misc
    -GH_TUPLE=3D vision5:ngx_devel_kit:v0.3.4:ndk
    +PORTVERSION=3D v0.3.4
    +GH_TUPLE=3D vision5:ngx_devel_kit:${PORTVERSION}:ndk
    GH_TUPLE+=3D openresty:set-misc-nginx-module:v0.33:module

    COMMENT=3D Angie set-misc dynamic module
    diff --git a/www/angie-module-subs/Makefile b/www/angie-module-subs/Makefile index b444f72eab8a..738d1a84adbb 100644
    --- a/www/angie-module-subs/Makefile
    +++ b/www/angie-module-subs/Makefile
    @@ -1,4 +1,5 @@
    PORTNAME=3D angie-module-subs
    +PORTVERSION=3D ${MASTER_DISTVERSION}
    GH_TUPLE=3D yaoweibin:ngx_http_substitutions_filter_module:e12e965ac1837ca= 709709f9a26f572a54d83430e:module

    COMMENT=3D Angie substitutions filter dynamic module
    diff --git a/www/angie-module-testcookie/Makefile b/www/angie-module-testco= okie/Makefile
    index f4026c99bd06..1c4e1f8acd4d 100644
    --- a/www/angie-module-testcookie/Makefile
    +++ b/www/angie-module-testcookie/Makefile
    @@ -1,4 +1,5 @@
    PORTNAME=3D angie-module-testcookie
    +PORTVERSION=3D ${MASTER_DISTVERSION}
    GH_TUPLE=3D kyprizel:testcookie-nginx-module:64137c2f7e66e8866f56fdecaaf09= ac10a034da9:module

    COMMENT=3D Angie testcookie dynamic module
    diff --git a/www/angie-module-upload/Makefile b/www/angie-module-upload/Mak= efile
    index 11edfbe73956..2f1bbdfbe7f7 100644
    --- a/www/angie-module-upload/Makefile
    +++ b/www/angie-module-upload/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-upload
    -GH_TUPLE=3D fdintino:nginx-upload-module:2.3.0:module
    +PORTVERSION=3D 2.3.0
    +GH_TUPLE=3D fdintino:nginx-upload-module:${PORTVERSION}:module

    COMMENT=3D Angie upload dynamic module

    diff --git a/www/angie-module-vod/Makefile b/www/angie-module-vod/Makefile index 794908d2d342..6e86edce6e76 100644
    --- a/www/angie-module-vod/Makefile
    +++ b/www/angie-module-vod/Makefile
    @@ -1,5 +1,6 @@
    PORTNAME=3D angie-module-vod
    -GH_TUPLE=3D kaltura:nginx-vod-module:1.33:module
    +PORTVERSION=3D 1.33
    +GH_TUPLE=3D kaltura:nginx-vod-module:${PORTVERSION}:module

    COMMENT=3D VOD dynamic module for Angie

    diff --git a/www/angie-module-xslt/Makefile b/www/angie-module-xslt/Makefile index 3264ada0959d..5ada78c1a8c3 100644
    --- a/www/angie-module-xslt/Makefile
    +++ b/www/angie-module-xslt/Makefile
    @@ -1,4 +1,5 @@
    PORTNAME=3D angie-module-xslt
    +PORTVERSION=3D ${MASTER_DISTVERSION}

    COMMENT=3D Angie XSLT dynamic module

    diff --git a/www/angie/Makefile b/www/angie/Makefile
    index 7ac5e95fde80..8faf8e9169f0 100644
    --- a/www/angie/Makefile
    +++ b/www/angie/Makefile
    @@ -1,9 +1,9 @@
    PORTNAME?=3D angie
    -DISTVERSION=3D 1.10.2
    -PORTREVISION=3D 1
    +MASTER_DISTVERSION=3D 1.10.2
    +MASTER_PORTREVISION=3D 2
    CATEGORIES+=3D www
    MASTER_SITES+=3D https://download.angie.software/files/:angie -DISTNAME=3D angie-${DISTVERSIONFULL}
    +DISTNAME=3D angie-${MASTER_DISTVERSION}
    DISTFILES+=3D ${DISTNAME}${EXTRACT_SUFX}:angie

    MAINTAINER?=3D sko@rostwald.de
    @@ -13,6 +13,8 @@ WWW?=3D https://angie.software/en/
    LICENSE?=3D BSD2CLAUSE

    .if ${PORTNAME} =3D=3D angie
    +DISTVERSION=3D ${MASTER_DISTVERSION}
    +PORTREVISION=3D ${MASTER_PORTREVISION}
    LICENSE_FILE=3D ${WRKSRC}/LICENSE
    LIB_DEPENDS=3D libpcre2-8.so:devel/pcre2
    USE_RC_SUBR=3D angie
    @@ -22,9 +24,10 @@ SUB_FILES=3D angie.conf.sample \
    example.conf.sample \
    pkg-message
    .else
    +PORTEPOCH=3D 1
    LICENSE_FILE?=3D ${WRKSRC_module}/LICENSE
    BUILD_DEPENDS+=3D pcre2>=3D0:devel/pcre2
    -RUN_DEPENDS+=3D angie=3D=3D${PKGVERSION}:www/angie
    +RUN_DEPENDS+=3D angie>=3D${MASTER_DISTVERSION}:www/angie
    ALL_TARGET?=3D modules
    CONFIGURE_ADD?=3D --add-dynamic-module=3D${WRKSRC_module}
    .endif
    --
    2.51.0


    --MP_/QIPqEw.4iQXvORk2crjdxaV--

    --Sig_/aWOBfDQ_4R0.bckATF2GjgD
    Content-Type: application/pgp-signature
    Content-Description: OpenPGP digital signature

    -----BEGIN PGP SIGNATURE-----

    iQEzBAEBCAAdFiEErQouifc5ybqTEVgvLx1vPG8zTyoFAmjyEXQACgkQLx1vPG8z TypcfQf9GxwhhFFcWaK+vE5c4G05zPEA0v6iMpZuX1ct3sz2aPnnoeRoVvG2l2WF 3DYNunpey0gr7T8tek/TRAWAuClcNAsmWrl5T0rQbPtn6Sn8cn73Xghw/cuV4NY9 4nUajNLE52wYz5X9DOxymyfeIM2OVJISRPeuPoQ44Pq57T1S9viMH4KBTBRpQwoA SN3HvOPbCbJaKXWj9B7ZdrwEmEpA2kNtRPibu3eB1rgFbGADlNds7u7R2Idrr1KA JaRh2rzK/53cxoWQUFJziKBjuz9YACHW25dPMA2KTYCMOFJRxuvCi7zJ2C9g5g/h qbLlfniT98JcY/lnKE/GMVBanZsE7A==
    =s7I8
    -----END PGP SIGNATURE-----

    --Sig_/aWOBfDQ_4R0.bckATF2GjgD--


    --
    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 Fri Oct 17 14:01:02 2025
    From Newsgroup: muc.lists.freebsd.ports

    I don't get it, why not use ?= when setting PORTREVISION in the master port? This is a common technique to allow slaves to override master port's variables.


    --
    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 Sebastian Oswald@sko@rostwald.de to muc.lists.freebsd.ports on Fri Oct 17 14:49:14 2025
    From Newsgroup: muc.lists.freebsd.ports

    --Sig_//tshOkk+aYMaqCNOrS.iZrM
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: quoted-printable

    Hello Gleb,

    I don't get it, why not use ?=3D when setting PORTREVISION in the master =
    port?
    This is a common technique to allow slaves to override master port's vari=
    ables.
    =20

    Thanks for that suggestion. I hope I haven't misunderstood you, but the
    problem is not that I want to ovverride PORTREVISION in the master port
    - the problem is that if PORTREVISION is set in a slave port, it
    propagates to the version of the master port (angie) for the build
    process of that slave port.
    E.g. setting PORTREVISION=3D1 for a www/angie-module-* port results in a dependency to 'angie-<version>_1' which of course does not exist.
    I'd have to set the PORTREVISION in the master port (too), which
    triggers an unnecessary rebuild of *all* modules and also bumps their portrevision even if there were zero changes.

    But more importantly, regarding using the upstream versions for the
    slave ports, I can't override the masters DISTVERSION from the slave
    port, because in the master Makefile this is of course used for the
    angie version (and hence parts of the module build process as well).
    If I override the DISTVERSION, the build fails as there is of course no
    angie version that corresponds to the module version.
    If the master Makefile dictates the DISTVERSION, all modules again get
    the angie version appended (i.e. the status quo).

    For the build of a module which results in it carrying its upstream
    version number, I need to have both versions accessible - the version
    of the master port (angie) and the upstream version of the module.

    There's a good chance I'm overthinking this, and/or I may lack knowledge
    of some important mechanism available in Makefiles to handle those
    different version numbers for slave and master port. That's why I asked
    here on the mailing list.

    Thanks,
    Sebastian

    --=20
    Sebastian Oswald
    GnuPG-Key-ID: 0x313F3181


    --Sig_//tshOkk+aYMaqCNOrS.iZrM
    Content-Type: application/pgp-signature
    Content-Description: OpenPGP digital signature

    -----BEGIN PGP SIGNATURE-----

    iQEzBAEBCAAdFiEErQouifc5ybqTEVgvLx1vPG8zTyoFAmjyO0oACgkQLx1vPG8z Tyo+Swf+L4LCOvufjVIr23mcHWBRPudZurWKKit8zJWiCkwx8qsp83+TiEjLQ0e1 Iey9Z6PQ91DvKYueW72IVFvjP9UenPmzi9UIAxN2ncFlB60CoQi3TGHZCuYYc2pk EWfxoqR5DEaRooVpWhdwm8xIW5B57vtjGkrYwTn7+aEJtWAHMeoiN09vYLKunx5g uBs7iM5mnpGlEzMsrFtO5eH6B5HVlhZ1hrRIYKt9JiBfN1z6MMb0vmkUU/Dhvy3Y 12ETbbNMP+0bYXBayog5VSf1A486Z5Uxp2FiQ0KFd8Ob/9E0v66wXYzpYlb6CrKM M65SAJwD2wHzYx8GvNNcA9ArnNdLhg==
    =exNK
    -----END PGP SIGNATURE-----

    --Sig_//tshOkk+aYMaqCNOrS.iZrM--


    --
    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 Sebastian Oswald@sko@rostwald.de to muc.lists.freebsd.ports on Fri Oct 17 14:49:03 2025
    From Newsgroup: muc.lists.freebsd.ports

    --Sig_/rounP_sjZiXUl_0ame1rD6K
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: quoted-printable

    Hi Robert,
    =20
    One pattern that I like to use is to build a framework Makefile in the
    master port that is included by the slave port. See e.g. devel/schilybase and its dependent ports. This allows you to sidestep the whole issue of
    the slave port getting the whole master port makefile. Do disregard the warnings of portlint on the master port file having an uncommon name.

    That's indeed an elegant solution to provide a separate Makefile for
    all slaves within the master port. I'll definitely have a look at this.

    I'd still need a way to have both version numbers (slave and master)
    present during module build; but this way I can just use a custom
    variable in that slave-Makefile, allowing the www/angie Makefile and
    all slave Makefiles to use DISTVERSION as intended.
    (Or is there some mechanism to dynamically get another port's
    current version from a Makefile?)

    Thanks,
    Sebastian

    --=20
    Sebastian Oswald
    GnuPG-Key-ID: 0x313F3181


    --Sig_/rounP_sjZiXUl_0ame1rD6K
    Content-Type: application/pgp-signature
    Content-Description: OpenPGP digital signature

    -----BEGIN PGP SIGNATURE-----

    iQEzBAEBCAAdFiEErQouifc5ybqTEVgvLx1vPG8zTyoFAmjyOz8ACgkQLx1vPG8z Tyq9OQf/YM/xCGYRfzU7JqKGnlI8h/P/vJcbBCnDg9nHk4AyKXiMhl1ahmW7tLIr 3PNI6r+RYffzSkJ+1GhQ+pBdnYgSacnxqyKbgbNqjJgrexJUHCkZ5RAHanL29mIJ MEnGhM0OIM8K96cUzHdFrFG4Z766QDKGN13vDkFvAFB1tMgdfuXPmiV++83xiVB1 XKr5SvU+9gaaogjyOWl8Cd7ovrEh516YvpZn1VQnI7t4j8OB289qb/D13hZLFQ2T 6rFdNQrZw00NCHW+HN+Dd9i/ZfGtXVGZuVDD/gk/E4N2d2nRYMifIy//y1jdspF1 bsVYv4Vsb2Poy81MeRQpRoBfWTX4XQ==
    =SaTw
    -----END PGP SIGNATURE-----

    --Sig_/rounP_sjZiXUl_0ame1rD6K--


    --
    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 Fri Oct 17 16:00:04 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Fri, Oct 17, 2025 at 3:49rC>PM Sebastian Oswald <sko@rostwald.de> wrote:

    Hello Gleb,

    I don't get it, why not use ?= when setting PORTREVISION in the master port?
    This is a common technique to allow slaves to override master port's variables.


    Thanks for that suggestion. I hope I haven't misunderstood you, but the problem is not that I want to ovverride PORTREVISION in the master port
    - the problem is that if PORTREVISION is set in a slave port, it
    propagates to the version of the master port (angie) for the build
    process of that slave port.
    E.g. setting PORTREVISION=1 for a www/angie-module-* port results in a dependency to 'angie-<version>_1' which of course does not exist.
    I'd have to set the PORTREVISION in the master port (too), which
    triggers an unnecessary rebuild of *all* modules and also bumps their portrevision even if there were zero changes.
    Ah, that's because of pretty uncommon dependency line
    RUN_DEPENDS+= angie==${PKGVERSION}:www/angie
    Why does it have to be "==" ? It seems that slave ports draw the
    version from the master port anyways, so they won't go out of sync.
    --
    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 Sebastian Oswald@sko@rostwald.de to muc.lists.freebsd.ports on Fri Oct 17 15:07:51 2025
    From Newsgroup: muc.lists.freebsd.ports

    --Sig_/6tJKoBZ96ADJyHbJWZuQnns
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: quoted-printable

    Ah, that's because of pretty uncommon dependency line
    =20
    RUN_DEPENDS+=3D angie=3D=3D${PKGVERSION}:www/angie
    =20
    Why does it have to be "=3D=3D" ? It seems that slave ports draw the
    version from the master port anyways, so they won't go out of sync.

    TBH, I have no idea why it was written this way and if this dependency definition is really necessary.
    I guess it is there to make sure the slaves are re-built when there is
    a new angie version, so I tried to make sure I can always pass the
    current angie version to this dependency definition.

    And yes, currently the slaves inherit the angie version - that's what
    I'm trying to fix here.

    THanks,
    Sebastian

    --=20
    Sebastian Oswald
    GnuPG-Key-ID: 0x313F3181


    --Sig_/6tJKoBZ96ADJyHbJWZuQnns
    Content-Type: application/pgp-signature
    Content-Description: OpenPGP digital signature

    -----BEGIN PGP SIGNATURE-----

    iQEzBAEBCAAdFiEErQouifc5ybqTEVgvLx1vPG8zTyoFAmjyP6cACgkQLx1vPG8z TyrZtwf9HLK9Nw8599DH8jHC/VM12+wiOV6977CY3IRt5KUIkr95+TWE1Ydr9uSm atrMlkaUYAvY5SUw6NwP3ff3D7hCor8veD1WmOdVsG968MR54VNvoSNFvzWGCXu3 aWUSIUvNdhHwxmx0CXMJoX46pgbmWtW5iEgC3mhaHWgJS8ar0BTQUnagy77bHmzG ZDq4YNYdDqYD/h9qOS751c1XWOiI9Lb7e3gWGhDufpBq7pO5uj/3Ptzt/PRNojgU ImwtI/wv1afhF8tAvnuRdy7lLInN2/EQ92BaCYc5wwYiMnzlPUB6Yi97ZjJgOZg/ Sj8DEeoa2rVSTAEZlqsK7y5CKAXBxQ==
    =tFz/
    -----END PGP SIGNATURE-----

    --Sig_/6tJKoBZ96ADJyHbJWZuQnns--


    --
    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 Fri Oct 17 16:32:43 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Fri, Oct 17, 2025 at 4:08rC>PM Sebastian Oswald <sko@rostwald.de> wrote:

    Ah, that's because of pretty uncommon dependency line

    RUN_DEPENDS+= angie==${PKGVERSION}:www/angie

    Why does it have to be "==" ? It seems that slave ports draw the
    version from the master port anyways, so they won't go out of sync.

    TBH, I have no idea why it was written this way and if this dependency definition is really necessary.
    I guess it is there to make sure the slaves are re-built when there is
    a new angie version, so I tried to make sure I can always pass the
    current angie version to this dependency definition.
    Poudriere handles this for us and it doesn't even need these strict bounds. This hack was probably made for people that are using plain make to
    update their packages, but that's an unsupported way to do this.
    I propose to replace the dependency line with just
    RUN_DEPENDS+= angie>0:www/angie

    And yes, currently the slaves inherit the angie version - that's what
    I'm trying to fix here.
    That's an orthogonal problem. It can be solved in the same way by
    defining DISTVERSION with ?= in the master port.
    --
    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