#! /usr/bin/perl use strict; use warnings; use Dpkg; use Dpkg::Gettext; my @filesinarchive; my %dirincluded; my %notfileobject; my $fn; my $ur; my $varlistfile; my $controlfile; my $changelogfile; my $changelogformat; my $diff_ignore_regexp = ''; my $diff_ignore_default_regexp = ' # Ignore general backup files (?:^|/).*~$| # Ignore emacs recovery files (?:^|/)\.#.*$| # Ignore vi swap files (?:^|/)\..*\.swp$| # Ignore baz-style junk files or directories (?:^|/),,.*(?:$|/.*$)| # File-names that should be ignored (never directories) (?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$| # File or directory names that should be ignored (?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git| \.shelf|\.bzr(?:\.backup|tags)?)(?:$|/.*$) '; # Take out comments and newlines $diff_ignore_default_regexp =~ s/^#.*$//mg; $diff_ignore_default_regexp =~ s/\n//sg; my $sourcestyle = 'X'; my $min_dscformat = 1; my $max_dscformat = 2; my $def_dscformat = "1.0"; # default format for -b my $expectprefix; # Packages my %remove; my %override; # Files my %md5sum; my %size; my %type; # used by checktype my %filepatched; # used by checkdiff my %dirtocreate; # used by checkdiff my @tar_ignore; use POSIX; use Fcntl qw (:mode); use File::Temp qw (tempfile); use Cwd; push (@INC, $dpkglibdir); require 'controllib.pl'; our (%f, %fi, %fieldimps); our $sourcepackage; our $warnable_error; our $quiet_warnings; our %substvar; our @src_dep_fields; textdomain("dpkg-dev"); my @dsc_fields = (qw(Format Source Binary Architecture Version Origin Maintainer Uploaders Standards-Version), @src_dep_fields); # Make sure patch doesn't get any funny ideas delete $ENV{'POSIXLY_CORRECT'}; my @exit_handlers = (); sub exit_handler { &$_ foreach ( reverse @exit_handlers ); exit(127); } $SIG{'INT'} = \&exit_handler; $SIG{'HUP'} = \&exit_handler; $SIG{'QUIT'} = \&exit_handler; sub version { printf _g("Debian %s version %s.\n"), $progname, $version; printf _g(" Copyright (C) 1996 Ian Jackson and Klee Dienes."); printf _g(" This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO warranty. "); } sub usage { printf _g( "Usage: %s [