Shell Non interactive installation

Hello everyone,

I am currently writing a script that I will run inside all my newly created FreeBSD 10 jails. To automate the entire process, I installed the packages using for example make -C /usr/ports/www/lynx BATCH=yes OPTIONS_FILE_SET="DEFAULT_COLORS NLS SSL" OPTIONS_FILE_UNSET="IPV6" install clean. Now this line of code does work, the problem that I have is that no configuration file gets created in /var/db/ports/ for that package.

The reason why I need a configuration file is that then I don't have to always remember what option I chose when I run portmaster -a.

Now I have no idea if swapping OPTIONS_FILE_SET with OPTIONS_SET will achieve what I want.

Could someone please advise? For your Information I use an sh shell script.

Thank you in advance.
Fred
 
Why don't you create your own repository and simply install your custom packages? No need to remember anything as poudriere would do that for you. You also keep your jails clean from all the build dependencies.
 
Why don't you create your own repository and simply install your custom packages? No need to remember anything as poudriere would do that for you. You also keep your jails clean from all the build dependencies.

Interested in reading more on this. Do you have anything you could share?
 
You can read Building Packages with Poudriere chapter of the handbook. Another post I recommand is the one of M.W. Lucas (he makes some interesting remarks on the naming of the jails). If it is just a local repo you want, you need to create a /usr/local/etc/pkg/repos/FreeBSD.conf similar to :
Code:
mypkg: {
  url  : "file:///usr/local/poudriere/data/packages/your_jail_name-your_portstree_name",
  enabled  : yes,
  mirror_type  : "none"
}

FreeBSD: {  enabled: no }
so pkg(8) uses your local repo.

----- Edit -----
I forgot, you also need to provide to poudriere a package list. You can obtain this package list with the following command pkg query -e '%a = 0' %o > pkglist. You will obtain a file containing all the packages you have asked pkg to install.
 
Back
Top