# Replacing binary installed packages with ports



## puppyboy (Oct 24, 2016)

I have various packages installed on my server that were installed as binaries, with pkg install pkgname. Anyway for at least one or two it turns out I need to change the default options which means I need to use ports. Since everyone says you shouldn't mix ports with binaries, I guess I need to just move everything to ports. What is the best way to go about converting everything to ports instead of binary installs? Is there a quick and easy way to do this?


----------



## ASX (Oct 24, 2016)

I have just switched to ports and used the excellent ports-mgmt/synth, it will take care about nearly everything, and you will get started in no time.

See also Thread 58080

Synth by default will build a local pkgs repository, tailored to the current set of packages you have installed. Spend some time to read the related documentation.


----------



## Deleted member 48958 (Oct 24, 2016)

IMHO you shouldn't do anything at all.
Just install port that you need. And use it.
Just upgrade your apps with ports-mgmt/portupgrade or ports-mgmt/portmaster then,
you can encounter some issues with
`# pkg upgrade`
Or upgrade packages individually, for example
`# pkg upgrade wget unrar png` etc.


----------



## Remington (Oct 24, 2016)

+1 on synth.  Its much cleaner and won't clutter your system with orphaned packages from building ports.


----------



## Remington (Oct 24, 2016)

ILUXA said:


> IMHO you shouldn't do anything at all.
> Just install port that you need. And use it.
> Just upgrade your apps with `portupgrade` then,
> you can encouner some issues with `pkg upgrade`.
> ...



I would have agreed with you if it was 2 months ago when I was using ports and portmaster.  I've been using poudriere for a month now and it does the job extremely well.  I bet you haven't tried synth?  Poudriere and Synth basicially does the same thing.  The only difference is synth is useful for one computer while poudriere is better for servers or multiple jails.


----------



## Deleted member 48958 (Oct 24, 2016)

Yes, I'm too lazy to learn something new 
especially when I don't really need it.
I do not have any "orphaned packages from building ports",
because all build dependencies can be easily removed with `pkg autoremove`,
because all dependencies are installed as automatic, also I can install packages as automatic with `pkg ins -A <package>`, or I can mark manually installed packages as automatic with `pkg set -A 1 <package>`, to remove them later with `pkg autoremove` aka `pkg aut`.


----------



## Remington (Oct 24, 2016)

synth and poudriere will save you a lot of time reinstalling customized packages especially if running X11, and multiple jails or servers.

I suggest you to try it.


----------



## marino (Oct 25, 2016)

Remington said:


> The only difference is synth is useful for one computer while poudriere is better for servers or multiple jails.



I would say the only practical difference is poudriere supports qemu builds for ARM while synth doesn't.  Poudriere has no advantage over synth with regard to "servers" or "multiple jails" [1]

[1] other than poudriere commands can build the jails.  However, once the jails (aka system roots) are in place, synth can take advantage of them with multiple profiles easily.


----------



## Remington (Oct 25, 2016)

Poudriere also can build packages for different FreeBSD versions as well.  Also Poudriere's website can show the status while Synth can't or not yet available.


----------



## Deleted member 48958 (Oct 25, 2016)

Remington said:


> I suggest you to try it.


Ok, I'll try, thanks, installing it now. May be one day I'll be a happy ports-mgmt/synth user too


----------



## marino (Oct 25, 2016)

Remington said:


> Poudriere also can build packages for different FreeBSD versions as well.



so can Synth as long as you're talking about amd64 => i386 packages.  As I mentioned above, it can't build ARM packages while poudriere can.



> Also Poudriere's website can show the status while Synth can't or not yet available.



what does this mean?  v1.60 brought in a "website" report which shows all status.


----------



## marino (Oct 25, 2016)

Remington said:


> Poudriere also can build packages for different FreeBSD versions as well.  Also Poudriere's website can show the status while Synth can't or not yet available.


good for another 2 hours: http://pkgbox64.dragonflybsd.org/synth/bleeding-edge/Report/


----------



## Remington (Oct 25, 2016)

marino@ said:


> what does this mean?  v1.60 brought in a "website" report which shows all status.



That's good since it Synth didn't have "website" report when I started using Poudriere and there is no reason for me to switch to Synth.  Both are equally good and build packages differently in clean environment.


----------



## scottro (Oct 25, 2016)

If you're talking one or two packages, I would risk the mixing of ports and packages.  For example, on one aging machine, I use packages for everything except the dwm window manager, because I use a custom config file which requires the port.  

On another machine, where I was a lot more careless and broke things by excessive mixing of ports and packages, synth managed to fix everything.  However, (and of course, it depends upon what port you're planning to build), there's a reasonable chance that using packages and one or two ports isn't going hurt.  Note that I said a reasonable chance. 

Anyway, let me add to the praise for synth, but again, if it's only one port, it may be alright.  What port is it? If you run portmaster <pkg_name> if it's already installed (or portmaster <category/pkg_name> if it's not yet installed, how many packages does it say it's going to install, upgrade, or remove?   If you get something where it's going to say, change perl and every perl related package you have, there's a good chance that it will break something.  If it's only going to change the package itself, and not affect any dependencies, it probably won't be a problem.


----------



## marino (Oct 25, 2016)

Remington said:


> Poudriere also can build packages for different FreeBSD versions as well.



For some reason I space out on your meaning, you meant you can build FreeBSD 9, 10, 11 packages on the same machine.  Synth can do that just as easily, but with the same caveats as poudriere: The host release has to be equal to or higher than the jail release (so FreeBSD 11 can build freebsd 9 packages, but not the other way around).  It's an OS limitation.


----------

