Debian Bug report logs - #630089
support build logs with timestamps

version graph

Package: live-build; Maintainer for live-build is Live Systems Maintainers <debian-live@lists.debian.org>; Source for live-build is src:live-build.

Reported by: Colin Watson <cjwatson@ubuntu.com>

Date: Fri, 10 Jun 2011 17:30:02 UTC

Severity: wishlist

Found in version live-build/3.0~a18-1

Fixed in version live-build/3.0~a42-1

Done: Daniel Baumann <daniel@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 Live Project <debian-live@lists.debian.org>:
Bug#630089; Package live-build. (Fri, 10 Jun 2011 17:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Fri, 10 Jun 2011 17:30:05 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson@ubuntu.com>
To: submit@bugs.debian.org
Subject: timestamped build logs?
Date: Fri, 10 Jun 2011 18:27:00 +0100
Package: live-build
Version: 3.0~a18-1
Severity: wishlist
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu oneiric

It might be nice to have timestamped build logs.  That would make it
easy to see which parts of a build were taking a long time and thus work
out targets for optimisation.  We did this in livecd-rootfs a while back
and it was quite helpful.

For example, perhaps the lb wrapper script could (be configured to)
print the current time before starting a command?

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#630089; Package live-build. (Sat, 11 Jun 2011 11:42:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel.baumann@progress-technologies.net:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Sat, 11 Jun 2011 11:42:08 GMT) Full text and rfc822 format available.

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

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: Colin Watson <cjwatson@ubuntu.com>
Cc: 630089@bugs.debian.org
Subject: Re: Bug#630089: timestamped build logs?
Date: Sat, 11 Jun 2011 13:39:44 +0200
On 06/10/2011 07:27 PM, Colin Watson wrote:
> For example, perhaps the lb wrapper script could (be configured to)
> print the current time before starting a command?

patch welcome :)

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/




Changed Bug title to 'support build logs with timestamps' from 'timestamped build logs?' Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Mon, 13 Jun 2011 17:57:10 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#630089; Package live-build. (Thu, 12 Jan 2012 17:18:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 12 Jan 2012 17:18:06 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson@ubuntu.com>
To: Daniel Baumann <daniel.baumann@progress-technologies.net>
Cc: 630089@bugs.debian.org
Subject: Re: Bug#630089: timestamped build logs?
Date: Thu, 12 Jan 2012 17:14:04 +0000
On Sat, Jun 11, 2011 at 01:39:44PM +0200, Daniel Baumann wrote:
> On 06/10/2011 07:27 PM, Colin Watson wrote:
> >For example, perhaps the lb wrapper script could (be configured to)
> >print the current time before starting a command?
> 
> patch welcome :)

Sorry for the delay.  How about this?  You have to set _VERBOSE="true"
by hand since 'lb config' comments it out, but I think that's OK, and it
makes this patch about as minimally intrusive as I could manage.

diff --git a/scripts/build/lb b/scripts/build/lb
index 58c1d12..03b7b47 100755
--- a/scripts/build/lb
+++ b/scripts/build/lb
@@ -39,21 +39,26 @@ case "${1}" in
 		;;
 
 	*)
+		Read_conffiles config/common
+
 		COMMAND="lb_${1}"
 		shift
 
 		if [ -x "${LB_BASE}/scripts/build/${COMMAND}" ]
 		then
-			LB=1 exec "${LB_BASE}/scripts/build/${COMMAND}" "${@}"
+			SCRIPT="${LB_BASE}/scripts/build/${COMMAND}"
 		elif [ -x /usr/share/live/build/scripts/build/${COMMAND} ]
 		then
-			LB=1 exec /usr/share/live/build/scripts/build/"${COMMAND}" "${@}"
+			SCRIPT=/usr/share/live/build/scripts/build/"${COMMAND}"
 		elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
 		then
-			LB=1 exec "${COMMAND}" "${@}"
+			SCRIPT="${COMMAND}"
 		else
 			Echo_error "no such script"
 			exit 1
 		fi
+
+		Echo_verbose "%s: Running %s" "$(date -R)" "${COMMAND} ${@}"
+		LB=1 exec "${SCRIPT}" "${@}"
 		;;
 esac

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#630089; Package live-build. (Thu, 12 Jan 2012 18:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel.baumann@progress-technologies.net:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 12 Jan 2012 18:00:03 GMT) Full text and rfc822 format available.

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

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: Colin Watson <cjwatson@ubuntu.com>
Cc: 630089@bugs.debian.org
Subject: Re: Bug#630089: timestamped build logs?
Date: Thu, 12 Jan 2012 18:56:48 +0100
On 01/12/2012 06:14 PM, Colin Watson wrote:
> Sorry for the delay.

np.

> How about this?

very nice; except:

> Echo_verbose "%s: Running %s" "$(date -R)" "${COMMAND} ${@}"

this will produce rather longish-imho-not-eye-friendly messages in the
style of

  Thu, 12 Jan 2012 18:52:01 +0100 Running lb foo --verbose

i'd prefere something shorter, like:

  [2012-01-12 18:51:35] lb foo --verbose

maybe we could even use that by default, what do you think?

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#630089; Package live-build. (Thu, 12 Jan 2012 18:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 12 Jan 2012 18:39:03 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson@ubuntu.com>
To: Daniel Baumann <daniel.baumann@progress-technologies.net>
Cc: 630089@bugs.debian.org
Subject: Re: Bug#630089: timestamped build logs?
Date: Thu, 12 Jan 2012 18:36:59 +0000
On Thu, Jan 12, 2012 at 06:56:48PM +0100, Daniel Baumann wrote:
> On 01/12/2012 06:14 PM, Colin Watson wrote:
> > Echo_verbose "%s: Running %s" "$(date -R)" "${COMMAND} ${@}"
> 
> this will produce rather longish-imho-not-eye-friendly messages in the
> style of
> 
>   Thu, 12 Jan 2012 18:52:01 +0100 Running lb foo --verbose
> 
> i'd prefere something shorter, like:
> 
>   [2012-01-12 18:51:35] lb foo --verbose

Fair enough.

> maybe we could even use that by default, what do you think?

Oh, well that certainly simplifies things if you're happy with that, and
I expect I'd find that useful.  Updated patch follows.

diff --git a/scripts/build/lb b/scripts/build/lb
index 58c1d12..4bb76cb 100755
--- a/scripts/build/lb
+++ b/scripts/build/lb
@@ -44,16 +44,19 @@ case "${1}" in
 
 		if [ -x "${LB_BASE}/scripts/build/${COMMAND}" ]
 		then
-			LB=1 exec "${LB_BASE}/scripts/build/${COMMAND}" "${@}"
+			SCRIPT="${LB_BASE}/scripts/build/${COMMAND}"
 		elif [ -x /usr/share/live/build/scripts/build/${COMMAND} ]
 		then
-			LB=1 exec /usr/share/live/build/scripts/build/"${COMMAND}" "${@}"
+			SCRIPT=/usr/share/live/build/scripts/build/"${COMMAND}"
 		elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
 		then
-			LB=1 exec "${COMMAND}" "${@}"
+			SCRIPT="${COMMAND}"
 		else
 			Echo_error "no such script"
 			exit 1
 		fi
+
+		Echo "[%s] %s" "$(date +'%F %T')" "${COMMAND} ${*}"
+		LB=1 exec "${SCRIPT}" "${@}"
 		;;
 esac

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#630089; Package live-build. (Thu, 12 Jan 2012 20:12:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel.baumann@progress-technologies.net:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 12 Jan 2012 20:12:11 GMT) Full text and rfc822 format available.

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

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: Colin Watson <cjwatson@ubuntu.com>
Cc: 630089@bugs.debian.org
Subject: Re: Bug#630089: timestamped build logs?
Date: Thu, 12 Jan 2012 21:09:28 +0100
On 01/12/2012 07:36 PM, Colin Watson wrote:
> I expect I'd find that useful.  Updated patch follows.

applying (and uploading) later on, thanks, much appreciated.

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/




Reply sent to Daniel Baumann <daniel@debian.org>:
You have taken responsibility. (Sun, 15 Jan 2012 20:51:08 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <cjwatson@ubuntu.com>:
Bug acknowledged by developer. (Sun, 15 Jan 2012 20:51:09 GMT) Full text and rfc822 format available.

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

From: Daniel Baumann <daniel@debian.org>
To: 630089-close@bugs.debian.org
Subject: Bug#630089: fixed in live-build 3.0~a42-1
Date: Sun, 15 Jan 2012 20:49:39 +0000
Source: live-build
Source-Version: 3.0~a42-1

We believe that the bug you reported is fixed in the latest version of
live-build, which is due to be installed in the Debian FTP archive:

live-build-cgi_3.0~a42-1_all.deb
  to main/l/live-build/live-build-cgi_3.0~a42-1_all.deb
live-build-cron_3.0~a42-1_all.deb
  to main/l/live-build/live-build-cron_3.0~a42-1_all.deb
live-build_3.0~a42-1.debian.tar.gz
  to main/l/live-build/live-build_3.0~a42-1.debian.tar.gz
live-build_3.0~a42-1.dsc
  to main/l/live-build/live-build_3.0~a42-1.dsc
live-build_3.0~a42-1_all.deb
  to main/l/live-build/live-build_3.0~a42-1_all.deb
live-build_3.0~a42.orig.tar.gz
  to main/l/live-build/live-build_3.0~a42.orig.tar.gz



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 630089@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-build 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: SHA1

Format: 1.8
Date: Sun, 15 Jan 2012 19:25:42 +0100
Source: live-build
Binary: live-build live-build-cgi live-build-cron
Architecture: source all
Version: 3.0~a42-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-build - Debian Live - System build scripts
 live-build-cgi - Debian Live - System build scripts (CGI frontend)
 live-build-cron - Debian Live - System build scripts (cron autobuilder)
Closes: 630089 646797 655557 655562
Changes: 
 live-build (3.0~a42-1) unstable; urgency=low
 .
   [ Matthijs Kooijman ]
   * Make lb_chroot_hooks work with dash.
   * Fix pathname for running hooks in lb_chroot_hooks.
   * Make the config available to all hooks.
   * Fix path in 001-update-apt-file-cache.chroot.
   * Use a two-stage mount again for mounting config inside chroot in
     lb_chroot_hooks.
   * Unmount /root/config in case of error.
   * Unmount chroot/root/config when running lb_clean.
 .
   [ Daniel Baumann ]
   * Adding armhf kernel defaults, thanks for Ying-Chun Liu
     <paulliu@debian.org> for bringing it up (Closes: #655557).
   * Correcting wrong and incompatible loop for casper initrds in
     binary_disk.
   * Using syslinux payload as fallback in lb_binary_syslinux if no
     destinct image type could be deduced (Closes: #655562).
   * Switching priorities of mirror defaults (which mirror default is
     used from which previously set mirror default etc.) to the way it
     was intendet to be.
 .
   [ Colin Watson ]
   * Print the current time before starting a command with the lb wrapper
     script (Closes: #630089).
 .
   [ Daniel Baumann ]
   * Adding reference to --parent-archive-areas in lb_config manpage
     (Closes: #646797).
Checksums-Sha1: 
 252b2bceefcf540eaf92994d3d79ba90bdb2235f 1413 live-build_3.0~a42-1.dsc
 c6bf5570dd1b87a2eef544bdf2620a25ec17d46c 1821311 live-build_3.0~a42.orig.tar.gz
 0b10e361917a3a44cd733d28297004a3f9927d6c 59893 live-build_3.0~a42-1.debian.tar.gz
 ce496e96429856fbfcf5188455f963682b59bd54 1140848 live-build_3.0~a42-1_all.deb
 26d8ccfba50f0c77e66648dff7dee24942d3c46f 65024 live-build-cgi_3.0~a42-1_all.deb
 bcc613ccc9c2cd3a85bcd00307ab4eb46ff6c333 70132 live-build-cron_3.0~a42-1_all.deb
Checksums-Sha256: 
 8293f39d4fa8f8c77ed379b3fce5262d526d47054284864c52218e3318c247ae 1413 live-build_3.0~a42-1.dsc
 4b0ea5b5204d91cfbad59c11d090f5c2f62e15eca7d618a978e27c29dd3b8847 1821311 live-build_3.0~a42.orig.tar.gz
 12092a572ff68f8fbd13238beab687382763e7367fe5c2b3c0418d256da078f3 59893 live-build_3.0~a42-1.debian.tar.gz
 3fbc200ecd6bfc1115c3e1c67cd7ba0ae95f3237b60951c2f52edc6388392135 1140848 live-build_3.0~a42-1_all.deb
 0a954c402efea5819c6469ea52c8f4a91b7a3fb61eb8c258810f66ea920f3787 65024 live-build-cgi_3.0~a42-1_all.deb
 8f92d0ab69b395d931f273b32c9a14fbda833ee0cc72d4c0eb680bed1badcdf7 70132 live-build-cron_3.0~a42-1_all.deb
Files: 
 f4b6fea4393dfe977f259248874c5433 1413 misc optional live-build_3.0~a42-1.dsc
 a9a4b81377768d817e220de5a04e64ae 1821311 misc optional live-build_3.0~a42.orig.tar.gz
 83f665d0535c67ebe4b317df3c849027 59893 misc optional live-build_3.0~a42-1.debian.tar.gz
 193c990cd5682db3fb3a16a6ca3c3556 1140848 misc optional live-build_3.0~a42-1_all.deb
 c2abe32cddc27e9c617559b57cb77924 65024 misc optional live-build-cgi_3.0~a42-1_all.deb
 2e7d4f457b631e9951561dc5d38ced5a 70132 misc optional live-build-cron_3.0~a42-1_all.deb

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

iEYEARECAAYFAk8TLacACgkQ+C5cwEsrK55hbACeIsQAEtiJ1Hm+F9lt5I/ToOdd
Ts8AnRZuuDfuRfb5eW1i7Jzb4R8nXjOp
=ETaQ
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 23 Feb 2012 07:43:06 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: Thu Apr 17 22:40:42 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.