Bernhard M. Wiedemann
2018-Aug-22 03:52 UTC
[Libguestfs] [PATCH] generator: Do not claim copyright for future years
This change helps to make libguestfs package build reproducible. See https://reproducible-builds.org/ for why this is good. Without this patch, building today's libguestfs in 2033, claims Copyright (C) 2009-2033 Red Hat Inc. which cannot be correct. This affected files like /usr/include/guestfs-gobject.h /usr/lib/perl5/vendor_perl/5.26.2/x86_64-linux-thread-multi/Sys/Guestfs.pm /usr/lib64/python2.7/site-packages/guestfs.py /usr/lib64/ocaml/guestfs/guestfs.mli Commits like 212762c59351822e9db7d3dc82afe1765808d918 will take care of updating the year. --- generator/docstrings.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generator/docstrings.ml b/generator/docstrings.ml index fa7b1668a..b480d036e 100644 --- a/generator/docstrings.ml +++ b/generator/docstrings.ml @@ -68,9 +68,7 @@ let version_added = function Some (sprintf "%d.%d.%d" major minor release) | _ -> None -let copyright_years - let this_year = 1900 + (localtime (time ())).tm_year in - if this_year > 2009 then sprintf "2009-%04d" this_year else "2009" +let copyright_years = "2009-2018" (* Generate a header block in a number of standard styles. *) type comment_style -- 2.16.4
Nikolay Ivanets
2018-Aug-22 06:11 UTC
Re: [Libguestfs] [PATCH] generator: Do not claim copyright for future years
Doesn't it mean you have to remember changing copyright in 2019? -- Mykola Ivanets ср, 22 серп. 2018, 08:58 користувач Bernhard M. Wiedemann < bwiedemann@suse.de> пише:> This change helps to make libguestfs package build reproducible. > See https://reproducible-builds.org/ for why this is good. > > Without this patch, building today's libguestfs in 2033, claims > Copyright (C) 2009-2033 Red Hat Inc. > which cannot be correct. > > This affected files like > /usr/include/guestfs-gobject.h > /usr/lib/perl5/vendor_perl/5.26.2/x86_64-linux-thread-multi/Sys/Guestfs.pm > /usr/lib64/python2.7/site-packages/guestfs.py > /usr/lib64/ocaml/guestfs/guestfs.mli > > Commits like 212762c59351822e9db7d3dc82afe1765808d918 > will take care of updating the year. > --- > generator/docstrings.ml | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/generator/docstrings.ml b/generator/docstrings.ml > index fa7b1668a..b480d036e 100644 > --- a/generator/docstrings.ml > +++ b/generator/docstrings.ml > @@ -68,9 +68,7 @@ let version_added = function > Some (sprintf "%d.%d.%d" major minor release) > | _ -> None > > -let copyright_years > - let this_year = 1900 + (localtime (time ())).tm_year in > - if this_year > 2009 then sprintf "2009-%04d" this_year else "2009" > +let copyright_years = "2009-2018" > > (* Generate a header block in a number of standard styles. *) > type comment_style > -- > 2.16.4 > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs >
Richard W.M. Jones
2018-Aug-22 10:12 UTC
Re: [Libguestfs] [PATCH] generator: Do not claim copyright for future years
On Wed, Aug 22, 2018 at 09:11:24AM +0300, Nikolay Ivanets wrote:> Doesn't it mean you have to remember changing copyright in 2019?We already do that every year, eg: https://github.com/libguestfs/libguestfs/commit/212762c59351822e9db7d3dc82afe1765808d918 I believe the Perl script we use would catch this instance in the generator and update it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Richard W.M. Jones
2018-Aug-22 10:13 UTC
Re: [Libguestfs] [PATCH] generator: Do not claim copyright for future years
On Wed, Aug 22, 2018 at 05:52:10AM +0200, Bernhard M. Wiedemann wrote:> This change helps to make libguestfs package build reproducible. > See https://reproducible-builds.org/ for why this is good. > > Without this patch, building today's libguestfs in 2033, claims > Copyright (C) 2009-2033 Red Hat Inc. > which cannot be correct. > > This affected files like > /usr/include/guestfs-gobject.h > /usr/lib/perl5/vendor_perl/5.26.2/x86_64-linux-thread-multi/Sys/Guestfs.pm > /usr/lib64/python2.7/site-packages/guestfs.py > /usr/lib64/ocaml/guestfs/guestfs.mli > > Commits like 212762c59351822e9db7d3dc82afe1765808d918 > will take care of updating the year. > --- > generator/docstrings.ml | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/generator/docstrings.ml b/generator/docstrings.ml > index fa7b1668a..b480d036e 100644 > --- a/generator/docstrings.ml > +++ b/generator/docstrings.ml > @@ -68,9 +68,7 @@ let version_added = function > Some (sprintf "%d.%d.%d" major minor release) > | _ -> None > > -let copyright_years > - let this_year = 1900 + (localtime (time ())).tm_year in > - if this_year > 2009 then sprintf "2009-%04d" this_year else "2009" > +let copyright_years = "2009-2018"Thanks, will push this shortly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Bernhard M. Wiedemann
2018-Aug-22 19:23 UTC
Re: [Libguestfs] [PATCH] generator: Do not claim copyright for future years
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2018-08-22 06:11, Nikolay Ivanets wrote:> Doesn't it mean you have to remember changing copyright in 2019?s/have to/can/ https://stackoverflow.com/questions/2390230/do-copyright-dates-need-to-be-updated In many jurisdictions, expiry of copyright is 50-70 years after death of the author and that point in time does not depend on when a file was updated, so I still wonder why so many people update these numbers. Maybe to show that your project is still alive :-) -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQRk4KvQEtfG32NHprVJNgs7HfuhZAUCW324NAAKCRBJNgs7Hfuh ZMriAKDsTz4M9XXw3IiuepGgzJztZ0S6tgCdFGhQBoZKz+PZYHDVdnbHREWS+6Q=F3JL -----END PGP SIGNATURE-----
Seemingly Similar Threads
- [PATCH] generator: Do not claim copyright for future years
- Re: [PATCH] generator: Do not claim copyright for future years
- buffer overflow detected error
- Long running nbdkit instances seem to leak memory
- Sound not working properly on Xen Dom0, but works on native