Debian Bug report logs - #703677
lsb-release is not derivative friendly

version graph

Package: lsb-release; Maintainer for lsb-release is Debian LSB Team <debian-lsb@lists.debian.org>; Source for lsb-release is src:lsb.

Reported by: Raphaël Hertzog <hertzog@debian.org>

Date: Fri, 22 Mar 2013 08:15:06 UTC

Severity: important

Tags: confirmed

Found in version lsb/4.1+Debian9

Fixed in version lsb/4.1+Debian11

Done: Didier Raboud <odyx@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-derivatives@lists.debian.org, Debian LSB Team <debian-lsb@lists.debian.org>:
Bug#703677; Package lsb-release. (Fri, 22 Mar 2013 08:15:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphaël Hertzog <hertzog@debian.org>:
New Bug report received and forwarded. Copy sent to debian-derivatives@lists.debian.org, Debian LSB Team <debian-lsb@lists.debian.org>. (Fri, 22 Mar 2013 08:15:10 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: lsb-release is not derivative friendly
Date: Fri, 22 Mar 2013 09:11:20 +0100
Package: lsb-release
Version: 4.1+Debian9
Severity: important

A Debian derivative is advised to fork base-files and to update the
information there so that it can be properly distinguished from Debian.
That's what we did for Kali and yet we have reportbug sending bug
reports to Debian:
$ reportbug apt
[...]
Will send report to Debian (per lsb_release).

So I looked at lsb-release's output:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux Kali Linux 1.0
Release:	Kali Linux 1.0
Codename:	n/a

It's just wrong to return "Debian" as distributor ID when we have
this:
┏(kali-amd64) x230-buxy:~
┗(524)$ cat /etc/os-release 
PRETTY_NAME="Kali GNU/Linux 1.0"
NAME="Kali GNU/Linux"
ID=kali
VERSION="1.0"
VERSION_ID="1.0"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"
┏(kali-amd64) x230-buxy:~
┗(525)$ cat /etc/dpkg/origins/default 
Vendor: Kali
Vendor-URL: http://www.kali.org/
Parent: debian
Bugs: http://bugs.kali.org
┏(kali-amd64) x230-buxy:~
┗(526)$ cat /etc/debian_version 
Kali Linux 1.0

So please update lsb_release's logic to use:
1/ /etc/lsb-release if it exists (it doesn't usually)
2/ /etc/os-release if it exists 
3/ /etc/dpkg/origins/default if none of the above exist
4/ some wild guess based on APT otherwise

Please let me know if you need help.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LSB Team <debian-lsb@lists.debian.org>:
Bug#703677; Package lsb-release. (Fri, 22 Mar 2013 15:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Didier 'OdyX' Raboud" <odyx@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian LSB Team <debian-lsb@lists.debian.org>. (Fri, 22 Mar 2013 15:45:04 GMT) Full text and rfc822 format available.

Message #10 received at 703677@bugs.debian.org (full text, mbox):

From: "Didier 'OdyX' Raboud" <odyx@debian.org>
To: Raphaël Hertzog <hertzog@debian.org>, 703677@bugs.debian.org
Subject: Re: Bug#703677: lsb-release is not derivative friendly
Date: Fri, 22 Mar 2013 15:35:06 +0100
Control: tags -1 +confirmed

Hi Raphaël, and thanks for your bugreport,

Le vendredi, 22 mars 2013 09.11:20, Raphaël Hertzog a écrit :
> A Debian derivative is advised to fork base-files and to update the
> information there so that it can be properly distinguished from Debian.
> That's what we did for Kali and yet we have reportbug sending bug
> reports to Debian:
> $ reportbug apt
> [...]
> Will send report to Debian (per lsb_release).
> 
> So I looked at lsb-release's output:
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID:	Debian
> Description:	Debian GNU/Linux Kali Linux 1.0
> Release:	Kali Linux 1.0
> Codename:	n/a

You're saying that the wrong line is "Distributor ID" (the output of 
lsb_release -i), right ?

> It's just wrong to return "Debian" as distributor ID when we have
> this:
> (…)

Agreed.

> So please update lsb_release's logic to use:
> 1/ /etc/lsb-release if it exists (it doesn't usually)
> 2/ /etc/os-release if it exists
> 3/ /etc/dpkg/origins/default if none of the above exist
> 4/ some wild guess based on APT otherwise
> 
> Please let me know if you need help.

From what I can see in the code, the current logic is the following:
1/ /etc/lsb-release - get_lsb_information()
2/ 'Debian' - guess_debian_release()

Indeed, guess_debian_release has: 
>     distinfo = {'ID' : 'Debian'}

That said, /etc/os-release is not used anywhere in lsb(-release) yet, so I'm 
open to implement "3/ /etc/dpkg/origins/default" parsing for now, but would 
rather avoid parsing os-release only for ID (but help is welcome). Also, I'm 
yet to see an advantage for apt parsing where dpkg origins are already 
supposed to provide the correct information (as derivatives are supposed to 
fork base-files anyway).

I'll see if I can get a patch for "3/ /etc/dpkg/origins/default" parsing soon, 
but I welcome help there too.

Cheers,

OdyX



Added tag(s) confirmed. Request was from "Didier 'OdyX' Raboud" <odyx@debian.org> to 703677-submit@bugs.debian.org. (Fri, 22 Mar 2013 15:45:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LSB Team <debian-lsb@lists.debian.org>:
Bug#703677; Package lsb-release. (Sat, 23 Mar 2013 00:33:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian LSB Team <debian-lsb@lists.debian.org>. (Sat, 23 Mar 2013 00:33:09 GMT) Full text and rfc822 format available.

Message #17 received at 703677@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Didier 'OdyX' Raboud <odyx@debian.org>
Cc: 703677@bugs.debian.org
Subject: Re: Bug#703677: lsb-release is not derivative friendly
Date: Sat, 23 Mar 2013 01:30:05 +0100
Hi,

On Fri, 22 Mar 2013, Didier 'OdyX' Raboud wrote:
> > No LSB modules are available.
> > Distributor ID:	Debian
> > Description:	Debian GNU/Linux Kali Linux 1.0
> > Release:	Kali Linux 1.0
> > Codename:	n/a
> 
> You're saying that the wrong line is "Distributor ID" (the output of 
> lsb_release -i), right ?

Yes, but description looks wrong too. It could use the PRETTY_NAME from
/etc/os-release instead of making up something weird.

> > 3/ /etc/dpkg/origins/default if none of the above exist
> > 4/ some wild guess based on APT otherwise
> > 
> > Please let me know if you need help.
> 
> From what I can see in the code, the current logic is the following:
> 1/ /etc/lsb-release - get_lsb_information()
> 2/ 'Debian' - guess_debian_release()

Yes.

> That said, /etc/os-release is not used anywhere in lsb(-release) yet, so I'm 

/etc/os-release has been promoted as a vendor-neutral file on which
we should standardize. I believe it would be a good idea to use it.

> open to implement "3/ /etc/dpkg/origins/default" parsing for now, but would 
> rather avoid parsing os-release only for ID (but help is welcome). Also, I'm 
> yet to see an advantage for apt parsing where dpkg origins are already 
> supposed to provide the correct information (as derivatives are supposed to 
> fork base-files anyway).

I also don't see the value on the APT parsing but I saw code for this so I
left it in my list.

> I'll see if I can get a patch for "3/ /etc/dpkg/origins/default" parsing soon, 
> but I welcome help there too.

reportbug has some python code parsing that file in
/usr/share/pyshared/reportbug/debbugs.py

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/



Reply sent to Didier Raboud <odyx@debian.org>:
You have taken responsibility. (Wed, 15 May 2013 21:21:25 GMT) Full text and rfc822 format available.

Notification sent to Raphaël Hertzog <hertzog@debian.org>:
Bug acknowledged by developer. (Wed, 15 May 2013 21:21:26 GMT) Full text and rfc822 format available.

Message #22 received at 703677-close@bugs.debian.org (full text, mbox):

From: Didier Raboud <odyx@debian.org>
To: 703677-close@bugs.debian.org
Subject: Bug#703677: fixed in lsb 4.1+Debian11
Date: Wed, 15 May 2013 21:19:28 +0000
Source: lsb
Source-Version: 4.1+Debian11

We believe that the bug you reported is fixed in the latest version of
lsb, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 703677@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Didier Raboud <odyx@debian.org> (supplier of updated lsb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 15 May 2013 22:15:05 +0200
Source: lsb
Binary: lsb-core lsb-graphics lsb-cxx lsb-desktop lsb-languages lsb-multimedia lsb-printing lsb-security lsb lsb-base lsb-release lsb-invalid-mta
Architecture: source amd64 all
Version: 4.1+Debian11
Distribution: unstable
Urgency: low
Maintainer: Debian LSB Team <debian-lsb@lists.debian.org>
Changed-By: Didier Raboud <odyx@debian.org>
Description: 
 lsb        - Linux Standard Base 4.1 support package
 lsb-base   - Linux Standard Base 4.1 init script functionality
 lsb-core   - Linux Standard Base 4.1 core support package
 lsb-cxx    - Linux Standard Base 4.1 C++ support package
 lsb-desktop - Linux Standard Base 4.1 Desktop support package
 lsb-graphics - Linux Standard Base 4.1 graphics support package
 lsb-invalid-mta - Linux Standard Base sendmail dummy
 lsb-languages - Linux Standard Base 4.1 Runtime Languages package
 lsb-multimedia - Linux Standard Base 4.1 Multimedia package
 lsb-printing - Linux Standard Base 4.1 Printing package
 lsb-release - Linux Standard Base version reporting utility
 lsb-security - Linux Standard Base 4.1 Security package
Closes: 703677
Changes: 
 lsb (4.1+Debian11) unstable; urgency=low
 .
   [ Steve Langasek ]
   * add -Es to the lsb_release python shebang, as discussed in
     <https://lists.debian.org/debian-python/2012/10/msg00021.html>.
   * Fix debian/copyright to list the correct Canonical copyright for the
     Ubuntu logging functions.
   * Correct duplicate reference to log_action_end_msg_post in
     debian/lsb-base.README.Debian.
   * debian/rules: fix the build on Ubuntu derivatives when building only the
     arch-dependent packages.
 .
   [ Didier Raboud ]
   * Add jessie to the release codenames lookup table
   * Get Distributor ID from /etc/dpkg/origins/default if existant
     (Closes: #703677)
   * Bump Standards-Version to 3.9.4 without changes needed
   * Correct lsb-desktop.NEWS syntax errors
Checksums-Sha1: 
 67d075fee19e8327419953f31cd0ca37fcda1d88 2044 lsb_4.1+Debian11.dsc
 7c9502ab2178b9ad116c514f4140a35d95ba40eb 119608 lsb_4.1+Debian11.tar.xz
 8cfa5121e9449d05a5c4ea90d090d72fbc5e16c8 44222 lsb-core_4.1+Debian11_amd64.deb
 f3080c80f6707530166f6721fdee4f6b678fa6e3 19364 lsb-graphics_4.1+Debian11_amd64.deb
 9666dfc3d241f075c89c6813285bb36fad966022 19336 lsb-cxx_4.1+Debian11_amd64.deb
 3edef441801a53759d77fe98d03f3befe6e6d531 20508 lsb-desktop_4.1+Debian11_amd64.deb
 a7fa17e28f71b5872f53429dd78c112605b83f7c 19366 lsb-languages_4.1+Debian11_amd64.deb
 955af7d0618663b249f037ff7920a38e134d555a 19342 lsb-multimedia_4.1+Debian11_amd64.deb
 aa5bbf273757a0571d2109279b1f658c043f1ded 19358 lsb-printing_4.1+Debian11_amd64.deb
 e8511013b31cdadbe9bd70f6025bb1c1317cde27 19344 lsb-security_4.1+Debian11_amd64.deb
 9ca27910e37134e15728abbf171c2c9e15b6e854 19316 lsb_4.1+Debian11_all.deb
 dc7a8244056ffc8e182537909171cb72cef540a3 26700 lsb-base_4.1+Debian11_all.deb
 1af5a9cf8dafc8b66c02a25b9d5d2553de396814 26428 lsb-release_4.1+Debian11_all.deb
 6fb774d15bdca3f1aa983a5d86972c15bc2552ab 19736 lsb-invalid-mta_4.1+Debian11_all.deb
Checksums-Sha256: 
 e3498b2b59f18e0c4581775eee72e2bd41562fee8cc73b1c775da36d98f50035 2044 lsb_4.1+Debian11.dsc
 c3265f0fd65fd9c300da6074439001f8b14cff37a00ee7f1e5c5aac1b040ed17 119608 lsb_4.1+Debian11.tar.xz
 923dd8bea6ce00188a5edf86d95dbfcaf141e2e2003b8de01740466a5940784a 44222 lsb-core_4.1+Debian11_amd64.deb
 d9684c470f5f1daeebe5af174c6633fadc5dddd08b64e6c57568f1a501526d47 19364 lsb-graphics_4.1+Debian11_amd64.deb
 d5d3a803606d65108a2f91a95818a628b0c187dca9052fc0a4ae2fe9a29126a7 19336 lsb-cxx_4.1+Debian11_amd64.deb
 ba4e62a9a863fed8d25467f1cfadb2eb156130c45a58e3cd7bbca3ef2fdd5000 20508 lsb-desktop_4.1+Debian11_amd64.deb
 4752108592ce57d5210d34c14532508503bd8191da24d4800aca78f8200b5289 19366 lsb-languages_4.1+Debian11_amd64.deb
 d46828316ed3127ff8783c749624220016e84bb1840e3e536d0b5f680ab0cb7c 19342 lsb-multimedia_4.1+Debian11_amd64.deb
 b7b378ad8b1e1848b1734e84f271836614e21d11ca96d0a41739b6294504a36b 19358 lsb-printing_4.1+Debian11_amd64.deb
 bed83d24ad2167717402e59d9d7665db8a23b84b4fd4578a8c3fa2fd231683a5 19344 lsb-security_4.1+Debian11_amd64.deb
 10698126bda79aab072e845e8ed7800dce1003f5e802ebb88eaff743bc1f6718 19316 lsb_4.1+Debian11_all.deb
 92c1fc962876b2c1ed21530e9385fc8d6aae9e40882bbcd2db6493ea906e1533 26700 lsb-base_4.1+Debian11_all.deb
 6c13ca1a8cf51aa2e26332fbd5702c134a642fa3c9381016be2db2951c7e5b5d 26428 lsb-release_4.1+Debian11_all.deb
 27c35fce95125bd0fd2d6b8653335949f013f25e1bd9923aa97af61e1df3ab10 19736 lsb-invalid-mta_4.1+Debian11_all.deb
Files: 
 2ef48b9692b4a6fd4d7c1b44c1282bea 2044 misc extra lsb_4.1+Debian11.dsc
 66b2d7107f3d4806365087f04a0f2754 119608 misc extra lsb_4.1+Debian11.tar.xz
 d518ebfaa2754749c3283a805c259d61 44222 misc extra lsb-core_4.1+Debian11_amd64.deb
 91460ce8c8c7e506b9bc4fcd3b9ad203 19364 misc extra lsb-graphics_4.1+Debian11_amd64.deb
 a829b30a01c9f46712bffe574ad6394f 19336 misc extra lsb-cxx_4.1+Debian11_amd64.deb
 b7e31b0af082770d96e92e02df9cd51d 20508 misc extra lsb-desktop_4.1+Debian11_amd64.deb
 2c3090930d49cc3e4aa1b85e9ad2305f 19366 misc extra lsb-languages_4.1+Debian11_amd64.deb
 c600234a903105728e7094d3e50205e7 19342 misc extra lsb-multimedia_4.1+Debian11_amd64.deb
 1399d24fa995d8ca0b534db5dd5479a9 19358 misc extra lsb-printing_4.1+Debian11_amd64.deb
 48167ce18c77251899a73487dc90cff8 19344 misc extra lsb-security_4.1+Debian11_amd64.deb
 718bae6faba44b7b615babd0a29ec421 19316 misc extra lsb_4.1+Debian11_all.deb
 7d13f790e67d1128552c9de80f13c9c8 26700 misc required lsb-base_4.1+Debian11_all.deb
 39e96660e71d92735bf34c30e214938a 26428 misc optional lsb-release_4.1+Debian11_all.deb
 83c54c6ddb74603cf4c5e4fde14e731b 19736 misc extra lsb-invalid-mta_4.1+Debian11_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQGcBAEBCAAGBQJRk/CUAAoJEIvPpx7KFjRVMowMAIzNVAu3D/Drqxe7Mw5O1uKr
7K+2w5228+WdLhWwuTDAA6GMrv/G7/5NZFIBA6zu7ueJF4BZfeGoaBcS51VoLwB2
B34asqtO5FW3wLWbUgaaxHX9flvxOD9t0xuRFMYJ65kYjZKqzc9RBedcjuU1xc5q
jFLVpL3GcYhfTaVEkiUVMrrPMWVcIm//pAzm6Y7F8MPq5qQfQgyz+AqwBjrU+8MP
2u3DNAjeb+E+W9MZLzbqrwUKa7SMMaTRlUpXHGihSAaTDQXkBYidyglst+2A7B/w
KizWb20RmyAGUxZUrEs9WQIZ1GJek6h8ykBGQiM11VYiWW+KVvObPHjR6/TwC7Ok
tD2WhRwEofkJO+kD8GnrWjo0uzzXnLmWSGPXaZRTOhxC/zcCfHfcXUIbvR4uY+kH
Q58QaMiZdxupcl4+ipRl+UV2YWG1Z+lgE7FkwOrYAZleqIpP2491+om3/okyZCcN
tFMIJNsqMFgNfx3gCfMal+04eW9ZqBJeNRdTCAbS6Q==
=xT8B
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 23 Jun 2013 07:38:20 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 07:18:33 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.