From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8FC3C1396D9 for ; Thu, 12 Oct 2017 07:12:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E5B02BC041; Thu, 12 Oct 2017 07:12:04 +0000 (UTC) Received: from dnvrco-cmomta02.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C851B2BC026 for ; Thu, 12 Oct 2017 07:12:03 +0000 (UTC) Received: from localhost ([74.134.208.22]) by cmsmtp with ESMTP id 2XezeBGjzqBYq2Xf2eg8Ke; Thu, 12 Oct 2017 07:12:04 +0000 Date: Thu, 12 Oct 2017 07:11:47 +0000 From: "Thomas Mueller" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] FreeBSD migration, what to do with /usr/local References: <20171012062933.6bhtcfqso37gf6af@matica.foolinux.mooo.com> X-CMAE-Envelope: MS4wfG/4FLOa0xFf2uT306WT2hnTNgaS1oT1OphUomPAXYLubcYTmtNOCdk/sOHXwh75tb8yF6EzsLID2UpAmfnurXdE3Tf+YxK5GS9dmIzlpI+SegirBnhY 8Ocr71y6PaHN08DtJ6Py/5TVbbHOMsN+xkOU9KfoEF3O7VWsfMDzu+8x320zXbf0ilqHDQH59NX7Iw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Message-Id: <20171012071204.2E5B02BC041@pigeon.gentoo.org> X-Archives-Salt: a0527ce7-b4da-4cbc-b65f-793348dd9b86 X-Archives-Hash: 87d201f29f0371fd9886a392987fd257 from Ian Zimmerman: > I think I have written here previously that I want to move my _server_ > to FreeBSD. I am still thinking about that. But now I hit an > obstacle. For a long time, I have put my local kiddie scripts in > /usr/local. For better or worse, they are written in my dense style > where any code duplication is avoided, and so they call one another a > lot. > But as you know FreeBSD directory hierarchy is different: /usr/local is > for Packages and Ports. I must move my scripts somewhere else to not > conflict with P & P. So the first problem is to come up with a > location. What does a typical BSD admin do in this situation? I don't > want to put them in my home directory because they're general purpose; > at the very least I use them both as root and as an unprivileged user. > A more serious problem is how to find all the situations where > /usr/local is baked in. It's not as simple as grep because when I > could, I relied on the implicit PATH which would be configured somewhere > else, or it might not even be configured - it might be compiled in (I > think this is the case for some programs in the shadow package, and > perhaps PAM modules). > I don't think I can expect a simple answer, but if you ever faced such > transition yourself, how did you approach it? /usr/local is the default LOCALBASE in FreeBSD, but I believe you can set LOCALBASE to something else in your environment, which could be set in /etc/make.conf . You could possibly copy Gentoo scripts to /usr/local/gentoo-scripts, or would that not work with your scripts as set up? You would have to be careful setting up your PATH in .profile and /etc/profile , to make sure it includes the proper LOCALBASE. Tom