Solved Can I deploy a software into my home?

Dear friends,

Perhaps I already asked for this but I can't remember... ?

I used a Bastille jail to compile a foreign software that requires a couple GB of dependencies, so now that I got my binaries I copied the git directory into my home and destroyed the jail.

I tried to bind my git directory to the jail but the compiler was unable to look for the upper system directories therefore I compiled directly into the Bastille jail.

My question is can link/copy these binaries into, perhaps, ~/.local/bin/ and making FreeBSD aware that those binaries exist? Maybe it is another directories? I am aware that I can create aliases, it is just for the sake of curiosity, thanks! ?
 
You want the package at least at first, because it has all the files it needs to run, including runtime dependencies.

Use pkg info -l to see which programs are installed with that package first, many of which are needed. There's other pkg(8) including pkg-info(8) commands that would be helpful. Use pkg info | grep pkgname to find the exact name of your package for that to run those commands on.

Also, you'll have to tell your shell where to find additional binaries, libraries and other needed files. If not, you'll have to write the whole command with the location each time.
 
Use pkg info -l to see which programs are installed with that package first, many of which are needed. There's other pkg(8) including pkg-info(8) commands that would be helpful. Use pkg info | grep pkgname to find the exact name of your package for that to run those commands on.
That is assuming it's a software that exists as a package, of course. (Which may well be the case, I don't know ...)
 
sidetone dbdemon

Sorry guys, my fault, I didn't specify that is a foreign software that doesn't belong to the ports tree. This software produce stand alone binaries that do not requires any dependencies.

I apology for being so inaccurate! ?
 
In all honesty, I'd suggest keeping things simple. As in - don't try to compile stuff inside a jail just yet.

If OP wants to compile some out-of-ports-tree software with the intention of running it on FreeBSD, then yeah, create a $HOME/local/bin/ directory, and study the Makefile so that it spits the compiled binary into that directory...

I can also point OP to the Porter's Handbook - it contains good pointers for packaging out-of-ports-tree software. sidetone is right, packaging that software will make it easier to compile it within a jail, and then copy the resulting package. The package is easier to work with than the bare compiled binary.
 
astyle

I took a look at Porter's Handbook and I found it overwhelming but I am going to look again onto the section you guys pointed out!

Thanks! ?
 
When I built a new port from making a Makefile, it made a package out of it, so that's what I was familiar with.

The Porter's Handbook isn't easy. While, it's written in an adequate way for most that's needed, it has a minimal explanation, rather than one that's easier to pick up. A needed piece of information could be written in there once, without clues or references from other places in the handbook that need that information. The Slow Porting Chapters, require the Fast Porting chapters, because that information is a prerequisite, and it's labeled as if they're two different ways of porting. A lot on scripts (within the Makefile) for build, do-install, post install, and so forth are missing from the Porters Handbook. They're mentioned in there, but a port can fail to build at different stages, because of that. One time, I'll read it, and then, I'll read that and another part months later, and something else will click.

I'm not familiar with other ways of installing outside of making or hacking Makefile's, but I've seen a few mentioned or explained. I'm not sure if you can make a package out of it that way, or something like a package.


As for what you're doing, no matter how you install it, you have to tell your shell, where to find those files, or type out the whole directory and command each time. It's in the same file you set ALIAS's in, but it's not an ALIAS. It was your local .profile, .sh or other shell configuration file. In one of those files, you should find where your shell lists other bin directories for its use. But first, test if it runs, by going to the directory, and typing the executable name from there. The binary might need a ./ at the beginning, if you're running it from that directory.

Also, that program may need run time dependencies and required libraries in order to run. It will be a few libraries, and not build-only dependencies, but at least the ones listed as run time. A few other ports may be needed too. No matter where you copy your files, so most of those should be from FreeBSD packages. User made files can be put into a custom directory like /opt/, /usr/opt/ or as you put them in your home directory.

Ports/Packages might be able to be used in conjunction with custom installs. With ports-mgmt/portmaster, when you're depending on FreeBSD's Ports/Packages, you can set it to a combination of ports and packages, so it can build faster. There's an option to use ports for source which doesn't have a package, or to use packages only for build-only dependencies, or choose packages if a newer one exists.

Edited- clarified build time only dependencies not needed for copying to run the program, which is what I must have meant to write, so the sentence makes sense
 
Last edited:
Here what I made:

on my home, I modified the file .profile specifically this line:

Code:
>>>> FROM: <<<<
#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH

>>>> TO: <<<<
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/.local/bin; export PATH

Made a symbolic link form ~/Git/BLAH_BLAH/bin/sp to ~/.local/bin/, re-logged in and than:

Code:
sp --version
Version: 4.15.13

FreeBSD made for Pebcak users! ?
 
Back
Top