diffstat for lsb-4.1+Debian13+nmu1 lsb-4.1+devuan2 debian/README.Debian | 48 ++++++++++---------- debian/changelog | 12 +++++ debian/control | 82 +++++++++++++++++------------------ debian/lsb-base.NEWS | 2 debian/lsb-base.README.Debian | 50 ++++++++++----------- debian/lsb-core.postinst | 4 - debian/lsb-desktop.NEWS | 10 ++-- debian/lsb-desktop.README.Debian | 12 ++--- debian/lsb-release.README.Debian | 12 ++--- debian/rules | 2 lsb_release.py | 86 +++++++++++++++++-------------------- test/apt-cache | 18 +++---- test/test_lsb_release.py | 90 +++++++++++++++++++-------------------- 13 files changed, 216 insertions(+), 212 deletions(-) diff -Nru lsb-4.1+Debian13+nmu1/debian/changelog lsb-4.1+devuan2/debian/changelog --- lsb-4.1+Debian13+nmu1/debian/changelog 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/changelog 2015-05-24 04:35:11.000000000 +0000 @@ -1,3 +1,15 @@ +lsb (4.1+devuan2) unstable; urgency=medium + + * Finished devuanization. + + -- Franco (nextime) Lanza Sun, 24 May 2015 06:22:45 +0200 + +lsb (4.1+devuan1) unstable; urgency=medium + + * Import into Devuan, light changes + + -- Denis Roio Mon, 06 Apr 2015 16:16:23 +0200 + lsb (4.1+Debian13+nmu1) unstable; urgency=medium [ Ondřej Surý] diff -Nru lsb-4.1+Debian13+nmu1/debian/control lsb-4.1+devuan2/debian/control --- lsb-4.1+Debian13+nmu1/debian/control 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/control 2015-05-24 04:35:11.000000000 +0000 @@ -1,8 +1,8 @@ Source: lsb Section: misc Priority: extra -Maintainer: Debian LSB Team -Uploaders: Didier Raboud , Jeff Licquia +Maintainer: Franco Lanza +Uploaders: Denis Roio Build-Depends: debhelper (>> 7.0.50~), po-debconf (>= 0.5.0), dpkg-dev (>= 1.10), @@ -10,8 +10,8 @@ X-Python-Version: >= 2.6 Standards-Version: 3.9.4 Homepage: http://www.linuxfoundation.org/collaborate/workgroups/lsb -Vcs-Git: git://anonscm.debian.org/collab-maint/lsb.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/lsb.git +Vcs-Git: https://git.devuan.org/pkgs-lsb/lsb.git +Vcs-Browser: https://git.devuan.org/pkgs-lsb/lsb Package: lsb-core Architecture: any @@ -60,16 +60,16 @@ depend upon. . This package provides an implementation of the core of version 4.1 of - the Linux Standard Base for Debian on the Intel x86, Intel ia64 + the Linux Standard Base for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-graphics Architecture: any @@ -85,16 +85,16 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base graphics specification for Debian on the Intel x86, + Standard Base graphics specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-cxx Architecture: any @@ -109,16 +109,16 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base C++ (CXX) specification for Debian on the Intel x86, + Standard Base C++ (CXX) specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-desktop Architecture: any @@ -158,15 +158,15 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base Desktop specification for Debian on the Intel x86, + Standard Base Desktop specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies with the Linux - Standard Base, and should not be construed as a statement that Debian + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux + Standard Base, and should not be construed as a statement that Devuan is LSB-compliant. Package: lsb-languages @@ -185,16 +185,16 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base Languages specification for Debian on the Intel x86, + Standard Base Languages specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-multimedia Architecture: any @@ -209,16 +209,16 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base Multimedia specification for Debian on the Intel x86, + Standard Base Multimedia specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-printing Architecture: any @@ -236,16 +236,16 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base Printing specification for Debian on the Intel x86, + Standard Base Printing specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-security Architecture: any @@ -261,16 +261,16 @@ depend upon. . This package provides an implementation of version 4.1 of the Linux - Standard Base Security specification for Debian on the Intel x86, + Standard Base Security specification for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb Architecture: all @@ -287,16 +287,16 @@ depend upon. . This package provides an implementation of all modules of version 4.1 - of the Linux Standard Base for Debian on the Intel x86, Intel ia64 + of the Linux Standard Base for Devuan on the Intel x86, Intel ia64 (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux kernel. Future revisions of the specification and this package may support the LSB on additional architectures and kernels. . The intent of this package is to provide a best current practice way - of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies + of installing and running LSB packages on Devuan GNU/Linux. Its + presence does not imply that Devuan fully complies with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + statement that Devuan is LSB-compliant. Package: lsb-base Architecture: all @@ -332,7 +332,7 @@ installed. . While it is intended for use by LSB packages, this command may also - be useful for programmatically distinguishing between a pure Debian + be useful for programmatically distinguishing between a pure Devuan installation and derived distributions. Package: lsb-invalid-mta diff -Nru lsb-4.1+Debian13+nmu1/debian/lsb-base.NEWS lsb-4.1+devuan2/debian/lsb-base.NEWS --- lsb-4.1+Debian13+nmu1/debian/lsb-base.NEWS 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/lsb-base.NEWS 2015-05-24 04:35:11.000000000 +0000 @@ -1,4 +1,4 @@ -lsb (4.1+Debian1) unstable; urgency=low +lsb (4.1+Devuan1) unstable; urgency=low This version implements a new "Fancy output" in the form of "[....] " blocks prepended to the daemon status messages: diff -Nru lsb-4.1+Debian13+nmu1/debian/lsb-base.README.Debian lsb-4.1+devuan2/debian/lsb-base.README.Debian --- lsb-4.1+Debian13+nmu1/debian/lsb-base.README.Debian 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/lsb-base.README.Debian 2015-05-24 04:35:11.000000000 +0000 @@ -1,13 +1,13 @@ -lsb-base for Debian +lsb-base for Devuan ------------------- -The Debian lsb-base package provides a series of logging functions to +The Devuan lsb-base package provides a series of logging functions to permit simplified logging of init script actions. These functions are -specific to Debian and (in some cases) other derived distributions. +specific to Devuan and (in some cases) other derived distributions. - log_daemon_msg "Starting/stopping long daemon name" "daemond" - Log starting/stopping of daemons. On Debian, outputs: + Log starting/stopping of daemons. On Devuan, outputs: "Starting/stopping long daemon name: daemond" @@ -21,11 +21,11 @@ - log_progress_msg "daemon2d" Log startup of a second daemon (e.g. sysklogd, nfs init scripts). - On Debian, outputs " daemon2d" and leaves the cursor at the EOL. + On Devuan, outputs " daemon2d" and leaves the cursor at the EOL. - log_end_msg 0/1 - Log successful startup. On Debian, outputs "." followed by newline. + Log successful startup. On Devuan, outputs "." followed by newline. A non-zero code may also be specified, which indicates failure; currently implemented as outputting "failed!" (in red on a color TTY) followed by newline. @@ -45,14 +45,14 @@ setting of a kernel variable, but it might be something else that is not expected to take any time (or fail). - On Debian, a trailing period will be added to the message, followed by + On Devuan, a trailing period will be added to the message, followed by a newline. If "Fancy output" is enabled, the message will get prepended with a blue [info]. - log_action_begin_msg "Configuring network interfaces" Log the start of an action that is expected to take some time. On - Debian, an elipsis (...) will follow the message, and the cursor will + Devuan, an elipsis (...) will follow the message, and the cursor will stay at EOL. If "Fancy output" is enabled, it will get the same [....] block as @@ -61,7 +61,7 @@ - log_action_cont_msg "flushing ARP cache" Log an action as part of a process started by log_action_start_msg(). - On Debian, this message will receive a trailing elipsis, and the cursor + On Devuan, this message will receive a trailing elipsis, and the cursor will stay at EOL. - log_action_end_msg {0|1} ["message"] @@ -97,7 +97,7 @@ 150-199 reserved for application use 200-254 reserved - On Debian, outputs: + On Devuan, outputs: "Daemon_name is running.". "Daemon_name is not running ... failed!" @@ -117,7 +117,7 @@ calling init script belongs to a package which also provides a native upstart job, it should generally exit non-zero in this case. - init_is_upstart is available since lsb-base 4.1+Debian3. + init_is_upstart is available since lsb-base 4.1+Devuan3. To use these functions, source /lib/lsb/init-functions at the beginning of your (Bourne sh or compatible) init script. @@ -133,13 +133,13 @@ log_failure_msg message log_warning_msg message -These functions *do not* comply with Debian policy and should only be used +These functions *do not* comply with Devuan policy and should only be used by LSB packages. OTHER LSB FUNCTIONALITY start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args...] - Start "pathname" as a daemon. We call Debian's start-stop-daemon to + Start "pathname" as a daemon. We call Devuan's start-stop-daemon to implement this functionality. killproc [-p pidfile] pathname [signal] @@ -155,7 +155,7 @@ http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html -Note: Debian packages probably should use start-stop-daemon directly; +Note: Devuan packages probably should use start-stop-daemon directly; however, these functions may be useful in porting init scripts from other distributions. Also, if you are developing software for wider use, you should not expect these functions to be implemented @@ -166,7 +166,7 @@ - FOR PACKAGES AND DISTRIBUTIONS -Since lsb-base 4.1+Debian4, init-functions will source all +Since lsb-base 4.1+Devuan4, init-functions will source all correctly-named files under /lib/lsb/init-functions.d for the purpose of allowing packages to alter or enhance the init-functions functions. @@ -174,9 +174,9 @@ override the default behaviour of /lib/lsb/init-functions: logging init script events, changing the logging messages format, etc. -If supplied, these script fragments shall be compatible with any Debian +If supplied, these script fragments shall be compatible with any Devuan /bin/sh, as init scripts sourcing /lib/lsb/init-functions may be running -under any Bourne-style shell permitted by Debian policy (i.e. not just +under any Bourne-style shell permitted by Devuan policy (i.e. not just bash). - FOR ADMINISTRATORS @@ -187,9 +187,9 @@ overrides. This file may also be useful on systems where the console log is not visible during startup. -If supplied, this script fragment should be compatible with any Debian +If supplied, this script fragment should be compatible with any Devuan /bin/sh, as init scripts sourcing this file may be running under any -Bourne-style shell permitted by Debian policy (i.e. not just bash). +Bourne-style shell permitted by Devuan policy (i.e. not just bash). - FANCY OUTPUT @@ -204,12 +204,12 @@ log_daemon_msg_pre log_daemon_msg_post -log_begin_msg_pre (since 4.1+Debian1) -log_begin_msg_post (since 4.1+Debian1) -log_action_msg_pre (since 4.1+Debian1) -log_action_msg_post (since 4.1+Debian1) -log_action_begin_msg_pre (since 4.1+Debian1) -log_action_begin_msg_post (since 4.1+Debian1) +log_begin_msg_pre (since 4.1+Devuan1) +log_begin_msg_post (since 4.1+Devuan1) +log_action_msg_pre (since 4.1+Devuan1) +log_action_msg_post (since 4.1+Devuan1) +log_action_begin_msg_pre (since 4.1+Devuan1) +log_action_begin_msg_post (since 4.1+Devuan1) log_end_msg_pre log_end_msg_post log_action_end_msg_pre diff -Nru lsb-4.1+Debian13+nmu1/debian/lsb-core.postinst lsb-4.1+devuan2/debian/lsb-core.postinst --- lsb-4.1+Debian13+nmu1/debian/lsb-core.postinst 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/lsb-core.postinst 2015-05-24 04:35:11.000000000 +0000 @@ -54,10 +54,6 @@ shadowconfig on >&2 || true fi fi - if dpkg --compare-versions "$2" lt "3.2+Debian30" ; then - [ -L /lib/ld-lsb-x86-64.so.2 ] && rm /lib/ld-lsb-x86-64.so.2 || true - [ -L /lib/ld-lsb-x86-64.so.3 ] && rm /lib/ld-lsb-x86-64.so.3 || true - fi setup_ldso_symlink ;; abort-upgrade|abort-remove|abort-deconfigure) diff -Nru lsb-4.1+Debian13+nmu1/debian/lsb-desktop.NEWS lsb-4.1+devuan2/debian/lsb-desktop.NEWS --- lsb-4.1+Debian13+nmu1/debian/lsb-desktop.NEWS 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/lsb-desktop.NEWS 2015-05-24 04:35:11.000000000 +0000 @@ -1,15 +1,15 @@ -lsb (4.1+Debian7) unstable; urgency=low +lsb (4.1+Devuan1) unstable; urgency=low - From its 4.1+Debian7 version on, lsb-desktop doesn't depend on Qt3 anymore. - This is an explicit and Debian-specific derogation from the LSB 4.1 + From its 4.1+Devuan1 version on, lsb-desktop doesn't depend on Qt3 anymore. + This is an explicit and Devuan-specific derogation from the LSB 4.1 specification. Qt3 is superseded by Qt4 since 2005 and has been considered "end of life" since July 2007 by their upstream developers (Trolltech, then Nokia). Its support is also marked deprecated in the LSB specification since its 3.2 - version (Jan 2008). As such, it is going to be removed from Debian soon. + version (Jan 2008). As such, it is going to be removed from Devuan soon. - Please refer to /usr/share/doc/lsb-desktop/README.Debian for instructions to + Please refer to /usr/share/doc/lsb-desktop/README.Devuan for instructions to install Qt3 from unsupported sources. -- Didier Raboud Sun, 10 Jun 2012 23:18:07 +0200 diff -Nru lsb-4.1+Debian13+nmu1/debian/lsb-desktop.README.Debian lsb-4.1+devuan2/debian/lsb-desktop.README.Debian --- lsb-4.1+Debian13+nmu1/debian/lsb-desktop.README.Debian 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/lsb-desktop.README.Debian 2015-05-24 04:35:11.000000000 +0000 @@ -1,15 +1,15 @@ LSB-DESKTOP AND QT3 -From its 4.1+Debian7 version, lsb-desktop doesn't depend on Qt3 -anymore. This is an explicit and Debian-specific derogation from the LSB -4.1 specification needed because Qt3 is going to be removed from Debian. +From its 4.1+Devuan1 version, lsb-desktop doesn't depend on Qt3 +anymore. This is an explicit and Devuan-specific derogation from the LSB +4.1 specification needed because Qt3 is going to be removed from Devuan. -In case it might still be needed, Qt3 can be installed on Debian from -the Debian Archive Snapshot service: +In case it might still be needed, Qt3 can be installed on Devuan from +the Devuan Archive Snapshot service: http://snapshot.debian.org/ -The instructions to get past packages installed on Debian are available +The instructions to get past packages installed on Devuan are available from its homepage. The full list of past Qt3 versions is available from: diff -Nru lsb-4.1+Debian13+nmu1/debian/lsb-release.README.Debian lsb-4.1+devuan2/debian/lsb-release.README.Debian --- lsb-4.1+Debian13+nmu1/debian/lsb-release.README.Debian 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/lsb-release.README.Debian 2015-05-24 04:35:11.000000000 +0000 @@ -1,4 +1,4 @@ -lsb-release for Debian +lsb-release for Devuan ---------------------- NB: These notes are intended for anyone building a derived @@ -14,7 +14,7 @@ Distribution-specific information should be *separately provided* in /etc/lsb-release; it is no longer provided in this package. It is my -hope that in Debian, this will be managed by the base-files +hope that in Devuan, this will be managed by the base-files maintainer (who already maintains the debian_version file). The file should be formatted as a series of shell variable @@ -27,12 +27,12 @@ DISTRIB_RELEASE=(The release number) DISTRIB_CODENAME=(The codename for the release) -Any other variable assignments will be silently ignored. For Debian +Any other variable assignments will be silently ignored. For Devuan 7.0 (jessie), it might have read: -DISTRIB_ID=Debian -DISTRIB_DESCRIPTION="Debian GNU/Linux 7.0 (jessie)" -DISTRIB_RELEASE=7.0 +DISTRIB_ID=Devuan +DISTRIB_DESCRIPTION="Devuan GNU/Linux 1.0 (jessie)" +DISTRIB_RELEASE=1.0 DISTRIB_CODENAME=jessie -- Chris Lawrence , Wed Sep 21 20:40:25 2005 diff -Nru lsb-4.1+Debian13+nmu1/debian/README.Debian lsb-4.1+devuan2/debian/README.Debian --- lsb-4.1+Debian13+nmu1/debian/README.Debian 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/README.Debian 2015-05-24 04:35:11.000000000 +0000 @@ -1,28 +1,28 @@ -lsb for Debian +lsb for Devuan -------------- -This package provides the Linux Standard Base on Debian systems. The +This package provides the Linux Standard Base on Devuan systems. The LSB is a specification for allowing the same binary package to be used on multiple distributions. INSTALLING LSB PACKAGES -The "alien" package supports LSB packages on Debian. For example, to +The "alien" package supports LSB packages on Devuan. For example, to install an LSB package "lsb-mozilla-1.2-1_i386.rpm", type (as root): alien -i lsb-mozilla-1.2-1_i386.rpm -Ideally, the package should be converted to a Debian package and then +Ideally, the package should be converted to a Devuan package and then installed by dpkg. If this fails, there may be a problem with either the lsb package (most likely) or alien (less likely), and you should contact the vendor of the lsb package to resolve the problem. PACKAGE LAYOUT -The LSB implementation in Debian is currently divided into eight +The LSB implementation in Devuan is currently divided into eight packages: -* The "lsb-core" package depends on the Debian packages that are +* The "lsb-core" package depends on the Devuan packages that are required to comply with the LSB-Core 4.1 specification. It also includes some subroutines that are used by LSB-compliant applications when they are being installed or removed. @@ -48,8 +48,8 @@ * The "lsb-base" package includes a number of functions used by init.d scripts in some LSB packages. - For documentation of those functions (and those added for Debian's use), - please see the README.Debian file in that package. + For documentation of those functions (and those added for Devuan's use), + please see the README.Devuan file in that package. * The "lsb-release" package includes the lsb_release command, which provides information about the installed LSB modules and the underlying distribution. @@ -64,8 +64,8 @@ This package attempts to implement the core LSB specification. Much of the implementation is drawn on a talk by Wichert Akkerman (http://www.liacs.nl/~wichert/talks/LSBDistro/html/) and Matt -Taggart's discussion of LSB 1.0 and Debian. Matt has also produced a -slideshow on LSB in Debian, which can be found at: +Taggart's discussion of LSB 1.0 and Devuan. Matt has also produced a +slideshow on LSB in Devuan, which can be found at: http://people.debian.org/~taggart/debconf2/ This package implements the LSB specification by: @@ -81,22 +81,22 @@ provided here. The intent of this package is to provide a best current practice way -of installing LSB packages on Debian using the Intel and PowerPC +of installing LSB packages on Devuan using the Intel and PowerPC 32-bit architectures with the Linux kernel ("ia32" and "ppc32"). Its -presence does not imply that I or the Debian project believe that -Debian fully complies with the Linux Standard Base, and should not be -construed as a statement that Debian is LSB-compliant. +presence does not imply that I or the Devuan project believe that +Devuan fully complies with the Linux Standard Base, and should not be +construed as a statement that Devuan is LSB-compliant. The specification is available at http://www.linuxbase.org/spec/ DEVIATIONS FROM LSB -The package and its dependencies implement all of LSB on Debian, with +The package and its dependencies implement all of LSB on Devuan, with these exceptions: - LSB 3.2 doesn't fully specify what the init_functions should do. I have chosen to implement them in a way that is consistent with - Debian current practice, using the start-stop-daemon utility and the + Devuan current practice, using the start-stop-daemon utility and the echo command. For sarge+1, I expect a nicer init logging facility that could be used. @@ -105,7 +105,7 @@ should create the pid file, therefore I assume the binary will produce its own /var/run/basename.pid file. -- Debian only implements certain features of adduser if shadow +- Devuan only implements certain features of adduser if shadow passwords are enabled. The lsb package will prompt the user to enable shadow passwords if they appear to be disabled; however, it does not force this choice on the administrator. Administrators who @@ -126,27 +126,27 @@ (This may be a deficiency in the spec. However, we comply as-written.) - The LSB specifies that cron scripts can be placed in cron.daily and - other directories; however, Debian's run-parts appears to ignore + other directories; however, Devuan's run-parts appears to ignore these scripts if they contain a dot in their names. (See #118646) You can work around this problem by editing /etc/crontab and specifying the --lsbsysinit option; it is hoped that eventually - Debian will include this option by default. + Devuan will include this option by default. (This is a known deficiency in debianutils, and is required for backwards compatibility with expected behavior on earlier systems.) - /etc/profile.d scripts aren't executed on shell startup by default - on Debian systems (see Debian Policy section 9.9 for an explanation). + on Devuan systems (see Devuan Policy section 9.9 for an explanation). LSB 3.2 is ambiguous on this requirement; /bin/sh is *not* required to execute these scripts, according to its description, but the lsbinstall documentation says that it is. - Debian policy forbids the use of /etc/profile.d by Debian packages, + Devuan policy forbids the use of /etc/profile.d by Devuan packages, so it is unlikely this will change (as it might be seen as - encouragement for Debian developers to do use it.) + encouragement for Devuan developers to do use it.) There may be other deviations from the spec; they are bugs in this -package and should be reported as such using Debian's bug tracking +package and should be reported as such using Devuan's bug tracking system: see reportbug(1) or your favorite bug reporting tool. (The aforementioned deviations are generally bugs in the package that cannot be easily fixed, or are bugs in the specification itself that @@ -159,7 +159,7 @@ DESIGN DECISIONS -- I implemented the LSB init dependencies based on Debian policy's +- I implemented the LSB init dependencies based on Devuan policy's update-rc.d support. A registry of package-provided facilities and their start and stop priorities is retained in /var/lib/lsb/facilities. Priorities are assigned to the system diff -Nru lsb-4.1+Debian13+nmu1/debian/rules lsb-4.1+devuan2/debian/rules --- lsb-4.1+Debian13+nmu1/debian/rules 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/debian/rules 2015-05-24 04:35:11.000000000 +0000 @@ -14,7 +14,7 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -# Map Debian architectures to LSB architectures +# Map Devuan architectures to LSB architectures lsbarch=${DEB_HOST_ARCH} ifeq (${lsbarch}, i386) lsbarch=ia32 diff -Nru lsb-4.1+Debian13+nmu1/lsb_release.py lsb-4.1+devuan2/lsb_release.py --- lsb-4.1+Debian13+nmu1/lsb_release.py 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/lsb_release.py 2015-05-24 04:35:11.000000000 +0000 @@ -30,19 +30,20 @@ # This should really be included in apt-cache policy output... it is already # in the Release file... RELEASE_CODENAME_LOOKUP = { - '1.1' : 'buzz', - '1.2' : 'rex', - '1.3' : 'bo', - '2.0' : 'hamm', - '2.1' : 'slink', - '2.2' : 'potato', - '3.0' : 'woody', - '3.1' : 'sarge', - '4.0' : 'etch', - '5.0' : 'lenny', - '6.0' : 'squeeze', - '7' : 'wheezy', - '8' : 'jessie', + '1' : 'jessie', + '2' : 'ascii', + # '1.2' : 'rex', + # '1.3' : 'bo', + # '2.0' : 'hamm', + # '2.1' : 'slink', + # '2.2' : 'potato', + # '3.0' : 'woody', + # '3.1' : 'sarge', + # '4.0' : 'etch', + # '5.0' : 'lenny', + # '6.0' : 'squeeze', + # '7' : 'wheezy', + # '8' : 'jessie', } TESTING_CODENAME = 'unknown.new.testing' @@ -50,17 +51,17 @@ RELEASES_ORDER = list(RELEASE_CODENAME_LOOKUP.items()) RELEASES_ORDER.sort() RELEASES_ORDER = list(list(zip(*RELEASES_ORDER))[1]) -RELEASES_ORDER.extend(['stable', 'testing', 'unstable', 'sid']) +RELEASES_ORDER.extend(['stable', 'testing', 'unstable', 'ceres']) def lookup_codename(release, unknown=None): m = re.match(r'(\d+)\.(\d+)(r(\d+))?', release) if not m: return unknown - if int(m.group(1)) < 7: - shortrelease = '%s.%s' % m.group(1,2) - else: - shortrelease = '%s' % m.group(1) + # if int(m.group(1)) < 7: + # shortrelease = '%s.%s' % m.group(1,2) + # else: + shortrelease = '%s' % m.group(1) return RELEASE_CODENAME_LOOKUP.get(shortrelease, unknown) # LSB compliance packages... may grow eventually @@ -127,7 +128,7 @@ import sets set = sets.Set -# This is Debian-specific at present +# This is Devuan-specific at present def check_modules_installed(): # Find which LSB modules are installed on this system C_env = os.environ.copy(); C_env['LC_ALL'] = 'C' @@ -145,7 +146,7 @@ if not line: break version, provides = line.split(' ', 1) - # Debian package versions can be 3.2-$REV, 3.2+$REV or 3.2~$REV. + # Devuan package versions can be 3.2-$REV, 3.2+$REV or 3.2~$REV. version = re.split('[-+~]', version, 1)[0] for pkg in provides.split(','): mob = modnamere.search(pkg) @@ -222,10 +223,10 @@ return data -def guess_release_from_apt(origin='Debian', component='main', +def guess_release_from_apt(origin='Devuan', component='main', ignoresuites=('experimental'), - label='Debian', - alternate_olabels={'Debian Ports':'ftp.debian-ports.org'}): + label='Devuan', + alternate_olabels={'Devuan Ports':'packages.devuan.org'}): releases = parse_apt_policy() if not releases: @@ -254,10 +255,10 @@ return releases[0][1] -def guess_debian_release(): +def guess_devuan_release(): distinfo = {} - distinfo['ID'] = 'Debian' + distinfo['ID'] = 'Devuan' # Use /etc/dpkg/origins/default to fetch the distribution name etc_dpkg_origins_default = os.environ.get('LSB_ETC_DPKG_ORIGINS_DEFAULT','/etc/dpkg/origins/default') if os.path.exists(etc_dpkg_origins_default): @@ -287,31 +288,31 @@ distinfo['DESCRIPTION'] = '%(ID)s %(OS)s' % distinfo - etc_debian_version = os.environ.get('LSB_ETC_DEBIAN_VERSION','/etc/debian_version') - if os.path.exists(etc_debian_version): + etc_devuan_version = os.environ.get('LSB_ETC_DEVUAN_VERSION','/etc/devuan_version') + if os.path.exists(etc_devuan_version): try: - with open(etc_debian_version) as debian_version: - release = debian_version.read().strip() + with open(etc_devuan_version) as devuan_version: + release = devuan_version.read().strip() except IOError as msg: - print('Unable to open ' + etc_debian_version + ':', str(msg), file=sys.stderr) + print('Unable to open ' + etc_devuan_version + ':', str(msg), file=sys.stderr) release = 'unknown' if not release[0:1].isalpha(): - # /etc/debian_version should be numeric + # /etc/devuan_version should be numeric codename = lookup_codename(release, 'n/a') distinfo.update({ 'RELEASE' : release, 'CODENAME' : codename }) - elif release.endswith('/sid'): - if release.rstrip('/sid').lower().isalpha() != 'testing': + elif release.endswith('/ceres'): + if release.rstrip('/ceres').lower().isalpha() != 'testing': global TESTING_CODENAME - TESTING_CODENAME = release.rstrip('/sid') + TESTING_CODENAME = release.rstrip('/ceres') distinfo['RELEASE'] = 'testing/unstable' else: distinfo['RELEASE'] = release # Only use apt information if we did not get the proper information - # from /etc/debian_version or if we don't have a codename - # (which will happen if /etc/debian_version does not contain a - # number but some text like 'testing/unstable' or 'lenny/sid') + # from /etc/devuan_version or if we don't have a codename + # (which will happen if /etc/devuan_version does not contain a + # number but some text like 'testing/unstable' or 'ascii/ceres') # # This is slightly faster and less error prone in case the user # has an entry in his /etc/apt/sources.list but has not actually @@ -321,11 +322,6 @@ if rinfo: release = rinfo.get('version') - # Special case Debian-Ports as their Release file has 'version': '1.0' - if release == '1.0' and rinfo.get('origin') == 'Debian Ports' and rinfo.get('label') == 'ftp.debian-ports.org': - release = None - rinfo.update({'suite': 'unstable'}) - if release: codename = lookup_codename(release, 'n/a') else: @@ -334,7 +330,7 @@ # Would be nice if I didn't have to hardcode this. codename = TESTING_CODENAME else: - codename = 'sid' + codename = 'ceres' distinfo.update({ 'RELEASE' : release, 'CODENAME' : codename }) if distinfo.get('RELEASE'): @@ -372,10 +368,10 @@ def get_distro_information(): lsbinfo = get_lsb_information() - # OS is only used inside guess_debian_release anyway + # OS is only used inside guess_devuan_release anyway for key in ('ID', 'RELEASE', 'CODENAME', 'DESCRIPTION',): if key not in lsbinfo: - distinfo = guess_debian_release() + distinfo = guess_devuan_release() distinfo.update(lsbinfo) return distinfo else: diff -Nru lsb-4.1+Debian13+nmu1/test/apt-cache lsb-4.1+devuan2/test/apt-cache --- lsb-4.1+Debian13+nmu1/test/apt-cache 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/test/apt-cache 2015-05-24 04:35:11.000000000 +0000 @@ -17,22 +17,22 @@ print(" release a=now") if os.environ.get('TEST_APT_CACHE1') == '932': - print(' 932 http://Mirror_is_not_read/folder-either-debian/ sid/main arch Packages') + print(' 932 http://Mirror_is_not_read/folder-either-debian/ ceres/main arch Packages') print(' release o=oRigIn,a=SuiTe,n=codename-not-read,l=lABel,c=C0mp0nent') print(' origin Mirror-is-not-read') if os.environ.get('TEST_APT_CACHE2') == '600': - print('600 http://MirRor_is_not_read/folder-either-debian/ sid/main arch Packages') + print('600 http://MirRor_is_not_read/folder-either-debian/ ceres/main arch Packages') print(' release o=0RigIn,a=5uiTe,n=codename-not-read,l=1ABel,c=C03p0nent') print(' origin MirRor-is-not-read') if os.environ.get('TEST_APT_CACHE3') == '754': - print(' 754 http://MirRor_is_not_read/folder-either-debian/ sid/main arch Packages') + print(' 754 http://MirRor_is_not_read/folder-either-debian/ ceres/main arch Packages') print(' release o=Jérôme Helvète,a=5uiTe,n=codename-not-read,l=1ABel,c=C03p0nent') print(' origin MirRor-is-not-read') if os.environ.get('TEST_APT_CACHE_RELEASE') == '512': - print(' 512 http://MirRor_is_not_read/folder-either-debian/ sid/main arch Packages') + print(' 512 http://MirRor_is_not_read/folder-either-debian/ ceres/main arch Packages') print(' release o=or1g1n,a=testing,n=codename-not-read,l=l8bel,c=c0mp0nent') print(' origin MirRor-is-not-read') # Add an experimental to be ignored, with a bigger priority. @@ -41,17 +41,17 @@ print(' origin MirRor-is-not-read') # Add an release from foreign repository, to be considered too. print(' 512 http://MirRor_is_not_read/folder-either-debian/ exp/main arch Packages') - print(' release o=P-or1g1n,a=sid,n=codename-not-read,l=P-l8bel,c=OtherComp') + print(' release o=P-or1g1n,a=ceres,n=codename-not-read,l=P-l8bel,c=OtherComp') print(' origin MirRor-is-not-read') if os.environ.get('TEST_APT_CACHE_UNSTABLE') == '500': - print(' 500 http://MirRor_is_not_read/folder-either-debian/ sid/main arch Packages') - print(' release o=Debian,a=unstable,n=sid,l=Debian,c=main') + print(' 500 http://MirRor_is_not_read/folder-either-debian/ ceres/main arch Packages') + print(' release o=Devuan,a=unstable,n=ceres,l=Devuan,c=main') print(' origin MirRor-is-not-read') if os.environ.get('TEST_APT_CACHE_UNSTABLE_PORTS') == '500': - print(' 500 http://MirRor_is_not_read/folder-either-debian-ports/ sid/main arch Packages') - print(' release o=Debian Ports,a=unstable,n=sid,l=ftp.debian-ports.org,c=main,v=1.0') + print(' 500 http://MirRor_is_not_read/folder-either-debian-ports/ ceres/main arch Packages') + print(' release o=Devuan Ports,a=unstable,n=ceres,l=packages.devuan.org,c=main,v=1.0') print(' origin MirRor-is-not-read') print('Pinned packages:') diff -Nru lsb-4.1+Debian13+nmu1/test/test_lsb_release.py lsb-4.1+devuan2/test/test_lsb_release.py --- lsb-4.1+Debian13+nmu1/test/test_lsb_release.py 2014-10-20 09:43:22.000000000 +0000 +++ lsb-4.1+devuan2/test/test_lsb_release.py 2015-05-24 04:35:11.000000000 +0000 @@ -18,8 +18,8 @@ return ''.join( [random.choice(string.ascii_letters) for i in range(random.randint(min_l,max_l))]) def get_arch_distinfo(): - # Copied verbatim from guess_debian_release; sucks but unavoidable. - distinfo = {'ID' : 'Debian'} + # Copied verbatim from guess_devuan_release; sucks but unavoidable. + distinfo = {'ID' : 'Devuan'} kern = os.uname()[0] if kern in ('Linux', 'Hurd', 'NetBSD'): distinfo['OS'] = 'GNU/'+kern @@ -41,7 +41,7 @@ # Test that 1.1, 1.1r0 and 1.1.8 lead to buzz. Default is picked randomly and is not supposed to go trough badDefault = rnd_string(0,9) # From Wheezy on, the codename is defined by the first number but a dot-revision is mandatory - if float(rno) >= 7: + if float(rno) >= 1: rno = rno + '.' + str(random.randint(0,9)) self.assertEqual(lr.lookup_codename(rno,badDefault),cdn,'Release name `' + rno + '` is not recognized.') self.assertEqual(lr.lookup_codename(rno + 'r' + str(random.randint(0,9)),badDefault),cdn,'Release name `' + rno + 'r*` is not recognized.') @@ -204,7 +204,7 @@ supposed_output) # Test with a special repository (for Ports) - supposed_output = {'origin': 'P-or1g1n', 'suite': 'sid', 'component': 'OtherComp', 'label': 'P-l8bel'} + supposed_output = {'origin': 'P-or1g1n', 'suite': 'ceres', 'component': 'OtherComp', 'label': 'P-l8bel'} self.assertEqual( lr.guess_release_from_apt( origin='or1g1n', @@ -218,10 +218,10 @@ os.environ.pop('TEST_APT_CACHE3') os.environ.pop('TEST_APT_CACHE_RELEASE') - def test_guess_debian_release(self): + def test_guess_devuan_release(self): distinfo = get_arch_distinfo() - # Test different dpkg origin with an fake "unstable releases" that ends in /sid, and an invalid apt-cache policy + # Test different dpkg origin with an fake "unstable releases" that ends in /ceres, and an invalid apt-cache policy distinfo['ID'] = rnd_string(5,12) fn = 'test/dpkg_origins_default_' + rnd_string(5,5) f = open(fn,'w') @@ -231,18 +231,18 @@ distinfo['RELEASE'] = 'testing/unstable' distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s' % distinfo - fn2 = 'test/debian_version_' + rnd_string(5,12) + fn2 = 'test/devuan_version_' + rnd_string(5,12) f = open(fn2,'w') - f.write(rnd_string(5,12) + '/sid') + f.write(rnd_string(5,12) + '/ceres') f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn2 - self.assertEqual(lr.guess_debian_release(),distinfo) + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn2 + self.assertEqual(lr.guess_devuan_release(),distinfo) os.remove(fn) # Make sure no existing /etc/dpkg/origins/default is used os.environ['LSB_ETC_DPKG_ORIGINS_DEFAULT'] = '/non-existant' - distinfo['ID'] = 'Debian' + distinfo['ID'] = 'Devuan' - # Test "stable releases" with numeric debian_versions + # Test "stable releases" with numeric devuan_versions for rno in lr.RELEASE_CODENAME_LOOKUP: # From Wheezy on, the codename is defined by the first number but a dot-revision is mandatory if float(rno) >= 7: @@ -251,72 +251,72 @@ distinfo['RELEASE'] = rno + random.choice('.r') + str(random.randint(0,9)) distinfo['CODENAME'] = lr.RELEASE_CODENAME_LOOKUP[rno] distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s (%(CODENAME)s)' % distinfo - fn = 'test/debian_version_' + rnd_string(5,5) + fn = 'test/devuan_version_' + rnd_string(5,5) f = open(fn,'w') f.write(distinfo['RELEASE']) f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn - self.assertEqual(lr.guess_debian_release(),distinfo) + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn + self.assertEqual(lr.guess_devuan_release(),distinfo) os.remove(fn) - os.environ.pop('LSB_ETC_DEBIAN_VERSION') + os.environ.pop('LSB_ETC_DEVUAN_VERSION') # Remove the CODENAME from the supposed output distinfo.pop('CODENAME') - # Test "stable releases" with string debian_versions, go read invalid apt-cache policy + # Test "stable releases" with string devuan_versions, go read invalid apt-cache policy for rno in lr.RELEASE_CODENAME_LOOKUP: distinfo['RELEASE'] = lr.RELEASE_CODENAME_LOOKUP[rno] distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s' % distinfo - fn = 'test/debian_version_' + rnd_string(5,12) + fn = 'test/devuan_version_' + rnd_string(5,12) f = open(fn,'w') f.write(distinfo['RELEASE']) f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn - self.assertEqual(lr.guess_debian_release(),distinfo) + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn + self.assertEqual(lr.guess_devuan_release(),distinfo) os.remove(fn) - os.environ.pop('LSB_ETC_DEBIAN_VERSION') + os.environ.pop('LSB_ETC_DEVUAN_VERSION') - # Test "unstable releases" that end in /sid, go read invalid apt-cache policy + # Test "unstable releases" that end in /ceres, go read invalid apt-cache policy distinfo['RELEASE'] = 'testing/unstable' distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s' % distinfo for rno in lr.RELEASE_CODENAME_LOOKUP: - fn = 'test/debian_version_' + rnd_string(5,12) + fn = 'test/devuan_version_' + rnd_string(5,12) f = open(fn,'w') - f.write(lr.RELEASE_CODENAME_LOOKUP[rno] + '/sid') + f.write(lr.RELEASE_CODENAME_LOOKUP[rno] + '/ceres') f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn - self.assertEqual(lr.guess_debian_release(),distinfo) + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn + self.assertEqual(lr.guess_devuan_release(),distinfo) os.remove(fn) - os.environ.pop('LSB_ETC_DEBIAN_VERSION') + os.environ.pop('LSB_ETC_DEVUAN_VERSION') - # Test "unstable releases" that end in /sid, go read valid apt-cache policy + # Test "unstable releases" that end in /ceres, go read valid apt-cache policy os.environ['TEST_APT_CACHE_UNSTABLE'] = '500' - distinfo['CODENAME'] = 'sid' + distinfo['CODENAME'] = 'ceres' distinfo['RELEASE'] = 'unstable' distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s (%(CODENAME)s)' % distinfo for rno in lr.RELEASE_CODENAME_LOOKUP: - fn = 'test/debian_version_' + rnd_string(5,12) + fn = 'test/devuan_version_' + rnd_string(5,12) f = open(fn,'w') - f.write(lr.RELEASE_CODENAME_LOOKUP[rno] + '/sid') + f.write(lr.RELEASE_CODENAME_LOOKUP[rno] + '/ceres') f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn - self.assertEqual(lr.guess_debian_release(),distinfo) + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn + self.assertEqual(lr.guess_devuan_release(),distinfo) os.remove(fn) - os.environ.pop('LSB_ETC_DEBIAN_VERSION') + os.environ.pop('LSB_ETC_DEVUAN_VERSION') - # Test "unstable releases with Debian Ports" that end in /sid, go read valid apt-cache policy + # Test "unstable releases with Debian Ports" that end in /ceres, go read valid apt-cache policy os.environ['TEST_APT_CACHE_UNSTABLE_PORTS'] = '500' - distinfo['CODENAME'] = 'sid' + distinfo['CODENAME'] = 'ceres' distinfo['RELEASE'] = 'unstable' distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s (%(CODENAME)s)' % distinfo for rno in lr.RELEASE_CODENAME_LOOKUP: - fn = 'test/debian_version_' + rnd_string(5,12) + fn = 'test/devuan_version_' + rnd_string(5,12) f = open(fn,'w') - f.write(lr.RELEASE_CODENAME_LOOKUP[rno] + '/sid') + f.write(lr.RELEASE_CODENAME_LOOKUP[rno] + '/ceres') f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn - self.assertEqual(lr.guess_debian_release(),distinfo) + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn + self.assertEqual(lr.guess_devuan_release(),distinfo) os.remove(fn) - os.environ.pop('LSB_ETC_DEBIAN_VERSION') + os.environ.pop('LSB_ETC_DEVUAN_VERSION') os.environ.pop('TEST_APT_CACHE_UNSTABLE_PORTS') os.environ.pop('TEST_APT_CACHE_UNSTABLE') @@ -341,16 +341,16 @@ supposed_output['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s' % supposed_output os.environ['LSB_ETC_LSB_RELEASE'] = 'test/inexistant_file_' + rnd_string(2,5) - fn = 'test/debian_version_' + rnd_string(5,12) + fn = 'test/devuan_version_' + rnd_string(5,12) f = open(fn,'w') - f.write('testing/sid') + f.write('testing/ceres') f.close() - os.environ['LSB_ETC_DEBIAN_VERSION'] = fn + os.environ['LSB_ETC_DEVUAN_VERSION'] = fn os.environ['LSB_ETC_DPKG_ORIGINS_DEFAULT'] = '' self.assertEqual(lr.get_distro_information(),supposed_output) os.remove(fn) os.environ.pop('LSB_ETC_DPKG_ORIGINS_DEFAULT') - os.environ.pop('LSB_ETC_DEBIAN_VERSION') + os.environ.pop('LSB_ETC_DEVUAN_VERSION') if __name__ == '__main__': unittest.main()