Raphael Hertzog [Thu, 21 Feb 2008 00:52:49 +0000 (01:52 +0100)]
dpkg-source: more cleanup
* scripts/dpkg-source.pl: Replace several implicit fork made with
open() by fork_and_exec().
* scripts/dpkg-source.pl: Remove another chunk of unused code.
Raphael Hertzog [Wed, 20 Feb 2008 23:28:10 +0000 (00:28 +0100)]
Adjust Dpkg::Changelog::parse_changelog() search list of parser
* scripts/Dpkg/Changelog.pm (parse_changelog): Fallback
into /usr/lib/dpkg/parsechangelog to find a changelog parser
in case $dpkglibdir points to another directory (for example
when DPKG_DATADIR is manually set).
Raphael Hertzog [Wed, 20 Feb 2008 23:12:40 +0000 (00:12 +0100)]
Create Dpkg::Source::CompressedFile as spinoff of Dpkg::Source::Compressor
* scripts/Dpkg/Source/Compressor.pm: Drom from this object
all filename related code and move it ...
* scripts/Dpkg/Source/CompressedFile.pm: ...here. This
object is a named file and it handles either explicit
compression (call to set_compression()) or implicit compression
(compression type is guessed from the filename). It offers
open_for_write() and open_for_read() to write into/read from
a data stream that is compressed/uncompressed on the fly.
* scripts/Dpkg/Source/Archiver.pm: Make it based on
CompressedFile and simplify code.
* scripts/dpkg-source.pl: Adapt code to the new interface of
the Compressor object.
* scripts/Makefile.am, scripts/po/POTFILES.in: register new
file CompressedFile.pm.
Raphael Hertzog [Wed, 20 Feb 2008 19:55:19 +0000 (20:55 +0100)]
Dpkg::Source: don't handle the compression level explicitely
* scripts/Dpkg/Source/Archiver.pm: Drop set_compression_level() and always
use the default compression level (from Dpkg::Source::Compressor).
* scripts/Dpkg/Source/Compressor.pm: New set_default_compression() and
set_default_compression_level() to change the default values of those
parameters.
* scripts/dpkg-source.pl: Change the default compression and the default
compression level globally. Replace forkgzipread(), forkgzipwrite() and
reapgzip() by direct usage of Dpkg::Source::Compressor in a way that it
inherits the compression level automatically. Also simplify some
subprocess execution by using Dpkg::IPC::fork_and_exec().
* scripts/Dpkg.pm: Allow overriding $pkgdatadir
with $ENV{DPKG_DATADIR}.
* scripts/Makefile.am (check): Use DPKG_DATADIR.
* debian/rules: Remove hack to copy data files
to build directory.
dpkg-buildpackage: Set a set of compiler flags for a build
* scripts/dpkg-buildpackage.pl: Set a set of environment variables
for setting compiler and linker options, unless already set in the
environment. See https://wiki.ubuntu.com/DistCompilerFlags for
background information.
* man/dpkg-buildpackage.pl: Document the new behaviour.
Based on a patch by Matthias Klose <doko@cs.tu-berlin.de>
Guillem Jover [Sun, 17 Feb 2008 04:34:41 +0000 (06:34 +0200)]
dpkg.cfg: Reintroduce 'no-debsig' option
This avoids failing to install any package when debsig-verify is installed,
as distributions do not use embedded signatures in packages. Closes: #311843
Raphael Hertzog [Sat, 16 Feb 2008 22:20:35 +0000 (23:20 +0100)]
Handling of compression level in dpkg-source
* scripts/Dpkg/Source/Archiver.pm (create): Forward properly the
compression level.
* scripts/Dpkg/Source/Archiver.pm (extract): Correct parameters in
an error message.
* scripts/dpkg-source.pl: Take into account the compression level
when generating a new tarball.
Raphael Hertzog [Sat, 16 Feb 2008 19:20:36 +0000 (20:20 +0100)]
Dpkg::Source::Archiver: new module to work with tar archives
* scripts/Dpkg/Source/Archive.pm: New module handling tar
archive creation and extraction.
* scripts/dpkg-source.pl: Updated and simplified to use the new module.
* scripts/Makefile.am: Add new modules to dist tarball.
* scripts/po/POTFILES.in: Add new module in list of files to scan for
translations.
* scripts/Dpkg/Compression.pm: Add function
get_compression_from_filename() to identify the compression
type from the file extension. Returns undef in case of failure.
* scripts/Dpkg/Source/Compressor.pm: Simplify some code
by using the new get_compression_from_filename().
Dpkg::IPC: Add a sanitiy_check for options of fork_and_exec
* scripts/Dpkg/IPC.pm (_sanity_check_opts): Check for some
probable errors in options.
(fork_and_exec): Apply _sanity_check_opts to the options to
catch some errors that might go unnoticed otherwise and to
error out early for some other errors.
Dpkg::IPC: New {to,from}_string options for fork_and_exec
* scripts/Dpkg/IPC.pm (fork_and_exec): Add new options
{to,from}_string. For symmetry reasons both options take
a scalar reference, even though this is really only
necessary for to_string. to_string implies the
wait_child option.
Dpkg::IPC: avoid surprising execution via the shell
* scripts/Dpkg/IPC.pm (fork_and_exec): If @prog only
contains one entry exec() might execute it via the
shell if it deems it necessary. This is not intended,
so avoid this by giving $prog[0] explicetly as the
program to execute.
Raphael Hertzog [Fri, 15 Feb 2008 18:34:32 +0000 (19:34 +0100)]
Simplify Dpkg::Source::Compressor by using the extended fork_and_exec()
* scripts/Dpkg/Source/Compressor.pm: Replace the multiple compress_*
functions by a single compress() function that accepts the same
parameters than fork_and_exec(). The exec parameter is replaced
with the right compressor/decompressor invocation, and some other
parameters have default values.
Same for uncompress_* replaced by uncompress().
* scripts/dpkg-source.pl: Update accordingly to use the new syntax.
Raphael Hertzog [Fri, 15 Feb 2008 18:30:21 +0000 (19:30 +0100)]
Dpkg::IPC: extend fork_and_exec() to create pipes on request
* scripts/Dpkg/IPC.pm (fork_and_exec): Now accept from_pipe and
to_pipe parameters that should point to a scalar reference. The
scalar will be set with the filehandle of the other side of the
created pipe.
* scripts/Dpkg/Source/Compressor.pm: This new module knows how
to compress/uncompress streams of data. It supports all the
compression types defined in Dpkg::Compression.
Raphael Hertzog [Fri, 15 Feb 2008 14:45:10 +0000 (15:45 +0100)]
Dpkg::IPC: new module to handle common IPC
* scripts/Dpkg/IPC.pm: New module handling IPC. Started with
fork_and_exec() and wait_child(). STDIN/STDOUT of the child
process can be easily redirected to a file or any other
filehandle.
* scripts/dpkg-genchanges.pl, scripts/dpkg-source.pl: Use new
Dpkg::Checksums module. Adds new 'Checksums-{Sha1,Sha256}' field
to .changes and .dsc files. Increase changes format to 1.8.
* scripts/Dpkg/Source/VCS/git.pm(read_git_config): Simplify
by setting $/ = "\0" instead of splitting on \n, which
separates keys and values, but can also occour in the
values themself.
Raphael Hertzog [Sun, 3 Feb 2008 17:54:00 +0000 (18:54 +0100)]
dpkg-shlibdeps: some accuracy improvements for warnings about unused libraries
* scripts/dpkg-shlibdeps.pl: Handle better the case when the
library found has a different soname than the one used to look up
the library file. Properly affect symbols coming from it to the
soname wanted by the binary, thus avoiding invalid warnings about
unused library.
Justin Pryzby [Wed, 30 Jan 2008 04:35:30 +0000 (06:35 +0200)]
s-s-d: Documentation improvements
Cosmetic fixes to start-stop-daemon output and man page. Document
that --chuid will change the group even if it has not been specified.
Add EXIT STATUS and EXAMPLE sections to man page.
Raphael Hertzog [Sat, 19 Jan 2008 20:53:18 +0000 (21:53 +0100)]
dpkg-buildpackage: add a new -R option and allow parameters in -r
* scripts/dpkg-buildpackage.pl: Add a new -R option to be able to replace
"debian/rules" by something else. The replacement command can contain
parameters (and thus spaces). Fix -r option to also accept parameters.
* man/dpkg-buildpackage.1: Document the new option and the changed
behaviour of -r.
Raphael Hertzog [Sun, 27 Jan 2008 16:53:05 +0000 (17:53 +0100)]
dpkg-gensymbols: be more explicit in warning about new/lost libraries
* scripts/Dpkg/Shlibs/SymbolFile.pm: Replace has_new_libs(),
has_lost_libs(), has_new_symbols() and has_lost_symbols() by
corresponding get_* functions.
* scripts/dpkg-gensymbsols.pl: Display list of new/lost libs. Also
display list of lost symbols when wildcards symbols have been
used.
* scripts/t/200_Dpkg_Shlibs.t: Adjust test suite to API change.
Raphael Hertzog [Sat, 26 Jan 2008 18:25:31 +0000 (19:25 +0100)]
dpkg-gensymbols: skip directories during scan of package build dir
* scripts/dpkg-gensymbols: Don't scan directories which are
symlinks. They might point outside of the package build dir which
results in addition of libraries which are not in the package.
The libc6 package on amd64 is affected with a symlink "lib64" ->
"/lib".
Raphael Hertzog [Sat, 19 Jan 2008 21:55:01 +0000 (22:55 +0100)]
dpkg-checkbuilddeps: add -d and -c options to override build-depends/conflicts
* scripts/dpkg-checkbuilddeps.pl: Add support of options -d and -c to use
build dependencies/conflicts given on the command line instead of those
retrieved from debian/control.
* man/dpkg-checkbuilddeps.1: Document the new options.
Raphael Hertzog [Thu, 24 Jan 2008 10:32:54 +0000 (11:32 +0100)]
Dpkg::Shlibs::SymbolFile: handles multiple #include of the same file
* scripts/Dpkg/Shlibs/SymbolFile.pm (load): Remove the loaded file
from the %$seen hash at the end so that it's possible to include
multiple times the same file (at the same level and not from any
nested file obviously).
Raphael Hertzog [Tue, 22 Jan 2008 17:19:18 +0000 (18:19 +0100)]
Remove the IO layer ":utf8" that re-encodes in utf8
* scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl,
scripts/dpkg-source.pl: Remove the IO-layer that converts to
UTF-8. It's not as smart as I expected.