From owner-freebsd-ports@freebsd.org Wed Mar 22 21:08:51 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E65E9D18F64 for ; Wed, 22 Mar 2017 21:08:51 +0000 (UTC) (envelope-from jev@ecadlabs.com) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB7841DA3 for ; Wed, 22 Mar 2017 21:08:51 +0000 (UTC) (envelope-from jev@ecadlabs.com) Received: by mail-qt0-x22c.google.com with SMTP id r45so161429907qte.3 for ; Wed, 22 Mar 2017 14:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ecadlabs.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=zOYKekPZLM1vI8aiv+jYJky4PrJQN1ytANsxv78YYng=; b=e0gieL1MbsDfcBNArnPuSa+UROVnhMtL6hs5X/CyUQH+Q40Ijudn0jQwB9BtCYj+Fi JAVopAFo6QUYYd7iCbGDqEt5XadrIay4Ogz/xXivn5iitZ4fZiToTdv1rGXoQEw+MylV wfWAQLCFPhwMB0bMFHty0vOEWEaXhU4M26fRO2OUZfbyeOSkRyd9x1bP0Uj05JDRR7RZ a3v2uT1XeYepSy+vjluv3YDsVdrTfTs8qhKIr+4J//qVRFlU+3jR+ytSh/PZ8OGxjWRx 8NTavoNbDZzY5INPetaaUgyNO109jlq0vPEc3HEwnp7AmSt6eR3MGT3b5AabI7Wq+df2 qA1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=zOYKekPZLM1vI8aiv+jYJky4PrJQN1ytANsxv78YYng=; b=cy3z0RUfZ4mM/vaPpzTM7vad4tFU8a5oQIfsNLc8HGj2qfOrPjdlYnrhiJX7tWRHNY ddmqQpoQwg4ms7vpMf/c2Ke7mRTsGHl48kF1KjS5y+LonIiTK6PFLvq/ONjxksCZtgsk AMlBsjT7GG85lkwP2Iz7ofbFonxH4x55wmrdPv3CK9MJKu3iTRtmGexUwwzYn/rHUDGx MWULhsPizJnXPVqnQhV3rZXhwpMypqSlovFDI0ROAma0+ww7h12QHtK1AXvFW2hZa5xa ZuBuw6+4yiGCCL40OMMtpgOrDkyLEx15z2L+C5CtkvyIDbb6rr89dWNFEurvjgxIBfEN g10w== X-Gm-Message-State: AFeK/H02vHm1OS4TWW7PGts6S/GNAolWAPmQetTbALuLWaLlrNxB1R+GOTOymaoc4O0NedW7RER/NntAXXEYkVvg X-Received: by 10.237.34.125 with SMTP id o58mr38229490qtc.108.1490216930211; Wed, 22 Mar 2017 14:08:50 -0700 (PDT) MIME-Version: 1.0 References: <745e3da8-3083-a135-ad5d-d60d5de41dc1@FreeBSD.org> In-Reply-To: <745e3da8-3083-a135-ad5d-d60d5de41dc1@FreeBSD.org> From: =?UTF-8?Q?Jev_Bj=C3=B6rsell?= Date: Wed, 22 Mar 2017 21:08:39 +0000 Message-ID: Subject: Re: question about use of != assignments To: Mathieu Arnold , "freebsd-ports@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 21:08:52 -0000 On Wed, Mar 22, 2017 at 12:16 PM Mathieu Arnold wrote: > Le 22/03/2017 =C3=A0 17:57, Jev Bj=C3=B6rsell a =C3=A9crit : > > Hello, > > > > I'm updating net-mgmt/prometheus for which I am the maintainer. > > > > During build, I have added some ldflags for the `go build` step, so tha= t > > build time, version, etc. is recorded in the binary. Before this change > > running `prometheus -version` gives a bunch of blank values, my attache= d > > patch fixes that. > > > > I'm using !=3D assignments in my Makefile to get date, user, and host. > > portlint warns me[0] not to use !=3D assignments, and the linked post > > suggests to use echo $$(${VARIABLE_CMDS}) instead. > > > > TL;DR: do not do that. If you really need to put versions in the > upstream software, put what is available in the Makefile, mainly, > PORTVERSION, and if needed PORTREVISION. > > First, because using !=3D means that every time the Makefile is evaluated= , > it needs to fork to get the values, it slow things down considerably > when build the whole ports tree. > > Second, because we need port builds to be reproducible, it means that if > I build the port today, and you build it tomorrow, it will end up giving > the same package. If you add such customization today, they will be > removed very soon when we go over the whole tree again. > > > Thank you Mathieu. I wanted to keep the FreeBSD package `-version` flag output consistent with what the upstream vendor builds provide, but your point about reproducible builds trumps that desire. I will gut the other items and just rely on ${PORTVERSION}. -Jev