how to ignore jx prompts while installing ports

I'm installing freebsd-ports but during installation I'm getting prompts to select options. actually I'm not selecting any options instead just clicking OK button which I want in automated fashion since I'm running through shell scripts.
I have tried
make ports BATCH=yes but still I'm getting prompts.
 
I'm installing freebsd-ports but during installation I'm getting prompts to select options. actually I'm not selecting any options instead just clicking OK button which I want in automated fashion since I'm running through shell scripts
If you're going to stick to the defaults anyway why don't you simply install the packages?
 
As for the original question, there's no target ports, see ports(7). The BATCH knob works correctly, e.g. like
Code:
cd /usr/ports/www/firefox
make BATCH=1 install clean
would build and install firefox, no questions asked.

The value of BATCH doesn't matter, it just has to be defined.
 
Sorry, still i get the prompts.

Screenshot 2021-05-26 at 5.52.51 PM.png
 
Tell us exactly what you're doing because I have a feeling you're only showing just partial bits of information and have us guess what the problem could be. We're not clairvoyant, we can't see what you're doing, which commands you're executing and what you're expecting.
 
Tell us exactly what you're doing because I have a feeling you're only showing just partial bits of information and have us guess what the problem could be. We're not clairvoyant, we can't see what you're doing, which commands you're executing and what you're expecting.
i have few ports in /usr/ports directory example below port
databases/redis
and running below commands
make fetch-recursive
make install
make clean
and I'm getting prompts which I don't want since it's a blocker for me for automation.
 
Again, just use the packages if you're just going to build the port with the default options. There's nothing to gain by building from ports.

env ALWAYS_ASSUME_YES pkg install -y redis, done.
 
but we have 100's of ports which we cant run using above cmd. when we build ports it will generate target directory which we will copy that into our custom OS(embedded OS) directory then using that directory we will build OS, its like building everything on base machine and deploying into Our OS include ports and our custom configuration.
 
when we build ports it will generate target directory which we will copy that into our custom OS(embedded OS) directory then using that directory we will build OS
Ports build packages, so you're still using a package in the end. Might as well cut out all the useless compiling. Do you really think there's a difference between running make install in a port directory and running pkg install?
its like building everything on base machine and deploying into Our OS include ports and our custom configuration.
Code:
     -c <chroot path>, --chroot <chroot path>
             pkg will chroot in the <chroot path> environment.

     -r <root directory>, --rootdir <root directory>
             pkg will install all packages within the specified <root
             directory>.
See pkg(8)
 
So, you don't give the BATCH knob. Very strange it doesn't work then… (Heck what?)
sorry dont take me wrong, i was using those commands to install ports i mean before this question has raised. yeah i've tried make install BATCH=1 (also tried BATCH=yes someone said)but as i says still prompting shared screenshot above
 
Ports are meant to be configured to your specific needs. If you choose the defaults only, it's faster to install packages. What you can do is this: Run make config-recursive before make install clean. That way you get to see all config screens before the building process starts. Once you finished installing the ports that you need, all options you entered will be stored in /var/db/ports. If you want to do the same installation on another machine, copy the contents of /var/db/ports to that machine first. You can then install the same ports without the config screens, as the options in /var/db/ports will then be used.
 
There are a few reasons to build yourself:
  • Custom port options
  • Custom DEFAULT_VERSIONS
  • A target architecture that doesn't have an official pkg repository
Then, some think optimizations were a reason (e.g. setting a specific CPUTYPE). In practice, they aren't, effects won't even be measureable most of the time.

Short of all that, yes, building yourself doesn't make any sense.
 
Back
Top