Solved How to install a lot of own created packages?

For php81 with CMD]make package-recursive[/CMD] it has build 44 packages:
Code:
.                                  gmake-4.3_2.pkg                    libtool-2.4.7_1.pkg                pcre2-10.42.pkg
..                                 help2man-1.49.3.pkg                libxml2-2.10.3_1.pkg               perl5-5.32.1_3.pkg
ap24-mod_security-2.9.6.pkg        icu-72.1,1.pkg                     lua54-5.4.4.pkg                    php81-8.1.14.pkg
atf-0.21.pkg                       indexinfo-0.3.1.pkg                lutok-0.4_7.pkg                    pkg-1.19.0.pkg
autoconf-2.71.pkg                  kyua-0.13_5,3.pkg                  m4-1.4.19,1.pkg                    pkgconf-1.8.1,1.pkg
autoconf-switch-20220527.pkg       libargon2-20190702.pkg             mpdecimal-2.5.1.pkg                python39-3.9.16.pkg
automake-1.16.5.pkg                libedit-3.1.20221030,1.pkg         openssl-1.1.1s,1.pkg               readline-8.2.0.pkg
dejagnu-1.6.3.pkg                  libffi-3.4.4.pkg                   p5-Locale-gettext-1.07.pkg         sqlite3-3.40.1,1.pkg
expect-5.45.4_4,1.pkg              libiconv-1.17.pkg                  p5-Locale-libintl-1.33.pkg         tcl87-8.7.a5_1.pkg
gettext-runtime-0.21.1.pkg         libtextstyle-0.21.1.pkg            p5-Text-Unidecode-1.30.pkg         texinfo-6.8_3,1.pkg
gettext-tools-0.21.1.pkg           libtommath-1.2.0_1.pkg             p5-Unicode-EastAsianWidth-12.0.pkg
After copy them to another server, how do I install these packages without possible fetching other packages from the FreeBSD package repository.?
One package successively?
Or all together package in a long command line?
Or with given the environment variable, may be PACKAGES?
 
Most of these have been build dependencies. In other words they're only needed to build the packages. Just copy the whole directory to the server and use pkg add php81-8.1.14.pkg to install it from a local directory. Any run or library dependency would get installed from that same directory. The installation will fail if any of its dependencies are missing (which is unlikely if you copy the whole lot).
 
Another, maybe more convenient way to distribute, requires setting up a simple webserver to share the files, and pkg-repo(8) to generate the required catalog files. Then you can use a custom pkg.conf with a custom repository URL.

Speaking of the URL in a custom package repository, it can be any kind of URI, http:// or https:// is the most common, but file:// can be used to point the repository to a local repository directory too.

This works:
Code:
dicelan-server: {
  enabled: yes
  url: http://pkg.myownnetwork.example.com/packages/13-stable-server/
}
But this works too:
Code:
dicelan-server: {
  enabled: yes
  url: file:///usr/local/poudriere/data/packages/13-stable-server/
}

You can add a priority and have multiple repositories defined. But I typically just disable the FreeBSD repositories and only have my own custom one defined.
Add a /usr/local/etc/pkg/repos/FreeBSD.conf:
Code:
FreeBSD: { enabled: no }
This will disable the FreeBSD repositories completely.
 
Back
Top