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 212762c593
will take care of updating the year.
This commit is contained in:
Bernhard M. Wiedemann
2018-08-22 05:52:10 +02:00
committed by Richard W.M. Jones
parent 1368b1bb7d
commit 4d39faaa30

View File

@@ -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 =