# Keep/install/exclude soft from ports and packages



## bryn1u (Feb 28, 2018)

Hello guys,

I have installed version of PHP 7.1 by pkg. When I want to install nagios then nagios is forcing remove php7.1 and install PHP version 5.6. The only way is use packages and ports. But the problem is when some version is available to update and if I want to update by portmaster, all installed version will be updated by portmaster. For portmaster it doesn't matter if it's installed from ports or pkg, everything will be updated.. My question is. Can I keep files installed from pkg only for pkg and the same for ports? If not is there any way to create some whitelist and put there package to update only for pkg? I know solution like pkg lock. It isn't good enough because packages don't want to be updated in anyway.  I would be graceful for some advice.


----------



## MarcoB (Feb 28, 2018)

Portmaster has the "-x" option to exclude the upgrade (or downgrade in your case) of ports. I'm not sure if this works for dependencies of ports (php is a dependency of nagios).

Or maybe you can try setting 
	
	



```
DEFAULT_VERSIONS+= php=7.1
```
 in /etc/make.conf.


----------



## phoenix (Mar 1, 2018)

Binary packages are built using the default versions for things, and the default options.

Currently, PHP 5.6 is the default, so any package that requires PHP will depend on version 5.6.

If you need a different version of PHP, then you'll need to build your own packages. This is where things like synth and poudriere come into play.

Set your default versions to what you need, and build all the packages you need into a custom repo. Then install the packages from there.


----------



## obsigna (Mar 1, 2018)

With respect to the installation of net-mgmt/nagios, the way to go is to edit /etc/make.conf as MarcoB suggested and then issue `# cd net-mgmt/nagios; make install clean`.

Your other questions about dual mode maintenance (binary packages and building from source) bubble up quite frequently in this forum, and just yesterday, I wrote up my take on this in a BLog post: FreeBSD Dual Mode updating of the installed ports collection.


----------



## bryn1u (Mar 1, 2018)

I can't join to your Blog.

"The connection has timed out."


----------



## MarcoB (Mar 1, 2018)

Hmm, obsigna.com is unreachable from here too.


----------



## obsigna (Mar 2, 2018)

Please try again, yesterday I tried to switch the WordPress system from MySQL to MariaDB, and I miserably failed, so instead of a few minutes of downtime, I sent my service off for a few hours -- I am sorry.


----------



## SirDice (Mar 2, 2018)

obsigna said:


> yesterday I tried to switch the WordPress system from MySQL to MariaDB, and I miserably failed, so instead of a few minutes of downtime, I sent my service off for a few hours -- I am sorry.


I'm sure we've all done something similar at some point. I know I have


----------



## ronaldlees (Mar 2, 2018)

obsigna said:


> With respect to the installation of net-mgmt/nagios, the way to go is to edit /etc/make.conf as MarcoB suggested and then issue `# cd net-mgmt/nagios; make install clean`.
> 
> Your other questions about dual mode maintenance (binary packages and building from source) bubble up quite frequently in this forum, and just yesterday, I wrote up my take on this in a BLog post: FreeBSD Dual Mode updating of the installed ports collection.



Nice blog.  Great IPDB tools article, BTW.


----------



## obsigna (Mar 2, 2018)

ronaldlees said:


> Nice blog. Great IPDB tools article, BTW.


Well, I wrote this, when I published the IPDB tools on GitHub and later I created a port for this sysutils/ipdbtools. So, besides said BLog post "Geo-blocking at the Firewall" it would be good to consult also the documentation on GitHub: https://cyclaero.github.io/ipdb/ or the man page ipdb(1).


----------



## MarcoB (Mar 2, 2018)

obsigna said:


> Please try again, yesterday I tried to switch the WordPress system from MySQL to MariaDB, and I miserably failed, so instead of a few minutes of downtime, I sent my service off for a few hours -- I am sorry.


No problem it's working now, thanks.


----------

