powertop.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [Powertop] [PATCH v2 02/19] main.cpp: append __TIME__ to --version output
@ 2016-08-04  0:59 Joe Konno
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Konno @ 2016-08-04  0:59 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

From: Joe Konno <joe.konno(a)intel.com>

In case folks are doing lots of building and testing, it's nice to have
a time stamp on each generated binary.

Signed-off-by: Joe Konno <joe.konno(a)intel.com>
---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 991dd9a68474..673adf3c5982 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -99,7 +99,7 @@ static const struct option long_options[] =
 
 static void print_version()
 {
-	printf(_("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE__ "\n"));
+	printf(_("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE__ " at " __TIME__ "\n"));
 }
 
 static bool set_refresh_timeout()
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Powertop] [PATCH v2 02/19] main.cpp: append __TIME__ to --version output
@ 2016-08-04 15:03 Joe Konno
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Konno @ 2016-08-04 15:03 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

Short answer-- given review, I'll NACK this patch. The --version housecleaning
bits will be handled in a separate series. More discussion below.

On Thu, 4 Aug 2016 14:48:13 +0300
Eugene Syromyatnikov <evgsyr(a)gmail.com> wrote:

> On Thu, Aug 4, 2016 at 3:59 AM, Joe Konno <joe.konno(a)linux.intel.com> wrote:
> > From: Joe Konno <joe.konno(a)intel.com>
> > -       printf(_("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE__ "\n"));
> > +       printf(_("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE__ " at " __TIME__ "\n"));  
> By the way, there is a warning regarding reproducibility produced
> during build of Debian package.
> 
> main.cpp:101:78: warning: macro "__DATE__" might prevent reproducible
> builds [-Wdate-time]
>  printf(("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE_ "\n"));
>                                                                              ^
> 
> I'm not aware whether powertop project cares about build
> reproducibility, but in case you are, may be it's better to put
> generation of timestamps in version string under some development
> define (#ifdef DEVEL or something) —
> https://reproducible-builds.org/docs/timestamps/.
> 

Good point! Thanks for the catch and link, Eugene. I wasn't aware of the
reprobuilds initiative, and now that I am, I'm all the more appreciative. This
gives me a good reason to NACK this patch in favor a proper --version fix.

I had been thinking seriously about constructing AC_REVISION from 'git
describe' information, so I'll start there.

Cheers!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Powertop] [PATCH v2 02/19] main.cpp: append __TIME__ to --version output
@ 2016-08-04 11:48 Eugene Syromyatnikov
  0 siblings, 0 replies; 3+ messages in thread
From: Eugene Syromyatnikov @ 2016-08-04 11:48 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

On Thu, Aug 4, 2016 at 3:59 AM, Joe Konno <joe.konno(a)linux.intel.com> wrote:
> From: Joe Konno <joe.konno(a)intel.com>
> -       printf(_("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE__ "\n"));
> +       printf(_("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE__ " at " __TIME__ "\n"));
By the way, there is a warning regarding reproducibility produced
during build of Debian package.

main.cpp:101:78: warning: macro "__DATE__" might prevent reproducible
builds [-Wdate-time]
 printf(("PowerTOP version " POWERTOP_VERSION ", compiled on " __DATE_ "\n"));
                                                                             ^

I'm not aware whether powertop project cares about build
reproducibility, but in case you are, may be it's better to put
generation of timestamps in version string under some development
define (#ifdef DEVEL or something) —
https://reproducible-builds.org/docs/timestamps/.

-- 
Eugene "eSyr" Syromyatnikov
mailto:evgSyr(a)gmail.com
xmpp:eSyr(a)jabber.{ru|org}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-04 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04  0:59 [Powertop] [PATCH v2 02/19] main.cpp: append __TIME__ to --version output Joe Konno
2016-08-04 11:48 Eugene Syromyatnikov
2016-08-04 15:03 Joe Konno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).