How to pass custom options to port and understanding synth workflow

logicyan

New Member


Messages: 3

Peace be with you all . I am a new FreeBSD user , a noob (a 1 year old FreeBSD noob) so to say . I am currently on an experiment hype with FreeBSD trying to debloat my GUI workflow into CLI-only workflow . Handbook is awesome , i managed to get this far without actually asking a question to this forum . Ports is awesome , and after i learned how to use offline pkg repository with poudriere i am on a hype-train . My Gentoo experience is bad i instantly ditched it after so much effort that returns an error , so ZFS snapshot + poudriere is a wonder that a gentoo linux won't experience until a certain amount of effort .

So in my understanding /etc/make.conf will pass it's options globally and a custom make.conf overwrite the global one if conflicted . You set the options via poudriere-options or via make.conf using set and unset . So how do i pass a custom options for a certain number of ports , lets say misc/nnn with 0_ICONS and 0_NERD (according to the nnn github page) options to enable icons in the options , pkg info nnn don't actually show this options , and neither the port dialogue showed that possible option .

So how do i enable this options ?

Also i intended to try working with ports-mgmt/synth . After compiling , installing and reading the man page , This is my understanding of synth's workflow . You install synth , create a custom profile , pass the custom make.conf , create a port list file , use synth status to dry run , use synth prepare-system and synth install to build and install the package , and synth upgrade-system to actually recompile and performs ports update . Or should i use it like i use poudriere (disabling FreeBSD official repository and pass a configuration of local repository configuration) ?

Lastly , how do i preview a port's options before i installed it ? The one i knew is via port dialogue and pkg info but it is after i installed the ports . Please tell me if there are misunderstanding in my comprehenssion about what i knew .

Thanks .
 

Alain De Vos

Daemon

Reaction score: 362
Messages: 1,355

I keep it simple. I have a /usr/local/etc/poudriere.d/make.conf wich is just a softlink to /etc/make.conf.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,252
Messages: 37,426

So how do I pass a custom options for a certain number of ports , lets say misc/nnn with 0_ICONS and 0_NERD (according to the nnn github page) options to enable icons in the options , pkg info nnn don't actually show this options , and neither the port dialogue showed that possible option .

So how do I enable this options?
You don't. Not without significantly modifying the port's Makefile to add those options. At least in this case. Some ports have the familiar config option screens, those translate to specific options that the source code would support. Some port maintainers don't implement them. Some port maintainers implement all available changes. Some specific build options don't make sense on FreeBSD at all (support for certain Linux functionality for example). Even though the original source code might allow for those configuration options that doesn't mean they've been implemented in the port's Makefile.


Lastly , how do I preview a port's options before I installed it ?
make showconfig to print the set options. make config to set them, make rmconfig to revert to the defaults. See ports(7).
 
OP
L

logicyan

New Member


Messages: 3

make showconfig to print the set options. make config to set them, make rmconfig to revert to the defaults. See ports(7).
Thank you sir !

also what about from pkg side ? pkg search have it on it's man page , but i failed to understand how to use it for this use-case .
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,252
Messages: 37,426

You can't change options of a package. Those options are set when the port is built. Ports build packages. The packages in the official repositories are always built with the default options set. Those options are build time options and can only be changed when building from ports and/or by creating your own package repositories.
 
OP
L

logicyan

New Member


Messages: 3

You can't change options of a package. Those options are set when the port is built. Ports build packages. The packages in the official repositories are always built with the default options set. Those options are build time options and can only be changed when building from ports and/or by creating your own package repositories.

I mean only to view the available options not to change port's options
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,252
Messages: 37,426

pkg-info(8) will tell you the options the package was built with. There's also an alias pkg options git:
Code:
root@molly:~ # pkg options git
git - CONTRIB: on
git - CURL: on
git - CVS: off
git - GITWEB: off
git - GUI: off
git - HTMLDOCS: off
git - ICONV: on
git - NLS: on
git - P4: on
git - PCRE2: off
git - PERL: on
git - SEND_EMAIL: on
git - SUBTREE: on
git - SVN: off

As for looking at the options prior to installation, the easiest is to lookup the port on https://freshports.org. That's a good site in any case, it also allows you to see which version of the package is available for the latest and quarterly repositories for example.
 
Top