[libconfig-model-dpkg-perl] 03/06: add test for normalized copyright data

dod at debian.org dod at debian.org
Sat May 20 18:04:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit e27c467eae3039d50b9b14809f73c9ee3ec483e4
Author: Dominique Dumont <dod at debian.org>
Date:   Wed May 17 16:28:24 2017 +0200

    add test for normalized copyright data
---
 .../dpkg-examples/batmon-app/debian/batmon.1       |  21 ++++
 .../dpkg-examples/batmon-app/debian/batmon.desktop |  12 +++
 .../dpkg-examples/batmon-app/debian/changelog      | 109 +++++++++++++++++++++
 .../dpkg-examples/batmon-app/debian/compat         |   1 +
 .../dpkg-examples/batmon-app/debian/control        |  22 +++++
 .../dpkg-examples/batmon-app/debian/copyright      |  29 ++++++
 .../dpkg-examples/batmon-app/debian/install        |   2 +
 .../dpkg-examples/batmon-app/debian/manpages       |   1 +
 .../dpkg-examples/batmon-app/debian/menu           |   5 +
 .../dpkg-examples/batmon-app/debian/rules          |  41 ++++++++
 .../dpkg-examples/batmon-app/debian/source/format  |   1 +
 .../dpkg-examples/batmon-app/debian/watch          |   6 ++
 t/model_tests.d/dpkg-test-conf.pl                  |  24 +++++
 t/scanner/examples/batmon.app.in                   | Bin 0 -> 1750 bytes
 t/scanner/examples/batmon.app.out                  |  20 ++++
 15 files changed, 294 insertions(+)

diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/batmon.1 b/t/model_tests.d/dpkg-examples/batmon-app/debian/batmon.1
new file mode 100644
index 0000000..1306cbd
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/batmon.1
@@ -0,0 +1,21 @@
+.TH BATMON 1 "June 27, 2010"
+.SH NAME
+batmon \- Battery monitor for GNUstep
+.SH SYNOPSIS
+.B batmon
+.RI [ options ]
+.SH DESCRIPTION
+This manual page documents briefly the
+.B batmon
+command.
+.PP
+\fBbatmon\fP is a battery monitor for laptops. It displays the current
+status of the battery (charge/discharge and energy level) as well as some
+information about the general health of the cell. 
+.SH SEE ALSO
+.BR GNUstep (7).
+.SH AUTHOR
+batmon was written by Riccardo Mottola.
+.PP
+This manual page was written by G\[:u]rkan Seng\[:u]n <gurkan at linuks.mine.nu>,
+for the Debian project (but may be used by others).
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/batmon.desktop b/t/model_tests.d/dpkg-examples/batmon-app/debian/batmon.desktop
new file mode 100644
index 0000000..8e54121
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/batmon.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=Battery Monitor (batmon)
+Name[bg]=Монитор за заряда на батерията (batmon)
+Comment=Monitor battery status
+Comment[bg]=Следене на заряда на батерията
+Keywords=battery;laptop;
+Keywords[bg]=батерия;лаптоп;
+Type=Application
+Version=1.0
+Categories=System;Monitor;
+Exec=batmon
+Icon=/usr/lib/GNUstep/Applications/batmon.app/Resources/Batmon_icon.tiff
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/changelog b/t/model_tests.d/dpkg-examples/batmon-app/debian/changelog
new file mode 100644
index 0000000..e3d3a3b
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/changelog
@@ -0,0 +1,109 @@
+batmon.app (0.7-1) unstable; urgency=medium
+
+  * New upstream release.
+  * debian/compat: Set to 9.
+  * debian/control (Build-Depends): Remove dpkg-dev, bump debhelper.
+    (Vcs-Git): Use the canonical URI.
+    (Standards-Version): Compliant with 3.9.5 as of this release.
+  * debian/rules: Update for modern dh.
+  * debian/install:
+  * debian/manpages: New file.
+  * debian/batmon.desktop: Add Keywords field.
+  * debian/copyright: Rewrite in format 1.0, update copyright years.
+
+ -- Yavor Doganov <yavor at gnu.org>  Sun, 22 Jun 2014 23:50:46 +0300
+
+batmon.app (0.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/rules: Enable hardening.
+    (binary-arch): Remove GS_USE_FHS conditional, not needed.
+  * debian/control (Build-Depends): Add dpkg-dev (>= 1.16.1~), for
+    hardening support.
+    (Vcs-Arch): Replace with...
+    (Vcs-Git): ...as the package is maintained with Git now.
+    (Vcs-Browser): New field.
+    (Standards-Version): Bump to 3.9.3, no changes necessary.
+  * debian/source/format: Switch to 3.0 (quilt).
+  * debian/copyright: Update copyright years.
+
+ -- Yavor Doganov <yavor at gnu.org>  Thu, 31 May 2012 13:51:01 +0300
+
+batmon.app (0.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * GNUmakefile: Revert all Debian modifications.
+  * debian/compat: Set to 7.
+  * debian/control (Section): Change to `gnustep'.
+    (Maintainer): Adopt package under the umbrella of the GNUstep team
+    (Closes: #453503).
+    (Uploaders): [[DebControlField new] addPerson: myself
+                             comaintainersWelcome: YES];.
+    (Build-Depends): Require debhelper >= 7.  Remove gnustep-make and
+    minimal version for libgnustep-gui-dev.  Add imagemagick for the icon
+    conversion.
+    (Depends): Add ${misc:Depends} and ${gnustep:Depends}.
+    (Description): Remove paragraph explaining the current restrictions;
+    obsolete.
+    (Vcs-Arch): New field.
+    (Standards-Version): Compliant with 3.8.4 as of this release.
+  * debian/rules: Do not use gs_make.  Use automatic variables.
+    (GNUSTEP_MAKEFILES): Export and define as a simply expanded variable.
+    (SHELL, LDFLAGS, d_app, optim): New variable.
+    (build-stamp): Pass $(optim) and messages=yes to $(MAKE).  Convert the
+    icon in XPM format.
+    (clean): Make distclean, not clean.  Delete the generated XPM icon.
+    (install): Replace dh_clean -k with dh_prep.  Do not invoke
+    dh_installdirs; useless.  Install the XPM icon.  Delete README as
+    well; not useful.  Remove .tif's executable bit.
+    (binary-arch): Pass batmon.1 to dh_installman.  Conditionally move
+    arch-independent resource to /usr/share/GNUstep.
+  * debian/dirs:
+  * debian/manpages: Delete.
+  * debian/watch:
+  * debian/source/format: New file.
+  * debian/BatMon.1: Rename as ...
+  * debian/batmon.1: ... to match the executable.  s/BatMon/batmon/g.
+  * debian/BatMon.desktop: Rename as ...
+  * debian/batmon.desktop: ... Make it valid, add Icon, adjust other
+    fields for the decapitalized name.
+  * debian/menu: Add icon and longtitle fields.
+  * debian/copyright: Update copyright holder/years.  Fix FSF's address.
+
+ -- Yavor Doganov <yavor at gnu.org>  Sun, 27 Jun 2010 11:46:48 +0300
+
+batmon.app (0.2-5) unstable; urgency=low
+
+  * QA upload.
+  * Maintainer field set to QA Group.
+  * Standards version updated.
+  * "linux" capitalized in long description.
+
+ -- Emanuele Rocca <ema at debian.org>  Thu, 17 Jul 2008 19:07:09 +0200
+
+batmon.app (0.2-4) unstable; urgency=low
+
+  * GNUstep transition. (Closes: #447467)
+    + Updated debian/rules.
+  * Added a desktop file.
+
+ -- Gürkan Sengün <gurkan at linuks.mine.nu>  Thu, 25 Oct 2007 23:28:37 +0200
+
+batmon.app (0.2-3) unstable; urgency=low
+
+  * Rebuild against latest libgnustep-gui-dev.
+  * Bump standards version.
+
+ -- Gürkan Sengün <gurkan at linuks.mine.nu>  Mon, 18 Sep 2006 22:59:25 +0200
+
+batmon.app (0.2-2) unstable; urgency=low
+
+  * Patched GNUmakefile so BatMon works.
+
+ -- Gürkan Sengün <gurkan at linuks.mine.nu>  Wed,  5 Apr 2006 14:36:36 +0200
+
+batmon.app (0.2-1) unstable; urgency=low
+
+  * Initial release. (Closes: #352096)
+
+ -- Gürkan Sengün <gurkan at linuks.mine.nu>  Sat, 21 Jan 2006 11:49:45 +0100
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/compat b/t/model_tests.d/dpkg-examples/batmon-app/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/control b/t/model_tests.d/dpkg-examples/batmon-app/debian/control
new file mode 100644
index 0000000..c3ab189
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/control
@@ -0,0 +1,22 @@
+Source: batmon.app
+Section: gnustep
+Priority: optional
+Maintainer: Debian GNUstep maintainers <pkg-gnustep-maintainers at lists.alioth.debian.org>
+Uploaders: Yavor Doganov <yavor at gnu.org>
+Build-Depends: debhelper (>= 9),
+	       libgnustep-gui-dev,
+	       imagemagick
+Standards-Version: 3.9.5
+Homepage: http://www.nongnu.org/gap/batmon/
+Vcs-Git: git://anonscm.debian.org/pkg-gnustep/batmon.app.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gnustep/batmon.app.git
+
+Package: batmon.app
+Architecture: any
+Depends: ${shlibs:Depends},
+	 ${misc:Depends},
+	 ${gnustep:Depends}
+Description: Battery monitor for GNUstep
+ Battery Monitor is a battery monitor for laptops. It displays the current
+ status of the battery (charge/discharge and energy level) as well as some
+ information about the general health of the cell. 
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/copyright b/t/model_tests.d/dpkg-examples/batmon-app/debian/copyright
new file mode 100644
index 0000000..8ffef01
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/copyright
@@ -0,0 +1,29 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: batmon
+Source: http://download.savannah.gnu.org/releases/gap/
+
+Files: *
+Copyright: 2005-2013 GNUstep Application Project
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2006-2014 Debian GNUstep maintainers
+License: GPL-2+
+
+License: GPL-2+
+ 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 of the License, or (at
+ your option) any later version.
+ .
+ This application 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
+ Library General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/install b/t/model_tests.d/dpkg-examples/batmon-app/debian/install
new file mode 100644
index 0000000..42155e2
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/install
@@ -0,0 +1,2 @@
+debian/batmon.desktop		usr/share/applications
+batmon.xpm			usr/share/pixmaps
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/manpages b/t/model_tests.d/dpkg-examples/batmon-app/debian/manpages
new file mode 100644
index 0000000..761e04f
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/manpages
@@ -0,0 +1 @@
+debian/batmon.1
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/menu b/t/model_tests.d/dpkg-examples/batmon-app/debian/menu
new file mode 100644
index 0000000..a4c6b15
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/menu
@@ -0,0 +1,5 @@
+?package(batmon.app):needs="X11" \
+  section="Applications/System/Monitoring" \
+  title="batmon" command="/usr/bin/batmon" \
+  icon="/usr/share/pixmaps/batmon.xpm" \
+  longtitle="Battery monitor for GNUstep"
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/rules b/t/model_tests.d/dpkg-examples/batmon-app/debian/rules
new file mode 100755
index 0000000..a4c57ec
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/rules
@@ -0,0 +1,41 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+SHELL := /bin/bash
+
+include /usr/share/dpkg/buildflags.mk
+include /usr/share/GNUstep/debian/config.mk
+export GNUSTEP_MAKEFILES := $(GS_MAKE_DIR)
+export GNUSTEP_INSTALLATION_DOMAIN := SYSTEM
+d_app := $(CURDIR)/debian/batmon.app
+LDFLAGS += -Wl,-z,defs -Wl,--as-needed
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+optim := debug=yes
+endif
+
+%:
+	dh $@
+
+override_dh_auto_build:
+	$(MAKE) $(optim) CPPFLAGS="$(CPPFLAGS)" OBJCFLAGS="$(CFLAGS)" \
+	  LDFLAGS="$(LDFLAGS)" messages=yes
+	convert Resources/BatMon_icon.tif -resize 32x32 batmon.xpm
+
+override_dh_clean:
+	dh_clean batmon.xpm
+
+override_dh_link:
+	gsdh_gnustep
+	dh_installdirs usr/share/GNUstep
+	rm $(d_app)$(GNUSTEP_SYSTEM_APPS)/batmon.app/Resources/{LICENSE,README}
+	rm $(d_app)$(GNUSTEP_SYSTEM_APPS)/batmon.app/Resources/*.desktop
+	mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/batmon.app/Resources \
+	  $(d_app)/usr/share/GNUstep/batmon.app
+	dh_link usr/share/GNUstep/batmon.app \
+	  $(GNUSTEP_SYSTEM_APPS)/batmon.app/Resources
+
+override_dh_fixperms:
+	dh_fixperms
+	chmod -x $(d_app)/usr/share/GNUstep/batmon.app/*.tif
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/source/format b/t/model_tests.d/dpkg-examples/batmon-app/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/t/model_tests.d/dpkg-examples/batmon-app/debian/watch b/t/model_tests.d/dpkg-examples/batmon-app/debian/watch
new file mode 100644
index 0000000..f2fc0f6
--- /dev/null
+++ b/t/model_tests.d/dpkg-examples/batmon-app/debian/watch
@@ -0,0 +1,6 @@
+# The 0.5 tarball contains useless junk (autosaved and object files),
+# which were manually cleaned and the .orig.tar.gz recreated.  They
+# cause dpkg-source errors -- upstream is now aware, so this shouldn't
+# happen in future releases.
+version=3
+http://savannah.nongnu.org/download/gap/batmon-(.*)\.tar\.gz
diff --git a/t/model_tests.d/dpkg-test-conf.pl b/t/model_tests.d/dpkg-test-conf.pl
index 6d1e4dc..9fb6e3a 100644
--- a/t/model_tests.d/dpkg-test-conf.pl
+++ b/t/model_tests.d/dpkg-test-conf.pl
@@ -89,6 +89,11 @@ sub add {
             "copyright License:GPL-2 text" => {value => undef, mode => 'custom'},
             "copyright Upstream-Name" => 'pan',
             "copyright License:GPL-2 text" => qr/GNU/,
+
+            # copyright from files or existing debian/copyright are now normalised
+            'copyright Files:pan/general/sorted-vector.h Copyright' => '2002, Martin Holzherr (holzherr at infobrain.com).',
+
+            # no space after comma because data comes from fix.scanned.copyright
             'copyright Files:pan/general/map-vector.h Copyright' => "2001,Andrei Alexandrescu",
             'copyright Files:pan/general/map-vector.h License short_name' => 'MIT',
             'copyright Files:pan/general/map-vector.h License full_license' => undef,
@@ -217,6 +222,25 @@ sub add {
         file_check_sub => add(qw/home log/),
     },
 
+    {
+        name => 'batmon-app',
+        update => { in => path('t/scanner/examples/batmon.app.in'), quiet => 1 },
+        no_warnings => 1,
+        check => {
+        },
+        # this entry is merged in debian/* *if* the Copyright coming from file is normalised
+        # Also closes #862368
+        has_not_key => [
+            'copyright Files' => 'GNUmakefile',
+        ],
+        file_check_sub => add(qw/home/),
+        file_contents_unlike => {
+            'debian/copyright' => [
+                qr!Files: GNUmakefile!,
+            ],
+        },
+    },
+
 );
 
 my $cache_file = 't/model_tests.d/dependency-cache.txt';
diff --git a/t/scanner/examples/batmon.app.in b/t/scanner/examples/batmon.app.in
new file mode 100644
index 0000000..b13f922
Binary files /dev/null and b/t/scanner/examples/batmon.app.in differ
diff --git a/t/scanner/examples/batmon.app.out b/t/scanner/examples/batmon.app.out
new file mode 100644
index 0000000..8ec8331
--- /dev/null
+++ b/t/scanner/examples/batmon.app.out
@@ -0,0 +1,20 @@
+Files: *
+Copyright: 2005-2013, GNUstep Application Project
+License: GPL-2+
+
+Files: Resources/*
+Copyright: 1989, 1991, Free Software Foundation, Inc.
+License: UNKNOWN
+
+Files: debian/*
+Copyright: Rewrite in format 1.0, update copyright years.
+License: UNKNOWN
+
+Files: debian/copyright
+Copyright: 2006-2014, Debian GNUstep maintainers / 2005-2013, GNUstep Application Project / -format/1.0
+License: GPL-2+
+
+Files: main.m
+Copyright: 2005, Free Software Foundation
+License: GPL-2+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



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