Bug 1082680

Summary: /usr/bin/annotate-output errors for date format with spaces
Product: [Fedora] Fedora Reporter: Glenn Jackman <glenn.jackman>
Component: devscriptsAssignee: Sandro Mani <manisandro>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: a.badger, bugs.michael, lnie, manisandro, twoerner, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: devscripts-2.14.11-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-13 09:44:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Glenn Jackman 2014-03-31 15:27:31 UTC
Description of problem:

If you provide a date format with spaces to /usr/bin/annotate-output, this error 

Version-Release number of selected component (if applicable): rpmdevtools-8.3-1.fc18.noarch


How reproducible:


Steps to Reproduce:
1. /usr/bin/annotate-output "+%F %T" date
2.
3.

Actual results:

date: extra operand ‘%T’
Try 'date --help' for more information.
 I: Started date
date: extra operand ‘%T’
Try 'date --help' for more information.
 O: Mon Mar 31 11:25:40 EDT 2014
date: extra operand ‘%T’
Try 'date --help' for more information.
 I: Finished with exitcode 0

Expected results:

2014-03-31 11:26:04 I: Started date
2014-03-31 11:26:04 O: Mon Mar 31 11:26:04 EDT 2014
2014-03-31 11:26:04 I: Finished with exitcode 0

Additional info: fix with this change:

$ diff /usr/bin/annotate-output bin/annotate-output 
28c28
< 		echo "`date ${FMT}` $1: $line"
---
> 		printf "%s %s: %s\n" "$(date "$FMT")" "$1" "$line"
78c78
< echo "`date ${FMT}` I: Started $@"
---
> addtime I <<< "Started $*"
83c83
< echo "`date ${FMT}` I: Finished with exitcode $EXIT"
---
> addtime I <<< "Finished with exitcode $EXIT"

Comment 1 Ville Skyttä 2014-10-20 18:45:03 UTC
annotate-output is nowadays included with the devscripts package, and the one in F-20 looks still affected.

Comment 2 Sandro Mani 2014-10-30 14:52:46 UTC
Upstream fix committed: http://git.debian.org/?p=collab-maint/devscripts.git;a=commitdiff;h=36eac04.

Comment 3 Fedora Update System 2014-12-04 12:28:10 UTC
devscripts-2.14.11-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/devscripts-2.14.11-1.fc21

Comment 4 Fedora Update System 2014-12-04 12:28:54 UTC
devscripts-2.14.11-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/devscripts-2.14.11-1.fc20

Comment 5 Fedora Update System 2014-12-05 00:46:14 UTC
Package devscripts-2.14.11-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing devscripts-2.14.11-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-16282/devscripts-2.14.11-1.fc21
then log in and leave karma (feedback).

Comment 6 lnie 2014-12-05 06:38:27 UTC
devscripts-2.14.11-1.fc21 works

Comment 7 Fedora Update System 2014-12-13 09:44:06 UTC
devscripts-2.14.11-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-12-15 04:31:22 UTC
devscripts-2.14.11-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.