From dad97aab0d4d51d9c2ae73c2b41193f1e1408e40 Mon Sep 17 00:00:00 2001 From: eadler Date: Wed, 25 Jun 2014 08:50:50 +0000 Subject: Remove consistency-check since it relies on MD5 and only works for old pkg_ tools Also clean up README a bit more Discussed with: ak, bapt --- Tools/scripts/README | 55 ++++------------ Tools/scripts/consistency-check | 143 ---------------------------------------- 2 files changed, 12 insertions(+), 186 deletions(-) delete mode 100755 Tools/scripts/consistency-check (limited to 'Tools') diff --git a/Tools/scripts/README b/Tools/scripts/README index 0f09202eb7b5..22ab3c67380f 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -1,21 +1,30 @@ $FreeBSD$ +NOTE: These scripts need work and are *NOT* safe to use unless you know + what they do. Use at your own risk. Patches would be great, but + it is preferred they pass through the maintainer of each particular + script. + MOVEDlint.awk - checks MOVED for common errors ardiff - compare two archives easily addport - replacement for easy-import +bad-pkgdescrs.sh - locate identical pkg descriptions bump_revision.pl - Small script to bump the PORTREVISION variable of ports which are depending on a port with a changed shared lib version. -consistency-check - check whether all your ports are installed properly, - what files have changed, and what new files there are. check-latest-link - search for duplicate LATEST_LINK values and send nag mails to the responsible maintainers checkcats.py - verify that master categories in all ports are correct and - report any problems. + report any problems. Beware that the full check takes quite + some time. checknewvers - checks for availability for a newest version of distfiles on MASTER_SITES (ftp only). +checksum - allows checking of ports to see if their checksums + match, and if they don't, give a diff against the older version to + help discover why the checksum didn't match. chkorigin.sh - checks all ports in the tree for a wrong PKGORIGIN. Run this tool after every repocopy. +doportlint - run portlint on every port and return the results distclean - compare md5 sums of distfiles in ports/distfiles with currently installed ports collection in ports/* and prompt to remove unmatched entries @@ -45,26 +54,6 @@ update-patches - generates updated patches. ---------------------------------------------------------------------- -consistency-check gives output like: - -Not on filesystem - jade from jade-1.2.1 -Only on filesystem - jadefoo -No package md5 available for lessecho -File nsgmls owned by multiple packages sp-1.3.4,jade-1.2.1 -No filesystem md5 available for setuser, but it exists -For sgmlnorm, package md5 312d7b63d591e07629e0da4ae4a0ac07 is DIFFERENT from fs md5 of 19f1f901911b90d8e04c6ea69e1b0541! - -change $do_md5 to 0 to not check md5, and $do_fs to 0 to not check for -files above those installed by packages. - ----------------------------------------------------------------------- - -The checkcats.py script verifyes that master categories in all ports are -correct and report any problems. It doesn't require any command-line options. -Please beware that full check takes quite some time. - ----------------------------------------------------------------------- - getpr is used as so: % cd /usr/ports/CATEGORY/PORT % getpr PRNUMBER @@ -74,19 +63,6 @@ getpr is used as so: ---------------------------------------------------------------------- -checksum is a script that allows checking of ports to see if their checksums -match, and if they don't, give a diff against the older version to try and -discover why the checksum didn't match. - ----------------------------------------------------------------------- - -distclean is a script that allows to compare md5 checksums of distfiles in -ports/distfiles with list of all md5 sums listed in "md5" files in the ports -collection. After comparing, utility will prompt to remove distfiles which -doesn't have associated md5 entry (most likely outdated distfiles). - ----------------------------------------------------------------------- - gnomedepends is a script, which analyses pkg/PLIST and gives an advice as to which GNOME ports should be listes in {RUN,LIB}_DEPENDS for the port to ensure correct removal of GNOME shared directories. Usage is simple: @@ -171,10 +147,3 @@ patched, except that "/" separators and "." characters are replaced by underscores: for example, a new patch to $WRKSRC/foo/bar.c would be created as $PATCHDIR/patch-foo_bar_c. If you save a .orig backup of a file, but don't change the file, update-patches will generate an empty patch. - ----------------------------------------------------------------------- - -NOTE: These scripts need work and are *NOT* safe to use unless you know - what they do. Use at your own risk. Patches would be great, but - it is preferred they pass through the maintainer of each particular - script. diff --git a/Tools/scripts/consistency-check b/Tools/scripts/consistency-check deleted file mode 100755 index 9d1e404990e6..000000000000 --- a/Tools/scripts/consistency-check +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env perl -# -# Copyright (c) 1999 Neil Blakey-Milner -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -# - -#my($path) = "/var/qmail"; -my($path) = "/usr/local/bin"; -my($pkgdir) = "/var/db/pkg"; - -$do_md5 = 1; -$do_fs = 1; - -my(@fsfiles); -my(%files); -my(%fsmd5); -my(%pkgmd5); -my(%pkgname); - -if ($do_fs) { - @fsfiles = `find $path ! -type d`; - foreach (@fsfiles) { - chomp; - s#\Q$path\E/?##; - $files{$_} = 1; - chomp($fsmd5{$_} = `md5 -q $path/$_ 2> /dev/null`) if $do_md5 == 1; - } -} - -require "find.pl"; -&find('/var/db/pkg'); -# Traverse desired filesystems - -foreach (sort keys %files) { - $file = $_; - $pkgname{$_} =~ s/,$//; - $files{$_} == 1 && do { - print "Only on filesystem - $_\n"; - next; - }; - $files{$_} == 2 && do { - if ($do_fs == 1) { - printf "Not on filesystem - $_ from %s\n", $pkgname{$_}; - next; - } - }; - if ($do_fs != 1) { - if (-e "$path/$_") { - chomp($fsmd5{$_} = `md5 -q $path/$_ 2> /dev/null`) if $do_md5 == 1; - } else { - printf "Not on filesystem - $_ from %s\n", $pkgname{$_}; - } - } - $files{$_} > 3 && do { - printf "File $_ owned by multiple packages %s\n", $pkgname{$_}; - }; - - if ($do_md5) { - $pkgmd5tmp = $pkgmd5{$_}; - $fsmd5tmp = $fsmd5{$_}; - if ($fsmd5tmp =~ /^ *$/) { - $msg = ""; - $msg = ", but it exists" if (-e "$path/$_"); - printf "No filesystem md5 available for $_%s\n", $msg; - next; - } - if ($pkgmd5tmp =~ /^ *$/) { - print "No package md5 available for $_\n"; - next; - } - foreach (split /,/, $pkgmd5tmp) { - #print "Comparing: $fsmd5tmp $_\n"; - if ($fsmd5tmp !~ /\Q$_\E/) { - print "For $file, package md5 $_ is " . - "DIFFERENT from fs md5 of $fsmd5tmp!\n"; - } - } - } -} - -exit; - -sub wanted { - my($dev, $ino, $mode, $nlink, $uid, $gid); - my($cwd, $tmp); - (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && - -f _ && - /^\+CONTENTS$/ || return; - open(CNT, "$name"); - chomp($pkg = `dirname $name`); - chomp($pkg = `basename $pkg`); - $cwd = ""; - $lastfile = ""; - while() { - chomp; - /^\@cwd (.*)$/ && do { - $cwd = $1; - next; - }; - s#^\@comment MD5:## && do { - return if $cwd =~ /^\.?$/; - $tmp = "$cwd/$lastfile"; - if ($tmp =~ s#^\Q$path\E/?##) { - $pkgmd5{$tmp} .= "$_,"; - } - next; - }; - /^[^@]/ && do { - $lastfile = $_; - return if $cwd =~ /^\.?$/; - $tmp = "$cwd/$_"; - if ($tmp =~ s#^\Q$path\E/?##) { - $files{$tmp} += 2; - $pkgname{$tmp} .= "$pkg,"; - } - }; - } - close(CNT); -} - -- cgit