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 11F59138330 for ; Sun, 28 Aug 2016 14:16:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40EFC21C043; Sun, 28 Aug 2016 14:16:24 +0000 (UTC) Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4E41DE0B2F for ; Sun, 28 Aug 2016 14:16:23 +0000 (UTC) Received: by mail-qk0-f170.google.com with SMTP id z190so116963027qkc.0 for ; Sun, 28 Aug 2016 07:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=NH8WsNQiZZAf9YB2jiC0TOhLvTgCm7yIrtepPc7u9OE=; b=xzr9kOLsVPHIZaAWfVUYiyo8QU1pQfKTrflr0kFn+GTMgyYxG8NCtMhFhtANkAxhnz sNJcL0tBeFxzsud5wfx8fimE1LEyX5IJwa9CfexAV75e2jfcOPuK5ywD0ZLJDDWnqfOz Jk+ecPw0AFrO/J8ClTP+lWAd8SOIuVQ/izXZMrlv27uLIgWkT2Z8+p6DGay+NV1YXeCh 2oge7RWDL+s9OgdDoef2Ifs+1UQcLHVwzs7PFvyVz5LhILD1UVjXGB+CFj5033mvPA79 8BBCr8sPzmHWpRoJjPPMd7E7X/4Bz7hP5Gycj8jDM/OQ19tQhUq4JClsZt7sU2ZIb7QJ auLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=NH8WsNQiZZAf9YB2jiC0TOhLvTgCm7yIrtepPc7u9OE=; b=JT5AraK3Q78aZ1lSV5klOmgn+NsoCKbJIOu9EyZjqoIGvFfKyi1zmwoiuO6YyvjPvs NKXEXlzqcxGiJ4pqMJJQgcPuamtrniX1nagPSy0uco179XQ0vD3Co6uZ/icSo9lW+dpe idKlYDufyLUVAg0QogxiiSYE0WxUKbyha0kSqbbMQ43ZcINAedvfczfBy55Z12oL3HAg UBFOcsM63fdKlTMN0VlD18EbxtJ7iph2LJkWQbfwenm3cTWfvw905SIc5euxQdJ6fYyu knRpaAQXq42tBNd5pZJi2wx/z/Go9linTR4u1lFiPCQUEQcDxnp1sWaIBoeHFAd/cGRp c3Pw== X-Gm-Message-State: AE9vXwOHDBu7JOTKLMuaUlzd7f9MfVaXaa7Ld7v/0NytDhp3iQyvzdyGg7uSNGIadpOABp0dWYKo3Yd7atN45A== X-Received: by 10.55.21.196 with SMTP id 65mr14540834qkv.223.1472393782265; Sun, 28 Aug 2016 07:16:22 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Sender: freemanrich@gmail.com Received: by 10.140.40.36 with HTTP; Sun, 28 Aug 2016 07:16:20 -0700 (PDT) In-Reply-To: References: <20160822155808.GA16219@whubbs1.gaikai.biz> <1471894124.32381.0.camel@gentoo.org> <20160822220925.GB18116@whubbs1.gaikai.biz> <20160823195746.GA21460@whubbs1.gaikai.biz> <24d9469d-fa6f-ffde-797e-420eca01d2a1@gentoo.org> <45fe53a7-626f-62af-398c-2397aedb3064@gentoo.org> <8edbc51b-366b-e32f-4e8d-2ca894f77ca6@gentoo.org> <68746884-3a34-944d-4649-07c282ea38cd@gentoo.org> <2ecb3f7d-4b60-bc34-2673-aad6d2dc5ae9@gentoo.org> <245bf9cd-648f-5ab1-0ff3-8bfe554bd592@gentoo.org> From: Rich Freeman Date: Sun, 28 Aug 2016 10:16:20 -0400 X-Google-Sender-Auth: AUYBLCMeoL2YgqaKKA0fiVuicx4 Message-ID: Subject: Re: [gentoo-dev] rfc: /etc/hostname on gentoo To: gentoo-dev Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 31c819a4-a10f-4018-80f3-75490801becd X-Archives-Hash: b2cf11eef02d6fb0312021df50a93cab On Sun, Aug 28, 2016 at 8:34 AM, Patrick Lauer wrote: > > Then tools forgot to properly update mtab because hurr why u no symlink > to /proc/mounts (oh wait, /proc/self/mounts ) > > So everyone migrated to /etc/mtab as a symlink (even OpenRC, because > everyone does it) > I think containers were the final straw here (which strangely you do not mention). Good luck running openrc in a container with /etc/mtab as a file, especially if you want to share /etc across multiple containers. Ultimately though this all comes down to the fact that files are a pretty lousy way to store state of a running system, especially when there are system calls to retrieve this state. Sure, files are a nice place to store static configuration that gets loaded into the state of a running system, since they're persistent. The problem comes when software reads the files and assumes that they ARE the state. /etc should be for storing static configuration. Processes shouldn't generally be writing to anything there. You should be able to mount /etc read-only without much issue. With the rise of containers and configuration management and software-defined infrastructure and so on this becomes increasingly important. There is value in neither changing for the sake of change, or remaining the same for the sake of the past. Many historical practices in the Unix world are inconsistent and it makes sense to keep moving in the direction of making them consistent (like mtab, having dhcpd modify /etc/resolv.conf, and so on). Gentoo should make similar sorts of changes (like not sticking the Gentoo repo in /usr, and we probably shouldn't name it portage either). There are also many historical practices in the Unix world that maybe aren't pretty, but we probably ought not to change them just for the sake of doing so without driving the change across distros (and I think /etc/hostname strikes me as one of these; having more of the host-level configuration in one place does make sense, but moreso if everybody does it the same way). Lots of distros actually try to move configuration to one place, but they do it inconsistently and it seems like somebody should be able to fix this (though you may find the demand for consistency ends up getting satisfied by systemd to some extent, simply due to its ubiquity). I think williamh's approach of using hostname if it exists, and falling back to conf.d is a pretty sane compromise. -- Rich