From owner-freebsd-hackers@freebsd.org Fri Feb 12 03:22:02 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C587C54163E for ; Fri, 12 Feb 2021 03:22:02 +0000 (UTC) (envelope-from rpokala@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 4DcJhB5KLhz3pyV; Fri, 12 Feb 2021 03:22:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [98.42.164.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4107E2D5F8; Fri, 12 Feb 2021 03:22:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.45.21011103 Date: Thu, 11 Feb 2021 19:21:57 -0800 Subject: Re: Including IB utils in install images From: Ravi Pokala To: Kyle Evans , Glen Barber CC: "freebsd-hackers@freebsd.org" Message-ID: <4D70C9A9-A534-4C38-9A95-4ED260F49DD1@panasas.com> Thread-Topic: Including IB utils in install images References: <377FA5D1-0DC8-463D-A8E3-5645801C2858@freebsd.org> <20210203182928.GG77557@FreeBSD.org> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2021 03:22:02 -0000 -----Original Message----- From: Kyle Evans Date: 2021-02-11, Thursday at 10:47 To: Glen Barber Cc: Ravi Pokala , "freebsd-hackers@freebsd.org" Subject: Re: Including IB utils in install images On Wed, Feb 3, 2021 at 12:29 PM Glen Barber wrote: > > On Wed, Feb 03, 2021 at 10:06:20AM -0800, Ravi Pokala wrote: > > Hi folks, > > > > I'm using release/release.sh to create install images. We recently determined that we need to start including the InfiniBand utilities (contrib/ofed/infiniband-diags / usr.bin/ofed/infiniband-diags). I updated my release.conf to add 'WITH_OFED_EXTRA=1' to MAKE_FLAGS, and I confirmed that the utilities are being built. However, they are not subsequently copied to the distdir, or included in the resulting image. Well, technically, `ibstat' is, but per usr.bin/ofed/infiniband-diags/Makefile, it is not contingent on WITH_OFED_EXTRA / MK_OFED_EXTRA. > > > > Bug, or operator error? > > > > You could set a local SRC_CONF (see release/release.conf.sample), but > I *think* you also need to set WITH_OFED=1. According to src.conf(5), > it seems WITH_OFED_EXTRA is ignored unless WITH_OFED is explicitly set. > Ravi followed up privately here; the problem he was seeing is because MAKE_FLAGS is only included in release.sh for building stuff. WORLD_FLAGS gets closer to what he wants, but a local src.conf is better as far as "touching build options" goes. The caveat was that then they'd have to pair their release.conf with a src.conf; I pointed out that release.conf is literally sourced in and that's heavily baked in enough to release.sh that it cannot change. A good solution for this kind of thing should be something along the lines of: srcconf=/path/whatever/maybe/tmpfile cat < $srcconf WITH_OFED_EXTRA="YES" EOF ... SRC_CONF=$srcconf I had hoped that adding "WITH_OFED_EXTRA=1" to WORLD_FLAGS in release.conf would do the trick, to avoid a separate src.conf to keep track of and clean up after. That built the tools, and put them in the world, but they were still omitted from the release directory. So, I gave in and created a src.conf with "WITH_OFED_EXTRA=1", and that indeed did the trick. Thanks Kyle! -Ravi (rpokala@) Thanks, Kyle Evans