Re: [libvirt] [PATCH] maint: enforce recent copyright style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Blake wrote:
> * cfg.mk (sc_copyright_format): New rule.
> Suggested by Jim Meyering.
> ---
>
> I tested that 'make syntax-check' with this patch rebased in
> place prior to the copyright updates catches the problems, but
> that when applied to the top of the tree it passes.
>
>  cfg.mk |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/cfg.mk b/cfg.mk
> index 9fc2d66..e60820d 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -269,6 +269,15 @@ sc_preprocessor_indentation:
>  	  echo '$(ME): skipping test $@: cppi not installed' 1>&2;	\
>  	fi
>
> +sc_copyright_format:
> +	@$(VC_LIST_EXCEPT) | xargs grep -ni 'copyright .*Red 'Hat	\
> +	  | grep -v Inc							\
> +	  && { echo '$(ME): use correct Red Hat copyright' 1>&2;	\
> +	       exit 1; } || :
> +	@$(VC_LIST_EXCEPT) | xargs grep -ni 'copyright [^(].*Red 'Hat	\
> +	  && { echo '$(ME): use correct Red Hat copyright' 1>&2;	\
> +	       exit 1; } || :
> +
>  # We don't use this feature of maint.mk.
>  prev_version_file = /dev/null

Thanks!

In each diagnostic, it'd be nice to say what's missing.
"Inc." in the first, "(C)" in the second.

In the second, isn't s/correct/consistent/ more appropriate?
Or is there some legal guidance saying that the (C) is required?
I seem to recall reading that at least with FSF copyrights,
the "(C)" is optional, and without legal value.

The only problem I can see is that when/if adding copyright
year numbers (non-range notation), eventually, some copyright
lines will be split, causing this check to report false-positive
matches.  This is another argument for using YYYY-ZZZZ year ranges,
when possible, rather than writing them out as Y1, Y2, Y3, ... YN.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]