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 77CA71396D9 for ; Thu, 12 Oct 2017 06:41:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 09E182BC03B; Thu, 12 Oct 2017 06:41:21 +0000 (UTC) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 849812BC026 for ; Thu, 12 Oct 2017 06:41:20 +0000 (UTC) Received: by mail-wm0-x22c.google.com with SMTP id b189so10084842wmd.4 for ; Wed, 11 Oct 2017 23:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=wFi0Q6glOPHkP12sLafAzHtpgYT6IGccrmjsKV9yDig=; b=jNjaj25T5n5dOTE7Y6545Z8ZldpblbWxlkXmlgmPjMOVchwWQOjslek5RTB7pigJY6 2/Wr9AzyLmDfarclyD+LDTVzZllp6Yq5Joj1n/ubULWZqLF4stWvgDIubAfKX+Ry3iqT CZ+tcfXIDvYw9zwpbT4GZHQ2+vZKXrzeehRwcFGATmbWsyYE9SvSpogBqRhssjH8rQF2 PMiC8sdaUMzrjULW0rr2dQBC9PdfjsNGiDfAB+UAErNbdzpBCGuP9CgAACVpNFlXBjLX hfKTOIAx0bimJY8zr5YaFf0cIP0ToveUuzlYRc+YFyuljsrJCnPWNT7U5WQrQfPCnZP/ vsXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wFi0Q6glOPHkP12sLafAzHtpgYT6IGccrmjsKV9yDig=; b=CIKkaU5pcXmcylhObLu7tZ/d8R4vIgVFrZZ/OyNO0cAihTGiPxal1mbWt/1OHk86a3 SfGFfTaMhdbw+CQ/BWjynrsAq6zkFm0UsLrp52hSA++z/s3oNDEBpOTRsooBbYbUgEfJ E04NzfNcVgG2frr/ZoX8XAH86brgo+k/0wbijr6lYa09kCdafE7mTitDQwvtHLe5J8em q52Far6XCqN+Vq7w4Y+mVwBF7EloZ7b/2t0wmZF+CwZSMEE50F+u+mpI80+O7gLFjguK Uw2Cpo0u1miet44KuCYexDgXdpkJtEPju9Cn2w30FWQGxs7Mjj0mpErnNGSraTxJ4Do6 swfQ== X-Gm-Message-State: AMCzsaXpRakSL2ZzOBfBYKj1NATP/OrwdNuntxnejDdLefC4yh8q0V+y ik5u1TqBkSix1ln0Wqk4niCDNQ== X-Google-Smtp-Source: AOwi7QDh4FHf1uP9zIqtVW00xW9xHSqQlm/Q14tmUuu4aMZ7nxHQfqMWvJg38J6C8hQ/XhNxe5VozA== X-Received: by 10.80.181.61 with SMTP id y58mr1747416edd.150.1507790478957; Wed, 11 Oct 2017 23:41:18 -0700 (PDT) Received: from [192.168.253.88] ([209.212.109.4]) by smtp.googlemail.com with ESMTPSA id 41sm6247579edz.66.2017.10.11.23.41.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Oct 2017 23:41:18 -0700 (PDT) Subject: Re: [gentoo-user] Slightly OT: FreeBSD migration, what to do with /usr/local To: gentoo-user@lists.gentoo.org References: <20171012062933.6bhtcfqso37gf6af@matica.foolinux.mooo.com> From: Alan McKinnon Message-ID: <4584856d-7a54-3b1b-04b5-b890338c9c93@gmail.com> Date: Thu, 12 Oct 2017 08:36:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 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 MIME-Version: 1.0 In-Reply-To: <20171012062933.6bhtcfqso37gf6af@matica.foolinux.mooo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Archives-Salt: ab85e4d7-dc11-47d1-bc86-8b16a097d1f2 X-Archives-Hash: 9742d0320d299f2e8f777d3ef060cfdc On 12/10/2017 08:29, Ian Zimmerman wrote: > 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. I have a few hundred FreeBSD servers and I put my own stuff in /usr/local/, just like I would on on Linux. I haven't yet had any filename collisions, that's probably because I'm aware of the problem upfront and I name my scripts in a style that no sane upstream would ever use i.e. be verbose :-) So far I've never had a problem. Maybe I've just been lucky - who knows? This seems to be the norm, at least amongst the FreeBSD admins I've talked to. > 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). Not sure what the context is here. Are you talking about packages and ports code, or your own stuff you compiled yourself? Either way, what problem were you asking about by writing that paragraphs? > I don't think I can expect a simple answer, but if you ever faced such > transition yourself, how did you approach it? I approach these problems with backups and test staging machines. But I have fleets of spare hypervisors at my disposal, you might not have that. -- Alan McKinnon alan.mckinnon@gmail.com