diff options
Diffstat (limited to 'scripts')
132 files changed, 6493 insertions, 3824 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore index 0d1f29ac9..a93412826 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,3 +1,4 @@ +Build.PL dpkg-architecture dpkg-buildflags dpkg-buildpackage diff --git a/scripts/Build.PL.in b/scripts/Build.PL.in new file mode 100644 index 000000000..b8f62d26f --- /dev/null +++ b/scripts/Build.PL.in @@ -0,0 +1,143 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +eval { + require Module::Build; +} or do { + die "error: Missing Module::Build module, cannot proceed.\n"; +}; + +if (-e 'Build.PL.in') { + die "error: This is an in-tree build, not a proper perl distribution.\n" . + "To create one please configure normally and then run 'make dist'.\n"; +} + +my $class = Module::Build->subclass( + class => 'Module::Build::Dpkg', + code => q{ + sub subst { + my ($self, $file) = @_; + my $path = $self->install_path(); + my $version = $self->dist_version(); + + unlink "blib/$file" + or die "error: cannot remove blib/$file: $!\n"; + open my $fhin, '<', $file + or die "error: cannot open $file: $!\n"; + open my $fhout, '>', "blib/$file" + or die "error: cannot create blib/$file: $!\n"; + while (<$fhin>) { + s{our \$PROGVERSION = .*;}{our \$PROGVERSION = '$version';}; + s{our \$CONFDIR = .*;}{our \$CONFDIR = '$path->{conf}';}; + s{our \$DATADIR = .*;}{our \$DATADIR = '$path->{data}';}; + s{our \$ADMINDIR = .*;}{our \$ADMINDIR = '$path->{admin}';}; + s{our \$LIBDIR = .*;}{our \$LIBDIR = '$path->{libexec}';}; + print { $fhout } $_; + } + close $fhout or die "error: cannot write blib/$file: $!\n"; + close $fhin; + } + + sub ACTION_build { + my $self = shift; + + $self->SUPER::ACTION_build; + $self->subst('lib/Dpkg.pm'); + } + sub ACTION_test { + my $self = shift; + + local $ENV{LANG} = 'C'; + local $ENV{LC_ALL} = 'C'; + local $ENV{DPKG_TEST_MODE} = 'cpan'; + local $ENV{DPKG_DATADIR} = 'data'; + local $ENV{DPKG_ORIGINS_DIR} = 't/origins'; + $self->SUPER::ACTION_test; + } + }, +); + +my $build = $class->new( + dist_name => '@PACKAGE_CPAN_NAME@', + dist_abstract => 'Debian Package Manager Perl modules', + dist_version => '@PACKAGE_VERSION@', + dist_author => '@PACKAGE_COPYRIGHT_HOLDER@ <@PACKAGE_BUGREPORT@>', + license => 'GPL_2', + + release_status => @PACKAGE_DIST_IS_RELEASE@ ? 'stable' : 'testing', + + # Set only to avoid warnings. + module_name => '@PACKAGE_CPAN_NAME@', + + meta_merge => { + 'meta-spec' => { + version => 2, + }, + prereqs => { + test => { + recommends => { + 'Test::Pod' => 0, + 'Test::Strict' => 0, + }, + }, + develop => { + recommends => { + 'Test::MinimumVersion' => 0, + 'Test::Perl::Critic' => 0, + 'Test::Pod::Coverage' => 0, + 'Test::Spelling' => 0, + 'Test::Synopsis' => 0, + }, + }, + }, + resources => { + homepage => '@PACKAGE_URL@', + repository => { + type => '@PACKAGE_VCS_TYPE@', + url => '@PACKAGE_VCS_URL@', + web => '@PACKAGE_VCS_WEB@', + }, + bugtracker => { + web => '@PACKAGE_BUG_WEB@', + }, + }, + keywords => [ qw(dpkg debian perl) ], + }, + + sign => @PACKAGE_DIST_IS_RELEASE@, + dynamic_config => 0, + + configure_requires => { + 'Module::Build' => '0.4004', + }, + test_requires => { + 'TAP::Harness' => 0, + 'Test::More' => 0, + }, + recommends => { + 'Algorithm::Merge' => 0, + 'File::FcntlLock' => 0, + 'Locale::gettext' => 0, + + }, + requires => { + 'perl' => '@PERL_MIN_VERSION@', + }, + + data_files => { + map { $_ => $_ } glob 'data/*' + }, + install_path => { + conf => '/etc/dpkg', + data => '/usr/share/dpkg', + admin => '/var/lib/dpkg', + libexec => '/usr/lib/dpkg', + }, +); + +$build->add_build_element('data'); +$build->create_build_script(); + +1; diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm index 0d171c080..9d06b4145 100644 --- a/scripts/Dpkg.pm +++ b/scripts/Dpkg.pm @@ -24,12 +24,14 @@ Dpkg - module with core variables The Dpkg module provides a set of variables with information concerning this system installation. +It is also the entry point to the Dpkg module hierarchy. + =cut use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '2.00'; our @EXPORT_OK = qw( $PROGNAME $PROGVERSION @@ -41,13 +43,6 @@ our @EXPORT_OK = qw( $LIBDIR $DATADIR ); -our @EXPORT = qw( - $version - $progname - $admindir - $dpkglibdir - $pkgdatadir -); use Exporter qw(import); @@ -99,7 +94,7 @@ Contains the path to the dpkg architecture tables directory. our ($PROGNAME) = $0 =~ m{(?:.*/)?([^/]*)}; # The following lines are automatically fixed at install time -our $PROGVERSION = '1.19.x'; +our $PROGVERSION = '1.20.x'; our $PROGMAKE = $ENV{DPKG_PROGMAKE} // 'make'; our $PROGTAR = $ENV{DPKG_PROGTAR} // 'tar'; our $PROGPATCH = $ENV{DPKG_PROGPATCH} // 'patch'; @@ -107,20 +102,183 @@ our $PROGPATCH = $ENV{DPKG_PROGPATCH} // 'patch'; our $CONFDIR = '/etc/dpkg'; our $ADMINDIR = '/var/lib/dpkg'; our $LIBDIR = '.'; -our $DATADIR = '..'; +our $DATADIR = '../data'; $DATADIR = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR}; -# XXX: Backwards compatibility, to be removed on VERSION 2.00. -## no critic (Variables::ProhibitPackageVars) -our $version = $PROGVERSION; -our $admindir = $ADMINDIR; -our $dpkglibdir = $LIBDIR; -our $pkgdatadir = $DATADIR; -## use critic +=head1 MODULES + +The following is the list of public modules within the Dpkg hierarchy. Only +modules with versions 1.00 or higher, and only the interfaces documented in +their POD are considered public. + +=over + +=item L<Dpkg> + +This module, core variables. + +=item L<Dpkg::Arch> + +Architecture handling functions. + +=item L<Dpkg::Build::Info> + +Build information functions. + +=item L<Dpkg::BuildFlags> + +Set, modify and query compilation build flags. + +=item L<Dpkg::BuildOptions> + +Parse and manipulate B<DEB_BUILD_OPTIONS>. + +=item L<Dpkg::BuildProfiles> + +Parse and manipulate build profiles. + +=item L<Dpkg::Changelog> + +Parse changelogs. + +=item L<Dpkg::Changelog::Entry> + +Represents a changelog entry. + +=item L<Dpkg::Changelog::Parse> + +Generic changelog parser for F<dpkg-parsechangelog>. + +=item L<Dpkg::Checksums> + +Generate and parse checksums. + +=item L<Dpkg::Compression> + +Simple database of available compression methods. + +=item L<Dpkg::Compression::FileHandle> + +Transparently compress and decompress files. + +=item L<Dpkg::Compression::Process> + +Wrapper around compression tools. + +=item L<Dpkg::Conf> + +Parse F<dpkg> configuration files. + +=item L<Dpkg::Control> + +Parse and manipulate Debian control information (F<.dsc>, F<.changes>, +F<Packages>/F<Sources> entries, etc.). + +=item L<Dpkg::Control::Changelog> + +Represent fields output by F<dpkg-parsechangelog>. + +=item L<Dpkg::Control::Fields> + +Manage (list of known) control fields. + +=item L<Dpkg::Control::Hash> + +Parse and manipulate a block of RFC822-like fields. + +=item L<Dpkg::Control::Info> + +Parse files like F<debian/control>. + +=item L<Dpkg::Control::Tests> + +Parse files like F<debian/tests/control>. + +=item L<Dpkg::Control::Tests::Entry> + +Represents a F<debian/tests/control> stanza. + +=item L<Dpkg::Deps> + +Parse and manipulate dependencies. + +=item L<Dpkg::Deps::Simple> + +Represents a single dependency statement. + +=item L<Dpkg::Deps::Multiple> + +Base module to represent multiple dependencies. + +=item L<Dpkg::Deps::Union> + +List of unrelated dependencies. + +=item L<Dpkg::Deps::AND> + +List of AND dependencies. + +=item L<Dpkg::Deps::OR> + +List of OR dependencies. + +=item L<Dpkg::Deps::KnownFacts> + +List of installed and virtual packages. + +=item L<Dpkg::Exit> + +Push, pop and run exit handlers. + +=item L<Dpkg::Gettext> + +Wrapper around L<Locale::gettext>. + +=item L<Dpkg::IPC> + +Spawn sub-processes and feed/retrieve data. + +=item L<Dpkg::Index> + +Collections of L<Dpkg::Control> (F<Packages>/F<Sources> files for example). + +=item L<Dpkg::Interface::Storable> + +Base object serializer. + +=item L<Dpkg::Path> + +Common path handling functions. + +=item L<Dpkg::Source::Format> + +Parse and manipulate debian/source/format files. + +=item L<Dpkg::Source::Package> + +Extract Debian source packages. + +=item L<Dpkg::Substvars> + +Substitute variables in strings. + +=item L<Dpkg::Vendor> + +Identify current distribution vendor. + +=item L<Dpkg::Version> + +Parse and manipulate Debian package versions. + +=back =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Remove variables: $version, $progname, $admindir, $dpkglibdir and $pkgdatadir. + =head2 Version 1.03 (dpkg 1.18.24) New variable: $PROGPATCH. diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm index db6be6b2f..531bc118e 100644 --- a/scripts/Dpkg/Arch.pm +++ b/scripts/Dpkg/Arch.pm @@ -36,7 +36,7 @@ use strict; use warnings; use feature qw(state); -our $VERSION = '1.02'; +our $VERSION = '1.03'; our @EXPORT_OK = qw( get_raw_build_arch get_raw_host_arch @@ -601,17 +601,25 @@ sub debarch_is_wildcard($) return 0; } -=item $bool = debarch_is_illegal($arch) +=item $bool = debarch_is_illegal($arch, %options) Validate an architecture name. +If the "positive" option is set to a true value, only positive architectures +will be accepted, otherwise negated architectures are allowed. + =cut sub debarch_is_illegal { - my ($arch) = @_; + my ($arch, %opts) = @_; + my $arch_re = qr/[a-zA-Z0-9][a-zA-Z0-9-]*/; - return $arch !~ m/^!?[a-zA-Z0-9][a-zA-Z0-9-]*$/; + if ($opts{positive}) { + return $arch !~ m/^$arch_re$/; + } else { + return $arch !~ m/^!?$arch_re$/; + } } =item $bool = debarch_is_concerned($arch, @arches) @@ -653,15 +661,18 @@ sub debarch_is_concerned Parse an architecture list. +If the "positive" option is set to a true value, only positive architectures +will be accepted, otherwise negated architectures are allowed. + =cut sub debarch_list_parse { - my $arch_list = shift; + my ($arch_list, %opts) = @_; my @arch_list = split ' ', $arch_list; foreach my $arch (@arch_list) { - if (debarch_is_illegal($arch)) { + if (debarch_is_illegal($arch, %opts)) { error(g_("'%s' is not a legal architecture in list '%s'"), $arch, $arch_list); } @@ -678,6 +689,11 @@ __END__ =head1 CHANGES +=head2 Version 1.03 (dpkg 1.19.1) + +New argument: Accept a "positive" option in debarch_is_illegal() and +debarch_list_parse(). + =head2 Version 1.02 (dpkg 1.18.19) New import tags: ":all", ":getters", ":parsers", ":mappers", ":operators". diff --git a/scripts/Dpkg/Build/Types.pm b/scripts/Dpkg/Build/Types.pm index 45a81d3ba..9fd0344df 100644 --- a/scripts/Dpkg/Build/Types.pm +++ b/scripts/Dpkg/Build/Types.pm @@ -33,6 +33,7 @@ our @EXPORT = qw( build_is set_build_type set_build_type_from_options + set_build_type_from_targets get_build_options_from_type ); @@ -108,6 +109,15 @@ my %build_types = ( any => BUILD_ARCH_DEP, all => BUILD_ARCH_INDEP, ); +my %build_targets = ( + 'clean' => BUILD_SOURCE, + 'build' => BUILD_BINARY, + 'build-arch' => BUILD_ARCH_DEP, + 'build-indep' => BUILD_ARCH_INDEP, + 'binary' => BUILD_BINARY, + 'binary-arch' => BUILD_ARCH_DEP, + 'binary-indep' => BUILD_ARCH_INDEP, +); =back @@ -193,9 +203,10 @@ sub set_build_type $current_option = $build_option; } -=item set_build_type_from_options($build_type, $build_option, %opts) +=item set_build_type_from_options($build_types, $build_option, %opts) -Set the current build type from a list of build type components. +Set the current build type from a list of comma-separated build type +components. The function will check and abort on incompatible build type assignments, this behavior can be disabled by using the boolean option "nocheck". @@ -216,6 +227,28 @@ sub set_build_type_from_options set_build_type($build_type, $build_option, %opts); } +=item set_build_type_from_targets($build_targets, $build_option, %opts) + +Set the current build type from a list of comma-separated build target +components. + +The function will check and abort on incompatible build type assignments, +this behavior can be disabled by using the boolean option "nocheck". + +=cut + +sub set_build_type_from_targets +{ + my ($build_targets, $build_option, %opts) = @_; + + my $build_type = 0; + foreach my $target (split /,/, $build_targets) { + $build_type |= $build_targets{$target} // BUILD_BINARY; + } + + set_build_type($build_type, $build_option, %opts); +} + =item get_build_options_from_type() Get the current build type as a set of comma-separated string options. diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm index 0533b12b5..53b3cad00 100644 --- a/scripts/Dpkg/BuildFlags.pm +++ b/scripts/Dpkg/BuildFlags.pm @@ -18,12 +18,11 @@ package Dpkg::BuildFlags; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '1.04'; use Dpkg (); use Dpkg::Gettext; use Dpkg::Build::Env; -use Dpkg::BuildOptions; use Dpkg::ErrorHandling; use Dpkg::Vendor qw(run_vendor_hook); @@ -35,7 +34,7 @@ Dpkg::BuildFlags - query build flags =head1 DESCRIPTION -The Dpkg::BuildFlags object is used by dpkg-buildflags and can be used +This class is used by dpkg-buildflags and can be used to query the same information. =head1 METHODS @@ -69,21 +68,16 @@ Reset the flags stored to the default set provided by the vendor. sub load_vendor_defaults { my $self = shift; - $self->{options} = {}; - $self->{source} = {}; $self->{features} = {}; - my $build_opts = Dpkg::BuildOptions->new(); - $self->{build_options} = $build_opts; - my $default_flags = $build_opts->has('noopt') ? '-g -O0' : '-g -O2'; $self->{flags} = { CPPFLAGS => '', - CFLAGS => $default_flags, - CXXFLAGS => $default_flags, - OBJCFLAGS => $default_flags, - OBJCXXFLAGS => $default_flags, - GCJFLAGS => $default_flags, - FFLAGS => $default_flags, - FCFLAGS => $default_flags, + CFLAGS => '', + CXXFLAGS => '', + OBJCFLAGS => '', + OBJCXXFLAGS => '', + GCJFLAGS => '', + FFLAGS => '', + FCFLAGS => '', LDFLAGS => '', }; $self->{origin} = { @@ -218,6 +212,20 @@ sub load_config { $self->load_maintainer_config(); } +=item $bf->unset($flag) + +Unset the build flag $flag, so that it will not be known anymore. + +=cut + +sub unset { + my ($self, $flag) = @_; + + delete $self->{flags}->{$flag}; + delete $self->{origin}->{$flag}; + delete $self->{maintainer}->{$flag}; +} + =item $bf->set($flag, $value, $source, $maint) Update the build flag $flag with value $value and record its origin as @@ -446,6 +454,10 @@ sub list { =head1 CHANGES +=head2 Version 1.04 (dpkg 1.20.0) + +New method: $bf->unset(). + =head2 Version 1.03 (dpkg 1.16.5) New method: $bf->get_feature_areas() to list possible values for diff --git a/scripts/Dpkg/BuildOptions.pm b/scripts/Dpkg/BuildOptions.pm index 057dfc1e3..e03ea320b 100644 --- a/scripts/Dpkg/BuildOptions.pm +++ b/scripts/Dpkg/BuildOptions.pm @@ -34,7 +34,7 @@ Dpkg::BuildOptions - parse and update build options =head1 DESCRIPTION -The Dpkg::BuildOptions object can be used to manipulate options stored +This class can be used to manipulate options stored in environment variables like DEB_BUILD_OPTIONS and DEB_BUILD_MAINT_OPTIONS. @@ -164,7 +164,7 @@ Each feature is prefixed with a ‘B<+>’ or a ‘B<->’ character as a marker to enable or disable it. The special feature “B<all>” can be used to act on all known features. -Unknown of malformed features will emit warnings. +Unknown or malformed features will emit warnings. =cut diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm index db8e3eb09..04fa511ec 100644 --- a/scripts/Dpkg/Changelog.pm +++ b/scripts/Dpkg/Changelog.pm @@ -24,7 +24,7 @@ Dpkg::Changelog - base class to implement a changelog parser Dpkg::Changelog is a class representing a changelog file as an array of changelog entries (Dpkg::Changelog::Entry). -By deriving this object and implementing its parse method, you +By deriving this class and implementing its parse method, you add the ability to fill this object with changelog entries. =cut @@ -34,7 +34,7 @@ package Dpkg::Changelog; use strict; use warnings; -our $VERSION = '1.01'; +our $VERSION = '2.00'; use Carp; @@ -74,12 +74,6 @@ sub new { return $self; } -=item $c->load($filename) - -Parse $filename as a changelog. - -=cut - =item $c->set_options(%opts) Change the value of some options. "verbose" (defaults to 1) defines @@ -96,6 +90,22 @@ sub set_options { $self->{$_} = $opts{$_} foreach keys %opts; } +=item $count = $c->parse($fh, $description) + +Read the filehandle and parse a changelog in it. The data in the object is +reset before parsing new data. + +Returns the number of changelog entries that have been parsed with success. + +This method needs to be implemented by one of the specialized changelog +format subclasses. + +=item $count = $c->load($filename) + +Parse $filename contents for a changelog. + +Returns the number of changelog entries that have been parsed with success. + =item $c->reset_parse_errors() Can be used to delete all information about errors occurred during @@ -254,7 +264,7 @@ sub __sanity_check_range { push @versions, $version->as_string(); } if ((defined($r->{since}) and not exists $versions{$r->{since}})) { - warning(g_("'%s' option specifies non-existing version"), 'since'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'since', $r->{since}); warning(g_('use newest entry that is earlier than the one specified')); foreach my $v (@versions) { if (version_compare_relation($v, REL_LT, $r->{since})) { @@ -270,7 +280,7 @@ sub __sanity_check_range { } } if ((defined($r->{from}) and not exists $versions{$r->{from}})) { - warning(g_("'%s' option specifies non-existing version"), 'from'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'from', $r->{from}); warning(g_('use oldest entry that is later than the one specified')); my $oldest; foreach my $v (@versions) { @@ -281,12 +291,12 @@ sub __sanity_check_range { if (defined($oldest)) { $r->{from} = $oldest; } else { - warning(g_("no such entry found, ignoring '%s' parameter"), 'from'); + warning(g_("no such entry found, ignoring '%s' parameter '%s'"), 'from', $r->{from}); delete $r->{from}; # No version was oldest } } if (defined($r->{until}) and not exists $versions{$r->{until}}) { - warning(g_("'%s' option specifies non-existing version"), 'until'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'until', $r->{until}); warning(g_('use oldest entry that is later than the one specified')); my $oldest; foreach my $v (@versions) { @@ -297,12 +307,12 @@ sub __sanity_check_range { if (defined($oldest)) { $r->{until} = $oldest; } else { - warning(g_("no such entry found, ignoring '%s' parameter"), 'until'); + warning(g_("no such entry found, ignoring '%s' parameter '%s'"), 'until', $r->{until}); delete $r->{until}; # No version was oldest } } if (defined($r->{to}) and not exists $versions{$r->{to}}) { - warning(g_("'%s' option specifies non-existing version"), 'to'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'to', $r->{to}); warning(g_('use newest entry that is earlier than the one specified')); foreach my $v (@versions) { if (version_compare_relation($v, REL_LT, $r->{to})) { @@ -312,17 +322,17 @@ sub __sanity_check_range { } if (not exists $versions{$r->{to}}) { # No version was earlier - warning(g_("no such entry found, ignoring '%s' parameter"), 'to'); + warning(g_("no such entry found, ignoring '%s' parameter '%s'"), 'to', $r->{to}); delete $r->{to}; } } if (defined($r->{since}) and $data->[0]->get_version() eq $r->{since}) { - warning(g_("'since' option specifies most recent version, ignoring")); + warning(g_("'since' option specifies most recent version '%s', ignoring"), $r->{since}); delete $r->{since}; } if (defined($r->{until}) and $data->[-1]->get_version() eq $r->{until}) { - warning(g_("'until' option specifies oldest version, ignoring")); + warning(g_("'until' option specifies oldest version '%s', ignoring"), $r->{until}); delete $r->{until}; } ## use critic @@ -332,11 +342,12 @@ sub get_range { my ($self, $range) = @_; $range //= {}; my $res = $self->_data_range($range); - if (defined $res) { - return @$res if wantarray; - return $res; + return unless defined $res; + if (wantarray) { + return reverse @{$res} if $range->{reverse}; + return @{$res}; } else { - return; + return $res; } } @@ -442,11 +453,7 @@ sub abort_early { return; } -=item $c->save($filename) - -Save the changelog in the given file. - -=item $c->output() +=item $str = $c->output() =item "$c" @@ -475,6 +482,12 @@ sub output { return $str; } +=item $c->save($filename) + +Save the changelog in the given file. + +=cut + our ( @URGENCIES, %URGENCIES ); BEGIN { @URGENCIES = qw(low medium high critical emergency); @@ -657,36 +670,6 @@ sub format_range { } } -=item $control = $c->dpkg($range) - -This is a deprecated alias for $c->format_range('dpkg', $range). - -=cut - -sub dpkg { - my ($self, $range) = @_; - - warnings::warnif('deprecated', - 'deprecated method, please use format_range("dpkg", $range) instead'); - - return $self->format_range('dpkg', $range); -} - -=item @controls = $c->rfc822($range) - -This is a deprecated alias for C<scalar c->format_range('rfc822', $range)>. - -=cut - -sub rfc822 { - my ($self, $range) = @_; - - warnings::warnif('deprecated', - 'deprecated method, please use format_range("rfc822", $range) instead'); - - return scalar $self->format_range('rfc822', $range); -} - =back =head1 RANGE SELECTION @@ -766,6 +749,10 @@ with only one of the options specified. =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Remove methods: $c->dpkg(), $c->rfc822(). + =head2 Version 1.01 (dpkg 1.18.8) New method: $c->format_range(). diff --git a/scripts/Dpkg/Changelog/Debian.pm b/scripts/Dpkg/Changelog/Debian.pm index a44ac666c..a85f3af12 100644 --- a/scripts/Dpkg/Changelog/Debian.pm +++ b/scripts/Dpkg/Changelog/Debian.pm @@ -24,6 +24,12 @@ Dpkg::Changelog::Debian - parse Debian changelogs =head1 DESCRIPTION +This class represents a Debian changelog file as an array of changelog +entries (Dpkg::Changelog::Entry::Debian). +It implements the generic interface Dpkg::Changelog. +Only methods specific to this implementation are described below, +the rest are inherited. + Dpkg::Changelog::Debian parses Debian changelogs as described in deb-changelog(5). @@ -118,10 +124,11 @@ my $ancient_delimiter_re = qr{ =over 4 -=item $c->parse($fh, $description) +=item $count = $c->parse($fh, $description) -Read the filehandle and parse a Debian changelog in it. The data in the -object is reset before parsing new data. +Read the filehandle and parse a Debian changelog in it, to store the entries +as an array of Dpkg::Changelog::Entry::Debian objects. +Any previous entries in the object are reset before parsing new data. Returns the number of changelog entries that have been parsed with success. @@ -162,9 +169,13 @@ sub parse { $expect= START_CHANGES; @blanklines = (); } elsif (m/^(?:;;\s*)?Local variables:/io) { - last; # skip Emacs variables at end of file + # Save any trailing Emacs variables at end of file. + $self->set_unparsed_tail("$_\n" . (file_slurp($fh) // '')); + last; } elsif (m/^vim:/io) { - last; # skip Vim modelines at end of file + # Save any trailing Vim modelines at end of file. + $self->set_unparsed_tail("$_\n" . (file_slurp($fh) // '')); + last; } elsif (m/^\$\w+:.*\$/o) { next; # skip stuff that look like a RCS keyword } elsif (m/^\# /o) { diff --git a/scripts/Dpkg/Changelog/Entry.pm b/scripts/Dpkg/Changelog/Entry.pm index 144dacb0f..d6ce55601 100644 --- a/scripts/Dpkg/Changelog/Entry.pm +++ b/scripts/Dpkg/Changelog/Entry.pm @@ -39,7 +39,7 @@ Dpkg::Changelog::Entry - represents a changelog entry =head1 DESCRIPTION -This object represents a changelog entry. It is composed +This class represents a changelog entry. It is composed of a set of lines with specific purpose: an header line, changes lines, a trailer line. Blank lines can be between those kind of lines. diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm index 3d1888638..1e7daf55b 100644 --- a/scripts/Dpkg/Changelog/Entry/Debian.pm +++ b/scripts/Dpkg/Changelog/Entry/Debian.pm @@ -19,10 +19,8 @@ package Dpkg::Changelog::Entry::Debian; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '2.00'; our @EXPORT_OK = qw( - $regex_header - $regex_trailer match_header match_trailer find_closes @@ -47,20 +45,18 @@ Dpkg::Changelog::Entry::Debian - represents a Debian changelog entry =head1 DESCRIPTION -This object represents a Debian changelog entry. It implements the -generic interface Dpkg::Changelog::Entry. Only functions specific to this -implementation are described below. +This class represents a Debian changelog entry. +It implements the generic interface Dpkg::Changelog::Entry. +Only functions specific to this implementation are described below, +the rest are inherited. =cut my $name_chars = qr/[-+0-9a-z.]/i; -# XXX: Backwards compatibility, stop exporting on VERSION 2.00. -## no critic (Variables::ProhibitPackageVars) - # The matched content is the source package name ($1), the version ($2), # the target distributions ($3) and the options on the rest of the line ($4). -our $regex_header = qr{ +my $regex_header = qr{ ^ (\w$name_chars*) # Package name \ \(([^\(\) \t]+)\) # Package version @@ -73,7 +69,7 @@ our $regex_header = qr{ # The matched content is the maintainer name ($1), its email ($2), # some blanks ($3) and the timestamp ($4), which is decomposed into # day of week ($6), date-time ($7) and this into month name ($8). -our $regex_trailer = qr< +my $regex_trailer = qr< ^ \ \-\- # Trailer marker \ (.*) # Maintainer name @@ -100,8 +96,6 @@ my %month_name = map { $_ => } qw( August September October November December ); -## use critic - =head1 METHODS =over 4 @@ -236,7 +230,7 @@ sub parse_trailer { push @errors, sprintf(g_('invalid abbreviated month name \'%s\''), $8); } } - push @errors, sprintf(g_("cannot parse non-comformant date '%s'"), $7); + push @errors, sprintf(g_("cannot parse non-conformant date '%s'"), $7); }; $self->{trailer_timestamp_date} = $4; } else { @@ -245,36 +239,6 @@ sub parse_trailer { return @errors; } -=item $entry->check_header() - -Obsolete method. Use parse_header() instead. - -=cut - -sub check_header { - my $self = shift; - - warnings::warnif('deprecated', - 'obsolete check_header(), use parse_header() instead'); - - return $self->parse_header(); -} - -=item $entry->check_trailer() - -Obsolete method. Use parse_trailer() instead. - -=cut - -sub check_trailer { - my $self = shift; - - warnings::warnif('deprecated', - 'obsolete check_trailer(), use parse_trailer() instead'); - - return $self->parse_header(); -} - =item $entry->normalize() Normalize the content. Strip whitespaces at end of lines, use a single @@ -465,6 +429,12 @@ sub find_closes { =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Remove methods: $entry->check_header(), $entry->check_trailer(). + +Hide variables: $regex_header, $regex_trailer. + =head2 Version 1.03 (dpkg 1.18.8) New methods: $entry->get_timepiece(). diff --git a/scripts/Dpkg/Changelog/Parse.pm b/scripts/Dpkg/Changelog/Parse.pm index e107dcf6d..8140e25a6 100644 --- a/scripts/Dpkg/Changelog/Parse.pm +++ b/scripts/Dpkg/Changelog/Parse.pm @@ -33,10 +33,8 @@ package Dpkg::Changelog::Parse; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '2.00'; our @EXPORT = qw( - changelog_parse_debian - changelog_parse_plugin changelog_parse ); @@ -56,12 +54,16 @@ sub _changelog_detect_format { if ($file ne '-') { local $_; - open my $format_fh, '-|', 'tail', '-n', '40', $file - or syserr(g_('cannot create pipe for %s'), 'tail'); + open my $format_fh, '<', $file + or syserr(g_('cannot open file %s'), $file); + if (-s $format_fh > 4096) { + seek $format_fh, -4096, 2 + or syserr(g_('cannot seek into file %s'), $file); + } while (<$format_fh>) { $format = $1 if m/\schangelog-format:\s+([0-9a-z]+)\W/; } - close $format_fh or subprocerr(g_('tail of %s'), $file); + close $format_fh; } return $format; @@ -71,40 +73,6 @@ sub _changelog_detect_format { =over 4 -=item $fields = changelog_parse_debian(%opt) - -This function is deprecated, use changelog_parse() instead, with the changelog -format set to "debian". - -=cut - -sub changelog_parse_debian { - my (%options) = @_; - - warnings::warnif('deprecated', - 'deprecated function changelog_parse_debian, use changelog_parse instead'); - - # Force the plugin to be debian. - $options{changelogformat} = 'debian'; - - return _changelog_parse(%options); -} - -=item $fields = changelog_parse_plugin(%opt) - -This function is deprecated, use changelog_parse() instead. - -=cut - -sub changelog_parse_plugin { - my (%options) = @_; - - warnings::warnif('deprecated', - 'deprecated function changelog_parse_plugin, use changelog_parse instead'); - - return _changelog_parse(%options); -} - =item $fields = changelog_parse(%opt) This function will parse a changelog. In list context, it returns as many @@ -133,22 +101,16 @@ All the other keys in %opt are forwarded to the parser module constructor. =cut -sub _changelog_parse { +sub changelog_parse { my (%options) = @_; - # Setup and sanity checks. - if (exists $options{libdir}) { - warnings::warnif('deprecated', - 'obsolete libdir option, changelog parsers are now perl modules'); - } - $options{file} //= 'debian/changelog'; $options{label} //= $options{file}; $options{changelogformat} //= _changelog_detect_format($options{file}); $options{format} //= 'dpkg'; $options{compression} //= $options{file} ne 'debian/changelog'; - my @range_opts = qw(since until from to offset count all); + my @range_opts = qw(since until from to offset count reverse all); $options{all} = 1 if exists $options{all}; if (none { defined $options{$_} } @range_opts) { $options{count} = 1; @@ -191,19 +153,15 @@ sub _changelog_parse { } } -sub changelog_parse { - my (%options) = @_; +=back - if (exists $options{forceplugin}) { - warnings::warnif('deprecated', 'obsolete forceplugin option'); - } +=head1 CHANGES - return _changelog_parse(%options); -} +=head2 Version 2.00 (dpkg 1.20.0) -=back +Remove functions: changelog_parse_debian(), changelog_parse_plugin(). -=head1 CHANGES +Remove warnings: For options 'forceplugin', 'libdir'. =head2 Version 1.03 (dpkg 1.19.0) @@ -213,7 +171,7 @@ New option: 'compression' in changelog_parse(). Deprecated functions: changelog_parse_debian(), changelog_parse_plugin(). -Obsolete options: $forceplugin, $libdir. +Obsolete options: forceplugin, libdir. =head2 Version 1.01 (dpkg 1.18.2) diff --git a/scripts/Dpkg/Checksums.pm b/scripts/Dpkg/Checksums.pm index 1237e8b89..93bdf4bd8 100644 --- a/scripts/Dpkg/Checksums.pm +++ b/scripts/Dpkg/Checksums.pm @@ -20,7 +20,7 @@ package Dpkg::Checksums; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '1.04'; our @EXPORT = qw( checksums_is_supported checksums_get_list @@ -41,7 +41,7 @@ Dpkg::Checksums - generate and manipulate file checksums =head1 DESCRIPTION -This module provides an object that can generate and manipulate +This module provides a class that can generate and manipulate various file checksums as well as some methods to query information about supported checksums. @@ -106,10 +106,6 @@ whether the checksum algorithm is considered cryptographically strong. sub checksums_get_property($$) { my ($alg, $property) = @_; - if ($property eq 'program') { - warnings::warnif('deprecated', 'obsolete checksums program property'); - } - return unless checksums_is_supported($alg); return $CHECKSUMS->{lc($alg)}{$property}; } @@ -400,6 +396,10 @@ sub export_to_control { =head1 CHANGES +=head2 Version 1.04 (dpkg 1.20.0) + +Remove warning: For obsolete property 'program'. + =head2 Version 1.03 (dpkg 1.18.5) New property: Add new 'strong' property. diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm index 3dbc4adf0..5bbe7f427 100644 --- a/scripts/Dpkg/Compression.pm +++ b/scripts/Dpkg/Compression.pm @@ -19,9 +19,8 @@ package Dpkg::Compression; use strict; use warnings; -our $VERSION = '1.02'; +our $VERSION = '2.00'; our @EXPORT = qw( - $compression_re_file_ext compression_is_supported compression_get_list compression_get_property @@ -98,14 +97,11 @@ if ($Config{cf_by} eq 'Debian Project') { push @{$COMP->{gzip}->{comp_prog}}, '--rsyncable'; } -# XXX: Backwards compatibility, stop exporting on VERSION 2.00. -## no critic (Variables::ProhibitPackageVars) -our $default_compression = 'xz'; -our $default_compression_level = undef; +my $default_compression = 'xz'; +my $default_compression_level = undef; my $regex = join '|', map { $_->{file_ext} } values %$COMP; -our $compression_re_file_ext = qr/(?:$regex)/; -## use critic +my $compression_re_file_ext = qr/(?:$regex)/; =head1 FUNCTIONS @@ -250,6 +246,11 @@ sub compression_is_valid_level { =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Hide variables: $default_compression, $default_compression_level +and $compression_re_file_ext. + =head2 Version 1.02 (dpkg 1.17.2) New function: compression_get_file_extension_regex() diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm index 23b39841a..c0d4b0787 100644 --- a/scripts/Dpkg/Compression/FileHandle.pm +++ b/scripts/Dpkg/Compression/FileHandle.pm @@ -31,14 +31,14 @@ use Dpkg::ErrorHandling; use parent qw(IO::File Tie::Handle); # Useful reference to understand some kludges required to -# have the object behave like a filehandle +# have the class behave like a filehandle # http://blog.woobling.org/2009/10/are-filehandles-objects.html =encoding utf8 =head1 NAME -Dpkg::Compression::FileHandle - object dealing transparently with file compression +Dpkg::Compression::FileHandle - class dealing transparently with file compression =head1 SYNOPSIS @@ -76,7 +76,7 @@ Dpkg::Compression::FileHandle - object dealing transparently with file compressi =head1 DESCRIPTION -Dpkg::Compression::FileHandle is an object that can be used +Dpkg::Compression::FileHandle is a class that can be used like any filehandle and that deals transparently with compressed files. By default, the compression scheme is guessed from the filename but you can override this behaviour with the method C<set_compression>. @@ -102,8 +102,8 @@ and you can't seek on a pipe. =head1 FileHandle METHODS -The object inherits from IO::File so all methods that work on this -object should work for Dpkg::Compression::FileHandle too. There +The class inherits from IO::File so all methods that work on this +class should work for Dpkg::Compression::FileHandle too. There may be exceptions though. =head1 PUBLIC METHODS @@ -121,7 +121,7 @@ obviously incompatible with automatic detection of the compression method. =cut -# Object methods +# Class methods sub new { my ($this, %args) = @_; my $class = ref($this) || $this; @@ -378,7 +378,7 @@ sub use_compression { =item $real_fh = $fh->get_filehandle() Returns the real underlying filehandle. Useful if you want to pass it -along in a derived object. +along in a derived class. =cut @@ -444,9 +444,9 @@ sub _cleanup { =back -=head1 DERIVED OBJECTS +=head1 DERIVED CLASSES -If you want to create an object that inherits from +If you want to create a class that inherits from Dpkg::Compression::FileHandle you must be aware that the object is a reference to a GLOB that is returned by Symbol::gensym() and as such it's not a HASH. diff --git a/scripts/Dpkg/Conf.pm b/scripts/Dpkg/Conf.pm index ca98cd3a7..028a2939f 100644 --- a/scripts/Dpkg/Conf.pm +++ b/scripts/Dpkg/Conf.pm @@ -18,7 +18,7 @@ package Dpkg::Conf; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '1.04'; use Carp; @@ -85,22 +85,6 @@ sub get_options { return @{$self->{options}}; } -=item get() - -=item set() - -Obsolete functions, use get_options() instead. They will croak. - -=cut - -sub get { - croak 'obsolete function, use get_options instead'; -} - -sub set { - croak 'obsolete function, use get_options instead'; -} - =item $conf->load($file) Read options from a file. Return the number of options parsed. @@ -215,13 +199,11 @@ sub filter { my $remove = $opts{remove} // sub { 0 }; my $keep = $opts{keep} // sub { 1 }; - croak 'obsolete option format_argv' if exists $opts{format_argv}; - @{$self->{options}} = grep { not $remove->($_) and $keep->($_) } @{$self->{options}}; } -=item $string = $conf->output($fh) +=item $string = $conf->output([$fh]) Write the options in the given filehandle (if defined) and return a string representation of the content (that would be) written. @@ -230,10 +212,6 @@ representation of the content (that would be) written. Return a string representation of the content. -=item $conf->save($file) - -Save the options in a file. - =cut sub output { @@ -249,10 +227,20 @@ sub output { return $ret; } +=item $conf->save($file) + +Save the options in a file. + =back =head1 CHANGES +=head2 Version 1.04 (dpkg 1.20.0) + +Remove croak: For 'format_argv' in $conf->filter(). + +Remove methods: $conf->get(), $conf->set(). + =head2 Version 1.03 (dpkg 1.18.8) Obsolete option: 'format_argv' in $conf->filter(). diff --git a/scripts/Dpkg/Control/Changelog.pm b/scripts/Dpkg/Control/Changelog.pm index 1f65127c4..9184cedbc 100644 --- a/scripts/Dpkg/Control/Changelog.pm +++ b/scripts/Dpkg/Control/Changelog.pm @@ -32,7 +32,7 @@ Dpkg::Control::Changelog - represent info fields output by dpkg-parsechangelog =head1 DESCRIPTION -This object derives directly from Dpkg::Control with the type +This class derives directly from Dpkg::Control with the type CTRL_CHANGELOG. =head1 METHODS diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm index 4a584e413..33beeec56 100644 --- a/scripts/Dpkg/Control/Fields.pm +++ b/scripts/Dpkg/Control/Fields.pm @@ -32,11 +32,14 @@ foreach my $op (run_vendor_hook('register-custom-fields')) { next if not (defined $op and ref $op); # Skip when not implemented by vendor my $func = shift @$op; if ($func eq 'register') { - &field_register(@$op); + my ($field, $allowed_type, @opts) = @{$op}; + field_register($field, $allowed_type, @opts); } elsif ($func eq 'insert_before') { - &field_insert_before(@$op); + my ($type, $ref, @fields) = @{$op}; + field_insert_before($type, $ref, @fields); } elsif ($func eq 'insert_after') { - &field_insert_after(@$op); + my ($type, $ref, @fields) = @{$op}; + field_insert_after($type, $ref, @fields); } else { croak "vendor hook register-custom-fields sent bad data: @$op"; } diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm index b100366e1..f460433fc 100644 --- a/scripts/Dpkg/Control/FieldsCore.pm +++ b/scripts/Dpkg/Control/FieldsCore.pm @@ -176,6 +176,11 @@ our %FIELDS = ( allowed => CTRL_INFO_PKG, separator => FIELD_SEP_SPACE, }, + 'build-tainted-by' => { + name => 'Build-Tainted-By', + allowed => CTRL_FILE_BUILDINFO, + separator => FIELD_SEP_SPACE, + }, 'built-for-profiles' => { name => 'Built-For-Profiles', allowed => ALL_PKG | CTRL_FILE_CHANGES, @@ -634,7 +639,7 @@ our %FIELD_ORDER = ( qw(format source binary architecture version binary-only-changes), @src_checksums_fields, qw(build-origin build-architecture build-kernel-version build-date - build-path installed-build-depends environment), + build-path build-tainted-by installed-build-depends environment), ], CTRL_FILE_CHANGES() => [ qw(format date source binary binary-only built-for-profiles architecture diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm index e83522729..04a8a574b 100644 --- a/scripts/Dpkg/Control/HashCore.pm +++ b/scripts/Dpkg/Control/HashCore.pm @@ -43,7 +43,7 @@ Dpkg::Control::HashCore - parse and manipulate a block of RFC822-like fields =head1 DESCRIPTION -The Dpkg::Control::Hash object is a hash-like representation of a set of +The Dpkg::Control::Hash class is a hash-like representation of a set of RFC822-like fields. The fields names are case insensitive and are always capitalized the same when output (see field_capitalize function in Dpkg::Control::Fields). @@ -160,11 +160,6 @@ sub get_option { return $$self->{$k}; } -=item $c->load($file) - -Parse the content of $file. Exits in case of errors. Returns true if some -fields have been parsed. - =item $c->parse_error($file, $fmt, ...) Prints an error message and dies on syntax parse errors. @@ -284,6 +279,11 @@ sub parse { return defined($cf); } +=item $c->load($file) + +Parse the content of $file. Exits in case of errors. Returns true if some +fields have been parsed. + =item $c->find_custom_field($name) Scan the fields and look for a user specific field whose name matches the @@ -313,11 +313,6 @@ sub get_custom_field { return; } -=item $c->save($filename) - -Write the string representation of the control information to a -file. - =item $str = $c->output() =item "$c" @@ -386,6 +381,10 @@ sub output { return $str; } +=item $c->save($filename) + +Write the string representation of the control information to a file. + =item $c->set_output_order(@fields) Define the order in which fields will be displayed in the output() method. @@ -441,7 +440,7 @@ sub apply_substvars { package Dpkg::Control::HashCore::Tie; -# This object is used to tie a hash. It implements hash-like functions by +# This class is used to tie a hash. It implements hash-like functions by # normalizing the name of fields received in keys (using # Dpkg::Control::Fields::field_capitalize). It also stores the order in # which fields have been added in order to be able to dump them in the diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm index a5eae8732..5759ab5ad 100644 --- a/scripts/Dpkg/Control/Info.pm +++ b/scripts/Dpkg/Control/Info.pm @@ -38,7 +38,7 @@ Dpkg::Control::Info - parse files like debian/control =head1 DESCRIPTION -It provides an object to access data of files that follow the same +It provides a class to access data of files that follow the same syntax as F<debian/control>. =head1 METHODS @@ -90,11 +90,6 @@ sub reset { $self->{packages} = []; } -=item $c->load($file) - -Load the content of $file. Exits in case of errors. If file is "-", it -loads from the standard input. - =item $c->parse($fh, $description) Parse a control file from the given filehandle. Exits in case of errors. @@ -129,6 +124,11 @@ sub parse { } } +=item $c->load($file) + +Load the content of $file. Exits in case of errors. If file is "-", it +loads from the standard input. + =item $c->[0] =item $c->get_source() @@ -182,9 +182,10 @@ sub get_packages { return @{$self->{packages}}; } -=item $c->output($filehandle) +=item $str = $c->output([$fh]) -Dump the content into a filehandle. +Return the content info into a string. If $fh is specified print it into +the filehandle. =cut diff --git a/scripts/Dpkg/Control/Tests.pm b/scripts/Dpkg/Control/Tests.pm index 439eee8c8..3c8d1c006 100644 --- a/scripts/Dpkg/Control/Tests.pm +++ b/scripts/Dpkg/Control/Tests.pm @@ -34,7 +34,7 @@ Dpkg::Control::Tests - parse files like debian/tests/control =head1 DESCRIPTION -It provides an object to access data of files that follow the same +It provides a class to access data of files that follow the same syntax as F<debian/tests/control>. =head1 METHODS diff --git a/scripts/Dpkg/Control/Tests/Entry.pm b/scripts/Dpkg/Control/Tests/Entry.pm index 92eea49f4..001a6f429 100644 --- a/scripts/Dpkg/Control/Tests/Entry.pm +++ b/scripts/Dpkg/Control/Tests/Entry.pm @@ -34,7 +34,7 @@ Dpkg::Control::Tests::Entry - represents a test suite entry =head1 DESCRIPTION -This object represents a test suite entry. +This class represents a test suite entry. =head1 METHODS diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm index 3560e1a72..80d249019 100644 --- a/scripts/Dpkg/Deps.pm +++ b/scripts/Dpkg/Deps.pm @@ -1,3 +1,8 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery # Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> # Copyright © 2008-2009,2012-2014 Guillem Jover <guillem@debian.org> # @@ -13,14 +18,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. -######################################################################### -# Several parts are inspired by lib/Dep.pm from lintian (same license) -# -# Copyright © 1998 Richard Braakman -# Portions Copyright © 1999 Darren Benham -# Portions Copyright © 2000 Sean 'Shaleh' Perry -# Portions Copyright © 2004 Frank Lichtenheld -# Portions Copyright © 2006 Russ Allbery package Dpkg::Deps; @@ -32,7 +29,7 @@ Dpkg::Deps - parse and manipulate dependencies of Debian packages =head1 DESCRIPTION -The Dpkg::Deps module provides objects implementing various types of +The Dpkg::Deps module provides classes implementing various types of dependencies. The most important function is deps_parse(), it turns a dependency line in @@ -49,7 +46,7 @@ All the deps_* functions are exported by default. use strict; use warnings; -our $VERSION = '1.06'; +our $VERSION = '1.07'; our @EXPORT = qw( deps_concat deps_parse @@ -66,6 +63,11 @@ use Dpkg::Arch qw(get_host_arch get_build_arch debarch_to_debtuple); use Dpkg::BuildProfiles qw(get_build_profiles); use Dpkg::ErrorHandling; use Dpkg::Gettext; +use Dpkg::Deps::Simple; +use Dpkg::Deps::Union; +use Dpkg::Deps::AND; +use Dpkg::Deps::OR; +use Dpkg::Deps::KnownFacts; =item deps_eval_implication($rel_p, $v_p, $rel_q, $v_q) @@ -233,6 +235,12 @@ them if set. If set to 1, returns a Dpkg::Deps::Union instead of a Dpkg::Deps::AND. Use this when parsing non-dependency fields like Conflicts. +=item virtual (defaults to 0) + +If set to 1, allow only virtual package version relations, that is none, +or “=”. +This should be set whenever working with Provides fields. + =item build_dep (defaults to 0) If set to 1, allow build-dep only arch qualifiers, that is “:native”. @@ -263,6 +271,7 @@ sub deps_parse { $options{reduce_profiles} //= 0; $options{reduce_restrictions} //= 0; $options{union} //= 0; + $options{virtual} //= 0; $options{build_dep} //= 0; $options{tests_dep} //= 0; @@ -299,6 +308,12 @@ sub deps_parse { warning(g_("can't parse dependency %s"), $dep_or); return; } + if ($options{virtual} && defined $dep_simple->{relation} && + $dep_simple->{relation} ne '=') { + warning(g_('virtual dependency contains invalid relation: %s'), + $dep_simple->output); + return; + } $dep_simple->{arches} = undef if not $options{use_arch}; if ($options{reduce_arch}) { $dep_simple->reduce_arch($options{host_arch}); @@ -414,15 +429,12 @@ sub deps_compare { } } - -package Dpkg::Deps::Simple; - -=head1 OBJECTS - Dpkg::Deps::* +=head1 CLASSES - Dpkg::Deps::* There are several kind of dependencies. A Dpkg::Deps::Simple dependency represents a single dependency statement (it relates to one package only). -Dpkg::Deps::Multiple dependencies are built on top of this object -and combine several dependencies in a different manners. Dpkg::Deps::AND +Dpkg::Deps::Multiple dependencies are built on top of this class +and combine several dependencies in different manners. Dpkg::Deps::AND represents the logical "AND" between dependencies while Dpkg::Deps::OR represents the logical "OR". Dpkg::Deps::Multiple objects can contain Dpkg::Deps::Simple object as well as other Dpkg::Deps::Multiple objects. @@ -431,1101 +443,16 @@ In practice, the code is only meant to handle the realistic cases which, given Debian's dependencies structure, imply those restrictions: AND can contain Simple or OR objects, OR can only contain Simple objects. -Dpkg::Deps::KnownFacts is a special object that is used while evaluating +Dpkg::Deps::KnownFacts is a special class that is used while evaluating dependencies and while trying to simplify them. It represents a set of installed packages along with the virtual packages that they might provide. -=head2 COMMON METHODS - -=over 4 - -=item $dep->is_empty() - -Returns true if the dependency is empty and doesn't contain any useful -information. This is true when a Dpkg::Deps::Simple object has not yet -been initialized or when a (descendant of) Dpkg::Deps::Multiple contains -an empty list of dependencies. - -=item $dep->get_deps() - -Returns a list of sub-dependencies. For Dpkg::Deps::Simple it returns -itself. - -=item $dep->output([$fh]) - -=item "$dep" - -Returns a string representing the dependency. If $fh is set, it prints -the string to the filehandle. - -=item $dep->implies($other_dep) - -Returns 1 when $dep implies $other_dep. Returns 0 when $dep implies -NOT($other_dep). Returns undef when there's no implication. $dep and -$other_dep do not need to be of the same type. - -=item $dep->sort() - -Sorts alphabetically the internal list of dependencies. It's a no-op for -Dpkg::Deps::Simple objects. - -=item $dep->arch_is_concerned($arch) - -Returns true if the dependency applies to the indicated architecture. For -multiple dependencies, it returns true if at least one of the -sub-dependencies apply to this architecture. - -=item $dep->reduce_arch($arch) - -Simplifies the dependency to contain only information relevant to the given -architecture. A Dpkg::Deps::Simple object can be left empty after this -operation. For Dpkg::Deps::Multiple objects, the non-relevant -sub-dependencies are simply removed. - -This trims off the architecture restriction list of Dpkg::Deps::Simple -objects. - -=item $dep->get_evaluation($facts) - -Evaluates the dependency given a list of installed packages and a list of -virtual packages provided. Those lists are part of the -Dpkg::Deps::KnownFacts object given as parameters. - -Returns 1 when it's true, 0 when it's false, undef when some information -is lacking to conclude. - -=item $dep->simplify_deps($facts, @assumed_deps) - -Simplifies the dependency as much as possible given the list of facts (see -object Dpkg::Deps::KnownFacts) and a list of other dependencies that are -known to be true. - -=item $dep->has_arch_restriction() - -For a simple dependency, returns the package name if the dependency -applies only to a subset of architectures. For multiple dependencies, it -returns the list of package names that have such a restriction. - -=item $dep->reset() - -Clears any dependency information stored in $dep so that $dep->is_empty() -returns true. - -=back - -=head2 Dpkg::Deps::Simple - -Such an object has four interesting properties: - -=over 4 - -=item package - -The package name (can be undef if the dependency has not been initialized -or if the simplification of the dependency lead to its removal). - -=item relation - -The relational operator: "=", "<<", "<=", ">=" or ">>". It can be -undefined if the dependency had no version restriction. In that case the -following field is also undefined. - -=item version - -The version. - -=item arches - -The list of architectures where this dependency is applicable. It's -undefined when there's no restriction, otherwise it's an -array ref. It can contain an exclusion list, in that case each -architecture is prefixed with an exclamation mark. - -=item archqual - -The arch qualifier of the dependency (can be undef if there's none). -In the dependency "python:any (>= 2.6)", the arch qualifier is "any". - -=back - -=head3 METHODS - -=over 4 - -=item $simple_dep->parse_string('dpkg-dev (>= 1.14.8) [!hurd-i386]') - -Parses the dependency and modifies internal properties to match the parsed -dependency. - -=item $simple_dep->merge_union($other_dep) - -Returns true if $simple_dep could be modified to represent the union of -both dependencies. Otherwise returns false. - -=back - -=cut - -use strict; -use warnings; - -use Carp; - -use Dpkg::Arch qw(debarch_is_concerned debarch_list_parse); -use Dpkg::BuildProfiles qw(parse_build_profiles evaluate_restriction_formula); -use Dpkg::Version; -use Dpkg::ErrorHandling; -use Dpkg::Gettext; - -use parent qw(Dpkg::Interface::Storable); - -sub new { - my ($this, $arg, %opts) = @_; - my $class = ref($this) || $this; - my $self = {}; - bless $self, $class; - $self->reset(); - $self->{host_arch} = $opts{host_arch}; - $self->{build_arch} = $opts{build_arch}; - $self->{build_dep} = $opts{build_dep} // 0; - $self->{tests_dep} = $opts{tests_dep} // 0; - $self->parse_string($arg) if defined($arg); - return $self; -} - -sub reset { - my $self = shift; - $self->{package} = undef; - $self->{relation} = undef; - $self->{version} = undef; - $self->{arches} = undef; - $self->{archqual} = undef; - $self->{restrictions} = undef; -} - -sub parse { - my ($self, $fh, $desc) = @_; - my $line = <$fh>; - chomp($line); - return $self->parse_string($line); -} - -sub parse_string { - my ($self, $dep) = @_; - - my $pkgname_re; - if ($self->{tests_dep}) { - $pkgname_re = qr/[\@a-zA-Z0-9][\@a-zA-Z0-9+.-]*/; - } else { - $pkgname_re = qr/[a-zA-Z0-9][a-zA-Z0-9+.-]*/; - } - - return if not $dep =~ - m{^\s* # skip leading whitespace - ($pkgname_re) # package name - (?: # start of optional part - : # colon for architecture - ([a-zA-Z0-9][a-zA-Z0-9-]*) # architecture name - )? # end of optional part - (?: # start of optional part - \s* \( # open parenthesis for version part - \s* (<<|<=|=|>=|>>|[<>]) # relation part - \s* ([^\)\s]+) # do not attempt to parse version - \s* \) # closing parenthesis - )? # end of optional part - (?: # start of optional architecture - \s* \[ # open bracket for architecture - \s* ([^\]]+) # don't parse architectures now - \s* \] # closing bracket - )? # end of optional architecture - ( - (?: # start of optional restriction - \s* < # open bracket for restriction - \s* [^>]+ # do not parse restrictions now - \s* > # closing bracket - )+ - )? # end of optional restriction - \s*$ # trailing spaces at end - }x; - if (defined($2)) { - return if $2 eq 'native' and not $self->{build_dep}; - $self->{archqual} = $2; - } - $self->{package} = $1; - $self->{relation} = version_normalize_relation($3) if defined($3); - if (defined($4)) { - $self->{version} = Dpkg::Version->new($4); - } - if (defined($5)) { - $self->{arches} = [ debarch_list_parse($5) ]; - } - if (defined($6)) { - $self->{restrictions} = [ parse_build_profiles($6) ]; - } -} - -sub output { - my ($self, $fh) = @_; - my $res = $self->{package}; - if (defined($self->{archqual})) { - $res .= ':' . $self->{archqual}; - } - if (defined($self->{relation})) { - $res .= ' (' . $self->{relation} . ' ' . $self->{version} . ')'; - } - if (defined($self->{arches})) { - $res .= ' [' . join(' ', @{$self->{arches}}) . ']'; - } - if (defined($self->{restrictions})) { - for my $restrlist (@{$self->{restrictions}}) { - $res .= ' <' . join(' ', @{$restrlist}) . '>'; - } - } - if (defined($fh)) { - print { $fh } $res; - } - return $res; -} - -# _arch_is_superset(\@p, \@q) -# -# Returns true if the arch list @p is a superset of arch list @q. -# The arguments can also be undef in case there's no explicit architecture -# restriction. -sub _arch_is_superset { - my ($p, $q) = @_; - my $p_arch_neg = defined($p) && $p->[0] =~ /^!/; - my $q_arch_neg = defined($q) && $q->[0] =~ /^!/; - - # If "p" has no arches, it is a superset of q and we should fall through - # to the version check. - if (not defined $p) { - return 1; - } - - # If q has no arches, it is a superset of p and there are no useful - # implications. - elsif (not defined $q) { - return 0; - } - - # Both have arches. If neither are negated, we know nothing useful - # unless q is a subset of p. - elsif (not $p_arch_neg and not $q_arch_neg) { - my %p_arches = map { $_ => 1 } @{$p}; - my $subset = 1; - for my $arch (@{$q}) { - $subset = 0 unless $p_arches{$arch}; - } - return 0 unless $subset; - } - - # If both are negated, we know nothing useful unless p is a subset of - # q (and therefore has fewer things excluded, and therefore is more - # general). - elsif ($p_arch_neg and $q_arch_neg) { - my %q_arches = map { $_ => 1 } @{$q}; - my $subset = 1; - for my $arch (@{$p}) { - $subset = 0 unless $q_arches{$arch}; - } - return 0 unless $subset; - } - - # If q is negated and p isn't, we'd need to know the full list of - # arches to know if there's any relationship, so bail. - elsif (not $p_arch_neg and $q_arch_neg) { - return 0; - } - - # If p is negated and q isn't, q is a subset of p if none of the - # negated arches in p are present in q. - elsif ($p_arch_neg and not $q_arch_neg) { - my %q_arches = map { $_ => 1 } @{$q}; - my $subset = 1; - for my $arch (@{$p}) { - $subset = 0 if $q_arches{substr($arch, 1)}; - } - return 0 unless $subset; - } - return 1; -} - -# _arch_qualifier_implies($p, $q) -# -# Returns true if the arch qualifier $p and $q are compatible with the -# implication $p -> $q, false otherwise. $p/$q can be undef/"any"/"native" -# or an architecture string. -# -# Because we are handling dependencies in isolation, and the full context -# of the implications are only known when doing dependency resolution at -# run-time, we can only assert that they are implied if they are equal. -sub _arch_qualifier_implies { - my ($p, $q) = @_; - - return $p eq $q if defined $p and defined $q; - return 1 if not defined $p and not defined $q; - return 0; -} - -# _restrictions_imply($p, $q) -# -# Returns true if the restrictions $p and $q are compatible with the -# implication $p -> $q, false otherwise. -# NOTE: We don't try to be very clever here, so we may conservatively -# return false when there is an implication. -sub _restrictions_imply { - my ($p, $q) = @_; - - if (not defined $p) { - return 1; - } elsif (not defined $q) { - return 0; - } else { - # Check whether set difference is empty. - my %restr; - - for my $restrlist (@{$q}) { - my $reststr = join ' ', sort @{$restrlist}; - $restr{$reststr} = 1; - } - for my $restrlist (@{$p}) { - my $reststr = join ' ', sort @{$restrlist}; - delete $restr{$reststr}; - } - - return keys %restr == 0; - } -} - -# Returns true if the dependency in parameter can deduced from the current -# dependency. Returns false if it can be negated. Returns undef if nothing -# can be concluded. -sub implies { - my ($self, $o) = @_; - if ($o->isa('Dpkg::Deps::Simple')) { - # An implication is only possible on the same package - return if $self->{package} ne $o->{package}; - - # Our architecture set must be a superset of the architectures for - # o, otherwise we can't conclude anything. - return unless _arch_is_superset($self->{arches}, $o->{arches}); - - # The arch qualifier must not forbid an implication - return unless _arch_qualifier_implies($self->{archqual}, - $o->{archqual}); - - # Our restrictions must imply the restrictions for o - return unless _restrictions_imply($self->{restrictions}, - $o->{restrictions}); - - # If o has no version clause, then our dependency is stronger - return 1 if not defined $o->{relation}; - # If o has a version clause, we must also have one, otherwise there - # can't be an implication - return if not defined $self->{relation}; - - return Dpkg::Deps::deps_eval_implication($self->{relation}, - $self->{version}, $o->{relation}, $o->{version}); - - } elsif ($o->isa('Dpkg::Deps::AND')) { - # TRUE: Need to imply all individual elements - # FALSE: Need to NOT imply at least one individual element - my $res = 1; - foreach my $dep ($o->get_deps()) { - my $implication = $self->implies($dep); - unless (defined($implication) && $implication == 1) { - $res = $implication; - last if defined $res; - } - } - return $res; - } elsif ($o->isa('Dpkg::Deps::OR')) { - # TRUE: Need to imply at least one individual element - # FALSE: Need to not apply all individual elements - # UNDEF: The rest - my $res = undef; - foreach my $dep ($o->get_deps()) { - my $implication = $self->implies($dep); - if (defined($implication)) { - if (not defined $res) { - $res = $implication; - } else { - if ($implication) { - $res = 1; - } else { - $res = 0; - } - } - last if defined($res) && $res == 1; - } - } - return $res; - } else { - croak 'Dpkg::Deps::Simple cannot evaluate implication with a ' . - ref($o); - } -} - -sub get_deps { - my $self = shift; - return $self; -} - -sub sort { - # Nothing to sort -} - -sub arch_is_concerned { - my ($self, $host_arch) = @_; - - return 0 if not defined $self->{package}; # Empty dep - return 1 if not defined $self->{arches}; # Dep without arch spec - - return debarch_is_concerned($host_arch, @{$self->{arches}}); -} - -sub reduce_arch { - my ($self, $host_arch) = @_; - if (not $self->arch_is_concerned($host_arch)) { - $self->reset(); - } else { - $self->{arches} = undef; - } -} - -sub has_arch_restriction { - my $self = shift; - if (defined $self->{arches}) { - return $self->{package}; - } else { - return (); - } -} - -sub profile_is_concerned { - my ($self, $build_profiles) = @_; - - return 0 if not defined $self->{package}; # Empty dep - return 1 if not defined $self->{restrictions}; # Dep without restrictions - return evaluate_restriction_formula($self->{restrictions}, $build_profiles); -} - -sub reduce_profiles { - my ($self, $build_profiles) = @_; - - if (not $self->profile_is_concerned($build_profiles)) { - $self->reset(); - } else { - $self->{restrictions} = undef; - } -} - -sub get_evaluation { - my ($self, $facts) = @_; - return if not defined $self->{package}; - return $facts->_evaluate_simple_dep($self); -} - -sub simplify_deps { - my ($self, $facts) = @_; - my $eval = $self->get_evaluation($facts); - $self->reset() if defined $eval and $eval == 1; -} - -sub is_empty { - my $self = shift; - return not defined $self->{package}; -} - -sub merge_union { - my ($self, $o) = @_; - return 0 if not $o->isa('Dpkg::Deps::Simple'); - return 0 if $self->is_empty() or $o->is_empty(); - return 0 if $self->{package} ne $o->{package}; - return 0 if defined $self->{arches} or defined $o->{arches}; - - if (not defined $o->{relation} and defined $self->{relation}) { - # Union is the non-versioned dependency - $self->{relation} = undef; - $self->{version} = undef; - return 1; - } - - my $implication = $self->implies($o); - my $rev_implication = $o->implies($self); - if (defined($implication)) { - if ($implication) { - $self->{relation} = $o->{relation}; - $self->{version} = $o->{version}; - return 1; - } else { - return 0; - } - } - if (defined($rev_implication)) { - if ($rev_implication) { - # Already merged... - return 1; - } else { - return 0; - } - } - return 0; -} - -package Dpkg::Deps::Multiple; - -=head2 Dpkg::Deps::Multiple - -This is the base class for Dpkg::Deps::{AND,OR,Union}. It implements -the following methods: - -=over 4 - -=item $mul->add($dep) - -Adds a new dependency object at the end of the list. - -=back - -=cut - -use strict; -use warnings; - -use Carp; - -use Dpkg::ErrorHandling; - -use parent qw(Dpkg::Interface::Storable); - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = { list => [ @_ ] }; - bless $self, $class; - return $self; -} - -sub reset { - my $self = shift; - $self->{list} = []; -} - -sub add { - my $self = shift; - push @{$self->{list}}, @_; -} - -sub get_deps { - my $self = shift; - return grep { not $_->is_empty() } @{$self->{list}}; -} - -sub sort { - my $self = shift; - my @res = (); - @res = sort { Dpkg::Deps::deps_compare($a, $b) } @{$self->{list}}; - $self->{list} = [ @res ]; -} - -sub arch_is_concerned { - my ($self, $host_arch) = @_; - my $res = 0; - foreach my $dep (@{$self->{list}}) { - $res = 1 if $dep->arch_is_concerned($host_arch); - } - return $res; -} - -sub reduce_arch { - my ($self, $host_arch) = @_; - my @new; - foreach my $dep (@{$self->{list}}) { - $dep->reduce_arch($host_arch); - push @new, $dep if $dep->arch_is_concerned($host_arch); - } - $self->{list} = [ @new ]; -} - -sub has_arch_restriction { - my $self = shift; - my @res; - foreach my $dep (@{$self->{list}}) { - push @res, $dep->has_arch_restriction(); - } - return @res; -} - -sub profile_is_concerned { - my ($self, $build_profiles) = @_; - my $res = 0; - - foreach my $dep (@{$self->{list}}) { - $res = 1 if $dep->profile_is_concerned($build_profiles); - } - return $res; -} - -sub reduce_profiles { - my ($self, $build_profiles) = @_; - my @new; - - foreach my $dep (@{$self->{list}}) { - $dep->reduce_profiles($build_profiles); - push @new, $dep if $dep->profile_is_concerned($build_profiles); - } - $self->{list} = [ @new ]; -} - -sub is_empty { - my $self = shift; - return scalar @{$self->{list}} == 0; -} - -sub merge_union { - croak 'method merge_union() is only valid for Dpkg::Deps::Simple'; -} - -package Dpkg::Deps::AND; - -=head2 Dpkg::Deps::AND - -This object represents a list of dependencies who must be met at the same -time. - -=over 4 - -=item $and->output([$fh]) - -The output method uses ", " to join the list of sub-dependencies. - -=back - -=cut - -use strict; -use warnings; - -use parent -norequire, qw(Dpkg::Deps::Multiple); - -sub output { - my ($self, $fh) = @_; - my $res = join(', ', map { $_->output() } grep { not $_->is_empty() } $self->get_deps()); - if (defined($fh)) { - print { $fh } $res; - } - return $res; -} - -sub implies { - my ($self, $o) = @_; - # If any individual member can imply $o or NOT $o, we're fine - foreach my $dep ($self->get_deps()) { - my $implication = $dep->implies($o); - return 1 if defined($implication) && $implication == 1; - return 0 if defined($implication) && $implication == 0; - } - # If o is an AND, we might have an implication, if we find an - # implication within us for each predicate in o - if ($o->isa('Dpkg::Deps::AND')) { - my $subset = 1; - foreach my $odep ($o->get_deps()) { - my $found = 0; - foreach my $dep ($self->get_deps()) { - $found = 1 if $dep->implies($odep); - } - $subset = 0 if not $found; - } - return 1 if $subset; - } - return; -} - -sub get_evaluation { - my ($self, $facts) = @_; - # Return 1 only if all members evaluates to true - # Return 0 if at least one member evaluates to false - # Return undef otherwise - my $result = 1; - foreach my $dep ($self->get_deps()) { - my $eval = $dep->get_evaluation($facts); - if (not defined $eval) { - $result = undef; - } elsif ($eval == 0) { - $result = 0; - last; - } elsif ($eval == 1) { - # Still possible - } - } - return $result; -} - -sub simplify_deps { - my ($self, $facts, @knowndeps) = @_; - my @new; - -WHILELOOP: - while (@{$self->{list}}) { - my $dep = shift @{$self->{list}}; - my $eval = $dep->get_evaluation($facts); - next if defined($eval) and $eval == 1; - foreach my $odep (@knowndeps, @new) { - next WHILELOOP if $odep->implies($dep); - } - # When a dependency is implied by another dependency that - # follows, then invert them - # "a | b, c, a" becomes "a, c" and not "c, a" - my $i = 0; - foreach my $odep (@{$self->{list}}) { - if (defined $odep and $odep->implies($dep)) { - splice @{$self->{list}}, $i, 1; - unshift @{$self->{list}}, $odep; - next WHILELOOP; - } - $i++; - } - push @new, $dep; - } - $self->{list} = [ @new ]; -} - - -package Dpkg::Deps::OR; - -=head2 Dpkg::Deps::OR - -This object represents a list of dependencies of which only one must be met -for the dependency to be true. - -=over 4 - -=item $or->output([$fh]) - -The output method uses " | " to join the list of sub-dependencies. - -=back - -=cut - -use strict; -use warnings; - -use parent -norequire, qw(Dpkg::Deps::Multiple); - -sub output { - my ($self, $fh) = @_; - my $res = join(' | ', map { $_->output() } grep { not $_->is_empty() } $self->get_deps()); - if (defined($fh)) { - print { $fh } $res; - } - return $res; -} - -sub implies { - my ($self, $o) = @_; - - # Special case for AND with a single member, replace it by its member - if ($o->isa('Dpkg::Deps::AND')) { - my @subdeps = $o->get_deps(); - if (scalar(@subdeps) == 1) { - $o = $subdeps[0]; - } - } - - # In general, an OR dependency can't imply anything except if each - # of its member implies a member in the other OR dependency - if ($o->isa('Dpkg::Deps::OR')) { - my $subset = 1; - foreach my $dep ($self->get_deps()) { - my $found = 0; - foreach my $odep ($o->get_deps()) { - $found = 1 if $dep->implies($odep); - } - $subset = 0 if not $found; - } - return 1 if $subset; - } - return; -} - -sub get_evaluation { - my ($self, $facts) = @_; - # Returns false if all members evaluates to 0 - # Returns true if at least one member evaluates to true - # Returns undef otherwise - my $result = 0; - foreach my $dep ($self->get_deps()) { - my $eval = $dep->get_evaluation($facts); - if (not defined $eval) { - $result = undef; - } elsif ($eval == 1) { - $result = 1; - last; - } elsif ($eval == 0) { - # Still possible to have a false evaluation - } - } - return $result; -} - -sub simplify_deps { - my ($self, $facts) = @_; - my @new; - -WHILELOOP: - while (@{$self->{list}}) { - my $dep = shift @{$self->{list}}; - my $eval = $dep->get_evaluation($facts); - if (defined($eval) and $eval == 1) { - $self->{list} = []; - return; - } - foreach my $odep (@new, @{$self->{list}}) { - next WHILELOOP if $odep->implies($dep); - } - push @new, $dep; - } - $self->{list} = [ @new ]; -} - -package Dpkg::Deps::Union; - -=head2 Dpkg::Deps::Union - -This object represents a list of relationships. - -=over 4 - -=item $union->output([$fh]) - -The output method uses ", " to join the list of relationships. - -=item $union->implies($other_dep) - -=item $union->get_evaluation($other_dep) - -Those methods are not meaningful for this object and always return undef. - -=item $union->simplify_deps($facts) - -The simplification is done to generate an union of all the relationships. -It uses $simple_dep->merge_union($other_dep) to get its job done. - -=back - -=cut - -use strict; -use warnings; - -use parent -norequire, qw(Dpkg::Deps::Multiple); - -sub output { - my ($self, $fh) = @_; - my $res = join(', ', map { $_->output() } grep { not $_->is_empty() } $self->get_deps()); - if (defined($fh)) { - print { $fh } $res; - } - return $res; -} - -sub implies { - # Implication test are not useful on Union - return; -} - -sub get_evaluation { - # Evaluation are not useful on Union - return; -} - -sub simplify_deps { - my ($self, $facts) = @_; - my @new; - -WHILELOOP: - while (@{$self->{list}}) { - my $odep = shift @{$self->{list}}; - foreach my $dep (@new) { - next WHILELOOP if $dep->merge_union($odep); - } - push @new, $odep; - } - $self->{list} = [ @new ]; -} - -package Dpkg::Deps::KnownFacts; - -=head2 Dpkg::Deps::KnownFacts - -This object represents a list of installed packages and a list of virtual -packages provided (by the set of installed packages). - -=over 4 - -=item $facts = Dpkg::Deps::KnownFacts->new(); - -Creates a new object. - -=cut - -use strict; -use warnings; - -use Dpkg::Version; - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = { - pkg => {}, - virtualpkg => {}, - }; - bless $self, $class; - return $self; -} - -=item $facts->add_installed_package($package, $version, $arch, $multiarch) - -Records that the given version of the package is installed. If -$version/$arch is undefined we know that the package is installed but we -don't know which version/architecture it is. $multiarch is the Multi-Arch -field of the package. If $multiarch is undef, it will be equivalent to -"Multi-Arch: no". - -Note that $multiarch is only used if $arch is provided. - -=cut - -sub add_installed_package { - my ($self, $pkg, $ver, $arch, $multiarch) = @_; - my $p = { - package => $pkg, - version => $ver, - architecture => $arch, - multiarch => $multiarch // 'no', - }; - $self->{pkg}{"$pkg:$arch"} = $p if defined $arch; - push @{$self->{pkg}{$pkg}}, $p; -} - -=item $facts->add_provided_package($virtual, $relation, $version, $by) - -Records that the "$by" package provides the $virtual package. $relation -and $version correspond to the associated relation given in the Provides -field (if present). - -=cut - -sub add_provided_package { - my ($self, $pkg, $rel, $ver, $by) = @_; - - $self->{virtualpkg}{$pkg} //= []; - push @{$self->{virtualpkg}{$pkg}}, [ $by, $rel, $ver ]; -} - -=item ($check, $param) = $facts->check_package($package) - -$check is one when the package is found. For a real package, $param -contains the version. For a virtual package, $param contains an array -reference containing the list of packages that provide it (each package is -listed as [ $provider, $relation, $version ]). - -This function is obsolete and should not be used. Dpkg::Deps::KnownFacts -is only meant to be filled with data and then passed to Dpkg::Deps -methods where appropriate, but it should not be directly queried. - -=back - -=cut - -sub check_package { - my ($self, $pkg) = @_; - - warnings::warnif('deprecated', 'obsolete function, pass ' . - 'Dpkg::Deps::KnownFacts to Dpkg::Deps methods instead'); - - if (exists $self->{pkg}{$pkg}) { - return (1, $self->{pkg}{$pkg}[0]{version}); - } - if (exists $self->{virtualpkg}{$pkg}) { - return (1, $self->{virtualpkg}{$pkg}); - } - return (0, undef); -} - -## The functions below are private to Dpkg::Deps - -sub _find_package { - my ($self, $dep, $lackinfos) = @_; - my ($pkg, $archqual) = ($dep->{package}, $dep->{archqual}); - return if not exists $self->{pkg}{$pkg}; - my $host_arch = $dep->{host_arch} // Dpkg::Arch::get_host_arch(); - my $build_arch = $dep->{build_arch} // Dpkg::Arch::get_build_arch(); - foreach my $p (@{$self->{pkg}{$pkg}}) { - my $a = $p->{architecture}; - my $ma = $p->{multiarch}; - if (not defined $a) { - $$lackinfos = 1; - next; - } - if (not defined $archqual) { - return $p if $ma eq 'foreign'; - return $p if $a eq $host_arch or $a eq 'all'; - } elsif ($archqual eq 'any') { - return $p if $ma eq 'allowed'; - } elsif ($archqual eq 'native') { - return $p if $a eq $build_arch and $ma ne 'foreign'; - } else { - return $p if $a eq $archqual; - } - } - return; -} - -sub _find_virtual_packages { - my ($self, $pkg) = @_; - return () if not exists $self->{virtualpkg}{$pkg}; - return @{$self->{virtualpkg}{$pkg}}; -} +=head1 CHANGES -sub _evaluate_simple_dep { - my ($self, $dep) = @_; - my ($lackinfos, $pkg) = (0, $dep->{package}); - my $p = $self->_find_package($dep, \$lackinfos); - if ($p) { - if (defined $dep->{relation}) { - if (defined $p->{version}) { - return 1 if version_compare_relation($p->{version}, - $dep->{relation}, $dep->{version}); - } else { - $lackinfos = 1; - } - } else { - return 1; - } - } - foreach my $virtpkg ($self->_find_virtual_packages($pkg)) { - next if defined $virtpkg->[1] and $virtpkg->[1] ne REL_EQ; - - if (defined $dep->{relation}) { - next if not defined $virtpkg->[2]; - return 1 if version_compare_relation($virtpkg->[2], - $dep->{relation}, - $dep->{version}); - } else { - return 1; - } - } - return if $lackinfos; - return 0; -} +=head2 Version 1.07 (dpkg 1.20.0) -=head1 CHANGES +New option: Add virtual option to Dpkg::Deps::deps_parse(). =head2 Version 1.06 (dpkg 1.18.7; module version bumped on dpkg 1.18.24) @@ -1540,9 +467,6 @@ New function: Dpkg::Deps::deps_iterate(). New options: Add use_profiles, build_profiles, reduce_profiles and reduce_restrictions to Dpkg::Deps::deps_parse(). -New methods: Add $dep->profile_is_concerned() and $dep->reduce_profiles() -for all dependency objects. - =head2 Version 1.03 (dpkg 1.17.0) New option: Add build_arch option to Dpkg::Deps::deps_parse(). @@ -1553,16 +477,7 @@ New function: Dpkg::Deps::deps_concat() =head2 Version 1.01 (dpkg 1.16.1) -New method: Add $dep->reset() for all dependency objects. - -New property: Dpkg::Deps::Simple now recognizes the arch qualifier "any" -and stores it in the "archqual" property when present. - -New option: Dpkg::Deps::KnownFacts->add_installed_package() now accepts 2 -supplementary parameters ($arch and $multiarch). - -Deprecated method: Dpkg::Deps::KnownFacts->check_package() is obsolete, -it should not have been part of the public API. +<Used to document changes to Dpkg::Deps::* modules before they were split.> =head2 Version 1.00 (dpkg 1.15.6) diff --git a/scripts/Dpkg/Deps/AND.pm b/scripts/Dpkg/Deps/AND.pm new file mode 100644 index 000000000..7b403c237 --- /dev/null +++ b/scripts/Dpkg/Deps/AND.pm @@ -0,0 +1,182 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery +# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org> +# +# This program is free software; you may 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 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Deps::AND; + +=encoding utf8 + +=head1 NAME + +Dpkg::Deps::AND - list of AND dependencies + +=head1 DESCRIPTION + +This class represents a list of dependencies that must be met at the same +time. It inherits from Dpkg::Deps::Multiple. + +=cut + +use strict; +use warnings; + +our $VERSION = '1.00'; + +use parent qw(Dpkg::Deps::Multiple); + +=head1 METHODS + +=over 4 + +=item $dep->output([$fh]) + +The output method uses ", " to join the list of sub-dependencies. + +=cut + +sub output { + my ($self, $fh) = @_; + + my $res = join(', ', map { + $_->output() + } grep { + not $_->is_empty() + } $self->get_deps()); + + if (defined $fh) { + print { $fh } $res; + } + return $res; +} + +=item $dep->implies($other_dep) + +Returns 1 when $dep implies $other_dep. Returns 0 when $dep implies +NOT($other_dep). Returns undef when there's no implication. $dep and +$other_dep do not need to be of the same type. + +=cut + +sub implies { + my ($self, $o) = @_; + + # If any individual member can imply $o or NOT $o, we're fine + foreach my $dep ($self->get_deps()) { + my $implication = $dep->implies($o); + return 1 if defined $implication and $implication == 1; + return 0 if defined $implication and $implication == 0; + } + + # If o is an AND, we might have an implication, if we find an + # implication within us for each predicate in o + if ($o->isa('Dpkg::Deps::AND')) { + my $subset = 1; + foreach my $odep ($o->get_deps()) { + my $found = 0; + foreach my $dep ($self->get_deps()) { + $found = 1 if $dep->implies($odep); + } + $subset = 0 if not $found; + } + return 1 if $subset; + } + return; +} + +=item $dep->get_evaluation($facts) + +Evaluates the dependency given a list of installed packages and a list of +virtual packages provided. These lists are part of the Dpkg::Deps::KnownFacts +object given as parameters. + +Returns 1 when it's true, 0 when it's false, undef when some information +is lacking to conclude. + +=cut + +sub get_evaluation { + my ($self, $facts) = @_; + + # Return 1 only if all members evaluates to true + # Return 0 if at least one member evaluates to false + # Return undef otherwise + my $result = 1; + foreach my $dep ($self->get_deps()) { + my $eval = $dep->get_evaluation($facts); + if (not defined $eval) { + $result = undef; + } elsif ($eval == 0) { + $result = 0; + last; + } elsif ($eval == 1) { + # Still possible + } + } + return $result; +} + +=item $dep->simplify_deps($facts, @assumed_deps) + +Simplifies the dependency as much as possible given the list of facts (see +object Dpkg::Deps::KnownFacts) and a list of other dependencies that are +known to be true. + +=cut + +sub simplify_deps { + my ($self, $facts, @knowndeps) = @_; + my @new; + +WHILELOOP: + while (@{$self->{list}}) { + my $dep = shift @{$self->{list}}; + my $eval = $dep->get_evaluation($facts); + next if defined $eval and $eval == 1; + foreach my $odep (@knowndeps, @new) { + next WHILELOOP if $odep->implies($dep); + } + # When a dependency is implied by another dependency that + # follows, then invert them + # "a | b, c, a" becomes "a, c" and not "c, a" + my $i = 0; + foreach my $odep (@{$self->{list}}) { + if (defined $odep and $odep->implies($dep)) { + splice @{$self->{list}}, $i, 1; + unshift @{$self->{list}}, $odep; + next WHILELOOP; + } + $i++; + } + push @new, $dep; + } + $self->{list} = [ @new ]; +} + +=back + +=head1 CHANGES + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Deps/KnownFacts.pm b/scripts/Dpkg/Deps/KnownFacts.pm new file mode 100644 index 000000000..ef8655fdd --- /dev/null +++ b/scripts/Dpkg/Deps/KnownFacts.pm @@ -0,0 +1,218 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery +# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org> +# +# This program is free software; you may 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 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Deps::KnownFacts; + +=encoding utf8 + +=head1 NAME + +Dpkg::Deps::KnownFacts - list of installed real and virtual packages + +=head1 DESCRIPTION + +This class represents a list of installed packages and a list of virtual +packages provided (by the set of installed packages). + +=cut + +use strict; +use warnings; + +our $VERSION = '2.00'; + +use Dpkg::Version; + +=head1 METHODS + +=over 4 + +=item $facts = Dpkg::Deps::KnownFacts->new(); + +Creates a new object. + +=cut + +sub new { + my $this = shift; + my $class = ref($this) || $this; + my $self = { + pkg => {}, + virtualpkg => {}, + }; + + bless $self, $class; + return $self; +} + +=item $facts->add_installed_package($package, $version, $arch, $multiarch) + +Records that the given version of the package is installed. If +$version/$arch is undefined we know that the package is installed but we +don't know which version/architecture it is. $multiarch is the Multi-Arch +field of the package. If $multiarch is undef, it will be equivalent to +"Multi-Arch: no". + +Note that $multiarch is only used if $arch is provided. + +=cut + +sub add_installed_package { + my ($self, $pkg, $ver, $arch, $multiarch) = @_; + my $p = { + package => $pkg, + version => $ver, + architecture => $arch, + multiarch => $multiarch // 'no', + }; + + $self->{pkg}{"$pkg:$arch"} = $p if defined $arch; + push @{$self->{pkg}{$pkg}}, $p; +} + +=item $facts->add_provided_package($virtual, $relation, $version, $by) + +Records that the "$by" package provides the $virtual package. $relation +and $version correspond to the associated relation given in the Provides +field (if present). + +=cut + +sub add_provided_package { + my ($self, $pkg, $rel, $ver, $by) = @_; + my $v = { + package => $pkg, + relation => $rel, + version => $ver, + provider => $by, + }; + + $self->{virtualpkg}{$pkg} //= []; + push @{$self->{virtualpkg}{$pkg}}, $v; +} + +## +## The functions below are private to Dpkg::Deps::KnownFacts. +## + +sub _find_package { + my ($self, $dep, $lackinfos) = @_; + my ($pkg, $archqual) = ($dep->{package}, $dep->{archqual}); + + return if not exists $self->{pkg}{$pkg}; + + my $host_arch = $dep->{host_arch} // Dpkg::Arch::get_host_arch(); + my $build_arch = $dep->{build_arch} // Dpkg::Arch::get_build_arch(); + + foreach my $p (@{$self->{pkg}{$pkg}}) { + my $a = $p->{architecture}; + my $ma = $p->{multiarch}; + + if (not defined $a) { + $$lackinfos = 1; + next; + } + if (not defined $archqual) { + return $p if $ma eq 'foreign'; + return $p if $a eq $host_arch or $a eq 'all'; + } elsif ($archqual eq 'any') { + return $p if $ma eq 'allowed'; + } elsif ($archqual eq 'native') { + return if $ma eq 'foreign'; + return $p if $a eq $build_arch or $a eq 'all'; + } else { + return $p if $a eq $archqual; + } + } + return; +} + +sub _find_virtual_packages { + my ($self, $pkg) = @_; + + return () if not exists $self->{virtualpkg}{$pkg}; + return @{$self->{virtualpkg}{$pkg}}; +} + +=item $facts->evaluate_simple_dep() + +This method is private and should not be used except from within Dpkg::Deps. + +=cut + +sub evaluate_simple_dep { + my ($self, $dep) = @_; + my ($lackinfos, $pkg) = (0, $dep->{package}); + + my $p = $self->_find_package($dep, \$lackinfos); + if ($p) { + if (defined $dep->{relation}) { + if (defined $p->{version}) { + return 1 if version_compare_relation($p->{version}, + $dep->{relation}, + $dep->{version}); + } else { + $lackinfos = 1; + } + } else { + return 1; + } + } + foreach my $virtpkg ($self->_find_virtual_packages($pkg)) { + next if defined $virtpkg->{relation} and + $virtpkg->{relation} ne REL_EQ; + + if (defined $dep->{relation}) { + next if not defined $virtpkg->{version}; + return 1 if version_compare_relation($virtpkg->{version}, + $dep->{relation}, + $dep->{version}); + } else { + return 1; + } + } + return if $lackinfos; + return 0; +} + +=back + +=head1 CHANGES + +=head2 Version 2.00 (dpkg 1.20.0) + +Remove method: $facts->check_package(). + +=head2 Version 1.01 (dpkg 1.16.1) + +New option: Dpkg::Deps::KnownFacts->add_installed_package() now accepts 2 +supplementary parameters ($arch and $multiarch). + +Deprecated method: Dpkg::Deps::KnownFacts->check_package() is obsolete, +it should not have been part of the public API. + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Deps/Multiple.pm b/scripts/Dpkg/Deps/Multiple.pm new file mode 100644 index 000000000..da12f5184 --- /dev/null +++ b/scripts/Dpkg/Deps/Multiple.pm @@ -0,0 +1,250 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery +# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org> +# +# This program is free software; you may 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 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Deps::Multiple; + +=encoding utf8 + +=head1 NAME + +Dpkg::Deps::Multiple - base module to represent multiple dependencies + +=head1 DESCRIPTION + +The Dpkg::Deps::Multiple module provides objects implementing various types +of dependencies. It is the base class for Dpkg::Deps::{AND,OR,Union}. + +=cut + +use strict; +use warnings; + +our $VERSION = '1.02'; + +use Carp; + +use Dpkg::ErrorHandling; + +use parent qw(Dpkg::Interface::Storable); + +=head1 METHODS + +=over 4 + +=item $dep = Dpkg::Deps::Multiple->new(%opts); + +Creates a new object. + +=cut + +sub new { + my $this = shift; + my $class = ref($this) || $this; + my $self = { list => [ @_ ] }; + + bless $self, $class; + return $self; +} + +=item $dep->reset() + +Clears any dependency information stored in $dep so that $dep->is_empty() +returns true. + +=cut + +sub reset { + my $self = shift; + + $self->{list} = []; +} + +=item $dep->add(@deps) + +Adds new dependency objects at the end of the list. + +=cut + +sub add { + my $self = shift; + + push @{$self->{list}}, @_; +} + +=item $dep->get_deps() + +Returns a list of sub-dependencies. + +=cut + +sub get_deps { + my $self = shift; + + return grep { not $_->is_empty() } @{$self->{list}}; +} + +=item $dep->sort() + +Sorts alphabetically the internal list of dependencies. + +=cut + +sub sort { + my $self = shift; + + my @res = (); + @res = sort { Dpkg::Deps::deps_compare($a, $b) } @{$self->{list}}; + $self->{list} = [ @res ]; +} + +=item $dep->arch_is_concerned($arch) + +Returns true if at least one of the sub-dependencies apply to this +architecture. + +=cut + +sub arch_is_concerned { + my ($self, $host_arch) = @_; + + my $res = 0; + foreach my $dep (@{$self->{list}}) { + $res = 1 if $dep->arch_is_concerned($host_arch); + } + return $res; +} + +=item $dep->reduce_arch($arch) + +Simplifies the dependencies to contain only information relevant to the +given architecture. The non-relevant sub-dependencies are simply removed. + +This trims off the architecture restriction list of Dpkg::Deps::Simple +objects. + +=cut + +sub reduce_arch { + my ($self, $host_arch) = @_; + + my @new; + foreach my $dep (@{$self->{list}}) { + $dep->reduce_arch($host_arch); + push @new, $dep if $dep->arch_is_concerned($host_arch); + } + $self->{list} = [ @new ]; +} + +=item $dep->has_arch_restriction() + +Returns the list of package names that have such a restriction. + +=cut + +sub has_arch_restriction { + my $self = shift; + + my @res; + foreach my $dep (@{$self->{list}}) { + push @res, $dep->has_arch_restriction(); + } + return @res; +} + +=item $dep->profile_is_concerned() + +Returns true if at least one of the sub-dependencies apply to this profile. + +=cut + +sub profile_is_concerned { + my ($self, $build_profiles) = @_; + + my $res = 0; + foreach my $dep (@{$self->{list}}) { + $res = 1 if $dep->profile_is_concerned($build_profiles); + } + return $res; +} + +=item $dep->reduce_profiles() + +Simplifies the dependencies to contain only information relevant to the +given profile. The non-relevant sub-dependencies are simply removed. + +This trims off the profile restriction list of Dpkg::Deps::Simple objects. + +=cut + +sub reduce_profiles { + my ($self, $build_profiles) = @_; + + my @new; + foreach my $dep (@{$self->{list}}) { + $dep->reduce_profiles($build_profiles); + push @new, $dep if $dep->profile_is_concerned($build_profiles); + } + $self->{list} = [ @new ]; +} + +=item $dep->is_empty() + +Returns true if the dependency is empty and doesn't contain any useful +information. This is true when a (descendant of) Dpkg::Deps::Multiple +contains an empty list of dependencies. + +=cut + +sub is_empty { + my $self = shift; + + return scalar @{$self->{list}} == 0; +} + +=item $dep->merge_union($other_dep) + +This method is not meaningful for this object, and will always croak. + +=cut + +sub merge_union { + croak 'method merge_union() is only valid for Dpkg::Deps::Simple'; +} + +=back + +=head1 CHANGES + +=head2 Version 1.02 (dpkg 1.17.10) + +New methods: Add $dep->profile_is_concerned() and $dep->reduce_profiles(). + +=head2 Version 1.01 (dpkg 1.16.1) + +New method: Add $dep->reset(). + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Deps/OR.pm b/scripts/Dpkg/Deps/OR.pm new file mode 100644 index 000000000..4ce5c9818 --- /dev/null +++ b/scripts/Dpkg/Deps/OR.pm @@ -0,0 +1,174 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery +# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org> +# +# This program is free software; you may 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 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Deps::OR; + +=encoding utf8 + +=head1 NAME + +Dpkg::Deps::OR - list of OR dependencies + +=head1 DESCRIPTION + +This class represents a list of dependencies of which only one must be met +for the dependency to be true. It inherits from Dpkg::Deps::Multiple. + +=cut + +use strict; +use warnings; + +our $VERSION = '1.00'; + +use parent qw(Dpkg::Deps::Multiple); + +=head1 METHODS + +=over 4 + +=item $dep->output([$fh]) + +The output method uses " | " to join the list of sub-dependencies. + +=cut + +sub output { + my ($self, $fh) = @_; + + my $res = join(' | ', map { + $_->output() + } grep { + not $_->is_empty() + } $self->get_deps()); + + if (defined $fh) { + print { $fh } $res; + } + return $res; +} + +=item $dep->implies($other_dep) + +Returns 1 when $dep implies $other_dep. Returns 0 when $dep implies +NOT($other_dep). Returns undef when there's no implication. $dep and +$other_dep do not need to be of the same type. + +=cut + +sub implies { + my ($self, $o) = @_; + + # Special case for AND with a single member, replace it by its member + if ($o->isa('Dpkg::Deps::AND')) { + my @subdeps = $o->get_deps(); + if (scalar(@subdeps) == 1) { + $o = $subdeps[0]; + } + } + + # In general, an OR dependency can't imply anything except if each + # of its member implies a member in the other OR dependency + if ($o->isa('Dpkg::Deps::OR')) { + my $subset = 1; + foreach my $dep ($self->get_deps()) { + my $found = 0; + foreach my $odep ($o->get_deps()) { + $found = 1 if $dep->implies($odep); + } + $subset = 0 if not $found; + } + return 1 if $subset; + } + return; +} + +=item $dep->get_evaluation($facts) + +Evaluates the dependency given a list of installed packages and a list of +virtual packages provided. These lists are part of the Dpkg::Deps::KnownFacts +object given as parameters. + +Returns 1 when it's true, 0 when it's false, undef when some information +is lacking to conclude. + +=cut + +sub get_evaluation { + my ($self, $facts) = @_; + + # Returns false if all members evaluates to 0 + # Returns true if at least one member evaluates to true + # Returns undef otherwise + my $result = 0; + foreach my $dep ($self->get_deps()) { + my $eval = $dep->get_evaluation($facts); + if (not defined $eval) { + $result = undef; + } elsif ($eval == 1) { + $result = 1; + last; + } elsif ($eval == 0) { + # Still possible to have a false evaluation + } + } + return $result; +} + +=item $dep->simplify_deps($facts, @assumed_deps) + +Simplifies the dependency as much as possible given the list of facts (see +object Dpkg::Deps::KnownFacts) and a list of other dependencies that are +known to be true. + +=cut + +sub simplify_deps { + my ($self, $facts) = @_; + my @new; + +WHILELOOP: + while (@{$self->{list}}) { + my $dep = shift @{$self->{list}}; + my $eval = $dep->get_evaluation($facts); + if (defined $eval and $eval == 1) { + $self->{list} = []; + return; + } + foreach my $odep (@new, @{$self->{list}}) { + next WHILELOOP if $odep->implies($dep); + } + push @new, $dep; + } + $self->{list} = [ @new ]; +} + +=back + +=head1 CHANGES + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Deps/Simple.pm b/scripts/Dpkg/Deps/Simple.pm new file mode 100644 index 000000000..aa23e7da2 --- /dev/null +++ b/scripts/Dpkg/Deps/Simple.pm @@ -0,0 +1,670 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery +# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org> +# +# This program is free software; you may 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 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Deps::Simple; + +=encoding utf8 + +=head1 NAME + +Dpkg::Deps::Simple - represents a single dependency statement + +=head1 DESCRIPTION + +This class represents a single dependency statement. +It has several interesting properties: + +=over 4 + +=item package + +The package name (can be undef if the dependency has not been initialized +or if the simplification of the dependency lead to its removal). + +=item relation + +The relational operator: "=", "<<", "<=", ">=" or ">>". It can be +undefined if the dependency had no version restriction. In that case the +following field is also undefined. + +=item version + +The version. + +=item arches + +The list of architectures where this dependency is applicable. It is +undefined when there's no restriction, otherwise it is an +array ref. It can contain an exclusion list, in that case each +architecture is prefixed with an exclamation mark. + +=item archqual + +The arch qualifier of the dependency (can be undef if there is none). +In the dependency "python:any (>= 2.6)", the arch qualifier is "any". + +=item restrictions + +The restrictions formula for this dependency. It is undefined when there +is no restriction formula. Otherwise it is an array ref. + +=back + +=head1 METHODS + +=over 4 + +=cut + +use strict; +use warnings; + +our $VERSION = '1.02'; + +use Carp; + +use Dpkg::Arch qw(debarch_is_concerned debarch_list_parse); +use Dpkg::BuildProfiles qw(parse_build_profiles evaluate_restriction_formula); +use Dpkg::Version; +use Dpkg::ErrorHandling; +use Dpkg::Gettext; + +use parent qw(Dpkg::Interface::Storable); + +=item $dep = Dpkg::Deps::Simple->new([$dep[, %opts]]); + +Creates a new object. Some options can be set through %opts: + +=over + +=item host_arch + +Sets the host architecture. + +=item build_arch + +Sets the build architecture. + +=item build_dep + +Specifies whether the parser should consider it a build dependency. +Defaults to 0. + +=item tests_dep + +Specifies whether the parser should consider it a tests dependency. +Defaults to 0. + +=back + +=cut + +sub new { + my ($this, $arg, %opts) = @_; + my $class = ref($this) || $this; + my $self = {}; + + bless $self, $class; + $self->reset(); + $self->{host_arch} = $opts{host_arch}; + $self->{build_arch} = $opts{build_arch}; + $self->{build_dep} = $opts{build_dep} // 0; + $self->{tests_dep} = $opts{tests_dep} // 0; + $self->parse_string($arg) if defined $arg; + return $self; +} + +=item $dep->reset() + +Clears any dependency information stored in $dep so that $dep->is_empty() +returns true. + +=cut + +sub reset { + my $self = shift; + + $self->{package} = undef; + $self->{relation} = undef; + $self->{version} = undef; + $self->{arches} = undef; + $self->{archqual} = undef; + $self->{restrictions} = undef; +} + +=item $dep->parse_string($dep_string) + +Parses the dependency string and modifies internal properties to match the +parsed dependency. + +=cut + +sub parse_string { + my ($self, $dep) = @_; + + my $pkgname_re; + if ($self->{tests_dep}) { + $pkgname_re = qr/[\@a-zA-Z0-9][\@a-zA-Z0-9+.-]*/; + } else { + $pkgname_re = qr/[a-zA-Z0-9][a-zA-Z0-9+.-]*/; + } + + return if not $dep =~ + m{^\s* # skip leading whitespace + ($pkgname_re) # package name + (?: # start of optional part + : # colon for architecture + ([a-zA-Z0-9][a-zA-Z0-9-]*) # architecture name + )? # end of optional part + (?: # start of optional part + \s* \( # open parenthesis for version part + \s* (<<|<=|=|>=|>>|[<>]) # relation part + \s* ([^\)\s]+) # do not attempt to parse version + \s* \) # closing parenthesis + )? # end of optional part + (?: # start of optional architecture + \s* \[ # open bracket for architecture + \s* ([^\]]+) # don't parse architectures now + \s* \] # closing bracket + )? # end of optional architecture + ( + (?: # start of optional restriction + \s* < # open bracket for restriction + \s* [^>]+ # do not parse restrictions now + \s* > # closing bracket + )+ + )? # end of optional restriction + \s*$ # trailing spaces at end + }x; + if (defined $2) { + return if $2 eq 'native' and not $self->{build_dep}; + $self->{archqual} = $2; + } + $self->{package} = $1; + $self->{relation} = version_normalize_relation($3) if defined $3; + if (defined $4) { + $self->{version} = Dpkg::Version->new($4); + } + if (defined $5) { + $self->{arches} = [ debarch_list_parse($5) ]; + } + if (defined $6) { + $self->{restrictions} = [ parse_build_profiles($6) ]; + } +} + +=item $dep->parse($fh, $desc) + +Parse a dependency line from a filehandle. + +=cut + +sub parse { + my ($self, $fh, $desc) = @_; + + my $line = <$fh>; + chomp $line; + return $self->parse_string($line); +} + +=item $dep->load($filename) + +Parse a dependency line from $filename. + +=item $dep->output([$fh]) + +=item "$dep" + +Returns a string representing the dependency. If $fh is set, it prints +the string to the filehandle. + +=cut + +sub output { + my ($self, $fh) = @_; + + my $res = $self->{package}; + if (defined $self->{archqual}) { + $res .= ':' . $self->{archqual}; + } + if (defined $self->{relation}) { + $res .= ' (' . $self->{relation} . ' ' . $self->{version} . ')'; + } + if (defined $self->{arches}) { + $res .= ' [' . join(' ', @{$self->{arches}}) . ']'; + } + if (defined $self->{restrictions}) { + for my $restrlist (@{$self->{restrictions}}) { + $res .= ' <' . join(' ', @{$restrlist}) . '>'; + } + } + if (defined $fh) { + print { $fh } $res; + } + return $res; +} + +=item $dep->save($filename) + +Save the dependency into the given $filename. + +=cut + +# _arch_is_superset(\@p, \@q) +# +# Returns true if the arch list @p is a superset of arch list @q. +# The arguments can also be undef in case there's no explicit architecture +# restriction. +sub _arch_is_superset { + my ($p, $q) = @_; + my $p_arch_neg = defined $p and $p->[0] =~ /^!/; + my $q_arch_neg = defined $q and $q->[0] =~ /^!/; + + # If "p" has no arches, it is a superset of q and we should fall through + # to the version check. + if (not defined $p) { + return 1; + } + # If q has no arches, it is a superset of p and there are no useful + # implications. + elsif (not defined $q) { + return 0; + } + # Both have arches. If neither are negated, we know nothing useful + # unless q is a subset of p. + elsif (not $p_arch_neg and not $q_arch_neg) { + my %p_arches = map { $_ => 1 } @{$p}; + my $subset = 1; + for my $arch (@{$q}) { + $subset = 0 unless $p_arches{$arch}; + } + return 0 unless $subset; + } + # If both are negated, we know nothing useful unless p is a subset of + # q (and therefore has fewer things excluded, and therefore is more + # general). + elsif ($p_arch_neg and $q_arch_neg) { + my %q_arches = map { $_ => 1 } @{$q}; + my $subset = 1; + for my $arch (@{$p}) { + $subset = 0 unless $q_arches{$arch}; + } + return 0 unless $subset; + } + # If q is negated and p isn't, we'd need to know the full list of + # arches to know if there's any relationship, so bail. + elsif (not $p_arch_neg and $q_arch_neg) { + return 0; + } + # If p is negated and q isn't, q is a subset of p if none of the + # negated arches in p are present in q. + elsif ($p_arch_neg and not $q_arch_neg) { + my %q_arches = map { $_ => 1 } @{$q}; + my $subset = 1; + for my $arch (@{$p}) { + $subset = 0 if $q_arches{substr($arch, 1)}; + } + return 0 unless $subset; + } + return 1; +} + +# _arch_qualifier_implies($p, $q) +# +# Returns true if the arch qualifier $p and $q are compatible with the +# implication $p -> $q, false otherwise. $p/$q can be undef/"any"/"native" +# or an architecture string. +# +# Because we are handling dependencies in isolation, and the full context +# of the implications are only known when doing dependency resolution at +# run-time, we can only assert that they are implied if they are equal. +# +# For example dependencies with different arch-qualifiers cannot be simplified +# as these depend on the state of Multi-Arch field in the package depended on. +sub _arch_qualifier_implies { + my ($p, $q) = @_; + + return $p eq $q if defined $p and defined $q; + return 1 if not defined $p and not defined $q; + return 0; +} + +# _restrictions_imply($p, $q) +# +# Returns true if the restrictions $p and $q are compatible with the +# implication $p -> $q, false otherwise. +# NOTE: We don't try to be very clever here, so we may conservatively +# return false when there is an implication. +sub _restrictions_imply { + my ($p, $q) = @_; + + if (not defined $p) { + return 1; + } elsif (not defined $q) { + return 0; + } else { + # Check whether set difference is empty. + my %restr; + + for my $restrlist (@{$q}) { + my $reststr = join ' ', sort @{$restrlist}; + $restr{$reststr} = 1; + } + for my $restrlist (@{$p}) { + my $reststr = join ' ', sort @{$restrlist}; + delete $restr{$reststr}; + } + + return keys %restr == 0; + } +} + +=item $dep->implies($other_dep) + +Returns 1 when $dep implies $other_dep. Returns 0 when $dep implies +NOT($other_dep). Returns undef when there is no implication. $dep and +$other_dep do not need to be of the same type. + +=cut + +sub implies { + my ($self, $o) = @_; + + if ($o->isa('Dpkg::Deps::Simple')) { + # An implication is only possible on the same package + return if $self->{package} ne $o->{package}; + + # Our architecture set must be a superset of the architectures for + # o, otherwise we can't conclude anything. + return unless _arch_is_superset($self->{arches}, $o->{arches}); + + # The arch qualifier must not forbid an implication + return unless _arch_qualifier_implies($self->{archqual}, + $o->{archqual}); + + # Our restrictions must imply the restrictions for o + return unless _restrictions_imply($self->{restrictions}, + $o->{restrictions}); + + # If o has no version clause, then our dependency is stronger + return 1 if not defined $o->{relation}; + # If o has a version clause, we must also have one, otherwise there + # can't be an implication + return if not defined $self->{relation}; + + return Dpkg::Deps::deps_eval_implication($self->{relation}, + $self->{version}, $o->{relation}, $o->{version}); + } elsif ($o->isa('Dpkg::Deps::AND')) { + # TRUE: Need to imply all individual elements + # FALSE: Need to NOT imply at least one individual element + my $res = 1; + foreach my $dep ($o->get_deps()) { + my $implication = $self->implies($dep); + unless (defined $implication and $implication == 1) { + $res = $implication; + last if defined $res; + } + } + return $res; + } elsif ($o->isa('Dpkg::Deps::OR')) { + # TRUE: Need to imply at least one individual element + # FALSE: Need to not apply all individual elements + # UNDEF: The rest + my $res = undef; + foreach my $dep ($o->get_deps()) { + my $implication = $self->implies($dep); + if (defined $implication) { + if (not defined $res) { + $res = $implication; + } else { + if ($implication) { + $res = 1; + } else { + $res = 0; + } + } + last if defined $res and $res == 1; + } + } + return $res; + } else { + croak 'Dpkg::Deps::Simple cannot evaluate implication with a ' . + ref($o); + } +} + +=item $dep->get_deps() + +Returns a list of sub-dependencies, which for this object it means it +returns itself. + +=cut + +sub get_deps { + my $self = shift; + + return $self; +} + +=item $dep->sort() + +This method is a no-op for this object. + +=cut + +sub sort { + # Nothing to sort +} + +=item $dep->arch_is_concerned($arch) + +Returns true if the dependency applies to the indicated architecture. + +=cut + +sub arch_is_concerned { + my ($self, $host_arch) = @_; + + return 0 if not defined $self->{package}; # Empty dep + return 1 if not defined $self->{arches}; # Dep without arch spec + + return debarch_is_concerned($host_arch, @{$self->{arches}}); +} + +=item $dep->reduce_arch($arch) + +Simplifies the dependency to contain only information relevant to the given +architecture. This object can be left empty after this operation. This trims +off the architecture restriction list of these objects. + +=cut + +sub reduce_arch { + my ($self, $host_arch) = @_; + + if (not $self->arch_is_concerned($host_arch)) { + $self->reset(); + } else { + $self->{arches} = undef; + } +} + +=item $dep->has_arch_restriction() + +Returns the package name if the dependency applies only to a subset of +architectures. + +=cut + +sub has_arch_restriction { + my $self = shift; + + if (defined $self->{arches}) { + return $self->{package}; + } else { + return (); + } +} + +=item $dep->profile_is_concerned() + +Returns true if the dependency applies to the indicated profile. + +=cut + +sub profile_is_concerned { + my ($self, $build_profiles) = @_; + + return 0 if not defined $self->{package}; # Empty dep + return 1 if not defined $self->{restrictions}; # Dep without restrictions + return evaluate_restriction_formula($self->{restrictions}, $build_profiles); +} + +=item $dep->reduce_profiles() + +Simplifies the dependency to contain only information relevant to the given +profile. This object can be left empty after this operation. This trims off +the profile restriction list of this object. + +=cut + +sub reduce_profiles { + my ($self, $build_profiles) = @_; + + if (not $self->profile_is_concerned($build_profiles)) { + $self->reset(); + } else { + $self->{restrictions} = undef; + } +} + +=item $dep->get_evaluation($facts) + +Evaluates the dependency given a list of installed packages and a list of +virtual packages provided. These lists are part of the Dpkg::Deps::KnownFacts +object given as parameters. + +Returns 1 when it's true, 0 when it's false, undef when some information +is lacking to conclude. + +=cut + +sub get_evaluation { + my ($self, $facts) = @_; + + return if not defined $self->{package}; + return $facts->evaluate_simple_dep($self); +} + +=item $dep->simplify_deps($facts, @assumed_deps) + +Simplifies the dependency as much as possible given the list of facts (see +class Dpkg::Deps::KnownFacts) and a list of other dependencies that are +known to be true. + +=cut + +sub simplify_deps { + my ($self, $facts) = @_; + + my $eval = $self->get_evaluation($facts); + $self->reset() if defined $eval and $eval == 1; +} + +=item $dep->is_empty() + +Returns true if the dependency is empty and doesn't contain any useful +information. This is true when the object has not yet been initialized. + +=cut + +sub is_empty { + my $self = shift; + + return not defined $self->{package}; +} + +=item $dep->merge_union($other_dep) + +Returns true if $dep could be modified to represent the union of both +dependencies. Otherwise returns false. + +=cut + +sub merge_union { + my ($self, $o) = @_; + + return 0 if not $o->isa('Dpkg::Deps::Simple'); + return 0 if $self->is_empty() or $o->is_empty(); + return 0 if $self->{package} ne $o->{package}; + return 0 if defined $self->{arches} or defined $o->{arches}; + + if (not defined $o->{relation} and defined $self->{relation}) { + # Union is the non-versioned dependency + $self->{relation} = undef; + $self->{version} = undef; + return 1; + } + + my $implication = $self->implies($o); + my $rev_implication = $o->implies($self); + if (defined $implication) { + if ($implication) { + $self->{relation} = $o->{relation}; + $self->{version} = $o->{version}; + return 1; + } else { + return 0; + } + } + if (defined $rev_implication) { + if ($rev_implication) { + # Already merged... + return 1; + } else { + return 0; + } + } + return 0; +} + +=back + +=head1 CHANGES + +=head2 Version 1.02 (dpkg 1.17.10) + +New methods: Add $dep->profile_is_concerned() and $dep->reduce_profiles(). + +=head2 Version 1.01 (dpkg 1.16.1) + +New method: Add $dep->reset(). + +New property: recognizes the arch qualifier "any" and stores it in the +"archqual" property when present. + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Deps/Union.pm b/scripts/Dpkg/Deps/Union.pm new file mode 100644 index 000000000..148e38ed3 --- /dev/null +++ b/scripts/Dpkg/Deps/Union.pm @@ -0,0 +1,119 @@ +# Copyright © 1998 Richard Braakman +# Copyright © 1999 Darren Benham +# Copyright © 2000 Sean 'Shaleh' Perry +# Copyright © 2004 Frank Lichtenheld +# Copyright © 2006 Russ Allbery +# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org> +# +# This program is free software; you may 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 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Deps::Union; + +=encoding utf8 + +=head1 NAME + +Dpkg::Deps::Union - list of unrelated dependencies + +=head1 DESCRIPTION + +This class represents a list of relationships. +It inherits from Dpkg::Deps::Multiple. + +=cut + +use strict; +use warnings; + +our $VERSION = '1.00'; + +use parent qw(Dpkg::Deps::Multiple); + +=head1 METHODS + +=over 4 + +=item $dep->output([$fh]) + +The output method uses ", " to join the list of relationships. + +=cut + +sub output { + my ($self, $fh) = @_; + + my $res = join(', ', map { + $_->output() + } grep { + not $_->is_empty() + } $self->get_deps()); + + if (defined $fh) { + print { $fh } $res; + } + return $res; +} + +=item $dep->implies($other_dep) + +=item $dep->get_evaluation($other_dep) + +These methods are not meaningful for this object and always return undef. + +=cut + +sub implies { + # Implication test is not useful on Union. + return; +} + +sub get_evaluation { + # Evaluation is not useful on Union. + return; +} + +=item $dep->simplify_deps($facts) + +The simplification is done to generate an union of all the relationships. +It uses $simple_dep->merge_union($other_dep) to get its job done. + +=cut + +sub simplify_deps { + my ($self, $facts) = @_; + my @new; + +WHILELOOP: + while (@{$self->{list}}) { + my $odep = shift @{$self->{list}}; + foreach my $dep (@new) { + next WHILELOOP if $dep->merge_union($odep); + } + push @new, $odep; + } + $self->{list} = [ @new ]; +} + +=back + +=head1 CHANGES + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Dist/Files.pm b/scripts/Dpkg/Dist/Files.pm index c2c426bd9..28f9d9a7a 100644 --- a/scripts/Dpkg/Dist/Files.pm +++ b/scripts/Dpkg/Dist/Files.pm @@ -81,12 +81,14 @@ sub parse { my $file; - if (m/^(\S+) (\S+) (\S+)$/) { + if (m/^(\S+) (\S+) (\S+)((?:\s+[0-9a-z-]+=\S+)*)$/) { $file = $self->parse_filename($1); error(g_('badly formed package name in files list file, line %d'), $.) unless defined $file; $file->{section} = $2; $file->{priority} = $3; + my $attrs = $4; + $file->{attrs} = { map { split /=/ } split ' ', $attrs }; } else { error(g_('badly formed line in files list file, line %d'), $.); } @@ -131,12 +133,13 @@ sub get_file { } sub add_file { - my ($self, $filename, $section, $priority) = @_; + my ($self, $filename, $section, $priority, %attrs) = @_; my $file = $self->parse_filename($filename); error(g_('invalid filename %s'), $filename) unless defined $file; $file->{section} = $section; $file->{priority} = $priority; + $file->{attrs} = \%attrs; $self->{files}->{$filename} = $file; @@ -171,7 +174,15 @@ sub output { foreach my $filename (sort keys %{$self->{files}}) { my $file = $self->{files}->{$filename}; - my $entry = "$filename $file->{section} $file->{priority}\n"; + my $entry = "$filename $file->{section} $file->{priority}"; + + if (exists $file->{attrs}) { + foreach my $attr (sort keys %{$file->{attrs}}) { + $entry .= " $attr=$file->{attrs}->{$attr}"; + } + } + + $entry .= "\n"; print { $fh } $entry if defined $fh; $str .= $entry; diff --git a/scripts/Dpkg/Exit.pm b/scripts/Dpkg/Exit.pm index 5e513b496..70a29b1a6 100644 --- a/scripts/Dpkg/Exit.pm +++ b/scripts/Dpkg/Exit.pm @@ -19,7 +19,7 @@ package Dpkg::Exit; use strict; use warnings; -our $VERSION = '1.01'; +our $VERSION = '2.00'; our @EXPORT_OK = qw( push_exit_handler pop_exit_handler @@ -28,10 +28,7 @@ our @EXPORT_OK = qw( use Exporter qw(import); -# XXX: Backwards compatibility, stop exporting on VERSION 2.00. -## no critic (Variables::ProhibitPackageVars) -our @handlers = (); -## use critic +my @handlers = (); =encoding utf8 @@ -55,6 +52,8 @@ Register a code reference into the exit function handlers stack. sub push_exit_handler { my ($func) = shift; + + _setup_exit_handlers() if @handlers == 0; push @handlers, $func; } @@ -65,6 +64,7 @@ Pop the last registered exit handler from the handlers stack. =cut sub pop_exit_handler { + _reset_exit_handlers() if @handlers == 1; pop @handlers; } @@ -83,14 +83,32 @@ sub _exit_handler { exit(127); } -$SIG{INT} = \&_exit_handler; -$SIG{HUP} = \&_exit_handler; -$SIG{QUIT} = \&_exit_handler; +my @SIGNAMES = qw(INT HUP QUIT __DIE__); +my %SIGOLD; + +sub _setup_exit_handlers +{ + foreach my $signame (@SIGNAMES) { + $SIGOLD{$signame} = $SIG{$signame}; + $SIG{$signame} = \&_exit_handler; + } +} + +sub _reset_exit_handlers +{ + foreach my $signame (@SIGNAMES) { + $SIG{$signame} = $SIGOLD{$signame}; + } +} =back =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Hide variable: @handlers. + =head2 Version 1.01 (dpkg 1.17.2) New functions: push_exit_handler(), pop_exit_handler(), run_exit_handlers() diff --git a/scripts/Dpkg/File.pm b/scripts/Dpkg/File.pm index 884923852..6ba49a6e6 100644 --- a/scripts/Dpkg/File.pm +++ b/scripts/Dpkg/File.pm @@ -25,12 +25,26 @@ our @EXPORT = qw( ); use Exporter qw(import); +use Scalar::Util qw(openhandle); + +use Dpkg::ErrorHandling; +use Dpkg::Gettext; sub file_slurp { - my $fh = shift; + my $file = shift; + my $fh; + my $doclose = 0; + if (openhandle($file)) { + $fh = $file; + } else { + open $fh, '<', $file or syserr(g_('cannot read %s'), $fh); + $doclose = 1; + } local $/; my $data = <$fh>; + close $fh if $doclose; + return $data; } diff --git a/scripts/Dpkg/Gettext.pm b/scripts/Dpkg/Gettext.pm index 2e3e5042e..e61cdd1a0 100644 --- a/scripts/Dpkg/Gettext.pm +++ b/scripts/Dpkg/Gettext.pm @@ -28,15 +28,15 @@ package Dpkg::Gettext; use strict; use warnings; +use feature qw(state); -our $VERSION = '1.03'; +our $VERSION = '2.00'; our @EXPORT = qw( textdomain ngettext g_ P_ N_ - _g ); use Exporter qw(import); @@ -88,6 +88,19 @@ our $DEFAULT_TEXT_DOMAIN = 'dpkg-dev'; =over 4 +=item $domain = textdomain($new_domain) + +Compatibility textdomain() fallback when Locale::gettext is not available. + +If $new_domain is not undef, it will set the current domain to $new_domain. +Returns the current domain, after possibly changing it. + +=item $trans = ngettext($msgid, $msgid_plural, $n) + +Compatibility ngettext() fallback when Locale::gettext is not available. + +Returns $msgid if $n is 1 or $msgid_plural otherwise. + =item $trans = g_($msgid) Calls dgettext() on the $msgid and returns its translation for the current @@ -118,41 +131,43 @@ BEGIN { $use_gettext = not $@; } if (not $use_gettext) { - eval q{ - sub g_ { - return shift; - } - sub textdomain { - } - sub ngettext { - my ($msgid, $msgid_plural, $n) = @_; - if ($n == 1) { - return $msgid; - } else { - return $msgid_plural; - } - } - sub C_ { - my ($msgctxt, $msgid) = @_; + *g_ = sub { + return shift; + }; + *textdomain = sub { + my $new_domain = shift; + state $domain = $DEFAULT_TEXT_DOMAIN; + + $domain = $new_domain if defined $new_domain; + + return $domain; + }; + *ngettext = sub { + my ($msgid, $msgid_plural, $n) = @_; + if ($n == 1) { return $msgid; - } - sub P_ { - return ngettext(@_); + } else { + return $msgid_plural; } }; + *C_ = sub { + my ($msgctxt, $msgid) = @_; + return $msgid; + }; + *P_ = sub { + return ngettext(@_); + }; } else { - eval q{ - sub g_ { - return dgettext($DEFAULT_TEXT_DOMAIN, shift); - } - sub C_ { - my ($msgctxt, $msgid) = @_; - return dgettext($DEFAULT_TEXT_DOMAIN, - $msgctxt . GETTEXT_CONTEXT_GLUE . $msgid); - } - sub P_ { - return dngettext($DEFAULT_TEXT_DOMAIN, @_); - } + *g_ = sub { + return dgettext($DEFAULT_TEXT_DOMAIN, shift); + }; + *C_ = sub { + my ($msgctxt, $msgid) = @_; + return dgettext($DEFAULT_TEXT_DOMAIN, + $msgctxt . GETTEXT_CONTEXT_GLUE . $msgid); + }; + *P_ = sub { + return dngettext($DEFAULT_TEXT_DOMAIN, @_); }; } } @@ -173,18 +188,11 @@ sub N_ return $msgid; } -# XXX: Backwards compatibility, to be removed on VERSION 2.00. -sub _g ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) -{ - my $msgid = shift; - - warnings::warnif('deprecated', - 'obsolete _g() function, please use g_() instead'); +=head1 CHANGES - return g_($msgid); -} +=head2 Version 2.00 (dpkg 1.20.0) -=head1 CHANGES +Remove function: _g(). =head2 Version 1.03 (dpkg 1.19.0) diff --git a/scripts/Dpkg/Index.pm b/scripts/Dpkg/Index.pm index bcee6205b..cfe86ba17 100644 --- a/scripts/Dpkg/Index.pm +++ b/scripts/Dpkg/Index.pm @@ -19,7 +19,7 @@ package Dpkg::Index; use strict; use warnings; -our $VERSION = '1.01'; +our $VERSION = '2.00'; use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -39,7 +39,7 @@ Dpkg::Index - generic index of control information =head1 DESCRIPTION -This object represent a set of Dpkg::Control objects. +This class represent a set of Dpkg::Control objects. =head1 METHODS @@ -58,7 +58,7 @@ sub new { my $self = { items => {}, order => [], - unique_tuple_key => 0, + unique_tuple_key => 1, get_key_func => sub { return $_[0]->{Package} }, type => CTRL_UNKNOWN, }; @@ -77,8 +77,7 @@ The "type" option is checked first to define default values for other options. Here are the relevant options: "get_key_func" is a function returning a key for the item passed in parameters, "unique_tuple_key" is a boolean requesting whether the default key should be the unique tuple -(default to false for backwards compatibility, but it will change to true -in dpkg 1.20.x). The index can only contain one item with a given key. +(default to true). The index can only contain one item with a given key. The "get_key_func" function used depends on the type: =over @@ -89,9 +88,9 @@ for CTRL_INFO_SRC, it is the Source field; =item * -for CTRL_INDEX_SRC and CTRL_PKG_SRC it is the Package field by default, -or the Package and Version fields (concatenated with "_") when -"unique_tuple_key" is true; +for CTRL_INDEX_SRC and CTRL_PKG_SRC it is the Package and Version fields +(concatenated with "_") when "unique_tuple_key" is true (the default), or +otherwise the Package field; =item * @@ -99,9 +98,9 @@ for CTRL_INFO_PKG it is simply the Package field; =item * -for CTRL_INDEX_PKG and CTRL_PKG_DEB it is the Package field by default, -or the Package, Version and Architecture fields (concatenated with "_") -when "unique_tuple_key" is true; +for CTRL_INDEX_PKG and CTRL_PKG_DEB it is the Package, Version and +Architecture fields (concatenated with "_") when "unique_tuple_key" is +true (the default) or otherwise the Package field; =item * @@ -165,14 +164,10 @@ sub set_options { $self->{get_key_func} = sub { return $_[0]->{Package} . '_' . $_[0]->{Version}; }; - } elsif (not defined $opts{get_key_func}) { + } else { $self->{get_key_func} = sub { return $_[0]->{Package}; }; - warnings::warnif('deprecated', - 'the default get_key_func for this control type will ' . - 'change semantics in dpkg 1.20.x , please set ' . - 'unique_tuple_key or get_key_func explicitly'); } } elsif ($t == CTRL_INDEX_PKG or $t == CTRL_PKG_DEB) { if ($opts{unique_tuple_key} // $self->{unique_tuple_key}) { @@ -180,14 +175,10 @@ sub set_options { return $_[0]->{Package} . '_' . $_[0]->{Version} . '_' . $_[0]->{Architecture}; }; - } elsif (not defined $opts{get_key_func}) { + } else { $self->{get_key_func} = sub { return $_[0]->{Package}; }; - warnings::warnif('deprecated', - 'the default get_key_func for this control type will ' . - 'change semantics in dpkg 1.20.x , please set ' . - 'unique_tuple_key or get_key_func explicitly'); } } elsif ($t == CTRL_FILE_CHANGES) { $self->{get_key_func} = sub { @@ -237,11 +228,6 @@ sub add { $self->{items}{$key} = $item; } -=item $index->load($file) - -Reads the file and creates all items parsed. Returns the number of items -parsed. Handles compressed files transparently based on their extensions. - =item $index->parse($fh, $desc) Reads the filehandle and creates all items parsed. When called multiple @@ -263,10 +249,10 @@ sub parse { return $i; } -=item $index->save($file) +=item $index->load($file) -Writes the content of the index in a file. Auto-compresses files -based on their extensions. +Reads the file and creates all items parsed. Returns the number of items +parsed. Handles compressed files transparently based on their extensions. =item $item = $index->new_item() @@ -404,17 +390,16 @@ sub sort { } } -=item $str = $index->output() +=item $str = $index->output([$fh]) =item "$index" -Get a string representation of the index. The Dpkg::Control objects are +Get a string representation of the index. The L<Dpkg::Control> objects are output in the order which they have been read or added except if the order have been changed with sort(). -=item $index->output($fh) - -Print the string representation of the index to a filehandle. +Print the string representation of the index to a filehandle if $fh has +been passed. =cut @@ -432,10 +417,19 @@ sub output { return $str; } +=item $index->save($file) + +Writes the content of the index in a file. Auto-compresses files +based on their extensions. + =back =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Change behavior: The "unique_tuple_key" option now defaults to true. + =head2 Version 1.01 (dpkg 1.19.0) New option: Add new "unique_tuple_key" option to $index->set_options() to set diff --git a/scripts/Dpkg/Interface/Storable.pm b/scripts/Dpkg/Interface/Storable.pm index eb6078d3b..5ac078ac1 100644 --- a/scripts/Dpkg/Interface/Storable.pm +++ b/scripts/Dpkg/Interface/Storable.pm @@ -38,23 +38,23 @@ Dpkg::Interface::Storable - common methods related to object serialization =head1 DESCRIPTION Dpkg::Interface::Storable is only meant to be used as parent -class for other objects. It provides common methods that are +class for other classes. It provides common methods that are all implemented on top of two basic methods parse() and output(). =head1 BASE METHODS -Those methods must be provided by the object that wish to inherit +Those methods must be provided by the class that wish to inherit from Dpkg::Interface::Storable so that the methods provided can work. =over 4 -=item $obj->parse($fh, $desc) +=item $obj->parse($fh[, $desc]) This methods initialize the object with the data stored in the filehandle. $desc is optional and is a textual description of the filehandle used in error messages. -=item $string = $obj->output($fh) +=item $string = $obj->output([$fh]) This method returns a string representation of the object in $string and it writes the same string to $fh (if it's defined). diff --git a/scripts/Dpkg/OpenPGP.pm b/scripts/Dpkg/OpenPGP.pm index 858d3efcf..f08bd3b12 100644 --- a/scripts/Dpkg/OpenPGP.pm +++ b/scripts/Dpkg/OpenPGP.pm @@ -18,6 +18,7 @@ package Dpkg::OpenPGP; use strict; use warnings; +use POSIX qw(:sys_wait_h); use Exporter qw(import); use File::Copy; @@ -49,18 +50,21 @@ sub openpgp_sig_to_asc if ($is_openpgp_ascii_armor) { notice(g_('signature file is already OpenPGP ASCII armor, copying')); copy($sig, $asc); - return; + return $asc; } if (not find_command('gpg')) { warning(g_('cannot OpenPGP ASCII armor signature file due to missing gpg')); } + my @gpg_opts = qw(--no-options); + open my $fh_asc, '>', $asc or syserr(g_('cannot create signature file %s'), $asc); - open my $fh_gpg, '-|', 'gpg', '-o', '-', '--enarmor', $sig + open my $fh_gpg, '-|', 'gpg', @gpg_opts, '-o', '-', '--enarmor', $sig or syserr(g_('cannot execute %s program'), 'gpg'); while (my $line = <$fh_gpg>) { + next if $line =~ m/^Version: /; next if $line =~ m/^Comment: /; $line =~ s/ARMORED FILE/SIGNATURE/; @@ -71,10 +75,86 @@ sub openpgp_sig_to_asc close $fh_gpg or subprocerr('gpg'); close $fh_asc or syserr(g_('cannot write signature file %s'), $asc); - return $sig; + return $asc; } return; } +sub import_key { + my ($asc, %opts) = @_; + + $opts{require_valid_signature} //= 1; + + my @exec; + if (find_command('gpg')) { + push @exec, 'gpg'; + } elsif ($opts{require_valid_signature}) { + error(g_('cannot import key in %s since GnuPG is not installed'), + $asc); + } else { + warning(g_('cannot import key in %s since GnuPG is not installed'), + $asc); + return; + } + push @exec, '--no-options', '--no-default-keyring', '-q', '--import'; + push @exec, '--keyring', $opts{keyring}; + push @exec, $asc; + + my ($stdout, $stderr); + spawn(exec => \@exec, wait_child => 1, nocheck => 1, timeout => 10, + to_string => \$stdout, error_to_string => \$stderr); + if (WIFEXITED($?)) { + my $status = WEXITSTATUS($?); + print { *STDERR } "$stdout$stderr" if $status; + if ($status == 1 or ($status && $opts{require_valid_signature})) { + error(g_('failed to import key in %s'), $asc); + } elsif ($status) { + warning(g_('failed to import key in %s'), $asc); + } + } else { + subprocerr("@exec"); + } +} + +sub verify_signature { + my ($sig, %opts) = @_; + + $opts{require_valid_signature} //= 1; + + my @exec; + if (find_command('gpgv')) { + push @exec, 'gpgv'; + } elsif (find_command('gpg')) { + push @exec, 'gpg', '--no-default-keyring', '-q', '--verify'; + } elsif ($opts{require_valid_signature}) { + error(g_('cannot verify signature on %s since GnuPG is not installed'), + $sig); + } else { + warning(g_('cannot verify signature on %s since GnuPG is not installed'), + $sig); + return; + } + foreach my $keyring (@{$opts{keyrings}}) { + push @exec, '--keyring', $keyring; + } + push @exec, $sig; + push @exec, $opts{datafile} if exists $opts{datafile}; + + my ($stdout, $stderr); + spawn(exec => \@exec, wait_child => 1, nocheck => 1, timeout => 10, + to_string => \$stdout, error_to_string => \$stderr); + if (WIFEXITED($?)) { + my $status = WEXITSTATUS($?); + print { *STDERR } "$stdout$stderr" if $status; + if ($status == 1 or ($status && $opts{require_valid_signature})) { + error(g_('failed to verify signature on %s'), $sig); + } elsif ($status) { + warning(g_('failed to verify signature on %s'), $sig); + } + } else { + subprocerr("@exec"); + } +} + 1; diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm index bab5e32a0..bf52cc555 100644 --- a/scripts/Dpkg/Shlibs.pm +++ b/scripts/Dpkg/Shlibs.pm @@ -116,8 +116,20 @@ sub setup_library_paths { # XXX: Deprecated. Update library paths with LD_LIBRARY_PATH. if ($ENV{LD_LIBRARY_PATH}) { + require Cwd; + my $cwd = Cwd::getcwd; + foreach my $path (split /:/, $ENV{LD_LIBRARY_PATH}) { $path =~ s{/+$}{}; + + my $realpath = Cwd::realpath($path); + next unless defined $realpath; + if ($realpath =~ m/^\Q$cwd\E/) { + warning(g_('deprecated use of LD_LIBRARY_PATH with private ' . + 'library directory which interferes with ' . + 'cross-building, please use -l option instead')); + } + # XXX: This should be added to @custom_librarypaths, but as this # is deprecated we do not care as the code will go away. push @system_librarypaths, $path; diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm index 91cc06488..4cee866e7 100644 --- a/scripts/Dpkg/Shlibs/Objdump.pm +++ b/scripts/Dpkg/Shlibs/Objdump.pm @@ -1,4 +1,5 @@ # Copyright © 2007-2010 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2007-2009,2012-2015,2017-2018 Guillem Jover <guillem@debian.org> # # 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 @@ -23,17 +24,6 @@ our $VERSION = '0.01'; use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Dpkg::Path qw(find_command); -use Dpkg::Arch qw(debarch_to_gnutriplet get_build_arch get_host_arch); -use Dpkg::IPC; - -# Decide which objdump to call -our $OBJDUMP = 'objdump'; -if (get_build_arch() ne get_host_arch()) { - my $od = debarch_to_gnutriplet(get_host_arch()) . '-objdump'; - $OBJDUMP = $od if find_command($od); -} - sub new { my $this = shift; @@ -244,9 +234,12 @@ package Dpkg::Shlibs::Objdump::Object; use strict; use warnings; +use feature qw(state); use Dpkg::Gettext; use Dpkg::ErrorHandling; +use Dpkg::Path qw(find_command); +use Dpkg::Arch qw(debarch_to_gnutriplet get_build_arch get_host_arch); sub new { my $this = shift; @@ -268,9 +261,9 @@ sub reset { $self->{file} = ''; $self->{id} = ''; - $self->{SONAME} = ''; $self->{HASH} = ''; $self->{GNU_HASH} = ''; + $self->{INTERP} = 0; $self->{SONAME} = ''; $self->{NEEDED} = []; $self->{RPATH} = []; @@ -281,6 +274,14 @@ sub reset { return $self; } +sub _select_objdump { + # Decide which objdump to call + if (get_build_arch() ne get_host_arch()) { + my $od = debarch_to_gnutriplet(get_host_arch()) . '-objdump'; + return $od if find_command($od); + } + return 'objdump'; +} sub analyze { my ($self, $file) = @_; @@ -298,6 +299,7 @@ sub analyze { return; } + state $OBJDUMP = _select_objdump(); local $ENV{LC_ALL} = 'C'; open(my $objdump, '-|', $OBJDUMP, '-w', '-f', '-p', '-T', '-R', $file) or syserr(g_('cannot fork for %s'), $OBJDUMP); @@ -325,7 +327,7 @@ sub parse_objdump_output { $section = 'dyninfo'; next; } elsif (/^Program Header:/) { - $section = 'header'; + $section = 'program'; next; } elsif (/^Version definitions:/) { $section = 'verdef'; @@ -364,6 +366,10 @@ sub parse_objdump_output { $self->{RPATH} = [ split /:/, $rpath ]; } } + } elsif ($section eq 'program') { + if (/^\s*INTERP\s+/) { + $self->{INTERP} = 1; + } } elsif ($section eq 'none') { if (/^\s*.+:\s*file\s+format\s+(\S+)$/) { $self->{format} = $1; @@ -536,7 +542,8 @@ sub get_needed_libraries { sub is_executable { my $self = shift; - return exists $self->{flags}{EXEC_P} && $self->{flags}{EXEC_P}; + return (exists $self->{flags}{EXEC_P} && $self->{flags}{EXEC_P}) || + (exists $self->{INTERP} && $self->{INTERP}); } sub is_public_library { diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm index 802681bf1..142992b89 100644 --- a/scripts/Dpkg/Shlibs/Symbol.pm +++ b/scripts/Dpkg/Shlibs/Symbol.pm @@ -33,6 +33,10 @@ use Dpkg::Shlibs::Cppfilt; # Supported alias types in the order of matching preference use constant ALIAS_TYPES => qw(c++ symver); +# Needed by the deprecated key, which is a correct use. +no if $Dpkg::Version::VERSION ge '1.02', + warnings => qw(Dpkg::Version::semantic_change::overload::bool); + sub new { my ($this, %args) = @_; my $class = ref($this) || $this; diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm b/scripts/Dpkg/Shlibs/SymbolFile.pm index 04d22306c..28b2111c7 100644 --- a/scripts/Dpkg/Shlibs/SymbolFile.pm +++ b/scripts/Dpkg/Shlibs/SymbolFile.pm @@ -30,6 +30,10 @@ use Dpkg::Arch qw(get_host_arch); use parent qw(Dpkg::Interface::Storable); +# Needed by the deprecated key, which is a correct use. +no if $Dpkg::Version::VERSION ge '1.02', + warnings => qw(Dpkg::Version::semantic_change::overload::bool); + my %blacklist = ( __bss_end__ => 1, # arm __bss_end => 1, # arm @@ -206,7 +210,7 @@ sub parse { my ($self, $fh, $file, %opts) = @_; my $state = $opts{state} //= {}; - if (defined $state) { + if (exists $state->{seen}) { return if exists $state->{seen}{$file}; # Avoid include loops } else { $self->{file} = $file; @@ -226,7 +230,7 @@ sub parse { error(g_('symbol information must be preceded by a header (file %s, line %s)'), $file, $.); } # Symbol specification - my $deprecated = ($1) ? $1 : 0; + my $deprecated = ($1) ? Dpkg::Version->new($1) : 0; my $sym = _new_symbol($state->{base_symbol}, deprecated => $deprecated); if ($self->create_symbol($2, base => $sym)) { $self->add_symbol($sym, ${$state->{obj_ref}}); diff --git a/scripts/Dpkg/Source/BinaryFiles.pm b/scripts/Dpkg/Source/BinaryFiles.pm new file mode 100644 index 000000000..48c84c8fc --- /dev/null +++ b/scripts/Dpkg/Source/BinaryFiles.pm @@ -0,0 +1,161 @@ +# Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2015 Guillem Jover <guillem@debian.org> +# +# 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Source::BinaryFiles; + +use strict; +use warnings; + +our $VERSION = '0.01'; + +use Cwd; +use File::Path qw(make_path); +use File::Spec; +use File::Find; + +use Dpkg::ErrorHandling; +use Dpkg::Gettext; +use Dpkg::Source::Functions qw(is_binary); + +sub new { + my ($this, $dir) = @_; + my $class = ref($this) || $this; + + my $self = { + dir => $dir, + allowed_binaries => {}, + seen_binaries => {}, + include_binaries_path => + File::Spec->catfile($dir, 'debian', 'source', 'include-binaries'), + }; + bless $self, $class; + $self->load_allowed_binaries(); + return $self; +} + +sub new_binary_found { + my ($self, $path) = @_; + + $self->{seen_binaries}{$path} = 1; +} + +sub load_allowed_binaries { + my $self = shift; + my $incbin_file = $self->{include_binaries_path}; + + if (-f $incbin_file) { + open my $incbin_fh, '<', $incbin_file + or syserr(g_('cannot read %s'), $incbin_file); + while (<$incbin_fh>) { + chomp; + s/^\s*//; + s/\s*$//; + next if /^#/ or length == 0; + $self->{allowed_binaries}{$_} = 1; + } + close $incbin_fh; + } +} + +sub binary_is_allowed { + my ($self, $path) = @_; + + return 1 if exists $self->{allowed_binaries}{$path}; + return 0; +} + +sub update_debian_source_include_binaries { + my $self = shift; + + my @unknown_binaries = $self->get_unknown_binaries(); + return unless scalar @unknown_binaries; + + my $incbin_file = $self->{include_binaries_path}; + make_path(File::Spec->catdir($self->{dir}, 'debian', 'source')); + open my $incbin_fh, '>>', $incbin_file + or syserr(g_('cannot write %s'), $incbin_file); + foreach my $binary (@unknown_binaries) { + print { $incbin_fh } "$binary\n"; + info(g_('adding %s to %s'), $binary, 'debian/source/include-binaries'); + $self->{allowed_binaries}{$binary} = 1; + } + close $incbin_fh; +} + +sub get_unknown_binaries { + my $self = shift; + + return grep { not $self->binary_is_allowed($_) } $self->get_seen_binaries(); +} + +sub get_seen_binaries { + my $self = shift; + my @seen = sort keys %{$self->{seen_binaries}}; + + return @seen; +} + +sub detect_binary_files { + my ($self, %opts) = @_; + + my $unwanted_binaries = 0; + my $check_binary = sub { + if (-f and is_binary($_)) { + my $fn = File::Spec->abs2rel($_, $self->{dir}); + $self->new_binary_found($fn); + unless ($opts{include_binaries} or $self->binary_is_allowed($fn)) { + errormsg(g_('unwanted binary file: %s'), $fn); + $unwanted_binaries++; + } + } + }; + my $exclude_glob = '{' . + join(',', map { s/,/\\,/rg } @{$opts{exclude_globs}}) . + '}'; + my $filter_ignore = sub { + # Filter out files that are not going to be included in the debian + # tarball due to ignores. + my %exclude; + my $reldir = File::Spec->abs2rel($File::Find::dir, $self->{dir}); + my $cwd = getcwd(); + # Apply the pattern both from the top dir and from the inspected dir + chdir $self->{dir} + or syserr(g_("unable to chdir to '%s'"), $self->{dir}); + $exclude{$_} = 1 foreach glob $exclude_glob; + chdir $cwd or syserr(g_("unable to chdir to '%s'"), $cwd); + chdir $File::Find::dir + or syserr(g_("unable to chdir to '%s'"), $File::Find::dir); + $exclude{$_} = 1 foreach glob $exclude_glob; + chdir $cwd or syserr(g_("unable to chdir to '%s'"), $cwd); + my @result; + foreach my $fn (@_) { + unless (exists $exclude{$fn} or exists $exclude{"$reldir/$fn"}) { + push @result, $fn; + } + } + return @result; + }; + find({ wanted => $check_binary, preprocess => $filter_ignore, + no_chdir => 1 }, File::Spec->catdir($self->{dir}, 'debian')); + error(P_('detected %d unwanted binary file (add it in ' . + 'debian/source/include-binaries to allow its inclusion).', + 'detected %d unwanted binary files (add them in ' . + 'debian/source/include-binaries to allow their inclusion).', + $unwanted_binaries), $unwanted_binaries) + if $unwanted_binaries; +} + +1; diff --git a/scripts/Dpkg/Source/Format.pm b/scripts/Dpkg/Source/Format.pm new file mode 100644 index 000000000..41596a233 --- /dev/null +++ b/scripts/Dpkg/Source/Format.pm @@ -0,0 +1,191 @@ +# Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org> +# Copyright © 2008-2018 Guillem Jover <guillem@debian.org> +# +# 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, see <https://www.gnu.org/licenses/>. + +package Dpkg::Source::Format; + +=encoding utf8 + +=head1 NAME + +Dpkg::Source::Format - manipulate debian/source/format files + +=head1 DESCRIPTION + +This module provides a class that can manipulate Debian source +package F<debian/source/format> files. + +=cut + +use strict; +use warnings; + +our $VERSION = '1.00'; + +use Dpkg::Gettext; +use Dpkg::ErrorHandling; + +use parent qw(Dpkg::Interface::Storable); + +=head1 METHODS + +=over 4 + +=item $f = Dpkg::Source::Format->new(%opts) + +Creates a new object corresponding to a source package's +F<debian/source/format> file. When the key B<filename> is set, it will +be used to parse and set the format. Otherwise if the B<format> key is +set it will be validated and used to set the format. + +=cut + +sub new { + my ($this, %opts) = @_; + my $class = ref($this) || $this; + my $self = { + filename => undef, + major => undef, + minor => undef, + variant => undef, + }; + bless $self, $class; + + if (exists $opts{filename}) { + $self->load($opts{filename}, compression => 0); + } elsif ($opts{format}) { + $self->set($opts{format}); + } + return $self; +} + +=item $f->set_from_parts($major[, $minor[, $variant]]) + +Sets the source format from its parts. The $major part is mandatory. +The $minor and $variant parts are optional. + +B<Notice>: This function performs no validation. + +=cut + +sub set_from_parts { + my ($self, $major, $minor, $variant) = @_; + + $self->{major} = $major; + $self->{minor} = $minor // 0; + $self->{variant} = $variant; +} + +=item ($major, $minor, $variant) = $f->set($format) + +Sets (and validates) the source $format specified. Will return the parsed +format parts as a list, the optional $minor and $variant parts might be +undef. + +=cut + +sub set { + my ($self, $format) = @_; + + if ($format =~ /^(\d+)(?:\.(\d+))?(?:\s+\(([a-z0-9]+)\))?$/) { + my ($major, $minor, $variant) = ($1, $2, $3); + + $self->set_from_parts($major, $minor, $variant); + + return ($major, $minor, $variant); + } else { + error(g_("source package format '%s' is invalid"), $format); + } +} + +=item ($major, $minor, $variant) = $f->get() + +=item $format = $f->get() + +Gets the source format, either as properly formatted scalar, or as a list +of its parts, where the optional $minor and $variant parts might be undef. + +=cut + +sub get { + my $self = shift; + + if (wantarray) { + return ($self->{major}, $self->{minor}, $self->{variant}); + } else { + my $format = "$self->{major}.$self->{minor}"; + $format .= " ($self->{variant})" if defined $self->{variant}; + + return $format; + } +} + +=item $count = $f->parse($fh, $desc) + +Parse the source format string from $fh, with filehandle description $desc. + +=cut + +sub parse { + my ($self, $fh, $desc) = @_; + + my $format = <$fh>; + chomp $format if defined $format; + error(g_('%s is empty'), $desc) + unless defined $format and length $format; + + $self->set($format); + + return 1; +} + +=item $count = $f->load($filename) + +Parse $filename contents for a source package format string. + +=item $str = $f->output([$fh]) + +=item "$f" + +Returns a string representing the source package format version. +If $fh is set, it prints the string to the filehandle. + +=cut + +sub output { + my ($self, $fh) = @_; + + my $str = $self->get(); + + print { $fh } "$str\n" if defined $fh; + + return $str; +} + +=item $f->save($filename) + +Save the source package format into the given $filename. + +=back + +=head1 CHANGES + +=head2 Version 1.00 (dpkg 1.19.3) + +Mark the module as public. + +=cut + +1; diff --git a/scripts/Dpkg/Source/Functions.pm b/scripts/Dpkg/Source/Functions.pm index 0a940463e..3435f6c5a 100644 --- a/scripts/Dpkg/Source/Functions.pm +++ b/scripts/Dpkg/Source/Functions.pm @@ -22,6 +22,7 @@ our $VERSION = '0.01'; our @EXPORT_OK = qw( erasedir fixperms + chmod_if_needed fs_time is_binary ); @@ -70,6 +71,18 @@ sub fixperms { subprocerr("chmod -R -- $modes_set $dir") if $?; } +# Only change the pathname permissions if they differ from the desired. +# +# To be able to build a source tree, a user needs write permissions on it, +# but not necessarily ownership of those files. +sub chmod_if_needed { + my ($newperms, $pathname) = @_; + my $oldperms = (stat $pathname)[2] & 07777; + + return 1 if $oldperms == $newperms; + return chmod $newperms, $pathname; +} + # Touch the file and read the resulting mtime. # # If the file doesn't exist, create it, read the mtime and unlink it. @@ -97,30 +110,15 @@ sub fs_time($) { sub is_binary($) { my $file = shift; - # TODO: might want to reimplement what diff does, aka checking if the - # file contains \0 in the first 4Kb of data + # Perform the same check as diff(1), look for a NUL character in the first + # 4 KiB of the file. + open my $fh, '<', $file + or syserr(g_('cannot open file %s for binary detection'), $file); + read $fh, my $buf, 4096, 0; + my $res = index $buf, "\0"; + close $fh; - # Use diff to check if it's a binary file - my $diffgen; - my $diff_pid = spawn( - exec => [ 'diff', '-u', '--', '/dev/null', $file ], - env => { LC_ALL => 'C', LANG => 'C', TZ => 'UTC0' }, - to_pipe => \$diffgen, - ); - my $result = 0; - local $_; - while (<$diffgen>) { - if (m/^(?:binary|[^-+\@ ].*\bdiffer\b)/i) { - $result = 1; - last; - } elsif (m/^[-+\@ ]/) { - $result = 0; - last; - } - } - close($diffgen) or syserr('close on diff pipe'); - wait_child($diff_pid, nocheck => 1, cmdline => "diff -u -- /dev/null $file"); - return $result; + return $res >= 0; } 1; diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index f7851d203..337000cb8 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -1,5 +1,5 @@ # Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org> -# Copyright © 2008-2015 Guillem Jover <guillem@debian.org> +# Copyright © 2008-2019 Guillem Jover <guillem@debian.org> # # 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 @@ -24,7 +24,7 @@ Dpkg::Source::Package - manipulate Debian source packages =head1 DESCRIPTION -This module provides an object that can manipulate Debian source +This module provides a class that can manipulate Debian source packages. While it supports both the extraction and the creation of source packages, the only API that is officially supported is the one that supports the extraction of the source package. @@ -34,7 +34,7 @@ is the one that supports the extraction of the source package. use strict; use warnings; -our $VERSION = '1.02'; +our $VERSION = '2.00'; our @EXPORT_OK = qw( get_default_diff_ignore_regex set_default_diff_ignore_regex @@ -44,6 +44,8 @@ our @EXPORT_OK = qw( use Exporter qw(import); use POSIX qw(:errno_h :sys_wait_h); use Carp; +use File::Temp; +use File::Copy qw(cp); use File::Basename; use Dpkg::Gettext; @@ -52,10 +54,11 @@ use Dpkg::Control; use Dpkg::Checksums; use Dpkg::Version; use Dpkg::Compression; -use Dpkg::Exit qw(run_exit_handlers); use Dpkg::Path qw(check_files_are_the_same find_command); use Dpkg::IPC; use Dpkg::Vendor qw(run_vendor_hook); +use Dpkg::Source::Format; +use Dpkg::OpenPGP; my $diff_ignore_default_regex = ' # Ignore general backup files @@ -77,14 +80,8 @@ my $diff_ignore_default_regex = ' $diff_ignore_default_regex =~ s/^#.*$//mg; $diff_ignore_default_regex =~ s/\n//sg; -# Public variables -# XXX: Backwards compatibility, stop exporting on VERSION 2.00. -## no critic (Variables::ProhibitPackageVars) -our $diff_ignore_default_regexp; -*diff_ignore_default_regexp = \$diff_ignore_default_regex; - no warnings 'qw'; ## no critic (TestingAndDebugging::ProhibitNoWarnings) -our @tar_ignore_default_pattern = qw( +my @tar_ignore_default_pattern = qw( *.a *.la *.o @@ -166,12 +163,15 @@ sub get_default_tar_ignore_pattern { =over 4 -=item $p = Dpkg::Source::Package->new(filename => $dscfile, options => {}) +=item $p = Dpkg::Source::Package->new(%opts, options => {}) -Creates a new object corresponding to the source package described -by the file $dscfile. +Creates a new object corresponding to a source package. When the key +B<filename> is set to a F<.dsc> file, it will be used to initialize the +source package with its description. Otherwise if the B<format> key is +set to a valid value, the object will be initialized for that format +(since dpkg 1.19.3). -The options hash supports the following options: +The B<options> key is a hash ref which supports the following options: =over 8 @@ -204,12 +204,13 @@ source package after its extraction. =cut -# Object methods +# Class methods sub new { my ($this, %args) = @_; my $class = ref($this) || $this; my $self = { fields => Dpkg::Control->new(type => CTRL_PKG_SRC), + format => Dpkg::Source::Format->new(), options => {}, checksums => Dpkg::Checksums->new(), }; @@ -220,6 +221,10 @@ sub new { if (exists $args{filename}) { $self->initialize($args{filename}); $self->init_options(); + } elsif ($args{format}) { + $self->{fields}{Format} = $args{format}; + $self->upgrade_object_type(0); + $self->init_options(); } return $self; } @@ -262,9 +267,8 @@ sub initialize { $self->{filename} = $fn; # Read the fields - my $fields = Dpkg::Control->new(type => CTRL_PKG_SRC); + my $fields = $self->{fields}; $fields->load($filename); - $self->{fields} = $fields; $self->{is_signed} = $fields->get_option('is_pgp_signed'); foreach my $f (qw(Source Version Files)) { @@ -281,41 +285,28 @@ sub initialize { sub upgrade_object_type { my ($self, $update_format) = @_; $update_format //= 1; - $self->{fields}{'Format'} //= '1.0'; - my $format = $self->{fields}{'Format'}; - if ($format =~ /^([\d\.]+)(?:\s+\((.*)\))?$/) { - my ($version, $variant) = ($1, $2); + my $format = $self->{fields}{'Format'} // '1.0'; + my ($major, $minor, $variant) = $self->{format}->set($format); - if (defined $variant and $variant ne lc $variant) { - error(g_("source package format '%s' is not supported: %s"), - $format, g_('format variant must be in lowercase')); - } - - my $major = $version =~ s/\.[\d\.]+$//r; - my $minor; - - my $module = "Dpkg::Source::Package::V$major"; - $module .= '::' . ucfirst $variant if defined $variant; - eval qq{ - pop \@INC if \$INC[-1] eq '.'; - require $module; - \$minor = \$${module}::CURRENT_MINOR_VERSION; - }; - $minor //= 0; - if ($update_format) { - $self->{fields}{'Format'} = "$major.$minor"; - $self->{fields}{'Format'} .= " ($variant)" if defined $variant; - } - if ($@) { - error(g_("source package format '%s' is not supported: %s"), - $format, $@); - } - $module->prerequisites() if $module->can('prerequisites'); - bless $self, $module; - } else { - error(g_("invalid Format field '%s'"), $format); + my $module = "Dpkg::Source::Package::V$major"; + $module .= '::' . ucfirst $variant if defined $variant; + eval qq{ + pop \@INC if \$INC[-1] eq '.'; + require $module; + \$minor = \$${module}::CURRENT_MINOR_VERSION; + }; + if ($@) { + error(g_("source package format '%s' is not supported: %s"), + $format, $@); + } + if ($update_format) { + $self->{format}->set_from_parts($major, $minor, $variant); + $self->{fields}{'Format'} = $self->{format}->get(); } + + $module->prerequisites() if $module->can('prerequisites'); + bless $self, $module; } =item $p->get_filename() @@ -406,6 +397,33 @@ sub find_original_tarballs { return @tar; } +=item $p->check_original_tarball_signature($dir, @asc) + +Verify the original upstream tarball signatures @asc using the upstream +public keys. It requires the origin upstream tarballs, their signatures +and the upstream signing key, as found in an unpacked source tree $dir. +If any inconsistency is discovered, it immediately errors out. + +=cut + +sub check_original_tarball_signature { + my ($self, $dir, @asc) = @_; + + my $upstream_key = "$dir/debian/upstream/signing-key.asc"; + if (not -e $upstream_key) { + warning(g_('upstream tarball signatures but no upstream signing key')); + return; + } + + my $keyring = File::Temp->new(UNLINK => 1, SUFFIX => '.gpg'); + Dpkg::OpenPGP::import_key($upstream_key, keyring => $keyring); + foreach my $asc (@asc) { + Dpkg::OpenPGP::verify_signature($asc, + datafile => $asc =~ s/\.asc$//r, + keyrings => [ $keyring ]); + } +} + =item $bool = $p->is_signed() Returns 1 if the DSC files contains an embedded OpenPGP signature. @@ -431,52 +449,18 @@ then any problem will result in a fatal error. sub check_signature { my $self = shift; my $dsc = $self->get_filename(); - my @exec; - - if (find_command('gpgv2')) { - push @exec, 'gpgv2'; - } elsif (find_command('gpgv')) { - push @exec, 'gpgv'; - } elsif (find_command('gpg2')) { - push @exec, 'gpg2', '--no-default-keyring', '-q', '--verify'; - } elsif (find_command('gpg')) { - push @exec, 'gpg', '--no-default-keyring', '-q', '--verify'; + my @keyrings; + + if (length $ENV{HOME} and -r "$ENV{HOME}/.gnupg/trustedkeys.gpg") { + push @keyrings, "$ENV{HOME}/.gnupg/trustedkeys.gpg"; } - if (scalar(@exec)) { - if (length $ENV{HOME} and -r "$ENV{HOME}/.gnupg/trustedkeys.gpg") { - push @exec, '--keyring', "$ENV{HOME}/.gnupg/trustedkeys.gpg"; - } - foreach my $vendor_keyring (run_vendor_hook('package-keyrings')) { - if (-r $vendor_keyring) { - push @exec, '--keyring', $vendor_keyring; - } - } - push @exec, $dsc; - - my ($stdout, $stderr); - spawn(exec => \@exec, wait_child => 1, nocheck => 1, - to_string => \$stdout, error_to_string => \$stderr, - timeout => 10); - if (WIFEXITED($?)) { - my $gpg_status = WEXITSTATUS($?); - print { *STDERR } "$stdout$stderr" if $gpg_status; - if ($gpg_status == 1 or ($gpg_status && - $self->{options}{require_valid_signature})) - { - error(g_('failed to verify signature on %s'), $dsc); - } elsif ($gpg_status) { - warning(g_('failed to verify signature on %s'), $dsc); - } - } else { - subprocerr("@exec"); - } - } else { - if ($self->{options}{require_valid_signature}) { - error(g_('cannot verify signature on %s since GnuPG is not installed'), $dsc); - } else { - warning(g_('cannot verify signature on %s since GnuPG is not installed'), $dsc); + foreach my $vendor_keyring (run_vendor_hook('package-keyrings')) { + if (-r $vendor_keyring) { + push @keyrings, $vendor_keyring; } } + + Dpkg::OpenPGP::verify_signature($dsc, keyrings => \@keyrings); } sub describe_cmdline_options { @@ -528,31 +512,25 @@ sub extract { my $src = File::Spec->catfile($self->{basedir}, $orig); my $dst = File::Spec->catfile($destdir, $orig); if (not check_files_are_the_same($src, $dst, 1)) { - system('cp', '--', $src, $dst); - subprocerr("cp $src to $dst") if $?; + cp($src, $dst) + or syserror(g_('cannot copy %s to %s'), $src, $dst); } } } # Try extract - eval { $self->do_extract($newdirectory) }; - if ($@) { - run_exit_handlers(); - die $@; - } + $self->do_extract($newdirectory); # Store format if non-standard so that next build keeps the same format - if ($self->{fields}{'Format'} ne '1.0' and + if ($self->{fields}{'Format'} and + $self->{fields}{'Format'} ne '1.0' and not $self->{options}{skip_debianization}) { my $srcdir = File::Spec->catdir($newdirectory, 'debian', 'source'); my $format_file = File::Spec->catfile($srcdir, 'format'); unless (-e $format_file) { mkdir($srcdir) unless -e $srcdir; - open(my $format_fh, '>', $format_file) - or syserr(g_('cannot write %s'), $format_file); - print { $format_fh } $self->{fields}{'Format'} . "\n"; - close($format_fh); + $self->{format}->save($format_file); } } @@ -586,11 +564,8 @@ sub before_build { sub build { my $self = shift; - eval { $self->do_build(@_) }; - if ($@) { - run_exit_handlers(); - die $@; - } + + $self->do_build(@_); } sub after_build { @@ -620,11 +595,8 @@ sub add_file { sub commit { my $self = shift; - eval { $self->do_commit(@_) }; - if ($@) { - run_exit_handlers(); - die $@; - } + + $self->do_commit(@_); } sub do_commit { @@ -671,6 +643,18 @@ sub write_dsc { =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +New method: check_original_tarball_signature(). + +Remove variable: $diff_ignore_default_regexp. + +Hide variable: @tar_ignore_default_pattern. + +=head2 Version 1.03 (dpkg 1.19.3) + +New option: format in new(). + =head2 Version 1.02 (dpkg 1.18.7) New option: require_strong_checksums in check_checksums(). diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index 001d9ecd3..d91cea03b 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -267,7 +267,7 @@ sub do_build { 'argument (with v1.0 source package)')); } - $sourcestyle =~ y/X/A/; + $sourcestyle =~ y/X/a/; unless ($sourcestyle =~ m/[akpursnAKPUR]/) { usageerr(g_('source handling style -s%s not allowed with -b'), $sourcestyle); @@ -409,11 +409,18 @@ sub do_build { $sourcepackage, $tarname); } - $self->add_file($tarname) if $tarname; - if ($tarname and -e "$tarname.sig" and not -e "$tarname.asc") { - openpgp_sig_to_asc("$tarname.sig", "$tarname.asc"); + if ($tarname) { + $self->add_file($tarname); + if (-e "$tarname.sig" and not -e "$tarname.asc") { + openpgp_sig_to_asc("$tarname.sig", "$tarname.asc"); + } + } + if ($tarsign and -e $tarsign) { + info(g_('building %s using existing %s'), $sourcepackage, $tarsign); + $self->add_file($tarsign); + + $self->check_original_tarball_signature($tarsign); } - $self->add_file($tarsign) if $tarsign and -e $tarsign; if ($sourcestyle =~ m/[kpKP]/) { if (stat($origdir)) { diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index 818e32ddc..d84fce2dd 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -37,8 +37,9 @@ use Dpkg::Path qw(find_command); use Dpkg::Compression; use Dpkg::Source::Archive; use Dpkg::Source::Patch; +use Dpkg::Source::BinaryFiles; use Dpkg::Exit qw(push_exit_handler pop_exit_handler); -use Dpkg::Source::Functions qw(erasedir is_binary fs_time); +use Dpkg::Source::Functions qw(erasedir chmod_if_needed fs_time); use Dpkg::Vendor qw(run_vendor_hook); use Dpkg::Control; use Dpkg::Changelog::Parse; @@ -399,7 +400,8 @@ sub _generate_patch { # Identify original tarballs my ($tarfile, %addonfile); my $comp_ext_regex = compression_get_file_extension_regex(); - my @origtarballs; + my @origtarfiles; + my @origtarsigns; foreach my $file (sort $self->find_original_tarballs()) { if ($file =~ /\.orig\.tar\.$comp_ext_regex$/) { if (defined($tarfile)) { @@ -407,20 +409,23 @@ sub _generate_patch { 'one is allowed'), $tarfile, $file); } $tarfile = $file; - push @origtarballs, $file; - $self->add_file($file); - if (-e "$file.sig" and not -e "$file.asc") { - openpgp_sig_to_asc("$file.sig", "$file.asc"); - } - $self->add_file("$file.asc") if -e "$file.asc"; } elsif ($file =~ /\.orig-([[:alnum:]-]+)\.tar\.$comp_ext_regex$/) { $addonfile{$1} = $file; - push @origtarballs, $file; - $self->add_file($file); - if (-e "$file.sig" and not -e "$file.asc") { - openpgp_sig_to_asc("$file.sig", "$file.asc"); - } - $self->add_file("$file.asc") if -e "$file.asc"; + } else { + next; + } + + push @origtarfiles, $file; + $self->add_file($file); + + # Check for an upstream signature. + if (-e "$file.sig" and not -e "$file.asc") { + openpgp_sig_to_asc("$file.sig", "$file.asc"); + } + if (-e "$file.asc") { + push @origtarfiles, "$file.asc"; + push @origtarsigns, "$file.asc"; + $self->add_file("$file.asc") } } @@ -428,8 +433,12 @@ sub _generate_patch { $self->_upstream_tarball_template()) unless $tarfile; if ($opts{usage} eq 'build') { - info(g_('building %s using existing %s'), - $self->{fields}{'Source'}, "@origtarballs"); + foreach my $origtarfile (@origtarfiles) { + info(g_('building %s using existing %s'), + $self->{fields}{'Source'}, $origtarfile); + } + + $self->check_original_tarball_signature(@origtarsigns); } # Unpack a second copy for comparison @@ -509,50 +518,12 @@ sub do_build { my $basenamerev = $self->get_basename(1); # Check if the debian directory contains unwanted binary files - my $binaryfiles = Dpkg::Source::Package::V2::BinaryFiles->new($dir); - my $unwanted_binaries = 0; - my $check_binary = sub { - if (-f and is_binary($_)) { - my $fn = File::Spec->abs2rel($_, $dir); - $binaryfiles->new_binary_found($fn); - unless ($include_binaries or $binaryfiles->binary_is_allowed($fn)) { - errormsg(g_('unwanted binary file: %s'), $fn); - $unwanted_binaries++; - } - } - }; - my $tar_ignore_glob = '{' . join(',', - map { s/,/\\,/rg } @{$self->{options}{tar_ignore}}) . '}'; - my $filter_ignore = sub { - # Filter out files that are not going to be included in the debian - # tarball due to ignores. - my %exclude; - my $reldir = File::Spec->abs2rel($File::Find::dir, $dir); - my $cwd = getcwd(); - # Apply the pattern both from the top dir and from the inspected dir - chdir $dir or syserr(g_("unable to chdir to '%s'"), $dir); - $exclude{$_} = 1 foreach glob($tar_ignore_glob); - chdir $cwd or syserr(g_("unable to chdir to '%s'"), $cwd); - chdir($File::Find::dir) - or syserr(g_("unable to chdir to '%s'"), $File::Find::dir); - $exclude{$_} = 1 foreach glob($tar_ignore_glob); - chdir $cwd or syserr(g_("unable to chdir to '%s'"), $cwd); - my @result; - foreach my $fn (@_) { - unless (exists $exclude{$fn} or exists $exclude{"$reldir/$fn"}) { - push @result, $fn; - } - } - return @result; - }; - find({ wanted => $check_binary, preprocess => $filter_ignore, - no_chdir => 1 }, File::Spec->catdir($dir, 'debian')); - error(P_('detected %d unwanted binary file (add it in ' . - 'debian/source/include-binaries to allow its inclusion).', - 'detected %d unwanted binary files (add them in ' . - 'debian/source/include-binaries to allow their inclusion).', - $unwanted_binaries), $unwanted_binaries) - if $unwanted_binaries; + my $binaryfiles = Dpkg::Source::BinaryFiles->new($dir); + + $binaryfiles->detect_binary_files( + exclude_globs => $self->{options}{tar_ignore}, + include_binaries => $include_binaries, + ); # Handle modified binary files detected by the auto-patch generation my $handle_binary = sub { @@ -616,17 +587,25 @@ sub do_build { sub _get_patch_header { my ($self, $dir) = @_; + my $ph = File::Spec->catfile($dir, 'debian', 'source', 'local-patch-header'); unless (-f $ph) { $ph = File::Spec->catfile($dir, 'debian', 'source', 'patch-header'); } - my $text; if (-f $ph) { - open(my $ph_fh, '<', $ph) or syserr(g_('cannot read %s'), $ph); - $text = file_slurp($ph_fh); - close($ph_fh); - return $text; + return file_slurp($ph); } + + if ($self->{options}->{single_debian_patch}) { + return <<'AUTOGEN_HEADER'; +This is an autogenerated patch header for a single-debian-patch file. The +delta against upstream is either kept as a single patch, or maintained +in some VCS, and exported as a single patch instead of more manageable +atomic patches. + +AUTOGEN_HEADER + } + my $ch_info = changelog_parse(offset => 0, count => 1, file => File::Spec->catfile($dir, 'debian', 'changelog')); return '' if not defined $ch_info; @@ -642,6 +621,7 @@ it.\n"; $header->{'Author'} = $ch_info->{'Maintainer'}; my $yyyy_mm_dd = POSIX::strftime('%Y-%m-%d', gmtime); + my $text; $text = "$header"; run_vendor_hook('extend-patch-header', \$text, $ch_info); $text .= "\n--- @@ -665,7 +645,7 @@ sub register_patch { if (-s $patch_file) { copy($patch_file, $patch) or syserr(g_('failed to copy %s to %s'), $patch_file, $patch); - chmod(0666 & ~ umask(), $patch) + chmod_if_needed(0666 & ~ umask(), $patch) or syserr(g_("unable to change permission of '%s'"), $patch); my $applied = File::Spec->catfile($dir, 'debian', 'patches', '.dpkg-source-applied'); open(my $applied_fh, '>>', $applied) @@ -706,7 +686,7 @@ sub do_commit { error(g_("patch file '%s' doesn't exist"), $tmpdiff) if not -e $tmpdiff; } - my $binaryfiles = Dpkg::Source::Package::V2::BinaryFiles->new($dir); + my $binaryfiles = Dpkg::Source::BinaryFiles->new($dir); my $handle_binary = sub { my ($self, $old, $new, %opts) = @_; my $fn = File::Spec->abs2rel($new, $dir); @@ -749,86 +729,4 @@ sub do_commit { info(g_('local changes have been recorded in a new patch: %s'), $patch); } -package Dpkg::Source::Package::V2::BinaryFiles; - -use Dpkg::ErrorHandling; -use Dpkg::Gettext; - -use File::Path qw(make_path); -use File::Spec; - -sub new { - my ($this, $dir) = @_; - my $class = ref($this) || $this; - - my $self = { - dir => $dir, - allowed_binaries => {}, - seen_binaries => {}, - include_binaries_path => - File::Spec->catfile($dir, 'debian', 'source', 'include-binaries'), - }; - bless $self, $class; - $self->load_allowed_binaries(); - return $self; -} - -sub new_binary_found { - my ($self, $path) = @_; - - $self->{seen_binaries}{$path} = 1; -} - -sub load_allowed_binaries { - my $self = shift; - my $incbin_file = $self->{include_binaries_path}; - if (-f $incbin_file) { - open(my $incbin_fh, '<', $incbin_file) - or syserr(g_('cannot read %s'), $incbin_file); - while (<$incbin_fh>) { - chomp; - s/^\s*//; - s/\s*$//; - next if /^#/ or length == 0; - $self->{allowed_binaries}{$_} = 1; - } - close($incbin_fh); - } -} - -sub binary_is_allowed { - my ($self, $path) = @_; - return 1 if exists $self->{allowed_binaries}{$path}; - return 0; -} - -sub update_debian_source_include_binaries { - my $self = shift; - - my @unknown_binaries = $self->get_unknown_binaries(); - return unless scalar(@unknown_binaries); - - my $incbin_file = $self->{include_binaries_path}; - make_path(File::Spec->catdir($self->{dir}, 'debian', 'source')); - open(my $incbin_fh, '>>', $incbin_file) - or syserr(g_('cannot write %s'), $incbin_file); - foreach my $binary (@unknown_binaries) { - print { $incbin_fh } "$binary\n"; - info(g_('adding %s to %s'), $binary, 'debian/source/include-binaries'); - $self->{allowed_binaries}{$binary} = 1; - } - close($incbin_fh); -} - -sub get_unknown_binaries { - my $self = shift; - return grep { not $self->binary_is_allowed($_) } $self->get_seen_binaries(); -} - -sub get_seen_binaries { - my $self = shift; - my @seen = sort keys %{$self->{seen_binaries}}; - return @seen; -} - 1; diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm index f0752c0b1..13d49c742 100644 --- a/scripts/Dpkg/Source/Package/V3/Bzr.pm +++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -176,7 +176,7 @@ sub do_extract { my @files = $self->get_files(); if (@files > 1) { - error(g_('format v3.0 uses only one source file')); + error(g_('format v3.0 (bzr) uses only one source file')); } my $tarfile = $files[0]; my $comp_ext_regex = compression_get_file_extension_regex(); diff --git a/scripts/Dpkg/Source/Package/V3/Native.pm b/scripts/Dpkg/Source/Package/V3/Native.pm index b53a30f3f..1d0de2b0f 100644 --- a/scripts/Dpkg/Source/Package/V3/Native.pm +++ b/scripts/Dpkg/Source/Package/V3/Native.pm @@ -49,7 +49,7 @@ sub do_extract { my $comp_ext_regex = compression_get_file_extension_regex(); foreach my $file ($self->get_files()) { if ($file =~ /^\Q$basenamerev\E\.tar\.$comp_ext_regex$/) { - error(g_('multiple tarfiles in v1.0 source package')) if $tarfile; + error(g_('multiple tarfiles in native source package')) if $tarfile; $tarfile = $file; } else { error(g_('unrecognized file for a native source package: %s'), $file); diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm index 9718ffa2d..45237d26a 100644 --- a/scripts/Dpkg/Source/Package/V3/Quilt.pm +++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm @@ -28,7 +28,7 @@ use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Version; use Dpkg::Source::Patch; -use Dpkg::Source::Functions qw(erasedir fs_time); +use Dpkg::Source::Functions qw(erasedir chmod_if_needed fs_time); use Dpkg::Source::Quilt; use Dpkg::Exit; @@ -142,6 +142,8 @@ sub apply_patches { return unless scalar($quilt->series()); + info(g_('using patch list from %s'), "debian/patches/$basename"); + if ($opts{usage} eq 'preparation' and $self->{options}{unapply_patches} eq 'auto') { # We're applying the patches in --before-build, remember to unapply @@ -249,7 +251,7 @@ sub register_patch { if (-s $tmpdiff) { copy($tmpdiff, $patch) or syserr(g_('failed to copy %s to %s'), $tmpdiff, $patch); - chmod(0666 & ~ umask(), $patch) + chmod_if_needed(0666 & ~ umask(), $patch) or syserr(g_("unable to change permission of '%s'"), $patch); } elsif (-e $patch) { unlink($patch) or syserr(g_('cannot remove %s'), $patch); diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index e5ad5424b..25d56335d 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -148,7 +148,6 @@ sub add_diff_directory { # TODO: make this function more configurable # - offer to disable some checks my $basedir = $opts{basedirname} || basename($new); - my $inc_removal = $opts{include_removal} // 0; my $diff_ignore; if ($opts{diff_ignore_func}) { $diff_ignore = $opts{diff_ignore_func}; @@ -226,11 +225,13 @@ sub add_diff_directory { return if $files_in_new{$fn}; lstat("$old/$fn") or syserr(g_('cannot stat file %s'), "$old/$fn"); if (-f _) { - if ($inc_removal) { + if (not defined $opts{include_removal}) { + warning(g_('ignoring deletion of file %s'), $fn); + } elsif (not $opts{include_removal}) { + warning(g_('ignoring deletion of file %s, use --include-removal to override'), $fn); + } else { push @diff_files, [$fn, 0, 0, "$old/$fn", '/dev/null', "$basedir.orig/$fn", '/dev/null']; - } else { - warning(g_('ignoring deletion of file %s, use --include-removal to override'), $fn); } } elsif (-d _) { warning(g_('ignoring deletion of directory %s'), $fn); diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm index 55b3fbaf8..78a4fdf9a 100644 --- a/scripts/Dpkg/Source/Quilt.pm +++ b/scripts/Dpkg/Source/Quilt.pm @@ -30,7 +30,7 @@ use File::Basename; use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Source::Patch; -use Dpkg::Source::Functions qw(erasedir fs_time); +use Dpkg::Source::Functions qw(erasedir chmod_if_needed fs_time); use Dpkg::Vendor qw(get_current_vendor); sub new { @@ -374,7 +374,7 @@ sub restore_quilt_backup_files { unless (link($_, $target)) { copy($_, $target) or syserr(g_('failed to copy %s to %s'), $_, $target); - chmod((stat(_))[2], $target) + chmod_if_needed((stat _)[2], $target) or syserr(g_("unable to change permission of '%s'"), $target); } } else { diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm index 1e9f90173..27107fe3d 100644 --- a/scripts/Dpkg/Substvars.pm +++ b/scripts/Dpkg/Substvars.pm @@ -19,7 +19,7 @@ package Dpkg::Substvars; use strict; use warnings; -our $VERSION = '1.06'; +our $VERSION = '2.00'; use Dpkg (); use Dpkg::Arch qw(get_host_arch); @@ -39,8 +39,7 @@ Dpkg::Substvars - handle variable substitution in strings =head1 DESCRIPTION -It provides some an object which is able to substitute variables in -strings. +It provides a class which is able to substitute variables in strings. =cut @@ -169,25 +168,6 @@ sub mark_as_used { $self->{attr}{$key} |= SUBSTVAR_ATTR_USED; } -=item $s->no_warn($key) - -Obsolete function, use mark_as_used() instead. - -=cut - -sub no_warn { - my ($self, $key) = @_; - - warnings::warnif('deprecated', - 'obsolete no_warn() function, use mark_as_used() instead'); - - $self->mark_as_used($key); -} - -=item $s->load($file) - -Add new substitutions read from $file. - =item $s->parse($fh, $desc) Add new substitutions read from the filehandle. $desc is used to identify @@ -217,6 +197,10 @@ sub parse { return $count } +=item $s->load($file) + +Add new substitutions read from $file. + =item $s->set_version_substvars($sourceversion, $binaryversion) Defines ${binary:Version}, ${source:Version} and @@ -342,7 +326,8 @@ sub substvars { g_('obsolete substitution variable ${%s}'), $vn); } } else { - warning($opts{msg_prefix} . g_('unknown substitution variable ${%s}'), + warning($opts{msg_prefix} . + g_('substitution variable ${%s} used, but is not defined'), $vn) unless $opts{no_warn}; $v = $lhs . $rhs; } @@ -366,7 +351,8 @@ sub warn_about_unused { # that they are not required in the current situation # (example: debhelper's misc:Depends in many cases) next if $self->{vars}{$vn} eq ''; - warning($opts{msg_prefix} . g_('unused substitution variable ${%s}'), + warning($opts{msg_prefix} . + g_('substitution variable ${%s} unused, but is defined'), $vn); } } @@ -403,20 +389,15 @@ sub filter { } } -=item $s->save($file) - -Store all substitutions variables except the automatic ones in the -indicated file. - =item "$s" Return a string representation of all substitutions variables except the automatic ones. -=item $str = $s->output($fh) +=item $str = $s->output([$fh]) -Print all substitutions variables except the automatic ones in the -filehandle and return the content written. +Return all substitutions variables except the automatic ones. If $fh +is passed print them into the filehandle. =cut @@ -433,10 +414,19 @@ sub output { return $str; } +=item $s->save($file) + +Store all substitutions variables except the automatic ones in the +indicated file. + =back =head1 CHANGES +=head2 Version 2.00 (dpkg 1.20.0) + +Remove method: $s->no_warn(). + =head2 Version 1.06 (dpkg 1.19.0) New method: $s->set_desc_substvars(). diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index e0fd01113..c3e580da7 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -36,11 +36,11 @@ use parent qw(Dpkg::Vendor::Default); =head1 NAME -Dpkg::Vendor::Debian - Debian vendor object +Dpkg::Vendor::Debian - Debian vendor class =head1 DESCRIPTION -This vendor object customizes the behaviour of dpkg scripts for Debian +This vendor class customizes the behaviour of dpkg scripts for Debian specific behavior and policies. =cut @@ -51,9 +51,6 @@ sub run_hook { if ($hook eq 'package-keyrings') { return ('/usr/share/keyrings/debian-keyring.gpg', '/usr/share/keyrings/debian-maintainers.gpg'); - } elsif ($hook eq 'keyrings') { - warnings::warnif('deprecated', 'deprecated keyrings vendor hook'); - return $self->run_hook('package-keyrings', @params); } elsif ($hook eq 'archive-keyrings') { return ('/usr/share/keyrings/debian-archive-keyring.gpg'); } elsif ($hook eq 'archive-keyrings-historic') { @@ -81,23 +78,13 @@ sub run_hook { $self->_add_build_flags(@params); } elsif ($hook eq 'builtin-system-build-paths') { return qw(/build/); + } elsif ($hook eq 'build-tainted-by') { + return $self->_build_tainted_by(); } else { return $self->SUPER::run_hook($hook, @params); } } -sub _parse_feature_area { - my ($self, $area, $use_feature) = @_; - - require Dpkg::BuildOptions; - - # Adjust features based on user or maintainer's desires. - my $opts = Dpkg::BuildOptions->new(envvar => 'DEB_BUILD_OPTIONS'); - $opts->parse_features($area, $use_feature); - $opts = Dpkg::BuildOptions->new(envvar => 'DEB_BUILD_MAINT_OPTIONS'); - $opts->parse_features($area, $use_feature); -} - sub _add_build_flags { my ($self, $flags) = @_; @@ -112,6 +99,7 @@ sub _add_build_flags { }, reproducible => { timeless => 1, + fixfilepath => 0, fixdebugpath => 1, }, sanitize => { @@ -141,9 +129,15 @@ sub _add_build_flags { ## Setup + require Dpkg::BuildOptions; + # Adjust features based on user or maintainer's desires. + my $opts_build = Dpkg::BuildOptions->new(envvar => 'DEB_BUILD_OPTIONS'); + my $opts_maint = Dpkg::BuildOptions->new(envvar => 'DEB_BUILD_MAINT_OPTIONS'); + foreach my $area (sort keys %use_feature) { - $self->_parse_feature_area($area, $use_feature{$area}); + $opts_build->parse_features($area, $use_feature{$area}); + $opts_maint->parse_features($area, $use_feature{$area}); } require Dpkg::Arch; @@ -156,6 +150,22 @@ sub _add_build_flags { ($abi, $os, $cpu) = ('', '', ''); } + ## Global defaults + + my $default_flags; + if ($opts_build->has('noopt')) { + $default_flags = '-g -O0'; + } else { + $default_flags = '-g -O2'; + } + $flags->append('CFLAGS', $default_flags); + $flags->append('CXXFLAGS', $default_flags); + $flags->append('OBJCFLAGS', $default_flags); + $flags->append('OBJCXXFLAGS', $default_flags); + $flags->append('FFLAGS', $default_flags); + $flags->append('FCFLAGS', $default_flags); + $flags->append('GCJFLAGS', $default_flags); + ## Area: future if ($use_feature{future}{lfs}) { @@ -172,8 +182,21 @@ sub _add_build_flags { # Warnings that detect actual bugs. if ($use_feature{qa}{bug}) { - foreach my $warnflag (qw(array-bounds clobbered volatile-register-var - implicit-function-declaration)) { + # C flags + my @cflags = qw( + implicit-function-declaration + ); + foreach my $warnflag (@cflags) { + $flags->append('CFLAGS', "-Werror=$warnflag"); + } + + # C/C++ flags + my @cfamilyflags = qw( + array-bounds + clobbered + volatile-register-var + ); + foreach my $warnflag (@cfamilyflags) { $flags->append('CFLAGS', "-Werror=$warnflag"); $flags->append('CXXFLAGS', "-Werror=$warnflag"); } @@ -195,16 +218,18 @@ sub _add_build_flags { my $build_path; # Mask features that might have an unsafe usage. - if ($use_feature{reproducible}{fixdebugpath}) { + if ($use_feature{reproducible}{fixfilepath} or + $use_feature{reproducible}{fixdebugpath}) { require Cwd; - $build_path = $ENV{DEB_BUILD_PATH} || Cwd::cwd(); + $build_path = $ENV{DEB_BUILD_PATH} || Cwd::getcwd(); # If we have any unsafe character in the path, disable the flag, # so that we do not need to worry about escaping the characters # on output. if ($build_path =~ m/[^-+:.0-9a-zA-Z~\/_]/) { - $use_feature{fixdebugpath} = 0; + $use_feature{reproducible}{fixfilepath} = 0; + $use_feature{reproducible}{fixdebugpath} = 0; } } @@ -213,9 +238,19 @@ sub _add_build_flags { $flags->append('CPPFLAGS', '-Wdate-time'); } - # Avoid storing the build path in the debug symbols. - if ($use_feature{reproducible}{fixdebugpath}) { - my $map = '-fdebug-prefix-map=' . $build_path . '=.'; + # Avoid storing the build path in the binaries. + if ($use_feature{reproducible}{fixfilepath} or + $use_feature{reproducible}{fixdebugpath}) { + my $map; + + # -ffile-prefix-map is a superset of -fdebug-prefix-map, prefer it + # if both are set. + if ($use_feature{reproducible}{fixfilepath}) { + $map = '-ffile-prefix-map=' . $build_path . '=.'; + } else { + $map = '-fdebug-prefix-map=' . $build_path . '=.'; + } + $flags->append('CFLAGS', $map); $flags->append('CXXFLAGS', $map); $flags->append('OBJCFLAGS', $map); @@ -267,8 +302,24 @@ sub _add_build_flags { # Mask builtin features that are not enabled by default in the compiler. my %builtin_pie_arch = map { $_ => 1 } qw( - amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 - mips mipsel mips64el powerpc ppc64 ppc64el s390x sparc sparc64 + amd64 + arm64 + armel + armhf + hurd-i386 + i386 + kfreebsd-amd64 + kfreebsd-i386 + mips + mipsel + mips64el + powerpc + ppc64 + ppc64el + riscv64 + s390x + sparc + sparc64 ); if (not exists $builtin_pie_arch{$arch}) { $builtin_feature{hardening}{pie} = 0; @@ -295,7 +346,7 @@ sub _add_build_flags { } # Mask features that might be influenced by other flags. - if ($flags->{build_options}->has('noopt')) { + if ($opts_build->has('noopt')) { # glibc 2.16 and later warn when using -O0 and _FORTIFY_SOURCE. $use_feature{hardening}{fortify} = 0; } @@ -400,6 +451,38 @@ sub _add_build_flags { } } +sub _build_tainted_by { + my $self = shift; + my %tainted; + + foreach my $pathname (qw(/bin /sbin /lib /lib32 /libo32 /libx32 /lib64)) { + next unless -l $pathname; + + my $linkname = readlink $pathname; + if ($linkname eq "usr$pathname") { + $tainted{'merged-usr-via-symlinks'} = 1; + last; + } + } + + require File::Find; + my %usr_local_types = ( + configs => [ qw(etc) ], + includes => [ qw(include) ], + programs => [ qw(bin sbin) ], + libraries => [ qw(lib) ], + ); + foreach my $type (keys %usr_local_types) { + File::Find::find({ + wanted => sub { $tainted{"usr-local-has-$type"} = 1 if -f }, + no_chdir => 1, + }, grep { -d } map { "/usr/local/$_" } @{$usr_local_types{$type}}); + } + + my @tainted = sort keys %tainted; + return @tainted; +} + =head1 CHANGES =head2 Version 0.xx diff --git a/scripts/Dpkg/Vendor/Default.pm b/scripts/Dpkg/Vendor/Default.pm index 40815efde..42b0f0405 100644 --- a/scripts/Dpkg/Vendor/Default.pm +++ b/scripts/Dpkg/Vendor/Default.pm @@ -20,7 +20,7 @@ use warnings; our $VERSION = '0.01'; -# If you use this file as template to create a new vendor object, please +# If you use this file as template to create a new vendor class, please # uncomment the following lines #use parent qw(Dpkg::Vendor::Default); @@ -28,12 +28,12 @@ our $VERSION = '0.01'; =head1 NAME -Dpkg::Vendor::Default - default vendor object +Dpkg::Vendor::Default - default vendor class =head1 DESCRIPTION -A vendor object is used to provide vendor specific behaviour -in various places. This is the default object used in case +A vendor class is used to provide vendor specific behaviour +in various places. This is the default class used in case there's none for the current vendor or in case the vendor could not be identified (see Dpkg::Vendor documentation). @@ -140,6 +140,14 @@ field will be created if the current directory is "/build/dpkg-1.18.0". If the list contains "/", the path will always be recorded. If the list is empty, the current path will never be recorded. +=item build-tainted-by () + +The hook is called by dpkg-genbuildinfo to determine if the current system +has been tainted in some way that could affect the resulting build, which +will be recorded in the B<Build-Tainted-By> field (since dpkg 1.19.5). It +takes no parameters, but returns a (possibly empty) list of tainted reason +tags (formed by alphanumeric and dash characters). + =back =cut @@ -149,9 +157,6 @@ sub run_hook { if ($hook eq 'before-source-build') { my $srcpkg = shift @params; - } elsif ($hook eq 'keyrings') { - warnings::warnif('deprecated', 'obsolete keyrings vendor hook'); - return (); } elsif ($hook eq 'package-keyrings') { return (); } elsif ($hook eq 'archive-keyrings') { @@ -172,6 +177,8 @@ sub run_hook { my $flags = shift @params; } elsif ($hook eq 'builtin-system-build-paths') { return (); + } elsif ($hook eq 'build-tainted-by') { + return (); } # Default return value for unknown/unimplemented hooks diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm index eb2dffefe..ddee2a192 100644 --- a/scripts/Dpkg/Vendor/Ubuntu.pm +++ b/scripts/Dpkg/Vendor/Ubuntu.pm @@ -34,11 +34,11 @@ use parent qw(Dpkg::Vendor::Debian); =head1 NAME -Dpkg::Vendor::Ubuntu - Ubuntu vendor object +Dpkg::Vendor::Ubuntu - Ubuntu vendor class =head1 DESCRIPTION -This vendor object customizes the behaviour of dpkg scripts for Ubuntu +This vendor class customizes the behaviour of dpkg scripts for Ubuntu specific behavior and policies. =cut @@ -98,6 +98,9 @@ sub run_hook { } elsif ($hook eq 'update-buildflags') { my $flags = shift @params; + # Run the Debian hook to add hardening flags + $self->SUPER::run_hook($hook, $flags); + require Dpkg::BuildOptions; my $build_opts = Dpkg::BuildOptions->new(); @@ -109,15 +112,14 @@ sub run_hook { if (Dpkg::Arch::debarch_eq($arch, 'ppc64el')) { for my $flag (qw(CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS GCJFLAGS FFLAGS FCFLAGS)) { - $flags->set($flag, '-g -O3', 'vendor'); + my $value = $flags->get($flag); + $value =~ s/-O[0-9]/-O3/; + $flags->set($flag, $value); } } } # Per https://wiki.ubuntu.com/DistCompilerFlags - $flags->set('LDFLAGS', '-Wl,-Bsymbolic-functions', 'vendor'); - - # Run the Debian hook to add hardening flags - $self->SUPER::run_hook($hook, $flags); + $flags->prepend('LDFLAGS', '-Wl,-Bsymbolic-functions'); } else { return $self->SUPER::run_hook($hook, @params); } diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm index 477082b67..51d46c543 100644 --- a/scripts/Dpkg/Version.pm +++ b/scripts/Dpkg/Version.pm @@ -20,8 +20,9 @@ package Dpkg::Version; use strict; use warnings; +use warnings::register qw(semantic_change::overload::bool); -our $VERSION = '1.01'; +our $VERSION = '1.03'; our @EXPORT = qw( version_compare version_compare_relation @@ -55,7 +56,7 @@ use overload '<=>' => \&_comparison, 'cmp' => \&_comparison, '""' => sub { return $_[0]->as_string(); }, - 'bool' => sub { return $_[0]->as_string() if $_[0]->is_valid(); }, + 'bool' => sub { return $_[0]->is_valid(); }, 'fallback' => 1; =encoding utf8 @@ -121,8 +122,20 @@ sub new { =item boolean evaluation When the Dpkg::Version object is used in a boolean evaluation (for example -in "if ($v)" or "$v || 'default'") it returns its string representation -if the version stored is valid ($v->is_valid()) and undef otherwise. +in "if ($v)" or "$v ? \"$v\" : 'default'") it returns true if the version +stored is valid ($v->is_valid()) and false otherwise. + +B<Notice>: Between dpkg 1.15.7.2 and 1.19.1 this overload used to return +$v->as_string() if $v->is_valid(), a breaking change in behavior that caused +"0" versions to be evaluated as false. To catch any possibly intended code +that relied on those semantics, this overload will emit a warning with +category "Dpkg::Version::semantic_change::overload::bool" until dpkg 1.20.x. +Once fixed, or for already valid code the warning can be quiesced with + + no if $Dpkg::Version::VERSION ge '1.02', + warnings => qw(Dpkg::Version::semantic_change::overload::bool); + +added after the C<use Dpkg::Version>. =item $v->is_valid() @@ -455,6 +468,14 @@ sub version_check($) { =head1 CHANGES +=head2 Version 1.03 (dpkg 1.20.0) + +Remove deprecation warning from semantic change in 1.02. + +=head2 Version 1.02 (dpkg 1.19.1) + +Semantic change: bool evaluation semantics restored to their original behavior. + =head2 Version 1.01 (dpkg 1.17.0) New argument: Accept an options argument in $v->as_string(). diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 28bb4a742..ea8aef557 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -79,6 +79,12 @@ nobase_dist_perllib_DATA = \ Dpkg/Control/Tests/Entry.pm \ Dpkg/Control/Types.pm \ Dpkg/Deps.pm \ + Dpkg/Deps/AND.pm \ + Dpkg/Deps/KnownFacts.pm \ + Dpkg/Deps/Multiple.pm \ + Dpkg/Deps/OR.pm \ + Dpkg/Deps/Simple.pm \ + Dpkg/Deps/Union.pm \ Dpkg/Dist/Files.pm \ Dpkg/ErrorHandling.pm \ Dpkg/Exit.pm \ @@ -98,6 +104,8 @@ nobase_dist_perllib_DATA = \ Dpkg/Shlibs/SymbolFile.pm \ Dpkg/Shlibs/Cppfilt.pm \ Dpkg/Source/Archive.pm \ + Dpkg/Source/BinaryFiles.pm \ + Dpkg/Source/Format.pm \ Dpkg/Source/Functions.pm \ Dpkg/Source/Package.pm \ Dpkg/Source/Package/V1.pm \ @@ -212,6 +220,7 @@ test_scripts = \ t/Dpkg_Shlibs_Cppfilt.t \ t/Dpkg_Shlibs.t \ t/Dpkg_BuildFlags.t \ + t/Dpkg_BuildFlags_Ubuntu.t \ t/Dpkg_BuildOptions.t \ t/Dpkg_BuildProfiles.t \ t/Dpkg_Build_Env.t \ @@ -243,6 +252,7 @@ test_scripts = \ t/Dpkg_Source_Functions.t \ t/Dpkg_Source_Patch.t \ t/Dpkg_Source_Quilt.t \ + t/Dpkg_Source_Format.t \ t/Dpkg_Source_Archive.t \ t/Dpkg_Source_Package.t \ t/Dpkg_Dist_Files.t \ @@ -304,6 +314,7 @@ test_data = \ t/Dpkg_Changelog/misplaced-tz \ t/Dpkg_Changelog/regressions \ t/Dpkg_Changelog/shadow \ + t/Dpkg_Changelog/stop-modeline \ t/Dpkg_Changelog/unreleased \ t/Dpkg_Checksums/empty \ t/Dpkg_Checksums/data-1 \ @@ -353,6 +364,8 @@ test_data = \ t/mk/buildflags.mk \ t/mk/buildtools.mk \ t/mk/pkg-info.mk \ + t/mk/vendor-v0.mk \ + t/mk/vendor-v1.mk \ t/mk/vendor.mk \ t/origins/debian \ t/origins/default \ diff --git a/scripts/Test/Dpkg.pm b/scripts/Test/Dpkg.pm index 1b1a5d67e..937f333ba 100644 --- a/scripts/Test/Dpkg.pm +++ b/scripts/Test/Dpkg.pm @@ -20,10 +20,13 @@ use warnings; our $VERSION = '0.00'; our @EXPORT_OK = qw( + all_po_files all_perl_files all_perl_modules + test_get_po_dirs test_get_perl_dirs test_get_data_path + test_get_temp_path test_needs_author test_needs_module test_needs_command @@ -38,34 +41,98 @@ our %EXPORT_TAGS = ( test_needs_srcdir_switch ) ], paths => [ qw( + all_po_files all_perl_files all_perl_modules + test_get_po_dirs test_get_perl_dirs test_get_data_path + test_get_temp_path ) ], ); use Exporter qw(import); use File::Find; +use File::Basename; +use File::Path qw(make_path); use IPC::Cmd qw(can_run); use Test::More; +my $test_mode; + +BEGIN { + $test_mode = $ENV{DPKG_TEST_MODE} // 'dpkg'; +} + +sub _test_get_caller_dir +{ + my (undef, $path, undef) = caller 1; + + $path =~ s{\.t$}{}; + $path =~ s{^\./}{}; + + return $path; +} + sub test_get_data_path { my $path = shift; - my $srcdir = $ENV{srcdir} || '.'; - return "$srcdir/$path"; + if (defined $path) { + if ($test_mode eq 'cpan') { + return $path; + } else { + my $srcdir = $ENV{srcdir} || '.'; + return "$srcdir/$path"; + } + } else { + return _test_get_caller_dir(); + } +} + +sub test_get_temp_path +{ + my $path = shift // _test_get_caller_dir(); + $path = 't.tmp/' . fileparse($path); + + make_path($path); + return $path; +} + +sub test_get_po_dirs +{ + if ($test_mode eq 'cpan') { + return qw(); + } else { + return qw(po scripts/po dselect/po man/po); + } } sub test_get_perl_dirs { - return qw(t src/t lib utils/t scripts dselect); + if ($test_mode eq 'cpan') { + return qw(t lib); + } else { + return qw(t src/t lib utils/t scripts dselect); + } +} + +sub all_po_files +{ + my $filter = shift // qr/\.(?:po|pot)$/; + my @files; + my $scan_po_files = sub { + push @files, $File::Find::name if m/$filter/; + }; + + find($scan_po_files, test_get_po_dirs()); + + return @files; } sub all_perl_files { - my $filter = shift // qr/\.(?:pl|pm|t)$/; + my $filter = shift // qr/\.(?:PL|pl|pm|t)$/; my @files; my $scan_perl_files = sub { push @files, $File::Find::name if m/$filter/; diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index 3a9ba5b3d..2c49738b5 100755 --- a/scripts/dpkg-buildpackage.pl +++ b/scripts/dpkg-buildpackage.pl @@ -63,23 +63,24 @@ sub usage { 'Options: --build=<type>[,...] specify the build <type>: full, source, binary, any, all (default is \'full\'). - -F normal full build (source and binary; default). - -g source and arch-indep build. - -G source and arch-specific build. - -b binary-only, no source files. - -B binary-only, only arch-specific files. - -A binary-only, only arch-indep files. - -S source-only, no binary files. + -F, --build=full normal full build (source and binary; default). + -g, --build=source,all source and arch-indep build. + -G, --build=source,any source and arch-specific build. + -b, --build=binary binary-only, no source files. + -B, --build=any binary-only, only arch-specific files. + -A, --build=all binary-only, only arch-indep files. + -S, --build=source source-only, no binary files. -nc, --no-pre-clean do not pre clean source tree (implies -b). - --pre-clean pre clean source tree (default). - -tc, --post-clean clean source tree when finished. - -D check build dependencies and conflicts (default). - -d do not check build dependencies and conflicts. - --[no-]check-builddeps ditto. + --pre-clean pre clean source tree (default). + --no-post-clean do not post clean source tree (default). + -tc, --post-clean post clean source tree. + -D, --check-builddeps check build dependencies and conflicts (default). + -d, --no-check-builddeps do not check build dependencies and conflicts. --ignore-builtin-builddeps do not check builtin build dependencies. -P, --build-profiles=<profiles> - assume comma-separated build profiles as active. + assume comma-separated build <profiles> as active. + --rules-requires-root assume legacy Rules-Requires-Root field value. -R, --rules-file=<rules> rules file to execute (default is debian/rules). -T, --rules-target=<target> call debian/rules <target>. --as-root ensure -T calls the target with root rights. @@ -100,7 +101,7 @@ sub usage { pass option <opt> to dpkg-genbuildinfo. -p, --sign-command=<command> command to sign .dsc and/or .changes files - (default is gpg2 or gpg). + (default is gpg). -k, --sign-key=<keyid> the key to use for signing. -ap, --sign-pause add pause before starting signature process. -us, --unsigned-source unsigned source package. @@ -146,8 +147,8 @@ my $admindir; my @debian_rules = ('debian/rules'); my @rootcommand = (); my $signcommand; -my $noclean; -my $cleansource; +my $preclean = 1; +my $postclean = 0; my $parallel; my $parallel_force = 0; my $checkbuilddep = 1; @@ -169,6 +170,7 @@ my $host_type = ''; my $target_arch = ''; my $target_type = ''; my @build_profiles = (); +my $rrr_override; my @call_target = (); my $call_target_as_root = 0; my $since; @@ -291,7 +293,9 @@ while (@ARGV) { } elsif (/^-(?:s[nsAkurKUR]|[zZ].*|i.*|I.*)$/) { push @source_opts, $_; # passed to dpkg-source } elsif (/^-tc$/ or /^--post-clean$/) { - $cleansource = 1; + $postclean = 1; + } elsif (/^--no-post-clean$/) { + $postclean = 0; } elsif (/^-t$/ or /^--host-type$/) { $host_type = shift; # Order DOES matter! } elsif (/^-t(.*)$/ or /^--host-type=(.*)$/) { @@ -309,12 +313,14 @@ while (@ARGV) { } elsif (/^(?:--target=|--rules-target=|-T)(.+)$/) { my $arg = $1; push @call_target, split /,/, $arg; + } elsif (/^--rules-requires-root$/) { + $rrr_override = 'binary-targets'; } elsif (/^--as-root$/) { $call_target_as_root = 1; } elsif (/^--pre-clean$/) { - $noclean = 0; + $preclean = 1; } elsif (/^-nc$/ or /^--no-pre-clean$/) { - $noclean = 1; + $preclean = 0; } elsif (/^--build=(.*)$/) { set_build_type_from_options($1, $_); } elsif (/^-b$/) { @@ -342,7 +348,7 @@ while (@ARGV) { } elsif (m/^-[EW]$/) { # Deprecated option warning(g_('-E and -W are deprecated, they are without effect')); - } elsif (/^-R(.*)$/ or /^--rules-target=(.*)$/) { + } elsif (/^-R(.*)$/ or /^--rules-file=(.*)$/) { my $arg = $1; @debian_rules = split ' ', $arg; } else { @@ -350,6 +356,11 @@ while (@ARGV) { } } +if (@call_target) { + my $targets = join ',', @call_target; + set_build_type_from_targets($targets, '--rules-target', nocheck => 1); +} + if (build_has_all(BUILD_BINARY)) { $buildtarget = 'build'; $binarytarget = 'binary'; @@ -361,7 +372,7 @@ if (build_has_all(BUILD_BINARY)) { $binarytarget = 'binary-indep'; } -if ($noclean) { +if (not $preclean) { # -nc without -b/-B/-A/-S/-F implies -b set_build_type(BUILD_BINARY) if build_has_any(BUILD_DEFAULT); # -nc with -S implies no dependency checks @@ -383,9 +394,7 @@ if ($signcommand) { } } elsif (($ENV{GNUPGHOME} && -e $ENV{GNUPGHOME}) || ($ENV{HOME} && -e "$ENV{HOME}/.gnupg")) { - if (find_command('gpg2')) { - $signcommand = 'gpg2'; - } elsif (find_command('gpg')) { + if (find_command('gpg')) { $signcommand = 'gpg'; } } @@ -473,6 +482,8 @@ if (build_has_any(BUILD_ARCH_DEP)) { my $pv = "${pkg}_$sversion"; my $pva = "${pkg}_${sversion}_$arch"; +signkey_validate(); + if (not $signcommand) { $signsource = 0; $signbuildinfo = 0; @@ -531,9 +542,9 @@ foreach my $call_target (@call_target) { } exit 0 if scalar @call_target; -run_hook('preclean', ! $noclean); +run_hook('preclean', $preclean); -unless ($noclean) { +if ($preclean) { run_rules_cond_root('clean'); } @@ -541,19 +552,20 @@ run_hook('source', build_has_any(BUILD_SOURCE)); if (build_has_any(BUILD_SOURCE)) { warning(g_('building a source package without cleaning up as you asked; ' . - 'it might contain undesired files')) if $noclean; + 'it might contain undesired files')) if not $preclean; run_cmd('dpkg-source', @source_opts, '-b', '.'); } run_hook('build', build_has_any(BUILD_BINARY)); -# XXX Use some heuristics to decide whether to use build-{arch,indep} targets. -# This is a temporary measure to not break too many packages on a flag day. -build_target_fallback($ctrl); - my $build_types = get_build_options_from_type(); if (build_has_any(BUILD_BINARY)) { + # XXX Use some heuristics to decide whether to use build-{arch,indep} + # targets. This is a temporary measure to not break too many packages + # on a flag day. + build_target_fallback($ctrl); + # If we are building rootless, there is no need to call the build target # independently as non-root. run_cmd(@debian_rules, $buildtarget) if rules_requires_root($binarytarget); @@ -587,9 +599,9 @@ $changes->parse($changes_fh, g_('parse changes file')); $changes->save($chg); close $changes_fh or subprocerr(g_('dpkg-genchanges')); -run_hook('postclean', $cleansource); +run_hook('postclean', $postclean); -if ($cleansource) { +if ($postclean) { run_rules_cond_root('clean'); } @@ -615,7 +627,7 @@ if ($signsource) { error(g_('failed to sign %s file'), '.dsc'); } - # Recompute the checksums as the .dsc have changed now. + # Recompute the checksums as the .dsc has changed now. my $buildinfo = Dpkg::Control->new(type => CTRL_FILE_BUILDINFO); $buildinfo->load("../$pva.buildinfo"); my $checksums = Dpkg::Checksums->new(); @@ -683,10 +695,12 @@ sub parse_rules_requires_root { my $ctrl = shift; my %rrr; - my $rrr = $ctrl->{'Rules-Requires-Root'} // 'binary-targets'; + my $rrr; my $keywords_base; my $keywords_impl; + $rrr = $rrr_override // $ctrl->{'Rules-Requires-Root'} // 'binary-targets'; + foreach my $keyword (split ' ', $rrr) { if ($keyword =~ m{/}) { if ($keyword =~ m{^dpkg/target/(.*)$}p and $target_official{$1}) { @@ -715,12 +729,18 @@ sub parse_rules_requires_root { setup_rootcommand(); } + # Notify the children we do support R³. + $ENV{DEB_RULES_REQUIRES_ROOT} = join ' ', sort keys %rrr; + if ($keywords_base > 1 or $keywords_base and $keywords_impl) { error(g_('%s field contains both global and implementation specific keywords'), 'Rules-Requires-Root'); } elsif ($keywords_impl) { # Set only on <implementations-keywords>. - $ENV{DPKG_GAIN_ROOT_CMD} = join ' ', @rootcommand; + $ENV{DEB_GAIN_ROOT_CMD} = join ' ', @rootcommand; + } else { + # We should not provide the variable otherwise. + delete $ENV{DEB_GAIN_ROOT_CMD}; } return %rrr; @@ -794,6 +814,24 @@ sub update_files_field { $ctrl->{'Files'} =~ s/^$file_regex$/$md5sum $size $1/m; } +sub signkey_validate { + return unless defined $signkey; + # Make sure this is an hex keyid. + return unless $signkey =~ m/^(?:0x)?([[:xdigit:]]+)$/; + + my $keyid = $1; + + if (length $keyid <= 8) { + error(g_('short OpenPGP key IDs are broken; ' . + 'please use key fingerprints in %s or %s instead'), + '-k', 'DEB_SIGN_KEYID'); + } elsif (length $keyid <= 16) { + warning(g_('long OpenPGP key IDs are strongly discouraged; ' . + 'please use key fingerprints in %s or %s instead'), + '-k', 'DEB_SIGN_KEYID'); + } +} + sub signfile { my $file = shift; @@ -813,8 +851,8 @@ sub signfile { '--output', "$signfile.asc", $signfile); my $status = $?; if ($status == 0) { - system('mv', '--', "$signfile.asc", "../$file") - and subprocerr('mv'); + move("$signfile.asc", "../$file") + or syserror(g_('cannot move %s to %s'), "$signfile.asc", "../$file"); } print "\n"; diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl index 80b309f14..d249ced45 100755 --- a/scripts/dpkg-checkbuilddeps.pl +++ b/scripts/dpkg-checkbuilddeps.pl @@ -22,7 +22,7 @@ use strict; use warnings; -use Getopt::Long qw(:config posix_default bundling no_ignorecase); +use Getopt::Long qw(:config posix_default bundling_values no_ignorecase); use Dpkg (); use Dpkg::Gettext; @@ -138,48 +138,47 @@ if ($bc_value) { } if (@unmet) { - errormsg(g_('Unmet build dependencies: %s'), - join(' ', map { $_->output() } @unmet)); + errormsg(g_('Unmet build dependencies: %s'), + join(' ', map { $_->output() } @unmet)); } if (@conflicts) { - errormsg(g_('Build conflicts: %s'), - join(' ', map { $_->output() } @conflicts)); + errormsg(g_('Build conflicts: %s'), + join(' ', map { $_->output() } @conflicts)); } exit 1 if @unmet || @conflicts; # Silly little status file parser that returns a Dpkg::Deps::KnownFacts sub parse_status { - my $status = shift; - - my $facts = Dpkg::Deps::KnownFacts->new(); - local $/ = ''; - open(my $status_fh, '<', $status) - or syserr(g_('cannot open %s'), $status); - while (<$status_fh>) { - next unless /^Status: .*ok installed$/m; - - my ($package) = /^Package: (.*)$/m; - my ($version) = /^Version: (.*)$/m; - my ($arch) = /^Architecture: (.*)$/m; - my ($multiarch) = /^Multi-Arch: (.*)$/m; - $facts->add_installed_package($package, $version, $arch, - $multiarch); - - if (/^Provides: (.*)$/m) { - my $provides = deps_parse($1, reduce_arch => 1, union => 1); - next if not defined $provides; - foreach (grep { $_->isa('Dpkg::Deps::Simple') } - $provides->get_deps()) - { - $facts->add_provided_package($_->{package}, - $_->{relation}, $_->{version}, - $package); - } - } - } - close $status_fh; - - return $facts; + my $status = shift; + + my $facts = Dpkg::Deps::KnownFacts->new(); + local $/ = ''; + open(my $status_fh, '<', $status) + or syserr(g_('cannot open %s'), $status); + while (<$status_fh>) { + next unless /^Status: .*ok installed$/m; + + my ($package) = /^Package: (.*)$/m; + my ($version) = /^Version: (.*)$/m; + my ($arch) = /^Architecture: (.*)$/m; + my ($multiarch) = /^Multi-Arch: (.*)$/m; + $facts->add_installed_package($package, $version, $arch, $multiarch); + + if (/^Provides: (.*)$/m) { + my $provides = deps_parse($1, reduce_arch => 1, virtual => 1, union => 1); + next if not defined $provides; + foreach (grep { $_->isa('Dpkg::Deps::Simple') } + $provides->get_deps()) + { + $facts->add_provided_package($_->{package}, + $_->{relation}, $_->{version}, + $package); + } + } + } + close $status_fh; + + return $facts; } # This function checks the build dependencies passed in as the first diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl index 45c45089d..5b2cfe6f7 100755 --- a/scripts/dpkg-genbuildinfo.pl +++ b/scripts/dpkg-genbuildinfo.pl @@ -69,6 +69,7 @@ my $buildinfo_format = '1.0'; my $buildinfo; my $checksums = Dpkg::Checksums->new(); +my %distbinaries; my %archadded; my @archvalues; @@ -232,8 +233,7 @@ sub collect_installed_builddeps { # virtual package: we cannot know for sure which implementation # is the one that has been used, so let's add them all... foreach my $provided (@{$facts->{virtualpkg}->{$pkg_name}}) { - my ($provided_by, $provided_rel, $provided_ver) = @{$provided}; - push @unprocessed_pkgs, $provided_by; + push @unprocessed_pkgs, $provided->{provider}; } } # else: it is a package in an OR dependency that has been otherwise @@ -386,6 +386,15 @@ if (build_has_any(BUILD_BINARY)) { # Make us a bit idempotent. next if $file->{filename} =~ m/\.buildinfo$/; + if (defined $file->{arch}) { + my $arch_all = debarch_eq('all', $file->{arch}); + + next if build_has_none(BUILD_ARCH_INDEP) and $arch_all; + next if build_has_none(BUILD_ARCH_DEP) and not $arch_all; + + $distbinaries{$file->{package}} = 1 if defined $file->{package}; + } + my $path = "$uploadfilesdir/$file->{filename}"; $checksums->add_from_file($path, key => $file->{filename}); @@ -398,7 +407,7 @@ if (build_has_any(BUILD_BINARY)) { $fields->{'Format'} = $buildinfo_format; $fields->{'Source'} = $spackage; -$fields->{'Binary'} = join(' ', map { $_->{'Package'} } $control->get_packages()); +$fields->{'Binary'} = join(' ', sort keys %distbinaries); # Avoid overly long line by splitting over multiple lines. if (length($fields->{'Binary'}) > 980) { $fields->{'Binary'} =~ s/(.{0,980}) /$1\n/g; @@ -424,7 +433,7 @@ if ($use_feature{kernel}) { $fields->{'Build-Kernel-Version'} = "$kern_rel $kern_ver"; } -my $cwd = cwd(); +my $cwd = getcwd(); if ($use_feature{path}) { $fields->{'Build-Path'} = $cwd; } else { @@ -438,6 +447,8 @@ if ($use_feature{path}) { } } +$fields->{'Build-Tainted-By'} = "\n" . join "\n", run_vendor_hook('build-tainted-by'); + $checksums->export_to_control($fields); $fields->{'Installed-Build-Depends'} = collect_installed_builddeps($control); diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 84bdc4ba6..57d7ced06 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -22,7 +22,7 @@ use strict; use warnings; -use List::Util qw(any none); +use List::Util qw(any all none); use Encode; use POSIX qw(:errno_h :locale_h); @@ -221,8 +221,8 @@ if (defined($prev_changelog) and { warning(g_('the current version (%s) is earlier than the previous one (%s)'), $changelog->{'Version'}, $prev_changelog->{'Version'}) - # ~bpo and ~vola are backports and have lower version number by definition - unless $changelog->{'Version'} =~ /~(?:bpo|vola)/; + # Backports have lower version number by definition. + unless $changelog->{'Version'} =~ /~(?:bpo|deb)/; } # Scan control info of source package @@ -353,15 +353,6 @@ foreach my $pkg ($control->get_packages()) { my $pkg_type = $pkg->{'Package-Type'} || $pkg->get_custom_field('Package-Type') || 'deb'; - my @f; # List of files for this binary package - push @f, @{$p2f{$p}} if defined $p2f{$p}; - - # Add description of all binary packages - $d = $substvars->substvars($d); - my $desc = encode_utf8(sprintf('%-10s - %-.65s', $p, decode_utf8($d))); - $desc .= " ($pkg_type)" if $pkg_type ne 'deb'; - push @descriptions, $desc; - my @restrictions; @restrictions = parse_build_profiles($bp) if defined $bp; @@ -369,7 +360,7 @@ foreach my $pkg ($control->get_packages()) { # No files for this package... warn if it's unexpected if (((build_has_any(BUILD_ARCH_INDEP) and debarch_eq('all', $a)) or (build_has_any(BUILD_ARCH_DEP) and - (any { debarch_is($host_arch, $_) } debarch_list_parse($a)))) and + (any { debarch_is($host_arch, $_) } debarch_list_parse($a, positive => 1)))) and (@restrictions == 0 or evaluate_restriction_formula(\@restrictions, \@profiles))) { @@ -379,6 +370,15 @@ foreach my $pkg ($control->get_packages()) { next; # and skip it } + # Add description of all binary packages + $d = $substvars->substvars($d); + my $desc = encode_utf8(sprintf('%-10s - %-.65s', $p, decode_utf8($d))); + $desc .= " ($pkg_type)" if $pkg_type ne 'deb'; + push @descriptions, $desc; + + # List of files for this binary package. + my @f = @{$p2f{$p}}; + foreach (keys %{$pkg}) { my $v = $pkg->{$_}; @@ -388,7 +388,7 @@ foreach my $pkg ($control->get_packages()) { $f2pricf{$_} = $v foreach (@f); } elsif (m/^Architecture$/) { if (build_has_any(BUILD_ARCH_DEP) and - (any { debarch_is($host_arch, $_) } debarch_list_parse($v))) { + (any { debarch_is($host_arch, $_) } debarch_list_parse($v, positive => 1))) { $v = $host_arch; } elsif (!debarch_eq('all', $v)) { $v = ''; @@ -415,18 +415,19 @@ foreach (keys %{$changelog}) { } if ($changesdescription) { - open(my $changes_fh, '<', $changesdescription) - or syserr(g_('cannot read %s'), $changesdescription); - $fields->{'Changes'} = "\n" . file_slurp($changes_fh); - close($changes_fh); + $fields->{'Changes'} = "\n" . file_slurp($changesdescription); } for my $p (keys %p2f) { if (not defined $control->get_pkg_by_name($p)) { - # XXX: Skip automatic debugging symbol packages. We should not be - # hardcoding packages names here, as this is distribution-specific. - # Instead we should use the Auto-Built-Package field. - next if $p =~ m/-dbgsym$/; + # Skip automatically generated packages (such as debugging symbol + # packages), by using the Auto-Built-Package field. + next if all { + my $file = $dist->get_file($_); + + $file->{attrs}->{automatic} eq 'yes' + } @{$p2f{$p}}; + warning(g_('package %s listed in files list but not in control info'), $p); next; } @@ -464,7 +465,7 @@ if (!defined($fields->{'Date'})) { setlocale(LC_TIME, ''); } -$fields->{'Binary'} = join(' ', map { $_->{'Package'} } $control->get_packages()); +$fields->{'Binary'} = join ' ', sort keys %p2f; # Avoid overly long line by splitting over multiple lines if (length($fields->{'Binary'}) > 980) { $fields->{'Binary'} =~ s/(.{0,980}) /$1\n/g; diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 2e656a246..04a5c68b9 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -217,7 +217,7 @@ foreach (keys %{$pkg}) { if (debarch_eq('all', $v)) { $fields->{$_} = $v; } else { - my @archlist = debarch_list_parse($v); + my @archlist = debarch_list_parse($v, positive => 1); if (none { debarch_is($host_arch, $_) } @archlist) { error(g_("current host architecture '%s' does not " . @@ -257,7 +257,7 @@ $facts->add_installed_package($fields->{'Package'}, $fields->{'Version'}, $fields->{'Architecture'}, $fields->{'Multi-Arch'}); if (exists $pkg->{'Provides'}) { my $provides = deps_parse($substvars->substvars($pkg->{'Provides'}, no_warn => 1), - reduce_restrictions => 1, union => 1); + reduce_restrictions => 1, virtual => 1, union => 1); if (defined $provides) { foreach my $subdep ($provides->get_deps()) { if ($subdep->isa('Dpkg::Deps::Simple')) { @@ -335,13 +335,20 @@ if ($binarypackage ne $sourcepackage || $verdiff) { if (!defined($substvars->get('Installed-Size'))) { my $installed_size = 0; + my %hardlink; my $scan_installed_size = sub { lstat or syserr(g_('cannot stat %s'), $File::Find::name); if (-f _ or -l _) { + my ($dev, $ino, $nlink) = (lstat _)[0, 1, 3]; + # For filesystem objects with actual content accumulate the size # in 1 KiB units. - $installed_size += POSIX::ceil((-s _) / 1024); + $installed_size += POSIX::ceil((-s _) / 1024) + if not exists $hardlink{"$dev:$ino"}; + + # Track hardlinks to avoid repeated additions. + $hardlink{"$dev:$ino"} = 1 if $nlink > 1; } else { # For other filesystem objects assume a minimum 1 KiB baseline, # as directories are shared resources between packages, and other @@ -350,7 +357,7 @@ if (!defined($substvars->get('Installed-Size'))) { $installed_size += 1; } }; - find($scan_installed_size, $packagebuilddir); + find($scan_installed_size, $packagebuilddir) if -d $packagebuilddir; $substvars->set_as_auto('Installed-Size', $installed_size); } @@ -406,7 +413,10 @@ if ($stdout) { } } - $dist->add_file($forcefilename, $section, $priority); + my %fileattrs; + $fileattrs{automatic} = 'yes' if $fields->{'Auto-Built-Package'}; + + $dist->add_file($forcefilename, $section, $priority, %fileattrs); $dist->save("$fileslistfile.new"); rename "$fileslistfile.new", $fileslistfile diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl index 09b0aa6d6..afc84015d 100755 --- a/scripts/dpkg-gensymbols.pl +++ b/scripts/dpkg-gensymbols.pl @@ -63,6 +63,7 @@ sub usage { 'Usage: %s [<option>...]') . "\n\n" . g_( 'Options: + -l<library-path> add directory to private shared library search list. -p<package> generate symbols file for package. -P<package-build-dir> temporary build directory instead of debian/tmp. -e<library> explicitly list libraries to scan. @@ -97,6 +98,8 @@ while (@ARGV) { $oppackage = ${^POSTMATCH}; my $err = pkg_name_is_illegal($oppackage); error(g_("illegal package name '%s': %s"), $oppackage, $err) if $err; + } elsif (m/^-l(.*)$/) { + Dpkg::Shlibs::add_library_dir($1); } elsif (m/^-c(\d)?$/) { $compare = $1 // 1; } elsif (m/^-q$/) { @@ -253,27 +256,34 @@ if ($stdout) { # Check if generated files differs from reference file my $exitcode = 0; + +sub compare_problem +{ + my ($level, $msg, @args) = @_; + + if ($compare >= $level) { + errormsg($msg, @args); + $exitcode = $level; + } else { + warning($msg, @args) unless $quiet; + } +} + if ($compare || ! $quiet) { # Compare if (my @libs = $symfile->get_new_libs($ref_symfile)) { - warning(g_('new libraries appeared in the symbols file: %s'), "@libs") - unless $quiet; - $exitcode = 4 if ($compare >= 4); + compare_problem(4, g_('new libraries appeared in the symbols file: %s'), "@libs"); } if (my @libs = $symfile->get_lost_libs($ref_symfile)) { - warning(g_('some libraries disappeared in the symbols file: %s'), "@libs") - unless $quiet; - $exitcode = 3 if ($compare >= 3); + compare_problem(3, g_('some libraries disappeared in the symbols file: %s'), "@libs"); } if ($symfile->get_new_symbols($ref_symfile)) { - warning(g_('some new symbols appeared in the symbols file: %s'), - g_('see diff output below')) unless $quiet; - $exitcode = 2 if ($compare >= 2); + compare_problem(2, g_('some new symbols appeared in the symbols file: %s'), + g_('see diff output below')); } if ($symfile->get_lost_symbols($ref_symfile)) { - warning(g_('some symbols or patterns disappeared in the symbols file: %s'), - g_('see diff output below')) unless $quiet; - $exitcode = 1 if ($compare >= 1); + compare_problem(1, g_('some symbols or patterns disappeared in the symbols file: %s'), + g_('see diff output below')) } } diff --git a/scripts/dpkg-maintscript-helper.sh b/scripts/dpkg-maintscript-helper.sh index 2e5d207bc..a113a938e 100755 --- a/scripts/dpkg-maintscript-helper.sh +++ b/scripts/dpkg-maintscript-helper.sh @@ -46,6 +46,8 @@ rm_conffile() { [ -n "$1" ] || error "maintainer script parameters are missing" [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ "${CONFFILE}" != "${CONFFILE#/}" ] || \ error "conffile '$CONFFILE' is not an absolute path" validate_optional_version "$LASTVERSION" @@ -94,7 +96,7 @@ prepare_rm_conffile() { local md5sum old_md5sum md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')" old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$PACKAGE" | \ - sed -n -e "\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" + sed -n -e "\\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" if [ "$md5sum" != "$old_md5sum" ]; then mv -f "$CONFFILE" "$CONFFILE.dpkg-backup" else @@ -156,6 +158,8 @@ mv_conffile() { [ -n "$1" ] || error "maintainer script parameters are missing" [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ "${OLDCONFFILE}" != "${OLDCONFFILE#/}" ] || \ error "old-conffile '$OLDCONFFILE' is not an absolute path" [ "${NEWCONFFILE}" != "${NEWCONFFILE#/}" ] || \ @@ -203,7 +207,7 @@ prepare_mv_conffile() { local md5sum old_md5sum md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')" old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$PACKAGE" | \ - sed -n -e "\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" + sed -n -e "\\'^ $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" if [ "$md5sum" = "$old_md5sum" ]; then mv -f "$CONFFILE" "$CONFFILE.dpkg-remove" fi @@ -262,6 +266,8 @@ symlink_to_dir() { [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ -n "$PACKAGE" ] || error "cannot identify the package" [ -n "$SYMLINK" ] || error "symlink parameter is missing" [ "${SYMLINK#/}" = "$SYMLINK" ] && \ @@ -340,6 +346,8 @@ dir_to_symlink() { [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ -n "$PACKAGE" ] || error "cannot identify the package" [ -n "$PATHNAME" ] || error "directory parameter is missing" [ "${PATHNAME#/}" = "$PATHNAME" ] && \ @@ -416,7 +424,7 @@ prepare_dir_to_symlink() # we should not perform the switch. export DPKG_MAINTSCRIPT_HELPER_INTERNAL_API="$version" find "$PATHNAME" -print0 | \ - xargs -0 -n1 $0 _internal_pkg_must_own_file "$PACKAGE" || \ + xargs -0 -n1 "$0" _internal_pkg_must_own_file "$PACKAGE" || \ error "directory '$PATHNAME' contains files not owned by" \ "package $PACKAGE, cannot switch to symlink" unset DPKG_MAINTSCRIPT_HELPER_INTERNAL_API @@ -457,7 +465,7 @@ finish_dir_to_symlink() ABS_SYMLINK_TARGET="$SYMLINK_TARGET" fi rm "$PATHNAME/.dpkg-staging-dir" - find "$PATHNAME" -mindepth 1 -print0 | \ + find "$PATHNAME" -mindepth 1 -maxdepth 1 -print0 | \ xargs -0 -i% mv -f "%" "$ABS_SYMLINK_TARGET/" # Remove the staging directory. @@ -560,7 +568,7 @@ COLOR_BOLD_WHITE='[1;37m' setup_colors() { - : ${DPKG_COLORS=auto} + : "${DPKG_COLORS=auto}" case "$DPKG_COLORS" in auto) diff --git a/scripts/dpkg-mergechangelogs.pl b/scripts/dpkg-mergechangelogs.pl index 7fd11fc96..6216edabb 100755 --- a/scripts/dpkg-mergechangelogs.pl +++ b/scripts/dpkg-mergechangelogs.pl @@ -20,7 +20,7 @@ use warnings; use strict; use Scalar::Util qw(blessed); -use Getopt::Long qw(:config posix_default bundling no_ignorecase); +use Getopt::Long qw(:config posix_default bundling_values no_ignorecase); use Dpkg (); use Dpkg::Changelog::Debian; @@ -43,12 +43,10 @@ BEGIN { use Algorithm::Merge qw(merge); }; if ($@) { - eval q{ - sub merge { - my ($o, $a, $b) = @_; - return @$a if join("\n", @$a) eq join("\n", @$b); - return get_conflict_block($a, $b); - } + *merge = sub { + my ($o, $a, $b) = @_; + return @$a if join("\n", @$a) eq join("\n", @$b); + return get_conflict_block($a, $b); }; } } @@ -175,7 +173,7 @@ sub get_items_to_merge { } # Compares the versions taking into account some oddities like the fact -# that we want backport/volatile versions to sort higher than the version +# that we want backport versions to sort higher than the version # on which they are based. sub compare_versions { my ($a, $b) = @_; @@ -184,9 +182,9 @@ sub compare_versions { return -1 if not defined $a; $a = $a->get_version() if ref($a) and $a->isa('Dpkg::Changelog::Entry'); $b = $b->get_version() if ref($b) and $b->isa('Dpkg::Changelog::Entry'); - # Backport and volatile are not real prereleases - $a =~ s/~(bpo|vola)/+$1/; - $b =~ s/~(bpo|vola)/+$1/; + # Backports are not real prereleases. + $a =~ s/~(bpo|deb)/+$1/; + $b =~ s/~(bpo|deb)/+$1/; if ($merge_prereleases) { $a =~ s/~[^~]*$//; $b =~ s/~[^~]*$//; diff --git a/scripts/dpkg-parsechangelog.pl b/scripts/dpkg-parsechangelog.pl index 86c30b451..3d14c4219 100755 --- a/scripts/dpkg-parsechangelog.pl +++ b/scripts/dpkg-parsechangelog.pl @@ -56,6 +56,7 @@ sub usage { "Parser options: --format <output-format> set output format (defaults to 'dpkg'). + --reverse include all changes in reverse order. --all include all changes. -s, --since <version> include all changes later than <version>. -v <version> ditto. @@ -88,6 +89,8 @@ while (@ARGV) { $options{changelogformat} =~ m/^([0-9a-z]+)$/; } elsif ($arg eq '--format') { $options{format} = shift; + } elsif ($arg eq '--reverse') { + $options{reverse} = 1; } elsif ($arg eq '-l' or $arg eq '--file') { $options{file} = shift; usageerr(g_('missing changelog filename')) diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl index 05710ae69..3d727753d 100755 --- a/scripts/dpkg-scanpackages.pl +++ b/scripts/dpkg-scanpackages.pl @@ -20,7 +20,7 @@ use warnings; use strict; -use Getopt::Long qw(:config posix_default bundling no_ignorecase); +use Getopt::Long qw(:config posix_default bundling_values no_ignorecase); use List::Util qw(none); use File::Find; @@ -38,10 +38,11 @@ textdomain('dpkg-dev'); report_options(info_fh => \*STDERR); my (@samemaint, @changedmaint); +my @multi_instances; my @spuriousover; my %packages; my %overridden; -my %hash; +my @checksums; my %options = (help => sub { usage(); exit 0; }, version => sub { version(); exit 0; }, @@ -174,20 +175,23 @@ sub process_deb { if not defined $p; if (defined($packages{$p}) and not $options{multiversion}) { - foreach my $pkg (@{$packages{$p}}) { - if (version_compare_relation($fields->{'Version'}, REL_GT, - $pkg->{'Version'})) - { - warning(g_('package %s (filename %s) is repeat but newer ' . - 'version; used that one and ignored data from %s!'), - $p, $fn, $pkg->{Filename}); - $packages{$p} = []; - } else { - warning(g_('package %s (filename %s) is repeat; ' . - 'ignored that one and using data from %s!'), - $p, $fn, $pkg->{Filename}); - return; - } + my $pkg = ${$packages{$p}}[0]; + + @multi_instances = ($pkg->{Filename}) if @multi_instances == 0; + push @multi_instances, "$pathprefix$fn"; + + if (version_compare_relation($fields->{'Version'}, REL_GT, + $pkg->{'Version'})) + { + warning(g_('package %s (filename %s) is repeat but newer ' . + 'version; used that one and ignored data from %s!'), + $p, $fn, $pkg->{Filename}); + $packages{$p} = []; + } else { + warning(g_('package %s (filename %s) is repeat; ' . + 'ignored that one and using data from %s!'), + $p, $fn, $pkg->{Filename}); + return; } } @@ -196,10 +200,8 @@ sub process_deb { $fields->{'Filename'} = "$pathprefix$fn"; my $sums = Dpkg::Checksums->new(); - $sums->add_from_file($fn); - foreach my $alg (checksums_get_list()) { - next if %hash and not $hash{$alg}; - + $sums->add_from_file($fn, checksums => \@checksums); + foreach my $alg (@checksums) { if ($alg eq 'md5') { $fields->{'MD5sum'} = $sums->get_checksum($fn, $alg); } else { @@ -223,13 +225,14 @@ if (not (@ARGV >= 1 and @ARGV <= 3)) { my $type = $options{type} // 'deb'; my $arch = $options{arch}; -%hash = map { $_ => 1 } split /,/, $options{hash} // ''; +my %hash = map { $_ => 1 } split /,/, $options{hash} // ''; foreach my $alg (keys %hash) { if (not checksums_is_supported($alg)) { usageerr(g_('unsupported checksum \'%s\''), $alg); } } +@checksums = %hash ? keys %hash : checksums_get_list(); my ($binarypath, $override, $pathprefix) = @ARGV; @@ -275,6 +278,10 @@ for my $p (sort keys %packages) { } close(STDOUT) or syserr(g_("couldn't close stdout")); +if (@multi_instances) { + warning(g_('Packages with multiple instances but no --multiversion specified:')); + warning($_) foreach (sort @multi_instances); +} if (@changedmaint) { warning(g_('Packages in override file with incorrect old maintainer value:')); warning($_) foreach (@changedmaint); diff --git a/scripts/dpkg-scansources.pl b/scripts/dpkg-scansources.pl index 3c793b4e3..d92e980db 100755 --- a/scripts/dpkg-scansources.pl +++ b/scripts/dpkg-scansources.pl @@ -20,7 +20,7 @@ use strict; use warnings; -use Getopt::Long qw(:config posix_default bundling no_ignorecase); +use Getopt::Long qw(:config posix_default bundling_values no_ignorecase); use List::Util qw(any); use File::Find; diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 323fba9e1..8142c85b4 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -227,7 +227,6 @@ foreach my $file (keys %exec) { my $file2pkg = find_packages(keys %libfiles, keys %altlibfiles); my $symfile = Dpkg::Shlibs::SymbolFile->new(); my $dumplibs_wo_symfile = Dpkg::Shlibs::Objdump->new(); - my @soname_wo_symfile; SONAME: foreach my $soname (@sonames) { # Select the first good entry from the ordered list that we got from # find_library(), and skip to the next SONAME. @@ -236,7 +235,7 @@ foreach my $file (keys %exec) { if (none { $_ ne '' } @{$file2pkg->{$lib}}) { # The path of the library as calculated is not the # official path of a packaged file, try to fallback on - # on the realpath() first, maybe this one is part of a package + # the realpath() first, maybe this one is part of a package my $reallib = realpath($lib); if (exists $file2pkg->{$reallib}) { $file2pkg->{$lib} = $file2pkg->{$reallib}; @@ -295,7 +294,6 @@ foreach my $file (keys %exec) { warning(g_('%s has an unexpected SONAME (%s)'), $lib, $id); $alt_soname{$id} = $soname; } - push @soname_wo_symfile, $soname; # Only try to generate a dependency for libraries with a SONAME if (not $libobj->is_public_library()) { @@ -437,8 +435,9 @@ foreach my $file (keys %exec) { foreach my $soname (@sonames) { # Adjust minimal version of dependencies with information # extracted from build-dependencies - my $dev_pkg = $symfile->get_field($soname, 'Build-Depends-Package'); - if (defined $dev_pkg) { + my $dev_pkgs = $symfile->get_field($soname, 'Build-Depends-Packages') // + $symfile->get_field($soname, 'Build-Depends-Package'); + foreach my $dev_pkg (split /[,\s]+/, $dev_pkgs // '') { debug(1, "Updating dependencies of $soname with build-dependencies"); my $minver = get_min_version_from_deps($build_deps, $dev_pkg); if (defined $minver) { @@ -482,8 +481,9 @@ foreach my $soname (keys %global_soname_needed) { # Quit now if any missing libraries if ($error_count >= 1) { my $note = g_('Note: libraries are not searched in other binary packages ' . - "that do not have any shlibs or symbols file.\nTo help dpkg-shlibdeps " . - 'find private libraries, you might need to use -l.'); + "that do not have any shlibs or symbols file.\n" . + 'To help dpkg-shlibdeps find private libraries, you might ' . + 'need to use -l.'); error(P_('cannot continue due to the error above', 'cannot continue due to the errors listed above', $error_count) . "\n" . $note); @@ -546,7 +546,8 @@ foreach my $field (reverse @depfields) { map { # Translate dependency templates into real dependencies my $templ = $_; - if ($dependencies{$field}{$templ}) { + if ($dependencies{$field}{$templ}->is_valid() and + $dependencies{$field}{$templ}->as_string()) { $templ =~ s/#MINVER#/(>= $dependencies{$field}{$templ})/g; } else { $templ =~ s/#MINVER#//g; @@ -704,11 +705,15 @@ sub add_shlibs_dep { sub split_soname { my $soname = shift; + if ($soname =~ /^(.*)\.so\.(.*)$/) { + # Shared library with stable <name>.so.<version> format. return wantarray ? ($1, $2) : 1; } elsif ($soname =~ /^(.*)-(\d.*)\.so$/) { + # Shared library/module with unstable <name>-<version>.so format. return wantarray ? ($1, $2) : 1; } else { + # Something else. return wantarray ? () : 0; } } diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 5c356c31a..17f916600 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -47,6 +47,7 @@ use Dpkg::Substvars; use Dpkg::Version; use Dpkg::Vars; use Dpkg::Changelog::Parse; +use Dpkg::Source::Format; use Dpkg::Source::Package qw(get_default_diff_ignore_regex set_default_diff_ignore_regex get_default_tar_ignore_pattern); @@ -118,7 +119,7 @@ if (defined($options{opmode}) && } if ($dir eq '.') { # . is never correct, adjust automatically - $dir = basename(cwd()); + $dir = basename(getcwd()); chdir '..' or syserr(g_("unable to chdir to '%s'"), '..'); } # --format options are not allowed, they would take precedence @@ -238,9 +239,26 @@ if ($options{opmode} =~ /^(build|print-format|(before|after)-build|commit)$/) { # <https://reproducible-builds.org/specs/source-date-epoch/> $ENV{SOURCE_DATE_EPOCH} ||= $changelog->{timestamp} || time; - my $srcpkg = Dpkg::Source::Package->new(options => \%options); + # Select the format to use + if (not defined $build_format) { + my $format_file = "$dir/debian/source/format"; + if (-e $format_file) { + my $format = Dpkg::Source::Format->new(filename => $format_file); + $build_format = $format->get(); + } else { + warning(g_('no source format specified in %s, ' . + 'see dpkg-source(1)'), 'debian/source/format') + if $options{opmode} eq 'build'; + $build_format = '1.0'; + } + } + + my $srcpkg = Dpkg::Source::Package->new(format => $build_format, + options => \%options); my $fields = $srcpkg->{fields}; + $srcpkg->parse_cmdline_options(@cmdline_options); + my @sourcearch; my %archadded; my @binarypackages; @@ -288,13 +306,6 @@ if ($options{opmode} =~ /^(build|print-format|(before|after)-build|commit)$/) { $pkg_summary .= ' arch=' . join ',', split ' ', $arch; if (defined $profile) { - # If the string does not contain brackets then it is using the - # old syntax. Emit a fatal error. - if ($profile !~ m/^\s*<.*>\s*$/) { - error(g_('binary package stanza %s is using an obsolete ' . - 'Build-Profiles field syntax'), $p); - } - # Instead of splitting twice and then joining twice, we just do # simple string replacements: @@ -394,29 +405,6 @@ if ($options{opmode} =~ /^(build|print-format|(before|after)-build|commit)$/) { $fields->{'Binary'} =~ s/(.{0,980}), ?/$1,\n/g; } - # Select the format to use - if (not defined $build_format) { - if (-e "$dir/debian/source/format") { - open(my $format_fh, '<', "$dir/debian/source/format") - or syserr(g_('cannot read %s'), "$dir/debian/source/format"); - $build_format = <$format_fh>; - chomp($build_format) if defined $build_format; - error(g_('%s is empty'), "$dir/debian/source/format") - unless defined $build_format and length $build_format; - close($format_fh); - } else { - warning(g_('no source format specified in %s, ' . - 'see dpkg-source(1)'), 'debian/source/format') - if $options{opmode} eq 'build'; - $build_format = '1.0'; - } - } - $fields->{'Format'} = $build_format; - $srcpkg->upgrade_object_type(); # Fails if format is unsupported - # Parse command line options - $srcpkg->init_options(); - $srcpkg->parse_cmdline_options(@cmdline_options); - if ($options{opmode} eq 'print-format') { print $fields->{'Format'} . "\n"; exit(0); @@ -542,8 +530,8 @@ sub set_testsuite_triggers_field deps_iterate($deps, sub { $testdeps{$_[0]->{package}} = 1 }); } - # Remove our own binaries and meta-depends. - foreach my $pkg (@binarypackages, qw(@ @builddeps@)) { + # Remove our own binaries and its meta-depends variant. + foreach my $pkg (@binarypackages, qw(@)) { delete $testdeps{$pkg}; } $fields->{'Testsuite-Triggers'} = join ', ', sort keys %testdeps; @@ -573,11 +561,10 @@ sub print_option { sub get_format_help { $build_format //= '1.0'; - my $srcpkg = Dpkg::Source::Package->new(); - $srcpkg->{fields}->{'Format'} = $build_format; - $srcpkg->upgrade_object_type(); # Fails if format is unsupported + my $srcpkg = Dpkg::Source::Package->new(format => $build_format); my @cmdline = $srcpkg->describe_cmdline_options(); + return '' unless @cmdline; my $help_build = my $help_extract = ''; my $help; diff --git a/scripts/mk/architecture.mk b/scripts/mk/architecture.mk index 8520c5b2a..0af96019d 100644 --- a/scripts/mk/architecture.mk +++ b/scripts/mk/architecture.mk @@ -4,7 +4,7 @@ dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1))) -dpkg_architecture_setvar = $(1) ?= $(call dpkg_lazy_eval,$(1),dpkg-architecture -q$(1)) +dpkg_architecture_setvar = export $(1) ?= $(call dpkg_lazy_eval,$(1),dpkg-architecture -q$(1)) $(foreach machine,BUILD HOST TARGET,\ $(foreach var,ARCH ARCH_ABI ARCH_LIBC ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\ diff --git a/scripts/mk/buildtools.mk b/scripts/mk/buildtools.mk index d5638f50e..cdf7734d3 100644 --- a/scripts/mk/buildtools.mk +++ b/scripts/mk/buildtools.mk @@ -1,5 +1,6 @@ # This Makefile snippet defines the following variables for host tools: # +# AS: assembler # CPP: C preprocessor # CC: C compiler # CXX: C++ compiler @@ -9,6 +10,12 @@ # F77: Fortran 77 compiler # FC: Fortran 9x compiler # LD: linker +# STRIP: strip objects +# OBJCOPY: copy objects +# OBJDUMP: dump objects +# NM: names lister +# AR: archiver +# RANLIB: archive index generator # PKG_CONFIG: pkg-config tool # # All the above variables have a counterpart variable for the build tool, @@ -25,6 +32,7 @@ include $(dpkg_datadir)/architecture.mk # not defined or contain the make built-in defaults. On native builds if # TOOL is defined and TOOL_FOR_BUILD is not, we fallback to use TOOL. define dpkg_buildtool_setvar +ifeq (,$(findstring $(3),$(DEB_BUILD_OPTIONS))) ifeq ($(origin $(1)),default) $(1) = $(DEB_HOST_GNU_TYPE)-$(2) endif @@ -37,6 +45,10 @@ $(1)_FOR_BUILD ?= $$($(1)) endif endif $(1)_FOR_BUILD ?= $(DEB_BUILD_GNU_TYPE)-$(2) +else +$(1) = : +$(1)_FOR_BUILD = : +endif ifdef DPKG_EXPORT_BUILDTOOLS export $(1) @@ -44,6 +56,7 @@ export $(1)_FOR_BUILD endif endef +$(eval $(call dpkg_buildtool_setvar,AS,as)) $(eval $(call dpkg_buildtool_setvar,CPP,gcc -E)) $(eval $(call dpkg_buildtool_setvar,CC,gcc)) $(eval $(call dpkg_buildtool_setvar,CXX,g++)) @@ -53,4 +66,10 @@ $(eval $(call dpkg_buildtool_setvar,GCJ,gcj)) $(eval $(call dpkg_buildtool_setvar,F77,f77)) $(eval $(call dpkg_buildtool_setvar,FC,f77)) $(eval $(call dpkg_buildtool_setvar,LD,ld)) +$(eval $(call dpkg_buildtool_setvar,STRIP,strip,nostrip)) +$(eval $(call dpkg_buildtool_setvar,OBJCOPY,objcopy)) +$(eval $(call dpkg_buildtool_setvar,OBJDUMP,objdump)) +$(eval $(call dpkg_buildtool_setvar,NM,nm)) +$(eval $(call dpkg_buildtool_setvar,AR,ar)) +$(eval $(call dpkg_buildtool_setvar,RANLIB,ranlib)) $(eval $(call dpkg_buildtool_setvar,PKG_CONFIG,pkg-config)) diff --git a/scripts/mk/vendor.mk b/scripts/mk/vendor.mk index aa75cd6fc..f3b1565bb 100644 --- a/scripts/mk/vendor.mk +++ b/scripts/mk/vendor.mk @@ -3,16 +3,40 @@ # DEB_VENDOR: output of dpkg-vendor --query Vendor # DEB_PARENT_VENDOR: output of dpkg-vendor --query Parent (can be empty) # -# The snippet also defines a macro "dpkg_vendor_derives_from" that you can -# use to verify if the current vendor derives from another vendor with a -# simple test like this one: -# ifeq ($(call dpkg_vendor_derives_from ubuntu),yes) -# ... -# endif +# This Makefile snippet also defines a set "dpkg_vendor_derives_from" +# macros that can be used to verify if the current vendor derives from +# another vendor. The unversioned variant defaults to the v0 version if +# undefined, which can be defined explicitly to one of the versions or the +# versioned macros can be used directly. The following are example usages: +# +# - dpkg_vendor_derives_from (since dpkg 1.16.1) +# +# ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes) +# ... +# endif +# +# - dpkg_vendor_derives_from_v0 (since dpkg 1.19.3) +# +# ifeq ($(shell $(call dpkg_vendor_derives_from_v0,ubuntu)),yes) +# ... +# endif +# +# - dpkg_vendor_derives_from_v1 (since dpkg 1.19.3) +# +# dpkg_vendor_derives_from = $(dpkg_vendor_derives_from_v1) +# ifeq ($(call dpkg_vendor_derives_from,ubuntu),yes) +# ... +# endif +# ifeq ($(call dpkg_vendor_derives_from_v1,ubuntu),yes) +# ... +# endif dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1))) DEB_VENDOR = $(call dpkg_late_eval,DEB_VENDOR,dpkg-vendor --query Vendor) DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent) -dpkg_vendor_derives_from = dpkg-vendor --derives-from $(1) && echo yes || echo no +dpkg_vendor_derives_from_v0 = dpkg-vendor --derives-from $(1) && echo yes || echo no +dpkg_vendor_derives_from_v1 = $(shell $(dpkg_vendor_derives_from_v0)) + +dpkg_vendor_derives_from ?= $(dpkg_vendor_derives_from_v0) diff --git a/scripts/po/POTFILES.in b/scripts/po/POTFILES.in index dea8cde0e..a486b593d 100644 --- a/scripts/po/POTFILES.in +++ b/scripts/po/POTFILES.in @@ -46,6 +46,12 @@ scripts/Dpkg/Control/Tests.pm scripts/Dpkg/Control/Tests/Entry.pm scripts/Dpkg/Control/Types.pm scripts/Dpkg/Deps.pm +scripts/Dpkg/Deps/AND.pm +scripts/Dpkg/Deps/KnownFacts.pm +scripts/Dpkg/Deps/Multiple.pm +scripts/Dpkg/Deps/OR.pm +scripts/Dpkg/Deps/Simple.pm +scripts/Dpkg/Deps/Union.pm scripts/Dpkg/Dist/Files.pm scripts/Dpkg/ErrorHandling.pm scripts/Dpkg/Exit.pm @@ -66,6 +72,7 @@ scripts/Dpkg/Shlibs/Symbol.pm scripts/Dpkg/Shlibs/SymbolFile.pm scripts/Dpkg/Source/Archive.pm scripts/Dpkg/Source/Functions.pm +scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V1.pm scripts/Dpkg/Source/Package/V2.pm diff --git a/scripts/po/ca.po b/scripts/po/ca.po index 57918dd91..d7308988b 100644 --- a/scripts/po/ca.po +++ b/scripts/po/ca.po @@ -2,14 +2,14 @@ # Copyright © 2006, 2010 Software in the Public Interest, Inc. # This file is distributed under the same license as the dpkg package. # Jordi Mallach <jordi@debian.org>, 2006, 2010. -# Guillem Jover <guillem@debian.org>, 2010, 2014-2015, 2017 +# Guillem Jover <guillem@debian.org>, 2010-2011, 2014-2015, 2017, 2019. # msgid "" msgstr "" -"Project-Id-Version: dpkg-dev 1.17.23\n" +"Project-Id-Version: dpkg-dev 1.19.7\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" -"PO-Revision-Date: 2017-05-07 16:26+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" +"PO-Revision-Date: 2019-05-09 05:38+0200\n" "Last-Translator: Guillem Jover <guillem@debian.org>\n" "Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n" "Language: ca\n" @@ -179,28 +179,6 @@ msgid "Usage: %s [<command>]" msgstr "Format d'ús: %s [<ordre>]" #: scripts/dpkg-buildflags.pl -#, fuzzy -#| msgid "" -#| "Commands:\n" -#| " --get <flag> output the requested flag to stdout.\n" -#| " --origin <flag> output the origin of the flag to stdout:\n" -#| " value is one of vendor, system, user, env.\n" -#| " --query-features <area>\n" -#| " output the status of features for the given area.\n" -#| " --list output a list of the flags supported by the current " -#| "vendor.\n" -#| " --export=(sh|make|cmdline|configure)\n" -#| " output something convenient to import the " -#| "compilation\n" -#| " flags in a shell script, in make, or in a command " -#| "line.\n" -#| " --dump output all compilation flags with their values\n" -#| " --status print a synopsis with all parameters affecting the\n" -#| " behaviour of dpkg-buildflags and the resulting " -#| "flags\n" -#| " and their origin.\n" -#| " --help show this help message.\n" -#| " --version show the version.\n" msgid "" "Commands:\n" " --get <flag> output the requested flag to stdout.\n" @@ -227,6 +205,11 @@ msgstr "" " --origin <senyalador>\n" " mostra l'origen del senyalador a stdout, el valor és:\n" " vendor, system, user, env.\n" +" --status mostra una sinopsis amb tots els paràmetres que " +"afecten\n" +" el comportament de dpkg-buildflags, els senyaladors\n" +" resultants i els seus orígens.\n" +" --query com --status, però en format deb822.\n" " --query-features <àrea>\n" " mostra l'estat de les característiques de l'àrea " "donada.\n" @@ -238,10 +221,6 @@ msgstr "" " a un guió d'ordres, a make o a la línia d'ordres.\n" " --dump mostra tots els senyaladors de compilació amb els seus\n" " valors.\n" -" --status mostra una sinopsis amb tots els paràmetres que " -"afecten\n" -" el comportament de dpkg-buildflags, els senyaladors\n" -" resultants i els seus orígens.\n" " --help mostra aquest missatge d'ajuda.\n" " --version mostra la versió.\n" @@ -268,27 +247,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -346,16 +327,15 @@ msgstr "" " -nc, --no-pre-clean no preneteja l'arbre font (implica -b).\n" " --pre-clean preneteja l'arbre font (predeterminat)\n" " -tc, --post-clean neteja l'arbre font al finalitzar.\n" -" -D verifica dependències i conflictes de\n" +" -D, --check-builddeps verifica dependències i conflictes de\n" " construcció (predeterminat).\n" -" -d no verifica dependències ni conflictes de\n" +" -d, --no-check-builddeps no verifica dependències ni conflictes de\n" " construcció.\n" -" --[no-]check-builddeps ídem.\n" " --ignore-builtin-builddeps\n" " no verifica dependències de construcció\n" " incorporades.\n" " -P, --build-profiles=<perfils>\n" -" assumeix els perfils de construcció com " +" assumeix els <perfils> de construcció com " "actius\n" " (llista de valors separats per comes).\n" " -R, --rules-file=<regles> regles a executar (predeterminat a debian/" @@ -493,26 +473,9 @@ msgid "unknown option or argument %s" msgstr "l'opció o argument %s és desconeguda" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "s'està emprant una ordre-assolir-superusuari mentre s'és superusuari" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"no s'ha trobat fakeroot, instal·leu el paquet fakeroot,\n" -"especifiqueu una ordre amb l'opció -r, o executeu-ho com superusuari" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "no s'ha trobat l'ordre-assolir-superusuari «%s»" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" -msgstr "" +msgstr "l'opció %s només te sentit juntament amb l'opció %s" #: scripts/dpkg-buildpackage.pl #, perl-format @@ -592,36 +555,70 @@ msgid "unable to determine %s" msgstr "no es pot determinar %s" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "s'està emprant una ordre-assolir-superusuari mentre s'és superusuari" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"no s'ha trobat fakeroot, instal·leu el paquet fakeroot,\n" +"especifiqueu una ordre amb l'opció -r, o executeu-ho com superusuari" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "no s'ha trobat l'ordre-assolir-superusuari «%s»" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" -msgstr "" +msgstr "no s'accepta l'objectiu en el camp %s amb la paraula clau %s" #: scripts/dpkg-buildpackage.pl #, perl-format msgid "unknown %s field keyword %s in dpkg namespace" -msgstr "" +msgstr "paraula clau %s desconeguda en el camp %s a l'espai de noms de dpkg" #: scripts/dpkg-buildpackage.pl -#, fuzzy, perl-format -#| msgid "unknown build type %s" +#, perl-format msgid "unknown %s field keyword %s" -msgstr "tipus de construcció «%s» desconegut" +msgstr "paraula clau %s desconeguda en el camp %s" #: scripts/dpkg-buildpackage.pl #, perl-format msgid "field %s contains duplicate keyword %s" -msgstr "" +msgstr "el camp %s conté la paraula clau duplicada «%s»" #: scripts/dpkg-buildpackage.pl #, perl-format msgid "%s field contains both global and implementation specific keywords" -msgstr "" +msgstr "el camp %s conté paraules clau globals i especifiques d'implementació" #: scripts/dpkg-buildpackage.pl #, perl-format msgid "unknown %% substitution in hook: %%%s" msgstr "la substitució %% és desconeguda en el lligam: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" +"els identificador de clau OpenPGP curts estan trencats; empreu empremtes de " +"clau a %s o %s" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" +"els identificadors de clau OpenPGP llargs estan descoratjats; empreu " +"empremtes de clau a %s o %s" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -766,8 +763,9 @@ msgstr "" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "no es pot escriure %s" @@ -778,22 +776,6 @@ msgid "install new files list file" msgstr "no es pot instal·lar la nova llista de fitxers" #: scripts/dpkg-genbuildinfo.pl -#, fuzzy -#| msgid "" -#| "Options:\n" -#| " --build=<type>[,...] specify the build <type>: full, source, " -#| "binary,\n" -#| " any, all (default is 'full').\n" -#| " -c<control-file> get control info from this file.\n" -#| " -l<changelog-file> get per-version info from this file.\n" -#| " -f<files-list-file> get .deb files list from this file.\n" -#| " -F<changelog-format> force changelog format.\n" -#| " -O[<buildinfo-file>] write to stdout (or <buildinfo-file>).\n" -#| " -u<upload-files-dir> directory with files (default is '..').\n" -#| " --always-include-path always include Build-Path.\n" -#| " --admindir=<directory> change the administrative directory.\n" -#| " -?, --help show this help message.\n" -#| " --version show the version.\n" msgid "" "Options:\n" " --build=<type>[,...] specify the build <type>: full, source, binary,\n" @@ -820,6 +802,7 @@ msgstr "" " -O[<fitxer-buildinfo>] escriu a stdout (o <fitxer-buildinfo>).\n" " -u<dir-publicació> directori amb fitxers a publicar (predeterminat a " "«..»).\n" +" --always-include-kernel inclou sempre el camp Build-Kernel-Version.\n" " --always-include-path inclou sempre el camp Build-Path.\n" " --admindir=<directori> canvia el directori administratiu.\n" " -?, --help mostra aquest missatge d'ajuda.\n" @@ -902,7 +885,7 @@ msgstr "" " debian/substvars.\n" " -D<camp>=<valor> afegeix o sobreescriu un camp i valor.\n" " -U<camp> suprimeix un camp.\n" -" -O[<ftxer>] escriu les variables a stdout (predeterminat)\n" +" -O[<fitxer>] escriu les variables a stdout (predeterminat)\n" " o al <fitxer>.\n" " -?, --help mostra aquest missatge d'ajuda.\n" " --version mostra la versió.\n" @@ -920,7 +903,7 @@ msgstr "manca el camp Section pels fitxers font" msgid "missing Priority for source files" msgstr "manca el camp Priority pels fitxers font" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s és buit" @@ -968,14 +951,6 @@ msgstr "" msgid "package %s in control file but not in files list" msgstr "el paquet %s és al fitxer de control però no a la llista de fitxers" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "no es pot llegir %s" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1140,6 +1115,8 @@ msgstr "no s'ha pogut instal·lar el fitxer de control de sortida «%s»" #: scripts/dpkg-gensymbols.pl msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1173,6 +1150,8 @@ msgid "" " --version show the version.\n" msgstr "" "Opcions:\n" +" -l<directori> afegeix el directori a la llista de cerca de\n" +" biblioteques compartides privades.\n" " -p<paquet> genera el fitxer de símbols per a <paquet>.\n" " -P<dir-construcció> directori temporal de construcció, i no debian/" "tmp.\n" @@ -1427,6 +1406,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1442,22 +1422,23 @@ msgid "" " the top (or tail if <number> is lower than 0).\n" msgstr "" "Opcions de l'analitzador:\n" -" --format <format-sortida>\n" +" --format <format-sortida>\n" " vegeu la pàgina de manual per la llista de " "formats\n" " de sortida disponibles, el valor predeterminat\n" " és «dpkg».\n" -" --all inclou tots els canvis.\n" -" -s, --since <versió> inclou tots els canvis posteriors a <versió>.\n" -" -v <versió> ídem.\n" -" -u, --until <versió> inclou tots els canvis anteriors a <versió>.\n" -" -f, --from <versió> inclou tots els canvis iguals o posteriors a\n" +" --reverse inclou tots els canvis en ordre invertit.\n" +" --all inclou tots els canvis.\n" +" -s, --since <versió> inclou tots els canvis posteriors a <versió>.\n" +" -v <versió> ídem.\n" +" -u, --until <versió> inclou tots els canvis anteriors a <versió>.\n" +" -f, --from <versió> inclou tots els canvis iguals o posteriors a\n" " <versió>.\n" -" -t, --to <versió> inclou tots els canvis fins o iguals a <versió>.\n" -" -c, --count <número> inclou el <número> d'entrades des del principi,\n" +" -t, --to <versió> inclou tots els canvis fins o iguals a <versió>.\n" +" -c, --count <número> inclou el <número> d'entrades des del principi,\n" " o des del final si <número> és inferior a 0.\n" -" -n <número> ídem.\n" -" -o, --offset <número> canvia el punt d'inici per a --count, contant\n" +" -n <número> ídem.\n" +" -o, --offset <número> canvia el punt d'inici per a --count, contant\n" " des del principi, o des del final si <número>\n" " és inferior a 0.\n" @@ -1592,6 +1573,11 @@ msgid "couldn't close stdout" msgstr "no s'ha pogut tancar la sortida estàndard" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" +"Paquets amb múltiples instancies però no s'ha especificat --multiversion:" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "" "Paquets en el fitxer de substitució amb valor antic de mantenidor incorrecte:" @@ -1894,7 +1880,8 @@ msgstr "" "fitxer d'informació «%.255s» de la biblioteca dinàmica, línia %d dolenta: " "«%s»" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "no es pot obrir el fitxer %s" @@ -1943,7 +1930,7 @@ msgstr "no es pot fer «stat» sobre el fitxer %s" msgid "directory argument %s is not a directory" msgstr "l'argument directori %s no és un directori" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -1971,6 +1958,11 @@ msgstr "es requereix una opció d'acció" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "no s'ha especificat el format del font a %s, vegeu dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s no conté cap informació del paquet font" @@ -2005,11 +1997,6 @@ msgstr "s'està construint el font per a un llançament només binari" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "no s'ha especificat el format del font a %s, vegeu dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "no es pot construir amb format de font «%s»: %s" @@ -2185,7 +2172,7 @@ msgstr "" "vàlida.\n" " --require-strong-checksums\n" " interromp si el paquet no té sumes de " -"comprovació\n" +"verificació\n" " fortes.\n" " --ignore-bad-version permet versions de font no vàlides." @@ -2262,6 +2249,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "«%s» no és una cadena d'arquitectura vàlida a la llista «%s»" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "no es pot llegir %s" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2329,8 +2324,8 @@ msgstr "només es pot especificar «to» o «until», s'emprarà «until»" #: scripts/Dpkg/Changelog.pm #, perl-format -msgid "'%s' option specifies non-existing version" -msgstr "l'opció «%s» especifica una versió inexistent" +msgid "'%s' option specifies non-existing version '%s'" +msgstr "l'opció «%s» especifica una versió «%s» inexistent" #: scripts/Dpkg/Changelog.pm msgid "use newest entry that is earlier than the one specified" @@ -2346,16 +2341,18 @@ msgstr "empra l'entrada més antiga que és posterior a l'especificada" #: scripts/Dpkg/Changelog.pm #, perl-format -msgid "no such entry found, ignoring '%s' parameter" -msgstr "no s'ha trobat l'entrada, s'ignorarà el paràmetre «%s»" +msgid "no such entry found, ignoring '%s' parameter '%s'" +msgstr "no s'ha trobat l'entrada, s'ignorarà el paràmetre «%s» = «%s»" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" -msgstr "l'opció «since» especifica la versió més recent, s'ignorarà" +#, perl-format +msgid "'since' option specifies most recent version '%s', ignoring" +msgstr "l'opció «since» especifica la versió «%s» més recent, s'ignorarà" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" -msgstr "l'opció «until» especifica la versió més antiga, s'ignorarà" +#, perl-format +msgid "'until' option specifies oldest version '%s', ignoring" +msgstr "l'opció «until» especifica la versió «%s» més antiga, s'ignorarà" #: scripts/Dpkg/Changelog/Debian.pm msgid "first heading" @@ -2461,7 +2458,7 @@ msgstr "el nom del mes abreviat «%s» no es vàlid" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, perl-format -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "no es pot analitzar la data no conforme «%s»" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2470,13 +2467,8 @@ msgstr "el final no coincideix amb la regex esperada" #: scripts/Dpkg/Changelog/Parse.pm #, perl-format -msgid "cannot create pipe for %s" -msgstr "no es pot crear el conducte per a %s" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "cua de %s" +msgid "cannot seek into file %s" +msgstr "no es pot reposicionar al fitxer «%s»" #: scripts/Dpkg/Changelog/Parse.pm #, perl-format @@ -2667,10 +2659,9 @@ msgid "block lacks the '%s' field" msgstr "el bloc no conté el camp «%s»" #: scripts/Dpkg/Control/Tests/Entry.pm -#, fuzzy, perl-format -#| msgid "block lacks the '%s' field" +#, perl-format msgid "block lacks either %s or %s fields" -msgstr "el bloc no conté el camp «%s»" +msgstr "el bloc no conté els camps «%s» o «%s»" #: scripts/Dpkg/Deps.pm #, perl-format @@ -2723,21 +2714,19 @@ msgid "error" msgstr "error" #: scripts/Dpkg/ErrorHandling.pm -#, fuzzy, perl-format -#| msgid "%s gave error exit status %s" +#, perl-format msgid "%s subprocess returned exit status %d" -msgstr "%s ha fallat amb el codi d'eixida d'error %s" +msgstr "el subprocés «%s» ha retornat codi d'eixida %d" #: scripts/Dpkg/ErrorHandling.pm #, perl-format msgid "%s subprocess was killed by signal %d" -msgstr "" +msgstr "el subprocés «%s» ha estat finalitzat pel senyal %d" #: scripts/Dpkg/ErrorHandling.pm -#, fuzzy, perl-format -#| msgid "%s failed with unknown exit code %d" +#, perl-format msgid "%s subprocess failed with unknown status code %d" -msgstr "%s ha fallat amb el codi d'eixida d'error desconegut %d" +msgstr "el subprocés «%s» ha fallat amb el codi d'estat desconegut %d" #: scripts/Dpkg/ErrorHandling.pm msgid "Use --help for program usage information." @@ -2793,29 +2782,27 @@ msgstr "no s'ha pogut obtenir el blocatge d'escriptura per a %s" #: scripts/Dpkg/OpenPGP.pm msgid "signature file is already OpenPGP ASCII armor, copying" -msgstr "" +msgstr "el fitxer de signatura ja és armat en OpenPGP ASCII, s'esta copiant" #: scripts/Dpkg/OpenPGP.pm msgid "cannot OpenPGP ASCII armor signature file due to missing gpg" msgstr "" +"no es pot armar el fitxer de signatura en OpenPGP ASCII ja que manca gpg" #: scripts/Dpkg/OpenPGP.pm -#, fuzzy, perl-format -#| msgid "cannot create pipe for %s" +#, perl-format msgid "cannot create signature file %s" -msgstr "no es pot crear el conducte per a %s" +msgstr "no es pot crear el fitxer de signatura %s" #: scripts/Dpkg/OpenPGP.pm -#, fuzzy, perl-format -#| msgid "cannot write %s" +#, perl-format msgid "cannot execute %s program" -msgstr "no es pot escriure %s" +msgstr "no es pot executar el programa %s" #: scripts/Dpkg/OpenPGP.pm -#, fuzzy, perl-format -#| msgid "cannot stat file %s" +#, perl-format msgid "cannot write signature file %s" -msgstr "no es pot fer «stat» al fitxer «%s»" +msgstr "no es pot escriure el fitxer de signatura «%s»" #: scripts/Dpkg/Package.pm msgid "may not be empty string" @@ -2830,6 +2817,14 @@ msgstr "el caràcter «%s» no és permès" msgid "must start with an alphanumeric character" msgstr "ha de començar amb un caràcter alfanumèric" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" +"ús obsolet de LD_LIBRARY_PATH amb directori de biblioteques privades que " +"interfereix amb la compilació creuada, empreu l'opció -l en el seu lloc" + #: scripts/Dpkg/Shlibs/Objdump.pm #, perl-format msgid "unknown executable format in file '%s'" @@ -2932,6 +2927,36 @@ msgstr "no es pot canviar la marca horària per a %s" msgid "cannot read timestamp from %s" msgstr "no es pot llegir la marca horària de %s" +#: scripts/Dpkg/Source/Functions.pm +#, perl-format +msgid "cannot open file %s for binary detection" +msgstr "no es pot obrir el fitxer %s per a detecció binaria" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "s'està afegint %s a %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "fitxer binari no desitjat: %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"s'ha detectat %d fitxer binari no desitjat (afegiu-lo a debian/source/" +"include-binaries per permetre la seva inclusió)." +msgstr[1] "" +"s'han detectat %d fitxers binaries no desitjats (afegiu-los a debian/source/" +"include-binaries per permetre la seva inclusió)." + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -2948,15 +2973,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "no s'admet el format del paquet font «%s»: %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "la variant de format ha de ser en minúscules" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "el camp Format no és vàlid «%s»" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "el paquet font només empra sumes de comprovació dèbils" @@ -3379,26 +3395,6 @@ msgstr "s'han trobat canvis locals, els fitxers modificats són:" msgid "-b takes only one parameter with format '%s'" msgstr "l'opció -b només admet un paràmetre amb el format «%s»" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "fitxer binari no desitjat: %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"s'ha detectat %d fitxer binari no desitjat (afegiu-lo a debian/source/" -"include-binaries per permetre la seva inclusió)." -msgstr[1] "" -"s'han detectat %d fitxers binaries no desitjats (afegiu-los a debian/source/" -"include-binaries per permetre la seva inclusió)." - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3471,11 +3467,6 @@ msgstr "no s'ha donat cap nom de pedaç; no es pot continuar" msgid "cannot find an editor" msgstr "no s'ha trobat un editor" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "s'està afegint %s a %s" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -3515,8 +3506,8 @@ msgid "uncommitted, not-ignored changes in working directory: %s" msgstr "hi ha canvis sense publicar no ignorats en el directori de treball: %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" -msgstr "el format v3.0 només empra un sol fitxer font" +msgid "format v3.0 (bzr) uses only one source file" +msgstr "el format v3.0 (bzr) només empra un sol fitxer font" #: scripts/Dpkg/Source/Package/V3/Bzr.pm #, perl-format @@ -3640,6 +3631,11 @@ msgstr "no es pot crear l'enllaç simbòlic %s" #: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format +msgid "using patch list from %s" +msgstr "s'esta emprant la llista de pedaços de %s" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "versió no admesa de les metadades quilt: %s" @@ -3683,6 +3679,11 @@ msgstr "tipus de fitxer desconegut" #: scripts/Dpkg/Source/Patch.pm #, perl-format +msgid "ignoring deletion of file %s" +msgstr "s'omet la supressió del fitxer %s" + +#: scripts/Dpkg/Source/Patch.pm +#, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "" "s'omet la supressió del fitxer %s, empreu --include-removal per forçar-ho" @@ -3923,13 +3924,13 @@ msgstr "la variable de substitució ${%s} és obsoleta" #: scripts/Dpkg/Substvars.pm #, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "la variable de substitució ${%s} és desconeguda" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "la variable de substitució ${%s} s'utilitza, però no s'ha definit" #: scripts/Dpkg/Substvars.pm #, perl-format -msgid "unused substitution variable ${%s}" -msgstr "la variable de substitució ${%s} no s'utilitza" +msgid "substitution variable ${%s} unused, but is defined" +msgstr "la variable de substitució ${%s} no s'utilitza, però s'ha definit" #: scripts/Dpkg/Vars.pm #, perl-format @@ -3997,6 +3998,21 @@ msgstr "el número de versió conté un caràcter il·legal ‘%s‘" msgid "epoch part of the version number is not a number: '%s'" msgstr "l'època en la versió no és un número: «%s»" +#~ msgid "format variant must be in lowercase" +#~ msgstr "la variant de format ha de ser en minúscules" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "el camp Format no és vàlid «%s»" + +#~ msgid "cannot create pipe for %s" +#~ msgstr "no es pot crear el conducte per a %s" + +#~ msgid "tail of %s" +#~ msgstr "cua de %s" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "la variable de substitució ${%s} és desconeguda" + #~ msgid "%s died from signal %s" #~ msgstr "%s ha mort d'una senyal %s" diff --git a/scripts/po/de.po b/scripts/po/de.po index 841792f4d..5125cb9c8 100644 --- a/scripts/po/de.po +++ b/scripts/po/de.po @@ -1,13 +1,13 @@ # German translation of the scripts in the dpkg package # This file is distributed under the same license as the dpkg package. -# (C) Helge Kreutzmann <debian@helgefjell.de>, 2007-2017. +# (C) Helge Kreutzmann <debian@helgefjell.de>, 2007-2019. # msgid "" msgstr "" -"Project-Id-Version: dpkg-dev 1.18.8\n" +"Project-Id-Version: dpkg-dev 1.20.0\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" -"PO-Revision-Date: 2017-10-17 21:29+0200\n" +"POT-Creation-Date: 2019-11-01 05:32+0100\n" +"PO-Revision-Date: 2019-11-01 06:12+0100\n" "Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n" "Language-Team: German <debian-l10n-german@lists.debian.org>\n" "Language: de\n" @@ -238,27 +238,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -285,7 +287,7 @@ msgid "" " pass option <opt> to dpkg-genbuildinfo.\n" " -p, --sign-command=<command>\n" " command to sign .dsc and/or .changes files\n" -" (default is gpg2 or gpg).\n" +" (default is gpg).\n" " -k, --sign-key=<keyid> the key to use for signing.\n" " -ap, --sign-pause add pause before starting signature process.\n" " -us, --unsigned-source unsigned source package.\n" @@ -299,27 +301,30 @@ msgid "" msgstr "" "Optionen:\n" " --build=<Typ>[,…] legt den Bau-<Typ> fest: full, source, binary, any,\n" -" all (Vorgabe ist »full«)\n" -" -F normaler kompletter Bau (Quellen und Binärdateien,\n" -" Standard)\n" -" -g Quell- und Architektur-unabhängiger Bau\n" -" -G Quell- und Architektur-abhängiger Bau\n" -" -b nur binär, keine Quelldateien\n" -" -B nur binär, nur Architektur-spezifische-Dateien\n" -" -A nur binär, nur Architektur-indep-Dateien\n" -" -S nur Quelle, keine Binärdateien\n" +" all (Vorgabe ist »full«)\n" +" -F, --build=full normaler kompletter Bau (Quellen und Binärdateien,\n" +" Standard)\n" +" -g, --build=source,all Quell- und Architektur-unabhängiger Bau\n" +" -G, --build=source,any Quell- und Architektur-abhängiger Bau\n" +" -b, --build=binary nur binär, keine Quelldateien\n" +" -B, --build=any nur binär, nur Architektur-spezifische-Dateien\n" +" -A, --build=all nur binär, nur Architektur-indep-Dateien\n" +" -S, --build=source nur Quelle, keine Binärdateien\n" " -nc, --no-pre-clean Quellbaum vorab nicht säubern (impliziert -b)\n" " --pre-clean Quellbaum vorab säubern (Standard)\n" -" -tc, --post-clean nach Abschluss Quellbaum säubern\n" -" -D Bauabhängigkeiten und -konflikte prüfen, Standard\n" -" -d Bauabhängigkeiten und -konflikte nicht prüfen\n" -" --[no-]check-builddeps\n" -" dito.\n" +" --no-post-clean Quellbaum nicht abschließend säubern (Standard).\n" +" -tc, --post-clean Quellbaum abschließend säubern.\n" +" -D, --check-builddeps\n" +" Bauabhängigkeiten und -konflikte prüfen (Standard)\n" +" -d, --no-check-builddeps Bauabhängigkeiten und -konflikte nicht prüfen\n" " --ignore-builtin-builddeps\n" " eingebaute Bauabhängigkeiten nicht prüfen\n" " -P, --build-profiles=<Profile>\n" -" Kommata-getrennte übergebene Bauprofile als aktiv\n" -" annehmen -R, --rules-file=<rules>\n" +" Kommata-getrennte übergebene Bau-<Profile> als aktiv\n" +" annehmen\n" +" --rules-requires-root\n" +" alten Feldwert »Rules-Requires-Root« annehmen\n" +" -R, --rules-file=<rules>\n" " auszuführende rules-Datei (Vorgabe: debian/rules)\n" " -T, --rules-target=<Ziel>\n" " debian/rules <Ziel> mit der korrekten Umgebung " @@ -350,7 +355,7 @@ msgstr "" " -p, --sign-command=<Befehl>\n" " Befehl, um .dsc- und/oder .changes-Dateien zu " "signieren\n" -" (standardmäßig gpg2 oder gpg)\n" +" (standardmäßig gpg)\n" " -k, --sign-key=<Schlüssel-ID>\n" " Für die Signierung zu verwendender Schlüssel\n" " -ap, --sign-pause Pause vor Beginn des Signaturprozesses einfügen\n" @@ -455,23 +460,6 @@ msgid "unknown option or argument %s" msgstr "unbekannte Option oder Argument %s" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "Verwendung eines root-werde-Befehls, obwohl bereits root" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"Fakeroot nicht gefunden; installieren Sie entweder das Fakeroot-Paket,\n" -"geben Sie einen Befehl mit der Option -r an oder führen Sie dies als root aus" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "root-werde-Befehl »%s« nicht gefunden" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "Option %s hat nur zusammen mit der Option %s eine Bedeutung" @@ -554,6 +542,23 @@ msgid "unable to determine %s" msgstr "%s kann nicht bestimmt werden" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "Verwendung eines root-werde-Befehls, obwohl bereits root" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"Fakeroot nicht gefunden; installieren Sie entweder das Fakeroot-Paket,\n" +"geben Sie einen Befehl mit der Option -r an oder führen Sie dies als root aus" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "root-werde-Befehl »%s« nicht gefunden" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "nicht erlaubtes Ziel im %s-Feld-Schlüsselwort %s" @@ -585,6 +590,24 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "unbekannte %% Substitution in Hook: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" +"kurze OpenGPG-Schlüsselkennungen sind defekt; bitte verwenden Sie " +"stattdessen Fingerabdrücke in %s oder %s" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" +"von langen OpenPGP-Schlüsselkennungen wird klar abgeraten; bitte verwenden " +"Sie stattdessen Fingerabdrücke in %s oder %s" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -601,6 +624,11 @@ msgid "cannot close %s" msgstr "%s kann nicht geschlossen werden" #: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "cannot move %s to %s" +msgstr "%s kann nicht in %s verschoben werden" + +#: scripts/dpkg-buildpackage.pl msgid "source-only upload: Debian-native package" msgstr "Nur Quelle hochzuladen: Debian-native-Paket" @@ -728,8 +756,9 @@ msgstr "" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "%s kann nicht geschrieben werden" @@ -865,7 +894,7 @@ msgstr "fehlende Sektion für Quelldateien" msgid "missing Priority for source files" msgstr "fehlende Priorität für Quelldateien" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s ist leer" @@ -911,14 +940,6 @@ msgstr "binärer Bau ohne binäre Produkte gefunden; kann nicht verteilt werden" msgid "package %s in control file but not in files list" msgstr "Paket %s in Steuerdatei, aber nicht in Dateiliste" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "%s kann nicht gelesen werden" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1073,6 +1094,8 @@ msgstr "Ausgabe-Steurdatei »%s« kann nicht installiert werden" #: scripts/dpkg-gensymbols.pl msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1106,6 +1129,8 @@ msgid "" " --version show the version.\n" msgstr "" "Optionen:\n" +" -l<library-path> Verzeichnis zur privaten Suchliste für gemeinsam\n" +" benutzte Bibliotheken hinzufügen\n" " -p<Paket> Symboldatei für Paket erstellen\n" " -P<Paketbauverz> temporäres Bauverzeichnis (statt debian/tmp)\n" " -e<Bibliothek> explizite Liste von zu durchsuchenden Dateien\n" @@ -1356,6 +1381,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1373,6 +1399,8 @@ msgstr "" "Auswerteroptionen:\n" " --format <Ausgabeformat>\n" " setzt das Ausgabeformat (Vorgabe: »dpkg«)\n" +" --reverse fügt alle Änderungen in umgekehrter Reihenfolge " +"ein\n" " --all fügt alle Änderungen hinzu\n" " -s, --since <Version> fügt alle Änderungen jünger als <Version> hinzu\n" " -v <Version> ebnso\n" @@ -1519,6 +1547,10 @@ msgid "couldn't close stdout" msgstr "Stdout konnte nicht geschlossen werden" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "Pakete mit mehreren Instanzen aber kein --multiversion angegeben:" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "Pakete in Override-Datei mit ungültigem alten Betreuer-Wert:" @@ -1823,7 +1855,8 @@ msgid "shared libs info file '%s' line %d: bad line '%s'" msgstr "" "Informationsdatei »%s« der Laufzeitbibliothek, Zeile %d: ungültige Zeile »%s«" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "Datei %s kann nicht geöffnet werden" @@ -1872,7 +1905,7 @@ msgstr "Verzeichnis %s kann nicht mit stat abgefragt werden" msgid "directory argument %s is not a directory" msgstr "Verzeichnis-Argument %s ist kein Verzeichnis" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -1900,6 +1933,11 @@ msgstr "eine Aktions-Option wird benötigt" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "kein Quellformat in %s angegeben, lesen Sie dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s enthält keine Informationen über das Quellpaket" @@ -1932,11 +1970,6 @@ msgstr "Quelle für eine rein-binäre Veröffentlichung wird gebaut" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "kein Quellformat in %s angegeben, lesen Sie dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "unmöglich, mit Quellformat »%s« zu bauen: %s" @@ -2197,6 +2230,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "»%s« ist keine gültige Architektur in der Liste »%s«" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "%s kann nicht gelesen werden" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2268,8 +2309,8 @@ msgstr "" #: scripts/Dpkg/Changelog.pm #, perl-format -msgid "'%s' option specifies non-existing version" -msgstr "Option »%s« gibt nicht existierende Version an" +msgid "'%s' option specifies non-existing version '%s'" +msgstr "Option »%s« gibt nicht existierende Version »%s« an" #: scripts/Dpkg/Changelog.pm msgid "use newest entry that is earlier than the one specified" @@ -2285,16 +2326,18 @@ msgstr "ältester Eintrag wird verwendet, der neuer als der angegebene ist" #: scripts/Dpkg/Changelog.pm #, perl-format -msgid "no such entry found, ignoring '%s' parameter" -msgstr "kein solcher Eintrag gefunden, Parameter »%s« wird ignoriert" +msgid "no such entry found, ignoring '%s' parameter '%s'" +msgstr "kein solcher Eintrag gefunden, »%s«-Parameter »%s« wird ignoriert" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" -msgstr "Option »since« gibt die neuste Version an, wird ignoriert" +#, perl-format +msgid "'since' option specifies most recent version '%s', ignoring" +msgstr "Option »since« gibt die neuste Version »%s« an, wird ignoriert" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" -msgstr "Option »until« gibt die älteste Version an, wird ignoriert" +#, perl-format +msgid "'until' option specifies oldest version '%s', ignoring" +msgstr "Option »until« gibt die älteste Version »%s« an, wird ignoriert" #: scripts/Dpkg/Changelog/Debian.pm msgid "first heading" @@ -2400,7 +2443,7 @@ msgstr "ungültig abgekürzter Monatsname »%s«" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, perl-format -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "nicht konformes Datum kann nicht ausgewertet werden: »%s«" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2409,13 +2452,8 @@ msgstr "der Abspann passte nicht auf den erwarteten regulären Ausdruck" #: scripts/Dpkg/Changelog/Parse.pm #, perl-format -msgid "cannot create pipe for %s" -msgstr "Pipe für %s kann nicht angelegt werden" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "Ende von %s" +msgid "cannot seek into file %s" +msgstr "auf die Datei %s kann nicht mit seek zugegriffen werden" #: scripts/Dpkg/Changelog/Parse.pm #, perl-format @@ -2750,6 +2788,28 @@ msgstr "Programm %s kann nicht ausgeführt werden" msgid "cannot write signature file %s" msgstr "Signaturdatei %s kann nicht geschrieben werden" +#: scripts/Dpkg/OpenPGP.pm +#, perl-format +msgid "cannot import key in %s since GnuPG is not installed" +msgstr "" +"Schlüssel kann nicht in %s importiert werden, da GnuPG nicht installiert ist" + +#: scripts/Dpkg/OpenPGP.pm +#, perl-format +msgid "failed to import key in %s" +msgstr "Fehlschlag beim Import des Schlüssels in %s" + +#: scripts/Dpkg/OpenPGP.pm +#, perl-format +msgid "cannot verify signature on %s since GnuPG is not installed" +msgstr "" +"Signatur von %s kann nicht überprüft werden, da GnuPG nicht installiert ist" + +#: scripts/Dpkg/OpenPGP.pm +#, perl-format +msgid "failed to verify signature on %s" +msgstr "Fehler beim Überprüfen der Signatur von %s" + #: scripts/Dpkg/Package.pm msgid "may not be empty string" msgstr "darf keine leere Zeichenkette sein" @@ -2763,6 +2823,14 @@ msgstr "Zeichen »%s« ist nicht erlaubt" msgid "must start with an alphanumeric character" msgstr "muss mit einem alphanumerischen Zeichen beginnen" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" +"veraltete Verwendung von LD_LIBRARY_PATH mit privaten Bibliotheksverzeichnis " +"stört Cross-Bau, bitte verwenden Sie stattdessen die Option »-l«" + #: scripts/Dpkg/Shlibs/Objdump.pm #, perl-format msgid "unknown executable format in file '%s'" @@ -2868,6 +2936,36 @@ msgstr "Zeitstempel für %s kann nicht geändert werden" msgid "cannot read timestamp from %s" msgstr "Zeitstempel für %s kann nicht gelesen werden" +#: scripts/Dpkg/Source/Functions.pm +#, perl-format +msgid "cannot open file %s for binary detection" +msgstr "kann Datei %s nicht zur Binärerkennung öffnen" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "%s wird zu %s hinzugefügt" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "unerwünschte Binärdatei: %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"erkannte %d unerwünschte Binärdatei (fügen Sie sie zu debian/source/include-" +"binaries hinzu, um ihre Aufnahme zu erlauben)." +msgstr[1] "" +"erkannte %d unerwünschte Binärdateien (fügen Sie sie zu debian/source/" +"include-binaries hinzu, um ihre Aufnahme zu erlauben)." + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -2884,15 +2982,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "Quellpaketformat »%s« wird nicht unterstützt: %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "Formatvariante muss Kleinbuchstaben verwenden" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "ungültiges Formatfeld »%s«" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "Quellpaket verwendet nur schwache Prüfsummen" @@ -2904,15 +2993,10 @@ msgstr "" "ermitteln" #: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "failed to verify signature on %s" -msgstr "Fehler beim Überprüfen der Signatur von %s" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "cannot verify signature on %s since GnuPG is not installed" +msgid "upstream tarball signatures but no upstream signing key" msgstr "" -"Signatur von %s kann nicht überprüft werden, da GnuPG nicht installiert ist" +"Tarball-Signatur der Originalautoren aber kein Signaturschlüssel der " +"Originalautoren" #: scripts/Dpkg/Source/Package.pm #, perl-format @@ -2921,6 +3005,11 @@ msgstr "%s ist keine gültige Option für %s." #: scripts/Dpkg/Source/Package.pm #, perl-format +msgid "cannot copy %s to %s" +msgstr "%s kann nicht nach %s kopiert werden" + +#: scripts/Dpkg/Source/Package.pm +#, perl-format msgid "%s does not exist" msgstr "%s existiert nicht." @@ -3316,26 +3405,6 @@ msgstr "lokale Änderungen erkannt, die veränderten Dateien sind:" msgid "-b takes only one parameter with format '%s'" msgstr "-b akzeptiert nur einen Parameter mit dem Format »%s«" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "unerwünschte Binärdatei: %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"erkannte %d unerwünschte Binärdatei (fügen Sie sie zu debian/source/include-" -"binaries hinzu, um ihre Aufnahme zu erlauben)." -msgstr[1] "" -"erkannte %d unerwünschte Binärdateien (fügen Sie sie zu debian/source/" -"include-binaries hinzu, um ihre Aufnahme zu erlauben)." - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3408,11 +3477,6 @@ msgstr "Kein Patch-Name angegeben; es kann nicht fortgefahren werden" msgid "cannot find an editor" msgstr "Es kann kein Editor gefunden werden" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "%s wird zu %s hinzugefügt" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -3453,8 +3517,8 @@ msgstr "" "noch nicht übergebene, nicht ignorierte Änderungen im Arbeitsverzeichnis: %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" -msgstr "Format v3.0 verwendet nur eine Quelldatei" +msgid "format v3.0 (bzr) uses only one source file" +msgstr "Format v3.0 (bzr) verwendet nur eine Quelldatei" #: scripts/Dpkg/Source/Package/V3/Bzr.pm #, perl-format @@ -3579,6 +3643,11 @@ msgstr "Symlink %s kann nicht angelegt werden" #: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format +msgid "using patch list from %s" +msgstr "Patchliste aus %s wird verwendet" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "nicht unterstützte Version der Quilt-Metadaten: %s" @@ -3623,6 +3692,11 @@ msgstr "unbekannter Dateityp" #: scripts/Dpkg/Source/Patch.pm #, perl-format +msgid "ignoring deletion of file %s" +msgstr "Löschen der Datei %s wird ignoriert" + +#: scripts/Dpkg/Source/Patch.pm +#, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "" "Löschen der Datei %s wird ignoriert, verwenden Sie --include-removal zum " @@ -3863,13 +3937,13 @@ msgstr "veraltete Substitutionsvariable ${%s}" #: scripts/Dpkg/Substvars.pm #, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "unbekannte Substitutionsvariable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "unbenutzte Variable ${%s} verwandt, aber nicht definiert" #: scripts/Dpkg/Substvars.pm #, perl-format -msgid "unused substitution variable ${%s}" -msgstr "unbenutzte Substitutionsvariable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" +msgstr "Substitutionsvariable ${%s} unbenutzt, aber definiert" #: scripts/Dpkg/Vars.pm #, perl-format @@ -3937,6 +4011,21 @@ msgstr "Versionsnummer enthält ungültiges Zeichen »%s«" msgid "epoch part of the version number is not a number: '%s'" msgstr "Epoch-Teil der Versionsnummer ist keine Zahl: »%s«" +#~ msgid "format variant must be in lowercase" +#~ msgstr "Formatvariante muss Kleinbuchstaben verwenden" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "ungültiges Formatfeld »%s«" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "unbekannte Substitutionsvariable ${%s}" + +#~ msgid "cannot create pipe for %s" +#~ msgstr "Pipe für %s kann nicht angelegt werden" + +#~ msgid "tail of %s" +#~ msgstr "Ende von %s" + #~ msgid "%s died from signal %s" #~ msgstr "%s wurde durch Signal %s getötet" @@ -4480,9 +4569,6 @@ msgstr "Epoch-Teil der Versionsnummer ist keine Zahl: »%s«" #~ msgid "1 to 3 args expected\n" #~ msgstr "1 bis 3 Argumente erwartet\n" -#~ msgid "cannot rename %s to %s" -#~ msgstr "%s kann nicht in %s umbenannt werden" - #~ msgid "no orig.tar file found" #~ msgstr "keine orig.tar-Datei gefunden" @@ -4772,9 +4858,6 @@ msgstr "Epoch-Teil der Versionsnummer ist keine Zahl: »%s«" #~ msgid "diff `%s' is missing trailing newline" #~ msgstr "Diff »%s« fehlt ein abschließender Zeilenumbruch" -#~ msgid "cannot open upload file %s for reading" -#~ msgstr "kann hochzuladene Datei %s nicht zum Lesen öffnen" - #~ msgid "cannot fstat upload file %s" #~ msgstr "kann keinen »fstat« auf hochzuladene Datei %s durchführen" diff --git a/scripts/po/dpkg-dev.pot b/scripts/po/dpkg-dev.pot index 31a0a9275..b08bc755e 100644 --- a/scripts/po/dpkg-dev.pot +++ b/scripts/po/dpkg-dev.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: dpkg 1.19.0\n" +"Project-Id-Version: dpkg 1.19.7\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -178,27 +178,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -302,21 +304,6 @@ msgid "unknown option or argument %s" msgstr "" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "" @@ -396,6 +383,21 @@ msgid "unable to determine %s" msgstr "" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "" @@ -425,6 +427,20 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -542,8 +558,9 @@ msgstr "" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "" @@ -626,7 +643,7 @@ msgstr "" msgid "missing Priority for source files" msgstr "" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "" @@ -668,14 +685,6 @@ msgstr "" msgid "package %s in control file but not in files list" msgstr "" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -806,6 +815,8 @@ msgstr "" #: scripts/dpkg-gensymbols.pl msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1027,6 +1038,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1154,6 +1166,10 @@ msgid "couldn't close stdout" msgstr "" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "" @@ -1382,7 +1398,8 @@ msgstr "" msgid "shared libs info file '%s' line %d: bad line '%s'" msgstr "" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "" @@ -1428,7 +1445,7 @@ msgstr "" msgid "directory argument %s is not a directory" msgstr "" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -1456,6 +1473,11 @@ msgstr "" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "" @@ -1486,11 +1508,6 @@ msgstr "" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "" @@ -1673,6 +1690,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -1738,7 +1763,7 @@ msgstr "" #: scripts/Dpkg/Changelog.pm #, perl-format -msgid "'%s' option specifies non-existing version" +msgid "'%s' option specifies non-existing version '%s'" msgstr "" #: scripts/Dpkg/Changelog.pm @@ -1755,15 +1780,17 @@ msgstr "" #: scripts/Dpkg/Changelog.pm #, perl-format -msgid "no such entry found, ignoring '%s' parameter" +msgid "no such entry found, ignoring '%s' parameter '%s'" msgstr "" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" +#, perl-format +msgid "'since' option specifies most recent version '%s', ignoring" msgstr "" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" +#, perl-format +msgid "'until' option specifies oldest version '%s', ignoring" msgstr "" #: scripts/Dpkg/Changelog/Debian.pm @@ -1870,7 +1897,7 @@ msgstr "" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, perl-format -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -1879,12 +1906,7 @@ msgstr "" #: scripts/Dpkg/Changelog/Parse.pm #, perl-format -msgid "cannot create pipe for %s" -msgstr "" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" +msgid "cannot seek into file %s" msgstr "" #: scripts/Dpkg/Changelog/Parse.pm @@ -2228,6 +2250,12 @@ msgstr "" msgid "must start with an alphanumeric character" msgstr "" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" + #: scripts/Dpkg/Shlibs/Objdump.pm #, perl-format msgid "unknown executable format in file '%s'" @@ -2326,28 +2354,45 @@ msgstr "" msgid "cannot read timestamp from %s" msgstr "" -#: scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Functions.pm #, perl-format -msgid "%s is not the name of a file" +msgid "cannot open file %s for binary detection" msgstr "" -#: scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/BinaryFiles.pm #, perl-format -msgid "missing critical source control field %s" +msgid "adding %s to %s" msgstr "" +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +msgstr[1] "" + #: scripts/Dpkg/Source/Package.pm #, perl-format -msgid "source package format '%s' is not supported: %s" +msgid "%s is not the name of a file" msgstr "" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" +#, perl-format +msgid "missing critical source control field %s" msgstr "" #: scripts/Dpkg/Source/Package.pm #, perl-format -msgid "invalid Format field '%s'" +msgid "source package format '%s' is not supported: %s" msgstr "" #: scripts/Dpkg/Source/Package.pm @@ -2749,22 +2794,6 @@ msgstr "" msgid "-b takes only one parameter with format '%s'" msgstr "" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -msgstr[1] "" - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -2833,11 +2862,6 @@ msgstr "" msgid "cannot find an editor" msgstr "" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -2873,7 +2897,7 @@ msgid "uncommitted, not-ignored changes in working directory: %s" msgstr "" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" +msgid "format v3.0 (bzr) uses only one source file" msgstr "" #: scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -2994,6 +3018,11 @@ msgstr "" #: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format +msgid "using patch list from %s" +msgstr "" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "" @@ -3036,6 +3065,11 @@ msgstr "" #: scripts/Dpkg/Source/Patch.pm #, perl-format +msgid "ignoring deletion of file %s" +msgstr "" + +#: scripts/Dpkg/Source/Patch.pm +#, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "" @@ -3267,12 +3301,12 @@ msgstr "" #: scripts/Dpkg/Substvars.pm #, perl-format -msgid "unknown substitution variable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" msgstr "" #: scripts/Dpkg/Substvars.pm #, perl-format -msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" msgstr "" #: scripts/Dpkg/Vars.pm diff --git a/scripts/po/es.po b/scripts/po/es.po index 7b79cb143..c01c9bde8 100644 --- a/scripts/po/es.po +++ b/scripts/po/es.po @@ -31,7 +31,7 @@ msgid "" msgstr "" "Project-Id-Version: dpkg-dev 1.16.8\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" "PO-Revision-Date: 2014-12-02 20:24+0100\n" "Last-Translator: Omar Campagne <ocampagne@gmail.com>\n" "Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" @@ -338,27 +338,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -569,25 +571,6 @@ msgid "unknown option or argument %s" msgstr "el argumento u opción «%s» es desconocido" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "" -"está usando una orden para convertirse en administrador («gain-root-" -"command»), a pesar de que ya es el administrador" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"no se ha encontrado fakeroot; puede instalar el paquete fakeroot,\n" -"definir una orden con la opción «-r», o ejecutar esto como administrador" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "no se ha encontrado la orden «%s» para convertirse en administrador" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "" @@ -676,6 +659,25 @@ msgid "unable to determine %s" msgstr "no se pudo determinar «%s»" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "" +"está usando una orden para convertirse en administrador («gain-root-" +"command»), a pesar de que ya es el administrador" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"no se ha encontrado fakeroot; puede instalar el paquete fakeroot,\n" +"definir una orden con la opción «-r», o ejecutar esto como administrador" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "no se ha encontrado la orden «%s» para convertirse en administrador" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "" @@ -706,6 +708,20 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "variable de sustitución %% desconocida en gancho: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -873,8 +889,9 @@ msgstr "" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "no se pudo escribir «%s»" @@ -1027,7 +1044,7 @@ msgstr "falta el campo «Section» para los ficheros de fuentes" msgid "missing Priority for source files" msgstr "falta el campo «Priority» para los ficheros de fuentes" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s está vacío" @@ -1083,14 +1100,6 @@ msgstr "" "el paquete %s está presente en el fichero «control» pero no en la lista de " "ficheros" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "no se puede leer %s" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1312,6 +1321,8 @@ msgstr "no se ha podido instalar el fichero de control de salida «%s»" #| " --version show the version.\n" msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1653,6 +1664,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1844,6 +1856,10 @@ msgid "couldn't close stdout" msgstr "No se ha podido cerrar la salida estándar" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "" "Paquetes en el fichero de sustituciones «override» con un valor incorrecto " @@ -2189,7 +2205,8 @@ msgstr "" "fichero de información de bibliotecas compartidas «%s», línea %d: línea " "incorrecta «%s»" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "no se ha podido abrir el fichero «%s»" @@ -2239,7 +2256,7 @@ msgstr "no se pudo obtener el estado («stat») del directorio «%s»" msgid "directory argument %s is not a directory" msgstr "el argumento de directorio «%s» no es un directorio" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -2267,6 +2284,12 @@ msgstr "es necesaria una opción de acción" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "" +"no se ha definido un formato de fuentes en «%s», consulte dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s no contiene información sobre el paquete fuente" @@ -2301,12 +2324,6 @@ msgstr "generando fuentes para una publicación solo binaria" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "" -"no se ha definido un formato de fuentes en «%s», consulte dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "no se puede construir con el formato de fuente «%s»: %s" @@ -2600,6 +2617,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "«%s» no es una cadena de arquitectura legal" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "no se puede leer %s" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2668,8 +2693,9 @@ msgid "you can only specify one of 'to' and 'until', using 'until'" msgstr "sólo puede definir o bien «to» o «until», usando «until»" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "'%s' option specifies non-existing version" +#, fuzzy, perl-format +#| msgid "'%s' option specifies non-existing version" +msgid "'%s' option specifies non-existing version '%s'" msgstr "la opción «%s» define un versión que no existe" #: scripts/Dpkg/Changelog.pm @@ -2685,16 +2711,21 @@ msgid "use oldest entry that is later than the one specified" msgstr "usar la entrada más antigua que es posterior a la que se ha definido" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "no such entry found, ignoring '%s' parameter" +#, fuzzy, perl-format +#| msgid "no such entry found, ignoring '%s' parameter" +msgid "no such entry found, ignoring '%s' parameter '%s'" msgstr "no se ha encontrado esa entrada, ignorando el parámetro «%s»" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" +#, fuzzy, perl-format +#| msgid "'since' option specifies most recent version, ignoring" +msgid "'since' option specifies most recent version '%s', ignoring" msgstr "la opción «since» define la versión más reciente, omitiendo" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" +#, fuzzy, perl-format +#| msgid "'until' option specifies oldest version, ignoring" +msgid "'until' option specifies oldest version '%s', ignoring" msgstr "la opción «until» define la versión más antigua, omitiendo" #: scripts/Dpkg/Changelog/Debian.pm @@ -2809,7 +2840,7 @@ msgstr "se ha detectado una opción inválida en %s: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "no se puede ejecutar el analizador de formato: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2820,14 +2851,9 @@ msgstr "" #: scripts/Dpkg/Changelog/Parse.pm #, fuzzy, perl-format -#| msgid "cannot create directory %s" -msgid "cannot create pipe for %s" -msgstr "no se puede crear el directorio «%s»" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "final de «%s»" +#| msgid "cannot stat file %s" +msgid "cannot seek into file %s" +msgstr "no se puede obtener el estado (stat) del fichero «%s»" #: scripts/Dpkg/Changelog/Parse.pm #, fuzzy, perl-format @@ -3215,6 +3241,12 @@ msgstr "no se permite el carácter «%s»" msgid "must start with an alphanumeric character" msgstr "debe empezar con un carácter alfanumérico" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" + #: scripts/Dpkg/Shlibs/Objdump.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" @@ -3328,6 +3360,37 @@ msgstr "no se puede cambiar la marca de tiempo de «%s»" msgid "cannot read timestamp from %s" msgstr "no se puede leer la marca de tiempo desde «%s»" +#: scripts/Dpkg/Source/Functions.pm +#, fuzzy, perl-format +#| msgid "cannot open file %s" +msgid "cannot open file %s for binary detection" +msgstr "no se ha podido abrir el fichero «%s»" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "añadiendo «%s» a «%s»" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "fichero binario no deseado: %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"se ha detectado %d fichero binario (añada este en «debian/source/include-" +"binaries» para permitir su inclusión)." +msgstr[1] "" +"se han detectado %d ficheros binarios (añada estos en «debian/source/include-" +"binaries» para permitir su inclusión)." + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -3344,15 +3407,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "no se permite el formato de paquete fuente «%s»: %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "la variante de formato debe estar en minúsculas" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "se ha detectado un campo «Format» inválido «%s»" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "" @@ -3810,26 +3864,6 @@ msgstr "se han detecta cambios locales, los ficheros modificados son:" msgid "-b takes only one parameter with format '%s'" msgstr "-b sólo toma un parámetro con formato «%s»" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "fichero binario no deseado: %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"se ha detectado %d fichero binario (añada este en «debian/source/include-" -"binaries» para permitir su inclusión)." -msgstr[1] "" -"se han detectado %d ficheros binarios (añada estos en «debian/source/include-" -"binaries» para permitir su inclusión)." - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3902,11 +3936,6 @@ msgstr "" msgid "cannot find an editor" msgstr "no se puede encontrar «%s»" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "añadiendo «%s» a «%s»" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -3948,7 +3977,9 @@ msgstr "" "directorio actual: %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" +#, fuzzy +#| msgid "format v3.0 uses only one source file" +msgid "format v3.0 (bzr) uses only one source file" msgstr "el formato v3.0 sólo usa un fichero de fuente" #: scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -4078,6 +4109,12 @@ msgid "can't create symlink %s" msgstr "no se puede crear el enlace simbólico «%s»" #: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, fuzzy, perl-format +#| msgid "using options from %s: %s" +msgid "using patch list from %s" +msgstr "usando opciones de %s: %s" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "la versión de los metadatos de quilt es incompatible: %s" @@ -4123,6 +4160,12 @@ msgstr "el tipo de fichero es desconocido" #: scripts/Dpkg/Source/Patch.pm #, fuzzy, perl-format +#| msgid "ignoring deletion of directory %s" +msgid "ignoring deletion of file %s" +msgstr "ignorando la eliminación del directorio «%s»" + +#: scripts/Dpkg/Source/Patch.pm +#, fuzzy, perl-format #| msgid "ignoring deletion of file %s" msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "ignorando la eliminación del fichero «%s»" @@ -4372,13 +4415,15 @@ msgid "obsolete substitution variable ${%s}" msgstr "la variable de sustitución ${%s} no está en uso" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "la variable de sustitución ${%s} es desconocida" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "la variable de sustitución ${%s} no está en uso" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unused substitution variable ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" msgstr "la variable de sustitución ${%s} no está en uso" #: scripts/Dpkg/Vars.pm @@ -4453,6 +4498,23 @@ msgstr "el número de versión contiene el carácter ilegal «%s»" msgid "epoch part of the version number is not a number: '%s'" msgstr "la sección «epoch» del número de versión no es un número: «%s»" +#~ msgid "format variant must be in lowercase" +#~ msgstr "la variante de formato debe estar en minúsculas" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "se ha detectado un campo «Format» inválido «%s»" + +#, fuzzy +#~| msgid "cannot create directory %s" +#~ msgid "cannot create pipe for %s" +#~ msgstr "no se puede crear el directorio «%s»" + +#~ msgid "tail of %s" +#~ msgstr "final de «%s»" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "la variable de sustitución ${%s} es desconocida" + #~ msgid "%s died from signal %s" #~ msgstr "%s murió con la señal %s" diff --git a/scripts/po/fr.po b/scripts/po/fr.po index 37958f9db..a6630bbfa 100644 --- a/scripts/po/fr.po +++ b/scripts/po/fr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dpkg-dev 1.17.7\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" "PO-Revision-Date: 2015-09-08 15:39+0200\n" "Last-Translator: Sébastien Poher <sbphr@volted.net>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" @@ -321,27 +321,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -558,26 +560,6 @@ msgid "unknown option or argument %s" msgstr "option ou paramètre inconnu %s" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "" -"utilisation d'une commande pour obtenir les privilèges administrateur en " -"tant qu'administrateur" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"fakeroot non trouvé, veuillez soit installer le paquet fakeroot,\n" -"soit indiquer une commande avec l'option -r ou exécuter cette\n" -"commande en tant qu'administrateur" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "commande pour obtenir les privilèges administrateur « %s » non trouvée" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "" @@ -662,6 +644,26 @@ msgid "unable to determine %s" msgstr "impossible de déterminer %s" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "" +"utilisation d'une commande pour obtenir les privilèges administrateur en " +"tant qu'administrateur" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"fakeroot non trouvé, veuillez soit installer le paquet fakeroot,\n" +"soit indiquer une commande avec l'option -r ou exécuter cette\n" +"commande en tant qu'administrateur" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "commande pour obtenir les privilèges administrateur « %s » non trouvée" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "" @@ -693,6 +695,20 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "substitution %% inconnue dans le point d'ancrage: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -845,8 +861,9 @@ msgstr "fichier, section et priorité ne peuvent contenir d'espace" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "impossible d'écrire %s" @@ -1002,7 +1019,7 @@ msgstr "il manque la section des fichiers source" msgid "missing Priority for source files" msgstr "il manque la priorité des fichiers source" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s est vide" @@ -1050,14 +1067,6 @@ msgstr "" "paquet %s dans le fichier de contrôle mais pas dans le fichier de liste des " "fichiers" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "impossible de lire %s" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1224,8 +1233,45 @@ msgid "cannot install output control file '%s'" msgstr "impossible d'installer le nouveau fichier de contrôle en sortie %s" #: scripts/dpkg-gensymbols.pl +#, fuzzy +#| msgid "" +#| "Options:\n" +#| " -p<package> generate symbols file for package.\n" +#| " -P<package-build-dir> temporary build directory instead of debian/" +#| "tmp.\n" +#| " -e<library> explicitly list libraries to scan.\n" +#| " -v<version> version of the packages (defaults to\n" +#| " version extracted from debian/changelog).\n" +#| " -c<level> compare generated symbols file with the " +#| "reference\n" +#| " template in the debian directory and fail if\n" +#| " difference is too important; level goes from 0 " +#| "for\n" +#| " no check, to 4 for all checks (default level " +#| "is 1).\n" +#| " -q keep quiet and never emit any warnings or\n" +#| " generate a diff between generated symbols\n" +#| " file and the reference template.\n" +#| " -I<file> force usage of <file> as reference symbols\n" +#| " file instead of the default file.\n" +#| " -O[<file>] write to stdout (or <file>), not .../DEBIAN/" +#| "symbols.\n" +#| " -t write in template mode (tags are not\n" +#| " processed and included in output).\n" +#| " -V verbose output; write deprecated symbols and " +#| "pattern\n" +#| " matching symbols as comments (in template mode " +#| "only).\n" +#| " -a<arch> assume <arch> as host architecture when " +#| "processing\n" +#| " symbol files.\n" +#| " -d display debug information during work.\n" +#| " -?, --help show this help message.\n" +#| " --version show the version.\n" msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1535,10 +1581,32 @@ msgstr "" " --version afficher la version." #: scripts/dpkg-parsechangelog.pl +#, fuzzy +#| msgid "" +#| "Parser options:\n" +#| " --format <output-format>\n" +#| " set output format (defaults to 'dpkg').\n" +#| " --all include all changes.\n" +#| " -s, --since <version> include all changes later than <version>.\n" +#| " -v <version> ditto.\n" +#| " -u, --until <version> include all changes earlier than <version>.\n" +#| " -f, --from <version> include all changes equal or later than " +#| "<version>.\n" +#| " -t, --to <version> include all changes up to or equal than " +#| "<version>.\n" +#| " -c, --count <number> include <number> entries from the top (or " +#| "tail\n" +#| " if <number> is lower than 0).\n" +#| " -n <number> ditto.\n" +#| " -o, --offset <number> change starting point for --count, counted " +#| "from\n" +#| " the top (or tail if <number> is lower than " +#| "0).\n" msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1713,6 +1781,10 @@ msgid "couldn't close stdout" msgstr "impossible de fermer la sortie standard" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "" "Paquets dans le fichier d'override avec valeur incorrecte pour l'ancien " @@ -2045,7 +2117,8 @@ msgstr "" "fichier info sur les bibliothèques partagées « %s », ligne %d : ligne mal " "formée « %s »" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "impossible d'ouvrir le fichier %s" @@ -2094,7 +2167,7 @@ msgstr "« stat » du répertoire %s impossible" msgid "directory argument %s is not a directory" msgstr "paramètre répertoire %s n'est pas un répertoire" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -2122,6 +2195,11 @@ msgstr "option d'action indispensable" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "aucun format source indiqué dans %s, voir dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s ne contient pas d'information sur le paquet source" @@ -2156,11 +2234,6 @@ msgstr "construction des sources pour une publication binaire seule" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "aucun format source indiqué dans %s, voir dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "impossible de construire avec le format source « %s » : %s" @@ -2458,6 +2531,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "« %s » n'est pas une architecture autorisée" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "impossible de lire %s" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2531,8 +2612,9 @@ msgstr "" "utilisé" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "'%s' option specifies non-existing version" +#, fuzzy, perl-format +#| msgid "'%s' option specifies non-existing version" +msgid "'%s' option specifies non-existing version '%s'" msgstr "l'option « %s » indique une version inexistante" #: scripts/Dpkg/Changelog.pm @@ -2548,16 +2630,21 @@ msgid "use oldest entry that is later than the one specified" msgstr "utiliser l'entrée la plus ancienne qui est supérieure à celle indiquée" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "no such entry found, ignoring '%s' parameter" +#, fuzzy, perl-format +#| msgid "no such entry found, ignoring '%s' parameter" +msgid "no such entry found, ignoring '%s' parameter '%s'" msgstr "aucune telle entrée n'a été trouvée, paramètre « %s » ignoré" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" +#, fuzzy, perl-format +#| msgid "'since' option specifies most recent version, ignoring" +msgid "'since' option specifies most recent version '%s', ignoring" msgstr "l'option « since » indique la version la plus récente et est ignorée" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" +#, fuzzy, perl-format +#| msgid "'until' option specifies oldest version, ignoring" +msgid "'until' option specifies oldest version '%s', ignoring" msgstr "l'option « until » indique la version la plus ancienne et est ignorée" #: scripts/Dpkg/Changelog/Debian.pm @@ -2666,7 +2753,7 @@ msgstr "nom de fichier %s non valable" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, fuzzy, perl-format #| msgid "cannot execute format parser: %s" -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "impossible d'exécuter l'analyseur de format : %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2676,14 +2763,10 @@ msgstr "" "attendue" #: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "cannot create pipe for %s" -msgstr "impossible de créer le tube pour %s" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "fin de %s" +#, fuzzy, perl-format +#| msgid "cannot stat file %s" +msgid "cannot seek into file %s" +msgstr "stat impossible pour le fichier %s" #: scripts/Dpkg/Changelog/Parse.pm #, fuzzy, perl-format @@ -3049,6 +3132,12 @@ msgstr "caractère « %s » non autorisé" msgid "must start with an alphanumeric character" msgstr "doit commencer par un caractère alphanumérique" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" + #: scripts/Dpkg/Shlibs/Objdump.pm #, fuzzy, perl-format #| msgid "cannot execute format parser: %s" @@ -3153,6 +3242,38 @@ msgstr "impossible de modifier la date de %s" msgid "cannot read timestamp from %s" msgstr "impossible de lire la date de %s" +#: scripts/Dpkg/Source/Functions.pm +#, fuzzy, perl-format +#| msgid "cannot open file %s" +msgid "cannot open file %s for binary detection" +msgstr "impossible d'ouvrir le fichier %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "ajout de %s à %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "fichier binaire non souhaité : %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"%d fichier binaire non souhaité a été détecté (il est nécessaire de " +"l'ajouter dans debian/source/include-binaries pour autoriser son inclusion)." +msgstr[1] "" +"%d fichiers binaires non souhaités ont été détectés (il est nécessaire de " +"les ajouter dans debian/source/include-binaries pour autoriser leur " +"inclusion)." + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -3169,15 +3290,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "le format de paquet source « %s » n'est pas géré : %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "la variante de ce format doit être écrite en minuscules" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "champ Format « %s » erroné" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "" @@ -3623,27 +3735,6 @@ msgstr "modifications locales détectées, les fichiers modifiés sont :" msgid "-b takes only one parameter with format '%s'" msgstr "-b n'utilise qu'un paramètre avec le format « %s »" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "fichier binaire non souhaité : %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"%d fichier binaire non souhaité a été détecté (il est nécessaire de " -"l'ajouter dans debian/source/include-binaries pour autoriser son inclusion)." -msgstr[1] "" -"%d fichiers binaires non souhaités ont été détectés (il est nécessaire de " -"les ajouter dans debian/source/include-binaries pour autoriser leur " -"inclusion)." - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3717,11 +3808,6 @@ msgstr "" msgid "cannot find an editor" msgstr "impossible de trouver un éditeur" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "ajout de %s à %s" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -3763,7 +3849,9 @@ msgstr "" "travail : %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" +#, fuzzy +#| msgid "format v3.0 uses only one source file" +msgid "format v3.0 (bzr) uses only one source file" msgstr "le format v3.0 n'utilise qu'un fichier source" #: scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -3896,6 +3984,12 @@ msgid "can't create symlink %s" msgstr "impossible de lire le lien symbolique %s" #: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, fuzzy, perl-format +#| msgid "using options from %s: %s" +msgid "using patch list from %s" +msgstr "utilisation des options depuis %s : %s" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "version inconnue des métadonnées de quilt : %s" @@ -3940,6 +4034,12 @@ msgid "unknown file type" msgstr "type de fichier inconnu" #: scripts/Dpkg/Source/Patch.pm +#, fuzzy, perl-format +#| msgid "ignoring deletion of directory %s" +msgid "ignoring deletion of file %s" +msgstr "suppression du répertoire %s ignorée" + +#: scripts/Dpkg/Source/Patch.pm #, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "" @@ -4195,13 +4295,15 @@ msgid "obsolete substitution variable ${%s}" msgstr "variable de substitution inutilisée ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "variable de substitution inconnue ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "variable de substitution inutilisée ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unused substitution variable ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" msgstr "variable de substitution inutilisée ${%s}" #: scripts/Dpkg/Vars.pm @@ -4278,6 +4380,21 @@ msgid "epoch part of the version number is not a number: '%s'" msgstr "" "la partie d'ère (« epoch ») du numéro de version n'est pas un nombre : « %s »" +#~ msgid "format variant must be in lowercase" +#~ msgstr "la variante de ce format doit être écrite en minuscules" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "champ Format « %s » erroné" + +#~ msgid "cannot create pipe for %s" +#~ msgstr "impossible de créer le tube pour %s" + +#~ msgid "tail of %s" +#~ msgstr "fin de %s" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "variable de substitution inconnue ${%s}" + #~ msgid "%s died from signal %s" #~ msgstr "%s tué par le signal %s" diff --git a/scripts/po/pl.po b/scripts/po/pl.po index ed869e906..2a23a842b 100644 --- a/scripts/po/pl.po +++ b/scripts/po/pl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: dpkg-dev 1.15.4\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" "PO-Revision-Date: 2015-04-07 07:05+0200\n" "Last-Translator: Łukasz Dulny <BartekChom@poczta.onet.pl>\n" "Language-Team: Polish <debian-l10n-polish@lists.debian.org>\n" @@ -306,27 +306,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -527,23 +529,6 @@ msgid "unknown option or argument %s" msgstr "niepoprawna opcja lub argument %s" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "używanie polecenia-uzysk-praw-admin podczas bycia administratorem" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"nie znaleziono fakeroot, proszę zainstalować pakiet fakeroot lub\n" -"podać polecenie w opcji -r, lub uruchomić ten program jako root" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "nie znaleziono polecenia-uzysk-praw-admin \"%s\"" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "" @@ -628,6 +613,23 @@ msgid "unable to determine %s" msgstr "nie można określić %s" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "używanie polecenia-uzysk-praw-admin podczas bycia administratorem" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"nie znaleziono fakeroot, proszę zainstalować pakiet fakeroot lub\n" +"podać polecenie w opcji -r, lub uruchomić ten program jako root" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "nie znaleziono polecenia-uzysk-praw-admin \"%s\"" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "" @@ -659,6 +661,20 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "nieznane podstawienie %% w hooku: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -817,8 +833,9 @@ msgstr "nazwa pliku, sekcja i priorytet nie mogą zawierać białych znaków" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "nie można zapisać %s" @@ -963,7 +980,7 @@ msgstr "brak pola Section plików źródłowych" msgid "missing Priority for source files" msgstr "brak pola Priority plików źródłowych" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s jest puste" @@ -1010,14 +1027,6 @@ msgstr "" msgid "package %s in control file but not in files list" msgstr "pakiet %s w pliku kontrolnym, ale nie w liście plików" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "nie można odczytać %s" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1230,6 +1239,8 @@ msgstr "nie można zainstalować wyjściowego pliku kontrolnego \"%s\"" #| " --version show the version.\n" msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1559,6 +1570,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1732,6 +1744,10 @@ msgid "couldn't close stdout" msgstr "nie można zamknąć stdout" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "" "Pakiety w pliku nadpisań z niepoprawną wartością poprzedniego opiekuna:" @@ -2060,7 +2076,8 @@ msgstr "" msgid "shared libs info file '%s' line %d: bad line '%s'" msgstr "plik bibliotek współdzielonych %s, linia %d: niepoprawna linia \"%s\"" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "nie można otworzyć pliku %s" @@ -2109,7 +2126,7 @@ msgstr "nie można ustalić stanu katalogu %s" msgid "directory argument %s is not a directory" msgstr "argument %s nie jest katalogiem" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -2137,6 +2154,11 @@ msgstr "potrzebna opcja akcji" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "w %s nie podano formatu źródeł, patrz dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s nie zawiera żadnej informacji o pakiecie źródłowym" @@ -2169,11 +2191,6 @@ msgstr "budowanie źródeł do wydania wyłącznie binarnego" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "w %s nie podano formatu źródeł, patrz dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "nie można zbudować z formatem źródeł \"%s\": %s" @@ -2457,6 +2474,14 @@ msgstr "nieznany typ systemu gcc %s, użycie domyślnego (kompilacja natywna)" msgid "'%s' is not a legal architecture in list '%s'" msgstr "\"%s\" nie jest poprawną specyfikacją architektury" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "nie można odczytać %s" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2525,8 +2550,9 @@ msgid "you can only specify one of 'to' and 'until', using 'until'" msgstr "można podać tylko jedno z \"to\" i \"until\", użycie \"until\"" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "'%s' option specifies non-existing version" +#, fuzzy, perl-format +#| msgid "'%s' option specifies non-existing version" +msgid "'%s' option specifies non-existing version '%s'" msgstr "opcja \"%s\" określa nieistniejącą wersję" #: scripts/Dpkg/Changelog.pm @@ -2542,16 +2568,21 @@ msgid "use oldest entry that is later than the one specified" msgstr "użycie najstarszego wpisu, który jest późniejszy niż określony" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "no such entry found, ignoring '%s' parameter" +#, fuzzy, perl-format +#| msgid "no such entry found, ignoring '%s' parameter" +msgid "no such entry found, ignoring '%s' parameter '%s'" msgstr "nie znaleziono takiego wpisu, ignorowanie parametru \"%s\"" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" +#, fuzzy, perl-format +#| msgid "'since' option specifies most recent version, ignoring" +msgid "'since' option specifies most recent version '%s', ignoring" msgstr "opcja \"since\" określa już najnowszą wersję, ignorowanie" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" +#, fuzzy, perl-format +#| msgid "'until' option specifies oldest version, ignoring" +msgid "'until' option specifies oldest version '%s', ignoring" msgstr "opcja \"until\" określa już najstarszą wersję, ignorowanie" #: scripts/Dpkg/Changelog/Debian.pm @@ -2663,7 +2694,7 @@ msgstr "niepoprawna flaga w %s: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "nie można uruchomić parsera formatu: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2671,14 +2702,10 @@ msgid "the trailer doesn't match the expected regex" msgstr "trailer nie pasuje do oczekiwanego wyrażenia regularnego" #: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "cannot create pipe for %s" -msgstr "nie można utworzyć potoku dla %s" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "tail na %s" +#, fuzzy, perl-format +#| msgid "cannot stat file %s" +msgid "cannot seek into file %s" +msgstr "nie można ustalić stanu pliku %s" #: scripts/Dpkg/Changelog/Parse.pm #, fuzzy, perl-format @@ -3044,6 +3071,12 @@ msgstr "znak \"%s\" nie jest dozwolony" msgid "must start with an alphanumeric character" msgstr "musi zaczynać się literą lub cyfrą" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" + #: scripts/Dpkg/Shlibs/Objdump.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" @@ -3146,6 +3179,40 @@ msgstr "nie można zmienić czasu modyfikacji dla %s" msgid "cannot read timestamp from %s" msgstr "nie można odczytać czasu modyfikacji z %s" +#: scripts/Dpkg/Source/Functions.pm +#, fuzzy, perl-format +#| msgid "cannot open file %s" +msgid "cannot open file %s for binary detection" +msgstr "nie można otworzyć pliku %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "dodawanie %s do %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "niechciany plik binarny: %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"wykryto %d niechciany plik binarny (należy go wymienić w debian/source/" +"include-binaries, aby umożliwić jego włączenie)." +msgstr[1] "" +"wykryto %d niechciane pliki binarne (należy je wymienić w debian/source/" +"include-binaries, aby umożliwić ich włączenie)." +msgstr[2] "" +"wykryto %d niechcianych plików binarnych (należy je wymienić w debian/source/" +"include-binaries, aby umożliwić ich włączenie)." + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -3162,15 +3229,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "format \"%s\" pakietu źródłowego nie jest obsługiwany: %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "wariant formatu musi być zapisany małymi literami" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "niepoprawne pole Format \"%s\"" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "" @@ -3612,29 +3670,6 @@ msgstr "wykryto lokalne zmiany, zmodyfikowane pliki to:" msgid "-b takes only one parameter with format '%s'" msgstr "-b przyjmuje tylko jeden parametr w formacie \"%s\"" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "niechciany plik binarny: %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"wykryto %d niechciany plik binarny (należy go wymienić w debian/source/" -"include-binaries, aby umożliwić jego włączenie)." -msgstr[1] "" -"wykryto %d niechciane pliki binarne (należy je wymienić w debian/source/" -"include-binaries, aby umożliwić ich włączenie)." -msgstr[2] "" -"wykryto %d niechcianych plików binarnych (należy je wymienić w debian/source/" -"include-binaries, aby umożliwić ich włączenie)." - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3705,11 +3740,6 @@ msgstr "" msgid "cannot find an editor" msgstr "nie można odnaleźć edytora" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "dodawanie %s do %s" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -3749,7 +3779,9 @@ msgid "uncommitted, not-ignored changes in working directory: %s" msgstr "niezatwierdzone, nie ignorowane zmiany w katalogu roboczym: %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" +#, fuzzy +#| msgid "format v3.0 uses only one source file" +msgid "format v3.0 (bzr) uses only one source file" msgstr "format 3.0 używa tylko jednego pliku źródłowego" #: scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -3878,6 +3910,12 @@ msgid "can't create symlink %s" msgstr "nie można utworzyć linku symbolicznego \"%s\"" #: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, fuzzy, perl-format +#| msgid "using options from %s: %s" +msgid "using patch list from %s" +msgstr "użycie opcji z %s: %s" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "nieobsługiwana wersja metadanych quilt: %s" @@ -3922,6 +3960,12 @@ msgid "unknown file type" msgstr "nieznany typ pliku" #: scripts/Dpkg/Source/Patch.pm +#, fuzzy, perl-format +#| msgid "ignoring deletion of directory %s" +msgid "ignoring deletion of file %s" +msgstr "zignorowano usunięcie katalogu %s" + +#: scripts/Dpkg/Source/Patch.pm #, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "zignorowano usunięcie pliku %s, użyj --include-removal, aby nadpisać" @@ -4167,13 +4211,15 @@ msgid "obsolete substitution variable ${%s}" msgstr "nieużywana zmienna podstawiania ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "nieznana zmienna podstawiania ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "nieużywana zmienna podstawiania ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unused substitution variable ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" msgstr "nieużywana zmienna podstawiania ${%s}" #: scripts/Dpkg/Vars.pm @@ -4247,6 +4293,21 @@ msgstr "numer wersji zawiera niepoprawny znak \"%s\"" msgid "epoch part of the version number is not a number: '%s'" msgstr "częśc epoki w numerze wersji nie jest liczbą: \"%s\"" +#~ msgid "format variant must be in lowercase" +#~ msgstr "wariant formatu musi być zapisany małymi literami" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "niepoprawne pole Format \"%s\"" + +#~ msgid "cannot create pipe for %s" +#~ msgstr "nie można utworzyć potoku dla %s" + +#~ msgid "tail of %s" +#~ msgstr "tail na %s" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "nieznana zmienna podstawiania ${%s}" + #~ msgid "%s died from signal %s" #~ msgstr "%s zakończony z powodu sygnału %s" diff --git a/scripts/po/ru.po b/scripts/po/ru.po index 396e37dd6..fc9b2eaf4 100644 --- a/scripts/po/ru.po +++ b/scripts/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dpkg-dev 1.17.23\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" "PO-Revision-Date: 2015-04-07 07:02+0200\n" "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" "Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n" @@ -307,27 +307,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -532,23 +534,6 @@ msgid "unknown option or argument %s" msgstr "неизвестный параметр или аргумент %s" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "используется команда получения прав root, но уже есть права root" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"fakeroot не найдена, установите пакет fakeroot и\n" -"запускайте команду с параметром -r, или запускайте её от root" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "команда-получения-root «%s» не найдена" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "" @@ -634,6 +619,23 @@ msgid "unable to determine %s" msgstr "невозможно определить %s" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "используется команда получения прав root, но уже есть права root" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"fakeroot не найдена, установите пакет fakeroot и\n" +"запускайте команду с параметром -r, или запускайте её от root" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "команда-получения-root «%s» не найдена" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "" @@ -664,6 +666,20 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "неизвестная подстановка %% в ловушке: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -827,8 +843,9 @@ msgstr "имя файла, секция и приоритет не могут с #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "не удалось записать %s" @@ -978,7 +995,7 @@ msgstr "отсутствует Section для файлов с исходным msgid "missing Priority for source files" msgstr "отсутствует Priority для файлов с исходным кодом" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s пуст" @@ -1025,14 +1042,6 @@ msgstr "" msgid "package %s in control file but not in files list" msgstr "пакет %s в управляющем файле, но его нет в файле со списком файлов" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "не удалось прочитать %s" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1242,6 +1251,8 @@ msgstr "не удалось установить новый выходной у #| " --version show the version.\n" msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1572,6 +1583,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1741,6 +1753,10 @@ msgid "couldn't close stdout" msgstr "не удалось закрыть стандартный вывод" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "" "Пакеты в файле переназначений с неправильным старым значением " @@ -2073,7 +2089,8 @@ msgstr "" "информационный файл разделяемой библиотеки «%s» строка %d: неправильная " "строка «%s»" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "не удалось открыть файл %s" @@ -2121,7 +2138,7 @@ msgstr "не удалось выполнить функцию stat для кат msgid "directory argument %s is not a directory" msgstr "значение параметра каталога %s не является каталогом" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -2149,6 +2166,11 @@ msgstr "необходим параметр действия" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "не задан формат исходников в %s, см. dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s не содержит информации о пакете с исходным кодом" @@ -2183,11 +2205,6 @@ msgstr "сборка пакета с исходным кодом только д #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "не задан формат исходников в %s, см. dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "невозможно собрать с форматом исходника «%s»: %s" @@ -2478,6 +2495,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "«%s» не является разрешённой строкой архитектуры" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "не удалось прочитать %s" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2547,8 +2572,9 @@ msgid "you can only specify one of 'to' and 'until', using 'until'" msgstr "можно указать только одно «to» и «until», используется «until»" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "'%s' option specifies non-existing version" +#, fuzzy, perl-format +#| msgid "'%s' option specifies non-existing version" +msgid "'%s' option specifies non-existing version '%s'" msgstr "в параметре «%s» указана несуществующая версия" #: scripts/Dpkg/Changelog.pm @@ -2564,16 +2590,21 @@ msgid "use oldest entry that is later than the one specified" msgstr "используемый самый старый элемент больше чем указанный" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "no such entry found, ignoring '%s' parameter" +#, fuzzy, perl-format +#| msgid "no such entry found, ignoring '%s' parameter" +msgid "no such entry found, ignoring '%s' parameter '%s'" msgstr "элемент не найден, параметр «%s» игнорируется" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" +#, fuzzy, perl-format +#| msgid "'since' option specifies most recent version, ignoring" +msgid "'since' option specifies most recent version '%s', ignoring" msgstr "в параметре «since» задана более новая версия, игнорируется" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" +#, fuzzy, perl-format +#| msgid "'until' option specifies oldest version, ignoring" +msgid "'until' option specifies oldest version '%s', ignoring" msgstr "в параметре «until» задана более новая версия, игнорируется" #: scripts/Dpkg/Changelog/Debian.pm @@ -2685,7 +2716,7 @@ msgstr "неправильный флаг в %s: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "не удалось запустить анализатор формата: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2693,14 +2724,10 @@ msgid "the trailer doesn't match the expected regex" msgstr "концевик не подходит под ожидаемое регулярное выражение" #: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "cannot create pipe for %s" -msgstr "невозможно создать канал для %s" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "конец %s" +#, fuzzy, perl-format +#| msgid "cannot stat file %s" +msgid "cannot seek into file %s" +msgstr "не удалось выполнить функцию stat для файла %s" #: scripts/Dpkg/Changelog/Parse.pm #, fuzzy, perl-format @@ -3070,6 +3097,12 @@ msgstr "символ «%s» запрещён" msgid "must start with an alphanumeric character" msgstr "должно начинаться с латинской буквы или цифры" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" + #: scripts/Dpkg/Shlibs/Objdump.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" @@ -3173,6 +3206,40 @@ msgstr "не удалось изменить метку времени для %s msgid "cannot read timestamp from %s" msgstr "не удалось изменить метку времени из %s" +#: scripts/Dpkg/Source/Functions.pm +#, fuzzy, perl-format +#| msgid "cannot open file %s" +msgid "cannot open file %s for binary detection" +msgstr "не удалось открыть файл %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "добавляется %s в %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "нежелательный двоичный файл: %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"обнаружен %d нежелательный двоичный файл (чтобы разрешить включение, " +"добавьте его в debian/source/include-binaries)." +msgstr[1] "" +"обнаружено %d нежелательных двоичных файла (чтобы разрешить включение, " +"добавьте их в debian/source/include-binaries)." +msgstr[2] "" +"обнаружено %d нежелательных двоичных файлов (чтобы разрешить включение, " +"добавьте их в debian/source/include-binaries)." + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -3189,15 +3256,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "формат пакета с исходным кодом «%s» не поддерживается: %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "символы варианта формата должны быть строчными" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "неправильное поле Format «%s»" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "" @@ -3644,29 +3702,6 @@ msgstr "обнаружены локальные изменения, изменё msgid "-b takes only one parameter with format '%s'" msgstr "значением параметра -b является только один аргумент в формате «%s»" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "нежелательный двоичный файл: %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"обнаружен %d нежелательный двоичный файл (чтобы разрешить включение, " -"добавьте его в debian/source/include-binaries)." -msgstr[1] "" -"обнаружено %d нежелательных двоичных файла (чтобы разрешить включение, " -"добавьте их в debian/source/include-binaries)." -msgstr[2] "" -"обнаружено %d нежелательных двоичных файлов (чтобы разрешить включение, " -"добавьте их в debian/source/include-binaries)." - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3739,11 +3774,6 @@ msgstr "" msgid "cannot find an editor" msgstr "не удалось найти редактор" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "добавляется %s в %s" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "" @@ -3785,7 +3815,9 @@ msgstr "" "каталоге: %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" +#, fuzzy +#| msgid "format v3.0 uses only one source file" +msgid "format v3.0 (bzr) uses only one source file" msgstr "формат v3.0 используется только в файле исходнике" #: scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -3916,6 +3948,12 @@ msgid "can't create symlink %s" msgstr "не удалось создать символьную ссылку %s" #: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, fuzzy, perl-format +#| msgid "using options from %s: %s" +msgid "using patch list from %s" +msgstr "используются параметры из %s: %s" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "неподдерживаемая версия метаданных quilt: %s" @@ -3960,6 +3998,12 @@ msgid "unknown file type" msgstr "неизвестный тип файла" #: scripts/Dpkg/Source/Patch.pm +#, fuzzy, perl-format +#| msgid "ignoring deletion of directory %s" +msgid "ignoring deletion of file %s" +msgstr "игнорируется удаление каталога %s" + +#: scripts/Dpkg/Source/Patch.pm #, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "" @@ -4203,13 +4247,15 @@ msgid "obsolete substitution variable ${%s}" msgstr "неиспользуемая подстановочная переменная ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "неизвестная подстановочная переменная ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "неиспользуемая подстановочная переменная ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unused substitution variable ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" msgstr "неиспользуемая подстановочная переменная ${%s}" #: scripts/Dpkg/Vars.pm @@ -4284,6 +4330,21 @@ msgstr "номер версии содержит недопустимый сим msgid "epoch part of the version number is not a number: '%s'" msgstr "часть эпохи в номере версии не является числом: «%s»" +#~ msgid "format variant must be in lowercase" +#~ msgstr "символы варианта формата должны быть строчными" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "неправильное поле Format «%s»" + +#~ msgid "cannot create pipe for %s" +#~ msgstr "невозможно создать канал для %s" + +#~ msgid "tail of %s" +#~ msgstr "конец %s" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "неизвестная подстановочная переменная ${%s}" + #~ msgid "%s died from signal %s" #~ msgstr "%s завершился по сигналу %s" diff --git a/scripts/po/sv.po b/scripts/po/sv.po index 816c3b18e..05f6d8eb0 100644 --- a/scripts/po/sv.po +++ b/scripts/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dpkg-dev 1.17.22\n" "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n" -"POT-Creation-Date: 2017-10-17 01:57+0200\n" +"POT-Creation-Date: 2019-06-03 23:21+0200\n" "PO-Revision-Date: 2016-12-09 11:32+0100\n" "Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n" "Language-Team: Svenska <debian-l10n-swedish@lists.debian.org>\n" @@ -297,27 +297,29 @@ msgid "" " --build=<type>[,...] specify the build <type>: full, source, " "binary,\n" " any, all (default is 'full').\n" -" -F normal full build (source and binary; " +" -F, --build=full normal full build (source and binary; " "default).\n" -" -g source and arch-indep build.\n" -" -G source and arch-specific build.\n" -" -b binary-only, no source files.\n" -" -B binary-only, only arch-specific files.\n" -" -A binary-only, only arch-indep files.\n" -" -S source-only, no binary files.\n" +" -g, --build=source,all source and arch-indep build.\n" +" -G, --build=source,any source and arch-specific build.\n" +" -b, --build=binary binary-only, no source files.\n" +" -B, --build=any binary-only, only arch-specific files.\n" +" -A, --build=all binary-only, only arch-indep files.\n" +" -S, --build=source source-only, no binary files.\n" " -nc, --no-pre-clean do not pre clean source tree (implies -b).\n" -" --pre-clean pre clean source tree (default).\n" -" -tc, --post-clean clean source tree when finished.\n" -" -D check build dependencies and conflicts " +" --pre-clean pre clean source tree (default).\n" +" --no-post-clean do not post clean source tree (default).\n" +" -tc, --post-clean post clean source tree.\n" +" -D, --check-builddeps check build dependencies and conflicts " "(default).\n" -" -d do not check build dependencies and " +" -d, --no-check-builddeps do not check build dependencies and " "conflicts.\n" -" --[no-]check-builddeps ditto.\n" " --ignore-builtin-builddeps\n" " do not check builtin build dependencies.\n" " -P, --build-profiles=<profiles>\n" -" assume comma-separated build profiles as " +" assume comma-separated build <profiles> as " "active.\n" +" --rules-requires-root assume legacy Rules-Requires-Root field " +"value.\n" " -R, --rules-file=<rules> rules file to execute (default is debian/" "rules).\n" " -T, --rules-target=<target> call debian/rules <target>.\n" @@ -518,23 +520,6 @@ msgid "unknown option or argument %s" msgstr "okänd flagga eller argument %s" #: scripts/dpkg-buildpackage.pl -msgid "using a gain-root-command while being root" -msgstr "använder ett gain-root-command fast jag redan är root" - -#: scripts/dpkg-buildpackage.pl -msgid "" -"fakeroot not found, either install the fakeroot\n" -"package, specify a command with the -r option, or run this as root" -msgstr "" -"fakeroot hittades inte, du kan installera paketet fakeroot,\n" -"ange ett kommando med flaggan -r, eller köra som root" - -#: scripts/dpkg-buildpackage.pl -#, perl-format -msgid "gain-root-command '%s' not found" -msgstr "få-root-kommandot \"%s\" hittades inte" - -#: scripts/dpkg-buildpackage.pl #, perl-format msgid "option %s is only meaningful with option %s" msgstr "" @@ -620,6 +605,23 @@ msgid "unable to determine %s" msgstr "kan inte bestämma %s" #: scripts/dpkg-buildpackage.pl +msgid "using a gain-root-command while being root" +msgstr "använder ett gain-root-command fast jag redan är root" + +#: scripts/dpkg-buildpackage.pl +msgid "" +"fakeroot not found, either install the fakeroot\n" +"package, specify a command with the -r option, or run this as root" +msgstr "" +"fakeroot hittades inte, du kan installera paketet fakeroot,\n" +"ange ett kommando med flaggan -r, eller köra som root" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "gain-root-command '%s' not found" +msgstr "få-root-kommandot \"%s\" hittades inte" + +#: scripts/dpkg-buildpackage.pl #, perl-format msgid "disallowed target in %s field keyword %s" msgstr "" @@ -651,6 +653,20 @@ msgstr "" msgid "unknown %% substitution in hook: %%%s" msgstr "okänd %%-substituering i krok: %%%s" +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"short OpenPGP key IDs are broken; please use key fingerprints in %s or %s " +"instead" +msgstr "" + +#: scripts/dpkg-buildpackage.pl +#, perl-format +msgid "" +"long OpenPGP key IDs are strongly discouraged; please use key fingerprints " +"in %s or %s instead" +msgstr "" + #: scripts/dpkg-buildpackage.pl scripts/dpkg-checkbuilddeps.pl #: scripts/dpkg-genbuildinfo.pl scripts/dpkg-name.pl scripts/Dpkg/Arch.pm #: scripts/Dpkg/IPC.pm scripts/Dpkg/OpenPGP.pm scripts/Dpkg/Shlibs.pm @@ -808,8 +824,9 @@ msgstr "filnamn, sektion och prioritet kan inte innehålla blanktecken" #: scripts/dpkg-gencontrol.pl scripts/dpkg-mergechangelogs.pl #: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/IPC.pm #: scripts/Dpkg/Interface/Storable.pm scripts/Dpkg/Source/Functions.pm -#: scripts/Dpkg/Source/Package.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Package/V3/Quilt.pm scripts/Dpkg/Source/Quilt.pm +#: scripts/Dpkg/Source/BinaryFiles.pm scripts/Dpkg/Source/Package.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Package/V3/Quilt.pm +#: scripts/Dpkg/Source/Quilt.pm #, perl-format msgid "cannot write %s" msgstr "kan inte skriva %s" @@ -951,7 +968,7 @@ msgstr "\"Section\" saknas för källfiler" msgid "missing Priority for source files" msgstr "\"Priority\" saknas för källfiler" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/Vendor.pm +#: scripts/dpkg-genchanges.pl scripts/Dpkg/Vendor.pm #, perl-format msgid "%s is empty" msgstr "%s är tom" @@ -997,14 +1014,6 @@ msgstr "binärbygge utan binära artifakter upptäckt; kan inte distribuera" msgid "package %s in control file but not in files list" msgstr "paketet %s i styrinfofilen men inte i fillistfilen" -#: scripts/dpkg-genchanges.pl scripts/dpkg-source.pl scripts/Dpkg/BuildFlags.pm -#: scripts/Dpkg/Compression/FileHandle.pm scripts/Dpkg/Interface/Storable.pm -#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/Package/V2.pm -#: scripts/Dpkg/Source/Quilt.pm -#, perl-format -msgid "cannot read %s" -msgstr "kan inte läsa %s" - #: scripts/dpkg-genchanges.pl #, perl-format msgid "package %s listed in files list but not in control info" @@ -1212,6 +1221,8 @@ msgstr "kan inte installera utdatastyrfil \"%s\"" #| " --version show the version.\n" msgid "" "Options:\n" +" -l<library-path> add directory to private shared library search " +"list.\n" " -p<package> generate symbols file for package.\n" " -P<package-build-dir> temporary build directory instead of debian/tmp.\n" " -e<library> explicitly list libraries to scan.\n" @@ -1538,6 +1549,7 @@ msgid "" "Parser options:\n" " --format <output-format>\n" " set output format (defaults to 'dpkg').\n" +" --reverse include all changes in reverse order.\n" " --all include all changes.\n" " -s, --since <version> include all changes later than <version>.\n" " -v <version> ditto.\n" @@ -1707,6 +1719,10 @@ msgid "couldn't close stdout" msgstr "kunde inte stänga standard ut" #: scripts/dpkg-scanpackages.pl +msgid "Packages with multiple instances but no --multiversion specified:" +msgstr "" + +#: scripts/dpkg-scanpackages.pl msgid "Packages in override file with incorrect old maintainer value:" msgstr "Paket i överstyrningsfilen med felaktigt värde på gammal ansvarig:" @@ -2028,7 +2044,8 @@ msgid "shared libs info file '%s' line %d: bad line '%s'" msgstr "" "informationsfilen för delade bibliotek \"%s\" rad %d: felaktig rad \"%s\"" -#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Checksums.pm +#: scripts/dpkg-shlibdeps.pl scripts/Dpkg/Changelog/Parse.pm +#: scripts/Dpkg/Checksums.pm #, perl-format msgid "cannot open file %s" msgstr "kan inte öppna filen %s" @@ -2077,7 +2094,7 @@ msgstr "kan inte ta status på katalogen %s" msgid "directory argument %s is not a directory" msgstr "katalogargumentet %s är inte en katalog" -#: scripts/dpkg-source.pl scripts/Dpkg/Source/Package/V2.pm +#: scripts/dpkg-source.pl scripts/Dpkg/Source/BinaryFiles.pm #: scripts/Dpkg/Source/Package/V3/Bzr.pm scripts/Dpkg/Source/Package/V3/Git.pm #, perl-format msgid "unable to chdir to '%s'" @@ -2105,6 +2122,11 @@ msgstr "åtgärd krävs" #: scripts/dpkg-source.pl #, perl-format +msgid "no source format specified in %s, see dpkg-source(1)" +msgstr "källkodsformat ej angivet i %s, se dpkg-source(1)" + +#: scripts/dpkg-source.pl +#, perl-format msgid "%s doesn't contain any information about the source package" msgstr "%s innehåller inte någon information om källkodspaketet" @@ -2136,11 +2158,6 @@ msgstr "bygger källkod för utgåva med endast binär" #: scripts/dpkg-source.pl #, perl-format -msgid "no source format specified in %s, see dpkg-source(1)" -msgstr "källkodsformat ej angivet i %s, se dpkg-source(1)" - -#: scripts/dpkg-source.pl -#, perl-format msgid "can't build with source format '%s': %s" msgstr "kan inte bygga med källkodsformatet \"%s\": %s" @@ -2425,6 +2442,14 @@ msgstr "" msgid "'%s' is not a legal architecture in list '%s'" msgstr "\"%s\" är inte en giltig arkitektursträng" +#: scripts/Dpkg/BuildFlags.pm scripts/Dpkg/Compression/FileHandle.pm +#: scripts/Dpkg/File.pm scripts/Dpkg/Interface/Storable.pm +#: scripts/Dpkg/Shlibs/Objdump.pm scripts/Dpkg/Source/BinaryFiles.pm +#: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Quilt.pm +#, perl-format +msgid "cannot read %s" +msgstr "kan inte läsa %s" + #: scripts/Dpkg/BuildFlags.pm #, perl-format msgid "line %d of %s mentions unknown flag %s" @@ -2493,8 +2518,9 @@ msgid "you can only specify one of 'to' and 'until', using 'until'" msgstr "du kan bara ange en av \"to\" och \"until\", använder \"until\"" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "'%s' option specifies non-existing version" +#, fuzzy, perl-format +#| msgid "'%s' option specifies non-existing version" +msgid "'%s' option specifies non-existing version '%s'" msgstr "\"%s\"-flaggan anger en icke-existerande version" #: scripts/Dpkg/Changelog.pm @@ -2510,16 +2536,21 @@ msgid "use oldest entry that is later than the one specified" msgstr "använd den äldsta posten som är senare än den angivna" #: scripts/Dpkg/Changelog.pm -#, perl-format -msgid "no such entry found, ignoring '%s' parameter" +#, fuzzy, perl-format +#| msgid "no such entry found, ignoring '%s' parameter" +msgid "no such entry found, ignoring '%s' parameter '%s'" msgstr "hittade ingen sådan post, ignorerar parametern \"%s\"" #: scripts/Dpkg/Changelog.pm -msgid "'since' option specifies most recent version, ignoring" +#, fuzzy, perl-format +#| msgid "'since' option specifies most recent version, ignoring" +msgid "'since' option specifies most recent version '%s', ignoring" msgstr "\"since\"-flaggan anger den senaste versionen, ignorerar" #: scripts/Dpkg/Changelog.pm -msgid "'until' option specifies oldest version, ignoring" +#, fuzzy, perl-format +#| msgid "'until' option specifies oldest version, ignoring" +msgid "'until' option specifies oldest version '%s', ignoring" msgstr "\"until\"-flaggan anger den äldsta versionen, ignorerar" #: scripts/Dpkg/Changelog/Debian.pm @@ -2631,7 +2662,7 @@ msgstr "felaktig flagga i %s: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" -msgid "cannot parse non-comformant date '%s'" +msgid "cannot parse non-conformant date '%s'" msgstr "kan inte exekvera formattolk: %s" #: scripts/Dpkg/Changelog/Entry/Debian.pm @@ -2639,14 +2670,10 @@ msgid "the trailer doesn't match the expected regex" msgstr "filslutet motsvarar inte det förväntat reguljärt uttryck" #: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "cannot create pipe for %s" -msgstr "kan inte skapa rör för %s" - -#: scripts/Dpkg/Changelog/Parse.pm -#, perl-format -msgid "tail of %s" -msgstr "tail för %s" +#, fuzzy, perl-format +#| msgid "cannot stat file %s" +msgid "cannot seek into file %s" +msgstr "kan inte ta status på filen %s" #: scripts/Dpkg/Changelog/Parse.pm #, fuzzy, perl-format @@ -3010,6 +3037,12 @@ msgstr "tecknet \"%s\" är inte tillåtet" msgid "must start with an alphanumeric character" msgstr "måste börja med ett alfanumeriskt tecken" +#: scripts/Dpkg/Shlibs.pm +msgid "" +"deprecated use of LD_LIBRARY_PATH with private library directory which " +"interferes with cross-building, please use -l option instead" +msgstr "" + #: scripts/Dpkg/Shlibs/Objdump.pm #, fuzzy, perl-format #| msgid "cannot exec format parser: %s" @@ -3112,6 +3145,37 @@ msgstr "kan inte ändra tidsstämpel på %s" msgid "cannot read timestamp from %s" msgstr "kan inte läsa tidsstämpel från %s" +#: scripts/Dpkg/Source/Functions.pm +#, fuzzy, perl-format +#| msgid "cannot open file %s" +msgid "cannot open file %s for binary detection" +msgstr "kan inte öppna filen %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "adding %s to %s" +msgstr "lägger %s till %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "unwanted binary file: %s" +msgstr "oönskad binärfil: %s" + +#: scripts/Dpkg/Source/BinaryFiles.pm +#, perl-format +msgid "" +"detected %d unwanted binary file (add it in debian/source/include-binaries " +"to allow its inclusion)." +msgid_plural "" +"detected %d unwanted binary files (add them in debian/source/include-" +"binaries to allow their inclusion)." +msgstr[0] "" +"upptäckte %d oönskad binärfil (lägg till den i debian/source/include-" +"binaries för att tillåta att den tas med)" +msgstr[1] "" +"upptäckte %d oönskade binärfiler (lägg till dem i debian/source/include-" +"binaries för att tillåta att de tas med)" + #: scripts/Dpkg/Source/Package.pm #, perl-format msgid "%s is not the name of a file" @@ -3128,15 +3192,6 @@ msgid "source package format '%s' is not supported: %s" msgstr "källkodsformatet \"%s\" stöds inte: %s" #: scripts/Dpkg/Source/Package.pm -msgid "format variant must be in lowercase" -msgstr "formatvarianten måste skrivas med små bokstäver" - -#: scripts/Dpkg/Source/Package.pm -#, perl-format -msgid "invalid Format field '%s'" -msgstr "ogiltigt Format-fält \"%s\"" - -#: scripts/Dpkg/Source/Package.pm msgid "source package uses only weak checksums" msgstr "" @@ -3573,26 +3628,6 @@ msgstr "lokala ändringar upptäcktes, de ändrade filerna är:" msgid "-b takes only one parameter with format '%s'" msgstr "-b tar bara en parameter för formatet \"%s\"" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "unwanted binary file: %s" -msgstr "oönskad binärfil: %s" - -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "" -"detected %d unwanted binary file (add it in debian/source/include-binaries " -"to allow its inclusion)." -msgid_plural "" -"detected %d unwanted binary files (add them in debian/source/include-" -"binaries to allow their inclusion)." -msgstr[0] "" -"upptäckte %d oönskad binärfil (lägg till den i debian/source/include-" -"binaries för att tillåta att den tas med)" -msgstr[1] "" -"upptäckte %d oönskade binärfiler (lägg till dem i debian/source/include-" -"binaries för att tillåta att de tas med)" - #: scripts/Dpkg/Source/Package/V2.pm scripts/Dpkg/Source/Patch.pm #, perl-format msgid "cannot represent change to %s: %s" @@ -3663,11 +3698,6 @@ msgstr "" msgid "cannot find an editor" msgstr "kan inte hitta något textredigeringsprogram" -#: scripts/Dpkg/Source/Package/V2.pm -#, perl-format -msgid "adding %s to %s" -msgstr "lägger %s till %s" - #: scripts/Dpkg/Source/Package/V3/Bzr.pm msgid "cannot unpack bzr-format source package because bzr is not in the PATH" msgstr "kan inte packa upp källkodspaket i bzr-format då bzr inte finns i PATH" @@ -3705,7 +3735,9 @@ msgid "uncommitted, not-ignored changes in working directory: %s" msgstr "ej incheckade, ej ignorerade ändringar i arbetskatalogen: %s" #: scripts/Dpkg/Source/Package/V3/Bzr.pm -msgid "format v3.0 uses only one source file" +#, fuzzy +#| msgid "format v3.0 uses only one source file" +msgid "format v3.0 (bzr) uses only one source file" msgstr "formatet v3.0 innehåller endast en källkodsfil" #: scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -3831,6 +3863,12 @@ msgid "can't create symlink %s" msgstr "kan inte skapa den symboliska länken %s" #: scripts/Dpkg/Source/Package/V3/Quilt.pm +#, fuzzy, perl-format +#| msgid "using options from %s: %s" +msgid "using patch list from %s" +msgstr "använder flaggor från %s: %s" + +#: scripts/Dpkg/Source/Package/V3/Quilt.pm #, perl-format msgid "unsupported version of the quilt metadata: %s" msgstr "versionen av quilt-metadata stöds inte: %s" @@ -3875,6 +3913,12 @@ msgid "unknown file type" msgstr "okänd filtyp" #: scripts/Dpkg/Source/Patch.pm +#, fuzzy, perl-format +#| msgid "ignoring deletion of directory %s" +msgid "ignoring deletion of file %s" +msgstr "ignorerar borttagning av katalogen %s" + +#: scripts/Dpkg/Source/Patch.pm #, perl-format msgid "ignoring deletion of file %s, use --include-removal to override" msgstr "" @@ -4116,13 +4160,15 @@ msgid "obsolete substitution variable ${%s}" msgstr "oanvänd substitueringsvariabel ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unknown substitution variable ${%s}" -msgstr "okänd substitueringsvariabel ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} used, but is not defined" +msgstr "oanvänd substitueringsvariabel ${%s}" #: scripts/Dpkg/Substvars.pm -#, perl-format -msgid "unused substitution variable ${%s}" +#, fuzzy, perl-format +#| msgid "unused substitution variable ${%s}" +msgid "substitution variable ${%s} unused, but is defined" msgstr "oanvänd substitueringsvariabel ${%s}" #: scripts/Dpkg/Vars.pm @@ -4197,6 +4243,21 @@ msgstr "versionsnummer innehåller ogiltigt tecken \"%s\"" msgid "epoch part of the version number is not a number: '%s'" msgstr "epokdelen av versionsnumret är inte ett tal: \"%s\"" +#~ msgid "format variant must be in lowercase" +#~ msgstr "formatvarianten måste skrivas med små bokstäver" + +#~ msgid "invalid Format field '%s'" +#~ msgstr "ogiltigt Format-fält \"%s\"" + +#~ msgid "cannot create pipe for %s" +#~ msgstr "kan inte skapa rör för %s" + +#~ msgid "tail of %s" +#~ msgstr "tail för %s" + +#~ msgid "unknown substitution variable ${%s}" +#~ msgstr "okänd substitueringsvariabel ${%s}" + #~ msgid "%s died from signal %s" #~ msgstr "%s dog av signal %s" diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t index 525817085..a3a9e6fee 100644 --- a/scripts/t/Dpkg_Arch.t +++ b/scripts/t/Dpkg_Arch.t @@ -16,12 +16,12 @@ use strict; use warnings; -use Test::More tests => 16367; +use Test::More tests => 16836; use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch debarch_eq debarch_is debarch_is_wildcard debarch_is_illegal - debarch_to_abiattrs + debarch_to_abiattrs debarch_to_cpubits debarch_list_parse debtuple_to_debarch gnutriplet_to_debarch get_host_gnu_type @@ -148,11 +148,23 @@ my @arch_ref; @arch_new = debarch_list_parse('amd64 !arm64 linux-i386 !kfreebsd-any'); is_deeply(\@arch_new, \@arch_ref, 'parse valid arch list'); +@arch_ref = qw(amd64 arm64 linux-i386 kfreebsd-any); +@arch_new = debarch_list_parse('amd64 arm64 linux-i386 kfreebsd-any', positive => 1); +is_deeply(\@arch_new, \@arch_ref, 'parse valid positive arch list'); + eval { @arch_new = debarch_list_parse('!amd64!arm64') }; ok($@, 'parse concatenated arches failed'); +eval { @arch_new = debarch_list_parse('amd64 !arm64 !mips', positive => 1) }; +ok($@, 'parse disallowed negated arches failed'); + is(debarch_to_abiattrs(undef), undef, 'undef ABI attrs'); is_deeply([ debarch_to_abiattrs('amd64') ], [ qw(64 little) ], 'amd64 ABI attrs'); +is_deeply([ debarch_to_abiattrs('x32') ], [ qw(32 little) ], 'x32 ABI attrs'); + +is(debarch_to_cpubits(undef), undef, 'undef CPU bits'); +is(debarch_to_cpubits('i386'), 32, 'i386 CPU bits'); +is(debarch_to_cpubits('amd64'), 64, 'amd64 CPU bits'); is(debtuple_to_debarch(undef, undef, undef, undef), undef, 'undef debtuple'); is(debtuple_to_debarch('base', 'gnu', 'linux', 'amd64'), 'amd64', 'known debtuple'); @@ -162,7 +174,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet'); is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet'); is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet'); -is(scalar get_valid_arches(), 524, 'expected amount of known architectures'); +is(scalar get_valid_arches(), 539, 'expected amount of known architectures'); { local $ENV{CC} = 'false'; diff --git a/scripts/t/Dpkg_BuildFlags.t b/scripts/t/Dpkg_BuildFlags.t index 0ebf878b8..b087e0ab2 100644 --- a/scripts/t/Dpkg_BuildFlags.t +++ b/scripts/t/Dpkg_BuildFlags.t @@ -16,7 +16,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 26; BEGIN { use_ok('Dpkg::BuildFlags'); @@ -47,6 +47,47 @@ is($bf->get('DPKGFLAGS'), '-Idir -Wflag -fsome -Wl,other', 'get prepended flag') is($bf->get_origin('DPKGFLAGS'), 'env', 'flag has an env origin'); ok($bf->is_maintainer_modified('DPKGFLAGS'), 'prepend marked flag as maint modified'); +my %known_features = ( + future => [ qw( + lfs + ) ], + hardening => [ qw( + bindnow + format + fortify + pie + relro + stackprotector + stackprotectorstrong + ) ], + qa => [ qw( + bug + canary + ) ], + reproducible => [ qw( + fixdebugpath + fixfilepath + timeless + ) ], + sanitize => [ qw( + address + leak + thread + undefined + ) ], +); + +is_deeply([ sort $bf->get_feature_areas() ], [ sort keys %known_features ], + 'supported feature areas'); + +foreach my $area (sort keys %known_features) { + ok($bf->has_features($area), "has feature area $area"); + my %features = $bf->get_features($area); + is_deeply([ sort keys %features ], + $known_features{$area}, + "supported features for area $area"); +} + # TODO: Add more test cases. 1; diff --git a/scripts/t/Dpkg_BuildFlags_Ubuntu.t b/scripts/t/Dpkg_BuildFlags_Ubuntu.t new file mode 100644 index 000000000..3cfdb268f --- /dev/null +++ b/scripts/t/Dpkg_BuildFlags_Ubuntu.t @@ -0,0 +1,57 @@ +#!/usr/bin/perl +# +# 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, see <https://www.gnu.org/licenses/>. + +use strict; +use warnings; + +use Test::More tests => 16; + +BEGIN { + use_ok('Dpkg::BuildFlags'); +} + +sub test_optflag +{ + my ($bf, $optflag) = @_; + + foreach my $flag (qw(CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS GCJFLAGS + FFLAGS FCFLAGS)) { + my $value = $bf->get($flag); + ok($value =~ m/$optflag/, "$flag contains $optflag: $value"); + } +} + +my $bf; + +# Force loading the Dpkg::Vendor::Ubuntu module. +$ENV{DEB_VENDOR} = 'Ubuntu'; + +# Test the optimization flag inherited from the Dpkg::Vendor::Debian module. +$ENV{DEB_HOST_ARCH} = 'amd64'; +$bf = Dpkg::BuildFlags->new(); + +test_optflag($bf, '-O2'); + +# Test the overlaid Ubuntu-specific linker flag. +ok($bf->get('LDFLAGS') =~ m/-Wl,-Bsymbolic-functions/, + 'LDFLAGS contains -Bsymbolic-functions'); + +# Test the optimization flag override only for ppc64el. +$ENV{DEB_HOST_ARCH} = 'ppc64el'; +$bf = Dpkg::BuildFlags->new(); + +test_optflag($bf, '-O3'); + +1; diff --git a/scripts/t/Dpkg_Build_Types.t b/scripts/t/Dpkg_Build_Types.t index 7fa70ccf9..03c7055b3 100644 --- a/scripts/t/Dpkg_Build_Types.t +++ b/scripts/t/Dpkg_Build_Types.t @@ -16,7 +16,7 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More tests => 39; BEGIN { use_ok('Dpkg::Build::Types'); @@ -52,6 +52,29 @@ ok(!build_has_all(BUILD_SOURCE | BUILD_ARCH_DEP), 'build source,all not has_all source,any'); ok(!build_has_all(BUILD_FULL), 'build source,all has_all full'); +set_build_type_from_targets('build-arch,build-indep', + '--targets=build-arch,build-indep', nocheck => 1); +is(get_build_options_from_type(), 'binary', + 'build is binary from build-arch,build-indep'); +ok(build_is(BUILD_BINARY), 'build is binary from build-arch,build-indep'); + +set_build_type_from_targets('binary', '--targets=binary', nocheck => 1); +is(get_build_options_from_type(), 'binary', 'build is binary from binary'); +ok(build_is(BUILD_BINARY), 'build is binary from binary'); + +set_build_type_from_targets('clean,binary-indep', + '--targets=clean,binary-indep', nocheck => 1); +ok(build_is(BUILD_SOURCE | BUILD_ARCH_INDEP), 'build source,all is source,all'); +ok(!build_is(BUILD_SOURCE | BUILD_ARCH_DEP), 'build source,all is not source,any'); +ok(build_has_any(BUILD_SOURCE), 'build source,all has_any source'); +ok(build_has_any(BUILD_ARCH_INDEP), 'build source,all has_any any'); +ok(build_has_none(BUILD_DEFAULT), 'build source,all has_none default'); +ok(build_has_none(BUILD_ARCH_DEP), 'build source,all has_none any'); +ok(!build_has_all(BUILD_BINARY), 'build source,all not has_all binary'); +ok(!build_has_all(BUILD_SOURCE | BUILD_ARCH_DEP), + 'build source,all not has_all source,any'); +ok(!build_has_all(BUILD_FULL), 'build source,all has_all full'); + set_build_type(BUILD_BINARY, '--build=binary', nocheck => 1); ok(build_is(BUILD_BINARY), 'build binary is binary'); ok(build_has_any(BUILD_ARCH_DEP), 'build binary has_any any'); diff --git a/scripts/t/Dpkg_Changelog.t b/scripts/t/Dpkg_Changelog.t index 1ca238acd..4d046fec1 100644 --- a/scripts/t/Dpkg_Changelog.t +++ b/scripts/t/Dpkg_Changelog.t @@ -16,7 +16,7 @@ use strict; use warnings; -use Test::More tests => 94; +use Test::More tests => 102; use Test::Dpkg qw(:paths); use File::Basename; @@ -29,21 +29,19 @@ BEGIN { use_ok('Dpkg::Vendor', qw(get_current_vendor)); }; -my $datadir = test_get_data_path('t/Dpkg_Changelog'); +my $datadir = test_get_data_path(); my $vendor = get_current_vendor(); ######################### foreach my $file ("$datadir/countme", "$datadir/shadow", "$datadir/fields", - "$datadir/regressions", "$datadir/date-format") { + "$datadir/regressions", "$datadir/date-format", "$datadir/stop-modeline") { my $changes = Dpkg::Changelog::Debian->new(verbose => 0); $changes->load($file); - open(my $clog_fh, '<', "$file") or die "can't open $file\n"; - my $content = file_slurp($clog_fh); - close($clog_fh); + my $content = file_slurp($file); cmp_ok($content, 'eq', "$changes", "string output of Dpkg::Changelog on $file"); my $errors = $changes->get_parse_errors(); @@ -81,6 +79,10 @@ foreach my $file ("$datadir/countme", "$datadir/shadow", "$datadir/fields", count => 3, versions => [ '2:2.0-1', '1:2.0~rc2-3', '1:2.0~rc2-2' ], name => 'positive count'); + check_options(%ref, range => { count => 3, reverse => 1 }, + count => 3, + versions => [ '1:2.0~rc2-2', '1:2.0~rc2-3', '2:2.0-1' ], + name => 'positive reverse count'); check_options(%ref, range => { count => -3 }, count => 3, versions => [ @@ -342,6 +344,10 @@ Xb-Userfield2: foobar is($data[2]->get_timestamp(), 'Mon, 01 Jan 2000 00:00:00 +0000', 'get date w/ DoW, and zero timezone offset'); } + if ($file eq "$datadir/stop-modeline") { + is($changes->get_unparsed_tail(), "vim: et\n", + 'get unparsed modeline at EOF'); + } if ($file eq "$datadir/regressions") { my $f = ($changes->format_range('dpkg'))[0]; is("$f->{Version}", '0', 'version 0 correctly parsed'); diff --git a/scripts/t/Dpkg_Changelog/shadow b/scripts/t/Dpkg_Changelog/shadow index f9b2236f5..ca1f1934a 100644 --- a/scripts/t/Dpkg_Changelog/shadow +++ b/scripts/t/Dpkg_Changelog/shadow @@ -204,7 +204,7 @@ shadow (1:4.0.3-35) unstable; urgency=low Closes: #311588 - 131_tl: Tagalog updated by Eric Pareja Closes: #310386 - - 132_vi: Correct file used for Vietnamese tanslation + - 132_vi: Correct file used for Vietnamese translation Closes: #306614, #307251, #307262, #308479 -- Christian Perrier <bubulle@debian.org> Fri, 3 Jun 2005 07:32:07 +0200 @@ -896,7 +896,7 @@ shadow (1:4.0.3-12) unstable; urgency=low shadow (1:4.0.3-11) unstable; urgency=low * update Japanese debconf translation. closes: #210382 - * update Brazilian Portugese debconf translation. closes: #208122 + * update Brazilian Portuguese debconf translation. closes: #208122 * run pam cleanup code as root. closes: #195048 -- Karl Ramm <kcr@debian.org> Sat, 13 Sep 2003 17:49:29 -0400 @@ -1108,7 +1108,7 @@ shadow (20000902-7) unstable; urgency=low * Cancel login timeout after authentication so that patient people timing out on network directory services can log in with local accounts. Closes: #107148 - * Add Brazillian Portugese debconf template translation for passwd. + * Add Brazillian Portuguese debconf template translation for passwd. Closes: #105292, #93223 * Pull /usr/share/doc/$package/README.shadow-paper.gz. Closes: #98058 * Use getent instead of group to verify existence of shadow group @@ -1382,7 +1382,7 @@ shadow (19990827-9) unstable; urgency=low shadow (19990827-8) unstable; urgency=low - * src/login.c: fixed loggin of username on successful login (was using + * src/login.c: fixed login of username on successful login (was using the normal username, when it should have used pam_user), closes: #47819 * src/login.c: check for hushed login and pass PAM_SILENT if true, @@ -1586,7 +1586,7 @@ shadow (19990827-1) unstable; urgency=low also call pam_fail_delay() with FAIL_DELAY as the arg before authentication. * etc/login.defs.pam.linux: new file, reflects options that PAM takesover * etc/login.defs.pam.hurd: new file, same for Hurd - * debian/passwd.mk: make sure that login.defs.5 get's installed for Hurd + * debian/passwd.mk: make sure that login.defs.5 gets installed for Hurd * pam.d/: Modified defaults for each service to reflect the old style and also added commented options on how to enable obsoleted options from login.defs in the PAM Way(tm). diff --git a/scripts/t/Dpkg_Changelog/stop-modeline b/scripts/t/Dpkg_Changelog/stop-modeline new file mode 100644 index 000000000..5b8a7b438 --- /dev/null +++ b/scripts/t/Dpkg_Changelog/stop-modeline @@ -0,0 +1,13 @@ +modeline (2.0-1) unstable; urgency=low + + * Upload. + + -- Dpkg Developers <debian-dpkg@lists.debian.org> Tue, 4 Oct 2005 01:49:05 +0200 + +modeline (1.0-1) unstable; urgency=low + + * Upload. + + -- Dpkg Developers <debian-dpkg@lists.debian.org> Tue, 4 Oct 2005 01:48:05 +0200 + +vim: et diff --git a/scripts/t/Dpkg_Checksums.t b/scripts/t/Dpkg_Checksums.t index e549e640e..33e2587e1 100644 --- a/scripts/t/Dpkg_Checksums.t +++ b/scripts/t/Dpkg_Checksums.t @@ -16,14 +16,14 @@ use strict; use warnings; -use Test::More tests => 44; +use Test::More tests => 59; use Test::Dpkg qw(:paths); BEGIN { use_ok('Dpkg::Checksums'); } -my $datadir = test_get_data_path('t/Dpkg_Checksums'); +my $datadir = test_get_data_path(); my @data = ( { @@ -120,4 +120,32 @@ foreach my $alg (keys %str_checksum) { test_checksums($ck); +# Check remove_file() + +ok($ck->has_file('data-2'), 'To be removed file is present'); +$ck->remove_file('data-2'); +ok(!$ck->has_file('data-2'), 'Remove file is not present'); + +# Check add_from_control() +my $ctrl; +foreach my $f (@data) { + next if $f->{file} ne 'data-2'; + foreach my $alg (keys %{$f->{sums}}) { + $ctrl->{"Checksums-$alg"} = "\n$f->{sums}->{$alg} $f->{size} $f->{file}"; + } +} +$ck->add_from_control($ctrl); + +test_checksums($ck); + +# Check export_to_control() + +my $ctrl_export = {}; +$ck->export_to_control($ctrl_export); + +foreach my $alg (keys %str_checksum) { + is($ctrl_export->{"Checksums-$alg"}, $str_checksum{$alg}, + "Export checksum $alg to a control object"); +} + 1; diff --git a/scripts/t/Dpkg_Compression.t b/scripts/t/Dpkg_Compression.t index 3a2be1107..3babe5fca 100644 --- a/scripts/t/Dpkg_Compression.t +++ b/scripts/t/Dpkg_Compression.t @@ -17,12 +17,12 @@ use strict; use warnings; use Test::More tests => 13; +use Test::Dpkg qw(:paths); use_ok('Dpkg::Compression'); use_ok('Dpkg::Compression::FileHandle'); -my $tmpdir = 't.tmp/Dpkg_Compression'; -mkdir $tmpdir; +my $tmpdir = test_get_temp_path(); my @lines = ("One\n", "Two\n", "Three\n"); my $fh; diff --git a/scripts/t/Dpkg_Conf.t b/scripts/t/Dpkg_Conf.t index 2e55e3d59..940d18dd7 100644 --- a/scripts/t/Dpkg_Conf.t +++ b/scripts/t/Dpkg_Conf.t @@ -23,7 +23,7 @@ BEGIN { use_ok('Dpkg::Conf'); } -my $datadir = test_get_data_path('t/Dpkg_Conf'); +my $datadir = test_get_data_path(); my ($conf, $count, @opts); diff --git a/scripts/t/Dpkg_Control.t b/scripts/t/Dpkg_Control.t index 0f808fbdc..057cb21b6 100644 --- a/scripts/t/Dpkg_Control.t +++ b/scripts/t/Dpkg_Control.t @@ -26,7 +26,7 @@ BEGIN { use_ok('Dpkg::Control::Info'); } -my $datadir = test_get_data_path('t/Dpkg_Control'); +my $datadir = test_get_data_path(); sub parse_dsc { my $path = shift; diff --git a/scripts/t/Dpkg_Control_Fields.t b/scripts/t/Dpkg_Control_Fields.t index 7a6582287..8e0bd721b 100644 --- a/scripts/t/Dpkg_Control_Fields.t +++ b/scripts/t/Dpkg_Control_Fields.t @@ -20,22 +20,25 @@ use Test::More; use Test::Dpkg qw(:paths); BEGIN { - plan tests => 2416; + plan tests => 2438; use_ok('Dpkg::Control::Types'); use_ok('Dpkg::Control::FieldsCore'); } -#my $datadir = test_get_data_path('t/Dpkg_Control_Fields'); +#my $datadir = test_get_data_path(); my @src_dep_fields = qw( Build-Depends Build-Depends-Arch Build-Depends-Indep Build-Conflicts Build-Conflicts-Arch Build-Conflicts-Indep ); -my @bin_dep_fields = qw( +my @bin_dep_normal_fields = qw( Pre-Depends Depends Recommends Suggests Enhances +); +my @bin_dep_union_fields = qw( Conflicts Breaks Replaces Provides Built-Using ); +my @bin_dep_fields = (@bin_dep_normal_fields, @bin_dep_union_fields); my @src_checksums = qw( Checksums-Md5 Checksums-Sha1 Checksums-Sha256 ); @@ -164,7 +167,8 @@ my %fields = ( qw(Format Source Binary Architecture Version Binary-Only-Changes), @src_checksums, qw(Build-Origin Build-Architecture Build-Kernel-Version - Build-Date Build-Path Installed-Build-Depends Environment) + Build-Date Build-Path Build-Tainted-By + Installed-Build-Depends Environment) ], }, CTRL_FILE_CHANGES() => { diff --git a/scripts/t/Dpkg_Control_Tests.t b/scripts/t/Dpkg_Control_Tests.t index 9c14a2e4e..27042dcfc 100644 --- a/scripts/t/Dpkg_Control_Tests.t +++ b/scripts/t/Dpkg_Control_Tests.t @@ -23,7 +23,7 @@ BEGIN { use_ok('Dpkg::Control::Tests'); } -my $datadir = test_get_data_path('t/Dpkg_Control_Tests'); +my $datadir = test_get_data_path(); sub parse_tests { my $path = shift; diff --git a/scripts/t/Dpkg_Deps.t b/scripts/t/Dpkg_Deps.t index 71a3cf16a..14fe4e014 100644 --- a/scripts/t/Dpkg_Deps.t +++ b/scripts/t/Dpkg_Deps.t @@ -16,7 +16,7 @@ use strict; use warnings; -use Test::More tests => 70; +use Test::More tests => 82; use Dpkg::Arch qw(get_host_arch); use Dpkg::Version; @@ -160,6 +160,8 @@ $facts->add_installed_package('pkg-ma-foreign2', '1.3.4-1', get_host_arch(), 'fo $facts->add_installed_package('pkg-ma-allowed', '1.3.4-1', 'somearch', 'allowed'); $facts->add_installed_package('pkg-ma-allowed2', '1.3.4-1', 'somearch', 'allowed'); $facts->add_installed_package('pkg-ma-allowed3', '1.3.4-1', get_host_arch(), 'allowed'); +$facts->add_installed_package('pkg-indep-normal', '1.3.4-1', 'all', 'no'); +$facts->add_installed_package('pkg-indep-foreign', '1.3.4-1', 'all', 'foreign'); $facts->add_provided_package('myvirtual', undef, undef, 'mypackage'); $facts->add_provided_package('myvirtual2', REL_EQ, '1.0-1', 'mypackage'); $facts->add_provided_package('myvirtual3', REL_GE, '2.0-1', 'mypackage'); @@ -169,7 +171,51 @@ my $field_duplicate = 'libc6 (>= 2.3), libc6 (>= 2.6-1), mypackage (>= pkg-ma-foreign2, pkg-ma-allowed:any, pkg-ma-allowed2, pkg-ma-allowed3'; my $dep_dup = deps_parse($field_duplicate); $dep_dup->simplify_deps($facts, $dep_opposite); -is($dep_dup->output(), 'libc6 (>= 2.6-1), mypackage2, pkg-ma-allowed2', 'Simplify deps'); +is($dep_dup->output(), 'libc6 (>= 2.6-1), mypackage2, pkg-ma-allowed2', + 'Simplify deps'); + +my $dep_ma_all_normal_implicit_native = deps_parse('pkg-indep-normal', build_dep => 1); +my $dep_ma_all_normal_explicit_native = deps_parse('pkg-indep-normal:native', build_dep => 1); +my $dep_ma_all_foreign_implicit_native = deps_parse('pkg-indep-foreign', build_dep => 1); +my $dep_ma_all_foreign_explicit_native = deps_parse('pkg-indep-foreign:native', build_dep => 1); +$dep_ma_all_normal_implicit_native->simplify_deps($facts); +is($dep_ma_all_normal_implicit_native->output(), '', + 'Simplify arch:all m-a:no w/ implicit :native (satisfied)'); +$dep_ma_all_normal_explicit_native->simplify_deps($facts); +is($dep_ma_all_normal_explicit_native->output(), '', + 'Simplify arch:all m-a:no w/ explicit :native (satisfied)'); +$dep_ma_all_foreign_implicit_native->simplify_deps($facts); +is($dep_ma_all_foreign_implicit_native->output(), '', + 'Simplify arch:all m-a:foreign w/ implicit :native (satisfied)'); +$dep_ma_all_foreign_explicit_native->simplify_deps($facts); +is($dep_ma_all_foreign_explicit_native->output(), 'pkg-indep-foreign:native', + 'Simplify arch:all m-a:foreign w/ explicit :native (unsatisfied)'); + +TODO: { + +local $TODO = 'not yet implemented'; + +my $dep_or_eq = deps_parse('pkg-a | pkg-b | pkg-a'); +$dep_or_eq->simplify_deps($facts); +is($dep_or_eq->output(), 'pkg-a | pkg-b', + 'Simplify duped ORed, equal names'); + +$dep_or_eq = deps_parse('pkg-a (= 10) | pkg-b | pkg-a (= 10)'); +$dep_or_eq->simplify_deps($facts); +is($dep_or_eq->output(), 'pkg-a (= 10) | pkg-b', + 'Simplify duped ORed, matching version'); + +my $dep_or_subset = deps_parse('pkg-a (>= 10) | pkg-b | pkg-a (= 10)'); +$dep_or_eq->simplify_deps($facts); +is($dep_or_eq->output(), 'pkg-a (= 10) | pkg-b', + 'Simplify duped ORed, subset version'); + +$dep_or_subset = deps_parse('pkg-a (>= 10) <profile> | pkg-b | pkg-a (= 10) <profile>'); +$dep_or_eq->simplify_deps($facts); +is($dep_or_eq->output(), 'pkg-a (= 10) <profile> | pkg-b', + 'Simplify duped ORed, subset version'); + +} # TODO my $field_virtual = 'myvirtual | other'; my $dep_virtual = deps_parse($field_virtual); @@ -221,11 +267,16 @@ $dep_profiles->simplify_deps($facts); is($dep_profiles->output(), 'dupe <stage1 cross>', 'Simplification respects duplicated profiles'); +TODO: { + +local $TODO = 'not yet implemented'; + $dep_profiles = deps_parse('tool <!cross>, tool <stage1 cross>'); $dep_profiles->simplify_deps($facts); -# XXX: Ideally this would get simplified to "tool <!cross> <stage1 cross>". -is($dep_profiles->output(), 'tool <!cross>, tool <stage1 cross>', - 'Simplification respects profiles'); +is($dep_profiles->output(), 'tool <!cross> <stage1 cross>', + 'Simplify restriction formulas'); + +} # TODO $dep_profiles = deps_parse('libfoo-dev:native <!stage1>, libfoo-dev <!stage1 cross>', build_dep => 1); $dep_profiles->simplify_deps($facts); @@ -233,6 +284,26 @@ is($dep_profiles->output(), 'libfoo-dev:native <!stage1>, libfoo-dev <!stage1 cross>', 'Simplification respects archqualifiers and profiles'); +my $dep_archqual = deps_parse('pkg, pkg:any'); +$dep_archqual->simplify_deps($facts); +is($dep_archqual->output(), 'pkg, pkg:any', + 'Simplify respect arch-qualified ANDed dependencies 1/2'); + +$dep_archqual = deps_parse('pkg:amd64, pkg:any, pkg:i386'); +$dep_archqual->simplify_deps($facts); +is($dep_archqual->output(), 'pkg:amd64, pkg:any, pkg:i386', + 'Simplify respects arch-qualified ANDed dependencies 2/2'); + +$dep_archqual = deps_parse('pkg | pkg:any'); +$dep_archqual->simplify_deps($facts); +is($dep_archqual->output(), 'pkg | pkg:any', + 'Simplify respect arch-qualified ORed dependencies 1/2'); + +$dep_archqual = deps_parse('pkg:amd64 | pkg:i386 | pkg:any'); +$dep_archqual->simplify_deps($facts); +is($dep_archqual->output(), 'pkg:amd64 | pkg:i386 | pkg:any', + 'Simplify respect arch-qualified ORed dependencies 2/2'); + my $dep_version = deps_parse('pkg, pkg (= 1.0)'); $dep_version->simplify_deps($facts); is($dep_version->output(), 'pkg (= 1.0)', 'Simplification merges versions'); diff --git a/scripts/t/Dpkg_Dist_Files.t b/scripts/t/Dpkg_Dist_Files.t index b29973d38..e7d6a5da6 100644 --- a/scripts/t/Dpkg_Dist_Files.t +++ b/scripts/t/Dpkg_Dist_Files.t @@ -21,7 +21,7 @@ use Test::Dpkg qw(:paths); use_ok('Dpkg::Dist::Files'); -my $datadir = test_get_data_path('t/Dpkg_Dist_Files'); +my $datadir = test_get_data_path(); my $expected; my %expected = ( @@ -29,11 +29,13 @@ my %expected = ( filename => 'pkg-src_4:2.0+1A~rc1-1.dsc', section => 'source', priority => 'extra', + attrs => {}, }, 'pkg-src_4:2.0+1A~rc1-1.tar.xz' => { filename => 'pkg-src_4:2.0+1A~rc1-1.tar.xz', section => 'source', priority => 'extra', + attrs => {}, }, 'pkg-templ_1.2.3_arch.type' => { filename => 'pkg-templ_1.2.3_arch.type', @@ -43,6 +45,7 @@ my %expected = ( arch => 'arch', section => 'section', priority => 'priority', + attrs => {}, }, 'pkg-arch_2.0.0_amd64.deb' => { filename => 'pkg-arch_2.0.0_amd64.deb', @@ -52,6 +55,7 @@ my %expected = ( arch => 'amd64', section => 'admin', priority => 'required', + attrs => {}, }, 'pkg-indep_0.0.1-2_all.deb' => { filename => 'pkg-indep_0.0.1-2_all.deb', @@ -61,26 +65,35 @@ my %expected = ( arch => 'all', section => 'net', priority => 'standard', + attrs => {}, }, 'other_0.txt' => { filename => 'other_0.txt', section => 'text', priority => 'optional', + attrs => { + 'mime-type' => 'text/plain', + }, }, 'BY-HAND-file' => { filename => 'BY-HAND-file', section => 'webdocs', priority => 'optional', + attrs => { + 'by-hand' => 'true' + }, }, 'another:filename' => { filename => 'another:filename', section => 'by-hand', priority => 'extra', + attrs => {}, }, 'added-on-the-fly' => { filename => 'added-on-the-fly', section => 'void', priority => 'wish', + attrs => {}, }, ); @@ -88,8 +101,8 @@ my $dist = Dpkg::Dist::Files->new(); $dist->load("$datadir/files-byhand") or error('cannot parse file'); $expected = <<'FILES'; -BY-HAND-file webdocs optional -other_0.txt text optional +BY-HAND-file webdocs optional by-hand=true +other_0.txt text optional mime-type=text/plain pkg-arch_2.0.0_amd64.deb admin required pkg-indep_0.0.1-2_all.deb net standard pkg-templ_1.2.3_arch.type section priority @@ -110,9 +123,9 @@ foreach my $f ($dist->get_files()) { is($dist->parse_filename('file%invalid'), undef, 'invalid filename'); $expected = <<'FILES'; -BY-HAND-file webdocs optional +BY-HAND-file webdocs optional by-hand=true added-on-the-fly void wish -other_0.txt text optional +other_0.txt text optional mime-type=text/plain pkg-arch_2.0.0_amd64.deb void imperative pkg-templ_1.2.3_arch.type section priority FILES @@ -156,8 +169,8 @@ is_deeply($dist->get_file('another:filename'), is($dist->output, $expected, 'Added source files'); $expected = <<'FILES'; -BY-HAND-file webdocs optional -other_0.txt text optional +BY-HAND-file webdocs optional by-hand=true +other_0.txt text optional mime-type=text/plain pkg-arch_2.0.0_amd64.deb admin required pkg-frag-a_0.0_arch.type section priority pkg-frag-b_0.0_arch.type section priority @@ -181,8 +194,8 @@ $dist->filter(remove => sub { $_[0]->{priority} eq 'optional' }); is($dist->output(), $expected, 'Filter remove priority optional'); $expected = <<'FILES'; -BY-HAND-file webdocs optional -other_0.txt text optional +BY-HAND-file webdocs optional by-hand=true +other_0.txt text optional mime-type=text/plain FILES $dist->reset(); @@ -191,7 +204,7 @@ $dist->filter(keep => sub { $_[0]->{priority} eq 'optional' }); is($dist->output(), $expected, 'Filter keep priority optional'); $expected = <<'FILES'; -BY-HAND-file webdocs optional +BY-HAND-file webdocs optional by-hand=true FILES $dist->reset(); diff --git a/scripts/t/Dpkg_Dist_Files/files-byhand b/scripts/t/Dpkg_Dist_Files/files-byhand index ac45d4610..416b14fb8 100644 --- a/scripts/t/Dpkg_Dist_Files/files-byhand +++ b/scripts/t/Dpkg_Dist_Files/files-byhand @@ -1,5 +1,5 @@ pkg-templ_1.2.3_arch.type section priority pkg-arch_2.0.0_amd64.deb admin required pkg-indep_0.0.1-2_all.deb net standard -other_0.txt text optional -BY-HAND-file webdocs optional +other_0.txt text optional mime-type=text/plain +BY-HAND-file webdocs optional by-hand=true diff --git a/scripts/t/Dpkg_OpenPGP.t b/scripts/t/Dpkg_OpenPGP.t index 84b8401f3..164395117 100644 --- a/scripts/t/Dpkg_OpenPGP.t +++ b/scripts/t/Dpkg_OpenPGP.t @@ -25,32 +25,35 @@ use Dpkg::ErrorHandling; test_needs_command('gpg'); -plan tests => 3; +plan tests => 6; use_ok('Dpkg::OpenPGP'); report_options(quiet_warnings => 1); -my $datadir = test_get_data_path('t/Dpkg_OpenPGP'); -my $tmpdir = 't.tmp/Dpkg_OpenPGP'; +my $datadir = test_get_data_path(); +my $tmpdir = test_get_temp_path(); +my $ascfile; -mkdir $tmpdir; +$ascfile = "$tmpdir/package_1.0.orig.tar.enoent"; +is(openpgp_sig_to_asc("$datadir/nonexistent", $ascfile), + undef, 'no conversion of inexistent file'); -openpgp_sig_to_asc("$datadir/package_1.0.orig.tar.sig", - "$tmpdir/package_1.0.orig.tar.sig2asc"); +$ascfile = "$tmpdir/package_1.0.orig.tar.sig2asc"; +is(openpgp_sig_to_asc("$datadir/package_1.0.orig.tar.sig", $ascfile), + $ascfile, 'conversion from binary sig to armored asc'); -ok(compare("$tmpdir/package_1.0.orig.tar.sig2asc", - "$datadir/package_1.0.orig.tar.asc") == 0, +ok(compare($ascfile, "$datadir/package_1.0.orig.tar.asc") == 0, 'binary signature converted to OpenPGP ASCII Armor'); # Grab the output messages. eval { - openpgp_sig_to_asc("$datadir/package_1.0.orig.tar.asc", - "$tmpdir/package_1.0.orig.tar.asc2asc"); + $ascfile = "$tmpdir/package_1.0.orig.tar.asc2asc"; + is(openpgp_sig_to_asc("$datadir/package_1.0.orig.tar.asc", $ascfile), + $ascfile, 'copy instead of converting already armored input'); }; -ok(compare("$tmpdir/package_1.0.orig.tar.asc2asc", - "$datadir/package_1.0.orig.tar.asc") == 0, +ok(compare($ascfile, "$datadir/package_1.0.orig.tar.asc") == 0, 'OpenPGP ASCII Armor copied to destination'); # TODO: Add actual test cases. diff --git a/scripts/t/Dpkg_Path.t b/scripts/t/Dpkg_Path.t index deb63bab7..fbf883d64 100644 --- a/scripts/t/Dpkg_Path.t +++ b/scripts/t/Dpkg_Path.t @@ -17,14 +17,14 @@ use strict; use warnings; use Test::More tests => 16; +use Test::Dpkg qw(:paths); use_ok('Dpkg::Path', 'canonpath', 'resolve_symlink', 'check_files_are_the_same', 'get_pkg_root_dir', 'guess_pkg_root_dir', 'relative_to_pkg_root'); -my $tmpdir = 't.tmp/Dpkg_Path'; +my $tmpdir = test_get_temp_path(); -mkdir $tmpdir; mkdir "$tmpdir/a"; mkdir "$tmpdir/a/b"; mkdir "$tmpdir/a/b/c"; diff --git a/scripts/t/Dpkg_Shlibs.t b/scripts/t/Dpkg_Shlibs.t index 39163d75b..a2b892d74 100644 --- a/scripts/t/Dpkg_Shlibs.t +++ b/scripts/t/Dpkg_Shlibs.t @@ -21,7 +21,7 @@ use Test::Dpkg qw(:needs :paths); use Cwd; -plan tests => 148; +plan tests => 150; use Dpkg::Path qw(find_command); @@ -31,7 +31,7 @@ my $tmp; my @tmp; my %tmp; -my $datadir = test_get_data_path('t/Dpkg_Shlibs'); +my $datadir = test_get_data_path(); my @librarypaths; @@ -54,7 +54,7 @@ Dpkg::Shlibs::blank_library_paths(); # We want relative paths inside the ld.so.conf fragments to work, and $srcdir # is usually a relative path, so let's temporarily switch directory. # XXX: An alternative would be to make parse_ldso_conf relative path aware. -my $cwd = cwd(); +my $cwd = getcwd(); test_needs_srcdir_switch(); Dpkg::Shlibs::parse_ldso_conf('t/Dpkg_Shlibs/ld.so.conf'); chdir($cwd); @@ -104,7 +104,7 @@ $obj->parse_objdump_output($objdump); close $objdump; ok($obj->is_public_library(), 'libc6 is a public library'); -ok(!$obj->is_executable(), 'libc6 is not an executable'); +ok($obj->is_executable(), 'libc6 is an executable'); is($obj->{SONAME}, 'libc.so.6', 'SONAME'); is($obj->{HASH}, '0x13d99c', 'HASH'); @@ -350,6 +350,8 @@ open $objdump, '<', "$datadir/objdump.glib-ia64" or die "$datadir/objdump.glib-ia64: $!"; $obj->parse_objdump_output($objdump); close $objdump; +ok($obj->is_public_library(), 'glib-ia64 is a public library'); +ok(!$obj->is_executable(), 'glib-ia64 is not an executable'); $sym = $obj->get_symbol('IA__g_free'); is_deeply( $sym, { name => 'IA__g_free', version => '', @@ -380,7 +382,8 @@ sub check_spacesym { debug => '', type => 'F', weak => '', local => '', global => 1, visibility => $visibility, hidden => '', defined => 1 }, $name); - ok(defined $obj->{dynrelocs}{$name}, "dynreloc found for $name"); + ok(defined $obj->{dynrelocs}{$name . "@@" . $version}, + "dynreloc found for $name"); } check_spacesym('symdefaultvernospacedefault', 'Base'); diff --git a/scripts/t/Dpkg_Shlibs/objdump.basictags-amd64 b/scripts/t/Dpkg_Shlibs/objdump.basictags-amd64 index 93d7ea467..aa533761b 100644 --- a/scripts/t/Dpkg_Shlibs/objdump.basictags-amd64 +++ b/scripts/t/Dpkg_Shlibs/objdump.basictags-amd64 @@ -2,46 +2,45 @@ ./t/Dpkg_Shlibs/libobjdump.basictags-amd64.so: file format elf32-i386 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED -start address 0x00000480 +start address 0x00000450 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 - filesz 0x00000724 memsz 0x00000724 flags r-x - LOAD off 0x00000724 vaddr 0x00001724 paddr 0x00001724 align 2**12 - filesz 0x00000120 memsz 0x00000124 flags rw- - DYNAMIC off 0x00000730 vaddr 0x00001730 paddr 0x00001730 align 2**2 - filesz 0x000000e8 memsz 0x000000e8 flags rw- - NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2 + filesz 0x000006d0 memsz 0x000006d0 flags r-x + LOAD off 0x00000f18 vaddr 0x00001f18 paddr 0x00001f18 align 2**12 + filesz 0x000000f8 memsz 0x000000fc flags rw- + DYNAMIC off 0x00000f20 vaddr 0x00001f20 paddr 0x00001f20 align 2**2 + filesz 0x000000d0 memsz 0x000000d0 flags rw- + NOTE off 0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2 filesz 0x00000024 memsz 0x00000024 flags r-- -EH_FRAME off 0x00000628 vaddr 0x00000628 paddr 0x00000628 align 2**2 - filesz 0x00000044 memsz 0x00000044 flags r-- +EH_FRAME off 0x000005b8 vaddr 0x000005b8 paddr 0x000005b8 align 2**2 + filesz 0x0000004c memsz 0x0000004c flags r-- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4 filesz 0x00000000 memsz 0x00000000 flags rw- + RELRO off 0x00000f18 vaddr 0x00001f18 paddr 0x00001f18 align 2**0 + filesz 0x000000e8 memsz 0x000000e8 flags r-- Dynamic Section: NEEDED libc.so.6 SONAME libbasictags.so.1 - INIT 0x00000424 - FINI 0x00000614 - INIT_ARRAY 0x00001724 + INIT 0x00000404 + FINI 0x000005a4 + INIT_ARRAY 0x00001f18 INIT_ARRAYSZ 0x00000004 - FINI_ARRAY 0x00001728 + FINI_ARRAY 0x00001f1c FINI_ARRAYSZ 0x00000004 - GNU_HASH 0x00000118 - STRTAB 0x00000278 - SYMTAB 0x00000168 - STRSZ 0x00000117 + GNU_HASH 0x00000138 + STRTAB 0x00000288 + SYMTAB 0x00000188 + STRSZ 0x00000103 SYMENT 0x00000010 - PLTGOT 0x0000182c - PLTRELSZ 0x00000010 - PLTREL 0x00000011 - JMPREL 0x00000414 - REL 0x000003d4 - RELSZ 0x00000040 + PLTGOT 0x00002000 + REL 0x000003cc + RELSZ 0x00000038 RELENT 0x00000008 - VERNEED 0x000003b4 + VERNEED 0x000003ac VERNEEDNUM 0x00000001 - VERSYM 0x00000390 + VERSYM 0x0000038c RELCOUNT 0x00000003 Version References: @@ -52,32 +51,28 @@ DYNAMIC SYMBOL TABLE: 00000000 w D *UND* 00000000 _ITM_deregisterTMCloneTable 00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize 00000000 w D *UND* 00000000 __gmon_start__ -00000000 w D *UND* 00000000 _Jv_RegisterClasses 00000000 w D *UND* 00000000 _ITM_registerTMCloneTable -00001844 g D .data 00000000 Base _edata -000005f0 g DF .text 00000002 Base symbol26_little -00001848 g D .bss 00000000 Base _end -000005d0 g DF .text 00000002 Base symbol21_amd64 -00001844 g D .bss 00000000 Base __bss_start -000005e0 g DF .text 00000002 Base symbol25_64 -00000424 g DF .init 00000000 Base _init -00000600 g DF .text 00000002 Base symbol31_randomtag -00000614 g DF .fini 00000000 Base _fini -00000610 g DF .text 00000002 Base symbol51_untagged -000005c0 g DF .text 00000002 Base symbol11_optional +00002010 g D .data 00000000 Base _edata +00000580 g DF .text 00000002 Base symbol26_little +00002014 g D .bss 00000000 Base _end +00000560 g DF .text 00000002 Base symbol21_amd64 +00002010 g D .bss 00000000 Base __bss_start +00000570 g DF .text 00000002 Base symbol25_64 +00000404 g DF .init 00000000 Base _init +00000590 g DF .text 00000002 Base symbol31_randomtag +000005a4 g DF .fini 00000000 Base _fini +000005a0 g DF .text 00000002 Base symbol51_untagged +00000550 g DF .text 00000002 Base symbol11_optional DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE -00001724 R_386_RELATIVE *ABS* -00001728 R_386_RELATIVE *ABS* -00001840 R_386_RELATIVE *ABS* -00001818 R_386_GLOB_DAT _ITM_deregisterTMCloneTable -0000181c R_386_GLOB_DAT __cxa_finalize -00001820 R_386_GLOB_DAT __gmon_start__ -00001824 R_386_GLOB_DAT _Jv_RegisterClasses -00001828 R_386_GLOB_DAT _ITM_registerTMCloneTable -00001838 R_386_JUMP_SLOT __cxa_finalize -0000183c R_386_JUMP_SLOT __gmon_start__ +00001f18 R_386_RELATIVE *ABS* +00001f1c R_386_RELATIVE *ABS* +0000200c R_386_RELATIVE *ABS* +00001ff0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable +00001ff4 R_386_GLOB_DAT __cxa_finalize@GLIBC_2.1.3 +00001ff8 R_386_GLOB_DAT __gmon_start__ +00001ffc R_386_GLOB_DAT _ITM_registerTMCloneTable diff --git a/scripts/t/Dpkg_Shlibs/objdump.basictags-i386 b/scripts/t/Dpkg_Shlibs/objdump.basictags-i386 index 4138a8945..af0f707d1 100644 --- a/scripts/t/Dpkg_Shlibs/objdump.basictags-i386 +++ b/scripts/t/Dpkg_Shlibs/objdump.basictags-i386 @@ -2,46 +2,45 @@ ./t/Dpkg_Shlibs/libobjdump.basictags-i386.so: file format elf32-i386 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED -start address 0x000004e0 +start address 0x000004b0 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 - filesz 0x000007dc memsz 0x000007dc flags r-x - LOAD off 0x000007dc vaddr 0x000017dc paddr 0x000017dc align 2**12 - filesz 0x00000120 memsz 0x00000124 flags rw- - DYNAMIC off 0x000007e8 vaddr 0x000017e8 paddr 0x000017e8 align 2**2 - filesz 0x000000e8 memsz 0x000000e8 flags rw- - NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2 + filesz 0x00000788 memsz 0x00000788 flags r-x + LOAD off 0x00000f18 vaddr 0x00001f18 paddr 0x00001f18 align 2**12 + filesz 0x000000f8 memsz 0x000000fc flags rw- + DYNAMIC off 0x00000f20 vaddr 0x00001f20 paddr 0x00001f20 align 2**2 + filesz 0x000000d0 memsz 0x000000d0 flags rw- + NOTE off 0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2 filesz 0x00000024 memsz 0x00000024 flags r-- -EH_FRAME off 0x000006a8 vaddr 0x000006a8 paddr 0x000006a8 align 2**2 - filesz 0x00000054 memsz 0x00000054 flags r-- +EH_FRAME off 0x00000638 vaddr 0x00000638 paddr 0x00000638 align 2**2 + filesz 0x0000005c memsz 0x0000005c flags r-- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4 filesz 0x00000000 memsz 0x00000000 flags rw- + RELRO off 0x00000f18 vaddr 0x00001f18 paddr 0x00001f18 align 2**0 + filesz 0x000000e8 memsz 0x000000e8 flags r-- Dynamic Section: NEEDED libc.so.6 SONAME libbasictags.so.1 - INIT 0x00000484 - FINI 0x00000694 - INIT_ARRAY 0x000017dc + INIT 0x00000464 + FINI 0x00000624 + INIT_ARRAY 0x00001f18 INIT_ARRAYSZ 0x00000004 - FINI_ARRAY 0x000017e0 + FINI_ARRAY 0x00001f1c FINI_ARRAYSZ 0x00000004 - GNU_HASH 0x00000118 - STRTAB 0x000002a8 - SYMTAB 0x00000178 - STRSZ 0x00000144 + GNU_HASH 0x00000138 + STRTAB 0x000002b8 + SYMTAB 0x00000198 + STRSZ 0x00000130 SYMENT 0x00000010 - PLTGOT 0x000018e4 - PLTRELSZ 0x00000010 - PLTREL 0x00000011 - JMPREL 0x00000474 - REL 0x00000434 - RELSZ 0x00000040 + PLTGOT 0x00002000 + REL 0x0000042c + RELSZ 0x00000038 RELENT 0x00000008 - VERNEED 0x00000414 + VERNEED 0x0000040c VERNEEDNUM 0x00000001 - VERSYM 0x000003ec + VERSYM 0x000003e8 RELCOUNT 0x00000003 Version References: @@ -52,34 +51,30 @@ DYNAMIC SYMBOL TABLE: 00000000 w D *UND* 00000000 _ITM_deregisterTMCloneTable 00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize 00000000 w D *UND* 00000000 __gmon_start__ -00000000 w D *UND* 00000000 _Jv_RegisterClasses 00000000 w D *UND* 00000000 _ITM_registerTMCloneTable -000018fc g D .data 00000000 Base _edata -00000650 g DF .text 00000002 Base symbol26_little -00001900 g D .bss 00000000 Base _end -00000680 g DF .text 00000002 Base symbol41_i386_and_optional -00000630 g DF .text 00000002 Base symbol22_i386 -00000660 g DF .text 00000002 Base symbol28_little_32 -000018fc g D .bss 00000000 Base __bss_start -00000484 g DF .init 00000000 Base _init -00000670 g DF .text 00000002 Base symbol31_randomtag -00000640 g DF .text 00000002 Base symbol24_32 -00000694 g DF .fini 00000000 Base _fini -00000690 g DF .text 00000002 Base symbol51_untagged -00000620 g DF .text 00000002 Base symbol11_optional +00002010 g D .data 00000000 Base _edata +000005e0 g DF .text 00000002 Base symbol26_little +00002014 g D .bss 00000000 Base _end +00000610 g DF .text 00000002 Base symbol41_i386_and_optional +000005c0 g DF .text 00000002 Base symbol22_i386 +000005f0 g DF .text 00000002 Base symbol28_little_32 +00002010 g D .bss 00000000 Base __bss_start +00000464 g DF .init 00000000 Base _init +00000600 g DF .text 00000002 Base symbol31_randomtag +000005d0 g DF .text 00000002 Base symbol24_32 +00000624 g DF .fini 00000000 Base _fini +00000620 g DF .text 00000002 Base symbol51_untagged +000005b0 g DF .text 00000002 Base symbol11_optional DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE -000017dc R_386_RELATIVE *ABS* -000017e0 R_386_RELATIVE *ABS* -000018f8 R_386_RELATIVE *ABS* -000018d0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable -000018d4 R_386_GLOB_DAT __cxa_finalize -000018d8 R_386_GLOB_DAT __gmon_start__ -000018dc R_386_GLOB_DAT _Jv_RegisterClasses -000018e0 R_386_GLOB_DAT _ITM_registerTMCloneTable -000018f0 R_386_JUMP_SLOT __cxa_finalize -000018f4 R_386_JUMP_SLOT __gmon_start__ +00001f18 R_386_RELATIVE *ABS* +00001f1c R_386_RELATIVE *ABS* +0000200c R_386_RELATIVE *ABS* +00001ff0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable +00001ff4 R_386_GLOB_DAT __cxa_finalize@GLIBC_2.1.3 +00001ff8 R_386_GLOB_DAT __gmon_start__ +00001ffc R_386_GLOB_DAT _ITM_registerTMCloneTable diff --git a/scripts/t/Dpkg_Shlibs/objdump.basictags-mips b/scripts/t/Dpkg_Shlibs/objdump.basictags-mips index 620b821cc..27795c49b 100644 --- a/scripts/t/Dpkg_Shlibs/objdump.basictags-mips +++ b/scripts/t/Dpkg_Shlibs/objdump.basictags-mips @@ -2,46 +2,45 @@ ./t/Dpkg_Shlibs/libobjdump.basictags-mips.so: file format elf32-i386 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED -start address 0x000004b0 +start address 0x00000480 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 - filesz 0x00000780 memsz 0x00000780 flags r-x - LOAD off 0x00000780 vaddr 0x00001780 paddr 0x00001780 align 2**12 - filesz 0x00000120 memsz 0x00000124 flags rw- - DYNAMIC off 0x0000078c vaddr 0x0000178c paddr 0x0000178c align 2**2 - filesz 0x000000e8 memsz 0x000000e8 flags rw- - NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2 + filesz 0x0000072c memsz 0x0000072c flags r-x + LOAD off 0x00000f18 vaddr 0x00001f18 paddr 0x00001f18 align 2**12 + filesz 0x000000f8 memsz 0x000000fc flags rw- + DYNAMIC off 0x00000f20 vaddr 0x00001f20 paddr 0x00001f20 align 2**2 + filesz 0x000000d0 memsz 0x000000d0 flags rw- + NOTE off 0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2 filesz 0x00000024 memsz 0x00000024 flags r-- -EH_FRAME off 0x00000668 vaddr 0x00000668 paddr 0x00000668 align 2**2 - filesz 0x0000004c memsz 0x0000004c flags r-- +EH_FRAME off 0x000005f8 vaddr 0x000005f8 paddr 0x000005f8 align 2**2 + filesz 0x00000054 memsz 0x00000054 flags r-- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4 filesz 0x00000000 memsz 0x00000000 flags rw- + RELRO off 0x00000f18 vaddr 0x00001f18 paddr 0x00001f18 align 2**0 + filesz 0x000000e8 memsz 0x000000e8 flags r-- Dynamic Section: NEEDED libc.so.6 SONAME libbasictags.so.1 - INIT 0x00000458 - FINI 0x00000654 - INIT_ARRAY 0x00001780 + INIT 0x00000438 + FINI 0x000005e4 + INIT_ARRAY 0x00001f18 INIT_ARRAYSZ 0x00000004 - FINI_ARRAY 0x00001784 + FINI_ARRAY 0x00001f1c FINI_ARRAYSZ 0x00000004 - GNU_HASH 0x00000118 - STRTAB 0x00000294 - SYMTAB 0x00000174 - STRSZ 0x0000012e + GNU_HASH 0x00000138 + STRTAB 0x000002a4 + SYMTAB 0x00000194 + STRSZ 0x0000011a SYMENT 0x00000010 - PLTGOT 0x00001888 - PLTRELSZ 0x00000010 - PLTREL 0x00000011 - JMPREL 0x00000448 - REL 0x00000408 - RELSZ 0x00000040 + PLTGOT 0x00002000 + REL 0x00000400 + RELSZ 0x00000038 RELENT 0x00000008 - VERNEED 0x000003e8 + VERNEED 0x000003e0 VERNEEDNUM 0x00000001 - VERSYM 0x000003c2 + VERSYM 0x000003be RELCOUNT 0x00000003 Version References: @@ -52,33 +51,29 @@ DYNAMIC SYMBOL TABLE: 00000000 w D *UND* 00000000 _ITM_deregisterTMCloneTable 00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize 00000000 w D *UND* 00000000 __gmon_start__ -00000000 w D *UND* 00000000 _Jv_RegisterClasses 00000000 w D *UND* 00000000 _ITM_registerTMCloneTable -000018a0 g D .data 00000000 Base _edata -000018a4 g D .bss 00000000 Base _end -00000640 g DF .text 00000002 Base symbol42_mips_and_optional -000018a0 g D .bss 00000000 Base __bss_start -00000458 g DF .init 00000000 Base _init -00000630 g DF .text 00000002 Base symbol31_randomtag -00000610 g DF .text 00000002 Base symbol24_32 -00000654 g DF .fini 00000000 Base _fini -00000650 g DF .text 00000002 Base symbol51_untagged -000005f0 g DF .text 00000002 Base symbol11_optional -00000600 g DF .text 00000002 Base symbol23_mips -00000620 g DF .text 00000002 Base symbol27_big +00002010 g D .data 00000000 Base _edata +00002014 g D .bss 00000000 Base _end +000005d0 g DF .text 00000002 Base symbol42_mips_and_optional +00002010 g D .bss 00000000 Base __bss_start +00000438 g DF .init 00000000 Base _init +000005c0 g DF .text 00000002 Base symbol31_randomtag +000005a0 g DF .text 00000002 Base symbol24_32 +000005e4 g DF .fini 00000000 Base _fini +000005e0 g DF .text 00000002 Base symbol51_untagged +00000580 g DF .text 00000002 Base symbol11_optional +00000590 g DF .text 00000002 Base symbol23_mips +000005b0 g DF .text 00000002 Base symbol27_big DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE -00001780 R_386_RELATIVE *ABS* -00001784 R_386_RELATIVE *ABS* -0000189c R_386_RELATIVE *ABS* -00001874 R_386_GLOB_DAT _ITM_deregisterTMCloneTable -00001878 R_386_GLOB_DAT __cxa_finalize -0000187c R_386_GLOB_DAT __gmon_start__ -00001880 R_386_GLOB_DAT _Jv_RegisterClasses -00001884 R_386_GLOB_DAT _ITM_registerTMCloneTable -00001894 R_386_JUMP_SLOT __cxa_finalize -00001898 R_386_JUMP_SLOT __gmon_start__ +00001f18 R_386_RELATIVE *ABS* +00001f1c R_386_RELATIVE *ABS* +0000200c R_386_RELATIVE *ABS* +00001ff0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable +00001ff4 R_386_GLOB_DAT __cxa_finalize@GLIBC_2.1.3 +00001ff8 R_386_GLOB_DAT __gmon_start__ +00001ffc R_386_GLOB_DAT _ITM_registerTMCloneTable diff --git a/scripts/t/Dpkg_Shlibs/objdump.ls b/scripts/t/Dpkg_Shlibs/objdump.ls index f679242c3..30ae8beb0 100644 --- a/scripts/t/Dpkg_Shlibs/objdump.ls +++ b/scripts/t/Dpkg_Shlibs/objdump.ls @@ -1,277 +1,536 @@ /bin/ls: file format elf32-i386 -architecture: i386, flags 0x00000112: -EXEC_P, HAS_SYMS, D_PAGED -start address 0x08049b50 +architecture: i386, flags 0x00000150: +HAS_SYMS, DYNAMIC, D_PAGED +start address 0x00003e16 Program Header: - PHDR off 0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2 - filesz 0x00000100 memsz 0x00000100 flags r-x - INTERP off 0x00000134 vaddr 0x08048134 paddr 0x08048134 align 2**0 + PHDR off 0x00000034 vaddr 0x00000034 paddr 0x00000034 align 2**2 + filesz 0x00000120 memsz 0x00000120 flags r-x + INTERP off 0x00000154 vaddr 0x00000154 paddr 0x00000154 align 2**0 filesz 0x00000013 memsz 0x00000013 flags r-- - LOAD off 0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12 - filesz 0x00012478 memsz 0x00012478 flags r-x - LOAD off 0x00012478 vaddr 0x0805b478 paddr 0x0805b478 align 2**12 - filesz 0x000003b4 memsz 0x00000818 flags rw- - DYNAMIC off 0x0001248c vaddr 0x0805b48c paddr 0x0805b48c align 2**2 - filesz 0x000000e8 memsz 0x000000e8 flags rw- - NOTE off 0x00000148 vaddr 0x08048148 paddr 0x08048148 align 2**2 - filesz 0x00000020 memsz 0x00000020 flags r-- -EH_FRAME off 0x000123b0 vaddr 0x0805a3b0 paddr 0x0805a3b0 align 2**2 - filesz 0x0000002c memsz 0x0000002c flags r-- - STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2 + LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 + filesz 0x00021f10 memsz 0x00021f10 flags r-x + LOAD off 0x000229b8 vaddr 0x000239b8 paddr 0x000239b8 align 2**12 + filesz 0x0000098c memsz 0x00001b1c flags rw- + DYNAMIC off 0x00022eac vaddr 0x00023eac paddr 0x00023eac align 2**2 + filesz 0x000000f8 memsz 0x000000f8 flags rw- + NOTE off 0x00000168 vaddr 0x00000168 paddr 0x00000168 align 2**2 + filesz 0x00000044 memsz 0x00000044 flags r-- +EH_FRAME off 0x0001b5b8 vaddr 0x0001b5b8 paddr 0x0001b5b8 align 2**2 + filesz 0x000008cc memsz 0x000008cc flags r-- + STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4 filesz 0x00000000 memsz 0x00000000 flags rw- + RELRO off 0x000229b8 vaddr 0x000239b8 paddr 0x000239b8 align 2**0 + filesz 0x00000648 memsz 0x00000648 flags r-- Dynamic Section: - NEEDED librt.so.1 - NEEDED libacl.so.1 - NEEDED libselinux.so.1 - NEEDED libc.so.6 - INIT 0x8049510 - FINI 0x8056768 - HASH 0x8048168 - GNU_HASH 0x80484a4 - STRTAB 0x8048bc0 - SYMTAB 0x8048500 - STRSZ 0x4a0 - SYMENT 0x10 - DEBUG 0x0 - PLTGOT 0x805b57c - PLTRELSZ 0x300 - PLTREL 0x11 - JMPREL 0x8049210 - REL 0x80491e8 - RELSZ 0x28 - RELENT 0x8 - VERNEED 0x8049138 - VERNEEDNUM 0x3 - VERSYM 0x8049060 + NEEDED libselinux.so.1 + NEEDED libc.so.6 + INIT 0x00001ce8 + FINI 0x00016524 + INIT_ARRAY 0x000239b8 + INIT_ARRAYSZ 0x00000004 + FINI_ARRAY 0x000239bc + FINI_ARRAYSZ 0x00000004 + GNU_HASH 0x000001ac + STRTAB 0x00000adc + SYMTAB 0x0000020c + STRSZ 0x00000638 + SYMENT 0x00000010 + DEBUG 0x00000000 + PLTGOT 0x00024000 + PLTRELSZ 0x00000388 + PLTREL 0x00000011 + JMPREL 0x00001960 + REL 0x000012d0 + RELSZ 0x00000690 + RELENT 0x00000008 + FLAGS_1 0x08000000 + VERNEED 0x00001230 + VERNEEDNUM 0x00000001 + VERSYM 0x00001114 + RELCOUNT 0x000000c6 Version References: - required from librt.so.1: - 0x0d696912 0x00 08 GLIBC_2.2 - required from libacl.so.1: - 0x05822450 0x00 06 ACL_1.0 required from libc.so.6: - 0x09691a73 0x00 09 GLIBC_2.2.3 - 0x0d696913 0x00 07 GLIBC_2.3 + 0x0d696912 0x00 10 GLIBC_2.2 + 0x09691f73 0x00 09 GLIBC_2.1.3 + 0x09691a73 0x00 08 GLIBC_2.2.3 + 0x0d696914 0x00 07 GLIBC_2.4 + 0x06969197 0x00 06 GLIBC_2.17 0x0d696911 0x00 05 GLIBC_2.1 - 0x09691f73 0x00 04 GLIBC_2.1.3 - 0x0d696912 0x00 03 GLIBC_2.2 - 0x0d696910 0x00 02 GLIBC_2.0 + 0x09691974 0x00 04 GLIBC_2.3.4 + 0x0d696910 0x00 03 GLIBC_2.0 + 0x0d696913 0x00 02 GLIBC_2.3 DYNAMIC SYMBOL TABLE: -00000000 DF *UND* 0000026e GLIBC_2.0 abort -00000000 DF *UND* 0000001d GLIBC_2.0 __errno_location -00000000 DF *UND* 0000004d GLIBC_2.0 sigemptyset -00000000 DF *UND* 00000034 GLIBC_2.0 sprintf -00000000 DF *UND* 000001a2 GLIBC_2.2 localeconv -00000000 DF *UND* 0000000a GLIBC_2.0 dirfd -00000000 DF *UND* 00000057 GLIBC_2.1.3 __cxa_atexit -00000000 DF *UND* 00000037 GLIBC_2.0 strcoll -00000000 DF *UND* 00000150 GLIBC_2.0 qsort -00000000 DF *UND* 00000094 GLIBC_2.1 fputs_unlocked -00000000 DF *UND* 0000001e GLIBC_2.0 __ctype_get_mb_cur_max -00000000 DF *UND* 000000d9 GLIBC_2.0 signal -00000000 DF *UND* 0000006e GLIBC_2.0 sigismember +00000000 DF *UND* 00000000 GLIBC_2.3 __ctype_toupper_loc +00000000 DF *UND* 00000000 GLIBC_2.0 unsetenv +00000000 DF *UND* 00000000 GLIBC_2.0 getpwnam +00000000 DF *UND* 00000000 GLIBC_2.0 raise +00000000 DF *UND* 00000000 GLIBC_2.3.4 __snprintf_chk +00000000 DO *UND* 00000000 GLIBC_2.0 __progname +00000000 DF *UND* 00000000 GLIBC_2.0 strcmp +00000000 DF *UND* 00000000 GLIBC_2.1 open64 +00000000 w D *UND* 00000000 _ITM_deregisterTMCloneTable +00000000 DF *UND* 00000000 GLIBC_2.0 getpwuid +00000000 DF *UND* 00000000 GLIBC_2.0 fflush +00000000 DO *UND* 00000000 GLIBC_2.0 stderr +00000000 DF *UND* 00000000 GLIBC_2.0 _exit +00000000 DF *UND* 00000000 GLIBC_2.0 sigprocmask +00000000 DF *UND* 00000000 GLIBC_2.0 dirfd +00000000 DF *UND* 00000000 GLIBC_2.0 wcwidth +00000000 DF *UND* 00000000 GLIBC_2.0 memmove +00000000 DF *UND* 00000000 GLIBC_2.0 _setjmp +00000000 DF *UND* 00000000 GLIBC_2.0 free +00000000 DF *UND* 00000000 GLIBC_2.0 memcpy +00000000 DF *UND* 00000000 GLIBC_2.0 mbsinit +00000000 DF *UND* 00000000 GLIBC_2.17 clock_gettime +00000000 DF *UND* 00000000 GLIBC_2.0 __strtoull_internal +00000000 DF *UND* 00000000 GLIBC_2.1 fclose +00000000 DF *UND* 00000000 GLIBC_2.1 fseeko64 +00000000 DF *UND* 00000000 GLIBC_2.0 signal +00000000 DF *UND* 00000000 GLIBC_2.0 memcmp +00000000 DF *UND* 00000000 GLIBC_2.0 gettimeofday +00000000 DO *UND* 00000000 GLIBC_2.0 __progname_full +00000000 DO *UND* 00000000 GLIBC_2.0 optind +00000000 DF *UND* 00000000 GLIBC_2.0 dcgettext +00000000 DF *UND* 00000000 GLIBC_2.0 mktime +00000000 DF *UND* 00000000 GLIBC_2.4 __stack_chk_fail +00000000 DF *UND* 00000000 GLIBC_2.0 localtime_r +00000000 DF *UND* 00000000 GLIBC_2.0 sigismember +00000000 DF *UND* 00000000 fgetfilecon +00000000 DF *UND* 00000000 GLIBC_2.0 fflush_unlocked +00000000 DF *UND* 00000000 GLIBC_2.0 iswcntrl +00000000 DF *UND* 00000000 GLIBC_2.0 textdomain +00000000 DF *UND* 00000000 GLIBC_2.0 readlink +00000000 DF *UND* 00000000 GLIBC_2.2.3 fnmatch +00000000 DF *UND* 00000000 GLIBC_2.0 iswprint +00000000 DF *UND* 00000000 GLIBC_2.0 ioctl +00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize +00000000 DF *UND* 00000000 GLIBC_2.0 fwrite +00000000 DF *UND* 00000000 GLIBC_2.2 __fxstat64 +00000000 DF *UND* 00000000 GLIBC_2.0 tzset +00000000 DF *UND* 00000000 GLIBC_2.0 __ctype_get_mb_cur_max +00000000 DF *UND* 00000000 GLIBC_2.0 strcpy +00000000 DF *UND* 00000000 GLIBC_2.2 __fpending +00000000 DF *UND* 00000000 GLIBC_2.0 wcstombs +00000000 DF *UND* 00000000 GLIBC_2.0 mbrtowc +00000000 DF *UND* 00000000 GLIBC_2.0 gethostname +00000000 DF *UND* 00000000 GLIBC_2.1.3 __cxa_atexit +00000000 DF *UND* 00000000 GLIBC_2.0 error +00000000 DF *UND* 00000000 GLIBC_2.0 strcoll +00000000 DF *UND* 00000000 GLIBC_2.0 getenv +00000000 DF *UND* 00000000 GLIBC_2.0 realloc +00000000 DF *UND* 00000000 lgetfilecon +00000000 DF *UND* 00000000 GLIBC_2.0 malloc +00000000 DF *UND* 00000000 GLIBC_2.0 timegm +00000000 DF *UND* 00000000 GLIBC_2.2 __freading +00000000 DF *UND* 00000000 GLIBC_2.3.4 __memcpy_chk 00000000 w D *UND* 00000000 __gmon_start__ -00000000 w D *UND* 00000000 _Jv_RegisterClasses -00000000 DF *UND* 00000490 GLIBC_2.0 realloc -00000000 DF *UND* 0000003f GLIBC_2.2 __xstat64 -00000000 DF *UND* 00000035 GLIBC_2.0 localtime -00000000 DF *UND* 00000132 GLIBC_2.0 getgrnam -00000000 DF *UND* 00000167 GLIBC_2.0 strchr -00000000 DF *UND* 000000dc GLIBC_2.0 getenv -00000000 DF *UND* 00000304 GLIBC_2.0 calloc -00000000 DF *UND* 000000c6 GLIBC_2.0 strncpy -00000000 DF *UND* 00000023 freecon -00000000 DF *UND* 00000058 GLIBC_2.0 memset -00000000 DF *UND* 000001b2 GLIBC_2.0 __libc_start_main -00000000 DF *UND* 00000044 GLIBC_2.1 mempcpy -00000000 DF *UND* 000000c9 GLIBC_2.0 _obstack_begin -00000000 DF *UND* 000001b9 GLIBC_2.0 strrchr -00000000 DF *UND* 00000038 GLIBC_2.0 chmod -00000000 DF *UND* 00000150 GLIBC_2.0 __assert_fail -00000000 DF *UND* 00000015 GLIBC_2.0 bindtextdomain -00000000 DF *UND* 00000215 GLIBC_2.0 mbrtowc -00000000 DF *UND* 00000046 ACL_1.0 acl_delete_def_file -00000000 DF *UND* 00000038 GLIBC_2.0 gettimeofday -00000000 DF *UND* 0000003c GLIBC_2.3 __ctype_toupper_loc -00000000 DF *UND* 0000003f GLIBC_2.2 __lxstat64 -00000000 DF *UND* 00000195 GLIBC_2.0 _obstack_newchunk -00000000 DF *UND* 00000066 GLIBC_2.0 __overflow -00000000 DF *UND* 00000049 GLIBC_2.0 dcgettext -00000000 DF *UND* 00000160 GLIBC_2.0 sigaction -00000000 DF *UND* 00000127 GLIBC_2.1 strverscmp -00000000 DF *UND* 00000092 GLIBC_2.0 opendir -00000000 DF *UND* 00000047 GLIBC_2.0 getopt_long -00000000 DF *UND* 0000003a GLIBC_2.0 ioctl -00000000 DF *UND* 0000003c GLIBC_2.3 __ctype_b_loc -00000000 DF *UND* 000000c9 GLIBC_2.0 iswcntrl -00000000 DF *UND* 00000032 GLIBC_2.0 isatty -00000000 DF *UND* 000001e8 GLIBC_2.1 fclose -00000000 DF *UND* 00000019 GLIBC_2.0 mbsinit -00000000 DF *UND* 00000036 GLIBC_2.0 _setjmp -00000000 DF *UND* 00000038 GLIBC_2.0 tcgetpgrp -00000000 DF *UND* 0000003c GLIBC_2.0 mktime -00000000 DF *UND* 000000af GLIBC_2.2 readdir64 -00000000 DF *UND* 00000046 GLIBC_2.0 memcpy -00000000 DF *UND* 000000af GLIBC_2.0 strlen -00000000 DF *UND* 00000132 GLIBC_2.0 getpwuid -00000000 DF *UND* 00000094 ACL_1.0 acl_extended_file -00000000 DF *UND* 00000195 ACL_1.0 acl_get_file -00000000 DF *UND* 000006b5 GLIBC_2.0 setlocale -00000000 DF *UND* 0000002a ACL_1.0 acl_entries -00000000 DF *UND* 00000024 GLIBC_2.0 strcpy -00000000 DF *UND* 00000039 GLIBC_2.0 printf -00000000 DF *UND* 0000008c GLIBC_2.0 raise -00000000 DF *UND* 000000a2 GLIBC_2.1 fwrite_unlocked -00000000 DF *UND* 00000115 GLIBC_2.2 clock_gettime -00000000 DF *UND* 00000075 getfilecon -00000000 DF *UND* 00000055 GLIBC_2.0 closedir -00000000 DF *UND* 00000024 GLIBC_2.0 fprintf -00000000 DF *UND* 00000114 ACL_1.0 acl_set_file -00000000 DF *UND* 0000009e GLIBC_2.0 sigprocmask -00000000 DF *UND* 0000002a GLIBC_2.2 __fpending -00000000 DF *UND* 00000075 lgetfilecon -00000000 DF *UND* 000000d7 GLIBC_2.0 error -00000000 DF *UND* 00000132 GLIBC_2.0 getgrgid -00000000 DF *UND* 00000045 GLIBC_2.0 __strtoull_internal -00000000 DF *UND* 0000006a GLIBC_2.0 sigaddset -00000000 DF *UND* 0000003a GLIBC_2.0 readlink -00000000 DF *UND* 0000008e GLIBC_2.0 memmove -00000000 DF *UND* 0000003c GLIBC_2.3 __ctype_tolower_loc -00000000 DF *UND* 00000045 GLIBC_2.0 __strtoul_internal -00000000 DF *UND* 0000011d GLIBC_2.0 textdomain -00000000 DF *UND* 0000003f GLIBC_2.2 __fxstat64 -00000000 DF *UND* 000002d9 GLIBC_2.2.3 fnmatch -00000000 DF *UND* 000000f3 GLIBC_2.0 strncmp -00000000 DF *UND* 00004373 GLIBC_2.0 vfprintf -00000000 DF *UND* 0000006e ACL_1.0 acl_free -00000000 DF *UND* 00000042 GLIBC_2.0 fflush_unlocked -00000000 DF *UND* 00000045 GLIBC_2.0 strftime -00000000 DF *UND* 00000078 GLIBC_2.0 wcwidth -00000000 DF *UND* 000000cb GLIBC_2.0 iswprint -00000000 DF *UND* 00000132 GLIBC_2.0 getpwnam -00000000 DF *UND* 00000054 GLIBC_2.0 strcmp -00000000 DF *UND* 000000fa GLIBC_2.0 exit -00000000 DF *UND* 000004bc ACL_1.0 acl_from_text -0805bc90 g D *ABS* 00000000 Base _end -0805b860 g DO .bss 00000004 GLIBC_2.0 stdout -0805b82c g D *ABS* 00000000 Base _edata -080567a4 g DO .rodata 00000004 Base _IO_stdin_used -08049780 DF *UND* 000001e5 GLIBC_2.0 free -0805b844 g DO .bss 00000004 GLIBC_2.0 stderr -0805b82c g D *ABS* 00000000 Base __bss_start -080499a0 DF *UND* 00000178 GLIBC_2.0 malloc -08049510 g DF .init 00000000 Base _init -08056768 g DF .fini 00000000 Base _fini -0805b840 g DO .bss 00000004 GLIBC_2.0 optind -0805b864 g DO .bss 00000004 GLIBC_2.0 optarg +00000000 DF *UND* 00000000 GLIBC_2.0 exit +00000000 DF *UND* 00000000 GLIBC_2.1 fdopen +00000000 DF *UND* 00000000 GLIBC_2.1 fputs_unlocked +00000000 DF *UND* 00000000 GLIBC_2.0 strftime +00000000 DF *UND* 00000000 GLIBC_2.0 getopt_long +00000000 DF *UND* 00000000 getfilecon +00000000 DF *UND* 00000000 GLIBC_2.0 strtoul +00000000 DF *UND* 00000000 GLIBC_2.0 strchr +00000000 DF *UND* 00000000 GLIBC_2.0 getcwd +00000000 DF *UND* 00000000 GLIBC_2.0 fscanf +00000000 DF *UND* 00000000 GLIBC_2.0 strlen +00000000 DF *UND* 00000000 GLIBC_2.0 setenv +00000000 DF *UND* 00000000 GLIBC_2.0 __libc_start_main +00000000 DF *UND* 00000000 GLIBC_2.0 sigaddset +00000000 DF *UND* 00000000 GLIBC_2.0 memset +00000000 DF *UND* 00000000 GLIBC_2.0 ungetc +00000000 DF *UND* 00000000 GLIBC_2.0 snprintf +00000000 DF *UND* 00000000 GLIBC_2.0 __errno_location +00000000 DF *UND* 00000000 GLIBC_2.0 tcgetpgrp +00000000 DF *UND* 00000000 GLIBC_2.0 fileno +00000000 DF *UND* 00000000 GLIBC_2.0 stpncpy +00000000 DO *UND* 00000000 GLIBC_2.0 stdout +00000000 DF *UND* 00000000 GLIBC_2.1 fwrite_unlocked +00000000 DF *UND* 00000000 GLIBC_2.3.4 __printf_chk +00000000 DF *UND* 00000000 GLIBC_2.1 mempcpy +00000000 DF *UND* 00000000 GLIBC_2.0 wcswidth +00000000 DF *UND* 00000000 GLIBC_2.0 sigemptyset +00000000 DF *UND* 00000000 GLIBC_2.0 __uflow +00000000 DO *UND* 00000000 GLIBC_2.0 program_invocation_name +00000000 DF *UND* 00000000 GLIBC_2.1 __rawmemchr +00000000 DF *UND* 00000000 GLIBC_2.0 nl_langinfo +00000000 DF *UND* 00000000 GLIBC_2.0 setlocale +00000000 DF *UND* 00000000 GLIBC_2.0 strrchr +00000000 DF *UND* 00000000 GLIBC_2.0 __overflow +00000000 DF *UND* 00000000 GLIBC_2.0 mbstowcs +00000000 DF *UND* 00000000 GLIBC_2.0 gmtime_r +00000000 DF *UND* 00000000 GLIBC_2.2 localeconv +00000000 DF *UND* 00000000 GLIBC_2.3 getxattr +00000000 DF *UND* 00000000 freecon +00000000 DF *UND* 00000000 GLIBC_2.1 lseek64 +00000000 DF *UND* 00000000 GLIBC_2.2 readdir64 +00000000 DO *UND* 00000000 GLIBC_2.0 program_invocation_short_name +00000000 DF *UND* 00000000 GLIBC_2.3.4 __fprintf_chk +00000000 DF *UND* 00000000 GLIBC_2.0 sigaction +00000000 DF *UND* 00000000 GLIBC_2.0 bindtextdomain +00000000 w D *UND* 00000000 _ITM_registerTMCloneTable +00000000 DF *UND* 00000000 GLIBC_2.0 strncmp +00000000 DF *UND* 00000000 GLIBC_2.0 isatty +00000000 DF *UND* 00000000 GLIBC_2.0 abort +00000000 DF *UND* 00000000 GLIBC_2.2 __xstat64 +00000000 DO *UND* 00000000 GLIBC_2.0 optarg +00000000 DF *UND* 00000000 GLIBC_2.2 __lxstat64 +00000000 DF *UND* 00000000 GLIBC_2.0 getgrnam +00000000 DF *UND* 00000000 GLIBC_2.0 close +00000000 DF *UND* 00000000 GLIBC_2.0 closedir +00000000 DF *UND* 00000000 GLIBC_2.0 strspn +00000000 DF *UND* 00000000 GLIBC_2.0 opendir +00000000 DF *UND* 00000000 GLIBC_2.0 getgrgid +00000000 DF *UND* 00000000 GLIBC_2.3 __ctype_tolower_loc +00000000 DF *UND* 00000000 GLIBC_2.0 __assert_fail +00000000 DF *UND* 00000000 GLIBC_2.3 __ctype_b_loc +00000000 DF *UND* 00000000 GLIBC_2.0 calloc +00000000 DF *UND* 00000000 GLIBC_2.3.4 __sprintf_chk +00024340 g DO .data 00000004 Base obstack_alloc_failed_handler +00014ed0 g DF .text 000000fb Base _obstack_newchunk +00024344 g D .data 00000000 Base _edata +00014ea0 g DF .text 0000002a Base _obstack_begin_1 +00014fd0 g DF .text 00000030 Base _obstack_allocated_p +000254d4 g D .bss 00000000 Base _end +00014e70 g DF .text 00000023 Base _obstack_begin +00016544 g DO .rodata 00000004 Base _IO_stdin_used +00015080 g DF .text 00000022 Base _obstack_memory_used +00024344 g D .bss 00000000 Base __bss_start +00001ce8 g DF .init 00000000 Base _init +00016524 g DF .fini 00000000 Base _fini +00015000 g DF .text 00000071 Base _obstack_free DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE -0805b5d4 R_386_GLOB_DAT __gmon_start__ -0805b8a0 R_386_COPY optind -0805b8a4 R_386_COPY stderr -0805b8c0 R_386_COPY stdout -0805b8c4 R_386_COPY optarg -0805b5e8 R_386_JUMP_SLOT abort -0805b5ec R_386_JUMP_SLOT __errno_location -0805b5f0 R_386_JUMP_SLOT sigemptyset -0805b5f4 R_386_JUMP_SLOT sprintf -0805b5f8 R_386_JUMP_SLOT localeconv -0805b5fc R_386_JUMP_SLOT dirfd -0805b600 R_386_JUMP_SLOT __cxa_atexit -0805b604 R_386_JUMP_SLOT strcoll -0805b608 R_386_JUMP_SLOT qsort -0805b60c R_386_JUMP_SLOT fputs_unlocked -0805b610 R_386_JUMP_SLOT __ctype_get_mb_cur_max -0805b614 R_386_JUMP_SLOT signal -0805b618 R_386_JUMP_SLOT sigismember -0805b61c R_386_JUMP_SLOT __gmon_start__ -0805b620 R_386_JUMP_SLOT realloc -0805b624 R_386_JUMP_SLOT __xstat64 -0805b628 R_386_JUMP_SLOT localtime -0805b62c R_386_JUMP_SLOT getgrnam -0805b630 R_386_JUMP_SLOT strchr -0805b634 R_386_JUMP_SLOT getenv -0805b638 R_386_JUMP_SLOT calloc -0805b63c R_386_JUMP_SLOT strncpy -0805b640 R_386_JUMP_SLOT freecon -0805b644 R_386_JUMP_SLOT memset -0805b648 R_386_JUMP_SLOT __libc_start_main -0805b64c R_386_JUMP_SLOT mempcpy -0805b650 R_386_JUMP_SLOT _obstack_begin -0805b654 R_386_JUMP_SLOT strrchr -0805b658 R_386_JUMP_SLOT chmod -0805b65c R_386_JUMP_SLOT __assert_fail -0805b660 R_386_JUMP_SLOT bindtextdomain -0805b664 R_386_JUMP_SLOT mbrtowc -0805b668 R_386_JUMP_SLOT acl_delete_def_file -0805b66c R_386_JUMP_SLOT gettimeofday -0805b670 R_386_JUMP_SLOT __ctype_toupper_loc -0805b674 R_386_JUMP_SLOT free -0805b678 R_386_JUMP_SLOT __lxstat64 -0805b67c R_386_JUMP_SLOT _obstack_newchunk -0805b680 R_386_JUMP_SLOT __overflow -0805b684 R_386_JUMP_SLOT dcgettext -0805b688 R_386_JUMP_SLOT sigaction -0805b68c R_386_JUMP_SLOT strverscmp -0805b690 R_386_JUMP_SLOT opendir -0805b694 R_386_JUMP_SLOT getopt_long -0805b698 R_386_JUMP_SLOT ioctl -0805b69c R_386_JUMP_SLOT __ctype_b_loc -0805b6a0 R_386_JUMP_SLOT iswcntrl -0805b6a4 R_386_JUMP_SLOT isatty -0805b6a8 R_386_JUMP_SLOT fclose -0805b6ac R_386_JUMP_SLOT mbsinit -0805b6b0 R_386_JUMP_SLOT _setjmp -0805b6b4 R_386_JUMP_SLOT tcgetpgrp -0805b6b8 R_386_JUMP_SLOT mktime -0805b6bc R_386_JUMP_SLOT readdir64 -0805b6c0 R_386_JUMP_SLOT memcpy -0805b6c4 R_386_JUMP_SLOT strtoul -0805b6c8 R_386_JUMP_SLOT strlen -0805b6cc R_386_JUMP_SLOT getpwuid -0805b6d0 R_386_JUMP_SLOT acl_extended_file -0805b6d4 R_386_JUMP_SLOT acl_get_file -0805b6d8 R_386_JUMP_SLOT setlocale -0805b6dc R_386_JUMP_SLOT acl_entries -0805b6e0 R_386_JUMP_SLOT strcpy -0805b6e4 R_386_JUMP_SLOT printf -0805b6e8 R_386_JUMP_SLOT raise -0805b6ec R_386_JUMP_SLOT fwrite_unlocked -0805b6f0 R_386_JUMP_SLOT clock_gettime -0805b6f4 R_386_JUMP_SLOT getfilecon -0805b6f8 R_386_JUMP_SLOT closedir -0805b6fc R_386_JUMP_SLOT fprintf -0805b700 R_386_JUMP_SLOT malloc -0805b704 R_386_JUMP_SLOT acl_set_file -0805b708 R_386_JUMP_SLOT sigprocmask -0805b70c R_386_JUMP_SLOT __fpending -0805b710 R_386_JUMP_SLOT lgetfilecon -0805b714 R_386_JUMP_SLOT error -0805b718 R_386_JUMP_SLOT getgrgid -0805b71c R_386_JUMP_SLOT __strtoull_internal -0805b720 R_386_JUMP_SLOT sigaddset -0805b724 R_386_JUMP_SLOT readlink -0805b728 R_386_JUMP_SLOT memmove -0805b72c R_386_JUMP_SLOT __ctype_tolower_loc -0805b730 R_386_JUMP_SLOT textdomain -0805b734 R_386_JUMP_SLOT __fxstat64 -0805b738 R_386_JUMP_SLOT fnmatch -0805b73c R_386_JUMP_SLOT strncmp -0805b740 R_386_JUMP_SLOT vfprintf -0805b744 R_386_JUMP_SLOT acl_free -0805b748 R_386_JUMP_SLOT fflush_unlocked -0805b74c R_386_JUMP_SLOT strftime -0805b750 R_386_JUMP_SLOT wcwidth -0805b754 R_386_JUMP_SLOT iswprint -0805b758 R_386_JUMP_SLOT getpwnam -0805b75c R_386_JUMP_SLOT strcmp -0805b760 R_386_JUMP_SLOT exit -0805b764 R_386_JUMP_SLOT acl_from_text +000239b8 R_386_RELATIVE *ABS* +000239bc R_386_RELATIVE *ABS* +000239c0 R_386_RELATIVE *ABS* +000239c4 R_386_RELATIVE *ABS* +000239c8 R_386_RELATIVE *ABS* +000239cc R_386_RELATIVE *ABS* +000239d0 R_386_RELATIVE *ABS* +000239d4 R_386_RELATIVE *ABS* +000239d8 R_386_RELATIVE *ABS* +000239dc R_386_RELATIVE *ABS* +000239e0 R_386_RELATIVE *ABS* +000239e4 R_386_RELATIVE *ABS* +000239e8 R_386_RELATIVE *ABS* +000239ec R_386_RELATIVE *ABS* +000239f0 R_386_RELATIVE *ABS* +000239f4 R_386_RELATIVE *ABS* +000239f8 R_386_RELATIVE *ABS* +000239fc R_386_RELATIVE *ABS* +00023a00 R_386_RELATIVE *ABS* +00023a04 R_386_RELATIVE *ABS* +00023a08 R_386_RELATIVE *ABS* +00023a0c R_386_RELATIVE *ABS* +00023a10 R_386_RELATIVE *ABS* +00023a14 R_386_RELATIVE *ABS* +00023a18 R_386_RELATIVE *ABS* +00023a1c R_386_RELATIVE *ABS* +00023a20 R_386_RELATIVE *ABS* +00023a24 R_386_RELATIVE *ABS* +00023a28 R_386_RELATIVE *ABS* +00023a2c R_386_RELATIVE *ABS* +00023a40 R_386_RELATIVE *ABS* +00023a44 R_386_RELATIVE *ABS* +00023a48 R_386_RELATIVE *ABS* +00023a4c R_386_RELATIVE *ABS* +00023a50 R_386_RELATIVE *ABS* +00023a54 R_386_RELATIVE *ABS* +00023a58 R_386_RELATIVE *ABS* +00023a5c R_386_RELATIVE *ABS* +00023a60 R_386_RELATIVE *ABS* +00023a64 R_386_RELATIVE *ABS* +00023a68 R_386_RELATIVE *ABS* +00023a6c R_386_RELATIVE *ABS* +00023a70 R_386_RELATIVE *ABS* +00023a74 R_386_RELATIVE *ABS* +00023a78 R_386_RELATIVE *ABS* +00023a7c R_386_RELATIVE *ABS* +00023a80 R_386_RELATIVE *ABS* +00023a84 R_386_RELATIVE *ABS* +00023a88 R_386_RELATIVE *ABS* +00023a8c R_386_RELATIVE *ABS* +00023a90 R_386_RELATIVE *ABS* +00023a94 R_386_RELATIVE *ABS* +00023a98 R_386_RELATIVE *ABS* +00023a9c R_386_RELATIVE *ABS* +00023aa0 R_386_RELATIVE *ABS* +00023aa4 R_386_RELATIVE *ABS* +00023aa8 R_386_RELATIVE *ABS* +00023aac R_386_RELATIVE *ABS* +00023ab0 R_386_RELATIVE *ABS* +00023ab4 R_386_RELATIVE *ABS* +00023ab8 R_386_RELATIVE *ABS* +00023abc R_386_RELATIVE *ABS* +00023ac0 R_386_RELATIVE *ABS* +00023ac8 R_386_RELATIVE *ABS* +00023acc R_386_RELATIVE *ABS* +00023ad0 R_386_RELATIVE *ABS* +00023ad4 R_386_RELATIVE *ABS* +00023ad8 R_386_RELATIVE *ABS* +00023ae0 R_386_RELATIVE *ABS* +00023ae4 R_386_RELATIVE *ABS* +00023ae8 R_386_RELATIVE *ABS* +00023aec R_386_RELATIVE *ABS* +00023af0 R_386_RELATIVE *ABS* +00023b00 R_386_RELATIVE *ABS* +00023b04 R_386_RELATIVE *ABS* +00023b08 R_386_RELATIVE *ABS* +00023b0c R_386_RELATIVE *ABS* +00023b10 R_386_RELATIVE *ABS* +00023b14 R_386_RELATIVE *ABS* +00023b18 R_386_RELATIVE *ABS* +00023b20 R_386_RELATIVE *ABS* +00023b30 R_386_RELATIVE *ABS* +00023b40 R_386_RELATIVE *ABS* +00023b50 R_386_RELATIVE *ABS* +00023b60 R_386_RELATIVE *ABS* +00023b70 R_386_RELATIVE *ABS* +00023b80 R_386_RELATIVE *ABS* +00023b90 R_386_RELATIVE *ABS* +00023ba0 R_386_RELATIVE *ABS* +00023bb0 R_386_RELATIVE *ABS* +00023bc0 R_386_RELATIVE *ABS* +00023bd0 R_386_RELATIVE *ABS* +00023be0 R_386_RELATIVE *ABS* +00023bf0 R_386_RELATIVE *ABS* +00023c00 R_386_RELATIVE *ABS* +00023c10 R_386_RELATIVE *ABS* +00023c20 R_386_RELATIVE *ABS* +00023c30 R_386_RELATIVE *ABS* +00023c40 R_386_RELATIVE *ABS* +00023c50 R_386_RELATIVE *ABS* +00023c60 R_386_RELATIVE *ABS* +00023c70 R_386_RELATIVE *ABS* +00023c80 R_386_RELATIVE *ABS* +00023c90 R_386_RELATIVE *ABS* +00023ca0 R_386_RELATIVE *ABS* +00023cb0 R_386_RELATIVE *ABS* +00023cc0 R_386_RELATIVE *ABS* +00023cd0 R_386_RELATIVE *ABS* +00023ce0 R_386_RELATIVE *ABS* +00023cf0 R_386_RELATIVE *ABS* +00023d00 R_386_RELATIVE *ABS* +00023d10 R_386_RELATIVE *ABS* +00023d20 R_386_RELATIVE *ABS* +00023d30 R_386_RELATIVE *ABS* +00023d40 R_386_RELATIVE *ABS* +00023d50 R_386_RELATIVE *ABS* +00023d60 R_386_RELATIVE *ABS* +00023d70 R_386_RELATIVE *ABS* +00023d80 R_386_RELATIVE *ABS* +00023d90 R_386_RELATIVE *ABS* +00023da0 R_386_RELATIVE *ABS* +00023db0 R_386_RELATIVE *ABS* +00023dc0 R_386_RELATIVE *ABS* +00023de0 R_386_RELATIVE *ABS* +00023de4 R_386_RELATIVE *ABS* +00023de8 R_386_RELATIVE *ABS* +00023dec R_386_RELATIVE *ABS* +00023df0 R_386_RELATIVE *ABS* +00023df4 R_386_RELATIVE *ABS* +00023df8 R_386_RELATIVE *ABS* +00023dfc R_386_RELATIVE *ABS* +00023e00 R_386_RELATIVE *ABS* +00023e04 R_386_RELATIVE *ABS* +00023e08 R_386_RELATIVE *ABS* +00023e0c R_386_RELATIVE *ABS* +00023e10 R_386_RELATIVE *ABS* +00023e14 R_386_RELATIVE *ABS* +00023e18 R_386_RELATIVE *ABS* +00023e1c R_386_RELATIVE *ABS* +00023e20 R_386_RELATIVE *ABS* +00023e24 R_386_RELATIVE *ABS* +00023e28 R_386_RELATIVE *ABS* +00023e2c R_386_RELATIVE *ABS* +00023e30 R_386_RELATIVE *ABS* +00023e34 R_386_RELATIVE *ABS* +00023e38 R_386_RELATIVE *ABS* +00023e3c R_386_RELATIVE *ABS* +00023e44 R_386_RELATIVE *ABS* +00023e48 R_386_RELATIVE *ABS* +00023e4c R_386_RELATIVE *ABS* +00023e50 R_386_RELATIVE *ABS* +00023e58 R_386_RELATIVE *ABS* +00023e5c R_386_RELATIVE *ABS* +00023e60 R_386_RELATIVE *ABS* +00023e64 R_386_RELATIVE *ABS* +00023e6c R_386_RELATIVE *ABS* +00023e70 R_386_RELATIVE *ABS* +00023e80 R_386_RELATIVE *ABS* +00023e84 R_386_RELATIVE *ABS* +00023e88 R_386_RELATIVE *ABS* +00023e8c R_386_RELATIVE *ABS* +00023e90 R_386_RELATIVE *ABS* +00023e94 R_386_RELATIVE *ABS* +00023e98 R_386_RELATIVE *ABS* +00023e9c R_386_RELATIVE *ABS* +00023ea0 R_386_RELATIVE *ABS* +00023ea4 R_386_RELATIVE *ABS* +00023fb8 R_386_RELATIVE *ABS* +00023fc0 R_386_RELATIVE *ABS* +00023fc8 R_386_RELATIVE *ABS* +00023fd0 R_386_RELATIVE *ABS* +00023fd8 R_386_RELATIVE *ABS* +000241e4 R_386_RELATIVE *ABS* +00024200 R_386_RELATIVE *ABS* +00024204 R_386_RELATIVE *ABS* +00024224 R_386_RELATIVE *ABS* +0002422c R_386_RELATIVE *ABS* +0002423c R_386_RELATIVE *ABS* +00024254 R_386_RELATIVE *ABS* +0002425c R_386_RELATIVE *ABS* +00024264 R_386_RELATIVE *ABS* +0002426c R_386_RELATIVE *ABS* +00024274 R_386_RELATIVE *ABS* +0002427c R_386_RELATIVE *ABS* +00024294 R_386_RELATIVE *ABS* +0002429c R_386_RELATIVE *ABS* +000242a4 R_386_RELATIVE *ABS* +000242ac R_386_RELATIVE *ABS* +000242b4 R_386_RELATIVE *ABS* +000242bc R_386_RELATIVE *ABS* +000242c4 R_386_RELATIVE *ABS* +000242cc R_386_RELATIVE *ABS* +000242dc R_386_RELATIVE *ABS* +000242e4 R_386_RELATIVE *ABS* +000242e8 R_386_RELATIVE *ABS* +00024334 R_386_RELATIVE *ABS* +0002433c R_386_RELATIVE *ABS* +00024340 R_386_RELATIVE *ABS* +00023fa4 R_386_GLOB_DAT _ITM_deregisterTMCloneTable +00023fa8 R_386_GLOB_DAT stderr@GLIBC_2.0 +00023fac R_386_GLOB_DAT free@GLIBC_2.0 +00023fb0 R_386_GLOB_DAT optind@GLIBC_2.0 +00023fb4 R_386_GLOB_DAT __cxa_finalize@GLIBC_2.1.3 +00023fbc R_386_GLOB_DAT malloc@GLIBC_2.0 +00023fc4 R_386_GLOB_DAT __gmon_start__ +00023fcc R_386_GLOB_DAT stdout@GLIBC_2.0 +00023fd4 R_386_GLOB_DAT program_invocation_name@GLIBC_2.0 +00023fdc R_386_GLOB_DAT program_invocation_short_name@GLIBC_2.0 +00023fe0 R_386_GLOB_DAT _ITM_registerTMCloneTable +00023fe4 R_386_GLOB_DAT optarg@GLIBC_2.0 +0002400c R_386_JUMP_SLOT __ctype_toupper_loc@GLIBC_2.3 +00024010 R_386_JUMP_SLOT unsetenv@GLIBC_2.0 +00024014 R_386_JUMP_SLOT getpwnam@GLIBC_2.0 +00024018 R_386_JUMP_SLOT raise@GLIBC_2.0 +0002401c R_386_JUMP_SLOT __snprintf_chk@GLIBC_2.3.4 +00024020 R_386_JUMP_SLOT strcmp@GLIBC_2.0 +00024024 R_386_JUMP_SLOT open64@GLIBC_2.1 +00024028 R_386_JUMP_SLOT getpwuid@GLIBC_2.0 +0002402c R_386_JUMP_SLOT fflush@GLIBC_2.0 +00024030 R_386_JUMP_SLOT _exit@GLIBC_2.0 +00024034 R_386_JUMP_SLOT sigprocmask@GLIBC_2.0 +00024038 R_386_JUMP_SLOT dirfd@GLIBC_2.0 +0002403c R_386_JUMP_SLOT wcwidth@GLIBC_2.0 +00024040 R_386_JUMP_SLOT memmove@GLIBC_2.0 +00024044 R_386_JUMP_SLOT _setjmp@GLIBC_2.0 +00024048 R_386_JUMP_SLOT memcpy@GLIBC_2.0 +0002404c R_386_JUMP_SLOT mbsinit@GLIBC_2.0 +00024050 R_386_JUMP_SLOT clock_gettime@GLIBC_2.17 +00024054 R_386_JUMP_SLOT __strtoull_internal@GLIBC_2.0 +00024058 R_386_JUMP_SLOT fclose@GLIBC_2.1 +0002405c R_386_JUMP_SLOT fseeko64@GLIBC_2.1 +00024060 R_386_JUMP_SLOT signal@GLIBC_2.0 +00024064 R_386_JUMP_SLOT memcmp@GLIBC_2.0 +00024068 R_386_JUMP_SLOT gettimeofday@GLIBC_2.0 +0002406c R_386_JUMP_SLOT dcgettext@GLIBC_2.0 +00024070 R_386_JUMP_SLOT mktime@GLIBC_2.0 +00024074 R_386_JUMP_SLOT __stack_chk_fail@GLIBC_2.4 +00024078 R_386_JUMP_SLOT localtime_r@GLIBC_2.0 +0002407c R_386_JUMP_SLOT sigismember@GLIBC_2.0 +00024080 R_386_JUMP_SLOT fgetfilecon +00024084 R_386_JUMP_SLOT fflush_unlocked@GLIBC_2.0 +00024088 R_386_JUMP_SLOT iswcntrl@GLIBC_2.0 +0002408c R_386_JUMP_SLOT textdomain@GLIBC_2.0 +00024090 R_386_JUMP_SLOT readlink@GLIBC_2.0 +00024094 R_386_JUMP_SLOT fnmatch@GLIBC_2.2.3 +00024098 R_386_JUMP_SLOT iswprint@GLIBC_2.0 +0002409c R_386_JUMP_SLOT ioctl@GLIBC_2.0 +000240a0 R_386_JUMP_SLOT fwrite@GLIBC_2.0 +000240a4 R_386_JUMP_SLOT __fxstat64@GLIBC_2.2 +000240a8 R_386_JUMP_SLOT tzset@GLIBC_2.0 +000240ac R_386_JUMP_SLOT __ctype_get_mb_cur_max@GLIBC_2.0 +000240b0 R_386_JUMP_SLOT strcpy@GLIBC_2.0 +000240b4 R_386_JUMP_SLOT __fpending@GLIBC_2.2 +000240b8 R_386_JUMP_SLOT wcstombs@GLIBC_2.0 +000240bc R_386_JUMP_SLOT mbrtowc@GLIBC_2.0 +000240c0 R_386_JUMP_SLOT gethostname@GLIBC_2.0 +000240c4 R_386_JUMP_SLOT __cxa_atexit@GLIBC_2.1.3 +000240c8 R_386_JUMP_SLOT error@GLIBC_2.0 +000240cc R_386_JUMP_SLOT strcoll@GLIBC_2.0 +000240d0 R_386_JUMP_SLOT getenv@GLIBC_2.0 +000240d4 R_386_JUMP_SLOT realloc@GLIBC_2.0 +000240d8 R_386_JUMP_SLOT lgetfilecon +000240dc R_386_JUMP_SLOT timegm@GLIBC_2.0 +000240e0 R_386_JUMP_SLOT __freading@GLIBC_2.2 +000240e4 R_386_JUMP_SLOT __memcpy_chk@GLIBC_2.3.4 +000240e8 R_386_JUMP_SLOT exit@GLIBC_2.0 +000240ec R_386_JUMP_SLOT fdopen@GLIBC_2.1 +000240f0 R_386_JUMP_SLOT fputs_unlocked@GLIBC_2.1 +000240f4 R_386_JUMP_SLOT strftime@GLIBC_2.0 +000240f8 R_386_JUMP_SLOT getopt_long@GLIBC_2.0 +000240fc R_386_JUMP_SLOT getfilecon +00024100 R_386_JUMP_SLOT strtoul@GLIBC_2.0 +00024104 R_386_JUMP_SLOT strchr@GLIBC_2.0 +00024108 R_386_JUMP_SLOT getcwd@GLIBC_2.0 +0002410c R_386_JUMP_SLOT fscanf@GLIBC_2.0 +00024110 R_386_JUMP_SLOT strlen@GLIBC_2.0 +00024114 R_386_JUMP_SLOT setenv@GLIBC_2.0 +00024118 R_386_JUMP_SLOT __libc_start_main@GLIBC_2.0 +0002411c R_386_JUMP_SLOT sigaddset@GLIBC_2.0 +00024120 R_386_JUMP_SLOT memset@GLIBC_2.0 +00024124 R_386_JUMP_SLOT ungetc@GLIBC_2.0 +00024128 R_386_JUMP_SLOT snprintf@GLIBC_2.0 +0002412c R_386_JUMP_SLOT __errno_location@GLIBC_2.0 +00024130 R_386_JUMP_SLOT tcgetpgrp@GLIBC_2.0 +00024134 R_386_JUMP_SLOT fileno@GLIBC_2.0 +00024138 R_386_JUMP_SLOT stpncpy@GLIBC_2.0 +0002413c R_386_JUMP_SLOT fwrite_unlocked@GLIBC_2.1 +00024140 R_386_JUMP_SLOT __printf_chk@GLIBC_2.3.4 +00024144 R_386_JUMP_SLOT mempcpy@GLIBC_2.1 +00024148 R_386_JUMP_SLOT wcswidth@GLIBC_2.0 +0002414c R_386_JUMP_SLOT sigemptyset@GLIBC_2.0 +00024150 R_386_JUMP_SLOT __uflow@GLIBC_2.0 +00024154 R_386_JUMP_SLOT __rawmemchr@GLIBC_2.1 +00024158 R_386_JUMP_SLOT nl_langinfo@GLIBC_2.0 +0002415c R_386_JUMP_SLOT setlocale@GLIBC_2.0 +00024160 R_386_JUMP_SLOT strrchr@GLIBC_2.0 +00024164 R_386_JUMP_SLOT __overflow@GLIBC_2.0 +00024168 R_386_JUMP_SLOT mbstowcs@GLIBC_2.0 +0002416c R_386_JUMP_SLOT gmtime_r@GLIBC_2.0 +00024170 R_386_JUMP_SLOT localeconv@GLIBC_2.2 +00024174 R_386_JUMP_SLOT getxattr@GLIBC_2.3 +00024178 R_386_JUMP_SLOT freecon +0002417c R_386_JUMP_SLOT lseek64@GLIBC_2.1 +00024180 R_386_JUMP_SLOT readdir64@GLIBC_2.2 +00024184 R_386_JUMP_SLOT __fprintf_chk@GLIBC_2.3.4 +00024188 R_386_JUMP_SLOT sigaction@GLIBC_2.0 +0002418c R_386_JUMP_SLOT bindtextdomain@GLIBC_2.0 +00024190 R_386_JUMP_SLOT strncmp@GLIBC_2.0 +00024194 R_386_JUMP_SLOT isatty@GLIBC_2.0 +00024198 R_386_JUMP_SLOT abort@GLIBC_2.0 +0002419c R_386_JUMP_SLOT __xstat64@GLIBC_2.2 +000241a0 R_386_JUMP_SLOT __lxstat64@GLIBC_2.2 +000241a4 R_386_JUMP_SLOT getgrnam@GLIBC_2.0 +000241a8 R_386_JUMP_SLOT close@GLIBC_2.0 +000241ac R_386_JUMP_SLOT closedir@GLIBC_2.0 +000241b0 R_386_JUMP_SLOT strspn@GLIBC_2.0 +000241b4 R_386_JUMP_SLOT opendir@GLIBC_2.0 +000241b8 R_386_JUMP_SLOT getgrgid@GLIBC_2.0 +000241bc R_386_JUMP_SLOT __ctype_tolower_loc@GLIBC_2.3 +000241c0 R_386_JUMP_SLOT __assert_fail@GLIBC_2.0 +000241c4 R_386_JUMP_SLOT __ctype_b_loc@GLIBC_2.3 +000241c8 R_386_JUMP_SLOT calloc@GLIBC_2.0 +000241cc R_386_JUMP_SLOT __sprintf_chk@GLIBC_2.3.4 diff --git a/scripts/t/Dpkg_Shlibs/objdump.patterns b/scripts/t/Dpkg_Shlibs/objdump.patterns index a319cb95f..571ad4726 100644 --- a/scripts/t/Dpkg_Shlibs/objdump.patterns +++ b/scripts/t/Dpkg_Shlibs/objdump.patterns @@ -2,21 +2,23 @@ ./t/Dpkg_Shlibs/libobjdump.patterns.so: file format elf32-i386 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED -start address 0x00001880 +start address 0x00001650 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 - filesz 0x00002466 memsz 0x00002466 flags r-x - LOAD off 0x00002468 vaddr 0x00003468 paddr 0x00003468 align 2**12 - filesz 0x000002a4 memsz 0x000002ac flags rw- - DYNAMIC off 0x0000259c vaddr 0x0000359c paddr 0x0000359c align 2**2 - filesz 0x000000f8 memsz 0x000000f8 flags rw- - NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2 + filesz 0x0000212c memsz 0x0000212c flags r-x + LOAD off 0x00002dd8 vaddr 0x00003dd8 paddr 0x00003dd8 align 2**12 + filesz 0x00000274 memsz 0x00000278 flags rw- + DYNAMIC off 0x00002ec8 vaddr 0x00003ec8 paddr 0x00003ec8 align 2**2 + filesz 0x00000110 memsz 0x00000110 flags rw- + NOTE off 0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2 filesz 0x00000024 memsz 0x00000024 flags r-- -EH_FRAME off 0x00001f10 vaddr 0x00001f10 paddr 0x00001f10 align 2**2 - filesz 0x0000014c memsz 0x0000014c flags r-- - STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2 +EH_FRAME off 0x00001ba0 vaddr 0x00001ba0 paddr 0x00001ba0 align 2**2 + filesz 0x00000134 memsz 0x00000134 flags r-- + STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4 filesz 0x00000000 memsz 0x00000000 flags rw- + RELRO off 0x00002dd8 vaddr 0x00003dd8 paddr 0x00003dd8 align 2**0 + filesz 0x00000228 memsz 0x00000228 flags r-- Dynamic Section: NEEDED libstdc++.so.6 @@ -24,27 +26,30 @@ Dynamic Section: NEEDED libgcc_s.so.1 NEEDED libc.so.6 SONAME libpatterns.so.1 - INIT 0x00001738 - FINI 0x00001e98 - HASH 0x00000118 - GNU_HASH 0x0000038c - STRTAB 0x00000ba4 - SYMTAB 0x00000624 - STRSZ 0x000007de + INIT 0x00001520 + FINI 0x00001b2c + INIT_ARRAY 0x00003dd8 + INIT_ARRAYSZ 0x00000004 + FINI_ARRAY 0x00003ddc + FINI_ARRAYSZ 0x00000004 + GNU_HASH 0x00000138 + STRTAB 0x00000960 + SYMTAB 0x000003d0 + STRSZ 0x00000802 SYMENT 0x00000010 - PLTGOT 0x000036b8 - PLTRELSZ 0x00000080 + PLTGOT 0x00004000 + PLTRELSZ 0x00000070 PLTREL 0x00000011 - JMPREL 0x000016b8 - REL 0x000014f8 - RELSZ 0x000001c0 + JMPREL 0x000014b0 + REL 0x000012d8 + RELSZ 0x000001d8 RELENT 0x00000008 - VERDEF 0x00001434 + VERDEF 0x00001214 VERDEFNUM 0x00000003 - VERNEED 0x00001488 + VERNEED 0x00001268 VERNEEDNUM 0x00000003 - VERSYM 0x00001382 - RELCOUNT 0x00000001 + VERSYM 0x00001162 + RELCOUNT 0x00000003 Version definitions: 1 0x01 0x03e92331 libpatterns.so.1 @@ -52,177 +57,179 @@ Version definitions: 3 0x00 0x0a4cbc82 SYMVEROPT_2 Version References: - required from libc.so.6: - 0x09691f73 0x00 07 GLIBC_2.1.3 required from libgcc_s.so.1: - 0x0b792650 0x00 06 GCC_3.0 + 0x0b792650 0x00 07 GCC_3.0 required from libstdc++.so.6: - 0x056bafd3 0x00 05 CXXABI_1.3 - 0x08922974 0x00 04 GLIBCXX_3.4 + 0x056bafd3 0x00 06 CXXABI_1.3 + 0x0bafd179 0x00 05 CXXABI_1.3.9 + required from libc.so.6: + 0x09691f73 0x00 04 GLIBC_2.1.3 DYNAMIC SYMBOL TABLE: -00000000 w D *UND* 00000000 __gmon_start__ -00000000 w D *UND* 00000000 _Jv_RegisterClasses -00000000 DF *UND* 00000000 GLIBCXX_3.4 _ZdlPv +00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize +00000000 DF *UND* 00000000 CXXABI_1.3.9 _ZdlPvj 00000000 DO *UND* 00000000 CXXABI_1.3 _ZTVN10__cxxabiv117__class_type_infoE -00000000 DO *UND* 00000000 CXXABI_1.3 _ZTVN10__cxxabiv121__vmi_class_type_infoE 00000000 DF *UND* 00000000 CXXABI_1.3 __gxx_personality_v0 +00000000 DO *UND* 00000000 CXXABI_1.3 _ZTVN10__cxxabiv121__vmi_class_type_infoE +00000000 w D *UND* 00000000 _ITM_deregisterTMCloneTable 00000000 DF *UND* 00000000 GCC_3.0 _Unwind_Resume -00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize -00001ef7 w DO .rodata 00000008 Base _ZTS6ClassC -000019b0 g DF .text 0000001b Base _ZN6ClassBD1Ev -00001b70 g DF .text 00000007 Base _ZThn16_N3NSB6ClassDD0Ev -00001af0 g DF .text 00000036 Base _ZN6ClassCD0Ev -00001cd0 g DF .text 0000001b Base _ZN3NSA6ClassA8InternalC2Ev -00001e00 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverC2Ev -00001d10 g DF .text 0000001b Base _ZN3NSA6ClassAC2Ev -00001c50 g DF .text 00000036 Base _ZN3NSA6ClassA7PrivateD0Ev -00001d70 g DF .text 00000089 Base _ZN3NSB6ClassDC2Ev -00001cf0 g DF .text 00000002 Base _ZN3NSA6ClassA8Internal16internal_method1Ec +00000000 w D *UND* 00000000 __gmon_start__ +00000000 w D *UND* 00000000 _ITM_registerTMCloneTable +00001b88 w DO .rodata 00000008 Base _ZTS6ClassC +00001790 g DF .text 00000002 Base _ZN6ClassBD1Ev +00001940 g DF .text 00000007 Base _ZThn16_N3NSB6ClassDD0Ev +000018e0 g DF .text 0000002a Base _ZN6ClassCD0Ev +00001a00 g DF .text 0000001a Base _ZN3NSA6ClassAC2Ev +00001af0 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverC2Ev +000019c0 g DF .text 0000001a Base _ZN3NSA6ClassA8InternalC2Ev +00001820 g DF .text 0000002a Base _ZN3NSA6ClassA7PrivateD0Ev +00001a60 g DF .text 0000008c Base _ZN3NSB6ClassDC2Ev +000019e0 g DF .text 00000002 Base _ZN3NSA6ClassA8Internal16internal_method1Ec +00001970 g DF .text 00000002 Base _ZThn12_NK3NSB6ClassD11generate_vtEPKc 00000000 g DO *ABS* 00000000 SYMVER_1 SYMVER_1 -00001ad0 g DF .text 00000007 Base _ZThn12_NK3NSB6ClassD11generate_vtEPKc -000034e8 w DO .data.rel.ro 00000010 Base _ZTVN3NSA6ClassA7PrivateE -00001e10 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverD1Ev -00001e50 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalD2Ev -00001d50 g DF .text 0000001b Base _ZN6ClassCC2Ev -00001980 g DF .text 0000001b Base _ZN3NSA6ClassAD1Ev -00001960 g DF .text 0000001b Base _ZN3NSA6ClassA8InternalD1Ev -00001a30 g DF .text 00000088 Base _ZN3NSB6ClassDD1Ev -00001c90 g DF .text 0000001b Base _ZN3NSA6ClassA7PrivateC2Ev -000034f8 w DO .data.rel.ro 00000010 Base _ZTVN3NSA6ClassA8InternalE -00001cb0 g DF .text 00000002 Base _ZN3NSA6ClassA7Private11privmethod1Ei -000019b0 g DF .text 0000001b Base _ZN6ClassBD2Ev -00001a10 g DF .text 00000007 Base _ZThn16_N3NSB6ClassDD1Ev -00001e98 g DF .fini 00000000 Base _fini -00001b80 g DF .text 00000007 Base _ZThn12_N3NSB6ClassDD0Ev -000019e0 g DF .text 0000001b Base _ZN6ClassCD1Ev -00001940 g DF .text 0000001b Base _ZN3NSA6ClassA7PrivateD1Ev -00003498 w DO .data.rel.ro 00000008 Base _ZTI6ClassB -00001738 g DF .init 00000000 Base _init -000034a0 w DO .data.rel.ro 00000008 Base _ZTI6ClassC -00001d00 g DF .text 00000002 Base _ZN3NSA6ClassA8Internal16internal_method2Ec -00001980 g DF .text 0000001b Base _ZN3NSA6ClassAD2Ev -00001960 g DF .text 0000001b Base _ZN3NSA6ClassA8InternalD2Ev -00001e10 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverD2Ev +00003e30 w DO .data.rel.ro 00000010 Base _ZTVN3NSA6ClassA7PrivateE +00001770 g DF .text 00000002 Base _ZN3NSA6ClassAD1Ev +00001760 g DF .text 00000002 Base _ZN3NSA6ClassA8InternalD1Ev +00001b00 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverD1Ev +00001a40 g DF .text 0000001a Base _ZN6ClassCC2Ev +00001b00 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalD2Ev +00003e40 w DO .data.rel.ro 00000010 Base _ZTVN3NSA6ClassA8InternalE +00001980 g DF .text 0000001a Base _ZN3NSA6ClassA7PrivateC2Ev +000017b0 g DF .text 0000004d Base _ZN3NSB6ClassDD1Ev +000019a0 g DF .text 00000002 Base _ZN3NSA6ClassA7Private11privmethod1Ei +00001790 g DF .text 00000002 Base _ZN6ClassBD2Ev +00001810 g DF .text 00000007 Base _ZThn16_N3NSB6ClassDD1Ev +00001b2c g DF .fini 00000000 Base _fini +00001950 g DF .text 00000007 Base _ZThn12_N3NSB6ClassDD0Ev +000017a0 g DF .text 00000002 Base _ZN6ClassCD1Ev +00001750 g DF .text 00000002 Base _ZN3NSA6ClassA7PrivateD1Ev +00001520 g DF .init 00000000 Base _init +00003df8 w DO .data.rel.ro 00000008 Base _ZTI6ClassB +000019f0 g DF .text 00000002 Base _ZN3NSA6ClassA8Internal16internal_method2Ec +00003e00 w DO .data.rel.ro 00000008 Base _ZTI6ClassC +00001b00 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverD2Ev +00001760 g DF .text 00000002 Base _ZN3NSA6ClassA8InternalD2Ev 00000000 g DO *ABS* 00000000 SYMVEROPT_2 SYMVEROPT_2 -00003560 w DO .data.rel.ro 0000003c Base _ZTVN3NSB6ClassDE -00003508 w DO .data.rel.ro 00000014 Base _ZTVN3NSA6ClassAE -000019a0 g DF .text 00000002 Base _ZNK3NSA6ClassA11generate_vtEPKc -00001cc0 g DF .text 00000002 Base _ZN3NSA6ClassA7Private11privmethod2Ei -00001a30 g DF .text 00000088 Base _ZN3NSB6ClassDD2Ev -00001ac0 g DF .text 00000007 Base _ZThn16_NK3NSB6ClassD11generate_vtEPKc -00001a00 g DF .text 00000002 Base _ZNK6ClassC11generate_vtEPKc -00001a20 g DF .text 00000007 Base _ZThn12_N3NSB6ClassDD1Ev -000019e0 g DF .text 0000001b Base _ZN6ClassCD2Ev -00001e40 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalC1Ev -00001e20 g DF .text 00000002 SYMVER_1 _ZN3NSB6Symver14symver_method1Ev -00001940 g DF .text 0000001b Base _ZN3NSA6ClassA7PrivateD2Ev -000019d0 g DF .text 00000002 Base _ZNK6ClassB11generate_vtEPKc -00001d30 g DF .text 0000001b Base _ZN6ClassBC1Ev -00003520 w DO .data.rel.ro 00000014 Base _ZTV6ClassB -00003538 w DO .data.rel.ro 00000014 Base _ZTV6ClassC -00001eb4 w DO .rodata 00000016 Base _ZTSN3NSA6ClassA7PrivateE -00001eff w DO .rodata 0000000e Base _ZTSN3NSB6ClassDE -0000370c g D *ABS* 00000000 Base _edata -00001ee1 w DO .rodata 0000000e Base _ZTSN3NSA6ClassAE -00001b30 g DF .text 00000036 Base _ZN6ClassBD0Ev -00003480 w DO .data.rel.ro 00000008 Base _ZTIN3NSA6ClassA7PrivateE -00001d10 g DF .text 0000001b Base _ZN3NSA6ClassAC1Ev -00001e40 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalC2Ev -00001cd0 g DF .text 0000001b Base _ZN3NSA6ClassA8InternalC1Ev -00003714 g D *ABS* 00000000 Base _end -00001e00 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverC1Ev -00001eca w DO .rodata 00000017 Base _ZTSN3NSA6ClassA8InternalE -00001e30 g DF .text 00000002 SYMVER_1 _ZN3NSB6Symver14symver_method2Ev -00001d70 g DF .text 00000089 Base _ZN3NSB6ClassDC1Ev -00001d30 g DF .text 0000001b Base _ZN6ClassBC2Ev -00001ae0 g DF .text 00000002 Base _ZNK3NSB6ClassD11generate_vtEPKc -00001bd0 g DF .text 00000036 Base _ZN3NSA6ClassAD0Ev -00001d50 g DF .text 0000001b Base _ZN6ClassCC1Ev -00001c10 g DF .text 00000036 Base _ZN3NSA6ClassA8InternalD0Ev -00001e50 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalD1Ev -00003488 w DO .data.rel.ro 00000008 Base _ZTIN3NSA6ClassA8InternalE -0000370c g D *ABS* 00000000 Base __bss_start -00001eef w DO .rodata 00000008 Base _ZTS6ClassB -000034c0 w DO .data.rel.ro 00000028 Base _ZTIN3NSB6ClassDE -00001c90 g DF .text 0000001b Base _ZN3NSA6ClassA7PrivateC1Ev -00003490 w DO .data.rel.ro 00000008 Base _ZTIN3NSA6ClassAE -00001b90 g DF .text 00000036 Base _ZN3NSB6ClassDD0Ev +00001770 g DF .text 00000002 Base _ZN3NSA6ClassAD2Ev +00003e8c w DO .data.rel.ro 0000003c Base _ZTVN3NSB6ClassDE +00003e50 w DO .data.rel.ro 00000014 Base _ZTVN3NSA6ClassAE +000019b0 g DF .text 00000002 Base _ZN3NSA6ClassA7Private11privmethod2Ei +00001780 g DF .text 00000002 Base _ZNK3NSA6ClassA11generate_vtEPKc +000017b0 g DF .text 0000004d Base _ZN3NSB6ClassDD2Ev +00001960 g DF .text 00000002 Base _ZThn16_NK3NSB6ClassD11generate_vtEPKc +00001780 g DF .text 00000002 Base _ZNK6ClassC11generate_vtEPKc +00001800 g DF .text 00000007 Base _ZThn12_N3NSB6ClassDD1Ev +00001af0 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalC1Ev +000017a0 g DF .text 00000002 Base _ZN6ClassCD2Ev +00001b10 g DF .text 00000002 SYMVER_1 _ZN3NSB6Symver14symver_method1Ev +00001750 g DF .text 00000002 Base _ZN3NSA6ClassA7PrivateD2Ev +00001780 g DF .text 00000002 Base _ZNK6ClassB11generate_vtEPKc +00001a20 g DF .text 0000001a Base _ZN6ClassBC1Ev +00003e64 w DO .data.rel.ro 00000014 Base _ZTV6ClassB +00003e78 w DO .data.rel.ro 00000014 Base _ZTV6ClassC +00001b70 w DO .rodata 0000000e Base _ZTSN3NSA6ClassAE +0000404c g D .data 00000000 Base _edata +00001b40 w DO .rodata 00000016 Base _ZTSN3NSA6ClassA7PrivateE +00001b90 w DO .rodata 0000000e Base _ZTSN3NSB6ClassDE +000018b0 g DF .text 0000002a Base _ZN6ClassBD0Ev +00003de0 w DO .data.rel.ro 00000008 Base _ZTIN3NSA6ClassA7PrivateE +00001af0 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalC2Ev +000019c0 g DF .text 0000001a Base _ZN3NSA6ClassA8InternalC1Ev +00001af0 g DF .text 00000002 SYMVER_1 _ZN3NSB6SymverC1Ev +00004050 g D .bss 00000000 Base _end +00001a00 g DF .text 0000001a Base _ZN3NSA6ClassAC1Ev +00001b20 g DF .text 00000002 SYMVER_1 _ZN3NSB6Symver14symver_method2Ev +00001a60 g DF .text 0000008c Base _ZN3NSB6ClassDC1Ev +00001b58 w DO .rodata 00000017 Base _ZTSN3NSA6ClassA8InternalE +00001a20 g DF .text 0000001a Base _ZN6ClassBC2Ev +00001780 g DF .text 00000002 Base _ZNK3NSB6ClassD11generate_vtEPKc +00001b00 g DF .text 00000002 SYMVEROPT_2 _ZN3NSB14SymverOptionalD1Ev +00001880 g DF .text 0000002a Base _ZN3NSA6ClassAD0Ev +00001a40 g DF .text 0000001a Base _ZN6ClassCC1Ev +00001850 g DF .text 0000002a Base _ZN3NSA6ClassA8InternalD0Ev +00003de8 w DO .data.rel.ro 00000008 Base _ZTIN3NSA6ClassA8InternalE +0000404c g D .bss 00000000 Base __bss_start +00003e08 w DO .data.rel.ro 00000028 Base _ZTIN3NSB6ClassDE +00003df0 w DO .data.rel.ro 00000008 Base _ZTIN3NSA6ClassAE +00001910 g DF .text 0000002a Base _ZN3NSB6ClassDD0Ev +00001980 g DF .text 0000001a Base _ZN3NSA6ClassA7PrivateC1Ev +00001b80 w DO .rodata 00000008 Base _ZTS6ClassB DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE -00003704 R_386_RELATIVE *ABS* -00003480 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE -00003488 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE -00003490 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE -00003498 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE -000034a0 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE -00003484 R_386_32 _ZTSN3NSA6ClassA7PrivateE -0000348c R_386_32 _ZTSN3NSA6ClassA8InternalE -00003494 R_386_32 _ZTSN3NSA6ClassAE -0000349c R_386_32 _ZTS6ClassB -000034a4 R_386_32 _ZTS6ClassC -000034c0 R_386_32 _ZTVN10__cxxabiv121__vmi_class_type_infoE -000034c4 R_386_32 _ZTSN3NSB6ClassDE -000034d0 R_386_32 _ZTIN3NSA6ClassAE -0000350c R_386_32 _ZTIN3NSA6ClassAE -000034d8 R_386_32 _ZTI6ClassB -00003524 R_386_32 _ZTI6ClassB -000034e0 R_386_32 _ZTI6ClassC -0000353c R_386_32 _ZTI6ClassC -000034ec R_386_32 _ZTIN3NSA6ClassA7PrivateE -000034f0 R_386_32 _ZN3NSA6ClassA7PrivateD1Ev -000034f4 R_386_32 _ZN3NSA6ClassA7PrivateD0Ev -000034fc R_386_32 _ZTIN3NSA6ClassA8InternalE -00003500 R_386_32 _ZN3NSA6ClassA8InternalD1Ev -00003504 R_386_32 _ZN3NSA6ClassA8InternalD0Ev -00003510 R_386_32 _ZN3NSA6ClassAD1Ev -00003514 R_386_32 _ZN3NSA6ClassAD0Ev -00003518 R_386_32 _ZNK3NSA6ClassA11generate_vtEPKc -00003528 R_386_32 _ZN6ClassBD1Ev -0000352c R_386_32 _ZN6ClassBD0Ev -00003530 R_386_32 _ZNK6ClassB11generate_vtEPKc -00003540 R_386_32 _ZN6ClassCD1Ev -00003544 R_386_32 _ZN6ClassCD0Ev -00003548 R_386_32 _ZNK6ClassC11generate_vtEPKc -00003564 R_386_32 _ZTIN3NSB6ClassDE -00003578 R_386_32 _ZTIN3NSB6ClassDE -0000358c R_386_32 _ZTIN3NSB6ClassDE -00003568 R_386_32 _ZN3NSB6ClassDD1Ev -0000356c R_386_32 _ZN3NSB6ClassDD0Ev -00003570 R_386_32 _ZNK3NSB6ClassD11generate_vtEPKc -0000357c R_386_32 _ZThn12_N3NSB6ClassDD1Ev -00003580 R_386_32 _ZThn12_N3NSB6ClassDD0Ev -00003584 R_386_32 _ZThn12_NK3NSB6ClassD11generate_vtEPKc -00003590 R_386_32 _ZThn16_N3NSB6ClassDD1Ev -00003594 R_386_32 _ZThn16_N3NSB6ClassDD0Ev -00003598 R_386_32 _ZThn16_NK3NSB6ClassD11generate_vtEPKc -00003694 R_386_GLOB_DAT _ZTVN3NSB6ClassDE -00003698 R_386_GLOB_DAT __gmon_start__ -0000369c R_386_GLOB_DAT _Jv_RegisterClasses -000036a0 R_386_GLOB_DAT _ZTV6ClassB -000036a4 R_386_GLOB_DAT _ZTVN3NSA6ClassA8InternalE -000036a8 R_386_GLOB_DAT _ZTVN3NSA6ClassA7PrivateE -000036ac R_386_GLOB_DAT _ZTVN3NSA6ClassAE -000036b0 R_386_GLOB_DAT __cxa_finalize -000036b4 R_386_GLOB_DAT _ZTV6ClassC -00003708 R_386_32 __gxx_personality_v0 -000036c4 R_386_JUMP_SLOT _ZN3NSA6ClassA7PrivateD1Ev -000036c8 R_386_JUMP_SLOT _ZN3NSB6ClassDD1Ev -000036cc R_386_JUMP_SLOT _ZN3NSA6ClassAD2Ev -000036d0 R_386_JUMP_SLOT __gmon_start__ -000036d4 R_386_JUMP_SLOT _ZdlPv -000036d8 R_386_JUMP_SLOT _ZN6ClassCD2Ev -000036dc R_386_JUMP_SLOT _ZN6ClassBD2Ev -000036e0 R_386_JUMP_SLOT _ZN6ClassBD1Ev -000036e4 R_386_JUMP_SLOT _ZN6ClassCC2Ev -000036e8 R_386_JUMP_SLOT _ZN3NSA6ClassAD1Ev -000036ec R_386_JUMP_SLOT _ZN3NSA6ClassAC2Ev -000036f0 R_386_JUMP_SLOT _ZN6ClassBC2Ev -000036f4 R_386_JUMP_SLOT _ZN6ClassCD1Ev -000036f8 R_386_JUMP_SLOT _ZN3NSA6ClassA8InternalD1Ev -000036fc R_386_JUMP_SLOT _Unwind_Resume -00003700 R_386_JUMP_SLOT __cxa_finalize +00003dd8 R_386_RELATIVE *ABS* +00003ddc R_386_RELATIVE *ABS* +00004044 R_386_RELATIVE *ABS* +00003de0 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 +00003de8 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 +00003df0 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 +00003df8 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 +00003e00 R_386_32 _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 +00003de4 R_386_32 _ZTSN3NSA6ClassA7PrivateE@@Base +00003dec R_386_32 _ZTSN3NSA6ClassA8InternalE@@Base +00003df4 R_386_32 _ZTSN3NSA6ClassAE@@Base +00003dfc R_386_32 _ZTS6ClassB@@Base +00003e04 R_386_32 _ZTS6ClassC@@Base +00003e08 R_386_32 _ZTVN10__cxxabiv121__vmi_class_type_infoE@CXXABI_1.3 +00003e0c R_386_32 _ZTSN3NSB6ClassDE@@Base +00003e18 R_386_32 _ZTIN3NSA6ClassAE@@Base +00003e54 R_386_32 _ZTIN3NSA6ClassAE@@Base +00003e20 R_386_32 _ZTI6ClassB@@Base +00003e68 R_386_32 _ZTI6ClassB@@Base +00003e28 R_386_32 _ZTI6ClassC@@Base +00003e7c R_386_32 _ZTI6ClassC@@Base +00003e34 R_386_32 _ZTIN3NSA6ClassA7PrivateE@@Base +00003e38 R_386_32 _ZN3NSA6ClassA7PrivateD1Ev@@Base +00003e3c R_386_32 _ZN3NSA6ClassA7PrivateD0Ev@@Base +00003e44 R_386_32 _ZTIN3NSA6ClassA8InternalE@@Base +00003e48 R_386_32 _ZN3NSA6ClassA8InternalD1Ev@@Base +00003e4c R_386_32 _ZN3NSA6ClassA8InternalD0Ev@@Base +00003e58 R_386_32 _ZN3NSA6ClassAD1Ev@@Base +00003e5c R_386_32 _ZN3NSA6ClassAD0Ev@@Base +00003e60 R_386_32 _ZNK3NSA6ClassA11generate_vtEPKc@@Base +00003e6c R_386_32 _ZN6ClassBD1Ev@@Base +00003e70 R_386_32 _ZN6ClassBD0Ev@@Base +00003e74 R_386_32 _ZNK6ClassB11generate_vtEPKc@@Base +00003e80 R_386_32 _ZN6ClassCD1Ev@@Base +00003e84 R_386_32 _ZN6ClassCD0Ev@@Base +00003e88 R_386_32 _ZNK6ClassC11generate_vtEPKc@@Base +00003e90 R_386_32 _ZTIN3NSB6ClassDE@@Base +00003ea4 R_386_32 _ZTIN3NSB6ClassDE@@Base +00003eb8 R_386_32 _ZTIN3NSB6ClassDE@@Base +00003e94 R_386_32 _ZN3NSB6ClassDD1Ev@@Base +00003e98 R_386_32 _ZN3NSB6ClassDD0Ev@@Base +00003e9c R_386_32 _ZNK3NSB6ClassD11generate_vtEPKc@@Base +00003ea8 R_386_32 _ZThn12_N3NSB6ClassDD1Ev@@Base +00003eac R_386_32 _ZThn12_N3NSB6ClassDD0Ev@@Base +00003eb0 R_386_32 _ZThn12_NK3NSB6ClassD11generate_vtEPKc@@Base +00003ebc R_386_32 _ZThn16_N3NSB6ClassDD1Ev@@Base +00003ec0 R_386_32 _ZThn16_N3NSB6ClassDD0Ev@@Base +00003ec4 R_386_32 _ZThn16_NK3NSB6ClassD11generate_vtEPKc@@Base +00003fd8 R_386_GLOB_DAT __cxa_finalize@GLIBC_2.1.3 +00003fdc R_386_GLOB_DAT _ZTVN3NSA6ClassA8InternalE@@Base +00003fe0 R_386_GLOB_DAT _ZTVN3NSB6ClassDE@@Base +00003fe4 R_386_GLOB_DAT _ZTVN3NSA6ClassAE@@Base +00003fe8 R_386_GLOB_DAT _ZTV6ClassC@@Base +00003fec R_386_GLOB_DAT _ZTV6ClassB@@Base +00003ff0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable +00003ff4 R_386_GLOB_DAT _ZTVN3NSA6ClassA7PrivateE@@Base +00003ff8 R_386_GLOB_DAT __gmon_start__ +00003ffc R_386_GLOB_DAT _ITM_registerTMCloneTable +00004048 R_386_32 __gxx_personality_v0@CXXABI_1.3 +0000400c R_386_JUMP_SLOT _ZN6ClassBD1Ev@@Base +00004010 R_386_JUMP_SLOT _ZN6ClassBD2Ev@@Base +00004014 R_386_JUMP_SLOT _ZN3NSA6ClassA7PrivateD1Ev@@Base +00004018 R_386_JUMP_SLOT _ZN3NSA6ClassAD1Ev@@Base +0000401c R_386_JUMP_SLOT _ZN3NSA6ClassA8InternalD1Ev@@Base +00004020 R_386_JUMP_SLOT _ZdlPvj@CXXABI_1.3.9 +00004024 R_386_JUMP_SLOT _ZN3NSB6ClassDD1Ev@@Base +00004028 R_386_JUMP_SLOT _ZN6ClassCD2Ev@@Base +0000402c R_386_JUMP_SLOT _ZN3NSA6ClassAC2Ev@@Base +00004030 R_386_JUMP_SLOT _ZN6ClassBC2Ev@@Base +00004034 R_386_JUMP_SLOT _ZN6ClassCC2Ev@@Base +00004038 R_386_JUMP_SLOT _Unwind_Resume@GCC_3.0 +0000403c R_386_JUMP_SLOT _ZN3NSA6ClassAD2Ev@@Base +00004040 R_386_JUMP_SLOT _ZN6ClassCD1Ev@@Base diff --git a/scripts/t/Dpkg_Shlibs/objdump.spacesyms b/scripts/t/Dpkg_Shlibs/objdump.spacesyms index f307ee5a5..1b26af972 100644 --- a/scripts/t/Dpkg_Shlibs/objdump.spacesyms +++ b/scripts/t/Dpkg_Shlibs/objdump.spacesyms @@ -2,48 +2,47 @@ ./t/Dpkg_Shlibs/libobjdump.spacesyms.so: file format elf32-i386 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED -start address 0x000007a0 +start address 0x00000770 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 - filesz 0x00000d5c memsz 0x00000d5c flags r-x - LOAD off 0x00000d5c vaddr 0x00001d5c paddr 0x00001d5c align 2**12 - filesz 0x00000204 memsz 0x00000208 flags rw- - DYNAMIC off 0x00000d68 vaddr 0x00001d68 paddr 0x00001d68 align 2**2 - filesz 0x000000f8 memsz 0x000000f8 flags rw- - NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2 + filesz 0x00000d08 memsz 0x00000d08 flags r-x + LOAD off 0x00000f08 vaddr 0x00001f08 paddr 0x00001f08 align 2**12 + filesz 0x00000198 memsz 0x0000019c flags rw- + DYNAMIC off 0x00000f10 vaddr 0x00001f10 paddr 0x00001f10 align 2**2 + filesz 0x000000e0 memsz 0x000000e0 flags rw- + NOTE off 0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2 filesz 0x00000024 memsz 0x00000024 flags r-- -EH_FRAME off 0x00000a68 vaddr 0x00000a68 paddr 0x00000a68 align 2**2 - filesz 0x000000d4 memsz 0x000000d4 flags r-- +EH_FRAME off 0x000009f8 vaddr 0x000009f8 paddr 0x000009f8 align 2**2 + filesz 0x000000dc memsz 0x000000dc flags r-- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4 filesz 0x00000000 memsz 0x00000000 flags rw- + RELRO off 0x00000f08 vaddr 0x00001f08 paddr 0x00001f08 align 2**0 + filesz 0x000000f8 memsz 0x000000f8 flags r-- Dynamic Section: NEEDED libc.so.6 SONAME libspacesyms.so.1 - INIT 0x00000740 - FINI 0x00000a54 - INIT_ARRAY 0x00001d5c + INIT 0x00000724 + FINI 0x000009e4 + INIT_ARRAY 0x00001f08 INIT_ARRAYSZ 0x00000004 - FINI_ARRAY 0x00001d60 + FINI_ARRAY 0x00001f0c FINI_ARRAYSZ 0x00000004 - GNU_HASH 0x00000118 - STRTAB 0x0000036c - SYMTAB 0x000001cc - STRSZ 0x00000214 + GNU_HASH 0x00000138 + STRTAB 0x0000037c + SYMTAB 0x000001ec + STRSZ 0x00000200 SYMENT 0x00000010 - PLTGOT 0x00001e74 - PLTRELSZ 0x00000010 - PLTREL 0x00000011 - JMPREL 0x00000730 - REL 0x00000630 - RELSZ 0x00000100 + PLTGOT 0x00002000 + REL 0x0000062c + RELSZ 0x000000f8 RELENT 0x00000008 - VERDEF 0x000005b4 + VERDEF 0x000005b0 VERDEFNUM 0x00000003 - VERNEED 0x00000610 + VERNEED 0x0000060c VERNEEDNUM 0x00000001 - VERSYM 0x00000580 + VERSYM 0x0000057c RELCOUNT 0x0000000f Version definitions: @@ -60,65 +59,61 @@ DYNAMIC SYMBOL TABLE: 00000000 w D *UND* 00000000 _ITM_deregisterTMCloneTable 00000000 w DF *UND* 00000000 GLIBC_2.1.3 __cxa_finalize 00000000 w D *UND* 00000000 __gmon_start__ -00000000 w D *UND* 00000000 _Jv_RegisterClasses 00000000 w D *UND* 00000000 _ITM_registerTMCloneTable -00000920 g DF .text 00000002 Base symdefaultverSPA CEdefault -00000a54 g DF .fini 00000000 Base _fini -00001f00 g DO .data 00000060 Base funcs -00000740 g DF .init 00000000 Base _init -000009e0 g DF .text 00000002 V1 symshortvernospacedefault -00001f60 g D .bss 00000000 Base __bss_start -00000900 g DF .text 00000002 Base .protected symdefaultvernospaceprotected -00001f64 g D .bss 00000000 Base _end -00000a20 g DF .text 00000002 V1 symshortverSPA CEdefault +000008c0 g DF .text 00000002 Base symdefaultverSPA CEdefault +000009e4 g DF .fini 00000000 Base _fini +00002040 g DO .data 00000060 Base funcs +00000724 g DF .init 00000000 Base _init +00000980 g DF .text 00000002 V1 symshortvernospacedefault +000020a0 g D .bss 00000000 Base __bss_start +00000890 g DF .text 00000002 Base .protected symdefaultvernospaceprotected +000020a4 g D .bss 00000000 Base _end +000009c0 g DF .text 00000002 V1 symshortverSPA CEdefault 00000000 g DO *ABS* 00000000 V1 V1 -00000a00 g DF .text 00000002 V1 .protected symshortvernospaceprotected -00000960 g DF .text 00000002 VERY_LONG_VERSION_1 symlongvernospacedefault +000009a0 g DF .text 00000002 V1 .protected symshortvernospaceprotected +00000900 g DF .text 00000002 VERY_LONG_VERSION_1 symlongvernospacedefault 00000000 g DO *ABS* 00000000 VERY_LONG_VERSION_1 VERY_LONG_VERSION_1 -00001f60 g D .data 00000000 Base _edata -000008e0 g DF .text 00000002 Base symdefaultvernospacedefault -000009c0 g DF .text 00000002 VERY_LONG_VERSION_1 .protected symlongverSPA CEprotected -00000940 g DF .text 00000002 Base .protected symdefaultverSPA CEprotected -000009a0 g DF .text 00000002 VERY_LONG_VERSION_1 symlongverSPA CEdefault -00000a40 g DF .text 00000002 V1 .protected symshortverSPA CEprotected -00000980 g DF .text 00000002 VERY_LONG_VERSION_1 .protected symlongvernospaceprotected +000020a0 g D .data 00000000 Base _edata +00000870 g DF .text 00000002 Base symdefaultvernospacedefault +00000960 g DF .text 00000002 VERY_LONG_VERSION_1 .protected symlongverSPA CEprotected +000008e0 g DF .text 00000002 Base .protected symdefaultverSPA CEprotected +00000940 g DF .text 00000002 VERY_LONG_VERSION_1 symlongverSPA CEdefault +000009e0 g DF .text 00000002 V1 .protected symshortverSPA CEprotected +00000920 g DF .text 00000002 VERY_LONG_VERSION_1 .protected symlongvernospaceprotected DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE -00001d5c R_386_RELATIVE *ABS* -00001d60 R_386_RELATIVE *ABS* -00001ec0 R_386_RELATIVE *ABS* -00001f04 R_386_RELATIVE *ABS* +00001f08 R_386_RELATIVE *ABS* 00001f0c R_386_RELATIVE *ABS* -00001f14 R_386_RELATIVE *ABS* -00001f1c R_386_RELATIVE *ABS* -00001f24 R_386_RELATIVE *ABS* -00001f2c R_386_RELATIVE *ABS* -00001f34 R_386_RELATIVE *ABS* -00001f3c R_386_RELATIVE *ABS* -00001f44 R_386_RELATIVE *ABS* -00001f4c R_386_RELATIVE *ABS* -00001f54 R_386_RELATIVE *ABS* -00001f5c R_386_RELATIVE *ABS* -00001e60 R_386_GLOB_DAT _ITM_deregisterTMCloneTable -00001e64 R_386_GLOB_DAT __cxa_finalize -00001e68 R_386_GLOB_DAT __gmon_start__ -00001e6c R_386_GLOB_DAT _Jv_RegisterClasses -00001e70 R_386_GLOB_DAT _ITM_registerTMCloneTable -00001f00 R_386_32 symdefaultvernospacedefault -00001f08 R_386_32 symdefaultvernospaceprotected -00001f10 R_386_32 symdefaultverSPA CEdefault -00001f18 R_386_32 symdefaultverSPA CEprotected -00001f20 R_386_32 symlongvernospacedefault -00001f28 R_386_32 symlongvernospaceprotected -00001f30 R_386_32 symlongverSPA CEdefault -00001f38 R_386_32 symlongverSPA CEprotected -00001f40 R_386_32 symshortvernospacedefault -00001f48 R_386_32 symshortvernospaceprotected -00001f50 R_386_32 symshortverSPA CEdefault -00001f58 R_386_32 symshortverSPA CEprotected -00001e80 R_386_JUMP_SLOT __cxa_finalize -00001e84 R_386_JUMP_SLOT __gmon_start__ +00002020 R_386_RELATIVE *ABS* +00002044 R_386_RELATIVE *ABS* +0000204c R_386_RELATIVE *ABS* +00002054 R_386_RELATIVE *ABS* +0000205c R_386_RELATIVE *ABS* +00002064 R_386_RELATIVE *ABS* +0000206c R_386_RELATIVE *ABS* +00002074 R_386_RELATIVE *ABS* +0000207c R_386_RELATIVE *ABS* +00002084 R_386_RELATIVE *ABS* +0000208c R_386_RELATIVE *ABS* +00002094 R_386_RELATIVE *ABS* +0000209c R_386_RELATIVE *ABS* +00001ff0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable +00001ff4 R_386_GLOB_DAT __cxa_finalize@GLIBC_2.1.3 +00001ff8 R_386_GLOB_DAT __gmon_start__ +00001ffc R_386_GLOB_DAT _ITM_registerTMCloneTable +00002040 R_386_32 symdefaultvernospacedefault@@Base +00002048 R_386_32 symdefaultvernospaceprotected@@Base +00002050 R_386_32 symdefaultverSPA CEdefault@@Base +00002058 R_386_32 symdefaultverSPA CEprotected@@Base +00002060 R_386_32 symlongvernospacedefault@@VERY_LONG_VERSION_1 +00002068 R_386_32 symlongvernospaceprotected@@VERY_LONG_VERSION_1 +00002070 R_386_32 symlongverSPA CEdefault@@VERY_LONG_VERSION_1 +00002078 R_386_32 symlongverSPA CEprotected@@VERY_LONG_VERSION_1 +00002080 R_386_32 symshortvernospacedefault@@V1 +00002088 R_386_32 symshortvernospaceprotected@@V1 +00002090 R_386_32 symshortverSPA CEdefault@@V1 +00002098 R_386_32 symshortverSPA CEprotected@@V1 diff --git a/scripts/t/Dpkg_Shlibs/patterns.cpp b/scripts/t/Dpkg_Shlibs/patterns.cpp index 3beee43e0..8bfcb4dad 100644 --- a/scripts/t/Dpkg_Shlibs/patterns.cpp +++ b/scripts/t/Dpkg_Shlibs/patterns.cpp @@ -75,7 +75,7 @@ namespace NSB public: ClassD(); virtual ~ClassD(); - virtual void generate_vt(const char *) const; + virtual void generate_vt(const char *) const override; }; EXPORT(ClassD::ClassD()); diff --git a/scripts/t/Dpkg_Source_Format.t b/scripts/t/Dpkg_Source_Format.t new file mode 100644 index 000000000..5a2785ea5 --- /dev/null +++ b/scripts/t/Dpkg_Source_Format.t @@ -0,0 +1,65 @@ +#!/usr/bin/perl +# +# 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, see <https://www.gnu.org/licenses/>. + +use strict; +use warnings; + +use Test::More tests => 14; + +BEGIN { + use_ok('Dpkg::Source::Format'); +} + +my $format = Dpkg::Source::Format->new(); +my @format_parts; +my $format_string; + +$format->set('4.3 (variant)'); +@format_parts = $format->get(); +is_deeply(\@format_parts, [ qw(4 3 variant) ], 'decomposition of format'); +$format_string = $format->get(); +ok($format_string eq '4.3 (variant)', 'function stringification of format'); +$format_string = "$format"; +ok($format_string eq '4.3 (variant)', 'operator stringification of format'); + +$format->set('5.5'); +$format_string = $format->get(); +ok($format_string eq '5.5', 'missing variant'); + +$format->set('6'); +$format_string = $format->get(); +ok($format_string eq '6.0', 'implied minor'); + +my %format_bogus = ( + 'a' => 'require numerical major', + '7.a'=> 'require numerical minor', + '.5' => 'require non-empty major', + '7.' => 'require non-empty minor', + '7.0 ()' => 'require non-empty variant', + '7.0 ( )' => 'require non-space variant', + '7.0 (VARIANT)' => 'require lower-case variant', + '7.6.5' => 'excess version part', +); + +foreach my $format_bogus (sort keys %format_bogus) { + eval { + $format->set($format_bogus); + }; + ok($@, $format_bogus{$format_bogus}); +}; + +# TODO: Add actual test cases. + +1; diff --git a/scripts/t/Dpkg_Source_Patch.t b/scripts/t/Dpkg_Source_Patch.t index d81a1a39d..f50f15be2 100644 --- a/scripts/t/Dpkg_Source_Patch.t +++ b/scripts/t/Dpkg_Source_Patch.t @@ -25,8 +25,8 @@ BEGIN { use_ok('Dpkg::Source::Patch'); } -my $datadir = test_get_data_path('t/Dpkg_Source_Patch'); -my $tmpdir = 't.tmp/Dpkg_Source_Patch'; +my $datadir = test_get_data_path(); +my $tmpdir = test_get_temp_path(); sub test_patch_escape { my ($name, $symlink, $patchname, $desc) = @_; diff --git a/scripts/t/Dpkg_Source_Quilt.t b/scripts/t/Dpkg_Source_Quilt.t index af0071dea..96c3be04d 100644 --- a/scripts/t/Dpkg_Source_Quilt.t +++ b/scripts/t/Dpkg_Source_Quilt.t @@ -23,7 +23,7 @@ BEGIN { use_ok('Dpkg::Source::Quilt'); } -my $datadir = test_get_data_path('t/Dpkg_Source_Quilt'); +my $datadir = test_get_data_path(); my $quilt; my (@series_got, @series_exp); diff --git a/scripts/t/Dpkg_Substvars.t b/scripts/t/Dpkg_Substvars.t index ded25ddc8..35ffd0ca5 100644 --- a/scripts/t/Dpkg_Substvars.t +++ b/scripts/t/Dpkg_Substvars.t @@ -16,7 +16,7 @@ use strict; use warnings; -use Test::More tests => 37; +use Test::More tests => 47; use Test::Dpkg qw(:paths); use Dpkg (); @@ -24,7 +24,7 @@ use Dpkg::Arch qw(get_host_arch); use_ok('Dpkg::Substvars'); -my $datadir = test_get_data_path('t/Dpkg_Substvars'); +my $datadir = test_get_data_path(); my $expected; @@ -82,6 +82,23 @@ is($s->get('binary:Version'), '1:2.3.4~5-6.7.8~nmu9+b0', 'binary:Version'); is($s->get('source:Version'), '1:2.3.4~5-6.7.8~nmu9', 'source:Version'); is($s->get('source:Upstream-Version'), '1:2.3.4~5', 'source:Upstream-Version'); +is($s->get($_), undef, 'no ' . $_) foreach qw(source:Synopsis source:Extended-Description); +$s->set_desc_substvars("short synopsis\nthis is the long\nextended text\n"); +is($s->get('source:Synopsis'), 'short synopsis', 'contents of source:Synopsis'); +is($s->get('source:Extended-Description'), "this is the long\nextended text\n", + 'contents of source:Extended-Description'); + +my %ctrl_fields = ( + 'Some-Field' => 'some-value', + 'Other-Field' => 'other-value', + 'Alter-Field' => 'alter-value', +); +is($s->get($_), undef, 'no ' . $_) foreach sort keys %ctrl_fields; +$s->set_field_substvars(\%ctrl_fields, 'ctrl'); +is($s->get('ctrl:Some-Field'), 'some-value', 'contents of ctrl:Some-Field'); +is($s->get('ctrl:Other-Field'), 'other-value', 'contents of ctrl:Other-Field'); +is($s->get('ctrl:Alter-Field'), 'alter-value', 'contents of ctrl:Alter-Field'); + # Replace stuff is($s->substvars('This is a string ${var1} with variables ${binary:Version}'), 'This is a string New value with variables 1:2.3.4~5-6.7.8~nmu9+b0', @@ -97,7 +114,7 @@ is($s->substvars('This is a string with unknown variable ${blubb}'), 'substvars missing'); delete $SIG{__WARN__}; is($output, - 'Dpkg_Substvars.t: warning: test unknown substitution variable ${blubb}' . "\n", + 'Dpkg_Substvars.t: warning: test substitution variable ${blubb} used, but is not defined' . "\n", 'missing variables warning'); # Recursive replace @@ -117,7 +134,7 @@ $SIG{__WARN__} = sub { $output .= $_[0] }; $s->warn_about_unused(); delete $SIG{__WARN__}; is($output, - 'Dpkg_Substvars.t: warning: test unused substitution variable ${var2}' . "\n", + 'Dpkg_Substvars.t: warning: test substitution variable ${var2} unused, but is defined' . "\n", 'unused variables warnings'); # Disable warnings for a certain variable diff --git a/scripts/t/Dpkg_Version.t b/scripts/t/Dpkg_Version.t index 78db7aead..69f0fecf0 100644 --- a/scripts/t/Dpkg_Version.t +++ b/scripts/t/Dpkg_Version.t @@ -20,6 +20,8 @@ use Test::More; use Dpkg::ErrorHandling; use Dpkg::IPC; +use Dpkg::Path qw(find_command); +use Dpkg::Version; report_options(quiet_warnings => 1); @@ -30,7 +32,9 @@ my @ops = ('<', '<<', 'lt', '>=', 'ge', '>', '>>', 'gt'); -plan tests => scalar(@tests) * (3 * scalar(@ops) + 4) + 30; +plan tests => scalar(@tests) * (3 * scalar(@ops) + 4) + 27; + +my $have_dpkg = find_command('dpkg'); sub dpkg_vercmp { my ($a, $cmp, $b) = @_; @@ -57,8 +61,6 @@ sub obj_vercmp { return $a gt $b if $cmp eq 'gt'; } -use_ok('Dpkg::Version'); - my $truth = { '-1' => { '<<' => 1, 'lt' => 1, @@ -128,12 +130,6 @@ ok(!$ver->is_native(), 'upstream version w/ revision is not native'); $ver = Dpkg::Version->new('1.0-1.0-1'); ok(!$ver->is_native(), 'upstream version w/ dash and revision is not native'); -# Other tests -$ver = Dpkg::Version->new('1.2.3-4'); -is($ver || 'default', '1.2.3-4', 'bool eval returns string representation'); -$ver = Dpkg::Version->new('0'); -is($ver || 'default', 'default', 'bool eval of version 0 is still false...'); - # Comparisons foreach my $case (@tests) { my ($a, $b, $res) = split ' ', $case; @@ -150,11 +146,21 @@ foreach my $case (@tests) { if ($truth->{$res}{$op}) { ok(version_compare_relation($a, $norm_op, $b), "$a $op $b => true"); ok(obj_vercmp($va, $op, $vb), "Dpkg::Version($a) $op Dpkg::Version($b) => true"); - ok(dpkg_vercmp($a, $op, $b), "dpkg --compare-versions -- $a $op $b => true"); + + SKIP: { + skip 'dpkg not available', 1 if not $have_dpkg; + + ok(dpkg_vercmp($a, $op, $b), "dpkg --compare-versions -- $a $op $b => true"); + } } else { ok(!version_compare_relation($a, $norm_op, $b), "$a $op $b => false"); ok(!obj_vercmp($va, $op, $vb), "Dpkg::Version($a) $op Dpkg::Version($b) => false"); - ok(!dpkg_vercmp($a, $op, $b), "dpkg --compare-versions -- $a $op $b => false"); + + SKIP: { + skip 'dpkg not available', 1 if not $have_dpkg; + + ok(!dpkg_vercmp($a, $op, $b), "dpkg --compare-versions -- $a $op $b => false"); + } } } } diff --git a/scripts/t/dpkg_buildpackage.t b/scripts/t/dpkg_buildpackage.t index 2b4345539..dd4f67a6f 100644 --- a/scripts/t/dpkg_buildpackage.t +++ b/scripts/t/dpkg_buildpackage.t @@ -17,7 +17,7 @@ use strict; use warnings; use Test::More; -use Test::Dpkg qw(:needs test_neutralize_checksums); +use Test::Dpkg qw(:needs :paths test_neutralize_checksums); use File::Spec::Functions qw(rel2abs); use File::Compare; @@ -34,7 +34,7 @@ plan tests => 12; my $srcdir = rel2abs($ENV{srcdir} || '.'); my $datadir = "$srcdir/t/dpkg_buildpackage"; -my $tmpdir = 't.tmp/dpkg_buildpackage'; +my $tmpdir = test_get_temp_path(); $ENV{$_} = rel2abs($ENV{$_}) foreach qw(DPKG_DATADIR DPKG_ORIGINS_DIR); @@ -48,8 +48,6 @@ delete $ENV{SOURCE_DATE_EPOCH}; # Delete other variables that can affect the tests. delete $ENV{$_} foreach grep { m/^DEB_/ } keys %ENV; -make_path($tmpdir); - chdir $tmpdir; my $tmpl_format = <<'TMPL_FORMAT'; diff --git a/scripts/t/dpkg_buildpackage/test-source_0_all.changes b/scripts/t/dpkg_buildpackage/test-source_0_all.changes index ebe0890e2..c6c444f45 100644 --- a/scripts/t/dpkg_buildpackage/test-source_0_all.changes +++ b/scripts/t/dpkg_buildpackage/test-source_0_all.changes @@ -1,7 +1,7 @@ Format: 1.8 Date: Thu, 30 Jun 2016 20:15:12 +0200 Source: test-source -Binary: test-binary-all test-binary-any +Binary: test-binary-all Architecture: all Version: 0 Distribution: unstable @@ -10,7 +10,6 @@ Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org> Description: test-binary-all - architecture independent binary package - test-binary-any - architecture dependent binary package Closes: 12345 Changes: test-source (0) unstable; urgency=low diff --git a/scripts/t/dpkg_buildpackage/test-source_0_any.changes b/scripts/t/dpkg_buildpackage/test-source_0_any.changes index 098277f14..d67460cba 100644 --- a/scripts/t/dpkg_buildpackage/test-source_0_any.changes +++ b/scripts/t/dpkg_buildpackage/test-source_0_any.changes @@ -1,7 +1,7 @@ Format: 1.8 Date: Thu, 30 Jun 2016 20:15:12 +0200 Source: test-source -Binary: test-binary-all test-binary-any +Binary: test-binary-any Architecture: amd64 Version: 0 Distribution: unstable @@ -9,7 +9,6 @@ Urgency: low Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org> Description: - test-binary-all - architecture independent binary package test-binary-any - architecture dependent binary package Closes: 12345 Changes: diff --git a/scripts/t/dpkg_buildpackage/test-source_0_source.changes b/scripts/t/dpkg_buildpackage/test-source_0_source.changes index 95ea1be6a..8c2f3d1e3 100644 --- a/scripts/t/dpkg_buildpackage/test-source_0_source.changes +++ b/scripts/t/dpkg_buildpackage/test-source_0_source.changes @@ -1,16 +1,12 @@ Format: 1.8 Date: Thu, 30 Jun 2016 20:15:12 +0200 Source: test-source -Binary: test-binary-all test-binary-any Architecture: source Version: 0 Distribution: unstable Urgency: low Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org> -Description: - test-binary-all - architecture independent binary package - test-binary-any - architecture dependent binary package Closes: 12345 Changes: test-source (0) unstable; urgency=low diff --git a/scripts/t/dpkg_source.t b/scripts/t/dpkg_source.t index cdbedceb3..a0c343846 100644 --- a/scripts/t/dpkg_source.t +++ b/scripts/t/dpkg_source.t @@ -17,7 +17,7 @@ use strict; use warnings; use Test::More tests => 8; -use Test::Dpkg qw(test_neutralize_checksums); +use Test::Dpkg qw(:paths test_neutralize_checksums); use File::Spec::Functions qw(rel2abs); use File::Compare; @@ -28,15 +28,13 @@ use Dpkg::Substvars; my $srcdir = rel2abs($ENV{srcdir} || '.'); my $datadir = "$srcdir/t/dpkg_source"; -my $tmpdir = 't.tmp/dpkg_source'; +my $tmpdir = test_get_temp_path(); $ENV{$_} = rel2abs($ENV{$_}) foreach qw(DPKG_DATADIR DPKG_ORIGINS_DIR); # Delete variables that can affect the tests. delete $ENV{SOURCE_DATE_EPOCH}; -make_path($tmpdir); - chdir $tmpdir; my $tmpl_format = <<'TMPL_FORMAT'; diff --git a/scripts/t/merge_changelogs/ch-a b/scripts/t/merge_changelogs/ch-a index 02dad9397..ff5419d8d 100644 --- a/scripts/t/merge_changelogs/ch-a +++ b/scripts/t/merge_changelogs/ch-a @@ -90,3 +90,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/merge_changelogs/ch-b b/scripts/t/merge_changelogs/ch-b index 9eb78699b..a74145f82 100644 --- a/scripts/t/merge_changelogs/ch-b +++ b/scripts/t/merge_changelogs/ch-b @@ -85,3 +85,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/merge_changelogs/ch-merged b/scripts/t/merge_changelogs/ch-merged index c995f1cf9..29a985d16 100644 --- a/scripts/t/merge_changelogs/ch-merged +++ b/scripts/t/merge_changelogs/ch-merged @@ -111,3 +111,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/merge_changelogs/ch-merged-basic b/scripts/t/merge_changelogs/ch-merged-basic index 6b054c353..f89fe1123 100644 --- a/scripts/t/merge_changelogs/ch-merged-basic +++ b/scripts/t/merge_changelogs/ch-merged-basic @@ -134,3 +134,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/merge_changelogs/ch-merged-pr b/scripts/t/merge_changelogs/ch-merged-pr index 467211c80..a58f09779 100644 --- a/scripts/t/merge_changelogs/ch-merged-pr +++ b/scripts/t/merge_changelogs/ch-merged-pr @@ -104,3 +104,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/merge_changelogs/ch-merged-pr-basic b/scripts/t/merge_changelogs/ch-merged-pr-basic index 61f46cd69..773361253 100644 --- a/scripts/t/merge_changelogs/ch-merged-pr-basic +++ b/scripts/t/merge_changelogs/ch-merged-pr-basic @@ -136,3 +136,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/merge_changelogs/ch-old b/scripts/t/merge_changelogs/ch-old index 12ee224c1..5ff7dd366 100644 --- a/scripts/t/merge_changelogs/ch-old +++ b/scripts/t/merge_changelogs/ch-old @@ -83,3 +83,5 @@ test (1.0-1) unstable; urgency=low * Initial release. (Closes: #XXXXXX) -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200 + +vim: et diff --git a/scripts/t/mk.t b/scripts/t/mk.t index e711270c7..2e62cf5cf 100644 --- a/scripts/t/mk.t +++ b/scripts/t/mk.t @@ -16,7 +16,9 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 9; +use Test::Dpkg qw(:paths); + use File::Spec::Functions qw(rel2abs); use Dpkg (); @@ -25,7 +27,7 @@ use Dpkg::IPC; use Dpkg::Vendor; my $srcdir = $ENV{srcdir} || '.'; -my $datadir = "$srcdir/t/mk"; +my $datadir = test_get_data_path(); # Turn these into absolute names so that we can safely switch to the test # directory with «make -C». @@ -80,6 +82,7 @@ $ENV{"TEST_$_"} = $buildflag{$_} foreach keys %buildflag; test_makefile('buildflags.mk'); my %buildtools = ( + AS => 'as', CPP => 'gcc -E', CC => 'gcc', CXX => 'g++', @@ -89,6 +92,12 @@ my %buildtools = ( F77 => 'f77', FC => 'f77', LD => 'ld', + STRIP => 'strip', + OBJCOPY => 'objcopy', + OBJDUMP => 'objdump', + NM => 'nm', + AR => 'ar', + RANLIB => 'ranlib', PKG_CONFIG => 'pkg-config', ); @@ -100,6 +109,12 @@ foreach my $tool (keys %buildtools) { } test_makefile('buildtools.mk'); +$ENV{DEB_BUILD_OPTIONS} = 'nostrip'; +$ENV{TEST_STRIP} = ':'; +$ENV{TEST_STRIP_FOR_BUILD} = ':'; +test_makefile('buildtools.mk'); +delete $ENV{DEB_BUILD_OPTIONS}; + foreach my $tool (keys %buildtools) { delete $ENV{${tool}}; delete $ENV{"${tool}_FOR_BUILD"}; @@ -108,5 +123,7 @@ foreach my $tool (keys %buildtools) { test_makefile('pkg-info.mk'); test_makefile('vendor.mk'); +test_makefile('vendor-v0.mk'); +test_makefile('vendor-v1.mk'); 1; diff --git a/scripts/t/mk/buildtools.mk b/scripts/t/mk/buildtools.mk index 8bba96430..0077791b5 100644 --- a/scripts/t/mk/buildtools.mk +++ b/scripts/t/mk/buildtools.mk @@ -1,6 +1,8 @@ include $(srcdir)/mk/buildtools.mk test: + test "$(AS)" = "$(TEST_AS)" + test "$(AS_FOR_BUILD)" = "$(TEST_AS_FOR_BUILD)" test "$(CC)" = "$(TEST_CC)" test "$(CC_FOR_BUILD)" = "$(TEST_CC_FOR_BUILD)" test "$(CXX)" = "$(TEST_CXX)" @@ -17,5 +19,17 @@ test: test "$(FC_FOR_BUILD)" = "$(TEST_FC_FOR_BUILD)" test "$(LD)" = "$(TEST_LD)" test "$(LD_FOR_BUILD)" = "$(TEST_LD_FOR_BUILD)" + test "$(STRIP)" = "$(TEST_STRIP)" + test "$(STRIP_FOR_BUILD)" = "$(TEST_STRIP_FOR_BUILD)" + test "$(OBJCOPY)" = "$(TEST_OBJCOPY)" + test "$(OBJCOPY_FOR_BUILD)" = "$(TEST_OBJCOPY_FOR_BUILD)" + test "$(OBJDUMP)" = "$(TEST_OBJDUMP)" + test "$(OBJDUMP_FOR_BUILD)" = "$(TEST_OBJDUMP_FOR_BUILD)" + test "$(NM)" = "$(TEST_NM)" + test "$(NM_FOR_BUILD)" = "$(TEST_NM_FOR_BUILD)" + test "$(AR)" = "$(TEST_AR)" + test "$(AR_FOR_BUILD)" = "$(TEST_AR_FOR_BUILD)" + test "$(RANLIB)" = "$(TEST_RANLIB)" + test "$(RANLIB_FOR_BUILD)" = "$(TEST_RANLIB_FOR_BUILD)" test "$(PKG_CONFIG)" = "$(TEST_PKG_CONFIG)" test "$(PKG_CONFIG_FOR_BUILD)" = "$(TEST_PKG_CONFIG_FOR_BUILD)" diff --git a/scripts/t/mk/vendor-v0.mk b/scripts/t/mk/vendor-v0.mk new file mode 100644 index 000000000..602a8c63a --- /dev/null +++ b/scripts/t/mk/vendor-v0.mk @@ -0,0 +1,6 @@ +dpkg_vendor_derives_from = $(dpkg_vendor_derives_from_v0) + +include $(srcdir)/mk/vendor.mk + +test: + test "$(shell $(call dpkg_vendor_derives_from,debian))" = "yes" diff --git a/scripts/t/mk/vendor-v1.mk b/scripts/t/mk/vendor-v1.mk new file mode 100644 index 000000000..11c1314ef --- /dev/null +++ b/scripts/t/mk/vendor-v1.mk @@ -0,0 +1,6 @@ +include $(srcdir)/mk/vendor.mk + +dpkg_vendor_derives_from = $(dpkg_vendor_derives_from_v1) + +test: + test "$(call dpkg_vendor_derives_from,debian)" = "yes" diff --git a/scripts/t/mk/vendor.mk b/scripts/t/mk/vendor.mk index 371b39c87..4e0d9ff89 100644 --- a/scripts/t/mk/vendor.mk +++ b/scripts/t/mk/vendor.mk @@ -3,3 +3,4 @@ include $(srcdir)/mk/vendor.mk test: test "$(DEB_VENDOR)" = "Debian" test "$(DEB_PARENT_VENDOR)" = "" + test "$(shell $(call dpkg_vendor_derives_from,debian))" = "yes" |