make
is a tool using commands from a "recipe" to process input files to output files in a process that can cascade. So it might produce file_b from file_a, which is needed to produce file_c later. To do that automatically, the input to make
is a set of dependency rules (here, file_c "depends" on file_b) plus recipes which are short shell scripts required to do the actual processing. make
might fail when you forget to list a dependency. In the scenario above, if make
attempts to create file_c before it created file_b, this will obviously fail. Even worse, make
uses file timestamps to know which files are outdated and must be recreated. So, if you have a file_b from a previous build and file_c misses the dependency on it, it might be built using an older version of file_b. make
again inside this subdirectory, that has its own Makefile. This is somewhat simplified, but the main consequence is that you have to be very careful about the dependencies of these pseudo-targets, so the directories are built in the correct order (if you have errors there, they will typically manifest when building in parallel with make's -j
option), and it will result in whole directories being built even if only a single file would be needed. But it has a few advantages as well: The whole structure is easier to grasp than with ONE huge Makefile (possibly using includes from subdirectories), and you have an easy way to just build one individual directory by calling make
from in there. So, assuming you get the ordering correct, recursive make still has the one downside that it will build too much when only little parts changed. FreeBSD /usr/src uses recursive make and solves the problem of unnecessary build steps in a different way, see meta-mode. BUILD_DEPENDS
. And finally, you almost never use the recursive infrastructure of the ports tree, but instead build individual ports directly from within their directory. pkg
knows nothing about, and once you remove "libbar" (pkg will have no objections, nothing depends on it!), your "frobnicate" is suddenly broken. --batch
flag, which had its own problems and risks (for example: giving you large numbers of unwanted dependencies, such as with things that try to install x11 by default) --list-origins
is also a very useful flag if you're replicating a server.) -r
flag to portmaster, in case the library number has been incremented (which would cause Apache and other software depending on it be confused at its next restart). make install clean
worked fine though. This seems to be somewhat related to what Zirias describes above...* I rsync the ports to the server. I have my private repository on both machines set to a higher priority than the Freebsd quarterly repo. This allows me to install a mix of locally-built and standard ports
This allows me to install a mix of locally-built and standardportspackages.
You are correct! Post edited.As I understand, you are building packages from ports, so I assume that you rsync the built packages, correct? So should the last sentence not read...
I am not being grammar Nazi, but it seems to be important here, because of the repeated mantra of "not mixing [packages buit form] ports and packages", which is implied.
I've never tried synth, and don't intend to. I believe it builds and installs ports, not packages? My reasons for avoiding tools like portmaster and synth are:I further do not understand why would one want to do such. I have been using ports-mgmt/synth and its options allows to fetch and install a package if the inter-dependencies do not require build it. So, I give ports-mgmt/synth the port reference and if ports-mgmt/synth does not need to build, ports-mgmt/synth just downloads and - if instructed - installs the package.
That is not how I would describe it. My systems have a combination of packages built by Poudriere using standard options on Freebsd.org hardware and packages built by Poudriere using my options on my hardware.So, by having your locally-built and standard repository, you do mix packages buit from ports and standard packages, correct?
-c
option to ensure this); and it builds them on a fresh install of 12.2-RELEASE with absolutely nothing else installed in it. Packages built in this way are preferred over standard packages to ensure consistency. I do this before every run of pkg-upgrade(8).Yes, but Poudriere ensures that my nonstandard options are propagated to the entire tree of packages.I appreciate your willingness to explain your workflow, but I think that I am not knowledgeable enough to appreciate the difference. As I understand all the standard packages, to use your term, are built by Freebsd.org using Poudriere with the standard options. You are modifying options on some of the packages, but then use these packages and the standard packages. Thus, mixing packages build [with non-standard options] from ports and packages built with standard options.
OPTIONS_SET+=PGSQL
OPTIONS_UNSET+=MYSQL
This would be true iff ports options never changed. Fact is they do, and you'll wind up with an inconsistent set of options eventually if you mix packages and ports. Upgrades should be a transaction. Either all the ports in a dependency tree are updated at the same time or none are.thank you for the reply, but it seems that the example that you have given with the foo, bar, and baz supports my contention of mixing (packages build from) ports with standard packages, i.e., you build the non-standard package foo with Poudriere, and all the non-standard option is propagated through. Perfect.
I'm confused now. I thought your thesis was that you can mix ports and packages? I'm trying to prove the opposite.But, next you add a package with standard options, which causes the nightmare scenario that you describe. Thus, is this not what I described as mixing (packages build from) ports with standard packages? If not what am I missing?
This is the pain of the ports user, but at least you wind up with a consistent set of software installed. My main criticism of this approach is above, under "snowflake server".I originally asked about the specific statement because I have been building all the packages from ports, exactly to avoid the scenario described in your message above. Yes, it results in a lot of rebuilding if it is needed.
It sounds like what you're doing (installing everything from ports) works for you, and it's not inherently dangerous. The only reason I don't do that is that I like to have a small, reproducible set of steps to (re)-install and configure any Freebsd machine I maintain. You can come up with a set of steps for a ports-based approach, but it won't be small.Again, the fact that I do not understand does not mean that it does not work well for you.
The only reason I don't do that is that I like to have a small, reproducible set of steps to (re)-install and configure any Freebsd machine I maintain. You can come up with a set of steps for a ports-based approach, but it won't be small.
But I'm not mixing packages and ports. I'm mixing packages and packages. This can be bad too, if you build one-off packages, but that's not what I'm doing. I'm building consistent package sets.It has never been my thesis that mixing (packages build from) ports with standard packages is a good idea. In fact, if you look at my initial post (104), I was questioning how can you use both your built packages and the standard packages because that would constitute mixing (packages build from) ports with standard packages, which many posters, you among them, demonstrated to be a bad idea.
Because my local package repo has higher priority than the standard packages. My local packages will be installed preferentially over the standard ones. This ensures consistency.Based no the foregoing, I still do not understand how you can use both repositories and not have the problem you described.
Again, I don't know how Synth works, and I'm not going to find out. Assuming Synth allows you to build ad-hoc package sets based on the current state of the host system, the difference is that Poudriere always builds packages on what is basically a clean install of the build host. In my assumed Synth case, the state of the build host changes over time, which means that builds done today may be different from builds done tomorrow.This is another point I do not understand. You are building with Poudriere, I am building with synth. So, what is the difference you are alluding to?
I think we're on topic, but am willing to start a new one if you'd like.BTW, we have moved quite away of the original topic.
If you re-read my quote, you will notice that I am carefully specifying mixing (packages build from) ports with standard packages.But I'm not mixing packages and ports. I'm mixing packages and packages. This can be bad too, if you build one-off packages, but that's not what I'm doing. I'm building consistent package sets.
This is exactly the crux of my misunderstanding. Suppose that you issue a command to install a package. The local package repository is accessed first, but the requested package is not there. Thus the standard package repository is accessed next, the package is found and installed.Because my local package repo has higher priority than the standard packages. My local packages will be installed preferentially over the standard ones. This ensures consistency.
That cannot happen. Any package that is in the dependency graph of a package for which I want custom options will be built by Poudriere, and therefore will exist in my local package repo.This is exactly the crux of my misunderstanding. Suppose that you issue a command to install a package. The local package repository is accessed first, but the requested package is not there. Thus the standard package repository is accessed next, the package is found and installed.
All I can find on the subject is:As far as I understand it, synth is using the same build logic as Poudriere and. likewise, builds packages in a clean environment. I do think that it does a great job in handling dependencies because since 2016 when I started using it, I never had a problem. Of course, as mentioned above, unlike you I do not use a standard package repository, I build everything by synth.
https://github.com/jrmarino/synth(Synth) internally creates jail-like environments for each builder...
As understand, all the packages that may depend on the package build from ports will also be built. As I am reading your reply, you will install only packages from your local repository. Why then do you have the standard repository?That cannot happen. Any package that is in the dependency graph of a package for which I want custom options will be built by Poudriere, and therefore will exist in my local package repo.mefizto said:
This is exactly the crux of my misunderstanding. Suppose that you issue a command to install a package. The local package repository is accessed first, but the requested package is not there. Thus the standard package repository is accessed next, the package is found and installed.
I respectfully submit that none of may statement can be interpreted in this manner. Lest there be any misunderstanding, I am not trying to convince anybody about anything.Even if you could convince me that Synth is objectively superior to Poudriere, . . .
I use the standard repo packages when the standard options they were compiled with work for me.As understand, all the packages that may depend on the package build from ports will also be built. As I am reading your reply, you will install only packages from your local repository. Why then do you have the standard repository?
I didn't mean to imply that you were.I respectfully submit that none of may statement can be interpreted in this manner. Lest there be any misunderstanding, I am not trying to convince anybody about anything.
Ah, but how do you know that? In post #109, you have described a disastrous scenario caused by a "package baz" installed from the standard repository. Now, admittedly, you have added a disclaimer "without thinking".I use the standard repo packages when the standard options they were compiled with work for me.
You are right, my approach would not protect me in that case. The standard package would be installed, and it would not work with Mysql. However, I can never get a package bar that doesn't support Postgresql because that package is in the dependency graph for foo which is in my set of packages I build.Ah, but how do you know that? In post #109, you have described a disastrous scenario caused by a "package baz" installed from the standard repository. Now, admittedly, you have added a disclaimer "without thinking".