FreeBSD packages and porting

I am wondering about certain packages in the repository. If it is a stupid question, then so be it but i really do not know the answer. I am new to FreeBSD.

I am used to being able to download software from various sources (sourceforge, github, official websites, etc) and install it on Windows and also on Linux. I know, from Linux, that software often has dependencies. However, Linux usually downloads and installs dependencies for us from the package manager. Yet one can extract a tar file in the Linux home directory and run the software. Windows is superior in this aspect, it just works and doesn't have these problems. I can install Microangelo 5.5 on Windows 10 and never hear the word dependency. So i am not used to this concept.

I know that FreeBSD is somehow able to run Linux software but certain (or most?) software needs ported. Yet i do not know the extent of ported software. For example, is nano ported to FreeBSD or can i download and install it from ftp.gnu.org? where can i find a list of pen source software that runs on FreeBSD without porting?

I want to archive certain software and its dependencies. I've started downloading today. I have grabbed gcc, gnu make, gzip, nano, and pkgconf. Then it dawned on me: can i even install these files on FreeBSD?

using sslsplit as my example: i have downloaded sslsplit-0.5.5.tar from the official site (roe.ch/SSLsplit) and i checked the freshports.org info about sslsplit. I grabbed libevent-2.1.12-stable.tar.gz, pkgconf-2.3.0.tar.xz and make-4.4.1.tar.lz dependencies from the website specified in the WWW category of their respective freshports.org pages. Would this not work? then, where can i get these files specifically for FreeBSD?

I hope that i have explained it well enough to get some replies. I'd like to archive my favorite software and its dependencies.

Thank you,
John
 
man pkg and see the handbook (https://docs.freebsd.org/en/books/handbook/ports/)

While you can download sources and compile them manually it's seldom needed. First use pkg, if that doesn't do everything you need you can compile from the ports tree (see the handbook), if all else fails you can download from the source and go from there.

pkg will cache the binary packages it downloads

If you use ports the ports will stay in user ports unless you do a make clean. The source files will be kept regardless. It will take care of dependencies for you. The only reason to use ports is if the compile options that were used for the packages don't include something you want. Mixing ports and pkgs can be done but you are probably better served using poudriere.

Try to live inside pkg if at all possible - at least in the beginning.

Depending on what you are doing you may not need gcc and gmake etc. They're available but freebsd tends toward llvm.

For example, you can just do something like

Code:
pkg install nano sslsplit gzip

And all the dependencies will be downloaded and installed.
 
Thank you for replying dkh. I typically install from pkg as i have yet to find a need for ports. The ports that i have installed for practice did not offer much in the way of customization. I'm sure that there are ports that exemplify customization for needed components not present in a standard package but i have yet to find a port with which i desire to use over the standard package.

The problem, for me, is that it really sucks to require internet after a new installation just for nano, doas and a few other packages. I would rather install offline. Is there a way to copy packages from the repository for offline installation?

As a matter-of-fact, i remember when i first tried Linux (circa 2003). I actually purchased Linux for $60.00 USD. I believe the name was Mandrake and it came with a manual and 6 discs: installation disc and packages. That was nice! I have been researching operating systems the past few months and i only find that Debian offers repository discs but, then, using some weird file downloading software instead of iso files 0.0 what happened to package isos? I think that i read about FreeBSD users making local copies of the repository, which is quite large. Is it possible to make copies of certain packages and their dependencies? Whenever i install FreeBSD on my laptop, i'd like to install nano, xorg and doas offline.
 
The Handbook is your friend:
-dvd1.iso: This file contains all of the files needed to install FreeBSD, its source, and the Ports Collection. It also contains a set of popular binary packages for installing a window manager and some applications so that a complete system can be installed from media without requiring a connection to the Internet. This file should be burned to optical media.
 
Hi Jose,

well, i assumed that the iso was just the system and i have not explored the dvd. Installation is very simple and i appreciate the efforts to make it so easy. Well done. However, i never imagined that additional packages are included in the dvd iso, so why read the documentation about it? now i know that i probably should have looked at this chapter. oops!

Thank you for pointing it out :) so i made a fresh installation to see how it works and everything went smoothe. I installed xorg, sudo, 7-zip and epiphany without a problem. Thanks for the tip!

I was surprised to see gnome and kde plasma-5 in the packages. However, nano is not present. I installed sudo, since doas is also not present. I prefer doas and probably because of sudo usage in Linux. I tried doas and i've been using it ever since. So i just need to maintain offline copies of nano and doas. The dvd iso has mostly what i need offline anyway. I just sometimes hate vi editor and nano make my life easier.

Thank you again, Jose. I hope that you have a splendid day,
John
 
Hi SirDice and drhowarddrfine,

SirDice sums it up as to why i seek the offline packages. I hope that noone is offended but vi gives me a headache. I know the history of vi and it i probably one of the most important and useful tools in the Unix world but coming from Windows it is a bit too much for me at times. I really prefer nano, as i used pico in the early 2000s. I also like doas, i guess because it is different than Linux sudo and su just feels like one should just login as root. Yes, i'm a stupid Windows user but i really like nano and doas.

Meantime, i decided to start reading more about pkg and i discovered fetch. I realized that i could copy the package and its dependencies. Awesome! FreeBSD is great :)

I typed the following into the shell:
Code:
$ mkdir ~/pkgo
$ sudo pkg fetch -o ~/pkgo -d -y nano

The packages were copied to the pkgo directory under a subdirectory named All. Fantastic! now i can just store these on a usb stick for offline installation. I want to replace my Windows 10 on the lapop that i am using to type this message. I am currently using FreeBSD in VirtualBox to gain experience before installing on my system. I also intend to try the memstick live boot to test my system with FreeBSD to find if any hardware causes a problem. I just want to be able to install nano and doas offline.

Hopefully, i have typed fetch in the manner that one should type it. I just followed the Handbook and selected the options that seemed to fit what i am trying to accomplish. It worked, so i am happy.

Thank you all very much and may you have a pleasant day,
John

PS sorry for placing this post in the off-topic category. I didn't know if it was correct to place it in the Installation and Maintenance of Ports or Packages forum because of the offline topic.
 
I hope that noone is offended but vi gives me a headache.
That's quite understandable. A 'simple' editor called ee(1) is included with the base OS.

sorry for placing this post in the off-topic category. I didn't know if it was correct to place it in the Installation and Maintenance of Ports or Packages forum because of the offline topic.
Don't worry about it. If something is misplaced we'll just move it.
 
Thank You, SirDice, ee is perfect. I can use that to configure the system before going online. I am happy about this ee editor. I didn't know that it exists. I have alot of learning to do but this forum helps speed things along with tips like this for newbies. I cannot thank you enough. I can avoid the offline nano package because i have a very similar editor to work with now.

I'm going to make a cup of coffee and play with this new toy :) I once learned QBasic on Windows XP and i made a similar menu system but i added a split table for navigation. ee kind of feels like my old Menu application (which, by the way, works similar to VisualBasic 1.0 console app). Awesome!
 

Attachments

  • ee.jpg
    ee.jpg
    61.2 KB · Views: 5
I have alot of learning to do but this forum helps speed things along with tips like this for newbies.
Another tip regarding the editor, edit ~/.shrc and/or ~/.cshrc (depends on the shell you're using) and set the EDITOR variable to ee(1). Commands like visudo(8), vipw(8) and many more respect the EDITOR environment variable and will open with that editor instead of the default vi(1).
 
Thank You, SirDice. I've edited my .profile file changing EDITOR=vi to EDITOR=ee. I logged out of the console and logged in again and it works. Excellent tip! Very helpful to newbies that struggle to bond with vi. I appreciate you very much. You have taught me alot in just a few posts. I somehow forgot about .shrc and .profile in the ocean of information that i've been absorbing lately. I use the defaul sh shell (Bourne shell, i think it is called.) I am happy with it. I guess that shell scripting could warrant a change to bash or something else but i prefer sh and i read about scripting using sh shell. I like it. I seem to like alot of defaults. LOL. I also like twm in xorg. vi is not horrible, it is just too much for me coming from Windows. I would have to slowly move to vi as a default editor. Right now, it is too much.

You are a Fantastic member of this forum and i certainly appreciate you :)

I hope that you have a great day. I am going to keep reading and learning...

John
 

Attachments

  • profile.jpg
    profile.jpg
    74.9 KB · Views: 5
Thank you for replying dkh. I typically install from pkg as i have yet to find a need for ports. The ports that i have installed for practice did not offer much in the way of customization. I'm sure that there are ports that exemplify customization for needed components not present in a standard package but i have yet to find a port with which i desire to use over the standard package.

The problem, for me, is that it really sucks to require internet after a new installation just for nano, doas and a few other packages. I would rather install offline. Is there a way to copy packages from the repository for offline installation?

As a matter-of-fact, i remember when i first tried Linux (circa 2003). I actually purchased Linux for $60.00 USD. I believe the name was Mandrake and it came with a manual and 6 discs: installation disc and packages. That was nice! I have been researching operating systems the past few months and i only find that Debian offers repository discs but, then, using some weird file downloading software instead of iso files 0.0 what happened to package isos? I think that i read about FreeBSD users making local copies of the repository, which is quite large. Is it possible to make copies of certain packages and their dependencies? Whenever i install FreeBSD on my laptop, i'd like to install nano, xorg and doas offline.
For customization, you do this:
Code:
# cd /usr/ports/category/port
# make config
(customize your ass off)
# make && make install

I myself tried Mandrake around the same time, but it was a free download, I just needed to burn some CDs.

Yeah, some people do maintain their own local FreeBSD repos. Those are prepared with help of Podriere. It's a fun rabbit hole that takes up a lot of time, brains, attention, and metal. If you only have a laptop with 4 GB of RAM, the Poudriere is not the best idea. People who play with Poudriere - they have a lot of storage, and powerful processors to handle the job.

But no, there's no good way to 'copy packages from repo' for offline installation later, that's not how pkg(8) operates.
 
Back
Top