All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output
@ 2016-07-28 15:24 Peter Maydell
  2016-07-28 21:35 ` Eric Blake
  2016-08-03  9:29 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2016-07-28 15:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches, Fabrice Bellard, Stefan Hajnoczi

Currently the -version command line argument prints a string ending
with "Copyright (c) 2003-2008 Fabrice Bellard".  This is now some
eight years out of date; abstract it out of the several places that
print the string and update it to:

Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers

to reflect the work by all the QEMU Project contributors over the
last decade.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
The aim here is to (1) update the dates and (2) acknowledge
the work of all our contributors. I'm open to suggestions
on the exact wording (or on which header file we should
put the #define in...)

I only pulled out the copyright string proper into the #define
because a GUI About box is going to want just that, with no
leading ',' or trailing newline.

Fabrice: I have cc'd you since this is proposing an update
to your copyright info.

 bsd-user/main.c       | 3 ++-
 include/qemu-common.h | 4 ++++
 linux-user/main.c     | 2 +-
 vl.c                  | 3 ++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 315ba1d..b7524dd 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -667,7 +667,8 @@ void cpu_loop(CPUSPARCState *env)
 
 static void usage(void)
 {
-    printf("qemu-" TARGET_NAME " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
+    printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION
+           ", " QEMU_COPYRIGHT "\n"
            "usage: qemu-" TARGET_NAME " [options] program [arguments...]\n"
            "BSD CPU emulator (compiled for %s emulation)\n"
            "\n"
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 1f2cb94..9e8b0bd 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -18,6 +18,10 @@
 
 #include "qemu/option.h"
 
+/* Copyright string for -version arguments, About dialogs, etc */
+#define QEMU_COPYRIGHT "Copyright (c) 2003-2016 " \
+    "Fabrice Bellard and the QEMU Project developers"
+
 /* main function, renamed */
 #if defined(CONFIG_COCOA)
 int qemu_main(int argc, char **argv, char **envp);
diff --git a/linux-user/main.c b/linux-user/main.c
index 462e820..f2f4d2f 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4000,7 +4000,7 @@ static void handle_arg_strace(const char *arg)
 static void handle_arg_version(const char *arg)
 {
     printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION
-           ", Copyright (c) 2003-2008 Fabrice Bellard\n");
+           ", " QEMU_COPYRIGHT "\n");
     exit(EXIT_SUCCESS);
 }
 
diff --git a/vl.c b/vl.c
index e7c2c62..57f34d0 100644
--- a/vl.c
+++ b/vl.c
@@ -1914,7 +1914,8 @@ static void main_loop(void)
 
 static void version(void)
 {
-    printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n");
+    printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION ", "
+           QEMU_COPYRIGHT "\n");
 }
 
 static void help(int exitcode)
-- 
1.9.1

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

* Re: [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output
  2016-07-28 15:24 [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output Peter Maydell
@ 2016-07-28 21:35 ` Eric Blake
  2016-08-03  9:29 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2016-07-28 21:35 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Fabrice Bellard, Stefan Hajnoczi, patches

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

On 07/28/2016 09:24 AM, Peter Maydell wrote:
> Currently the -version command line argument prints a string ending
> with "Copyright (c) 2003-2008 Fabrice Bellard".  This is now some
> eight years out of date; abstract it out of the several places that
> print the string and update it to:
> 
> Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers
> 
> to reflect the work by all the QEMU Project contributors over the
> last decade.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> The aim here is to (1) update the dates and (2) acknowledge
> the work of all our contributors. I'm open to suggestions
> on the exact wording (or on which header file we should
> put the #define in...)
> 
> I only pulled out the copyright string proper into the #define
> because a GUI About box is going to want just that, with no
> leading ',' or trailing newline.
> 
> Fabrice: I have cc'd you since this is proposing an update
> to your copyright info.
> 
>  bsd-user/main.c       | 3 ++-
>  include/qemu-common.h | 4 ++++
>  linux-user/main.c     | 2 +-
>  vl.c                  | 3 ++-
>  4 files changed, 9 insertions(+), 3 deletions(-)
> 

Missing at least qemu-img.c, where the dates started at 2004 instead of
2003.  I don't see any particular problem with having ALL qemu utilities
report 2003-2016, even if some of them weren't available in 2003, since
they DO share a code base with copyrights that far back.  It would also
be okay in my mind to list JUST 2016 (rather than the range 2003-2016) -
that's what utilities like GNU Coreutils do (see 'ls --version') at the
recommendation of the GNU Coding Standards (that is, code has ranged
copyrights for whenever it was touched, but binaries only need to
declare a copyright for the year it was built).0

> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index 1f2cb94..9e8b0bd 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -18,6 +18,10 @@
>  
>  #include "qemu/option.h"
>  
> +/* Copyright string for -version arguments, About dialogs, etc */
> +#define QEMU_COPYRIGHT "Copyright (c) 2003-2016 " \
> +    "Fabrice Bellard and the QEMU Project developers"

In general, I'm a definite fan of this approach, since it lets us bump
the year in a single file, rather than hunting down every binary that
needs an update.  Looking forward to v2 that covers the full list.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

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

* Re: [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output
  2016-07-28 15:24 [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output Peter Maydell
  2016-07-28 21:35 ` Eric Blake
@ 2016-08-03  9:29 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-08-03  9:29 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches, Fabrice Bellard

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

On Thu, Jul 28, 2016 at 04:24:45PM +0100, Peter Maydell wrote:
> Currently the -version command line argument prints a string ending
> with "Copyright (c) 2003-2008 Fabrice Bellard".  This is now some
> eight years out of date; abstract it out of the several places that
> print the string and update it to:
> 
> Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers
> 
> to reflect the work by all the QEMU Project contributors over the
> last decade.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> The aim here is to (1) update the dates and (2) acknowledge
> the work of all our contributors. I'm open to suggestions
> on the exact wording (or on which header file we should
> put the #define in...)
> 
> I only pulled out the copyright string proper into the #define
> because a GUI About box is going to want just that, with no
> leading ',' or trailing newline.
> 
> Fabrice: I have cc'd you since this is proposing an update
> to your copyright info.
> 
>  bsd-user/main.c       | 3 ++-
>  include/qemu-common.h | 4 ++++
>  linux-user/main.c     | 2 +-
>  vl.c                  | 3 ++-
>  4 files changed, 9 insertions(+), 3 deletions(-)

Acked-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 15:24 [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output Peter Maydell
2016-07-28 21:35 ` Eric Blake
2016-08-03  9:29 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.