From owner-freebsd-ports@FreeBSD.ORG Fri Dec 7 04:41:30 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C90F16A421 for ; Fri, 7 Dec 2007 04:41:30 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from smtp3.utdallas.edu (smtp3.utdallas.edu [129.110.10.49]) by mx1.freebsd.org (Postfix) with ESMTP id F2FBF13C447 for ; Fri, 7 Dec 2007 04:41:29 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from [192.168.2.102] (unknown [24.175.90.48]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTP id 4FFD665505; Thu, 6 Dec 2007 22:41:29 -0600 (CST) Date: Thu, 06 Dec 2007 22:41:27 -0600 From: Paul Schmehl To: Alex Goncharov , freebsd-ports@freebsd.org Message-ID: <8B6AA93E1BD6BB1C2A23236A@paul-schmehls-powerbook59.local> In-Reply-To: References: <20071207001315.GA58050@owl.midgard.homeip.net> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: (Very) bogus package dependencies X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 04:41:30 -0000 --On December 6, 2007 10:32:51 PM -0500 Alex Goncharov , Alex Goncharov wrote: >| >| It looks like an ordinary indirect dependency. > >| The drivers as well as the xorg-server all require 'hal'. > > Yes: > > -------------------- > $ pkg_info -r xf86-video-radeonhd-* > .... > Dependency: hal-0.5.8.20070909 > Dependency: xorg-server-1.4_3,1 > -------------------- > >| 'hal' depends on 'cdrtools'. (It may be that the drivers only >| depend on xorg-server, > >| As for why 'hal' requires 'cdrtools' I have no idea, but there is >| probably some reason for it. > > And this is precisely the second of the two questions I have in mind: > > 1. (Purely technical): Where is this originally recorded? > > I don't see anything applicable in the port's directory: > > -------------------- ># find /usr/ports/sysutils/hal -type f| wc -l > 567 ># find /usr/ports/sysutils/hal -type f -exec grep -Hn 'cdrtools' {} \;| ># wc -l > 0 > -------------------- That's because you're not looking in the right place. Open the Makefile for hal and you find: USE_CDRTOOLS= yes Now, why cdrtools is required to build the port is a question that is answered by going to /usr/ports/Mk/bsd.port.mk and reading the section on USE_CDRTOOLS. Then continue to trace from there, and you will find that hal won't build without some file or files that are installed by cdrecord. (No, I'm not going to do that for you.) > > But I do see it in `/var/db/pkg': > > -------------------- ># find /var/db/pkg/hal-0.5.8.20070909/ -type f -exec grep -Hn 'cdrtools' ># {} \; > /var/db/pkg/hal-0.5.8.20070909/+CONTENTS:187:@pkgdep cdrtools-2.01_6 > /var/db/pkg/hal-0.5.8.20070909/+CONTENTS:188:@comment > DEPORIGIN:sysutils/cdrtools -------------------- > > So, is it that a port maintainer creates `/var/db/pkg/PKG/*' files > by hand? Based on individual ideas? Not on really "must-to-have" > things, like dependencies on shared libraries? > Absolutely not! /var/db/pkg/portname is built by the ports system based upon how the port is built. Most maintainers (including me!) would have no clue what's in the CONTENTS page without looking at it, because we have "nothing" to do with its creation (other than the fact that we created the port.) > 2. (Conceptual): How reasonable are these dependencies? > I doubt seriously any port maintainer just picks dependencies willy-nilly. They're chosen because the source code docs cite them as requirements and/or because the port won't build without them. > In this case, `/usr/sbin/burncd' is all I need to burn CD's. I > have no practical reason to have `cdrtools' on my computer. > Of course you do. Otherwise it wouldn't be there. > Why would the "Hardware Abstraction Layer for simplifying device > access" depend on a specific set of "CD/CD-R[W] and ISO-9660 image > creation and extraction tools" -- on this set and not on another? > It most likely doesn't. It depends upon a file or files that are installed by cdrtools. Look at one of my ports, security/barnyard. It depends on snort. Why? Because that's the only thing it's designed to work with. Without snort, there's no reason to have barnyard on your system. Another port, devel/byacc, has no dependencies at all. Another one, security/sguil-server, has multiple dependencies, some because they're required for proper operation, others because the port won't build without those libraries. If you want to spend time figuring all that out, be my guest, but the maintainers have already done all that work for you, and the committers have verified that it's required and that it works as expected. That's the beauty of ports. Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/