Your message dated Wed, 16 Nov 2011 03:08:31 +0000
with message-id <[email protected]>
and subject line Bug#599777: fixed in devscripts 2.11.2
has caused the Debian Bug report #599777,
regarding [new] dep3changelog: Generate changelog entry from DEP3 patch
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
599777: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599777
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: devscripts
Version: 2.10.64
Severity: minor
Please find attached a proposed patch for a new script, dep3changelog, which
takes a DEP3-style patch header and synthesizes a changelog entry. This
saves a lot of tedious work writing both a patch header and a changelog
entry with identical information. I think it would be nice to have this
included in devscripts for others' use.
--- ~/.devscripts ---
DEBCHANGE_RELEASE_HEURISTIC=changelog
DEBCHANGE_FORCE_SAVE_ON_RELEASE=no
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages devscripts depends on:
ii dpkg-dev 1.15.7.2 Debian package development tools
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii perl 5.10.1-14 Larry Wall's Practical Extraction
Versions of packages devscripts recommends:
ii at 3.1.12-1 Delayed job execution and batch pr
ii bsd-mailx [mailx] 8.1.2-0.20100314cvs-1 simple mail user agent
ii bzr 2.1.2-1 easy to use distributed version co
ii curl 7.21.0-1 Get a file from an HTTP, HTTPS or
ii cvs 1:1.12.13-12 Concurrent Versions System
ii dctrl-tools 2.14 Command-line tools to process Debi
ii debian-keyring [d 2010.06.08 GnuPG (and obsolete PGP) keys of D
ii dput 0.9.6.1 Debian package upload tool
ii equivs 2.0.8 Circumvent Debian package dependen
ii fakeroot 1.14.4-1 Gives a fake root environment
ii galeon [www-brows 2.0.7-2.1+b1 GNOME web browser for advanced use
ii git [git-core] 1:1.7.1-1 fast, scalable, distributed revisi
ii git-core 1:1.7.1-1 fast, scalable, distributed revisi
ii gnupg 1.4.10-4 GNU privacy guard - a free PGP rep
ii iceape-browser [w 2.0.5-1 Iceape Navigator (Internet browser
ii iceweasel [www-br 3.5.10-1 Web browser based on Firefox
ii libauthen-sasl-pe 2.1500-1 Authen::SASL - SASL Authentication
ii libcrypt-ssleay-p 0.57-2 Support for https protocol in LWP
ii libjson-perl 2.21-1 Perl module to parse and convert t
ii libparse-debcontr 2.005-2 Easy OO parsing of Debian control-
ii libsoap-lite-perl 0.712-1 Perl implementation of a SOAP clie
ii libterm-size-perl 0.2-4+b1 Perl extension for retrieving term
ii libtimedate-perl 1.2000-1 collection of modules to manipulat
ii liburi-perl 1.54-1 module to manipulate and access UR
ii libwww-perl 5.836-1 Perl HTTP/WWW client/server librar
ii libyaml-syck-perl 1.09-1 Perl module providing a fast, ligh
ii lintian 2.4.3 Debian package checker
ii lsb-release 3.2-23.1 Linux Standard Base version report
ii lynx-cur [www-bro 2.8.8dev.4-2 Text-mode WWW Browser with NLS sup
ii lzma 4.43-14 Compression method of 7z format in
ii mailx 1:20081101-2 Transitional package for mailx ren
ii man-db 2.5.7-3 on-line manual pager
ii mercurial 1.6-2 scalable distributed version contr
ii openssh-client [s 1:5.5p1-4 secure shell (SSH) client, for sec
ii patch 2.6-2 Apply a diff file to an original
ii patchutils 0.3.1-2 Utilities to work with patches
ii sensible-utils 0.0.4 Utilities for sensible alternative
ii strace 4.5.20-2 A system call tracer
ii subversion 1.6.12dfsg-1 Advanced version control system
ii tla 1.3.5+dfsg-15 GNU Arch revision control system
ii unzip 6.0-4 De-archiver for .zip files
ii w3m [www-browser] 0.5.2-6 WWW browsable pager with excellent
ii wdiff 0.6.3-1 Compares two files word by word
ii wget 1.12-2 retrieves files from the web
ii xz-utils 4.999.9beta+20100527-1 XZ-format compression utilities
Versions of packages devscripts suggests:
ii build-essential 11.5 Informational list of build-essent
pn cvs-buildpackage <none> (no description available)
pn devscripts-el <none> (no description available)
ii gnuplot 4.4.0-1 A command-line driven interactive
ii libfile-desktopentry-perl 0.04-2 Perl module to handle freedesktop
pn libnet-smtp-ssl-perl <none> (no description available)
ii mutt 1.5.20-9 text-based mailreader supporting M
ii svn-buildpackage 0.8.1 helper programs to maintain Debian
ii w3m 0.5.2-6 WWW browsable pager with excellent
-- no debconf information
>From 1fa018d9b4ae3ea3fd014b473953ab27dd0d972d Mon Sep 17 00:00:00 2001
From: Steve Langasek <[email protected]>
Date: Fri, 3 Sep 2010 00:05:52 -0700
Subject: [PATCH] new script dep3changelog, which parses a DEP3 patch header and
feeds a suitable changelog entry to dch.
---
debian/changelog | 4 +
debian/control | 1 +
scripts/dep3changelog.pl | 186 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 191 insertions(+), 0 deletions(-)
create mode 100755 scripts/dep3changelog.pl
diff --git a/debian/changelog b/debian/changelog
index 2b97d83..41ac0b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,10 @@ devscripts (2.10.69) UNRELEASED; urgency=low
what should be written inside of source files.
(Closes: #502512)
+ [ Steve Langasek ]
+ * new script dep3changelog, which parses a DEP3 patch header and feeds a
+ suitable changelog entry to dch.
+
-- Patrick Schoenfeld <[email protected]> Thu, 07 Oct 2010 13:48:06 +0200
devscripts (2.10.68) unstable; urgency=low
diff --git a/debian/control b/debian/control
index e2466e8..3fe99b0 100644
--- a/debian/control
+++ b/debian/control
@@ -80,6 +80,7 @@ Description: scripts to make the life of a Debian Package
maintainer easier
lintian, gnupg]
- deb-reversion: increases a binary package version number and repacks the
archive
+ - dep3changelog: generate a changelog entry from a DEP3-style patch header
- desktop2menu: produce a skeleton menu file from a freedesktop.org
desktop file [libfile-desktopentry-perl]
- dget: downloads Debian source and binary packages [wget | curl]
diff --git a/scripts/dep3changelog.pl b/scripts/dep3changelog.pl
new file mode 100755
index 0000000..a88eef7
--- /dev/null
+++ b/scripts/dep3changelog.pl
@@ -0,0 +1,186 @@
+#! /usr/bin/perl -w
+
+# dep3changelog: extract a DEP3 patch header from the named file and
+# automatically update debian/changelog with a suitable entry
+#
+# Copyright 2010 Steve Langasek <[email protected]>
+#
+# 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+use 5.008; # We're using PerlIO layers
+use strict;
+use open ':utf8'; # patch headers are required to be UTF-8
+
+# for checking whether user names are valid and making format() behave
+use Encode qw/decode_utf8 encode_utf8/;
+use Getopt::Long;
+use File::Basename;
+
+# Predeclare functions
+my $warnings = 0;
+
+# And global variables
+my $progname = basename($0);
+my %env;
+
+sub usage () {
+ print <<"EOF";
+Usage: $progname patch [patch...] [options] [-- [dch options]]
+Options:
+ --help, -h
+ Display this help message and exit
+ --version
+ Display version information
+ Additional options specified after -- are passed to dch.
+EOF
+}
+
+sub version () {
+ print <<"EOF";
+This is $progname, from the Debian devscripts package, version ###VERSION###
+This code is copyright 2010 by Steve Langasek, all rights reserved.
+This program comes with ABSOLUTELY NO WARRANTY.
+You are free to redistribute this code under the terms of the
+GNU General Public License, version 2 or later.
+EOF
+}
+
+my ($opt_help, $opt_version);
+GetOptions("help|h" => \$opt_help,
+ "version" => \$opt_version,
+)
+or die "Usage: $progname patch [... patch] [-- [dch options]]\nRun $progname
--help for more details\n";
+
+if ($opt_help) { usage; exit 0; }
+if ($opt_version) { version; exit 0; }
+
+my @patches;
+
+while (@ARGV && $ARGV[0] !~ /^-/) {
+ push(@patches,shift(@ARGV));
+}
+
+# Check, sanitise and decode these environment variables
+check_env_utf8('DEBFULLNAME');
+check_env_utf8('NAME');
+check_env_utf8('DEBEMAIL');
+check_env_utf8('EMAIL');
+
+if (exists $env{'DEBEMAIL'} and $env{'DEBEMAIL'} =~ /^(.*)\s+<(.*)>$/) {
+ $env{'DEBFULLNAME'} = $1 unless exists $env{'DEBFULLNAME'};
+ $env{'DEBEMAIL'} = $2;
+}
+if (! exists $env{'DEBEMAIL'} or ! exists $env{'DEBFULLNAME'}) {
+ if (exists $env{'EMAIL'} and $env{'EMAIL'} =~ /^(.*)\s+<(.*)>$/) {
+ $env{'DEBFULLNAME'} = $1 unless exists $env{'DEBFULLNAME'};
+ $env{'EMAIL'} = $2;
+ }
+}
+
+my $fullname = '';
+my $email = '';
+
+if (exists $env{'DEBFULLNAME'}) {
+ $fullname = $env{'DEBFULLNAME'};
+} elsif (exists $env{'NAME'}) {
+ $fullname = $env{'NAME'};
+} else {
+ my @pw = getpwuid $<;
+ if ($pw[6]) {
+ if (my $pw = decode_utf8($pw[6])) {
+ $pw =~ s/,.*//;
+ $fullname = $pw;
+ } else {
+ warn "$progname warning: passwd full name field for uid
$<\nis not UTF-8 encoded; ignoring\n";
+ $warnings++;
+ }
+ }
+}
+
+if (exists $env{'DEBEMAIL'}) {
+ $email = $env{'DEBEMAIL'};
+} elsif (exists $env{'EMAIL'}) {
+ $email = $env{'EMAIL'};
+}
+
+for my $patch (@patches) {
+ my $shebang = 0;
+ my $dpatch = 0;
+ # TODO: more than one debian or launchpad bug in a patch?
+ my ($description,$author,$debbug,$lpbug,$origin);
+
+ next unless (open PATCH, $patch);
+ while (<PATCH>) {
+ # first line only
+ if (!$shebang) {
+ $shebang = 1;
+ if (/^#!/) {
+ $dpatch = $shebang = 1;
+ next;
+ }
+ }
+ last if (/^---/ || /^\s*$/);
+ chomp;
+ # only if there was a shebang do we strip comment chars
+ s/^# // if ($dpatch);
+ # fixme: this should only apply to the description field.
+ next if (/^ /);
+
+ if (/^(Description|Subject):\s+(.*)\s*/) {
+ $description = $2;
+ } elsif (/^(Author|From):\s+(.*)\s*/) {
+ $author = $2;
+ } elsif (/^Origin:\s+(.*)\s*/) {
+ $origin = $1;
+ } elsif
(/^bug-debian:\s+http:\/\/bugs\.debian\.org\/([0-9]+)\s*/i) {
+ $debbug = $1;
+ } elsif
(/^bug-ubuntu:\s+https:\/\/.*launchpad\.net\/.*\/([0-9]+)\s*/i) {
+ $lpbug = $1;
+ }
+ }
+ close PATCH;
+ if (!$description || (!$origin && !$author)) {
+ print STDERR "$patch: Invalid DEP3 header\n";
+ next;
+ }
+ my $changelog = "$patch: $description";
+ $changelog .= '.' unless ($changelog =~ /\.$/);
+ if ($author && $author ne $fullname && $author ne "$fullname <$email>")
+ {
+ $changelog .= " Thanks to $author.";
+ }
+ if ($debbug || $lpbug) {
+ $changelog .= ' Closes';
+ $changelog .= ": #$debbug" if ($debbug);
+ $changelog .= "," if ($debbug && $lpbug);
+ $changelog .= " LP: #$lpbug" if ($lpbug);
+ $changelog .= '.';
+ }
+ system('dch',$changelog,@ARGV);
+}
+
+# Is the environment variable valid or not?
+sub check_env_utf8 {
+ my $envvar = $_[0];
+
+ if (exists $ENV{$envvar} and $ENV{$envvar} ne '') {
+ if (! decode_utf8($ENV{$envvar})) {
+ warn "$progname warning: environment variable $envvar not UTF-8
encoded; ignoring\n";
+ } else {
+ $env{$envvar} = decode_utf8($ENV{$envvar});
+ }
+ }
+}
--
1.7.1
--- End Message ---
--- Begin Message ---
Source: devscripts
Source-Version: 2.11.2
We believe that the bug you reported is fixed in the latest version of
devscripts, which is due to be installed in the Debian FTP archive:
devscripts_2.11.2.dsc
to main/d/devscripts/devscripts_2.11.2.dsc
devscripts_2.11.2.tar.gz
to main/d/devscripts/devscripts_2.11.2.tar.gz
devscripts_2.11.2_amd64.deb
to main/d/devscripts/devscripts_2.11.2_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
James McCoy <[email protected]> (supplier of updated devscripts package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Tue, 15 Nov 2011 21:36:40 -0500
Source: devscripts
Binary: devscripts
Architecture: source amd64
Version: 2.11.2
Distribution: unstable
Urgency: low
Maintainer: Devscripts Devel Team <[email protected]>
Changed-By: James McCoy <[email protected]>
Description:
devscripts - scripts to make the life of a Debian Package maintainer easier
Closes: 376595 509983 515058 599777 625990 631713 638602 639204 639813 640782
641497 641979 644983 646562 647524 647526 647527 648654
Changes:
devscripts (2.11.2) unstable; urgency=low
.
[ Gerfried Fuchs ]
* Remove the word "of" from the BSD 3 clause check, it might not be in
there.
.
[ James McCoy ]
* Remove support for PGP-style commands from debsign/debrsign. (Closes:
#639204)
+ DEBSIGN_SIGNLIKE config variable removed
* Update scripts to use GNU getopt-compatible option parsing. (Closes:
#641979)
+ For Perl scripts, use Getopt::Long's "gnu_compat" and "bundling" modes.
When allowed, also use "permute" for full GNU getopt compatibility.
+ For shell scripts, use getopt instead of manual option parsing.
- Update uses of getopt to show usage when getopt fails.
* licensecheck:
+ Recognize more generated files, MIT/X11 variants, Microsoft Permissive
License (Ms-PL), and a libpng variant. Thanks to Paweł Hajdan, Jr for
the patches. (Closes: #641497, #647524, #647526, #647527)
* debchange: Document that only `$1' backreference replacements are
supported. Thanks to Matthijs Kooijman for the patch. (Closes: #639813)
* mergechanges: Use awk instead of sed to handle massaging the final output
so we can better control the processing. (Closes: #640782)
* uscan: Fully support lzma and xz tarballs. Based on a patch from Tanguy
Ortolo. (Closes: #631713)
* debi: Document --multi, --with-depends, and --tool in the man page.
(Closes: #644983)
* dd-list:
+ Correctly handle maintainer names which have a comma. (Closes: #646562)
+ Sort results by full-name instead of trying to parse the names.
(Closes: #638602)
+ Parse sources files directly instead of invoking apt-cache. (Closes:
#376595)
+ Allow specifying which sources files to read. (Closes: #509983)
* Remove references to obsolete PGP keyrings in who-uploads/dscverify.
* who-uploads: Don't check for default keyrings with --no-default-keyrings.
(Closes: #515058)
.
[ Stefano Rivera ]
* debchange: Add precise as a recognised Ubuntu distro.
.
[ David Prévot ]
* bts: Remove outdated information from documentation for owner command.
(Closes: #625990)
.
[ Steve Langasek ]
* new script dep3changelog, which parses a DEP3 patch header and feeds a
suitable changelog entry to dch. (Closes: #599777)
.
[ Michael Prokop ]
* debcheckout: Use DESTDIR also for debian/ only VCS packages. (Closes:
648654)
Checksums-Sha1:
8360812e802e5f342bd19391ef80d0eb7899f637 1626 devscripts_2.11.2.dsc
8e9e930f913ba27b0ae27794b35fcb834e9fcf9c 769865 devscripts_2.11.2.tar.gz
c3bd3438b8d8d0ecd06a77e3e47656d44cce9685 697928 devscripts_2.11.2_amd64.deb
Checksums-Sha256:
f1d38c76cdcc0200adf3ea797a8e39e205c79f61ebd35d12413b1e0c1fbcfe89 1626
devscripts_2.11.2.dsc
4292c2c384315868357d0d3851f71f48e7b6ddf1ede1ca2d65774165b7397228 769865
devscripts_2.11.2.tar.gz
de6436b9632a1efa6d98ef3ad1655e4e307bd98e841e8c60ed3b058bdc20d067 697928
devscripts_2.11.2_amd64.deb
Files:
84d80b31df1e3726a8d12eb03be33dbd 1626 devel optional devscripts_2.11.2.dsc
dd5d5219c16cc24c1df56e2081369872 769865 devel optional devscripts_2.11.2.tar.gz
86a452ca3483c41569d7080842e1ddcc 697928 devel optional
devscripts_2.11.2_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk7DJyAACgkQDb3UpmEybUALFACdH9ACSgRFquRfqy3A+jll7WsM
hfYAn38Q9UjVx6MrWCqbie6VOXUt2gva
=OdHa
-----END PGP SIGNATURE-----
--- End Message ---