From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=jrey@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 435Xz33L4TzDrQp for ; Fri, 30 Nov 2018 09:59:43 +1100 (AEDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wATMwgJf140233 for ; Thu, 29 Nov 2018 17:59:41 -0500 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p2qxjk3tg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 29 Nov 2018 17:59:40 -0500 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 22:59:40 -0000 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 22:59:37 -0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wATMxa1t23724194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 22:59:36 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A09EBE053 for ; Thu, 29 Nov 2018 22:59:36 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 252D9BE051 for ; Thu, 29 Nov 2018 22:59:36 +0000 (GMT) Received: from ltc.linux.ibm.com (unknown [9.16.170.189]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 22:59:35 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 Nov 2018 17:03:12 -0600 From: Joseph Reynolds To: openbmc@lists.ozlabs.org Subject: Re: Add TARGET_MACHINE to /etc/os-release In-Reply-To: References: <966f717c-59a9-7f88-7b37-91edb9d72276@charter.net> X-Sender: jrey@linux.vnet.ibm.com User-Agent: Roundcube Webmail/1.0.1 X-TM-AS-GCONF: 00 x-cbid: 18112922-0020-0000-0000-00000E926DAC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010145; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124656; UDB=6.00583934; IPR=6.00904783; MB=3.00024390; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 22:59:38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112922-0021-0000-0000-000063E272FE Message-Id: <0b82208977f8010c41e35cc7e35e267d@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_14:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=996 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290193 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 22:59:44 -0000 > Proposal to add TARGET_MACHINE to /etc/os-release. I've updated the details to explain why the uname command is unsatisfactory. > > In an OpenBMC image, the /etc/os-release file includes distro > ("openbmc-phosphor") and version (as a git tag or commit). It should > also include the target machine (the kind of device the OpenBMC image > is intended to control). This is needed to be able to track the image > back to its source code: the distro and version indicate the exact > source code that was used, and the target says which Bitbake layer > configuration within that source was used. > > Specifically, the proposal is to enhance the generated /etc/os-release > file with a new OS identification parameter like: > OPENBMC_PHOSPHOR_TARGET_MACHINE="$MACHINE" > where MACHINE="romulus", for example. > > All OpenBMC images should define this os-release parameter. > > Proposed documentation for the new parameter: Indicates the kind of > device the OpenBMC image is targeted to control. > > ... tl;dr details follow ... snip ... > > The MACHINE is set in > openbmc/meta-COMPANY/meta-MACHINE/conf/local.conf.sample. (This is > where TEMPLATECONF points to.) > > Note MACHINE is not guaranteed to be unique across all future OpenBMC > layer configurations. (That is, meta-A/meta-B/conf and > meta-X/meta-Y/conf may inadvertently define the same machine name.) To > guarantee uniqueness, an alternate design would be to use the > TEMPLATECONF parameter as the machine name. (e.g., > "meta-ibm/meta-romulus/conf"). In practice I expect the machine name > will be sufficiently unique: as unique as different company's brand and > model names. > > The manual page for "os-release" recommends prefixing the parameter > name with the distro name. Ideas for alternate parameter names are > welcome ("OBMC_TARGET_HARDWARE" anyone?). See > https://www.freedesktop.org/software/systemd/man/os-release.html. > > The os-release file is generated by the os-release.bb and > os-release.bbappend recipes. The "uname" command options -m (machine) and -i (hardware platform) will continue to refer to the BMC and not its host.