diff options
author | Jonas Smedegaard <dr@jones.dk> | 2008-08-07 04:05:08 (GMT) |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2008-08-07 04:05:08 (GMT) |
commit | 9a21930d500250dfafd99812a1926cf8e6150263 (patch) | |
tree | 5bfbd291fb259cecbba0db5c05e098308e080eeb | |
parent | c750810763717c043898ac58337e025f7bb7cd6b (diff) |
Update local cdbs snippets.
* Update local cdbs snippets:
+ Minor improvements to copyright-check.mk.
+ Add new local package-relations.mk to merge duplicate
build-dependencies and more.
+ Update README.cdbs-tweaks.
* Update copyright hints.
-rw-r--r-- | debian/README.cdbs-tweaks | 17 | ||||
-rw-r--r-- | debian/cdbs/1/rules/copyright-check.mk | 26 | ||||
-rw-r--r-- | debian/cdbs/1/rules/package-relations.mk | 50 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/copyright_hints | 118 | ||||
-rwxr-xr-x | debian/rules | 3 |
6 files changed, 194 insertions, 27 deletions
diff --git a/debian/README.cdbs-tweaks b/debian/README.cdbs-tweaks index 5880b2f..6130d0f 100644 --- a/debian/README.cdbs-tweaks +++ b/debian/README.cdbs-tweaks @@ -69,6 +69,13 @@ Handle packaging of Sugar activities. +New perl-build class +-------------------- + +Handle Perl modules using Module::Build. + + + New copyright-check rule ------------------------ @@ -84,6 +91,16 @@ Small wrapper around dh-kpatches, taking care of build-dependencies too. +New package-relations rule +-------------------------- + +Improved build-dependency handling (merging multiple dependencies on +same packages), and add dependency handling for binary packages (to ease +maintaining identical build-dependencies and dependencies for eg. Perl +modules meeding runtime stuff for buildtime tests). + + + New routines for handling upstream tarball ------------------------------------------ diff --git a/debian/cdbs/1/rules/copyright-check.mk b/debian/cdbs/1/rules/copyright-check.mk index 645363b..d96681a 100644 --- a/debian/cdbs/1/rules/copyright-check.mk +++ b/debian/cdbs/1/rules/copyright-check.mk @@ -28,6 +28,9 @@ include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7) +# Set to yes to fail on changed/new hints are found +#DEB_COPYRIGHT_CHECK_STRICT := yes + # Single regular expression for files to include or ignore DEB_COPYRIGHT_CHECK_REGEX = .* DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$ @@ -35,13 +38,17 @@ DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\ pre-build:: debian/stamp-copyright-check debian/stamp-copyright-check: - @echo 'Scanning upstream source for new/changed copyright notices (except debian subdir!)...' + @echo 'Scanning upstream source for new/changed copyright notices...' + @echo licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + "| some-output-filtering..." # 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)' * \ + @licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ | LC_ALL=C perl -e \ + 'print "Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX\n";'\ + 'print "Upstream-Name: Untrusted draft - double-check copyrights yourself!\n\n";'\ '$$n=0; while (<>) {'\ ' s/[^[:print:]]//g;'\ ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\ @@ -56,8 +63,15 @@ debian/stamp-copyright-check: 'foreach $$file (@files) {'\ ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\ ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\ + ' $$file->{license} =~ s/\s*(\*No copyright\*)\s*// and $$file->{copyright} = $$1;'\ + ' $$file->{license} =~ s/^\s*(GENERATED FILE)/UNKNOWN ($$1)/;'\ + ' $$file->{license} =~ s/\s+(GENERATED FILE)/ ($$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;'\ + ' $$file->{copyright} =~ s/\b(\d{4})\s+([\S^\d])/$$1, $$2/g;'\ + ' $$file->{copyright} =~ s/^\W*\s+\/\s+//g;'\ + ' $$file->{copyright} =~ s/\s+\/\s+\W*$$//;'\ + ' $$file->{copyright} =~ s/\s+\/\s+/\n\t/g;'\ ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\ ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\ '};'\ @@ -66,7 +80,10 @@ debian/stamp-copyright-check: ' ||'\ ' $$a cmp $$b'\ ' } keys %patternfiles ) {'\ - ' print "$$pattern: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' ($$license, $$copyright) = $$pattern =~ /(.*) \[(.*)\]/s;'\ + ' print "Files: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' print "Copyright: $$copyright\n";'\ + ' print "License: $$license\n\n";'\ '};'\ > debian/copyright_newhints @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \ @@ -74,13 +91,14 @@ debian/stamp-copyright-check: @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \ if [ -n "$$newstrings" ]; then \ - echo "WARNING: The following new or changed copyright notices discovered:"; \ + echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \ echo; \ echo "$$newstrings"; \ echo; \ echo "To fix the situation please do the following:"; \ echo " 1) Investigate the above changes and update debian/copyright as needed"; \ echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \ + $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \ else \ echo 'No new copyright notices found - assuming no news is good news...'; \ rm -f debian/copyright_newhints; \ diff --git a/debian/cdbs/1/rules/package-relations.mk b/debian/cdbs/1/rules/package-relations.mk new file mode 100644 index 0000000..3a92eb7 --- /dev/null +++ b/debian/cdbs/1/rules/package-relations.mk @@ -0,0 +1,50 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2006 Jonas Smedegaard <dr@jones.dk> +# Description: Resolve, cleanup and apply package relationships +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_package_relations +_cdbs_rules_package_relations = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +# Merge build-dependencies on same packages +# TODO: rewrite (in perl, probably) to be more generic +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.43)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\|0.4.39\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.27)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.44)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.37.2)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.28)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.21)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.0)/ s/ *,* *\bdebhelper (>= \(4.1.60\)) *,* */, /g') + +# Cleanup superfluous commas +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//') + +# Apply CDBS-declared dependencies to binary packages +$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%: + echo 'cdbs:Depends=$(CDBS_DEPENDS_ALL), $(or $(CDBS_DEPENDS_$(cdbs_curpkg)),$(CDBS_DEPENDS))' \ + | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//' \ + >> debian/$(cdbs_curpkg).substvars + +endif diff --git a/debian/changelog b/debian/changelog index 38ae3b3..00c5e50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,12 @@ sugar-artwork (0.81.3-1) unstable; urgency=low * New upstream release. * Unfuzz patch 2991. - * Update copyright check. + * Update local cdbs snippets: + + Minor improvements to copyright-check.mk. + + Add new local package-relations.mk to merge duplicate + build-dependencies and more. + + Update README.cdbs-tweaks. + * Update copyright hints. -- Jonas Smedegaard <dr@jones.dk> Thu, 07 Aug 2008 05:51:17 +0200 diff --git a/debian/copyright_hints b/debian/copyright_hints index 9ae5b35..852cff0 100644 --- a/debian/copyright_hints +++ b/debian/copyright_hints @@ -1,4 +1,7 @@ -*No copyright* UNKNOWN []: AUTHORS +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX +Upstream-Name: Untrusted draft - double-check copyrights yourself! + +Files: AUTHORS ChangeLog Makefile.am NEWS @@ -193,7 +196,10 @@ matchbox/Makefile.am matchbox/closebutton.xpm matchbox/theme.xml -GENERATED FILE [1994-2002]: Makefile.in +Copyright: *No copyright* +License: UNKNOWN + +Files: Makefile.in cursor/Makefile.in cursor/cursorthemegen/Makefile.in cursor/sugar/Makefile.in @@ -209,32 +215,100 @@ GENERATED FILE [1994-2002]: Makefile.in icons/scalable/mimetypes/Makefile.in icons/scalable/status/Makefile.in matchbox/Makefile.in -LGPL-2+ [2007, Benjamin Berg]: gtk/engine/sugar-drawing.c +Copyright: 1994-2002 +License: UNKNOWN (GENERATED FILE) + +Files: gtk/engine/sugar-drawing.c gtk/engine/sugar-drawing.h gtk/engine/sugar-info.c gtk/engine/sugar-info.h gtk/engine/sugar-utils.c gtk/engine/sugar-utils.h -UNKNOWN [2003 Red Hat, Inc]: cursor/cursorthemegen/cursortheme.h +Copyright: 2007, Benjamin Berg +License: LGPL-2+ + +Files: cursor/cursorthemegen/cursortheme.h cursor/cursorthemegen/main.c cursor/cursorthemegen/themefile.c -LGPL-2+ [2007, Red Hat, Inc / 2008, Benjamin Berg]: gtk/engine/sugar-rc-style.c +Copyright: 2003, Red Hat, Inc +License: UNKNOWN + +Files: gtk/engine/sugar-rc-style.c gtk/engine/sugar-rc-style.h -LGPL-2+ [2007, Red Hat, Inc]: gtk/engine/sugar-style.h +Copyright: 2007, Red Hat, Inc + 2008, Benjamin Berg +License: LGPL-2+ + +Files: gtk/engine/sugar-style.h gtk/engine/sugar.c -GENERATED FILE [1992-1996, 1998-2001]: configure -GPL GENERATED FILE [1996-1997, 1999-2000, 2002-2006]: missing -GPL GENERATED FILE [1999-2000, 2003-2007 Free Software]: depcomp -GPL-2+ GENERATED FILE [1996-2001, 2003-2006]: ltmain.sh -LGPL-2+ [2007, Red Hat, Inc / 2007, Benjamin Berg]: gtk/engine/sugar-style.c -MIT/X11 (BSD like) [1994 X Consortium]: install-sh -UNKNOWN ["<0zKj]: cursor/sugar/sugar-00.png -UNKNOWN [1996-2004]: aclocal.m4 -UNKNOWN [2002-2003 Erik Max Francis']: gtk/theme/em.py -UNKNOWN [?YrE,dTviz1kyubyy<L`IQ.WbtTLQO&jkqd;n]: cursor/sugar/sugar-11.png -UNKNOWN [?ZrlE*_ESN@,/t_L>)*?dVilS"su8r3Wo]: cursor/sugar/sugar-10.png -UNKNOWN [Oo;=UvemZ\O7-pt[BkT"<qnSCd_<o|&j|V:fe]: cursor/sugar/sugar-04.png -UNKNOWN [m`@Q]: cursor/sugar/sugar-01.png -UNKNOWN [the / 1991, 1999 Free Software Foundation, Inc]: COPYING -UNKNOWN [w1jGaM!84~J8humuu13|JtE|L^A?JHC|g3Wt}!AtxH<e2\e}?3oMMj72>yC_m$k`,AZDTYg#z"5*>\#<.\'{q@PE4Y5 / ?ZrlYc&wn&E/v-?`X^Ry(|&Uc]: cursor/sugar/sugar-02.png -UNKNOWN [~\dh?IuMw8Lhi\+iHmwW__G>M/+R\q0||XiEkc<%C31Jp5_X> 9$G-<0eXuf~.GL~=3YzU['L@<&\O1o / ?ZrlE*`hbRbj+5R0/L>)AaDDhqfzn["VnqgCF|>)IMy?J+|.)"!Iy*es)mg.8\)&k(>\__VX(od]: cursor/sugar/sugar-05.png +Copyright: 2007, Red Hat, Inc +License: LGPL-2+ + +Files: missing +Copyright: 1996-1997, 1999-2000, 2002-2006 +License: GPL (GENERATED FILE) + +Files: depcomp +Copyright: 1999-2000, 2003-2007, Free Software +License: GPL (GENERATED FILE) + +Files: ltmain.sh +Copyright: 1996-2001, 2003-2006 +License: GPL-2+ (GENERATED FILE) + +Files: gtk/engine/sugar-style.c +Copyright: 2007, Red Hat, Inc + 2007, Benjamin Berg +License: LGPL-2+ + +Files: install-sh +Copyright: 1994, X Consortium +License: MIT/X11 (BSD like) + +Files: configure +Copyright: 1992-1996, 1998-2001 +License: UNKNOWN (GENERATED FILE) + +Files: cursor/sugar/sugar-00.png +Copyright: "<0zKj +License: UNKNOWN + +Files: aclocal.m4 +Copyright: 1996-2004 +License: UNKNOWN + +Files: gtk/theme/em.py +Copyright: 2002-2003, Erik Max Francis' +License: UNKNOWN + +Files: cursor/sugar/sugar-11.png +Copyright: ?YrE,dTviz1kyubyy<L`IQ.WbtTLQO&jkqd;n +License: UNKNOWN + +Files: cursor/sugar/sugar-10.png +Copyright: ?ZrlE*_ESN@,/t_L>)*?dVilS"su8r3Wo +License: UNKNOWN + +Files: cursor/sugar/sugar-04.png +Copyright: Oo;=UvemZ\O7-pt[BkT"<qnSCd_<o|&j|V:fe +License: UNKNOWN + +Files: cursor/sugar/sugar-01.png +Copyright: m`@Q +License: UNKNOWN + +Files: COPYING +Copyright: the + 1991, 1999, Free Software Foundation, Inc +License: UNKNOWN + +Files: cursor/sugar/sugar-02.png +Copyright: w1jGaM!84~J8humuu13|JtE|L^A?JHC|g3Wt}!AtxH<e2\e}?3oMMj72>yC_m$k`,AZDTYg#z"5*>\#<.\'{q@PE4Y5 + ?ZrlYc&wn&E/v-?`X^Ry(|&Uc +License: UNKNOWN + +Files: cursor/sugar/sugar-05.png +Copyright: ~\dh?IuMw8Lhi\+iHmwW__G>M/+R\q0||XiEkc<%C31Jp5_X> 9$G-<0eXuf~.GL~=3YzU['L@<&\O1o + ?ZrlE*`hbRbj+5R0/L>)AaDDhqfzn["VnqgCF|>)IMy?J+|.)"!Iy*es)mg.8\)&k(>\__VX(od +License: UNKNOWN + diff --git a/debian/rules b/debian/rules index 7761d77..f0ffe9f 100755 --- a/debian/rules +++ b/debian/rules @@ -21,3 +21,6 @@ CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libgtk2.0-dev, libglib2.0-dev, libc # Merge duplicate build-dependencies CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\)) *,* */, /g' -e 's/^ *, *//' -e 's/ *, *$$//') + +# Merge duplicate build-dependencies +include debian/cdbs/1/rules/package-relations.mk |