diff --git a/eclass/nginx.eclass b/eclass/nginx.eclass index fbe2ddaa88261..c77cbcf64eb20 100644 --- a/eclass/nginx.eclass +++ b/eclass/nginx.eclass @@ -10,17 +10,17 @@ # @BLURB: Provides a common set of functions for building the NGINX server # @DESCRIPTION: # This eclass automates building, testing and installation of the NGINX server. -# Essentially, apart from the advanced usage, the ebuild must only define 4 +# Essentially, apart from the advanced usage, the ebuild must only define 3 # variables prior to inheriting the eclass, everything else is handled by the # nginx.eclass. # Refer to the individual variable descriptions for documentation. The required # variables are: # - NGINX_SUBSYSTEMS # - NGINX_MODULES -# - NGINX_UPDATE_STREAM # - NGINX_TESTS_COMMIT -# And 1 optional variable (see description): +# And 2 optional variables (see description): # - NGINX_MISC_FILES +# - NGINX_UPDATE_STREAM (only for -9999 VCS versions) # # EAPI porting notes: # - 8 -> 9: @@ -113,34 +113,35 @@ readonly _NGX_MODULES=( "${NGINX_MODULES[@]}" ) # @ECLASS_VARIABLE: NGINX_UPDATE_STREAM # @PRE_INHERIT -# @REQUIRED # @DESCRIPTION: -# This variable must contain the update stream of NGINX. The list of all -# possible update streams is set by the NGX_UPDATE_STREAMS_LIST variable. An -# ebuild must not set SLOT manually. The eclass will automatically set SLOT and -# add blocks on other update streams into RDEPEND variable, based on this -# variable. -# NGINX_UPDATE_STREAM might be set to a special value: 'live'. Doing this makes -# the eclass fetch the live (latest) version of NGINX from its Git repository. -# This behaviour can be further configured by setting the following variables -# (refer to each variable description for documentation): +# NGINX_UPDATE_STREAM, if set at all, must only be set to a special value: +# 'live'. Setting this variable to any other value is a noop and deprecated. +# The allowed (noop) values for this variable, including 'live', are specified +# in ${NGX_UPDATE_STREAMS_LIST}. +# +# If this is set to 'live', the eclass fetches the live (latest) version of +# NGINX from its Git repository. This behaviour can be further configured by +# setting the following variables (refer to each variable description for +# documentation): # - NGINX_GIT_URI # - NGINX_GIT_TESTS_URI -# -# Example usage: -# @CODE -# NGINX_UPDATE_STREAM=mainline -# @CODE # @ECLASS_VARIABLE: NGX_UPDATE_STREAMS_LIST # @DESCRIPTION: # Read-only array that contains all the possible NGINX update streams. +# Currently, any values other than 'live' are deprecated and are a noop. readonly NGX_UPDATE_STREAMS_LIST=( stable mainline live ) -[[ -z ${NGINX_UPDATE_STREAM} ]] && - die "The required NGINX_UPDATE_STREAM variable is unset or empty" -has "${NGINX_UPDATE_STREAM}" "${NGX_UPDATE_STREAMS_LIST[@]}" || +if [[ -n ${NGINX_UPDATE_STREAM} ]] && + ! has "${NGINX_UPDATE_STREAM}" "${NGX_UPDATE_STREAMS_LIST[@]}"; then die "Unknown update stream set in the NGINX_UPDATE_STREAM variable" +fi + +has "${NGINX_UPDATE_STREAM}" stable mainline && + eqawarn <<- EOF + NGINX_UPDATE_STREAM=${NGINX_UPDATE_STREAM} is deprecated and a + noop. Please unset NGINX_UPDATE_STREAM + EOF [[ ${NGINX_UPDATE_STREAM} == live ]] && inherit git-r3 @@ -239,9 +240,9 @@ has "${NGINX_UPDATE_STREAM}" "${NGX_UPDATE_STREAMS_LIST[@]}" || #-----> ebuild setup <----- -# NGINX does not guarantee ABI stability (required by dynamic modules), SLOT is +# NGINX does not guarantee ABI stability (required by dynamic modules), subslot is # set to reflect this. -SLOT="${NGINX_UPDATE_STREAM}/${PV}" +: "${SLOT=0/${PV}}" : "${DESCRIPTION=Robust, small and high performance HTTP and reverse proxy server}" : "${HOMEPAGE=https://nginx.org https://github.com/nginx/nginx}" if [[ -z ${SRC_URI} ]]; then @@ -348,27 +349,6 @@ RDEPEND=" IDEPEND="virtual/tmpfiles" -# @FUNCTION: _ngx_set_blocks -# @INTERNAL -# @USAGE: [...] -# @DESCRIPTION: -# Set blocks on all the supplied update streams apart from the chosen one. -_ngx_set_blocks() { - debug-print-function "${FUNCNAME[0]}" "$@" - [[ $# -ge 2 ]] || die "${FUNCNAME[0]} must receive at least two arguments" - local chosen candidate - chosen="$1" - shift - for candidate; do - [[ ${candidate} != "${chosen}" ]] && - RDEPEND+=" !${CATEGORY}/${PN}:${candidate}" - done -} - -# Null at the end makes the function also block the legacy unslotted NGINX versions. -_ngx_set_blocks "${NGINX_UPDATE_STREAM}" "${NGX_UPDATE_STREAMS_LIST[@]}" 0 - - # @FUNCTION: _ngx_set_mod_required_use # @INTERNAL # @DESCRIPTION: diff --git a/profiles/updates/2Q-2026 b/profiles/updates/2Q-2026 index 21912b9c81e57..4b5886c35ba55 100644 --- a/profiles/updates/2Q-2026 +++ b/profiles/updates/2Q-2026 @@ -1,2 +1,5 @@ move llvm-core/libclc llvm-runtimes/libclc move dev-python/passlib dev-python/libpass +slotmove www-servers/nginx mainline 0 +slotmove www-servers/nginx stable 0 +slotmove www-servers/nginx live 0 diff --git a/www-servers/nginx/nginx-1.29.5.ebuild b/www-servers/nginx/nginx-1.29.5-r1.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.29.5.ebuild rename to www-servers/nginx/nginx-1.29.5-r1.ebuild index 568efe79ce156..240087847cb20 100644 --- a/www-servers/nginx/nginx-1.29.5.ebuild +++ b/www-servers/nginx/nginx-1.29.5-r1.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=mainline NGINX_TESTS_COMMIT=2993130953b28ff4d64ea75b5bd35c92c7e510f7 NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r4.conf,r6.initd,r1.confd,r1.tmpfiles} diff --git a/www-servers/nginx/nginx-1.29.7-r1.ebuild b/www-servers/nginx/nginx-1.29.7-r2.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.29.7-r1.ebuild rename to www-servers/nginx/nginx-1.29.7-r2.ebuild index bba0e71122bf7..715a6bfcd7819 100644 --- a/www-servers/nginx/nginx-1.29.7-r1.ebuild +++ b/www-servers/nginx/nginx-1.29.7-r2.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=mainline NGINX_TESTS_COMMIT=cf90a22921652731302e8a4dc2a88049c723377d NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles} diff --git a/www-servers/nginx/nginx-1.30.0.ebuild b/www-servers/nginx/nginx-1.30.0-r1.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.30.0.ebuild rename to www-servers/nginx/nginx-1.30.0-r1.ebuild index 1e34b41853702..1171b19ee0ad0 100644 --- a/www-servers/nginx/nginx-1.30.0.ebuild +++ b/www-servers/nginx/nginx-1.30.0-r1.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=stable NGINX_TESTS_COMMIT=0f72f59c40de9977bd8f3deff5d200e761b8b683 NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles} diff --git a/www-servers/nginx/nginx-1.30.3.ebuild b/www-servers/nginx/nginx-1.30.2-r1.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.30.3.ebuild rename to www-servers/nginx/nginx-1.30.2-r1.ebuild index 0f000bf923cfe..8021ac9601140 100644 --- a/www-servers/nginx/nginx-1.30.3.ebuild +++ b/www-servers/nginx/nginx-1.30.2-r1.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=stable NGINX_TESTS_COMMIT=0f72f59c40de9977bd8f3deff5d200e761b8b683 NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles} diff --git a/www-servers/nginx/nginx-1.30.2.ebuild b/www-servers/nginx/nginx-1.30.3-r1.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.30.2.ebuild rename to www-servers/nginx/nginx-1.30.3-r1.ebuild index 0f000bf923cfe..8021ac9601140 100644 --- a/www-servers/nginx/nginx-1.30.2.ebuild +++ b/www-servers/nginx/nginx-1.30.3-r1.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=stable NGINX_TESTS_COMMIT=0f72f59c40de9977bd8f3deff5d200e761b8b683 NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles} diff --git a/www-servers/nginx/nginx-1.31.1.ebuild b/www-servers/nginx/nginx-1.31.1-r1.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.31.1.ebuild rename to www-servers/nginx/nginx-1.31.1-r1.ebuild index 7011a2a9e4755..a08001ea0e0f4 100644 --- a/www-servers/nginx/nginx-1.31.1.ebuild +++ b/www-servers/nginx/nginx-1.31.1-r1.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=mainline NGINX_TESTS_COMMIT=4d1de3f357afeb91865d024b27516d6b67aad86e NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles} diff --git a/www-servers/nginx/nginx-1.31.2.ebuild b/www-servers/nginx/nginx-1.31.2-r1.ebuild similarity index 97% rename from www-servers/nginx/nginx-1.31.2.ebuild rename to www-servers/nginx/nginx-1.31.2-r1.ebuild index a575ab7a0f1ad..15ee7e9939cc3 100644 --- a/www-servers/nginx/nginx-1.31.2.ebuild +++ b/www-servers/nginx/nginx-1.31.2-r1.ebuild @@ -19,7 +19,6 @@ NGINX_MODULES=( +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone} stream_{ssl,realip,geoip,ssl_preread} ) -NGINX_UPDATE_STREAM=mainline NGINX_TESTS_COMMIT=56ae49add9286d2e896a22bcfb880c7ea7c3964e NGINX_MISC_FILES=( nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}