Bug 150078 - security/tor: Recursive dependencies on ports tor and vidalia and weird vidalia default dependencies.
Summary: security/tor: Recursive dependencies on ports tor and vidalia and weird vidal...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brendan Fabeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 06:00 UTC by Jens Grassel
Modified: 2010-08-30 19:40 UTC (History)
0 users

See Also:


Attachments
pr_vidalia.diff (1.13 KB, patch)
2010-08-29 13:10 UTC, b. f.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Grassel 2010-08-29 06:00:18 UTC
When installing tor via ports and selecting vidalia in the config make install bails out with an error as vidalia depends per default on tor and tor-devel.
If you remove tor-devel from the config of vidalia and repeat the make install in /usr/ports/security/tor the install part gets caught in an endless loop as tor checks for vidalia and vidalia checks for tor.

Fix: 

Don't select vidalia as build option for tor and build and install it after installing tor.
This is not a big problem but somewhat annoying. Maybe it should be mentioned somewhere.
How-To-Repeat: cd /usr/ports/security/tor
make config
select vidalia
make install clean
-> first error (vidalia dependencies)
cd /usr/ports/net-mgmt/vidalia
make config
remove tor-devel
cd /usr/ports/security/tor
make install clean
-> after build you'll encounter the endless loop
Comment 1 Remko Lodder freebsd_committer 2010-08-29 09:35:52 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

Ports thingy
Comment 2 b. f. 2010-08-29 11:27:25 UTC
The solution is to remove the VIDALIA option, and hence any
dependencies on net-mgmt/vidalia, from security/tor and
security/tor-devel, because this option introduces circular
dependencies, and was only there for convenience: there is no actual
dependency.

As an aside, I should mention that the dependency handling in
net-mgmt/vidalia is problematic.  The use of != and calls to utilities
like pkg_info in port Makefiles, outside of targets that are not run
during 'make describe'  is actively discouraged, because it makes
computing the INDEX more costly, and this is one of the bottlenecks in
Ports.  portmgr went to some trouble to remove these calls earlier
(see, for example:

http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html
http://lists.freebsd.org/pipermail/cvs-ports/2008-July/153224.html

), and they should be removed from vidalia.  Yes, the handling of
alternative dependencies is clumsy in Ports, but the tools that most
people use for dealing with this, like portmanager and portupgrade,
have means of dealing with this problem, and as long as the entry for
'make describe'  is correct for default package builds in clean
sandboxes, efficiency is more important. Also, it seems to me that the
TOR_DEVEL and TOR OPTIONS can be combined into one option.

b.
Comment 3 Fabian Keil 2010-08-29 12:33:00 UTC
"b. f." <bf1783@googlemail.com> wrote:

> The solution is to remove the VIDALIA option, and hence any
> dependencies on net-mgmt/vidalia, from security/tor and
> security/tor-devel, because this option introduces circular
> dependencies, and was only there for convenience: there is no actual
> dependency.


I agree that the Tor ports should drop the dependency.

This has already been discussed in 2007 when lx@ first
reported the problem. IIRC, at that time the Tor maintainer
agreed as well, so I'm not sure why it hasn't happened.

> As an aside, I should mention that the dependency handling in
> net-mgmt/vidalia is problematic.  The use of != and calls to utilities
> like pkg_info in port Makefiles, outside of targets that are not run
> during 'make describe'  is actively discouraged, because it makes
> computing the INDEX more costly, and this is one of the bottlenecks in
> Ports.  portmgr went to some trouble to remove these calls earlier
> (see, for example:
> 
> http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html
> http://lists.freebsd.org/pipermail/cvs-ports/2008-July/153224.html
> 
> ), and they should be removed from vidalia.  Yes, the handling of
> alternative dependencies is clumsy in Ports, but the tools that most
> people use for dealing with this, like portmanager and portupgrade,
> have means of dealing with this problem, and as long as the entry for
> 'make describe'  is correct for default package builds in clean
> sandboxes, efficiency is more important. Also, it seems to me that the
> TOR_DEVEL and TOR OPTIONS can be combined into one option.


The use of != for the dependency handling is the result of
a discussion on freebsd-ports@ and at that time nobody had
any better ideas.

Fabian
Comment 4 b. f. 2010-08-29 13:10:40 UTC
On 8/29/10, Fabian Keil <fk@fabiankeil.de> wrote:
> "b. f." <bf1783@googlemail.com> wrote:

> The use of != for the dependency handling is the result of
> a discussion on freebsd-ports@ and at that time nobody had
> any better ideas.

I find that surprising, because, typically, that is not how
dependencies are handled in Ports.  Most ports have a dependency
triplet, say,

..._DEPENDS= ${LOCALBASE}/bin/foo:${PORTSDIR}/bat/bar...

but they don't go to any trouble to determine whether foo, if present,
is actually from, for example,  the bat/bar or bat/bar-devel port.
It's enough that it is present, and the dependency is correctly
registered for default package builds.  A few might have a knob to
toggle dependencies for the convenience of the user, but the version
isn't usually checked even when such a knob is present.  Something
like the attached patch is usually considered sufficient.

b.
Comment 5 dfilter service freebsd_committer 2010-08-30 15:45:16 UTC
bf          2010-08-30 14:45:04 UTC

  FreeBSD ports repository

  Modified files:
    security/tor         Makefile 
    security/tor/files   pkg-message.in 
  Log:
  --Add LICENSE information
  --Add a reference to net/tsocks in the pkg-message, but remove the dependency
  on that port [1]
  --Remove the VIDALIA option, which led to (false) circular
  dependencies when enabled [2]
  
  PR:             150078 [2]
  Requested by:   Fabian Keil [1]
  Approved by:    miwi (co-mentor, maintainer)
  
  Revision  Changes    Path
  1.58      +7 -10     ports/security/tor/Makefile
  1.3       +1 -0      ports/security/tor/files/pkg-message.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer 2010-08-30 15:48:07 UTC
bf          2010-08-30 14:47:40 UTC

  FreeBSD ports repository

  Modified files:
    security/tor-devel   Makefile 
    security/tor-devel/files pkg-message.in 
  Log:
  --Add LICENSE information
  --Add a reference to net/torsocks in the pkg-message, but remove the dependency
  on that port [1]
  --Remove the VIDALIA option, which led to (false) circular
  dependencies when enabled [2]
  --Re-enable the regression-test target
  
  PR:             150078 [2]
  Requested by:   Fabian Keil [1]
  Approved by:    miwi (co-mentor)
  
  Revision  Changes    Path
  1.94      +6 -8      ports/security/tor-devel/Makefile
  1.4       +1 -0      ports/security/tor-devel/files/pkg-message.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Brendan Fabeny freebsd_committer 2010-08-30 16:04:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bf

I'll take it.
Comment 8 Brendan Fabeny freebsd_committer 2010-08-30 16:09:28 UTC
State Changed
From-To: open->closed

Fixed, after the VIDALIA option was removed from both security/tor and 
security/tor-devel.  Thanks for the report.
Comment 9 Fabian Keil 2010-08-30 19:38:36 UTC
"b. f." <bf1783@googlemail.com> wrote:

> On 8/29/10, Fabian Keil <fk@fabiankeil.de> wrote:
> > "b. f." <bf1783@googlemail.com> wrote:
> 
> > The use of != for the dependency handling is the result of
> > a discussion on freebsd-ports@ and at that time nobody had
> > any better ideas.
> 
> I find that surprising, because, typically, that is not how
> dependencies are handled in Ports.  Most ports have a dependency
> triplet, say,
> 
> ..._DEPENDS= ${LOCALBASE}/bin/foo:${PORTSDIR}/bat/bar...
> 
> but they don't go to any trouble to determine whether foo, if present,
> is actually from, for example,  the bat/bar or bat/bar-devel port.
> It's enough that it is present, and the dependency is correctly
> registered for default package builds.  A few might have a knob to
> toggle dependencies for the convenience of the user, but the version
> isn't usually checked even when such a knob is present.  Something
> like the attached patch is usually considered sufficient.


Your patch removes the option to not depend on any Tor version.

While Vidalia is useless without Tor, there's no requirement
to run Vidalia and Tor on the same system, so "no dependency"
is a valid choice.

If the current construct is considered too expensive,
maybe it should simply be removed completely.

Fabian