Add additional attributes in /etc/os-release

Bug #1472288 reported by Mike Carifio
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Please add 'CPE_NAME' and 'BUILD_ID' to /etc/os-release.

More at http://www.freedesktop.org/software/systemd/man/os-release.html.

I'm not sure BUILD_ID should be something like 'vivid' etc, but it would be a nice use. Or introduce a new attribute/value pair like

NICKNAME_ID="vivid"

No rush. Thanks for adopting this convention so quickly.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: base-files 7.2ubuntu9
Uname: Linux 4.1.0-rc5carif-00007-ga8b253b x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jul 7 10:26:02 2015
Dependencies:

InstallationDate: Installed on 2014-11-04 (245 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: base-files
UpgradeStatus: Upgraded to vivid on 2015-04-25 (73 days ago)

Revision history for this message
Mike Carifio (carifio) wrote :
Changed in base-files (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in base-files (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Scheel (cipherboy) wrote :

This is a debdiff for Hirsute, applicable against 11ubuntu18 to add CPE_NAME. I ended up quoting it to follow what Fedora does but from what I (and ShellCheck) can tell from testing the resulting .deb with bash and sh, it doesn't strictly need to be quoted.

Per discussion with Steve Beattie (~sbeattie), we'd be interested in pursuing a Feature Exception request for this prior to doing backports for older releases. Does that sound OK?

Revision history for this message
Mike Carifio (carifio) wrote : Re: [Bug 1472288] Re: missing attributes in /etc/os-release

On 4/6/21 5:33 PM, Alexander Scheel wrote:
> This is a debdiff for Hirsute, applicable against 11ubuntu18 to add
> CPE_NAME. I ended up quoting it to follow what Fedora does but from what
> I (and ShellCheck) can tell from testing the resulting .deb with bash
> and sh, it doesn't strictly need to be quoted.
>
> Per discussion with Steve Beattie (~sbeattie), we'd be interested in
> pursuing a Feature Exception request for this prior to doing backports
> for older releases. Does that sound OK?
>
> ** Patch added: "2-11ubuntu19.debdiff"
> https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1472288/+attachment/5484958/+files/2-11ubuntu19.debdiff
>
Not sure what a "feature exception" is. But whatever you deem best
(since you did the work). Ty.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : Re: missing attributes in /etc/os-release

The attachment "2-11ubuntu19.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Mathew Hodson (mhodson)
Changed in base-files (Ubuntu):
importance: Low → Wishlist
summary: - missing attributes in /etc/os-release
+ Add additional attributes in /etc/os-release
Revision history for this message
Robie Basak (racb) wrote :

I'm just driving past the sponsorship queue.

How can we validate that the CPE_NAME you're adding is definitely the correct one for us to use in Ubuntu?

Your debdiff doesn't include adding BUILD_ID, so maybe this bug needs renaming to be specific to CPE_NAME? BUILD_ID sounds like something based on the installer used - like /var/log/installer/media-info or /etc/cloud/build.info. But that would mean that /etc/os-release could no longer be a simple conffile and would have to be managed via a postinst and ucf or something.

Revision history for this message
Robie Basak (racb) wrote :

Unsubscribing sponsors since there's no action to take unless my question above is answered. Once done, please resubscribe ~ubuntu-sponsors.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Why do you want /etc/os-release to contain CPE_NAME?

It is an optional field and it seems easier to parse the other fields to figure out that you are running Ubuntu 21.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.