From owner-freebsd-questions@FreeBSD.ORG Tue Aug 6 20:15:30 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C1B0981F for ; Tue, 6 Aug 2013 20:15:30 +0000 (UTC) (envelope-from dweimer@dweimer.net) Received: from webmail.dweimer.net (24-240-198-187.static.stls.mo.charter.com [24.240.198.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 842CC238E for ; Tue, 6 Aug 2013 20:15:29 +0000 (UTC) Received: from www.dweimer.net (webmail.dweimer.local [192.168.5.2]) by webmail.dweimer.net (8.14.5/8.14.5) with ESMTP id r76KFSOl006354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 6 Aug 2013 15:15:28 -0500 (CDT) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 06 Aug 2013 15:15:28 -0500 From: dweimer To: freebsd-questions@freebsd.org Subject: Re: How to Fix Port Audit showing ports not installed on a system Organization: dweimer.net Mail-Reply-To: dweimer@dweimer.net In-Reply-To: <520154A4.4040709@FreeBSD.org> References: <58b0a130601de49508aa7f7b8c1c9833@dweimer.net> <52012B43.5000000@ifdnrg.com> <8826af281224e2db334d446a51c11342@dweimer.net> <520154A4.4040709@FreeBSD.org> Message-ID: <2b8049260286a7d051c01a636113dc81@dweimer.net> X-Sender: dweimer@dweimer.net User-Agent: Roundcube Webmail/0.8.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dweimer@dweimer.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 20:15:30 -0000 On 08/06/2013 2:55 pm, Matthew Seaman wrote: > On 06/08/2013 19:23, dweimer wrote: >> Of course I have WITH_PKGNG="YES" in the make.conf, and I believe that >> has been there ever since the server was built. Is my best option to >> get the correct list from pkg info use rm -r /var/db/pkg/* to clear >> everything out and then reinstall all of the ports? > > If you've had WITH_PKGNG="YES" ever since the server was built then you > shouldn't have any of the old-style pkg_tools entries in /var/db/pkg. > > Unless, that is, you've been using pkg_add(1) directly. Don't do that. > You just end up with a complete mess. Remember folks -- pkgng is like > getting married. Once you go with pkgng, you're not meant to dally > with > other package tools, but to stay faithful to pkgng from henceforth. > > I hope you've got the old-style pkg_tools per-package subdirectories in > /var/db/pkg because either (i) you used to use pkg_tools and you ran > pkg2ng to convert or (ii) you've been using portmaster, in which case > those sub-directories only /look/ like the result of what pkg_tools > generates, but are really just a place for portmaster to stash a few > things. > > If those sub-directories contain files called thing like +CONTENTS or > +COMMENT or other names beginning with '+' then you do have a messed up > mixture of old pkg_tools and pkgng. > > First: remove all the subdirectories but *not* local.sqlite or > repo.sqlite -- those are rather important bits of pkgng. > Then you can force a reinstall of all packages by > > pkg upgrade -f > > Obviusly, you'll need pkg(8) configured to use a repo with all the > appropriate packages available. > > Cheers, > > Matthew Thanks for the info, I have never used pkg_add, everything has been installed via ports and portmaster, but it is possible that some ports were installed prior to having the with pkgng added in make.conf, and that something happened in the pk2ng conversion. I thought I had built this machine after I had been running with pkgng, but perhaps this one was built right as I was switching over to it. I had originally built this machine with Xorg and KDE to use virtual box GUI, and once I became comfortable with the commands, switched to vboxheadless and removed all the GUI components. Which is where all the extra ports that were removed came from. I have removed the sub directories, now portaudit doesn't show any vulnerabilities in non existent ports, pkg info displays the correct installed packages, and portmaster -l matches the installed ports that pkg info displays. -- Thanks, Dean E. Weimer http://www.dweimer.net/