mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* pull-debian-debdiff:
- parse .dsc file for required source files. - switch to GPLv3 * debian/control: add Depends needed for pull-debian-debdiff. * debian/copyright: - updated pull-debian-debdiff, which is now GPLv3. - adjusted Copyright lines to make lintian happy.
This commit is contained in:
parent
62c5cb5f0b
commit
b1669fec32
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -40,8 +40,15 @@ ubuntu-dev-tools (0.31) UNRELEASED; urgency=low
|
|||||||
* what-patch:
|
* what-patch:
|
||||||
- restore previous output behavior, added logic to verbose test instead.
|
- restore previous output behavior, added logic to verbose test instead.
|
||||||
- added details for each patch system report.
|
- added details for each patch system report.
|
||||||
|
* pull-debian-debdiff:
|
||||||
|
- parse .dsc file for required source files.
|
||||||
|
- switch to GPLv3
|
||||||
|
* debian/control: add Depends needed for pull-debian-debdiff.
|
||||||
|
* debian/copyright:
|
||||||
|
- updated pull-debian-debdiff, which is now GPLv3.
|
||||||
|
- adjusted Copyright lines to make lintian happy.
|
||||||
|
|
||||||
-- Kees Cook <kees@ubuntu.com> Fri, 13 Jun 2008 11:10:44 -0700
|
-- Kees Cook <kees@ubuntu.com> Fri, 13 Jun 2008 11:43:24 -0700
|
||||||
|
|
||||||
ubuntu-dev-tools (0.30) hardy; urgency=low
|
ubuntu-dev-tools (0.30) hardy; urgency=low
|
||||||
|
|
||||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -13,7 +13,7 @@ Standards-Version: 3.7.3
|
|||||||
Package: ubuntu-dev-tools
|
Package: ubuntu-dev-tools
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Section: devel
|
Section: devel
|
||||||
Depends: ${python:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.25), python-debian, dctrl-tools, lsb-release
|
Depends: ${python:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.25), python-debian, dctrl-tools, lsb-release, diffstat, dpkg-dev
|
||||||
Recommends: bzr, pbuilder, reportbug (>= 3.39ubuntu1)
|
Recommends: bzr, pbuilder, reportbug (>= 3.39ubuntu1)
|
||||||
Conflicts: devscripts (<< 2.10.7ubuntu5)
|
Conflicts: devscripts (<< 2.10.7ubuntu5)
|
||||||
Replaces: devscripts (<< 2.10.7ubuntu5)
|
Replaces: devscripts (<< 2.10.7ubuntu5)
|
||||||
|
30
debian/copyright
vendored
30
debian/copyright
vendored
@ -21,23 +21,23 @@ Upstream Authors:
|
|||||||
|
|
||||||
Copyright:
|
Copyright:
|
||||||
|
|
||||||
Canonical Ltd. 2006-2008
|
(C) 2006-2008, Canonical Ltd.
|
||||||
Albert Damen <albrt@gmx.net> 2007
|
(C) 2007, Albert Damen <albrt@gmx.net>
|
||||||
Albin Tonnerre <lut1n.tne@gmail.com> 2006-2007
|
(C) 2006-2007, Albin Tonnerre <lut1n.tne@gmail.com>
|
||||||
Daniel Holbach <daniel.holbach@ubuntu.com> 2006-2007
|
(C) 2006-2007, Daniel Holbach <daniel.holbach@ubuntu.com>
|
||||||
Luke Yelavich <themuso@ubuntu.com> 2006-2007
|
(C) 2006-2007, Luke Yelavich <themuso@ubuntu.com>
|
||||||
Martin Pitt <martin.pitt@ubuntu.com> 2007
|
(C) 2007, Martin Pitt <martin.pitt@ubuntu.com>
|
||||||
Michael Bienia <geser@ubuntu.com> 2006-2007
|
(C) 2006-2007, Michael Bienia <geser@ubuntu.com>
|
||||||
Kees Cook <kees@ubuntu.com> 2006-2008
|
(C) 2006-2008, Kees Cook <kees@ubuntu.com>
|
||||||
Pete Savage <petesavage@ubuntu.com> 2006-2007
|
(C) 2006-2007, Pete Savage <petesavage@ubuntu.com>
|
||||||
Siegfried-A. Gevatter <rainct@ubuntu.com> 2007-2008
|
(C) 2007-2008, Siegfried-A. Gevatter <rainct@ubuntu.com>
|
||||||
Terence Simpson <stdin@stdin.me.uk> 2007
|
(C) 2007, Terence Simpson <stdin@stdin.me.uk>
|
||||||
|
|
||||||
Licenses:
|
Licenses:
|
||||||
|
|
||||||
404main, check-symbols, dch-repeat, dgetlp, mk-sbuild-lv, pbuilder-dist,
|
404main, check-symbols, dch-repeat, dgetlp, mk-sbuild-lv, pbuilder-dist,
|
||||||
pull-debian-debdiff, requestsync, reverse-build-depends, submittodebian,
|
requestsync, reverse-build-depends, submittodebian, update-maintainer
|
||||||
update-maintainer and what-patch are licensed under GPLv2:
|
and what-patch are licensed under GPLv2:
|
||||||
|
|
||||||
This package is free software; you can redistribute it and/or modify
|
This package is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -51,8 +51,8 @@ update-maintainer and what-patch are licensed under GPLv2:
|
|||||||
On Debian systems, the complete text of the GNU General Public License v2
|
On Debian systems, the complete text of the GNU General Public License v2
|
||||||
can be found in `/usr/share/common-licenses/GPL-2'.
|
can be found in `/usr/share/common-licenses/GPL-2'.
|
||||||
|
|
||||||
get-branches, get-build-deps, massfile, ppaput and suspicious-source
|
get-branches, get-build-deps, debian-pull-debdiff, massfile, ppaput and
|
||||||
are licensed under GPLv3:
|
suspicious-source are licensed under GPLv3:
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# Copyright 2007 (C) Kees Cook <kees@ubuntu.com>
|
# Copyright 2007-2008 Kees Cook <kees@ubuntu.com>
|
||||||
# License: GPLv2
|
# License GPLv3
|
||||||
#
|
#
|
||||||
# This script attempts to find and download a specific version of a Debian
|
# This script attempts to find and download a specific version of a Debian
|
||||||
# package and its immediate parent to generate a debdiff.
|
# package and its immediate parent to generate a debdiff.
|
||||||
#
|
#
|
||||||
# Requirements: devscripts diffstat dpkg-dev
|
# Requirements: devscripts diffstat dpkg-dev
|
||||||
#
|
|
||||||
# Cleanups needed:
|
|
||||||
# - general cleanup
|
|
||||||
# - parse diff.gz/orig.tar.gz from .dsc file instead of guessing version
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -20,28 +16,36 @@ sub geturls
|
|||||||
my $file;
|
my $file;
|
||||||
|
|
||||||
$file = "${pkg}_${version}.dsc";
|
$file = "${pkg}_${version}.dsc";
|
||||||
|
print "Want '$file'\n";
|
||||||
|
if (! -r "$file") {
|
||||||
warn "Trying $urlbase/$file ...\n";
|
warn "Trying $urlbase/$file ...\n";
|
||||||
if (! -r "$file") {
|
|
||||||
|
|
||||||
system("wget $urlbase/$file");
|
system("wget $urlbase/$file");
|
||||||
return 0 if ($? != 0);
|
return 0 if ($? != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
warn "Pulling source of $urlbase/$file ...\n";
|
# Parse the .dsc file for list of required files...
|
||||||
|
my @needed;
|
||||||
|
open(DSC,"$file") || return 0;
|
||||||
|
while (my $line=<DSC>) {
|
||||||
|
if ($line =~ /^Files:/) {
|
||||||
|
while (my $file=<DSC>) {
|
||||||
|
chomp($file);
|
||||||
|
last if ($file !~ /^ /);
|
||||||
|
my @parts = split(/\s+/,$file);
|
||||||
|
my $want = pop(@parts);
|
||||||
|
print "Want '$want'\n";
|
||||||
|
push(@needed,$want);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(DSC);
|
||||||
|
|
||||||
$file = "${pkg}_${version}.diff.gz";
|
foreach my $file (@needed) {
|
||||||
if (! -r "$file") {
|
if (! -r "$file") {
|
||||||
|
warn "Pulling $urlbase/$file ...\n";
|
||||||
system("wget $urlbase/$file");
|
system("wget $urlbase/$file");
|
||||||
return 0 if ($? != 0);
|
return 0 if ($? != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $orig_ver = $version;
|
|
||||||
$orig_ver =~ s/-.*//;
|
|
||||||
|
|
||||||
$file = "${pkg}_${orig_ver}.orig.tar.gz";
|
|
||||||
if (! -r "$file") {
|
|
||||||
system("wget $urlbase/$file");
|
|
||||||
return 0 if ($? != 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -80,6 +84,8 @@ sub download_source
|
|||||||
if (!geturls($urlbase,$pkg,$version)) {
|
if (!geturls($urlbase,$pkg,$version)) {
|
||||||
# Try snapshot
|
# Try snapshot
|
||||||
|
|
||||||
|
$urlbase="http://snapshot.debian.net/package/$pkg/$version";
|
||||||
|
warn "Fetching snapshot url via '$urlbase' ...\n";
|
||||||
$urlbase=`curl -sI 'http://snapshot.debian.net/package/$pkg/$version' | grep ^[lL]ocation | cut -d' ' -f2 | head -1`;
|
$urlbase=`curl -sI 'http://snapshot.debian.net/package/$pkg/$version' | grep ^[lL]ocation | cut -d' ' -f2 | head -1`;
|
||||||
$urlbase =~ s/[\r\n]//g;
|
$urlbase =~ s/[\r\n]//g;
|
||||||
warn "Trying snapshot location '$urlbase' ...\n";
|
warn "Trying snapshot location '$urlbase' ...\n";
|
||||||
@ -94,8 +100,10 @@ sub download_source
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $pkg = $ARGV[0];
|
my $pkg = $ARGV[0];
|
||||||
my $version = $ARGV[1];
|
my $version = $ARGV[1];
|
||||||
|
my $just_fetch = ($ARGV[2] && $ARGV[2] eq "--fetch");
|
||||||
my $skip = $ARGV[2] || 1;
|
my $skip = $ARGV[2] || 1;
|
||||||
$skip+=0;
|
$skip+=0;
|
||||||
|
|
||||||
@ -106,19 +114,32 @@ if (!defined($pkg) || !defined($version)) {
|
|||||||
|
|
||||||
# Extract latest source
|
# Extract latest source
|
||||||
die "Cannot locate $pkg $version\n" unless download_source($pkg,$version);
|
die "Cannot locate $pkg $version\n" unless download_source($pkg,$version);
|
||||||
|
exit(0) if ($just_fetch);
|
||||||
system("dpkg-source -x ${pkg}_${version}.dsc");
|
system("dpkg-source -x ${pkg}_${version}.dsc");
|
||||||
die "Unpack of $pkg $version failed\n" unless ($? == 0);
|
die "Unpack of $pkg $version failed\n" unless ($? == 0);
|
||||||
|
|
||||||
# Locate prior changelog entry
|
# Locate prior changelog entry
|
||||||
my $prev_ver;
|
my $prev_ver;
|
||||||
my $srcdir;
|
my $upstream_version = $version;
|
||||||
opendir(DIR,".");
|
if ($upstream_version =~ /^([^-]+)-/) {
|
||||||
while ($srcdir = readdir(DIR)) {
|
$upstream_version = $1;
|
||||||
last if ($srcdir =~ /^${pkg}-/ && -d $srcdir);
|
}
|
||||||
|
my $srcdir="$pkg-$upstream_version";
|
||||||
|
if (! -d "$srcdir") {
|
||||||
|
undef $srcdir;
|
||||||
|
my $dir;
|
||||||
|
opendir(DIR,".");
|
||||||
|
while ($dir = readdir(DIR)) {
|
||||||
|
if ($dir =~ /^${pkg}-/ && -d $dir) {
|
||||||
|
$srcdir = $dir;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DIR);
|
||||||
}
|
}
|
||||||
closedir(DIR);
|
|
||||||
die "Cannot locate source tree\n" if (!defined($srcdir));
|
die "Cannot locate source tree\n" if (!defined($srcdir));
|
||||||
open(LOG,"<$srcdir/debian/changelog");
|
my $log = "$srcdir/debian/changelog";
|
||||||
|
open(LOG,"<$log") || die "$log: $!\n";
|
||||||
while (my $line=<LOG>) {
|
while (my $line=<LOG>) {
|
||||||
if ($line =~ /^$pkg \((?:\d+:)?([^\)]+)\)/) {
|
if ($line =~ /^$pkg \((?:\d+:)?([^\)]+)\)/) {
|
||||||
my $seen = $1;
|
my $seen = $1;
|
||||||
@ -136,8 +157,8 @@ close(LOG);
|
|||||||
die "Cannot find earlier source version\n" if (!defined($prev_ver));
|
die "Cannot find earlier source version\n" if (!defined($prev_ver));
|
||||||
|
|
||||||
die "Cannot locate $pkg $prev_ver\n" unless download_source($pkg,$prev_ver);
|
die "Cannot locate $pkg $prev_ver\n" unless download_source($pkg,$prev_ver);
|
||||||
system("dpkg-source -x ${pkg}_${prev_ver}.dsc");
|
#system("dpkg-source -x ${pkg}_${prev_ver}.dsc");
|
||||||
die "Unpack of $pkg $prev_ver failed\n" unless ($? == 0);
|
#die "Unpack of $pkg $prev_ver failed\n" unless ($? == 0);
|
||||||
|
|
||||||
system("debdiff ${pkg}_${prev_ver}.dsc ${pkg}_${version}.dsc > ${pkg}_${version}.debdiff");
|
system("debdiff ${pkg}_${prev_ver}.dsc ${pkg}_${version}.dsc > ${pkg}_${version}.debdiff");
|
||||||
die "Cannot debdiff\n" unless ($? == 0);
|
die "Cannot debdiff\n" unless ($? == 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user