Your message dated Thu, 31 Jan 2013 08:47:59 +0000
with message-id <[email protected]>
and subject line Bug#698956: fixed in lxc 0.9.0~alpha2-7
has caused the Debian Bug report #698956,
regarding colored output in lxc-checkconfig does not work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
698956: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698956
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lxc
Version: 0.9.0~alpha2-5
Severity: minor
Tags: patch

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

Hi,

I don't know why but the colored output in lxc-checkconfig did not work for
me. Instead I saw the raw escape sequences outputed in my terminal like
\e[0;39m

I had a look in lsb-base how they do text coloring and made a patch.

Regards, Thomas Koch

- -- System Information:
Debian Release: 7.0
  APT prefers experimental
  APT policy: (500, 'experimental'), (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lxc depends on:
ii  debconf [debconf-2.0]  1.5.49
ii  libapparmor1           2.7.103-4
ii  libc6                  2.13-38
ii  libcap2                1:2.22-1.2
ii  multiarch-support      2.13-38

Versions of packages lxc recommends:
ii  debootstrap  1.0.46
ii  libcap2-bin  1:2.22-1.2

Versions of packages lxc suggests:
pn  live-debconfig-doc  <none>
ii  rsync               3.0.9-4

- -- debconf information excluded

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

iQIcBAEBCAAGBQJRAr3TAAoJEAf8SJEEK6ZaNnkQAJ9bbzbZLmOCaSa0l/KZCszv
AsI3e/a0Nx0deXHf4Bu8oaP/i/NNtPMkvbnKP6DmsUTgz2DArpNCwiZK5kfH1Ivb
AIfvVsMwKVEf2a1wkpisKHJj7sPVw+SK2xBixMVsTp0z2xEYYLPDBCRMES7rkqIj
RQade0Zs/2NaDqlsZbRgry1u942lwzUM6d7yUNUGlP4wpKOWFDOHyZ9uE1EhsKc3
RQ5J7WoMPdeZHzCMGl9fwMcI9FLlauhJ5s0LJPmH5x5MHTfck/qTkAMsYcrd9f47
KQAs6SE/NpM5TGHBPq1Lj9B/IPotIDQmSAeXCNcNF9YfJxed1n8YLlta2prkRZmF
rypZm1w9IuzGmVzJbIXsXsa25zx9LW48w972hmBpsgRc0H9/4LGur8cioAyhNxmt
iAJ3+dxyj1w42RyfDoTjk5JLy1xU/4gq3/9lXYsC6hzPlx87MBxYLEySQJA41dxb
G4prywYh+r/M7ar72yteHU+Mj0vfr3hPiqchgSRJXu5UNhC6lN0iRvM1LKdDHNmZ
oLj3XnUB4qjv90+NFFwoTQ63mLQ0YurT9cJP0d5XX6fE3/F+14FgDqA/4rPKDkYP
pHu3xrJ252+8NOsx6ZnBbYymVERoQmbOF2DlTq2ek7XAwK52aBQ2a5O1pgPwNhVX
MSwxO4ZitshKwid24nyG
=+xW0
-----END PGP SIGNATURE-----
--- /usr/bin/lxc-checkconfig	2013-01-24 20:27:07.000000000 +0100
+++ lxc-checkconfig	2013-01-25 18:09:27.969415765 +0100
@@ -1,13 +1,21 @@
 #!/bin/sh
 
+. /lib/lsb/init-functions
+
 # Allow environment variables to override grep and config
 : ${CONFIG:=/proc/config.gz}
 : ${GREP:=zgrep}
 
-SETCOLOR_SUCCESS="printf \\e[1;32m"
-SETCOLOR_FAILURE="printf \\e[1;31m"
-SETCOLOR_WARNING="printf \\e[1;33m"
-SETCOLOR_NORMAL="printf \\e[0;39m"
+if log_use_fancy_output; then
+    RED=$( $TPUT setaf 1)
+    GREEN=$( $TPUT setaf 2)
+    YELLOW=$( $TPUT setaf 3)
+    NORMAL=$( $TPUT op)
+fi
+
+ENABLED="${GREEN}enabled${NORMAL}"
+REQUIRED="${RED}required${NORMAL}"
+MISSING="${YELLOW}missing${NORMAL}"
 
 is_set() {
     $GREP -q "$1=[y|m]" $CONFIG
@@ -21,12 +29,12 @@
     RES=$?
 
     if [ $RES -eq 0 ]; then
-        $SETCOLOR_SUCCESS && echo "enabled" && $SETCOLOR_NORMAL
+        echo ${ENABLED}
     else
         if [ ! -z "$mandatory" -a "$mandatory" = yes ]; then
-            $SETCOLOR_FAILURE && echo "required" && $SETCOLOR_NORMAL
+            echo "${REQUIRED}"
         else
-            $SETCOLOR_WARNING && echo "missing" && $SETCOLOR_NORMAL
+            echo "${MISSING}"
         fi
     fi
 }
@@ -82,7 +90,7 @@
 
 if [ -f $CGROUP_MNT_PATH/cgroup.clone_children ]; then
     echo -n "Cgroup clone_children flag: " &&
-    $SETCOLOR_SUCCESS && echo "enabled" && $SETCOLOR_NORMAL
+    echo "${ENABLED}"
 else
     echo -n "Cgroup namespace: " && is_enabled CONFIG_CGROUP_NS yes
 fi
@@ -105,8 +113,8 @@
     ( [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ] && \
        is_enabled CONFIG_SECURITY_FILE_CAPABILITIES ) || \
     ( ( [ "${KVER_MAJOR}" = "2" ] && [ ${KVER_MINOR} -gt 32 ] ) || \
-         [ ${KVER_MAJOR} -gt 2 ] && $SETCOLOR_SUCCESS && \
-         echo "enabled" && $SETCOLOR_NORMAL )
+         [ ${KVER_MAJOR} -gt 2 ] && \
+         echo "${ENABLED}" )
 
 echo
 echo "Note : Before booting a new kernel, you can check its configuration"

--- End Message ---
--- Begin Message ---
Source: lxc
Source-Version: 0.9.0~alpha2-7

We believe that the bug you reported is fixed in the latest version of
lxc, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <[email protected]> (supplier of updated 
lxc 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 31 Jan 2013 09:08:47 +0100
Source: lxc
Binary: lxc lxc-dbg lxc-dev
Architecture: source i386
Version: 0.9.0~alpha2-7
Distribution: unstable
Urgency: low
Maintainer: Daniel Baumann <[email protected]>
Changed-By: Daniel Baumann <[email protected]>
Description: 
 lxc        - Linux Containers userspace tools
 lxc-dbg    - Linux Containers userspace tools (debug)
 lxc-dev    - Linux Containers userspace tools (development)
Closes: 698956
Changes: 
 lxc (0.9.0~alpha2-7) unstable; urgency=low
 .
   * Updating example preseeding files for live-debconfig 4.0~a17-1.
   * Using variable for sysfs mount options for consistency.
   * Creating mountpoint for automatically detected shared directories.
   * Also removing archive-key signatures after importing them.
   * Setting bash shebang until we'll get a fixed lxc-checkconfig for dash
     in the next upstream release (Closes: #698956).
   * Using 4 digit prefixes for patches.
   * Tightening diff headers in patches.
   * Adding dpkg-source local-options.
   * Executing late-command and late-host-command indirectly to preserve
     amps and other things.
   * Updating todo file.
Checksums-Sha1: 
 5508a8ddbe385b8417e3a7ae392bd13177c24f97 1294 lxc_0.9.0~alpha2-7.dsc
 4058c75c24749f34e1edb9fbd543170cb10e8dbd 41344 lxc_0.9.0~alpha2-7.debian.tar.xz
 462ea3784dcc20bafa361d760df1a05c44cfef71 199072 lxc_0.9.0~alpha2-7_i386.deb
 7637b9b733aacd21659dff7b550055c198735839 316942 lxc-dbg_0.9.0~alpha2-7_i386.deb
 b0c4b54b49add60d762f82c6f9ab0df6ef14a817 25316 lxc-dev_0.9.0~alpha2-7_i386.deb
Checksums-Sha256: 
 204e78b77db25316cac1a71f91a21ffa56dc36b7a907f13c68830415015d53fa 1294 
lxc_0.9.0~alpha2-7.dsc
 687828c7ac31dcf3fc798e40fa297232abf07d703cd82988f60ddf13ef9b51de 41344 
lxc_0.9.0~alpha2-7.debian.tar.xz
 3b71223f44c3434662eb7ec17ca086281e172be279663ca2061fbbe0665209cd 199072 
lxc_0.9.0~alpha2-7_i386.deb
 334e103364433b6440b710ffebc0444c0e60bb1d326f93a52c2f934bdebbcadc 316942 
lxc-dbg_0.9.0~alpha2-7_i386.deb
 1e6ba8240f6f22ca29dfe32f71e81f4192f1a7062ebc8c95fa29961cc36e1df9 25316 
lxc-dev_0.9.0~alpha2-7_i386.deb
Files: 
 8702d12bee3c019231f34a2a6b13e6c6 1294 admin optional lxc_0.9.0~alpha2-7.dsc
 e6fcb3988ea1dc8e5d9a556e05c138f5 41344 admin optional 
lxc_0.9.0~alpha2-7.debian.tar.xz
 3ef0675339986f7fdb23e838729f998a 199072 admin optional 
lxc_0.9.0~alpha2-7_i386.deb
 304b2393349f6ce82d8550f9178d8ea6 316942 debug extra 
lxc-dbg_0.9.0~alpha2-7_i386.deb
 abd714e2e3dcb2a26fd7516474d85bd8 25316 libdevel optional 
lxc-dev_0.9.0~alpha2-7_i386.deb

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

iEYEARECAAYFAlEKJ3wACgkQ+C5cwEsrK56yLgCdGfxfj5+6i0NSu+FlHzWFNd/h
N8cAoN5urnbV8do6sFNNYU+O4dmQw96d
=OIY/
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to