[debsums] 148/184: Remove debsums_gen from package (Closes: #640296)

Axel Beckert abe at deuxchevaux.org
Mon Mar 2 21:21:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository debsums.

commit 3114a1f4b98b4d60bd60a002bb459b60ca176540
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date:   Mon Jun 18 16:58:35 2012 -0700

    Remove debsums_gen from package (Closes: #640296)
    
    * Remove debsums_gen from package (Closes: #640296)
    * Remove the obsolete 90debsums apt configuration file on install and
      make the keep option to generate md5sums file using debsums a noop
      - Add dependency on dpkg version 1.16.3, which generates md5sums
---
 debian/changelog  |  9 +++++++
 debian/control    |  2 +-
 debian/postinst   | 20 +++++++++-------
 debsums           |  5 +---
 debsums_gen       | 70 -------------------------------------------------------
 man/debsums_gen.8 | 52 -----------------------------------------
 6 files changed, 22 insertions(+), 136 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3415a95..40460e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+debsums (2.0.52) UNRELEASED; urgency=low
+
+  * Remove debsums_gen from package (Closes: #640296)
+  * Remove the obsolete 90debsums apt configuration file on install and
+    make the keep option to generate md5sums file using debsums a noop
+    - Add dependency on dpkg version 1.16.3, which generates md5sums
+
+ -- Ryan Niebur <ryan at debian.org>  Mon, 18 Jun 2012 16:53:09 -0700
+
 debsums (2.0.51) unstable; urgency=low
 
   * Support dpkg multiarch from version 1.16.2~wipmultiarch, which has
diff --git a/debian/control b/debian/control
index 6d02748..b27d807 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Vcs-Browser: http://git.debian.org/?p=collab-maint/debsums.git;a=summary
 
 Package: debsums
 Architecture: all
-Depends: perl (>= 5.8.0-3), ucf (>= 0.28), libfile-fnmatch-perl, libdpkg-perl, ${misc:Depends}
+Depends: perl (>= 5.8.0-3), ucf (>= 0.28), libfile-fnmatch-perl, libdpkg-perl, dpkg (>= 1.16.3), ${misc:Depends}
 Description: tool for verification of installed package files against MD5 checksums
  debsums can verify the integrity of installed package files against
  MD5 checksums installed by the package, or generated from a .deb
diff --git a/debian/postinst b/debian/postinst
index a4b0b5f..025c5c1 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -19,16 +19,18 @@ set -e
 APT_CONF=/etc/apt/apt.conf.d/90debsums
 case "$1" in
     configure)
-        db_get debsums/apt-autogen || true
-        APT_CONF_TMP=`tempfile`
-        chmod 644 $APT_CONF_TMP
-        if [ "$RET" != true ]; then
-            echo -n '//' > $APT_CONF_TMP
+        if [ -f $APT_CONF ]; then
+            mv $APT_CONF ${APT_CONF}.bak
+        fi
+        for ext in .ucf-new .ucf-old .ucf-dist; do
+          rm -f $APT_CONF$ext
+        done
+        if which ucf >/dev/null; then
+          ucf --purge $APT_CONF
+        fi
+        if which ucfr >/dev/null; then
+          ucfr --purge debsums $APT_CONF
         fi
-        echo 'DPkg::Post-Invoke { "if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi"; };' >> $APT_CONF_TMP
-        ucf --debconf-ok $APT_CONF_TMP $APT_CONF
-        rm -f $APT_CONF_TMP
-        ucfr debsums $APT_CONF
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debsums b/debsums
index f417da1..fdde1d9 100755
--- a/debsums
+++ b/debsums
@@ -230,7 +230,6 @@ if ($gen_opt)
 	if $generate{all} and $generate{missing};
 
     $generate{missing}++ unless $generate{all} or $generate{missing};
-    $generate{keep}++    if $generate{nocheck};
 
     # ensure generated files are world readable
     umask 022;
@@ -708,9 +707,7 @@ for (@ARGV)
 
 	if ($generate{keep})
 	{
-	    my $target = md5sums_path($pack);
-	    copy $sums, $target
-		or die "$self: can't copy sums to $target ($!)\n";
+            warn "$self: the --generate=keep option has been removed and does nothing."
 	}
     }
 
diff --git a/debsums_gen b/debsums_gen
deleted file mode 100755
index 5bb3bd1..0000000
--- a/debsums_gen
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh
-# Generate Checksums
-# Christoph Lameter <clameter at debian.org> October 19, 1997
-#
-# Modified January 30, 1999 by Ben Collins - added ability to generate
-# md5sums for specified packages on command line. Also added -l option for
-# listing packages with no md5sums file, and a -f option for overwriting
-# the md5sums file on listed packages
-
-cd /
-
-if [ "$1" = "-l" ]
-then
-    echo "Checking for packages without md5sums list "
-    for i in /var/lib/dpkg/info/*.list
-    do
-	PACKAGE="`expr $i : '/var/lib/dpkg/info/\(.*\)\.list'`"
-	if [ ! -f /var/lib/dpkg/info/$PACKAGE.md5sums ]
-	then
-	    echo -n "$PACKAGE "
-	fi
-    done
-    echo
-    echo done.
-    exit 0
-fi
-
-FORCE=""
-if [ "$1" = "-f" ]
-then
-    FORCE="(forcing) "
-    shift
-fi
-
-if [ "$1" ]
-then
-    echo -n "${FORCE}Generating md5sums for "
-    for i in $*
-    do
-	if [ -s /var/lib/dpkg/info/$i.list ]
-	then
-	    if [ ! -f /var/lib/dpkg/info/$i.md5sums ] || [ -n "$FORCE" ]
-	    then
-		md5sum `cat /var/lib/dpkg/info/$i.list` >/var/lib/dpkg/info/$i.md5sums 2>/dev/null
-		echo -n "$i "
-	    else
-		echo -n "($i.md5sums exists)"
-	    fi
-	else
-	    echo -n "($i.list does not exist) "
-	fi
-    done
-else
-    echo -n "Generating md5sums for "
-    for i in /var/lib/dpkg/info/*.list
-    do
-	PACKAGE="`expr $i : '/var/lib/dpkg/info/\(.*\)\.list'`"
-
-	if [ ! -f /var/lib/dpkg/info/$PACKAGE.md5sums ] && [ -s $i ]
-	then
-	# Package list includes directories. So just ignore md5sums
-	# errormessages on those
-	    md5sum `cat $i` >/var/lib/dpkg/info/$PACKAGE.md5sums 2>/dev/null
-	    echo -n "$PACKAGE "
-	fi
-    done
-fi
-
-echo
-echo "Done."
diff --git a/man/debsums_gen.8 b/man/debsums_gen.8
deleted file mode 100644
index f3affb7..0000000
--- a/man/debsums_gen.8
+++ /dev/null
@@ -1,52 +0,0 @@
-.TH DEBSUMS 8 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
-.SH NAME
-debsums_gen \- Generate /var/lib/dpkg/info/*.md5sums for packages lacking it
-.SH SYNOPSIS
-.B debsums_gen
-.RB [ \-l ]
-.RB [[ \-f ]
-.I package
-.RI [ package
-\&...]]
-.SH DESCRIPTION
-.B debsums_gen
-will look for packages that did not install a
-.B md5sums
-file. It will generate those checksums then from the installed files.
-.PP
-.PP
-Deprecated: this program may be removed in a later release, see the
-debsums
-.B \-\-generate
-option.
-.PP
-Note that this is not optimal. It is best if the md5sums are generated when
-the maintainer builds the package. At the time that the system administrator
-gets around to run this tool something might already have happened to the
-files in the package. It is recommended to run this tool as soon as possible
-after an upgrade or package installation in order to keep a full set of
-checksums for all files installed.
-
-When run with no options,
-.B debsums
-will check all installed packages for an
-.B md5sums
-list. If one is not present, it will generate one for it from the existing
-file list in
-.B /var/lib/dpkg/info.
-You may also specify package name(s) on the command line to generate just
-those md5sum files. The \-f option will force overwriting the current md5sums
-file for the listed package(s).
-.SH OPTIONS
-.TP
-.B \-l
-List packages which do not have an md5sums file already generated.
-.TP
-.B \-f
-Force overwriting current md5sums file when specifying packages on the
-command line.
-.PP
-.B debsums_gen
-needs to be invoked as superuser.
-.SH AUTHOR
-Christoph Lameter <clameter at debian.org>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/debsums.git



More information about the Pkg-perl-cvs-commits mailing list