r15836 - in /trunk/libconvert-uulib-perl/debian: cdbs/1/rules/copyright-check.mk changelog copyright_hints

js at users.alioth.debian.org js at users.alioth.debian.org
Thu Feb 28 09:03:51 UTC 2008


Author: js
Date: Thu Feb 28 09:03:49 2008
New Revision: 15836

URL: http://svn.debian.org/wsvn/?sc=1&rev=15836
Log:
* Update copyright-check cdbs snippet to parse licensecheck using perl:
  + No longer randomly drops newlines
  + More compact hint file (and ordered more like wiki-proposed new copyright
    syntax).
  + No longer ignore files without copyright.
* Update copyright_hints.

Modified:
    trunk/libconvert-uulib-perl/debian/cdbs/1/rules/copyright-check.mk
    trunk/libconvert-uulib-perl/debian/changelog
    trunk/libconvert-uulib-perl/debian/copyright_hints

Modified: trunk/libconvert-uulib-perl/debian/cdbs/1/rules/copyright-check.mk
URL: http://svn.debian.org/wsvn/trunk/libconvert-uulib-perl/debian/cdbs/1/rules/copyright-check.mk?rev=15836&op=diff
==============================================================================
--- trunk/libconvert-uulib-perl/debian/cdbs/1/rules/copyright-check.mk (original)
+++ trunk/libconvert-uulib-perl/debian/cdbs/1/rules/copyright-check.mk Thu Feb 28 09:03:49 2008
@@ -40,11 +40,36 @@
 debian/stamp-copyright-check:
 	@echo 'Scanning upstream source for new/changed copyright notices (except debian subdir!)...'
 
+# Perl in shell in make requires extra care:
+#  * Single-quoting ('...') protects against shell expansion
+#  * Double-dollar ($$) expands to plain dollar ($) in make
 	licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \
-		| grep -v '^\(\|.*: \*No copyright\* \(GENERATED FILE\|UNKNOWN\)\)$$' - \
-		| sed 's/\s*(with incorrect FSF address)\s*$$//; s/\s(\+v\(.\+\) or later)/-\1\+/; s/^\s*\[Copyright:\s*/ \[/' \
-		| awk '/^[^ ]/{printf "%s",$$0;next}{print}' \
-		| LC_ALL=C sort $(DEB_COPYRIGHT_CHECK_SORT_OPTS) \
+		| LC_ALL=C perl -e \
+	'$$n=0; while (<>) {'\
+	'	if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\
+	'		$$files[$$n]{name}=$$1;'\
+	'		$$files[$$n]{license}=$$2;'\
+	'	};'\
+	'	if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\
+	'		$$files[$$n]{copyright}=$$1;'\
+	'	};'\
+	'	/^$$/ and $$n++;'\
+	'};'\
+	'foreach $$file (@files) {'\
+	'	$$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\
+	'	$$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\
+	'	$$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*,\s*((??{$$y+1}))\b/ - $$2/g;'\
+	'	$$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\
+	'	$$pattern = "$$file->{license} [$$file->{copyright}]";'\
+	'	push @{ $$patterns{"$$pattern"} }, $$file->{name};'\
+	'};'\
+	'foreach $$pattern ( sort {'\
+	'			@{$$patterns{$$b}} <=> @{$$patterns{$$a}}'\
+	'			||'\
+	'			$$a cmp $$b'\
+	'		} keys %patterns ) {'\
+	'	print "$$pattern: ", join(", ", sort @{ $$patterns{$$pattern} }), "\n";'\
+	'};'\
 		> debian/copyright_newhints
 	@patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \
 		echo "Found $$patterncount different copyright and licensing combinations."

Modified: trunk/libconvert-uulib-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libconvert-uulib-perl/debian/changelog?rev=15836&op=diff
==============================================================================
--- trunk/libconvert-uulib-perl/debian/changelog (original)
+++ trunk/libconvert-uulib-perl/debian/changelog Thu Feb 28 09:03:49 2008
@@ -1,8 +1,14 @@
-libconvert-uulib-perl (1.09-3) UNRELEASED; urgency=low
+libconvert-uulib-perl (1.09-3) unstable; urgency=low
 
   * Really update buildinfo.mk as promised in -2 changelog entry.
-
- -- Jonas Smedegaard <dr at jones.dk>  Thu, 21 Feb 2008 02:29:25 +0100
+  * Update copyright-check cdbs snippet to parse licensecheck using perl:
+    + No longer randomly drops newlines
+    + More compact hint file (and ordered more like wiki-proposed new copyright
+      syntax).
+    + No longer ignore files without copyright.
+  * Update copyright_hints.
+
+ -- Jonas Smedegaard <dr at jones.dk>  Thu, 28 Feb 2008 00:01:21 +0100
 
 libconvert-uulib-perl (1.09-2) unstable; urgency=low
 

Modified: trunk/libconvert-uulib-perl/debian/copyright_hints
URL: http://svn.debian.org/wsvn/trunk/libconvert-uulib-perl/debian/copyright_hints?rev=15836&op=diff
==============================================================================
--- trunk/libconvert-uulib-perl/debian/copyright_hints (original)
+++ trunk/libconvert-uulib-perl/debian/copyright_hints Thu Feb 28 09:03:49 2008
@@ -1,4 +1,6 @@
-COPYING.Artistic: UNKNOWN [Holder, and derivatives of that collection of files / notices and associated disclaimers / Holder. A Package / Holder" is whoever is named in the copyright or / Holder as specified below / Holder maintains some / Holder, but only to the computing community at large / Holder to include]
-COPYING.GNU: UNKNOWN [1989, 1991 Free Software Foundation, Inc / the software, and]
-uulib/uucheck.c: *No copyright* GPL-2+ uulib/uuscan.c: *No copyright* GPL-2+ uulib/configure: UNKNOWN [1992, 93, 94, 95, 96 Free Software Foundation, Inc]
-uulib/uustring.c: *No copyright* GPL-2+ uulib/uulib.c: *No copyright* GPL-2+ uulib/uuutil.c: *No copyright* GPL-2+ uulib/uuencode.c: *No copyright* GPL-2+ uulib/uudeview.h: *No copyright* GPL-2+ uulib/uunconc.c: *No copyright* GPL-2+ uulib/uuint.h: *No copyright* GPL-2+ uulib/crc32.c: UNKNOWN [1995-1998 Mark Adler]
+*No copyright* UNKNOWN []: COPYING, Changes, MANIFEST, META.yml, Makefile.PL, README, UUlib.pm, UUlib.xs, doc/HISTORY, doc/library.pdf, example-decoder, t/cb.t, typemap, uulib/Makefile.in, uulib/acconfig.h, uulib/aclocal.m4, uulib/config.h.in, uulib/configure.in, uulib/crc32.h, uulib/fptools.c, uulib/fptools.h, uulib/uustring.awk, uulib/uustring.h
+*No copyright* GPL-2+ []: uulib/uucheck.c, uulib/uudeview.h, uulib/uuencode.c, uulib/uuint.h, uulib/uulib.c, uulib/uunconc.c, uulib/uuscan.c, uulib/uustring.c, uulib/uuutil.c
+UNKNOWN [1989, 1991 Free Software Foundation, Inc / the software, and]: COPYING.GNU
+UNKNOWN [1992, 93, 94, 95, 96 Free Software Foundation, Inc]: uulib/configure
+UNKNOWN [1995-1998 Mark Adler]: uulib/crc32.c
+UNKNOWN [Holder, and derivatives of that collection of files / notices and associated disclaimers / Holder. A Package / Holder" is whoever is named in the copyright or / Holder as specified below / Holder maintains some / Holder, but only to the computing community at large / Holder to include]: COPYING.Artistic




More information about the Pkg-perl-cvs-commits mailing list