Merge lp:~elementary-os/ubuntu/utopic/base-files/upstream-release-info into lp:ubuntu/utopic/base-files

Proposed by Sergey "Shnatsel" Davidoff
Status: Rejected
Rejected by: Colin Watson
Proposed branch: lp:~elementary-os/ubuntu/utopic/base-files/upstream-release-info
Merge into: lp:ubuntu/utopic/base-files
Diff against target: 50 lines (+18/-0)
4 files modified
debian/directory-list (+1/-0)
debian/rules (+1/-0)
upstream-release/README (+12/-0)
upstream-release/lsb-release (+4/-0)
To merge this branch: bzr merge lp:~elementary-os/ubuntu/utopic/base-files/upstream-release-info
Reviewer Review Type Date Requested Status
Colin Watson Disapprove
Sebastien Bacher Needs Information
Review via email: mp+231703@code.launchpad.net

Description of the change

Add a folder /etc/upstream-release/ with lsb-release file in it. This allows exposing the Ubuntu information in distributions derived from Ubuntu, and greatly simplifies version and codename handling for third parties targeting Ubuntu and derivatives.

This patch originates from JoliCloud and has been adopted in elementary OS and a development version of Linux Mint. I'm proposing it for merging into the Ubuntu package so that all Ubuntu derivatives could get it automatically, without the need to carry patches by themselves.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, do you think that apply to Debian and could be forwarded to them as well?

review: Needs Information
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm rejecting this for the same reason I rejected https://code.launchpad.net/~elementary-os/ubuntu/utopic/lsb/upstream-information/+merge/231704; it's important for this kind of extension to be done upstream or at the very least in Debian, as otherwise there's a substantial risk of a semantic clash later, and the fundamental design here needs much more thought about multiple levels of derivation.

Note that the supplied file is unambiguously wrong for Ubuntu in any event, since our "upstream release" would be a Debian release, not an Ubuntu release.

review: Disapprove

Unmerged revisions

114. By Sergey "Shnatsel" Davidoff

added README to upstream-release

113. By Sergey "Shnatsel" Davidoff

added upstream-release folder in /etc to be parsed by lsb-release

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/directory-list'
--- debian/directory-list 2012-10-22 16:57:35 +0000
+++ debian/directory-list 2014-08-21 10:52:37 +0000
@@ -6,6 +6,7 @@
6etc/profile.d6etc/profile.d
7etc/skel7etc/skel
8etc/update-motd.d8etc/update-motd.d
9etc/upstream-release
9home10home
10lib11lib
11mnt12mnt
1213
=== modified file 'debian/rules'
--- debian/rules 2014-04-21 16:19:56 +0000
+++ debian/rules 2014-08-21 10:52:37 +0000
@@ -78,6 +78,7 @@
78 rm -rf debian/lsb-release-udeb78 rm -rf debian/lsb-release-udeb
79 install -d debian/lsb-release-udeb/DEBIAN debian/lsb-release-udeb/etc79 install -d debian/lsb-release-udeb/DEBIAN debian/lsb-release-udeb/etc
80 install -p -m 644 etc/lsb-release debian/lsb-release-udeb/etc80 install -p -m 644 etc/lsb-release debian/lsb-release-udeb/etc
81 install -p -m 644 upstream-release/* debian/tmp/etc/upstream-release
81 chown -R root:root debian/lsb-release-udeb82 chown -R root:root debian/lsb-release-udeb
82 cd debian/lsb-release-udeb && chmod 755 `find . -type d`83 cd debian/lsb-release-udeb && chmod 755 `find . -type d`
83 dpkg-gencontrol -plsb-release-udeb \84 dpkg-gencontrol -plsb-release-udeb \
8485
=== added directory 'upstream-release'
=== added file 'upstream-release/README'
--- upstream-release/README 1970-01-01 00:00:00 +0000
+++ upstream-release/README 2014-08-21 10:52:37 +0000
@@ -0,0 +1,12 @@
1This folder contains information about the upstream distribution that the
2current one is derived from. For example, in Ubuntu derivatives the information
3about Ubuntu release they're based on can be read from here.
4
5Availability of such information greatly simplifies supporting derivatives
6in OS release detection. Application developers no longer have to track down
7mapping of every single derivative codename to Ubuntu codenames, they can
8simply query the codename of a major upstream distribution from here.
9
10This folder is an Ubuntu extension, so do not rely on its availability!
11The proper way to query it is to try this file first, and if it does not exist
12query /etc/lsb-release (assuming you're after the major distribution codename).
013
=== added file 'upstream-release/lsb-release'
--- upstream-release/lsb-release 1970-01-01 00:00:00 +0000
+++ upstream-release/lsb-release 2014-08-21 10:52:37 +0000
@@ -0,0 +1,4 @@
1DISTRIB_ID=Ubuntu
2DISTRIB_RELEASE=14.10
3DISTRIB_CODENAME=utopic
4DISTRIB_DESCRIPTION="Ubuntu Utopic Unicorn (development branch)"

Subscribers

People subscribed via source and target branches