#1354 deprecate fedora-release file
Closed None Opened 6 years ago by sundaram.

Over the years, Fedora has accumulated quite a number of files including fedora-release, redhat-release and system-release (the latter two being symlinks to the former) to figure out the distribution and version number. systemd includes os-release. While we can't drop the distribution specific files anytime soon, it would be a good idea to deprecate it so that we have a single canonical location going forward.

I have posted a note at


Starting with Fedora 21, /etc/fedora-release file is deprecated. It should not

be used to identify a Fedora system. This file will be removed in a future

release. Instead /etc/os-release is the canonical cross distribution

default file to identify a distribution. It should be read first with a

fallback to /usr/lib/os-release. Refer to the man page of os-release (man

os-release) for details.



If you want to deprecate something, you need to discuss it with the stakeholders, determine if it's actually possible to deprecate, and present a proposal to phase it out. You've basically made assumptions and short circuited all of the discussion aspects of this. Dennis's response in the bug is terse and unhelpful but the bug itself is entirely presumptuous. This is not how things are done in Fedora and both of you know better.

This isn't helpful and I'm closing this ticket.

Josh, I genuinely don't understand your response. The stakeholders here is someone who maintains the package and I made the suggestion there and since it appears Dennis doesn't think it is the right place, I posted it here since FESCo has the authority to do so expecting the discussion to take place as a result. Would you mind explaining what you want me to do instead?

Have a discussion about it instead of just trying to jump over the package maintainers head and have FESCo overrule them. Dennis didn't suggest it needed to be discussed some other place. He said it wasn't deprecated.

There's nothing for FESCo to look at here other than your idea vs. the package maintainers. There was no actual discussion on why it would be good to deprecate, nor why it isn't deprecated. Go work on it. Perhaps propose a Change targeted at F22. But do not expect FESCo to look at every issue you think is a good idea when you've done nothing but write a few sentences and open a bug.

I have explained above why I think it is a good idea and added a reference to show what another distribution is doing. I would prefer if you leave this open for FESCo to discuss it. If FESCo believes, a change proposal is warranted, I will be happy to do that. Would you mind reopening the ticket? Thanks.

I agree that closing the ticket before any discussion in FESCo (even if we just voted to close the ticket) is not right.

For FESCo consideration,

I have started filing tickets with several upstream software/ sending in patches to support os-release. For example,


From a third party vendor perspective, the mishmash of different distro specific files is a major pain to deal with and alternative of lsb_release isn't useful because distributions often do not install it by default and the packages are named differently as well.

os-release provides a unified location with a standard format for finding out this information and if Fedora gets on board with the path that say SUSE has already taken, we will hopefully be able to drop the distro specific file a few years down the line. I haven't proposed a specific timeframe to drop fedora-release because that depends on ISV adoption.

All I am asking for here is a small comment with fedora-release that essentially says os-release file has superseded it. Nothing disruptive. To avoid breaking any scripts that parse fedora-release, I would suggest add the comments I have suggested above before the release name itself. Thank you for your consideration and let me know if you have any questions.

IMHO, I don't see any reason to decide to depreciate fedora-release now. It's one file, tons of people expect it. If someday os-release becomes the thing people expect/use the package maintainer could decide to depreciate it at that time.

You said yourself that upstreams aren't even using os-release yet. Lets wait until many/lots/some of them are before deciding to do this. It's just disruptive at this point, but down the road if os-release gets popular it will be natural to depreciate it then.

Within the distro, different components like PackageKit are using it already. However third party ISV's could use some encouragement. If we added a note, it makes it easier to convince them that this is the distro sanctioned path

My take on this is that Fedora has for a while been a boat without much steering and I'd like FESCo to give some sense of direction to the project. This is one example; if there's a plan to switch over to /etc/os-release, then it definitely makes sense to let it be known so that various upstream can plan to transition over.

HOWEVER, having said that, in this particular case I don't think it makes sense to add a deprecation notice in the file. The reason for this is that /etc/fedora-release is very simplistic, and I am sure a lot of apps that use it don't parse its contents in any meaningful way, and just display it verbatim. Adding a comment there would break those apps.

So I'm +1 to deprecating (if the systemd folks are on board with that), but -1 to adding the notice to the file.

Kalev, that seems fair however my concern is how do you communicate that the fact that it has been deprecated to upstream developers without adding a note? A release note could serve some of that purpose but it is likely missed by others.

It might make sense to deprecate {fedora,redhat,system}-release. This raises these questions:

  • Is os-release a good replacement? The recentish suggestions to add /etc/os-release.d, which would essentially break every single user of /etc/os-release, are a little worrisome (though they were AFAICT Fedora-originated).
  • … which is a specific version of a general design concern (to the extent FESCo should/not? be microdeciding this): We should be almost always adding callable APIs where we have the liberty to change an implementation instead of new file formats that we will never be able to extend. (Incidentally, this is something /usr/bin/lsb_release got right.)

Given a reasonable resolution of the above, we could do it the Old Way and add a man page for {fedora,redhat,system}-release instead of comments within the file. This is cheap enough that the little benefit of deprecating these files would not be an issue.

I am, however, strongly opposed to ever planning to remove that file. Having it in there costs nothing, removing it is ''extra work'' with negligible benefit and a significant risk of breaking someone’s application. I can't see how that is justifiable.

Replying to [comment:9 kalev]:

if there's a plan to switch over to /etc/os-release
Every distribution using systemd will use os-release, so it is bound to be widely supported.

Note that now s|/etc/os-release|/usr/lib/os-release|, and a compatibility link is provided (or rather is intended to be, see https://bugzilla.redhat.com/show_bug.cgi?id=1149568).

So I'm +1 to deprecating (if the systemd folks are on board with that), but -1 to adding the notice to the file.
Agreed on both counts.

Replying to [comment:12 mitr]:

add a man page for {fedora,redhat,system}-release
Yes, this sounds good. I'd add a simple system-release(5) with aliases for the other two names, essentially pointing to os-release(5). I think it can live in systemd.rpm, along with os-release(5).

As agreed into today's meeting (+1: 7 0:0 -1:0)

FESCo does not see a benefit in deprecating this file at this time.

Replying to [comment:13 zbyszek]:

Replying to [comment:12 mitr]:

add a man page for {fedora,redhat,system}-release
Yes, this sounds good. I'd add a simple system-release(5) with aliases for the other two names, essentially pointing to os-release(5). I think it can live in systemd.rpm, along with os-release(5).

Sounds like a good solution. Thanks zbyszek!

Login to comment on this ticket.