# Replacing A Base Package With A Port: Best Practices?



## JSeymour (Aug 13, 2012)

Hi There,

System: FreeBSD ... 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3

I want to get DNSSEC going, so I've installed Bind 9.8 from ports.  I'm wondering what is regarded as the Best Practices for "activating" ports like that?  My _inclination_ would be to (pseudo code):


```
for each binary in /usr/[s]bin that exists in /usr/local/[s]bin
        rename /usr/[s]bin binary to whatever.orig
        symlink /usr/local/[s]bin binary to /usr/[s]bin
```

and keep the config files where they are (making backups before modifying them).  In this manner there would be minimal changes to anything, and I could easily back things out, if desired.

So, what say y'all?

I apologize if this is well-known, but I read the manual, asked on the IRC channel, searched here and searched with a search engine, to no avail.

Thanks,
Jim


----------



## Terry_Kennedy (Aug 14, 2012)

JSeymour said:
			
		

> So, what say y'all?


Enable REPLACE_BASE option when doing *make config* in the port directory. Then build and install as normal.

You'll probably need:
	
	



```
NO_BIND=TRUE
```
 in /etc.make.conf as well, to keep future buildworlds from stomping on it.


----------



## SirDice (Aug 14, 2012)

Terry_Kennedy said:
			
		

> You'll probably need:
> 
> 
> 
> ...



That was the old way, I think it still works though. The proper way is to add to /etc/src.conf:

```
WITHOUT_BIND=yes
```

See src.conf(5).


----------



## JSeymour (Aug 14, 2012)

Thanks for the feedback.

That method attracts because it seems cleanest, but what if the replacement turns out to be a non-functional disaster for some reason?  How do I get the BASE version back?

Thanks,
Jim


----------



## SirDice (Aug 14, 2012)

Remove WITHOUT_BIND from src.conf and rebuild world.


----------

