debget-1.6+nmu1/0000755000232200023220000000000011123442662013655 5ustar pbuilderpbuilderdebget-1.6+nmu1/debian/0000755000232200023220000000000011123442663015100 5ustar pbuilderpbuilderdebget-1.6+nmu1/debian/copyright0000644000232200023220000000151210527744317017042 0ustar pbuilderpbuilder$Id: copyright,v 1.3 2006-11-19 03:00:31 roderick Exp $ Copyright (C) 1998 Roderick Schertler. 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. For a copy of the GNU General Public License 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 can be found in `/usr/share/common-licenses/GPL'. debget-1.6+nmu1/debian/rules0000755000232200023220000000260210527744630016166 0ustar pbuilderpbuilder#!/usr/bin/make -f # $Id: rules,v 1.5 2006-11-19 03:03:52 roderick Exp $ dt := debian/debget prefix = `pwd`/$(dt) stamp_build := debian/stamp.build stamp_install := debian/stamp.install clean := $(stamp_build) $(stamp_install) ifneq "" "$(findstring debug,$(DEB_BUILD_OPTIONS))" CFLAGS += -g endif export DH_COMPAT := 3 PERL ?= perl build: $(stamp_build) $(stamp_build): dh_testdir $(PERL) Makefile.PL INSTALLDIRS=vendor $(MAKE) OPTIMIZE="-O2 -Wall $(CFLAGS)" $(MAKE) test touch $@ install: $(stamp_install) $(stamp_install): $(stamp_build) dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install PREFIX=$(prefix)/usr find $(prefix) -depth -type d -print0 | \ xargs -0r rmdir --ignore-fail-on-non-empty touch $@ clean: dh_testdir dh_testroot [ ! -f Makefile ] || $(MAKE) realclean dh_clean $(clean) binary: binary-indep binary-arch binary-indep: $(stamp_install) dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit dh_installcron dh_installman dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb dh_perl dh_shlibdeps dh_gencontrol -u -isp dh_md5sums dh_builddeb binary-arch: .PHONY: build install clean binary-indep binary-arch binary debget-1.6+nmu1/debian/README.debian0000644000232200023220000000211306702147752017206 0ustar pbuilderpbuilderThis program uses Perl's Net::FTP library to do its FTP transfers. The library has global configuration information stored (with our current Perl layout) in /usr/lib/perl5/Net/Config.pm. If you need to, eg, have all external transfers use passive FTP, you'd want the ftp_ext_passive config variable to be set to a true value. The library can also be configured to use a proxy, and probably other things. The Debian package which contains Net::FTP doesn't give you a good way to customize this file right now, though. If you know what changes you need to make to it you can either make them by hand every time you update libnet-perl, or divert the package's copy of this file. If you don't know what changes you need to make, download the source package and use its interactive configuration program: debget --unpack libnet-perl && cd libnet-perl-* && perl Configure This will create a file called "libnet.cfg" in the source directory, it can be used as /usr/lib/perl5/Net/Config.pm. Roderick Schertler $Id: README.debian,v 1.1 1999-04-05 14:59:54 roderick Exp $ debget-1.6+nmu1/debian/control0000644000232200023220000000147310262754471016516 0ustar pbuilderpbuilderSource: debget Section: utils Priority: optional Maintainer: Roderick Schertler Standards-Version: 3.6.1 Build-Depends: debhelper (>= 3.0.5), perl (>= 5.6.0-16) Package: debget Architecture: all Depends: ${perl:Depends}, libapt-pkg-perl, libnet-perl, libproc-waitstat-perl, libwww-perl Suggests: devscripts Description: download/compile source and binary Debian packages debget downloads source and binary Debian packages by name. It doesn't require a local copy of the Packages files, instead it queries packages.debian.org to find out what versions are available. . debget can also optionally unpack and compile source packages, and even install the generated binary packages. If you intend to use these features you should install the devscripts package for the dscverify script it contains. debget-1.6+nmu1/debian/changelog0000644000232200023220000000607611123442561016760 0ustar pbuilderpbuilderdebget (1.6+nmu1) unstable; urgency=medium * Non-maintainer upload. * Support new packages.debian.org (Closes: #508510) -- David Paleino Sun, 21 Dec 2008 13:58:43 +0100 debget (1.6) unstable; urgency=low * Add do-nothing binary-arch target (closes: #395588). -- Roderick Schertler Sat, 18 Nov 2006 22:01:12 -0500 debget (1.5) unstable; urgency=high * Oops, urgency=high for 1.4 used wrong syntax. * Oops a source package name won't be found in the apt cache, check packages.debian.org if necessary. -- Roderick Schertler Mon, 11 Jul 2005 17:22:17 -0400 debget (1.4) unstable; urgency=high (actually works) * Fix to work with package pools. The library lacks documentation, and debget still uses FTP though with the new setup this isn't required, but it can actually download things, so it's actually useful again. (Closes: #84368.) * Correct Getopt::Long prototype warning (closes: #306924). * Update to policy 3.6.2. -- Roderick Schertler Wed, 6 Jul 2005 08:45:44 -0400 debget (1.3) unstable; urgency=low * Oops, the hint about installing devscripts was always shown when a .dsc failed signature check, because the search it did for dscverify was buggy (closes: #74706). * Remove Debian version from directory name expected from `dpkg-source -x'. How did I miss this before? * Work around bogus "Ignoring '!' modifier for short option" warning from Getopt::Long. * Oops, --help showed the usage twice with the new Getopt::Long. * Bump Standards-Version to 3.2.1 (no changes). -- Roderick Schertler Mon, 12 Feb 2001 18:04:19 -0500 debget (1.2) unstable; urgency=low * Add --no-download-tar and --no-download-re switches (closes: #36170). -- Roderick Schertler Sun, 8 Oct 2000 10:46:58 -0400 debget (1.1) unstable; urgency=low * Update for "new" non-US layout. * Add Build-Depends, bump Standards-Version (closes: #70357). -- Roderick Schertler Sun, 27 Aug 2000 23:49:27 -0400 debget (1.0) unstable; urgency=low * Simple updates for 3.0.0 standards. * Simple updates for new Perl policy. -- Roderick Schertler Wed, 14 Jul 1999 13:30:44 -0400 debget (0.4) unstable; urgency=low * Add info about passive FTP and proxies to the man page and README.Debian. -- Roderick Schertler Mon, 5 Apr 1999 10:59:15 -0400 debget (0.3) unstable; urgency=low * Add --unpack, --build and --install switches. -- Roderick Schertler Wed, 31 Mar 1999 23:20:44 -0500 debget (0.2) unstable; urgency=medium * Correct handling for user-specified sections, it was totally hosed. * Handle downloading from experimental (use `--dist experimental'). -- Roderick Schertler Sat, 30 Jan 1999 12:04:42 -0500 debget (0.01) unstable; urgency=low * Initial version. -- Roderick Schertler Tue, 29 Dec 1998 21:09:05 -0500 $Id: changelog,v 1.13 2006-11-19 03:04:04 roderick Exp $ debget-1.6+nmu1/debian/NEWS0000644000232200023220000000117210262754471015606 0ustar pbuilderpbuilderdebget (1.4) unstable; urgency=high (actually works) debget finally works with package pools (5 years later!). debget-madison is a new program similar to katie's madison program (it shows what versions of a package are available in Debian), but it can be used from anywhere on the Internet. It doesn't support any of madison's switches yet. debget sometimes segfaults just before exiting. This is likely due to bug #317058. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=317058 -- Roderick Schertler Wed, 6 Jul 2005 08:45:44 -0400 $Id: NEWS,v 1.1 2005-07-06 13:14:33 roderick Exp $ debget-1.6+nmu1/debian/TODO0000644000232200023220000000205510262754471015600 0ustar pbuilderpbuilder- tests - segfault using debget-madison #0 0xb7c2a8d1 in pkgRecords::~pkgRecords () from /usr/lib/libapt-pkg-libc6.3-5.so.3.3 #1 0xb7c9336e in XS_AptPkg___pkg_records_DESTROY () from /usr/lib/perl5/auto/AptPkg/AptPkg.so - debget-info script to access pm funcs - Option to list versions and optionally choose interactively? - they could use debget-madison instead - Update packages.debian.org's search_packages.pl to output in XML, and to provide more info: - package's component - binary package's source It's in CVS: cvs -d :pserver:anonymous@cvs.infodrom.org:/var/cvs/debian.de login cvs -d :pserver:anonymous@cvs.infodrom.org:/var/cvs/debian.de \ co packages.debian.org - Now that you know the version number you want to download, allow downloading with http. - Update Net::FTP configuration info in README.Debian. - Skip downloading files already present, optionally with checking against the MD5 in the .dsc. - Set mtime on saved files when possible. $Id: TODO,v 1.4 2005-07-06 13:14:33 roderick Exp $ debget-1.6+nmu1/MANIFEST.SKIP0000644000232200023220000000012106642306043015547 0ustar pbuilderpbuilder# $Id: MANIFEST.SKIP,v 1.1 1998-12-30 02:12:51 roderick Exp $ ,v$ ~$ ^Makefile$ debget-1.6+nmu1/MANIFEST0000644000232200023220000000025006642306043015005 0ustar pbuilderpbuilder $Id: MANIFEST,v 1.1 1998-12-30 02:12:51 roderick Exp $ MANIFEST MANIFEST.SKIP Makefile.PL README debget debian/changelog debian/control debian/copyright debian/rules debget-1.6+nmu1/debget-madison0000755000232200023220000000771710264561431016502 0ustar pbuilderpbuilder#!/usr/bin/perl -w use strict; # $Id: debget-madison,v 1.2 2005-07-11 21:22:33 roderick Exp $ # XXX # # - unimplemented switches # -a, --architecture=ARCH only show info for ARCH(s) # -b, --binary-type=TYPE only show info for binary TYPE # -c, --component=COMPONENT only show info for COMPONENT(s) # -g, --greaterorequal show buildd 'dep-wait pkg >= {highest version}' info # -G, --greaterthan show buildd 'dep-wait pkg >> {highest version}' info # -h, --help show this help and exit # -r, --regex treat PACKAGE as a regex # -s, --suite=SUITE only show info for this suite # -S, --source-and-binary show info for the binary children of source pkgs # ARCH, COMPONENT and SUITE can be comma (or space) separated lists, e.g. # --architecture=m68k,i386 use Debian::Debget qw( $Debug $Exit $Me cmp_debian_versions getopt madison xwarn ); my $Version = q$Revision: 1.2 $ =~ /(\d\S+)/ ? $1 : '?'; my @Option_spec = ( 'debug|d+' => \$Debug, 'help' => sub { usage() }, 'version' => sub { print "$Me version $Version\n"; exit }, ); my $Usage = < [I]... I... =head1 DESCRIPTION B shows what versions of a (source or binary) package are available in Debian. It's similar to the B tool, but it can be used from anywhere on the Internet. =head1 OPTIONS =over 4 =item B<--debug> Turn debugging on. Specify multiple times for more detail. =item B<--help> Show the usage message and die. =item B<--version> Show the version number and exit. =back =head1 SEE ALSO debget(1), L =head1 AVAILABILITY The code is licensed under the GNU GPL and distributed as part of Debian. =head1 AUTHOR Roderick Schertler =cut debget-1.6+nmu1/Makefile.PL0000644000232200023220000000053610262754467015647 0ustar pbuilderpbuilder# $Id: Makefile.PL,v 1.2 2005-07-06 13:14:31 roderick Exp $ use ExtUtils::MakeMaker; WriteMakefile( EXE_FILES => [qw(debget debget-madison)], NAME => 'debget', PREREQ_PM => { 'Proc::WaitStat' => 0 }, VERSION_FROM => 'debget', ); sub MY::dist_core { return q(dist:; @echo "use dpkg-buildpackge, not make dist" >&2; false); } debget-1.6+nmu1/lib/0000755000232200023220000000000010527744667014444 5ustar pbuilderpbuilderdebget-1.6+nmu1/lib/Debian/0000755000232200023220000000000010527744667015626 5ustar pbuilderpbuilderdebget-1.6+nmu1/lib/Debian/Debget.pm0000644000232200023220000004516411120447427017350 0ustar pbuilderpbuilder# $Id: Debget.pm,v 1.3 2005-07-11 21:25:17 roderick Exp $ # # Roderick Schertler use strict; # Copyright (C) 2005 Roderick Schertler # # 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. # # For a copy of the GNU General Public License write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA =head1 NAME Debian::Debget - helper functions used by B et al =head1 SYNOPSIS XXX =head1 DESCRIPTION These are functions used by B and related scripts, but you can use them, too. I will do everything possible to retain backwards compatibility for the interfaces documented here. Most of these functions will C if they're called in a context (scalar, list) which doesn't match what they expect. This is so that I will be able to change them to return something different in the other context without breaking old code. =cut package Debian::Debget; use base qw(Exporter); use Carp (); use List::Util qw(max); use Memoize qw(memoize); our $VERSION = q$Revision: 1.3 $ =~ /(\d\S+)/ ? $1 : '?'; our (@EXPORT, @EXPORT_OK); BEGIN { @EXPORT = qw( binary_package_info cmp_debian_versions madison package_component package_source pool_dir source_package_info upstream_version ); # XXX document these? then you have to keep their interfaces @EXPORT_OK = qw( $Debug $Debug_fh $Exit $Me debug debug_hash debug_nonl dstr get_uri getopt xconfess xcroak xdie xwarn ); } use subs grep { /^[a-z]/ } @EXPORT; # PDO == packages.debian.org our $Pdo_uri_base ||= 'http://packages.debian.org'; our $Pdo_uri_binary ||= "$Pdo_uri_base/%s"; our $Pdo_uri_source ||= "$Pdo_uri_base/src:%s"; # XXX can LWP get a page in a different language? our $Pdo_re_no_package = qr/Sorry, your search gave no results/; (our $Me = $0) =~ s|.*/||; our $Debug ||= 0; our $Debug_fh ||= \*STDERR; our $Exit ||= 0; sub dstr ($) { local $_ = shift; return 'undef' if !defined; return "$_" if ref; return "[$_]" if !/[\[\]\x00-\x1f\x7f-\xff]/; s/([%\[\]\x00-\x1f\x7f-\xff])/sprintf "%%%02X", ord $1/eg; return $_; } sub debugx { my $s = (caller 2)[3]; $s =~ s/.*:://; print $Debug_fh "$s: ", @_; } sub debug_nonl { debugx @_ if $Debug; } sub debug { debugx @_, "\n" if $Debug; } sub debug_hash { return unless $Debug; my ($prefix, $indent, %h) = @_; $indent = '' if !defined $indent; my $klen = max map { length dstr $_ } keys %h; debugx "$indent$prefix:\n"; for my $k (sort keys %h) { debugx sprintf "%s %-${klen}s => %s\n", $indent, dstr $k, dstr $h{$k}; } } sub die_prefix { (my $program = $0) =~ s|.*/||; my @c = caller 2; my $sub = $c[0] eq 'main' ? '' : "$c[3]: "; return "$program: $sub"; } sub xconfess { Carp::confess die_prefix, @_ } sub xcroak { Carp::croak die_prefix, @_ } sub xdie { die die_prefix, @_ } sub xwarn { warn die_prefix, @_; $Exit ||= 1 } # This is basically Getopt::Long but it has the defaults set up the way I # think they should be. sub getopt { # Don't bother if there aren't any switches. This test works because # I'm setting $REQUIRE_ORDER. return 1 unless @ARGV && substr($ARGV[0], 0, 1) eq '-'; my $bundling = 0; if (@_ && ($_[0] eq -bundle || $_[0] eq -bundling)) { $bundling = 1; shift; } { # I'm setting this environment variable when loading Getopt::Long # so that the defaults for options added later (which aren't set # explicitly below) are more likely to match what I'd like. local $ENV{POSIXLY_CORRECT} = 1; require Getopt::Long; } Getopt::Long->VERSION(2.19); Getopt::Long::Configure( 'no_auto_abbrev', 'no_getopt_compat', 'require_order', $bundling ? 'bundling' : (), 'no_ignore_case', 'prefix_pattern=(--|-)', ) if 1; # The getopt function puts the vars into its caller's package so # it's necessary to jump to it so that its caller is my caller. goto &Getopt::Long::GetOptions; } #------------------------------------------------------------------------------ =head1 IMPORTABLES =over 4 =cut # package info from packages.debian.org --------------------------------------- =item binary_package_info I This function returns some information about a binary package. If the I isn't found nothing is returned. If it is found, the return value is a data structure like this: $r->{$distribution}{$architecture} = $version; # $distribution => 'stable', 'experimental', etc. # $architecture => 'i386', 'powerpc', etc. If something goes seriously wrong B will C. =item source_package_info I This function returns some information about a source package. If the I isn't found nothing is returned. If it is found, the return value is a data structure like this: $r->{$distribution} = [$version, @binary_package_list]; # $distribution => 'stable', 'experimental', etc. # $version => '123.4-5', etc. # @binary_package_list => qw(nethack-common nethack-x11), etc. =cut { my $ua; sub get_uri { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($uri) = @_; if ($Debug > 1) { require LWP::Debug; LWP::Debug::level('+'); } if (!$ua) { require LWP::UserAgent; $ua = LWP::UserAgent->new(env_proxy => 1); $ua->env_proxy; } my $resp = $ua->get($uri); if (!$resp->is_success) { xcroak "error getting $uri: ", $resp->status_line; } return $resp; } } # My current method of finding what version of a package is to parse a # http://packages.debian.org query. # This lacks some info I'd like # (source for a binary package, component of either kind of package). I'd # # also using xml # # mailed 1 guy, mail the other # Originally I tried parsing the packages.debian.org data using # HTML::TreeBuilder, but I ran into a problem described in # # news:87oea1gp9l.fsf@eeyore.ibcinc.com # http://groups-beta.google.com/group/comp.lang.perl.modules/msg/b7c72820e4895b42 # # I also sent it to Sean Burke, but haven't heard back. sub parse_pdo_binary { @_ == 2 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($uname, $content) = @_; debug "parsing $uname from:\n", $content if $Debug > 1; my $p = "parse_pdo_binary(): failure parsing package web page for $uname: "; #

Package gthumb

#
    #
  • etch (stable) (gnome): # an image viewer and browser #
    3:2.8.0-1: alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc #
  • #
  • etch-m68k (gnome): # an image viewer and browser #
    3:2.8.0-1: m68k #
  • #
  • lenny (testing) (gnome): # navigatore e visualizzatore di immagini #
    3:2.10.8-1: alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc #
  • #
  • sid (unstable) (gnome): # navigatore e visualizzatore di immagini #
    3:2.10.8-1: alpha amd64 arm armel hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mipsel powerpc s390 sparc #
  • #
  • experimental (gnome): # an image viewer and browser #
    3:2.11.0~svn2319-1+b1: alpha amd64 hppa i386 ia64 mipsel powerpc s390 sparc #
    3:2.11.0~svn2319-1 [debports]: arm kfreebsd-amd64 kfreebsd-i386 mips #
  • #
my %dist_arch_ver; while ($content =~ m|^\s*]+>]+>([\w-]+)( \((.*)\))?.+\n \s*\w+.*\n \s*\n \s*
(.+)\n \s*\n|xmg) { # $1 = "sid" # $2 = " (unstable)" # $3 = "unstable" # $4 = "1.6: all" my ($dist, $version_lines) = ($1, $4); debug_nonl "dist=$dist version_lines:\n", $version_lines; while ($version_lines =~ m|^\s*(\S+):((?:\s+\w+)+)|mg) { my ($ver, $arch_list) = ($1, $2); my @arch = split ' ', $arch_list; for my $arch (@arch) { debug "dist=$dist ver=$ver arch=$arch"; if (exists $dist_arch_ver{$dist}{$arch}) { # There's a second version listed for this distribution. # I didn't expect this could happen, but it did: #
  • oldstable (games): Overhead dungeon-c # rawler game (dummy package) #
    3.4.0-3.0woody4: all #
    3.4.0-3.0woody3: all #
  • if (cmp_debian_versions($ver, $dist_arch_ver{$dist}{$arch}) <= 0) { debug "ignoring older version"; next; } else { debug "using newer version"; } } $dist_arch_ver{$dist}{$arch} = $ver; } } if (!$dist_arch_ver{$dist}) { xdie $p, "no versions parsed for dist=$dist from:\n", $version_lines; } } if (!%dist_arch_ver) { if ($content =~ /$Pdo_re_no_package/) { return; } xdie $p, "main parse failed"; } return \%dist_arch_ver; } sub parse_pdo_source { @_ == 2 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($uname, $content) = @_; debug "parsing $uname from:\n", $content if $Debug > 1; my $p = "parse_pdo_source(): failure parsing package web page for $uname: "; #

    Source Package gthumb

    # my %d; while ($content =~ m|^\s*
  • ]+>([\w\(\)\ -]+) \s+\(.*\):\s+(.*)\n \s+
    Binary\s+packages:\s+]+> \s+]+>(]+>.*)|xmg) { my ($dist, $ver, $binary_links) = ($1, $2, $3); debug "dist=$dist ver=$ver binary_links=$binary_links"; if (exists $d{$dist}) { xdie $p, "duplicate entries for distribution $dist"; } my $binary_links_orig = $binary_links; my @binary_packages; while ($binary_links =~ s%^\s* (?:]+>(\S+)) ,?%%x) { push @binary_packages, defined $1 ? $1 : ""; } #if ($binary_links =~ /\S/) { # xdie $p, "data left after bin parse: $binary_links"; # } if (!@binary_packages) { xdie $p, "no binary packages parsed for dist=$dist ver=$ver from:\n", $binary_links_orig; } $d{$dist} = [ $ver, \@binary_packages]; } if (!%d) { if ($content =~ /$Pdo_re_no_package/) { return; } xdie $p, "main parse failed"; } return \%d; } sub package_info_helper { @_ == 4 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($name, $type, $uri_fmt, $parser) = @_; debug "type=$type name=$name"; defined $name # XXX shows memoize location or xcroak "undefined name"; $name =~ /^\S+\z/ or xcroak "invalid name `$name'"; my $uri = sprintf $uri_fmt, $name; my $resp = get_uri $uri; return $parser->("$type $name", $resp->content); } sub binary_package_info { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($name) = @_; return package_info_helper $name, 'binary', $Pdo_uri_binary, \&parse_pdo_binary; } sub source_package_info { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($name) = @_; return package_info_helper $name, 'source', $Pdo_uri_source, \&parse_pdo_source; } #------------------------------------------------------------------------------ { my $apt_cache; my $apt_packages; sub aptpkg_init { return if $apt_cache; require AptPkg::Cache; $apt_cache = AptPkg::Cache->new or die; $apt_packages = $apt_cache->packages or die; } # Return the source package for PACKAGE. sub package_source { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($pname) = @_; aptpkg_init unless $apt_cache; my $r = $apt_packages->lookup($pname); if (!$r) { # It wasn't found in the packages cache. It might not exist, # or it might be a source package name, or it might be either # source or binary but not in the cache. # # XXX you could try AptPkg::Source here first if (source_package_info $pname) { # it's a source package debug "$pname -> $pname (via pdo)"; return $pname; } # XXX a binary package name not found in the cache fails, need # to extend pdo to tell you the source package name for a binary debug "$pname -> not found"; return; } my $s = defined $r->{SourcePkg} ? $r->{SourcePkg} : $pname; debug "$pname -> $s"; return $s; } memoize 'package_source'; # Return the component (main, contrib, etc.) for PACKAGE. # # XXX only works on binary packages sub package_component { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($pname) = @_; aptpkg_init unless $apt_cache; my $p = $apt_cache->{$pname}; if (!$p) { debug "$pname -> not found"; return; } debug_hash "package $pname", '', %$p if $Debug > 1; my $vls = $p->{VersionList}; if (!$vls) { debug "$pname -> no VersionList"; return; } for my $vl (@$vls) { debug_hash "version", ' ', %$vl if $Debug > 1; my $fls = $vl->{FileList}; if (!$fls) { debug "no FileList"; next; } for my $fl (@$fls) { my $f = $fl->{File}; if (!$f) { debug "no File"; next; } debug_hash "file", ' ', %$f if $Debug > 1; my $o = $f->{Origin}; if (!defined $o || $o ne 'Debian') { debug "non-Debian"; next; } my $c = $f->{Component}; if (!$c) { debug "no Component"; next; } debug "$pname -> $c"; return $c; } } debug "$pname -> component not found"; return; } memoize 'package_component'; } #------------------------------------------------------------------------------ { my $vs; sub version_init { return if $vs; require AptPkg::Config; # 2 extra loads required, bug #316768 require AptPkg::System; require AptPkg::Version; $vs = $AptPkg::Config::_config->system->versioning or xdie "failed to get AptPkg::Version object"; } =item cmp_debian_versions I, I This is like C for Debian package version numbers. It is prototyped to take 2 scalar arguments, so it can be used as-is as a C comparison function. =cut sub cmp_debian_versions ($$) { !wantarray or xconfess 'called in wrong context'; version_init unless $vs; return $vs->compare($_[0], $_[1]); } =item upstream_version I This returns the upstream version extracted from the given I =cut sub upstream_version { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($deb_version) = @_; version_init unless $vs; return $vs->upstream($deb_version); } } #------------------------------------------------------------------------------ sub madison { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($name) = @_; my $rbinary = binary_package_info $name; my $rsource = (package_source($name) eq $name) ? source_package_info $name : undef; my $fmt = "%10s | %10s | %13s | %s\n"; my %ver_dist; # $ver_dist{$ver}{$dist} = \@arch; if ($rbinary) { my %dist_arch = %$rbinary; # break down by ver/dist/arch my %d; for my $dist (keys %dist_arch) { while (my ($arch, $ver) = each %{ $dist_arch{$dist} }) { $d{$ver}{$dist}{$arch} = 1; } } # add sorted arch list to %ver_dist for my $ver (keys %d) { for my $dist (keys %{ $d{$ver} }) { push @{ $ver_dist{$ver}{$dist} }, sort keys %{ $d{$ver}{$dist} }; } } } if ($rsource) { for my $dist (keys %$rsource) { my $ver = $rsource->{$dist}[0]; unshift @{ $ver_dist{$ver}{$dist} }, 'source'; } } return \%ver_dist; } =item pool_dir I This returns the pool directory (starting at the C level) in which files for I are stored. I can be either a binary or source package name. =cut sub pool_dir { @_ == 1 or xconfess "wrong number of args (", 0+@_, ")"; !wantarray or xconfess 'called in wrong context'; my ($package) = @_; my $psource = package_source $package or return; my $component = package_component $package or return; my $sub = $psource =~ /^(lib.)/ ? $1 : substr $psource, 0, 1; return "pool/$component/$sub/$psource"; } #------------------------------------------------------------------------------ =back =head1 SEE ALSO debget(1), AptPkg(3pm) =head1 AUTHOR Roderick Schertler =cut 1 debget-1.6+nmu1/debget0000755000232200023220000006224211120446343015040 0ustar pbuilderpbuilder#!/usr/bin/perl -w use strict; # $Id: debget,v 1.17 2005-07-11 21:22:33 roderick Exp $ # # Roderick Schertler # Copyright (C) 1998, 2005 Roderick Schertler # # 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. # # For a copy of the GNU General Public License write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # A full spec is a list ref: # # [host, initial-directory, directory, RE] # # This specifies that files in host:initial-directory/directory which # match the RE are to be downloaded. These are coalesced by host and # initial-directory leaving specs, which are just the final two elements. # XXX # - download the *.dsc, then skip downloading files which are already # present locally # - add --clean (see CVS diffs for original documentation) # - don't install all produced packages if she gave binary package # names to download use Debian::Debget qw( $Debug $Exit $Me binary_package_info debug getopt package_component package_source pool_dir source_package_info upstream_version xdie xwarn ); use Net::FTP (); use Proc::WaitStat qw(waitstat waitstat_die); our $VERSION = '1.5'; use vars qw(%O); %O = ( 'arch' => undef, 'binary' => 0, 'build' => undef, 'debug' => 0, 'dir' => 'debian', 'dist' => 'sid', 'host' => 'ftp.debian.org', 'install' => undef, 'no' => 0, 'no-config' => 0, 'no-download-re' => [], 'no-download-tar' => 0, 'no-dscverify' => 0, 'no-user-config' => 0, 'non-us-dir' => 'debian-non-US', 'non-us-host' => 'non-us.debian.org', 'root-build' => undef, 'root-install' => undef, 'source' => 1, 'unpack' => undef, 'verbose' => 0, ); my @Option_spec = ( 'arch=s', 'binary|b!', 'B' => sub { $O{'binary'} = 0 }, 'build!', 'debug+', 'dir=s', 'dist|d=s', 'help!', # can't die from here because the code is eval()led 'host|h=s', 'install|i!', 'no|n!', 'no-config|f!', 'no-download-re=s@', 'no-download-tar!', 'no-dscverify!', 'no-user-config|F!', 'non-us-dir=s', 'non-us-host|H=s', 'root-build|r=s', 'root-install|R=s', 'source|s!', 'S' => sub { $O{'source'} = 0 }, 'unpack|u!', 'verbose|v!', 'version' => sub { print "$Me version $VERSION\n"; exit }, ); # Booleans with single-letter aliases need special handling to avoid a # bogus warning from Getopt::Long. Move the single-letter version to # its own spec. for (my $i = 0; $i <= $#Option_spec; $i++) { next if ref $Option_spec[$i]; if ($Option_spec[$i] =~ s/(.*)\|(\w)!$/$1!/) { push @Option_spec, $2 => \$O{$1}; } } my $Usage = <code; my $message = $cmd->message; chomp $message; return "$text ($code $message)\n"; } sub net_warn { xwarn net_warndie_mess @_; } sub net_die { xdie net_warndie_mess @_; } sub do_file { my $file = shift; debug "do $file"; # XXX Need to fix Perl to be able to detect if the file was # unreadable or the like. do $file; $@ and xdie "error in $file: $@"; } # Return the host/dir that should be used for a file in DIST. sub host_dir { # XXX return ($O{'host'}, $O{'dir'}); } # Return the installation architecture. sub arch { if (!defined $O{'arch'}) { chomp($O{'arch'} = `dpkg --print-installation-architecture`); waitstat_die $?, 'dpkg'; $O{'arch'} ne '' or xdie "dpkg didn't print the architecture"; } return $O{'arch'}; } sub init { # This is a bit of a hack. I have to parse the command line to # learn whether -f or -F was given before I read the rc files, but I # want the command line to override the settings in the rc files. I # had used globals for the configuration until I needed to do this. my @copy_key = qw(no-config no-user-config); # I have to use the real %O, because @Option_spec contains references # to it. So, set up to restore the original values except for those # I'm checking right now. my %orig_o = %O; { local @ARGV = @ARGV; getopt -bundle, \%O, @Option_spec; } my %new_o = %O; @O{keys %orig_o} = values %orig_o; # use slice to retain old SVs @O{@copy_key} = @new_o{@copy_key}; do_file '/etc/debget.rc' unless $O{'no-config'}; do_file "$ENV{HOME}/.debget.rc" unless $O{'no-config'} || $O{'no-user-config'}; getopt -bundle, \%O, @Option_spec or usage; usage if $O{'help'}; $Debug = $O{'debug'}; $| = 1 if $Debug; } # Return the full file specs which should be downloaded for PACKAGE. sub make_full_specs { my $orig_package = shift; my (@ret, $pool_dir, $ver); # XXX allow specifying everything you're going to derive based on # the package name, using apt-get syntax where possible (foo=1.2-1 # etc) my $package = $orig_package; my $dist = $O{dist}; my $arch = arch; # Figure out what version to download. I want the same version for # both binary and source packages. The name I've got might be # either, so try it both ways if necessary. if (!defined $ver) { my $source_info = source_package_info $package; if ($source_info) { my $r = $source_info->{$dist}; $ver = $r->[0] if $r; } } if (!defined $ver) { my $binary_info = binary_package_info $package; if ($binary_info) { $ver = $binary_info->{$dist}{$arch}; } } if (!defined $ver) { xwarn "can't get version for $package in distribution $dist\n"; # XXX tell how to specify it return; } $pool_dir = pool_dir $package unless defined $pool_dir; if (!defined $pool_dir) { xwarn "can't get pool directory for $package\n"; # XXX tell how to specify it return; } if ($O{'source'}) { my $source = package_source $package; my $upstream = upstream_version $ver; my $is_native = $upstream eq $ver; my $orig = $is_native ? '' : '.orig'; push @ret, ( [host_dir, $pool_dir, qr/^\Q${source}_${ver}.\E(dsc|diff\.gz)$/], [host_dir, $pool_dir, qr/^\Q${source}_${upstream}$orig.tar.gz\E$/], ); } if ($O{'binary'}) { my $arch = arch; push @ret, [host_dir, $pool_dir, qr/^\Q${package}_${ver}_\E(\Q$arch\E|all)\.deb$/]; } return @ret; } # Run nlst via FTP on directory DIR, return the file names (without # directory). { my %cache; sub ls { my ($ftp, $dir) = @_; if (!$cache{$ftp}{$dir}) { verbose "ls $dir"; my $rls = $ftp->ls($dir) or net_die $ftp, "error running ls for $dir"; debug "ls output\n", join "\n", @$rls; # Some implementations return just the base names, some include # the directory. Strip the directories if they're there. for (@$rls) { s-.*/--; } $cache{$ftp}{$dir} = $rls; } return @{ $cache{$ftp}{$dir} }; } } # Take an FTP connection and a SPEC and return the actual files which # should be downloaded. sub glob_spec { my ($ftp, $spec) = @_; my ($dir, $re) = @$spec; my @file = map { "$dir/$_" } grep { /$re/ } ls $ftp, $dir; if (!@file) { xwarn "no files in $dir match /$re/\n"; } return @file; } # Return true if I'm allowed to download a file named FILE. sub allow_download { my ($file) = @_; return 0 if $file =~ /\.tar\.gz$/ && $O{'no-download-tar'}; for (@{ $O{'no-download-re'} }) { return 0 if $file =~ /$_/; } return 1; } # Connect to HOST, chdir to DIR and retrieve the files required by SPECs. sub do_ftp { my ($host, $dir, @spec) = @_; my ($ftp, @got); verbose "connect to $host"; $ftp = Net::FTP->new($host, Debug => $Debug) or xdie "can't connect to $host: $@\n"; $ftp->login or net_die $ftp, "error logging in to $host"; $ftp->binary or net_die $ftp, "error setting binary mode"; verbose "chdir $dir"; $ftp->cwd($dir) or net_die $ftp, "error doing cd to $dir"; for (@spec) { for my $file (glob_spec $ftp, $_) { if (!allow_download $file) { print "# skip download of $file\n" if $O{'verbose'}; next; } print "get " if $O{'verbose'}; print "$file\n"; next if $O{'no'}; if ($ftp->get($file)) { push @got, $file; $got[-1] =~ s-.*/--; } else { net_warn $ftp, "error getting $file"; } } } verbose "disconnect from $host"; $ftp->quit or net_warn $ftp, "error closing FTP session to $host"; return @got; } # Run the given COMMAND like system(), but don't output the stdout # unless verbose mode is on. sub run { my @cmd = @_; my ($ret); if (!$O{'verbose'}) { open SAVEOUT, '>&STDOUT' or xdie "can't dup stdout: $!\n" unless defined fileno SAVEOUT; open STDOUT, '>/dev/null' or xdie "can't write to /dev/null: $!\n"; } $ret = system @cmd; open STDOUT, '>&SAVEOUT' or xdie "can't redup stdout: $!\n" if !$O{'verbose'}; return $ret; } # Using SUPROG run the given COMMAND, with special handling for an # SUPROG of su. sub root_run { my ($su, @cmd) = @_; my (@arg); # This is more complicated than it needs to be because of GNU's # accursed argument reordering. If you have an argument to the # command which looks like a switch GNU's su will act on it unless # you use -- to stop option processing or set $POSIXLY_CORRECT. I # don't want to set $POSIXLY_CORRECT because that will affect the # behavior of the command run. Using -- on its own doesn't work # because the su which comes with the shadow tools (packaged as # secure-su) doesn't do real option processing and doesn't recognize # it. # # So, I have this. I put the -- there and then remove it myself if # necessary. With GNU su the "" arg ends up in $0. With secure-su # the -- ends up in $0 and the "" in $1, and I shift it out of $1. @arg = ('root', '-c', '[ -z "$1" ] && shift; exec "$@"', '--', '') if $su eq 'su'; run $su, @arg, @cmd; } # Unpack the given DSC_FILE, returning the name of the directory created # if all went well. sub dscunpack { my $dsc = shift; my ($dir, $skipping); if (!$O{'no-dscverify'}) { verbose "dscverify $dsc"; run 'dscverify', $dsc; if ($?) { xwarn "non-zero exit (", waitstat $?, ") verifying $dsc,", " skipping it\n"; if (!eval { find_prog 'x', 'dscverify' } || ! -f '/usr/share/keyrings/debian-keyring.gpg') { xwarn "install the devscripts and debian-keyring packages", " or specify --no-dscverify\n"; } return; } } $dir = $dsc; $dir =~ s/\.dsc$//; $dir =~ s/(_.*?)-[^\-]+/$1/; $dir =~ s/_/-/; print "$dir\n" unless $O{'verbose'}; # I won't actually be skipping anything unless I'm going to build or # install. $skipping = $O{'build'} || $O{'install'}; verbose "unpack $dsc"; run 'dpkg-source', '-x', $dsc; if ($?) { xwarn "non-zero exit (", waitstat $?, ") from dpkg-source", " unpacking $dsc", $skipping ? ", skipping it" : '', "\n"; return; } unless (-d $dir) { xwarn "directory $dir wasn't created by dpkg-source unpacking $dsc", $skipping ? ", skipping it" : '', "\n"; return; } return $dir; } # Build the package which is in DIRECTORY, returning the names of the # generated binary packages if all went well. sub build { my $dir = shift; my ($skipping, %before, @deb); verbose "$dir/debian/rules build"; run 'sh', '-c', 'cd "$1" && debian/rules build', 'x', $dir; if ($?) { xwarn "non-zero exit (", waitstat $?, ") from `debian/rules build'", " in $dir, skipping it\n"; return; } # Save the existing *.deb files and the age of each. %before = map { $_ => -M $_ } grep { /\.deb$/ } dirents '.'; verbose "$dir/debian/rules binary"; root_run $O{'root-build'}, 'sh', '-c', 'cd "$1" && debian/rules binary', 'x', $dir; if ($?) { xwarn "non-zero exit (", waitstat $?, ") from `debian/rules binary'", " in $dir via $O{'root-build'}", $O{'install'} ? ", skipping it" : '', "\n"; return; } # Find either new or updated *.deb files. XXX This is a race with other # processes working in this directory. @deb = grep { /\.deb$/ && (!$before{$_} || -M $_ < $before{$_}) } dirents '.'; if (!@deb) { xwarn "no *.deb files were produced by $dir\n"; return; } print join "\n", @deb, '' unless $O{'verbose'}; return @deb; } sub main { my (@dsc, @src, @deb, @full_spec); init; # Separate .dsc and .deb files from package names. There's no way # to give a directory name and have that mean "build the package in # this directory" because there'd be an ambiguity (if you have a # directory with the same name as a package). for (@ARGV) { if (/\.dsc$/) { push @dsc, $_; } elsif (/\.deb$/) { push @deb, $_; } else { push @full_spec, make_full_specs $_; } } # Automatically turn on --build/--install if .dsc/.deb were given. $O{'build'} = 1 if @dsc && !defined $O{'build'}; $O{'install'} = 1 if @deb && !defined $O{'install'}; # Automatically turn on prerequisites. $O{'build'} = 1 if $O{'install'} && !defined $O{'build'}; $O{'unpack'} = 1 if $O{'build'} && !defined $O{'unpack'}; # Look for the su-type commands if necessary, before starting # downloads. $O{'root-install'} = $O{'root-build'} if defined $O{'root-build'} && !defined $O{'root-install'}; $O{'root-build'} = find_prog 'to become root to build', qw(fakeroot sudo super su) if $O{'build'} && !defined $O{'root-build'}; $O{'root-install'} = find_prog 'to become root to install', qw(sudo super su) if $O{'install'} && !defined $O{'root-install'}; # Make sure there's something to do. unless (@dsc || @deb) { $O{'source'} || $O{'binary'} or xdie "neither source nor binary packages", " are being downloaded\n"; @ARGV or usage "no packages or files specified\n"; } # Uniqify the full specs because, eg, multiple packages can come # from the same source. @full_spec = uniq_lref @full_spec; # Split the full specs up into specs grouped by host/directory. my %work; for (@full_spec) { my ($host, $dir, @spec) = @$_; push @{ $work{$host}{$dir} }, \@spec; } # For each host/directory pair, connect and download the given # specs. for my $host (sort keys %work) { for my $dir (sort keys %{ $work{$host} }) { for (do_ftp $host, $dir, @{ $work{$host}{$dir} }) { if (/\.dsc$/) { push @dsc, $_; } elsif (/\.deb$/) { push @deb, $_; } } } } if ($O{'unpack'} && @dsc) { for (@dsc) { push @src, dscunpack $_; } } if ($O{'build'} && @src) { for (@src) { push @deb, build $_; } } if ($O{'install'} && @deb) { root_run $O{'root-install'}, 'dpkg', '-i', @deb; if ($?) { xwarn "non-zero exit (", waitstat $?, ") running dpkg via $O{'root-install'} to install @deb\n"; } } return 0; } $Exit = main || $Exit; $Exit = 1 if $Exit and not $Exit % 256; exit $Exit; __END__ =head1 NAME debget - download source and binary Debian packages =head1 SYNOPSIS B [I]... { I | I
    | I.dsc | I.deb }... =head1 DESCRIPTION B downloads source and binary Debian packages by name and optionally unpacks, compiles and installs them. The default behavior is to download the source for packages, to unpack and build F<*.dsc> files and to install F<*.deb> files. For detailed defaults on FTP server names and such run C. B doesn't require a local copy of the F files, instead it lists directories on the FTP site to find out what versions are available. Non-switch arguments are F<*.dsc> files, F<*.deb> files, and package names or I
    , eg B or B. There are two cases in which you've got to specify the section: =over 4 =item - Information about the package isn't in the local F file (as shown by C), or the information there is wrong. =item - You're downloading a source package which doesn't generate a binary package of the same name. Normally B infers the correct source package to download based on the C output. (Eg, if you say to download the source for B, it will really download the B sources.) This isn't possible if the source package doesn't have an F file entry (which is the case when the source package doesn't generate a binary package of the same name). In this case B will use the section for the package which you specified (B in this case). If the section for that package isn't available, or if it's not the same as the section for the source package, you have to specify the section yourself. =back To handle either of these cases, specify the package with the section prepended, as it would appear in the F file. Eg, B or B. =head1 OPTIONS =over 4 =item B<--arch> I Specify the installation architecture (used to find binary packages). The default is the output of C. =item B<-b>, B<--binary> Download binary packages. The default is not to download them. =item B<-B>, B<--nobinary> Don't download binary packages. This is the default. =item B<-u>, B<--build> Build downloaded source packages. This implies B<--unpack>. B<--build> is turned off by default, but it is turned on if you specify any F<*.dsc> or F<*.deb> files on the command line. =item B<--debug> Turn debugging on. Specify multiple times for more detail. =item B<--dir> I Specify the path to the top of the Debian hierarchy on the primary FTP server. =item B<-d> I, B<--dist> I Specify the distribution from which to download packages. The default is B. You can use the name of any subdirectory in the F directory in the Debian archive, or B (which is special-cased). =item B<--help> Show the usage message and die. =item B<-h> I, B<--host> I Specify the host name of the primary FTP server. =item B<-i>, B<--install> Install binary packages. This turns on B<--unpack> and B<--build>, so specifying it will cause B to install just about everything you mention on the command line. Packages will be downloaded, unpacked, built, and installed, F<*.dsc> files will be unpacked, built, and installed, and F<*.deb> files will be installed. =item B<-n>, B<--no> Go through the motions, but don't actually download any packages. =item B<-f>, B<--no-config> Don't process either /etc/debget.rc or ~/.debget.rc. =item B<--no-download-re> I Don't download files whose name match the Perl regexp I. This option can be specified multiple times. =item B<--no-download-tar> Don't download F<*.tar.gz> files. This is normally used when downloading sources, when specified you'll just fetch the F<*.diff.gz> and F<*.dsc> files. =item B<--no-dscverify> Don't run B before unpacking sources. B checks that the F<.dsc> file is signed by a Debian developer and that the MD5 sums and file sizes given in it match the files about to be unpacked. These are good things, so B will try to run B by default. The B program is in the F package. =item B<-F>, B<--no-user-config> Don't process ~/.debget.rc. =item B<--non-us-dir> I Specify the path to the top of the Debian hierarchy for non-US packages. =item B<-H> I, B<--non-us-host> I Specify the host name of the non-US FTP server. =item B<-r> I, B<--root-build> I Use I to become root when building a package from source. The default is the first of F, F, F, or F which is present on the system. =item B<-R> I, B<--root-install> I Use I to become root when installing a package. The default is what you gave for B<--root-build> if you specified anything, otherwise the first of F, F, or F which is present on the system. =item B<-s>, B<--source> Download source packages. This is the default. =item B<-S>, B<--nosource> Don't download source packages. The default is to download them. =item B<--unpack> Unpack downloaded source packages. =item B<-v>, B<--verbose> Be verbose. =item B<--version> Print the version number and exit. =back =head1 CONFIGURATION FILES The default behavior of B can be modified by the configuration files F and F<~/.debget.rc> (unless modified by the B<-f> or B<-F> switches). These files are processed as Perl code. They can set these variables to control the program (with their corresponding switches): =over 4 =item C<$O{'arch'}> B<--arch> =item C<$O{'binary'}> B<--binary>, boolean =item C<{$O{'build'}> B<--build>, boolean =item C<$O{'debug'}> B<--debug>, integer =item C<$O{'dir'}> B<--dir> =item C<$O{'dist'}> B<--dist> =item C<$O{'host'}> B<--host> =item C<$O{'install'}> B<--install>, boolean =item C<$O{'no'}> B<--no>, boolean =item C<$O{'no-config'}> B<--no-config>, boolean =item C<$O{'no-download-re'}> B<--no-download-re>, array reference =item C<$O{'no-download-tar'}> B<--no-download-tar>, boolean =item C<$O{'no-dscverify'}> B<--no-dscverify>, boolean =item C<$O{'no-user-config'}> B<--no-user-config>, boolean =item C<$O{'non-us-dir'}> B<--non-us-dir> =item C<$O{'non-us-host'}> B<--non-us-host> =item C<$O{'root-build'}> B<--root-build> =item C<$O{'root-install'}> B<--root-install> =item C<$O{'source'}> B<--source>, boolean =item C<$O{'unpack'}> B<--unpack>, boolean =item C<$O{'verbose'}> B<--verbose>, boolean =back Here's an example configuration file: $O{'host'} = 'debian.terrabox.com'; $O{'verbose'} = 1; =head1 BUGS If you specify B<--install> all produced binary packages will be installed, even ones you didn't specify on the command line. Eg, if you run C it will install both F and F. I'd like to add a B<--clean> switch which will make the program remove intermediate files. See F if your transfers are failing because you need to use passive FTP or a proxy. =head1 SEE ALSO dselect(8), apt-get(8) =head1 AVAILABILITY The code is licensed under the GNU GPL and distributed as part of Debian. =head1 AUTHOR Roderick Schertler =cut debget-1.6+nmu1/README0000644000232200023220000000172506642306043014544 0ustar pbuilderpbuilderThis is the debget distribution. debget is program which downloads source and binary Debian packages by name. Roderick Schertler Copyright (C) 1998 Roderick Schertler. 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. For a copy of the GNU General Public License write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/doc/copyright/GPL'. $Id: README,v 1.1 1998-12-30 02:12:51 roderick Exp $