Problem about using multiple FreeBSD packages without conflict.

Dear all member!

I'm using FreeBSD as email and web server - no desktop, no users, weak hardware - but it works since a long time.

I'm using mixing ports and packages for installing my applications. Because of the weak hardware I won't install everything over the ports, just the software for email (like sendmail, etc. and web server like apache, php-extensions, etc..)

I get a question, because I run into a lot of problems every time I'm doing updates:
After some times, there are ports sign as "vulnerable" for hacking - so I get something to do.
I do
Code:
cd /usr ports and
portsnap fetch update
or / and
pkg update

Then I check new versions with

pkg version -l "<"
or
pkg upgrade -n

I have try to update with
portupgrade -r abc.. or every package it needs an update and when fail
portupgrade -a and the rest with
portupgrade -r abc.. or pkg install abc... until everything is new.
By the way, it take me sometimes days to solve that.[/U]

or with
pkg install abc... for every package it needs update or when fail
pkg install upgrade

Every time I got a lot of conflicts and every time I must work through my documentation from internet to reconfigure the eMail and webserver settings until they works again.
So, ..... Can I have packages and ports Installations at the same time? And how do I manged them without get conflicts.

Can I configure the package system that it don't install applications that I explicit install about the ports?

Thank you very much!
 
Last edited:
The official packages are always built using the default options. And, as you've found out, mixing ports and packages is pretty much guaranteed to cause conflicts. Either build everything from ports or install everything from packages. Alternatively set up your own repository using ports-mgmt/poudriere or ports-mgmt/synth.
 
This is a reoccurring discussion. Maybe one of the handbook editors could add a line in chapter 4 and add a line in bold big font "Do not mix the two; use one or the other". Maybe 4.2 before the two paragraphs that list the benefits of each.
 
... Maybe one of the handbook editors could add a line in chapter 4 and add a line in bold big font "Do not mix the two; use one or the other". ...

I see no reason why this should be done. IMHO, it is an urban legend that dual maintenance of ports and packages is problematic. I am doing this with a simple script for about 2 years on my FreeBSD installations, and I can tell that the huge benefit of source updating of only a few (<25) ports and to do pkg updating of the majority (>250) outweighs by far the gravity of the few issues that came up over the years, most of which I would have had in any case.
 
I'm not saying it can't be done but it requires quite a bit of knowledge of the ports system. Specifically understanding the consequences of enabling (or disabling) certain options. It's therefor not recommended to do so as it's quite easy to create conflicts and/or incompatible builds.

If you have to maintain a couple of servers I highly recommend setting up your own repository. That will give you all the benefits of customizations from building from ports while keeping the ease of use of packages. You really can have your cake and eat it too ;)
 
I'm not saying it can't be done but it requires quite a bit of knowledge of the ports system.
Would the concern that some people are not knowing what they are doing really justify to
... add a line in chapter 4 ... in bold big font "Do not mix the two; use one or the other". ...
?

Specifically understanding the consequences of enabling (or disabling) certain options. It's therefore not recommended to do so as it's quite easy to create conflicts and/or incompatible builds.
This is mostly a first installation concern and not a concern when updating, and this concern is also prevalent in single mode maintenance.

When updating, there is only one simple rule, "ports with non-default options should be updated from source, ports with default options may be updated from packages". Of course, people who have difficulties to understand this rule, don't want to mix the maintenance modes.

If you have to maintain a couple of servers I highly recommend setting up your own repository. That will give you all the benefits of customizations from building from ports while keeping the ease of use of packages. You really can have your cake and eat it too ;)
Your position on this has been noted several times, and I only keep on stating that other options are valid as well.
 
I would say that there's bit of mismatch in the Handbook on what the intended audience on that document is. I would definitely downplay the ports side of things heavily at first and just say that you want to start with the official packages first if you're not familiar with building software from sources on any level. Packages is a good starting point for just about anyone looking at FreeBSD and wanting to install software and they work just fine for most cases.
 
I would say that there's bit of mismatch in the Handbook on what the intended audience on that document is. I would definitely downplay the ports side of things heavily at first and just say that you want to start with the official packages first if you're not familiar with building software from sources on any level. Packages is a good starting point for just about anyone looking at FreeBSD and wanting to install software and they work just fine for most cases.
Yes, with that point of view I can agree by 100 %.

And perhaps we can agree, that anyone who want's to deviate from the default options of a port should be aware about the impact.

And given that, there would be only a last point left to agree upon, whether this awareness may be sufficient for dual mode maintenance or not. I tend to say yes.
 
I see no reason why this should be done. IMHO, it is an urban legend that dual maintenance of ports and packages is problematic. I am doing this with a simple script for about 2 years on my FreeBSD installations, and I can tell that the huge benefit of source updating of only a few (<25) ports and to do pkg updating of the majority (>250) outweighs by far the gravity of the few issues that came up over the years, most of which I would have had in any case.

Then how about ""Do not mix the two; use one or the other, unless you are an expert and know what you are doing". :D
 
Back
Top