From owner-freebsd-current@freebsd.org Sun Oct 25 18:38:06 2020 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 6542745573C for ; Sun, 25 Oct 2020 18:38:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CK6Cx3Bt6z4NTF for ; Sun, 25 Oct 2020 18:38:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82b.google.com with SMTP id p88so5184913qtd.12 for ; Sun, 25 Oct 2020 11:38:05 -0700 (PDT) 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=V1Y0NoteYJeakCubGTiVFZ3QYql3XiBq5iG+1M71+M0=; b=DPA0G5Gh1fah42Ow/JqW1vmiRD+f4wV1Sab+dg2me2cTb4ecv9Dypv1IbbCp3mp7rX R3/Iybys39WSjAWRNpyEeUX/wsL0kVnXUh6j9OEcL24HqaoTMSD84iIXGvaF+0N2U8+a JwbC10S7t/w0c4iamo1HkmcswZVF+KM+eFLS1krS0r3vz1sWoUZejnX6YK+qsN/vveCZ btQ/+KdsSNXIoDGUWaCKdT13WVQcELEKkzSYIyyJmHZTLMLWUPXcloHxAfVvactptrQm n+N7q+zEuLjBN803sif8cCx9DI3K8xT8KNiD8t84/FGa0ohgMBtDcmf0/5iMCClfvTCb qy5g== X-Gm-Message-State: AOAM530qmw4vABD6+OCyPzWGrU972FDm0aToBth49OyRrLV1FbOfTd7Q aOt6Oiz+565/P1DHgRCaNYujKqiGgnrKhfODUk03cw== X-Google-Smtp-Source: ABdhPJx6e9itBok8oyWiB/dG0bFHJYxaTMU1X3C4hgeZ1KhmlhFdfETeiM7pvmjqOSLUTs/++R7XQd2KSjA4nql04RA= X-Received: by 2002:aed:3031:: with SMTP id 46mr13480590qte.49.1603651084182; Sun, 25 Oct 2020 11:38:04 -0700 (PDT) MIME-Version: 1.0 References: <2b938572-dfbb-4597-0095-8490bb3745ee@freebsd.org> In-Reply-To: <2b938572-dfbb-4597-0095-8490bb3745ee@freebsd.org> From: Warner Losh Date: Sun, 25 Oct 2020 12:37:53 -0600 Message-ID: Subject: Re: [REVIEW] replace literal uses of /usr/local with a macro [D26942] To: Stefan Esser Cc: FreeBSD CURRENT X-Rspamd-Queue-Id: 4CK6Cx3Bt6z4NTF X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.93)[-0.928]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.01)[-1.009]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-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:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82b:from]; NEURAL_HAM_SHORT(-0.75)[-0.752]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 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: Sun, 25 Oct 2020 18:38:06 -0000 On Sun, Oct 25, 2020 at 7:11 AM Stefan Esser wrote: > I have created > > https://reviews.freebsd.org/D26942 > > as a suggested patch to remove nearly 20 literal uses of /usr/local > in the base system. > > This requires to add an include of paths.h to some of the source files > (.c or .h), but none of these includes is leaked to /usr/include and > they are thus only visible during the build. > > I have built the world with this patch applied and the resulting > binaries are unchanged. > > The definition of _PATH_LOCALBASE in paths.h could at a later time > be derived from the value of LOCALBASE (in src/Makefile.inc1 or > overridden my the user in src.conf), but this is a change that > should be discussed separately from this review. > > Please comment on this patch, the decision to not touch contrib > sources and which follow-up steps to perform next (e.g. similar > changes to shell scripts or configuration files). > I hope this is coupled with creating an option to have /usr/local/lib, /usr/local/inclulde, etc in the default search paths. While some may dislike it, when I've hacked these in the past I've found that porting some specialized Linux software to go more quickly since I didn't have to thread this through autoconfig scripts that were poorly written... I know it's not for everybody (hence my use of the word 'option'), though. Thanks for jumping into this problem and sorting it out. I tend to agree with comments you've made elsewhere the only hope is a series of incremental solutions give the twisty nature of where and how this is used. Warner