Hello community, here is the log from the commit of package lsb-release for openSUSE:Factory checked in at 2017-08-24 18:22:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lsb-release (Old) and /work/SRC/openSUSE:Factory/.lsb-release.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lsb-release" Thu Aug 24 18:22:15 2017 rev:19 rq:517632 version:3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/lsb-release/lsb-release.changes 2017-06-22 10:34:55.419885490 +0200 +++ /work/SRC/openSUSE:Factory/.lsb-release.new/lsb-release.changes 2017-08-24 18:22:18.475727823 +0200 @@ -1,0 +2,8 @@ +Tue Aug 15 11:23:34 CEST 2017 - [email protected] + +- Update to lsb-release 3.0 + - obsoletes lsb-release-2.0.dif and reproducible.patch + - only supports /etc/os-release as fallback + - adjusted documentation + +------------------------------------------------------------------- Old: ---- lsb-release-2.0.dif lsb-release-2.0.tar.bz2 reproducible.patch New: ---- lsb-release-3.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lsb-release.spec ++++++ --- /var/tmp/diff_new_pack.vdLKSP/_old 2017-08-24 18:22:19.171629837 +0200 +++ /var/tmp/diff_new_pack.vdLKSP/_new 2017-08-24 18:22:19.171629837 +0200 @@ -1,7 +1,7 @@ # # spec file for package lsb-release # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,27 +17,21 @@ Name: lsb-release +Version: 3.0 +Release: 0 Summary: Linux Standard Base Release Tools License: GPL-2.0+ Group: System/Fhs -Version: 2.0 -Release: 0 -Prefix: /usr -Source: lsb-release-2.0.tar.bz2 -Patch: lsb-release-2.0.dif -# PATCH-FIX-OPENSUSE could be upstreamed if there is an upstream -Patch1: reproducible.patch -BuildArch: noarch -Url: http://www.linuxbase.org/ +Url: https://github.com/thkukuk/lsb-release_os-release +Source: lsb-release-3.0.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch %description Tools from the Linux Standard Base project to determine the used distribution %prep -%setup -n lsb-release-2.0 -%patch -%patch1 -p1 +%setup -q %build # for openSUSE, the distributor is the openSUSE project @@ -47,19 +41,12 @@ make %install -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -mkdir -p $RPM_BUILD_ROOT%{_bindir} -install -m644 lsb_release.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/ # install place -ln lsb_release.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/lsb-release.1.gz -install -m755 lsb_release $RPM_BUILD_ROOT%{_bindir} -ln -sf lsb_release $RPM_BUILD_ROOT%{_bindir}/lsb-release - -%clean -rm -rf $RPM_BUILD_ROOT +make install INSTALL_ROOT=%{buildroot}%{_prefix} %files %defattr(-,root,root) +%doc COPYING %{_bindir}/lsb?release -%{_mandir}/man1/lsb?release.1.gz +%{_mandir}/man1/lsb?release.1%{ext_man} %changelog ++++++ lsb-release-2.0.tar.bz2 -> lsb-release-3.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsb-release-2.0/COPYING new/lsb-release-3.0/COPYING --- old/lsb-release-2.0/COPYING 2004-05-13 23:18:43.000000000 +0200 +++ new/lsb-release-3.0/COPYING 2015-04-24 12:23:50.000000000 +0200 @@ -1,8 +1,8 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,7 +55,7 @@ The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -303,17 +303,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsb-release-2.0/Makefile new/lsb-release-3.0/Makefile --- old/lsb-release-2.0/Makefile 2004-05-13 19:20:19.000000000 +0200 +++ new/lsb-release-3.0/Makefile 2017-08-15 11:36:42.778710247 +0200 @@ -14,16 +14,20 @@ else prefix=$(INSTALL_ROOT) endif -mandir=${prefix}/man +mandir=${prefix}/share/man all: man -man: lsb_release.1.gz +man: lsb_release.1 lsb-release.1 -lsb_release.1.gz: lsb_release - @./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release >lsb_release.1 - @gzip -9f lsb_release.1 +lsb-release.1: lsb_release help2man lsb_release.examples + @./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release >lsb-release.1 + +lsb_release.1: + @echo ".so man1/lsb-release.1" > lsb_release.1 install: all - install -D -m 644 lsb_release.1.gz ${mandir}/man1/lsb_release.1.gz + install -D -m 644 lsb_release.1 ${mandir}/man1/lsb_release.1 + install -D -m 644 lsb-release.1 ${mandir}/man1/lsb-release.1 install -D -m 755 lsb_release ${prefix}/bin/lsb_release + ln -sf lsb_release ${prefix}/bin/lsb-release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsb-release-2.0/README new/lsb-release-3.0/README --- old/lsb-release-2.0/README 2004-05-13 23:18:43.000000000 +0200 +++ new/lsb-release-3.0/README 2017-08-15 11:31:39.445689687 +0200 @@ -1,5 +1,6 @@ -LSB version query program (lsb_release) by Dominique Massonie -([email protected]) +LSB version query program (lsb_release) with support of /etc/os-release. + +Original written by Dominique Massonie ([email protected]) This program forms part of the required functionality of the LSB (Linux Standard Base) specification. @@ -9,15 +10,3 @@ distribution claims compliance as well. It can also attempt to display the name and release of the distribution along with an identifier of who produces the distribution. - -====================================================================== - -Note that this is an \example/ implementation. - -The specification requires only an lsb_release command to exist, and to -return the information in the format described. The fact that the manual -page generated from this software describes implementation details of this -example should not be construed as placing any additional requirements -on implementors beyond those just noted. In particular, the existance and -format of the /etc/lsb-release file and the /etc/lsb-release.d directory -are not part of the LSB specification diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsb-release-2.0/help2man new/lsb-release-3.0/help2man --- old/lsb-release-2.0/help2man 2000-10-18 02:57:10.000000000 +0200 +++ new/lsb-release-3.0/help2man 2017-08-15 11:20:48.059721284 +0200 @@ -173,7 +173,7 @@ or die "$this_program: can't get `--$_' info from $ARGV[0]\n" } qw(help), $opt_version_key; -my $date = strftime "%B %Y", localtime; +my $date = strftime "%B %Y", gmtime((stat "lsb_release")[9]); (my $program = $ARGV[0]) =~ s!.*/!!; my $package = $program; my $version; @@ -326,12 +326,6 @@ next; } - # Catch bug report text. - if (/^(Report +bugs|Email +bug +reports +to) /) - { - $sect = 'REPORTING BUGS'; - } - # Author section. elsif (/^Written +by/) { @@ -479,7 +473,7 @@ # Section ordering. my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS FILES EXAMPLES); -my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO'); +my @post = ('AUTHOR', 'COPYRIGHT', 'SEE ALSO'); my $filter = join '|', @pre, @post; # Output content. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsb-release-2.0/lsb_release new/lsb-release-3.0/lsb_release --- old/lsb-release-2.0/lsb_release 2004-06-30 19:30:34.000000000 +0200 +++ new/lsb-release-3.0/lsb_release 2017-08-15 10:34:13.199854976 +0200 @@ -4,6 +4,7 @@ # # Copyright (C) 2000, 2002, 2004 Free Standards Group, Inc. # Originally by Dominique MASSONIE <[email protected]> +# Modified for SUSE Linux products by Thorsten Kukuk # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,46 +17,13 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# * Changes in 2.0 -# - Support LSB 2.0 module layout (Mats Wichmann) -# The LSB_VERSION is now a colon-separated field of supported module versions -# An /etc/lsb-release.d is searched for modules beyond the core. -# Only the filenames in this directory is looked at, those names are added -# to LSB_VERSION. This allows module support to be handled easily by -# package install/removal without a need to edit lsb-release on the fly. -# - Correct license: FSG == Free Standards Group, Inc. -# -# * Changes in 1.4 -# - "awk" not needed anymore (Loic Lefort) -# - fixed bug #121879 reported by Chris D. Faulhaber, -# some shells doesn't support local variables -# - fixed a bug when single parameter sets many args including -s -# - function DisplayProgramVersion (undocumented) now exits script like Usage -# - cosmetic changes in comments/outputs -# -# * Changes in 1.3 -# - No changes in script, only in build infrastructure -# -# * Changes in 1.2 -# - Fixed more bash'isms -# - LSB_VERSION is no longer required in /etc/lsb-release file -# -# * Changes in 1.1 -# - removed some bash-ism and typos -# Notice: script remains broken with ash because of awk issues -# - changed licence to FSG - "Free Software Group, Inc" -# - fixed problem with --short single arg call -# - changed Debian specifics, codename anticipates release num +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # Description: # Collect information from sourceable /etc/lsb-release file (present on # LSB-compliant systems) : LSB_VERSION, DISTRIB_ID, DISTRIB_RELEASE, # DISTRIB_CODENAME, DISTRIB_DESCRIPTION (all optional) # Then (if needed) find and add names from /etc/lsb-release.d -# Then (if needed) find and parse the /etc/[distro]-release file ############################################################################### @@ -63,16 +31,12 @@ ############################################################################### # This script version -SCRIPTVERSION="2.0" +SCRIPTVERSION="3.0" # Defines the data files -INFO_ROOT="/etc" # directory of config files -INFO_LSB_FILE="lsb-release" # where to get LSB version -INFO_LSB_DIR="lsb-release.d" # where to get LSB addon modules -INFO_DISTRIB_SUFFIX="release" # <distrib>-<suffix> -ALTERNATE_DISTRIB_FILE="/etc/debian_version" # for Debian [based distrib] -ALTERNATE_DISTRIB_NAME="Debian" # " -CHECKFIRST="/etc/redhat-release" # check it before file search +INFO_LSB_FILE="/etc/lsb-release" # where to get LSB version +INFO_LSB_DIR="/etc/lsb-release.d" # where to get LSB addon modules +INFO_DISTRIB_FILE="/etc/os-release" # <distrib>-<suffix> # Defines our exit codes EXIT_STATUS="0" # default = Ok :) @@ -91,24 +55,21 @@ MSG_NA="n/a" MSG_NONE="(none)" MSG_RESULT="" # contains the result in case short output selected - -# Description string delimiter -DESCSTR_DELI="release" - +MSG_DISTRIBUTOR="SUSE" ############################################################################### # FUNCTIONS ############################################################################### # Display Program Version for internal use (needed by help2man) -DisplayProgramVersion() { - echo "FSG `basename $0` v$SCRIPTVERSION" +DisplayProgramVersion() { + echo "`basename $0` v$SCRIPTVERSION" echo echo "Copyright (C) 2000, 2002, 2004 Free Standards Group, Inc." - echo "This is free software; see the source for copying conditions. There\ - is NO" - echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR\ - PURPOSE." + echo "Copyright (C) 2017 SUSE Linux GmbH" + echo + echo "This is free software; see the source for copying conditions. There is NO" + echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." echo echo "Originally written by Dominique MASSONIE." @@ -117,8 +78,7 @@ # defines the Usage for lsb_release Usage() { - echo "FSG `basename $0` v$SCRIPTVERSION prints certain LSB (Linux\ - Standard Base) and" + echo "`basename $0` v$SCRIPTVERSION prints certain LSB (Linux Standard Base) and" echo "Distribution information." echo echo "Usage: `basename $0` [OPTION]..." @@ -188,87 +148,67 @@ # Get/Init LSB infos (maybe Distrib infos too) GetLSBInfo() { - if [ -f "$INFO_ROOT/$INFO_LSB_FILE" ] + LSB_VERSION="" + if [ -f "$INFO_LSB_FILE" ] then # should init at least LSB_VERSION - . "$INFO_ROOT/$INFO_LSB_FILE" + . "$INFO_LSB_FILE" + fi + # Always look in the directories + if [ -d "$INFO_ROOT/$INFO_LSB_DIR" ] + then + for tag in "$INFO_ROOT/$INFO_LSB_DIR/"* + do + if [ -z "$LSB_VERSION" ] + then + LSB_VERSION=`basename $tag` + else + LSB_VERSION=$LSB_VERSION:`basename $tag` + fi + done fi if [ -z "$LSB_VERSION" ] then LSB_VERSION=$MSG_NA - else - # if we found LSB_VERSION, continue to look in directory - if [ -d "$INFO_ROOT/$INFO_LSB_DIR" ] - then - for tag in "$INFO_ROOT/$INFO_LSB_DIR/"* - do - LSB_VERSION=$LSB_VERSION:`basename $tag` - done - fi fi } -# Get the whole distrib information string (from ARG $1 file) +# Get the whole distrib information string (from /etc/os-release) InitDistribInfo() { -## Notice: Debian has a debian_version file -## (at least) Mandrake has two files, a mandrake and a redhat one - FILENAME=$1 # CHECKFIRST or finds' result in GetDistribInfo() or "" - - if [ -z "$FILENAME" ] - then - if [ -f "$ALTERNATE_DISTRIB_FILE" ] - then # For Debian only - [ -z "$DISTRIB_ID" ] && DISTRIB_ID="$ALTERNATE_DISTRIB_NAME" - [ -z "$DISTRIB_RELEASE" ] \ - && DISTRIB_RELEASE=$(cat $ALTERNATE_DISTRIB_FILE) - [ -z "$DISTRIB_CODENAME" ] && [ "$DISTRIB_RELEASE" = "2.1" ] \ - && DISTRIB_CODENAME="Slink" - [ -z "$DISTRIB_CODENAME" ] && [ "$DISTRIB_RELEASE" = "2.2" ] \ - && DISTRIB_CODENAME="Potato" -# [ -z "$DISTRIB_CODENAME" ] && [ "$DISTRIB_RELEASE" = "2.3" ] \ -# && DISTRIB_CODENAME="Woody" - [ -z "$DISTRIB_CODENAME" ] && DISTRIB_CODENAME=$DISTRIB_RELEASE - # build the DISTRIB_DESCRIPTION string (never need to be parsed) - [ -z "$DISTRIB_DESCRIPTION" ] \ - && DISTRIB_DESCRIPTION="$DISTRIB_ID $DESCSTR_DELI $DISTRIB_REL\ -EASE ($DISTRIB_CODENAME)" - else # Only for nothing known compliant distrib :( - [ -z "$DISTRIB_ID" ] && DISTRIB_ID=$MSG_NA - [ -z "$DISTRIB_RELEASE" ] && DISTRIB_RELEASE=$MSG_NA - [ -z "$DISTRIB_CODENAME" ] && DISTRIB_CODENAME=$MSG_NA - [ -z "$DISTRIB_DESCRIPTION" ] && DISTRIB_DESCRIPTION=$MSG_NONE - EXIT_STATUS=$ERROR_NOANSWER - fi - else - NO="" # is Description string syntax correct ? - if [ -z "$DISTRIB_DESCRIPTION" ] \ - || [ -n "$(echo $DISTRIB_DESCRIPTION | \ - sed -e "s/.*$DESCSTR_DELI.*//")" ] - then - TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null) - [ -z "$DISTRIB_DESCRIPTION" ] \ - && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC - else - TMP_DISTRIB_DESC=$DISTRIB_DESCRIPTION - fi + source $INFO_DISTRIB_FILE + NO="" # is Description string syntax correct ? - if [ -z "$TMP_DISTRIB_DESC" ] # head or lsb-release init - then # file contains no data + if [ -z "$DISTRIB_DESCRIPTION" ]; then + if [ -n "$PRETTY_NAME" ]; then + DISTRIB_DESCRIPTION=$PRETTY_NAME + else DISTRIB_DESCRIPTION=$MSG_NONE - NO="y" - else # Do simple check - [ -n "$(echo $TMP_DISTRIB_DESC | \ - sed -e "s/.*$DESCSTR_DELI.*//")" ] \ - && NO="y" - fi - - if [ -n "$NO" ] - then # does not contain "release" delimiter - [ -z "$DISTRIB_ID" ] && DISTRIB_ID=$MSG_NA - [ -z "$DISTRIB_RELEASE" ] && DISTRIB_RELEASE=$MSG_NA - [ -z "$DISTRIB_CODENAME" ] && DISTRIB_CODENAME=$MSG_NA - fi + fi + fi + + if [ -z "$DISTRIB_ID" ]; then + if [ -n "$MSG_DISTRIBUTOR" ]; then + DISTRIB_ID=$MSG_DISTRIBUTOR + else + DISTRIB_ID=$MSG_NA + fi + fi + + if [ -z "$DISTRIB_RELEASE" ]; then + if [ -n "$VERSION_ID" ]; then + DISTRIB_RELEASE=$VERSION_ID + else + DISTRIB_RELEASE=$MSG_NA + fi + fi + + if [ -z "$DISTRIB_CODENAME" ]; then + if [ -n "$VERSION_CODENAME" ]; then + DISTRIB_CODENAME = $VERSION_CODENAME + else + DISTRIB_CODENAME=$MSG_NA + fi fi } @@ -282,16 +222,7 @@ if [ -n "$NO" ] then - if [ ! -f "$CHECKFIRST" ] - then - CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \ - -name \*$INFO_DISTRIB_SUFFIX \ - -and ! -name $INFO_LSB_FILE \ - -and -type f \ - 2>/dev/null \ - | head -n 1 ) # keep one of the files found (if many) - fi - InitDistribInfo $CHECKFIRST + InitDistribInfo fi } @@ -307,20 +238,6 @@ # Display string id of distributor ( i.e. a single word! ) DisplayID() { - if [ -z "$DISTRIB_ID" ] - then -## Linux could be part of the distro name (i.e. Turbolinux) or a separate word -## set before, after... -## also expect a delimiter ( i.e. "release" ) - if [ -n "$(echo $TMP_DISTRIB_DESC | sed "s/.*$DESCSTR_DELI.*//")" ] - then - DISTRIB_ID=$MSG_NA - else - DISTRIB_ID=$(echo " $TMP_DISTRIB_DESC" \ - | sed -e "s/[[:blank:]][Ll][Ii][Nn][Uu][Xx][[:blank:]]/ /g" \ - -e "s/\(.*\)[[:blank:]]$DESCSTR_DELI.*/\1/" -e "s/[[:blank:]]//g") - fi - fi if [ -z "$ARG_S" ] then echo -e "$MSG_DISTID$DISTRIB_ID" @@ -346,14 +263,6 @@ # Display release number of distribution. DisplayRelease() { - if [ -z "$DISTRIB_RELEASE" ] - then # parse the "$DISTRIB_DESCRIPTION" string - DISTRIB_RELEASE=$(echo "$TMP_DISTRIB_DESC" | \ - sed -e "s/.*$DESCSTR_DELI[[:blank:]]*\([[:digit:]][[:graph:]]*\).*/\1/" ) - [ "$DISTRIB_RELEASE" = "$TMP_DISTRIB_DESC" ] \ - || [ -z "$DISTRIB_RELEASE" ] \ - && DISTRIB_RELEASE=$MSG_NA - fi if [ -z "$ARG_S" ] then echo -e "$MSG_DISTREL$DISTRIB_RELEASE" @@ -364,14 +273,6 @@ # Display codename according to distribution version. DisplayCodename() { - if [ -z "$DISTRIB_CODENAME" ] - then # parse the "$DISTRIB_DESCRIPTION" string - DISTRIB_CODENAME=$(echo "$TMP_DISTRIB_DESC" | \ - sed -e "s/.*$DESCSTR_DELI.*(\(.*\)).*/\1/") - [ "$DISTRIB_CODENAME" = "$TMP_DISTRIB_DESC" ] \ - || [ -z "$DISTRIB_CODENAME" ] \ - && DISTRIB_CODENAME=$MSG_NA - fi if [ -z "$ARG_S" ] then echo -e "$MSG_DISTCODE$(echo "$DISTRIB_CODENAME" | \ @@ -399,7 +300,7 @@ fi fi -# Update args to All if requested +# Update args to All if requested if [ -n "$ARG_A" ] then [ -z "$ARG_C" ] && ARG_C="y" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsb-release-2.0/lsb_release.examples new/lsb-release-3.0/lsb_release.examples --- old/lsb-release-2.0/lsb_release.examples 2004-05-13 19:20:19.000000000 +0200 +++ new/lsb-release-3.0/lsb_release.examples 2017-08-15 11:15:44.215018157 +0200 @@ -1,29 +1,27 @@ [FILES] If the installation is LSB compliant, the \fB"/etc/lsb-release"\fR -file should contain the \fBLSB_VERSION\fR field. +file should contain the \fBLSB_VERSION\fR field. The value of the field should be a colon separated list of -supported module versions indicating the LSB specification +supported module versions indicating the LSB specification modules to which the installation is compliant. If the installation is not -compliant, the above field should +compliant, the above field should .B not be present. Optional fields are \fBDISTRIB_ID\fR, \fBDISTRIB_RELEASE\fR, \fBDISTRIB_CODENAME\fR, \fBDISTRIB_DESCRIPTION\fR and can be used to -override information which is parsed from the -\fB"/etc/\fIdistrib\fB-release"\fR file. +override information which is parsed from the +\fB"/etc/os-release"\fR file. Since \fB"/etc/os-release"\fR is the new +standard, there is no need anymore to add any of the optional +fields to \fB"/etc/lsb-release"\fR. If the \fB"/etc/lsb-release.d"\fR directory exists, it is searched for filenames which are taken as additional module-version strings to add to \fBLSB_VERSION\fR. - -The \fB"/etc/\fIdistrib\fB-release"\fR file contains a description line -which is parsed to get information (especially on currently non-LSB -compliant systems). The required line style is: -.br +.br "\fIDistributor\fR \fBrelease\fR \fIx.x\fR \fB(\fR\fICodename\fR\fB)\fR" Where \fIDistributor\fR can be a couple of words, but then concatenated @@ -32,13 +30,6 @@ \fIx.x\fR starts with a digit followed by any non-blank characters, \fICodename\fR will also be concatenated (blanks cleanup only). -\fBrelease\fR may not be used as a keyword in \fBDISTRIB_DESCRIPTION\fR -if you don't want to override \fB"/etc/\fIdistrib\fB-release"\fR data. - -\fBNotice:\fR To support the \fBDebian\fR distributions' lack of -information (see "/etc/debian_version" file) some have been directly -added into the \fBlsb_release\fR script. - [EXAMPLES] If the "\fB/etc/lsb-release\fR" file contains: @@ -50,9 +41,18 @@ graphics-2.0-ia64 graphics-2.0-noarch -and the "\fB/etc/foobar-release\fP" file contains: +and the "\fB/etc/os-release\fP" file contains: + +NAME="SLES" +.br +VERSION="12-SP2" +.br +VERSION_ID="12.2" +.br +PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2" +.br +ID="sles" -My Linux Distrib release 1.0RC4 (TryIt) Then the results of various options will be: @@ -60,17 +60,17 @@ .br LSB Version: core-2.0-ia64:core-2.0-noarch:graphics-2.0-ia64:graphics-2.0-noarch .br -Distributor ID: MyDistrib +Distributor ID: SUSE .br Description: I enjoy using my distrib .br -Release: 1.0RC4 +Release: 12.2 .br -Codename: TryIt +Codename: n/a .B $ ./lsb_release -a -s .br -1.0 MyDistrib "I enjoy using my distrib" 1.0RC4 TryIt +1.0 SUSE "I enjoy using my distrib" 12.2 n/a If the "/etc/lsb-release" file is absent (indicating this is not an LSB compliant distribution), the result will be: @@ -79,15 +79,10 @@ .br LSB Version: n/a .br -Distributor ID: MyDistrib +Distributor ID: SUSE .br -Description: My Linux Distrib release 1.0RC4 (TryIt) +Description: SUSE Linux Enterprise Server 12 SP2 .br -Release: 1.0RC4 +Release: 12.2 .br -Codename: TryIt - -[REPORTING BUGS] -Report bugs at http://bugs.linuxbase.org. -Please include a complete, self contained example that will allow the -bug to be reproduced, and say which version of lsb_release you are using. +Codename: n/a
