--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: unblock: devscripts/2.17.6 (pre-approval)
- From: James McCoy <jamessan@debian.org>
- Date: Sat, 27 May 2017 21:38:39 -0400
- Message-id: <149593551936.8876.9487192580284220346.reportbug@freya.jamessan.com>
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package devscripts
There are a few changes sitting in git right now that would be useful to
make it into Stretch. The full log is
https://anonscm.debian.org/git/collab-maint/devscripts.git/log/?id=v2.17.5..master
uscan/debdiff: Typos/documentation improvements (7f07b7bc, f447aafb)
chdist: Support running aptitude (f722bf62)
debcheckout: Understand cgit URLs (4e1867dc)
debrepro: Check for and inform user of missing runtime dependencies (ad90af3a)
debsign: Fix regression when signing a dsc file (51e909fd)
Additionally, there are changes to various scripts to make them work
better when $HOME isn't set by using Perl's File::HomeDir, a new
Depends (56e38636, 3ff2f9db).
The $HOME handling is the most disruptive, so I'd be willing to drop
that.
unblock devscripts/2.17.6
-- System Information:
Debian Release: 9.0
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64
(x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
debian/changelog | 30 ++++++++++++++++++++++++++++++
debian/control | 1 +
scripts/bts.pl | 2 ++
scripts/chdist.bash_completion | 6 +++---
scripts/chdist.pl | 12 ++++++++++--
scripts/debcheckout.pl | 5 +++--
scripts/debcommit.pl | 3 ++-
scripts/debdiff.pl | 2 +-
scripts/debrepro.pod | 4 ++++
scripts/debrepro.sh | 21 +++++++++++++++++++++
scripts/debsign.sh | 2 +-
scripts/dscverify.pl | 2 ++
scripts/grep-excuses.pl | 3 ++-
scripts/namecheck.pl | 8 +++++++-
scripts/rc-alert.pl | 2 ++
scripts/svnpath.pl | 7 +++++--
scripts/uscan.pl | 18 +++++++++++++++---
scripts/wnpp-alert.sh | 2 +-
18 files changed, 112 insertions(+), 18 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0c32aaac..e436d4be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,33 @@
+devscripts (2.17.6) UNRELEASED; urgency=medium
+
+ [ Osamu Aoki ]
+ * uscan:
+ + Update manpage on the github.com behavior and the alternative
+ shorthand form. (Closes: #836507, #859089)
+
+ [ Adam D. Barratt ]
+ * uscan: fix a typo in the manpage
+ * debdiff: fix a typo
+
+ [ Paul Wise ]
+ * chdist:
+ + add support for running aptitude
+ * debcheckout:
+ + handle cgit URLs too. Thanks to Rhonda for the suggestion.
+ * Make various scripts work when HOME is unset:
+ bts chdist debcommit dscverify grep-excuses
+ namecheck rc-alert svnpath wnpp-alert
+
+ [ Antonio Terceiro ]
+ * debrepro:
+ + check for dependencies before doing any builds (Closes: #862586)
+
+ [ James Clarke ]
+ * debsign:
+ + Fix signing a dsc directly. (Closes: #863497)
+
+ -- Osamu Aoki <osamu@debian.org> Fri, 31 Mar 2017 02:03:30 +0900
+
devscripts (2.17.5) unstable; urgency=medium
* Create GNUPGHOME in /tmp to fix CI failures due to long path names.
diff --git a/debian/control b/debian/control
index 52b774e9..3a2994a8 100644
--- a/debian/control
+++ b/debian/control
@@ -46,6 +46,7 @@ Package: devscripts
Architecture: any
Multi-Arch: foreign
Depends: dpkg-dev (>= 1.17.6),
+ libfile-homedir-perl,
${misc:Depends},
${perl:Depends},
${python3:Depends},
diff --git a/scripts/bts.pl b/scripts/bts.pl
index 2a650d10..a2a64c51 100755
--- a/scripts/bts.pl
+++ b/scripts/bts.pl
@@ -47,6 +47,7 @@ use strict;
use warnings;
use File::Basename;
use File::Copy;
+use File::HomeDir;
use File::Path qw(make_path rmtree);
use File::Spec;
use File::Temp qw/tempfile/;
@@ -173,6 +174,7 @@ my @valid_severities=qw(wishlist minor normal important
my $browser; # Will set if necessary
+$ENV{HOME} = File::HomeDir->my_home;
my $cachedir = $ENV{XDG_CACHE_HOME} || File::Spec->catdir($ENV{HOME}, '.cache');
$cachedir = File::Spec->catdir($cachedir, 'devscripts', 'bts');
diff --git a/scripts/chdist.bash_completion b/scripts/chdist.bash_completion
index 89773313..51dbf499 100644
--- a/scripts/chdist.bash_completion
+++ b/scripts/chdist.bash_completion
@@ -6,7 +6,7 @@ _chdist ()
{
local cur=$2 prev=$3
local options='--help -h --data-dir -d --arch -a'
- local commands='create apt apt-get apt-cache apt-rdepends
+ local commands='create apt apt-get apt-cache apt-rdepends aptitude
src2bin bin2src
compare-packages compare-bin-packages
compare-versions compare-bin-versions
@@ -14,7 +14,7 @@ _chdist ()
list'
# Sync'd with buildd.debian.org on 2016-04-02:
local archs="all alpha amd64 arm64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32"
- local dists=$(ls $HOME/.chdist 2>/dev/null)
+ local dists=$(ls ~/.chdist 2>/dev/null)
COMPREPLY=()
@@ -31,7 +31,7 @@ _chdist ()
-@(-help|h)|list)
return 0
;;
- create|apt|apt-get|apt-cache|apt-rdepends|src2bin|bin2src|compare-packages|compare-bin-packages|compare-versions|compare-bin-versions|grep-dctrl-packages|grep-dctrl-sources)
+ create|apt|apt-get|apt-cache|apt-rdepends|aptitude|src2bin|bin2src|compare-packages|compare-bin-packages|compare-versions|compare-bin-versions|grep-dctrl-packages|grep-dctrl-sources)
COMPREPLY=( $( compgen -W "$dists" -- $cur ) )
return 0
esac
diff --git a/scripts/chdist.pl b/scripts/chdist.pl
index f05126cb..832036c9 100755
--- a/scripts/chdist.pl
+++ b/scripts/chdist.pl
@@ -40,7 +40,7 @@ Provide a usage message.
=item B<-d>, B<--data-dir> I<DIR>
-Choose data directory (default: F<$HOME/.chdist/>).
+Choose data directory (default: F<~/.chdist/>).
=item B<-a>, B<--arch> I<ARCH>
@@ -80,6 +80,10 @@ Run B<apt-file> inside I<DIST>
Run B<apt-rdepends> inside I<DIST>
+=item B<aptitude> I<DIST> [...]
+
+Run B<aptitude> inside I<DIST>
+
=item B<src2bin> I<DIST SRCPKG>
List binary packages for I<SRCPKG> in I<DIST>
@@ -139,6 +143,7 @@ use warnings;
no if $] >= 5.018, 'warnings', 'experimental::smartmatch';
use feature 'switch';
use File::Copy qw(cp);
+use File::HomeDir;
use File::Path qw(make_path);
use File::Basename;
use Getopt::Long qw(:config gnu_compat bundling require_order);
@@ -177,7 +182,7 @@ License, version 2 or (at your option) any later version.
EOF
my $arch;
-my $datadir = $ENV{'HOME'} . '/.chdist';
+my $datadir = File::HomeDir->my_home . '/.chdist';
GetOptions(
"h|help" => \$help,
@@ -725,6 +730,9 @@ given ($command) {
when ('apt-rdepends') {
aptcmd('apt-rdepends', @ARGV);
}
+ when ('aptitude') {
+ aptcmd('aptitude', @ARGV);
+ }
when ('bin2src') {
bin2src(@ARGV);
}
diff --git a/scripts/debcheckout.pl b/scripts/debcheckout.pl
index 81423854..1f61aa28 100755
--- a/scripts/debcheckout.pl
+++ b/scripts/debcheckout.pl
@@ -455,7 +455,7 @@ sub set_auth($$$$) {
$url =~ s@(?:alioth\.debian\.org/(?:anonscm/bzr|scm/loggerhead/bzr)|anonscm\.debian\.org/bzr(?:/bzr)?)@bzr.debian.org/bzr@;
$url =~ s@(?:alioth\.debian\.org/anonscm/darcs|anonscm\.debian\.org/darcs)@darcs.debian.org/darcs@;
$url =~ s@git://anonscm\.debian\.org@git://git.debian.org@;
- $url =~ s@(?:alioth\.debian\.org/anonscm/git|anonscm\.debian\.org/git)@git.debian.org/git@;
+ $url =~ s@(?:alioth\.debian\.org/anonscm/c?git|anonscm\.debian\.org/c?git)@git.debian.org/git@;
$url =~ s@(?:alioth\.debian\.org/anonscm/hg|anonscm\.debian\.org/hg)@hg.debian.org/hg@;
$url =~ s@svn://(?:scm\.alioth|anonscm)\.debian\.org@svn://svn.debian.org@;
@@ -971,8 +971,9 @@ sub guess_repo_type($$) {
$repo_type = $1;
} elsif ($repo_url =~ /^https?:\/\/(svn|git|hg|bzr|darcs)\.debian\.org/) {
$repo_type = $1;
- } elsif ($repo_url =~ m@^https?://anonscm.debian.org/(svn|git|hg|bzr|darcs)/@) {
+ } elsif ($repo_url =~ m@^https?://anonscm.debian.org/(svn|c?git|hg|bzr|darcs)/@) {
$repo_type = $1;
+ $repo_type =~ s/cgit/git/;
}
return $repo_type;
}
diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl
index d899ca19..f1d89634 100755
--- a/scripts/debcommit.pl
+++ b/scripts/debcommit.pl
@@ -185,6 +185,7 @@ use strict;
use Getopt::Long qw(:config bundling permute no_getopt_compat);
use Cwd;
use File::Basename;
+use File::HomeDir;
use File::Temp;
my $progname = basename($0);
@@ -460,7 +461,7 @@ sub getprog {
}
# Test for this file to avoid interactive prompting from svk.
- if (-d "$ENV{HOME}/.svk/local") {
+ if (-d File::HomeDir->my_home."/.svk/local") {
# svk has no useful directories so try to run it.
my $svkpath=`svk info . 2>/dev/null| grep -i '^Depot Path:' | cut -d ' ' -f 3`;
if (length $svkpath) {
diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl
index ab49633c..544de0fe 100755
--- a/scripts/debdiff.pl
+++ b/scripts/debdiff.pl
@@ -367,7 +367,7 @@ if (! $type) {
}
# We collect up the individual deb information in the hashes
-# %deb1 and %deb2, each key of which is a .deb name and each value is
+# %debs1 and %debs2, each key of which is a .deb name and each value is
# a list ref. Note we need to use our, not my, as we will be symbolically
# referencing these variables
my @CommonDebs = ();
diff --git a/scripts/debrepro.pod b/scripts/debrepro.pod
index 398757ad..80fa2a02 100644
--- a/scripts/debrepro.pod
+++ b/scripts/debrepro.pod
@@ -120,6 +120,10 @@ Package is not reproducible.
The given input is not a valid Debian source package.
+=item 3Z<>
+
+Required programs are missing.
+
=back
=head1 SEE ALSO
diff --git a/scripts/debrepro.sh b/scripts/debrepro.sh
index 80757b91..298d25a1 100755
--- a/scripts/debrepro.sh
+++ b/scripts/debrepro.sh
@@ -19,6 +19,25 @@
set -eu
+check_dependencies() {
+ for optional in disorderfs diffoscope; do
+ if ! which "$optional" > /dev/null; then
+ echo "W: $optional not installed, there will be missing functionality" >&2
+ fi
+ done
+
+ local failed=''
+ for mandatory in faketime; do
+ if ! which "$mandatory" > /dev/null; then
+ echo "E: $mandatory not installed, cannot proceed." >&2
+ failed=yes
+ fi
+ done
+ if [ -n "$failed" ]; then
+ exit 3
+ fi
+}
+
usage() {
echo "usage: $0 [OPTIONS] [SOURCEDIR]"
echo ""
@@ -190,6 +209,8 @@ fi
tmpdir=$(mktemp --directory --tmpdir debrepro.XXXXXXXXXX)
trap "echo; echo 'I: artifacts left in $tmpdir'" INT TERM EXIT
+check_dependencies
+
banner "First build"
build first
diff --git a/scripts/debsign.sh b/scripts/debsign.sh
index 0717bead..924b03eb 100755
--- a/scripts/debsign.sh
+++ b/scripts/debsign.sh
@@ -725,7 +725,7 @@ for valid format" >&2;
report_signed
else
- ensure_local_copy "$remotehost" "$remotehost" "$remotedsc" dsc
+ ensure_local_copy "$remotehost" "$remotedsc" "$dsc" dsc
signas="$(guess_signas "$dsc")"
maybesign_dsc "$signas" "$remotehost" "$dsc"
report_signed
diff --git a/scripts/dscverify.pl b/scripts/dscverify.pl
index 45f2c605..45fb0eb4 100755
--- a/scripts/dscverify.pl
+++ b/scripts/dscverify.pl
@@ -28,6 +28,7 @@ use Cwd;
use Fcntl;
use Digest::MD5;
use Dpkg::IPC;
+use File::HomeDir;
use File::Spec;
use File::Temp;
use File::Basename;
@@ -94,6 +95,7 @@ sub get_rings {
my @rings = @_;
my @keyrings = qw(/usr/share/keyrings/debian-keyring.gpg
/usr/share/keyrings/debian-maintainers.gpg);
+ $ENV{HOME} = File::HomeDir->my_home;
if (defined $ENV{HOME} && -r "$ENV{HOME}/.gnupg/trustedkeys.gpg") {
unshift(@keyrings, "$ENV{HOME}/.gnupg/trustedkeys.gpg");
}
diff --git a/scripts/grep-excuses.pl b/scripts/grep-excuses.pl
index adeeebd2..8a4308fa 100755
--- a/scripts/grep-excuses.pl
+++ b/scripts/grep-excuses.pl
@@ -22,6 +22,7 @@ use 5.006;
use strict;
use warnings;
use File::Basename;
+use File::HomeDir;
# Needed for --wipnity option
@@ -57,7 +58,7 @@ my $rmurl='https://udd.debian.org/cgi-bin/autoremovals.cgi';
my $rmurl_yaml='https://udd.debian.org/cgi-bin/autoremovals.yaml.cgi';
# No longer use these - see bug#309802
-my $cachedir = $ENV{'HOME'}."/.devscripts_cache/";
+my $cachedir = File::HomeDir->my_home."/.devscripts_cache/";
my $cachefile = $cachedir . basename($url);
unlink $cachefile if -f $cachefile;
diff --git a/scripts/namecheck.pl b/scripts/namecheck.pl
index e6ac5e6a..a49c9ba6 100755
--- a/scripts/namecheck.pl
+++ b/scripts/namecheck.pl
@@ -53,6 +53,12 @@ use LWP::UserAgent;
#
+# A module for finding the user home dir.
+#
+use File::HomeDir;
+
+
+#
# Get the name from the command line.
#
my $name = shift;
@@ -95,7 +101,7 @@ exit;
sub loadPatterns
{
- my $file = $ENV{ 'HOME' } . "/.namecheckrc";
+ my $file = File::HomeDir->my_home . "/.namecheckrc";
my @lines = ();
if ( -e $file )
diff --git a/scripts/rc-alert.pl b/scripts/rc-alert.pl
index 3b316722..5fa4fffc 100755
--- a/scripts/rc-alert.pl
+++ b/scripts/rc-alert.pl
@@ -24,6 +24,7 @@ use warnings;
use Devscripts::Packages;
use File::Basename;
use File::Copy qw(move);
+use File::HomeDir;
use File::Path qw(make_path);
use File::Spec;
use Getopt::Long qw(:config bundling permute no_getopt_compat);
@@ -34,6 +35,7 @@ sub human_flags($);
sub unhtmlsanit($);
sub dt_parse_request($);
+$ENV{HOME} = File::HomeDir->my_home;
my $cachedir = $ENV{XDG_CACHE_HOME} || File::Spec->catdir($ENV{HOME}, '.cache');
$cachedir = File::Spec->catdir($cachedir, 'devscripts', 'rc-alert');
diff --git a/scripts/svnpath.pl b/scripts/svnpath.pl
index 99148e90..f9b48385 100755
--- a/scripts/svnpath.pl
+++ b/scripts/svnpath.pl
@@ -56,6 +56,8 @@ For example, the author uses this file:
=cut
+use File::HomeDir;
+
$ENV{LANG}="C";
my $wanted=shift;
@@ -79,8 +81,9 @@ if (length $wanted) {
# Now jut substitute into it.
$url=~s!/(?:trunk|branches|tags)($|/)!/$wanted$1!;
- if (-e "$ENV{HOME}/.svnpath") {
- require "$ENV{HOME}/.svnpath";
+ my $svnpath = File::HomeDir->my_home."/.svnpath";
+ if (-e $svnpath) {
+ require $svnpath;
}
}
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 8bd52739..dd1f4231 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -885,7 +885,16 @@ watch file:
Text-CSV_XS-(.+)\.tar\.gz \
debian uupdate
-can be rewritten in an alternative shorthand form:
+can be rewritten in an alternative shorthand form only with a single string
+covering URL and filename:
+
+ version=4
+ opts="pgpsigurlmangle=s%$%.sig%" \
+ http://www.cpan.org/modules/by-module/Text/Text-CSV_XS-(.+)\.tar\.gz \
+ debian uupdate
+
+In version=4, initial white spaces are dropped. Thus, this alternative
+shorthand form can also be written as:
version=4
opts="pgpsigurlmangle=s%$%.sig%" \
@@ -893,8 +902,8 @@ can be rewritten in an alternative shorthand form:
Text-CSV_XS-(.+)\.tar\.gz \
debian uupdate
-Please note that I<matching-pattern> of the first example doesn't have
-directory and the subtle difference of a space before the tailing B<\>.
+Please note the subtle difference of a space before the tailing B<\>
+between the first and the last examples.
=head2 HTTP site (funny version)
@@ -1066,6 +1075,9 @@ B<filenamemangle>:
https://github.com/<user>/<project>/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
+Note that the "tags" downloads do not include Git submodules in the .tar.gz
+whilst the "releases" do.
+
=head2 PyPI
For PyPI based projects, pypi.debian.net runs a redirector which allows a
diff --git a/scripts/wnpp-alert.sh b/scripts/wnpp-alert.sh
index 6132dd2c..e3a53125 100755
--- a/scripts/wnpp-alert.sh
+++ b/scripts/wnpp-alert.sh
@@ -19,7 +19,7 @@ PROGNAME="${0##*/}"
# TODO: Remove use of OLDCACHEDDIR post-Stretch
OLDCACHEDIR=~/.devscripts_cache
OLDCACHEDDIFF="${OLDCACHEDIR}/wnpp-diff"
-CACHEDIR=${XDG_CACHE_HOME:-$HOME/.cache}
+CACHEDIR=${XDG_CACHE_HOME:-~/.cache}
CACHEDIR=${CACHEDIR%/}/devscripts
CACHEDDIFF="${CACHEDIR}/wnpp-diff"
CURLORWGET=""
--- End Message ---