diff -Nru dpkg-repack-1.41/debian/changelog dpkg-repack-1.43/debian/changelog --- dpkg-repack-1.41/debian/changelog 2015-04-11 15:26:31.000000000 +0000 +++ dpkg-repack-1.43/debian/changelog 2016-02-29 08:03:10.000000000 +0000 @@ -1,3 +1,47 @@ +dpkg-repack (1.43) unstable; urgency=medium + + * Fix variable name botched in a last-minute rebase. + * Add very basic unit test to check syntax failures. + + -- Guillem Jover Mon, 29 Feb 2016 09:03:09 +0100 + +dpkg-repack (1.42) unstable; urgency=medium + + * Use https for the debian/copyright Format URL. + * Remove ancient versioned Build-Depends on dpkg. + * Do not add spurious newlines to the binary control file. + * Ignore case when comparing all field names, although «dpkg -s» already + normalizes them for known ones. + * Use a proper non-deterministic temporary directory per package. This fixes + a possible security issue, and using --generate with multiple packages. + * Include the package name in the temporary directory, so that they + are easier to distinguish when operating on multiple packages with + --generate. + * Check immediately if we cannot get any package control information. + * Switch to use Dpkg::Control to handle the control data. Add a dependency + on libdpkg-perl. + * Add basic autopkgtest test cases. + * When using --generate, also print the error summary if the tree might + be broken due to processing errors. + * Automatically use fakeroot if available and not running as root. + * Add fakeroot to a Suggests field. + * Rename packagename to package-name in --help output. + * Remove duplicated program name prefix in generate Info message. + Thanks to Brian Beffa . + * Remove duplicated newline in Warn message. + Thanks to Brian Beffa . + * Fix grammatical errors and typos in man page and --help output. + Thanks to Brian Beffa . + * Add a --tag option to select what to mark as being repackaged. + Based on a patch by Brian Beffa . Closes: #788628 + * Add a --tag value to mark the package version as repackaged. + Closes: #788627 + * Switch git repository URLs from git:// to https:// in README and + debian/control Vcs-Git field. + * Bump Standard-Version to 3.9.7 (no changed needed). + + -- Guillem Jover Sun, 28 Feb 2016 23:10:41 +0100 + dpkg-repack (1.41) unstable; urgency=low * Actually fix the blank line insertion for the descriptor mangling. diff -Nru dpkg-repack-1.41/debian/control dpkg-repack-1.43/debian/control --- dpkg-repack-1.41/debian/control 2014-11-26 18:44:03.000000000 +0000 +++ dpkg-repack-1.43/debian/control 2016-02-29 08:02:46.000000000 +0000 @@ -1,17 +1,21 @@ Source: dpkg-repack Section: admin Priority: optional -Build-Depends: debhelper (>= 9), dpkg (>= 1.9.0) Maintainer: Dpkg Developers Uploaders: Guillem Jover -Standards-Version: 3.9.6 +Standards-Version: 3.9.7 Vcs-Browser: https://anonscm.debian.org/cgit/dpkg/dpkg-repack.git -Vcs-Git: git://anonscm.debian.org/dpkg/dpkg-repack.git +Vcs-Git: https://anonscm.debian.org/git/dpkg/dpkg-repack.git Homepage: https://wiki.debian.org/Teams/Dpkg +Build-Depends: + dpkg-dev (>= 1.17.14), + debhelper (>= 9.20141010), + libtest-strict-perl , Package: dpkg-repack Architecture: all -Depends: ${misc:Depends}, ${perl:Depends} +Depends: ${misc:Depends}, ${perl:Depends}, libdpkg-perl +Suggests: fakeroot Description: Debian package archiving tool dpkg-repack creates a .deb file out of a package that has already been installed. If any changes have been made to the package while it was diff -Nru dpkg-repack-1.41/debian/copyright dpkg-repack-1.43/debian/copyright --- dpkg-repack-1.41/debian/copyright 2015-04-11 15:26:31.000000000 +0000 +++ dpkg-repack-1.43/debian/copyright 2016-02-28 22:27:56.000000000 +0000 @@ -1,9 +1,9 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files: * Copyright: Copyright © 1996-2009 Joey Hess - Copyright © 2012,2014-2015 Guillem Jover + Copyright © 2012,2014-2016 Guillem Jover License: GPL-2+ 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 diff -Nru dpkg-repack-1.41/debian/rules dpkg-repack-1.43/debian/rules --- dpkg-repack-1.41/debian/rules 2014-11-26 04:45:46.000000000 +0000 +++ dpkg-repack-1.43/debian/rules 2016-02-29 08:02:46.000000000 +0000 @@ -13,6 +13,11 @@ binary-indep: dh_testroot dh_prep + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + prove +endif + dh_install dh_installdocs dh_installchangelogs diff -Nru dpkg-repack-1.41/debian/tests/control dpkg-repack-1.43/debian/tests/control --- dpkg-repack-1.41/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ dpkg-repack-1.43/debian/tests/control 2015-07-22 19:11:19.000000000 +0000 @@ -0,0 +1,2 @@ +Tests: repack +Depends: @, fakeroot diff -Nru dpkg-repack-1.41/debian/tests/repack dpkg-repack-1.43/debian/tests/repack --- dpkg-repack-1.41/debian/tests/repack 1970-01-01 00:00:00.000000000 +0000 +++ dpkg-repack-1.43/debian/tests/repack 2015-07-22 19:11:19.000000000 +0000 @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e +set -u + +cmp_ctrlfile() +{ + local pkg=$1 + local ctrl=$2 + + dpkg-query --control-show $pkg $ctrl >$ADTTMP/$pkg-inst.$ctrl + dpkg-deb --info $ADTTMP/${pkg}_*.deb $ctrl >$ADTTMP/$pkg-pack.$ctrl + diff -u $ADTTMP/$pkg-inst.$ctrl $ADTTMP/$pkg-pack.$ctrl +} + +cmp_listfile() +{ + local pkg=$1 + local ctrl=$2 + + dpkg-query --listfiles $pkg | sort >$ADTTMP/$pkg-inst.list + dpkg-deb --fsys-tarfile $ADTTMP/${pkg}_*.deb | tar -tf - | cut -c2- \ + | sort >$ADTTMP/$pkg-pack.list + diff -u $ADTTMP/$pkg-inst.list $ADTTMP/$pkg-pack.list +} + +test_pkgs="dpkg dpkg-repack" + +cd $ADTTMP +fakeroot -u dpkg-repack $test_pkgs +cd $OLDPWD + +for pkg in $test_pkgs; do + for ctrl in $(dpkg-query --control-list $pkg); do + cmp_ctrlfile $pkg $ctrl + done +done + +cmp_ctrlfile dpkg conffiles + +# FIXME: check control file +# FIXME: check diverted files +# FIXME: check obsolete conffiles +# FIXME: check --generate +# FIXME: check --arch +# FIXME: check --deb-option +# FIXME: check --root diff -Nru dpkg-repack-1.41/dpkg-repack dpkg-repack-1.43/dpkg-repack --- dpkg-repack-1.41/dpkg-repack 2015-04-11 15:23:09.000000000 +0000 +++ dpkg-repack-1.43/dpkg-repack 2016-02-29 08:02:18.000000000 +0000 @@ -3,7 +3,7 @@ # dpkg-repack puts humpty-dumpty back together again. # # Copyright © 1996-2006 Joey Hess -# Copyright © 2012,2014-2015 Guillem Jover +# Copyright © 2012,2014-2016 Guillem Jover # # 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 @@ -22,341 +22,352 @@ use warnings; use File::stat; +use File::Temp; +use Dpkg::Path qw(find_command); +use Dpkg::Control; +use Dpkg::Control::Fields; use Getopt::Long; -my $VERSION = '1.41'; +my $VERSION = '1.43'; my $error_flag; -my $dirty_flag; -my $build_dir; my $rootdir; my $arch; my @deb_options; my $generate; +my $tags = ''; +my %tag = ( + description => 1, + version => 0, +); sub Syntax { - print { *STDERR } < Take package from filesystem rooted on . - --arch= Force the parch to be built for architecture . + --arch= Force the package to be built for architecture . --generate Generate build directory but do not build deb. + --tag= Tag the package as being repackaged. + Types: none, description, version, all. -d, --deb-option=