From Fedora Project Wiki
No edit summary
No edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Changes/time-1.8 =
= time-1.8 =


== Summary ==
== Summary ==
Line 7: Line 7:
* Name: [[User:ppisar| Petr Písař]]
* Name: [[User:ppisar| Petr Písař]]
* Email: <ppisar@redhat.com>
* Email: <ppisar@redhat.com>
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->
* Release notes ticket: [https://pagure.io/fedora-docs/release-notes/issue/116 #116]
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
* FESCo shepherd: [[User:FASAccountName| Shehperd name]] <email address>
* FESCo shepherd: [[User:FASAccountName| Shehperd name]] <email address>
Line 27: Line 27:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1520903 #1520903]


== Detailed Description ==
== Detailed Description ==
Line 59: Line 59:
== Benefit to Fedora ==
== Benefit to Fedora ==


Fedora provides up-to-date ''time'' tool that conforms to POSIX. The POSIX mode is improves portability and is recommended for use in the scripts.
Fedora provides up-to-date ''time'' tool that conforms to POSIX. The POSIX mode improves portability and is recommended for use in the scripts.


== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:


The time package will be upgraded and patched to preserve output format in POSIX mode.
The time package will be upgraded and patched to preserve output format in the POSIX mode.


* Other developers:
* Other developers:


Review their scripts and packages whether they use ''time' in non-POSIX mode and parse times's output. If they are affected, they should add ''-q'' option to the ''time'' command, or adjust their code do deal with the new first line.
Review their scripts and packages whether they use ''time' in non-POSIX mode and parse time's output. If they are affected, they should add ''-q'' option to the ''time'' command, or adjust their code do deal with the new first line.


* FIXME: Release engineering: [https://pagure.io/releng/issue/7153]
* Release engineering: [https://pagure.io/releng/issue/7153 Review request]
** [[Fedora_Program_Management/ReleaseBlocking/Fedora{{FedoraVersionNumber|next}}|List of deliverables]]: Anything that contains ''time'' package.
** [[Fedora_Program_Management/ReleaseBlocking/Fedora{{FedoraVersionNumber|next}}|List of deliverables]]: Not affected.


* Policies and guidelines: No change is needed.
* Policies and guidelines: No change is needed.
Line 79: Line 79:
== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==


Scripts that parses ''time'' output could stop working. Scripts that invokes ''time'' with ''-p'' option are not affected.
Scripts that parse ''time'' output could stop working. Scripts that invoke ''time'' with ''-p'' option are not affected.


== How To Test ==
== How To Test ==
Line 86: Line 86:


* <code>time -p COMMAND</code> behaves as in previous Fedoras.
* <code>time -p COMMAND</code> behaves as in previous Fedoras.
* <code>time COMMAND</code> prints a new leading line, if the COMMAND failed.
* <code>time COMMAND</code> prints a new leading line if the COMMAND failed.


Install a package that uses ''time'' tool and check it still works as expected.
Install a package that uses ''time'' tool and check it still works as expected.
Line 98: Line 98:
To this date, there are only 6 packages that require ''time'' package.
To this date, there are only 6 packages that require ''time'' package.


* akmods
* akmods –  not affected (processes only the last line of the time output)
* kcbench
* kcbench – not affected (processes only  line that does not start with a specific word and ''Command'' is not one of them)
* nfsometer
* nfsometer – not affected (it executes shell built-in command, the [https://bugzilla.redhat.com/show_bug.cgi?id=1533784 dependency on time package is wrong])
* ohc
* ohc – affected ([https://bugzilla.redhat.com/show_bug.cgi?id=1533791 ohc-consolidate-output prints the time output])
* redhat-lsb
* redhat-lsb – not affected (does not use time)
* winetricks
* winetricks – not affected (it does not use time at all, [https://bugzilla.redhat.com/show_bug.cgi?id=1533795 the dependency on time package is wrong])


== Contingency Plan ==
== Contingency Plan ==
Line 121: Line 121:
== Release Notes ==
== Release Notes ==


''time'' tool 1.8 has changed default output format. If the measured command fails, it reports about it on the first line of time's standard error output. This report can be suppressed by using ''-q'' option. The POSIX mode (''-p'' option) is unchanged. Users are advised to review their scripts for make sure they can parse the new ''time'' output.
''time'' tool 1.8 has changed default output format. If the measured command fails, it will report about it on the first line of time's standard error output. This report can be suppressed by using ''-q'' option. The POSIX mode (''-p'' option) is unchanged. Users are advised to review their scripts for make sure they can parse the new ''time'' output.


[[Category:ChangeReadyForWrangler]]
[[Category:ChangeAcceptedF28]]
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- The Wrangler announces the Change to the devel-announce list and changes the category to Category:ChangeAnnounced (no action required) -->  
<!-- The Wrangler announces the Change to the devel-announce list and changes the category to Category:ChangeAnnounced (no action required) -->  
<!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete-->
<!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete -->


<!-- Select proper category, default is Self Contained Change -->
<!-- Select proper category, default is Self Contained Change
[[Category:SelfContainedChange]] -->
[[Category:SelfContainedChange]] -->
[[Category:SystemWideChange]]
[[Category:SystemWideChange]]

Latest revision as of 15:10, 2 March 2018

time-1.8

Summary

A new time tool version 1.8 has changed output format.

Owner

Current status

Detailed Description

After many years a new 1.8 version of time tool was released. This version brings some noticeable changes:

  • License changed from (GPLv2+) to (GPLv3+ and GFDL).
  • Additional exit codes are used to report measured command failures and failures to execute the command.
  • A measured command failure is reported by default. See the first line in this output:
$ time /usr/bin/false
Command exited with non-zero status 1
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 1196maxresident)k
0inputs+0outputs (0major+55minor)pagefaults 0swaps

In previous Fedora versions, the first line was printed only if -v option was specified. This is not true anymore and the line is printed by default. You can disable it with a new -q option:

$ time -q /usr/bin/false
0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 1268maxresident)k
0inputs+0outputs (0major+55minor)pagefaults 0swaps

Because this violated POSIX mode, Fedora changed time-1.8 not to print the first line when invoked with -p option and upstream accepted the change so that future time versions will behave like Fedora. For Fedora users, there is no change in the POSIX mode output:

$ time -p /usr/bin/false
real 0.00
user 0.00
sys 0.00

If you use time tool in your script without the -p option, then either adjust your script to expect different output, or add -q option. Be ware of portability across distributions using different time versions.

Benefit to Fedora

Fedora provides up-to-date time tool that conforms to POSIX. The POSIX mode improves portability and is recommended for use in the scripts.

Scope

  • Proposal owners:

The time package will be upgraded and patched to preserve output format in the POSIX mode.

  • Other developers:

Review their scripts and packages whether they use time' in non-POSIX mode and parse time's output. If they are affected, they should add -q option to the time command, or adjust their code do deal with the new first line.

  • Policies and guidelines: No change is needed.
  • Trademark approval: No approval is needed.

Upgrade/compatibility impact

Scripts that parse time output could stop working. Scripts that invoke time with -p option are not affected.

How To Test

Install time package and check that:

  • time -p COMMAND behaves as in previous Fedoras.
  • time COMMAND prints a new leading line if the COMMAND failed.

Install a package that uses time tool and check it still works as expected.

User Experience

The time tool reports a command failure on the first line of standard error output. The report can be disabled with -q option.

Dependencies

To this date, there are only 6 packages that require time package.

Contingency Plan

  • Contingency mechanism: The default command failure reporting will be disabled or the upgrade will be reverted to 1.7 version.
  • Contingency deadline: Anytime.
  • Blocks release? No.
  • Blocks product? No.

Documentation

Release Notes

time tool 1.8 has changed default output format. If the measured command fails, it will report about it on the first line of time's standard error output. This report can be suppressed by using -q option. The POSIX mode (-p option) is unchanged. Users are advised to review their scripts for make sure they can parse the new time output.