From nobody Sun Nov 14 17:00:46 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F222185E3EE for ; Sun, 14 Nov 2021 17:01:24 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hsdrh06kdz3LNN for ; Sun, 14 Nov 2021 17:01:24 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: sunpoet) by smtp.freebsd.org (Postfix) with ESMTPSA id D0D87A9A4 for ; Sun, 14 Nov 2021 17:01:23 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id b17so9759128qvl.9 for ; Sun, 14 Nov 2021 09:01:23 -0800 (PST) X-Gm-Message-State: AOAM5304bUanKjpB7x1KN+6RkSty1er1w1lZhouqAlWBi5AsKv+TXUIi qIyXSTYaRfLwBWSdp/fu6tUTNG4rrDtx5FfCxYnTbQ== X-Google-Smtp-Source: ABdhPJyyqPXegyeWS5JqyC+K9kgEL6E5WeERpmOK945mNuoDwnuovY/STzi7LCmCcJn7n+og14avQAsNZEdfI/pvIvQ= X-Received: by 2002:ad4:4e49:: with SMTP id eb9mr30060910qvb.22.1636909283297; Sun, 14 Nov 2021 09:01:23 -0800 (PST) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 References: <202111120555.1AC5tGbw088641@gitrepo.freebsd.org> In-Reply-To: <202111120555.1AC5tGbw088641@gitrepo.freebsd.org> From: Po-Chuan Hsieh Date: Mon, 15 Nov 2021 01:00:46 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 46ce086c7130 - main - Mk/Uses: default version for nodejs To: Matthias Fechner Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000005c5fd805d0c2a442" X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --0000000000005c5fd805d0c2a442 Content-Type: text/plain; charset="UTF-8" On Fri, Nov 12, 2021 at 1:55 PM Matthias Fechner wrote: > The branch main has been updated by mfechner: > > URL: > https://cgit.FreeBSD.org/ports/commit/?id=46ce086c7130aedb8b349864afaf938489d070de > > commit 46ce086c7130aedb8b349864afaf938489d070de > Author: Matthias Fechner > AuthorDate: 2021-11-01 21:38:08 +0000 > Commit: Matthias Fechner > CommitDate: 2021-11-12 05:54:51 +0000 > > Mk/Uses: default version for nodejs > > If a port depends on node, a simple: > USES= nodejs > can be added. It is also possible to define a specific version: > USES= nodejs:14 > Use as current version the latest LTS version of node. > PR: 259783 > Differential Revision: https://reviews.freebsd.org/D32790 Please revert the nodejs change. It is not approved. It should be committed after being accepted by all parties. As I mentioned in the review, I disagreed with the change of the default from www/node to www/node16. Please do not change the world solely to fit gitlab's needs. Thanks! > > --- > Mk/Uses/nodejs.mk | 60 > ++++++++++++++++++++++++++++++++++++++++++++++ > Mk/bsd.default-versions.mk | 5 +++- > UPDATING | 19 +++++++++++++++ > 3 files changed, 83 insertions(+), 1 deletion(-) > > diff --git a/Mk/Uses/nodejs.mk b/Mk/Uses/nodejs.mk > new file mode 100644 > index 000000000000..af38aba78e55 > --- /dev/null > +++ b/Mk/Uses/nodejs.mk > @@ -0,0 +1,60 @@ > +# Provide support for NodeJS > +# > +# Feature: nodejs > +# Usage: USES=nodejs or USES=nodejs:args > +# Valid ARGS: build and/or run > +# version: lts, current, 10, 14, 16, 17 > +# Default is: build,run > +# Note: if you define a version, you must provide > run and/or build > +# > +# MAINTAINER: bhughes@FreeBSD.org > + > +.if !defined(_INCLUDE_USES_NODEJS_MK) > +_INCLUDE_USES_NODEJS_MK= yes > + > +_VALID_NODEJS_VERSION= 10 14 16 17 lts current > +_NODEJS_VERSION_SUFFIX= ${NODEJS_DEFAULT} > + > +.if ! ${_VALID_NODEJS_VERSION:M${_NODEJS_VERSION_SUFFIX}} > +IGNORE= Invalid nodejs default version ${_NODEJS_VERSION_SUFFIX}; > valid versions are ${_VALID_NODEJS_VERSION} > +.endif > + > +.if empty(nodejs_ARGS) > +nodejs_ARGS= build,run > +.endif > + > +. if ${nodejs_ARGS:M10} > +_NODEJS_VERSION_SUFFIX= 10 > +. elif ${nodejs_ARGS:M14} > +_NODEJS_VERSION_SUFFIX= 14 > +. elif ${nodejs_ARGS:M16} > +_NODEJS_VERSION_SUFFIX= 16 > +. elif ${nodejs_ARGS:Mlts} > +_NODEJS_VERSION_SUFFIX= lts > +. elif ${nodejs_ARGS:M17} > +_NODEJS_VERSION_SUFFIX= 17 > +. elif ${nodejs_ARGS:Mcurrent} > +_NODEJS_VERSION_SUFFIX= current > +. elif defined(NODEJS_DEFAULT) > +. endif > + > +# The nodejs 17 version is named www/node > +. if ${_NODEJS_VERSION_SUFFIX:Mcurrent} > +_NODEJS_VERSION_SUFFIX= > +. endif > +. if ${_NODEJS_VERSION_SUFFIX:M17} > +_NODEJS_VERSION_SUFFIX= > +. endif > +# The nodejs LTS is version 16 > +. if ${_NODEJS_VERSION_SUFFIX:Mlts} > +_NODEJS_VERSION_SUFFIX= 16 > +. endif > + > +. if ${nodejs_ARGS:M*run*} > +RUN_DEPENDS+= node:www/node${_NODEJS_VERSION_SUFFIX} > +. endif > +. if ${nodejs_ARGS:M*build*} > +BUILD_DEPENDS+= node:www/node${_NODEJS_VERSION_SUFFIX} > +. endif > + > +.endif > diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk > index 1dff8bce1d94..1ee4c9715269 100644 > --- a/Mk/bsd.default-versions.mk > +++ b/Mk/bsd.default-versions.mk > @@ -18,7 +18,7 @@ _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes > LOCALBASE?= /usr/local > > .for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC > GHOSTSCRIPT GL \ > - IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA PERL5 > \ > + IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA > NODEJS PERL5 \ > PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH > .if defined(${lang}_DEFAULT) > ERROR+= "The variable ${lang}_DEFAULT is set and it should only be > defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in > /etc/make.conf" > @@ -163,4 +163,7 @@ TCLTK_DEFAULT?= 8.6 > # Possible values: 4, 6 > VARNISH_DEFAULT?= 4 > > +# Possible value: 10, 14, 16, 17, lts, current > +NODEJS_DEFAULT?= lts > + > .endif > diff --git a/UPDATING b/UPDATING > index 05a642f7f68a..d61e9a51b65c 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -5,6 +5,25 @@ they are unavoidable. > You should get into the habit of checking this file for changes each time > you update your ports collection, before attempting any port upgrades. > > +20211110: > + AFFECTS: users of www/node*, www/npm*, www/yarn* > + AUTHOR: mfechner@FreeBSD.org > + > + The port framework was updated to use a default version for nodejs. > + The default version is pointing to the latest LTS version which is > + currently version 16. > + You can overwrite this by defining in /etc/make.conf, e.g. version 17: > + DEFAULT_VERSIONS=nodejs=17 > + > + Or if you would like to stick always to the current version use: > + DEFAULT_VERSIONS=nodejs=current > + > + If you would like to use yarn or npm together with nodejs version 17, > + just install the package that is pulling the wanted dependency to > nodejs: > + > + # pkg install yarn-node17 > + # pkg install npm-node17 > + > 20211109: > AFFECTS: users of security/libressl > AUTHOR: brnrd@FreeBSD.org > --0000000000005c5fd805d0c2a442--