Solved Thinking of going ports...

I'm considering trying out a ports only system on my Thinkpad T430 - am I nuts? You tell me, I've rarely used anything from the ports side of the house (maybe drm kmod stuff). I usually just pkg install whatever and call it a day. But, I'm thinking of taking a walk on the wild side and doing ports. Is it even possible to live without pkg?

My questions for you folks are:
1. Is it possible/practical to never use pkg?
2. Is there anything special that I need to do after/during installation to prepare for ports use other than portsnap fetch extract after?
3. What does a typical ports based install of xfce look like (in weeks, days, hours, etc)?
 
I've gone that way, kicking and screaming. I started all-pkg, then mixed pkg with hand-compiled ports for a while (which sucks and is impossible to debug), then went all-portmaster (which sucks less, but is a waste of time and can still be near-impossible to debug).

Now, I've got a server that doubles as a poudriere build-box and hosts repositories for itself and two other FreeBSD machines. It's really smooth and satisfying.

I never actually wanted to take all these steps, but I can get obsessively individualist, and wanted to control every possible compile option. portmaster is nice for that, but it gets very little support in the community. Instead, you mostly hear: "Stop bothering with that, just use poudriere." Which is what I did, after grudingly resisting for a while, and grumbling the whole way about the complexity and learning curve of poudriere.

My compile times are in the minutes, but that's because I have no graphical desktops and make use of ccache. Even with "just" xfce, you're probably looking at compile times of half a day to two days.
 
1) Using ports only works just as good as using packages only. It takes more time, but allows you to simply tweak code to suit your needs.
2) Portsnap fetch/update, then take a look at /usr/ports/UPDATING, then start portupgrade or portmaster. I do that once a month.
3) In my case 2-3 days, but I take my time for it. Some build times on my hardware from 2014: llvm about 1.5 hour, libreoffice, xorg plus xfce about 3 hours. Once Xfce is running, I usually configure one port while building the next. Works perfectly well for me.
 
The main difference is that I stopped using Chromium browser it takes too long to compile.
Packages are just ports , done, and packaged by someone else.
 
Now, I've got a server that doubles as a poudriere build-box and hosts repositories for itself and two other FreeBSD machines. It's really smooth and satisfying.

I never actually wanted to take all these steps, but I can get obsessively individualist, and wanted to control every possible compile option. portmaster is nice for that, but it gets very little support in the community. Instead, you mostly hear: "Stop bothering with that, just use poudriere." Which is what I did, after grudingly resisting for a while, and grumbling the whole way about the complexity and learning curve of poudriere.
This sounds interesting... but, as you say, like a steep learning curve. How did you get started with poudriere?
 
1.) If you plan going full ports then go for quarterly not HEAD, less head pain. :)
2.) Before using/upgrading from ports always read /usr/ports/UPDATING.
3.) It depends on the machine on which the ports are compiled. In my case: base + Xorg+WM + some programs take a day and a half to have a full functionality system.

WARNING:
The following part is considered a hack and is dangerous if you don't know what you are doing. So use it carefully and on your own risk.
Since I don't have a lot of free time I do a mix between pkg and ports. Basically I install software from pkg quarterly repo, then use quarterly ports. After that I manually build packages from ports which are updated or from ports on which I've changed options (like ffmpeg with lame support, for e.g.).
 
Is it possible/practical to never use pkg?
Possible? Yes. Practical? Unless your system is really minimal, no. That's a loss of time and energy in my opinion, especially for large pieces of software where frequent security updates are expected (such as web browsers). I only build from source a few programs where I want/need other build options than default.
 
This sounds interesting... but, as you say, like a steep learning curve. How did you get started with poudriere?
There's a bazillion howto articles on building packages with poudriere, easy to find through Google. Most of them will do the job, but none of them is really good. They're mostly just a list of commands without useful explanations. It took me several attempts before I had the nerve to get it working, and then a lot more experimentation and frustration before I felt like I had a decent grip on how it actually works.

I guess I just … persisted ;)
 
The new tool www/gitup is supposed to work with quarterly too.

The following part is considered a hack and is dangerous if you don't know what you are doing. So use it carefully and on your own risk.
I don't think mixing quarterly packages with quarterly ports is any dangerous. At least I don't see why, and it's quite common practice. What can cause problems is mixing quarterly with latest.
 
I have used ports since I got with PC-BSD in 2005. It was only a couple months ago that I built my first system from scratch using pkg.

But even then I installed a snapshot of the ports tree so I could maintain full control and will use ports if there is a vulnerability that hasn't reached pkg just to keep it up to date.

It's running right now and hasn't presented any problems from mixing ports and pkg. If it does though I'm confident I can work it out from experience. Not everyone is able to do that so it's generally advised not to mix them.

I haven't moved to get and am not going to till they include the changeover in the next RELEASE version. It keeps me happy and my tutorial current. I'm still using the same commands I always have and ports-mgmt/portmaster for all my builds.
Code:
portsnap fetch extract ###For initial download only
portsnap fetch update
pkg audit -F
portmaster www/youtube_dl ###For new programs
portmaster youtube_dl ###To update existing programs

If it balks at installing a vulnerable program, which pkg will gladly install without informing you of the issue, I can step in and take it from there.
 
The new tool www/gitup is supposed to work with quarterly too.


I don't think mixing quarterly packages with quarterly ports is any dangerous. At least I don't see why, and it's quite common practice. What can cause problems is mixing quarterly with latest.
net/gitup works with quarterly and is doing the same as devel/git only with a fewer dependencies.
Mixing quarterly ports with quarterly packages is also dangerous because sometimes you break the dependencies chain. It may not occur as when mixing HEAD ports with quarterly packages but it happens.
 
Do you mean breaking dependencies by disabling options required for other ports to work? Then the same can be said about using ports only.

If you mean another kind of problem, please give an example because I don't see what could go wrong...
 
A virtual example. Let's say i have a web browser from the packages installed.
But i install a library from the ports collection and there i disable for instance language support.
The browser will call a function in the library which no longer exists and it will end ungracefully.
 
Once every three months i will let my pc run at night to compile the ports. But as power consumption 1 pc, monitors of, 4 nights in a year this seems acceptable to me.
 
Ok. So, I've installed my base system and I haven't run pkg yet. I want to install a port.. sudo. What's y'alls preferred method to do it? by hand - cd dir; make install or portmaster, or what? The handbook helpfully asserts that "Historically, most installations used either Portmaster or Portupgrade. Synth is a newer alternative."
 
I build ports-mgmt/portmaster first using make install clean then use it to build all programs that do not require a GUI like security/wipe.

Then X, the WM, FM, terminal, on to sound programs, then graphic programs like Gimp and finish with Firefox.

Edited to make sense.
 
I think you best start with portmaster or portmanager , and then something like compile shells/oksh.
Don't start whith compiling Chromium. Bad idea.
 
I have some more questions :)

When I make install a package, I am prompted for some options, some parts are compiled, then I am prompted for some more options and some more parts are compiled - surely this is a joke and I've missed the punchline.
Why not ask for all of the options up front?
Is there a way to have it go with default options and not interrupt the build?
Are the selected options the same as the binary package builds that pkg install would install?

I realize that eventually, I will want to change some options (otherwise, if that third question is answered affirmatively, why not just use pkg), but until I've done more research, I'll probably just accept defaults.
 
I have some more questions :)

When I make install a package, I am prompted for some options, some parts are compiled, then I am prompted for some more options and some more parts are compiled - surely this is a joke and I've missed the punchline.
Why not ask for all of the options up front?
Is there a way to have it go with default options and not interrupt the build?
Are the selected options the same as the binary package builds that pkg install would install?

I realize that eventually, I will want to change some options (otherwise, if that third question is answered affirmatively, why not just use pkg), but until I've done more research, I'll probably just accept defaults.
Code:
make config-recursive
 
I'm considering trying out a ports only system on my Thinkpad T430 - am I nuts? You tell me, I've rarely used anything from the ports side of the house (maybe drm kmod stuff). I usually just pkg install whatever and call it a day. But, I'm thinking of taking a walk on the wild side and doing ports. Is it even possible to live without pkg?

My questions for you folks are:
1. Is it possible/practical to never use pkg?
2. Is there anything special that I need to do after/during installation to prepare for ports use other than portsnap fetch extract after?
3. What does a typical ports based install of xfce look like (in weeks, days, hours, etc)?
No, you're not nuts... I said so in several other threads, but compiling locally has benefits (If your own machine does the compiling, the ports do have better performance than pre-compiled stuff done by a different processor, for starters).

To answer your questions:
  1. Yes, it is possible. How practical - depends on your willingness to read the manuals, do some planning, and pay attention. Some ports end up being marked as 'broken', like audio/lash. Some ports have no maintainers, like multimedia/aegisub. Even with paying attention, you gotta be willing to backtrack and troubleshoot (I do that all the time, for me it's part of the process).
  2. For # portsnap fetch extract, this is best done on a clean install of FreeBSD. Don't 'Start with pkg, then switch to ports'. Don't go mixing the two. During install, you may be asked to set options for a different port. Pay attention there! One of the biggest offenders is doxygen->ruby->graphviz. Compiling has its benefits, but one of the pitfalls is that you can end up specifying enough options to create a circular dependency. I've done enough compiling to know a few strategies for avoiding that.
  3. I haven't tried compiling XFCE, but I think that if you start from scratch like I recommend in item #2, and just go with default options the entire way.... even then, this is highly processor-dependent. My Ryzen 1400 would probably take about 5-6 hours, and most of that would be compiling dependencies like compilers. FreeBSD base only comes with clang, it will need to compile a couple LLVM versions along the way, and that time estimate does not even include the download time.
FWIW, I think there is a way to specify options up front, but I'd recommend against that. Right now, I'm trying to make this whole enchilada work with ZFS snapshotting as a way to go back if I mess up too much along the way. And I'm waiting on KDE Framework 5.83... that one will be a hell of an update/extract, just because of the way it's spread out through the ports tree. Fortunately, with ZFS, I can just rollback, re-get the ports tree and try again.
 
When I make install a package, I am prompted for some options, some parts are compiled, then I am prompted for some more options and some more parts are compiled - surely this is a joke and I've missed the punchline.
Those parts are called 'dependencies', and they need to be compiled first. The ports system first makes sure dependencies are present. If a dependency is not installed on the system, like libogg.so, the ports system will find the appropriate port and compile it for you. This works using the exact same logic as the pkg system. And the dependencies are no joke - stuff needs to be compiled/installed in a specific order, or else your whole system won't work. Being able to live with that is what it takes to use ports.
 
Back
Top