From owner-freebsd-current@freebsd.org Fri Aug 30 17:48:04 2019 Return-Path: Delivered-To: freebsd-current@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 6042ED49FF for ; Fri, 30 Aug 2019 17:48:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46Kn501FLGz4MtN for ; Fri, 30 Aug 2019 17:48:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.nyi.freebsd.org (Postfix) id 2A9DCD49FE; Fri, 30 Aug 2019 17:48:04 +0000 (UTC) Delivered-To: current@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 2A535D49FD for ; Fri, 30 Aug 2019 17:48:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Kn4z32Tsz4MtG for ; Fri, 30 Aug 2019 17:48:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id m10so6904199qkk.1 for ; Fri, 30 Aug 2019 10:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nHIVjAFn4AuM6N+kXa1PaHgouSQuTBDoVjYrwtvz/l4=; b=AulxgfS06jhYskoI4KLbc/KR6JPpc588L2vi/e8njjyF7/dmSnHrPWk+Y8QOdlo+wo rwQWSNUHXDcDuNVIWQ75MVqnTSvlkLSSD5TsYNuIGmkqkkl+ZZi88xFuBF/7p1ox4+R3 wamLnN0APUriexvQCC8CJnkBePW3c0P7thcaqoR7Bm8xKtAJZm66+mteJz9zsE5vgoOi TrtIY9fs3yXTfkSD9PrmTObFzw7Foif5xsyypo/z6I9eBaR/MZaNsRaLqRbSp5KEg4iN vUfMTrEJTgbt38f8qhiGQBwOKA7sYyWB9ymnyf0jnLYI61Mjh1MU0Mi4RqS4v/S52F0N pXvQ== 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:cc; bh=nHIVjAFn4AuM6N+kXa1PaHgouSQuTBDoVjYrwtvz/l4=; b=CWRNTahCIGErX//em0kA0tC6UBlGlOAuJ7uqCEVASl/+8jp9xEXzk5/g5OtddrTL8/ rq7P9V4HZkJEwk0m5xp3JxMuiSBe0+GIUmkMtkzutAFUASl6X796R+SRx2TQQgfa5fOO H9l53Hkb063J8+uE2wUFEjvEIPIVlRy/wkZ6sBFwa+Ec/t0fi87pUhIiGoELXgU+ic+b gc9FvmWEa5UvlueryoZB4YWYovdDH/H7UDA1FQaYDdk+BS+P94213WUBNQ73WuH7VdJk 26RHfL2wuVNtyRzsxBpPCj2WobMPIPiOLLxTHSRgRJBYgIZGZdSCRrJUrtMIbo1Z6Q60 lcjA== X-Gm-Message-State: APjAAAXhPDTitpOwsSdvANruxZztxvtvidt7IgbRS0LiaL4l0LPKLBGe lRYNDhOXx10m/nOT8WC5p4BXrw5dkK4ngZtcuDo0AZVcqgg= X-Google-Smtp-Source: APXvYqza2erQQTsejtfDESAtvOMivPkQZkRHbBUin6cbhjQJGly78fo3FdbHuvjU2QUepAWGFaQNfPgkaIYtRRVWNAo= X-Received: by 2002:a37:4804:: with SMTP id v4mr17172883qka.60.1567187282409; Fri, 30 Aug 2019 10:48:02 -0700 (PDT) MIME-Version: 1.0 References: <20190816120524.21b7fd19@ernst.home> In-Reply-To: From: Warner Losh Date: Fri, 30 Aug 2019 11:47:51 -0600 Message-ID: Subject: Re: problem with LOCAL_MODULES To: Kyle Evans Cc: John Baldwin , Gary Jennejohn , current X-Rspamd-Queue-Id: 46Kn4z32Tsz4MtG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=AulxgfS0; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-5.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.996,0]; RCVD_IN_DNSWL_NONE(0.00)[c.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.91)[ip: (-9.32), ipnet: 2607:f8b0::/32(-2.84), asn: 15169(-2.32), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2019 17:48:04 -0000 On Fri, Aug 30, 2019 at 11:42 AM Kyle Evans wrote: > On Fri, Aug 16, 2019 at 7:38 PM John Baldwin wrote: > > > > On 8/16/19 3:05 AM, Gary Jennejohn wrote: > > > I tried to build a kernel today and it failed in modules-all even > > > though I had LOCAL_MODULES="" in /etc/src.conf, as recommended by > > > jhb. > > > > > > That's wrong. It has to be LOCAL_MODULES=, otherwise > > > /sys/conf/kern.post.mk seems to conclude that there should be a > > > module under /usr/local/sys/modules with the name "". > > > > I think this will permit both versions to work: > > > > Index: sys/conf/kern.post.mk > > =================================================================== > > --- kern.post.mk (revision 351151) > > +++ kern.post.mk (working copy) > > @@ -76,6 +76,7 @@ modules-${target}: > > cd $S/modules; ${MKMODULESENV} ${MAKE} \ > > ${target:S/^reinstall$/install/:S/^clobber$/cleandir/} > > .endif > > +.if !empty(LOCAL_MODULES) > > .for module in ${LOCAL_MODULES} > > @${ECHODIR} "===> ${module} > (${target:S/^reinstall$/install/:S/^clobber$/cleandir/})" > > @cd ${LOCAL_MODULES_DIR}/${module}; ${MKMODULESENV} ${MAKE} \ > > @@ -83,6 +84,7 @@ modules-${target}: > > ${target:S/^reinstall$/install/:S/^clobber$/cleandir/} > > .endfor > > .endif > > +.endif > > .endfor > > > > # Handle ports (as defined by the user) that build kernel modules > > > > I think I'd like to see this with !empty(LOCAL_MODULES) && > EXISTS(${LOCAL_MODULES_DIR}) or maybe just the latter condition to > prevent accidental foot-shooting... I was testing a problem with doing > this stuff in a poudriere build for swills@ and set LOCAL_MODULES="" > only to get an error because LOCAL_MODULES_DIR doesn't yet exist on > the machine I was testing with -- which we can trivially avoid. > There's also an unfortunate interaction with MODULES_OVERRIDE="" in that the local modules are built / installed. This breaks the workflow I've used in the past of 'make reinstallkernel MODULES_OVERRIDE=""' to get just the kernel reinstalled w/o messing with the modules that I know are fine and don't want to change. Not a huge deal, but still annoying. Warner