# Portmaster question



## fred974 (Nov 21, 2014)

Hello,

I use ports-mgmt/portmaster to keep my system up to date. I was wondering if there is anyway that when I update the system, I am not prompted to redo all the configuration for each package that I have installed. I have four jails and this is quite time consuming and I have also made the mistake in the past as it doesn't seem to remember the original settings I choose. The command I run is
`portmaster -a`


----------



## Crow (Nov 21, 2014)

If I understood you correctly you should check -G flag.
portmaster(8): _*-G* prevents 'make config'_


----------



## SirDice (Nov 21, 2014)

You only have to do that once, settings are stored in /var/db/ports/. Once set you will only get the configuration screens if options have changed or if it's something that hasn't been configured before.


----------



## fred974 (Nov 21, 2014)

SirDice , I haven't got a configuration file in /var/db/ports/ because the package was installed as part of a script inside the jail.
For example Nginx was install with

```
make -C /usr/ports/www/nginx BATCH=yes OPTIONS_FILE_SET="HTTP HTTP_DAV HTTP_FLV HTTP_GZIP_STATIC HTTP_PERL HTTP_REWRITE HTTP_SSL HTTP_STATUS HTTP_SUB FILE_AIO SPDY NAXSI WWW HTTP_ADDITION HTTP_CACHE HTTP_GEOIP HTTP_IMAGE_FILTER HTTP_REALIP" OPTIONS_FILE_UNSET="DEBUG DEBUGLOG IPV6 GOOGLE_PERFTOOLS HTTP_GUNZIP_FILTER HTTP_RANDOM_INDEX HTTP_SECURE_LINK HTTP_XSLT MAIL MAIL_IMAP MAIL_POP3 MAIL_SMTP MAIL_SSL CACHE_PURGE CTPP2 ECHO HEADERS_MORE HTTP_ACCEPT_LANGUAGE HTTP_ACCESSKEY HTTP_AUTH_DIGEST HTTP_AUTH_LDAP HTTP_AUTH_PAM HTTP_AUTH_REQ HTTP_DAV_EXT HTTP_EVAL HTTP_FANCYINDEX HTTP_MOGILEFS HTTP_NOTICE HTTP_PUSH HTTP_PUSH_STREAM HTTP_REDIS HTTP_RESPONSE HTTP_SUBS_FILTER HTTP_UPLOAD HTTP_UPLOAD_PROGRESS HTTP_UPSTREAM_FAIR HTTP_UPSTREAM_HASH HTTP_UPSTREAM_STICKY HTTP_ZIP ARRAYVAR DRIZZLE ENCRYPTSESSION FORMINPUT GRIDFS ICONV LET LUA MEMC MODSECURITY PASSENGER POSTGRES RDS_CSV RDS_JSON REDIS2 RTMP SET_MISC SFLOW SLOWFS_CACHE SRCACHE SUPERVISORD SYSLOG_SUPPORT TCP_PROXY UDPLOG XRID_HEADER XSS VIDEO HTTP_MP4 HTTP_MP4_H264" install clean
```

When I run `portmaster -a`, the sysrtem prompt me for the `make config` but doesn't keep the options that I had set when installing the package.

For example it unticks the 'SPDY' and  'NAXSI' option and ticks the 'IPV6' option which I don't want.

So will the -G flag be the solution for me?

Thank you


----------



## fred974 (Nov 21, 2014)

Just to clarify here, if I run `portmaster -aG`, will ports-mgmt/portmaster install the default value that comes with the package or will it keep my chosen configuration?

[ the [port] tag *requires* "category/portname" syntax -- Mod ]


----------



## SirDice (Nov 21, 2014)

If you run `make config-recursive` in for example www/nginx, do the settings get stored in /var/db/ports/?


----------



## fred974 (Nov 21, 2014)

Yes it does, so In the future, if I run `portmaster -aG`, will it use the configuration from /var/db/ports/?


----------



## SirDice (Nov 21, 2014)

It should, yes.


----------



## wblock@ (Nov 21, 2014)

Shouldn't OPTIONS_FILE_SET be OPTIONS_SET?  Otherwise, I suspect it is using that as a filename.


----------



## fred974 (Nov 21, 2014)

Sorry wblock@, could you explain I don't understand


----------



## wblock@ (Nov 21, 2014)

In your command line, you show 
	
	



```
OPTIONS_FILE_SET="HTTP HTTP_DAV ..."
```
 But it is specifying options, not giving the name of a file that contains options like the name implies. In /etc/make.conf, I use OPTIONS_SET to specify options.

So I think you are using the wrong variable, your options are being read from and written to a file named HTTP HTTP_DAV ..., and that explains the problems you are having.


----------



## fred974 (Nov 21, 2014)

So, if I understood everything here if I change

```
make -C /usr/ports/www/nginx BATCH=yes OPTIONS_FILE_SET="HTTP HTTP_DAV HTTP_FLV HTTP_GZIP_STATIC HTTP_PERL HTTP_REWRITE HTTP_SSL HTTP_STATUS HTTP_SUB FILE_AIO SPDY NAXSI WWW HTTP_ADDITION HTTP_CACHE HTTP_GEOIP HTTP_IMAGE_FILTER HTTP_REALIP" OPTIONS_FILE_UNSET="DEBUG DEBUGLOG IPV6 GOOGLE_PERFTOOLS HTTP_GUNZIP_FILTER HTTP_RANDOM_INDEX HTTP_SECURE_LINK HTTP_XSLT MAIL MAIL_IMAP MAIL_POP3 MAIL_SMTP MAIL_SSL CACHE_PURGE CTPP2 ECHO HEADERS_MORE HTTP_ACCEPT_LANGUAGE HTTP_ACCESSKEY HTTP_AUTH_DIGEST HTTP_AUTH_LDAP HTTP_AUTH_PAM HTTP_AUTH_REQ HTTP_DAV_EXT HTTP_EVAL HTTP_FANCYINDEX HTTP_MOGILEFS HTTP_NOTICE HTTP_PUSH HTTP_PUSH_STREAM HTTP_REDIS HTTP_RESPONSE HTTP_SUBS_FILTER HTTP_UPLOAD HTTP_UPLOAD_PROGRESS HTTP_UPSTREAM_FAIR HTTP_UPSTREAM_HASH HTTP_UPSTREAM_STICKY HTTP_ZIP ARRAYVAR DRIZZLE ENCRYPTSESSION FORMINPUT GRIDFS ICONV LET LUA MEMC MODSECURITY PASSENGER POSTGRES RDS_CSV RDS_JSON REDIS2 RTMP SET_MISC SFLOW SLOWFS_CACHE SRCACHE SUPERVISORD SYSLOG_SUPPORT TCP_PROXY UDPLOG XRID_HEADER XSS VIDEO HTTP_MP4 HTTP_MP4_H264" install clean
```
to
	
	



```
make -C /usr/ports/www/nginx BATCH=yes OPTIONS_SET="HTTP HTTP_DAV HTTP_FLV HTTP_GZIP_STATIC HTTP_PERL HTTP_REWRITE HTTP_SSL HTTP_STATUS HTTP_SUB FILE_AIO SPDY NAXSI WWW HTTP_ADDITION HTTP_CACHE HTTP_GEOIP HTTP_IMAGE_FILTER HTTP_REALIP" OPTIONS_FILE_UNSET="DEBUG DEBUGLOG IPV6 GOOGLE_PERFTOOLS HTTP_GUNZIP_FILTER HTTP_RANDOM_INDEX HTTP_SECURE_LINK HTTP_XSLT MAIL MAIL_IMAP MAIL_POP3 MAIL_SMTP MAIL_SSL CACHE_PURGE CTPP2 ECHO HEADERS_MORE HTTP_ACCEPT_LANGUAGE HTTP_ACCESSKEY HTTP_AUTH_DIGEST HTTP_AUTH_LDAP HTTP_AUTH_PAM HTTP_AUTH_REQ HTTP_DAV_EXT HTTP_EVAL HTTP_FANCYINDEX HTTP_MOGILEFS HTTP_NOTICE HTTP_PUSH HTTP_PUSH_STREAM HTTP_REDIS HTTP_RESPONSE HTTP_SUBS_FILTER HTTP_UPLOAD HTTP_UPLOAD_PROGRESS HTTP_UPSTREAM_FAIR HTTP_UPSTREAM_HASH HTTP_UPSTREAM_STICKY HTTP_ZIP ARRAYVAR DRIZZLE ENCRYPTSESSION FORMINPUT GRIDFS ICONV LET LUA MEMC MODSECURITY PASSENGER POSTGRES RDS_CSV RDS_JSON REDIS2 RTMP SET_MISC SFLOW SLOWFS_CACHE SRCACHE SUPERVISORD SYSLOG_SUPPORT TCP_PROXY UDPLOG XRID_HEADER XSS VIDEO HTTP_MP4 HTTP_MP4_H264" install clean
```
A configuration file should get created in in /var/db/ports/ for that package.

Then when In the future, if I run `portmaster -aG`, it will use the configuration from /var/db/ports/ and not ask me to do the configuration again.

Have I got this right?


----------



## wblock@ (Nov 22, 2014)

I think so, yes.


----------



## kpa (Nov 22, 2014)

I think if you use BATCH the creation of the options file under /var/db/ports gets skipped and the port is compiled with either the default options or if there are already saved options they will be used but no options dialog will be used either way.


----------



## fred974 (Nov 24, 2014)

Umm I'm confuse*d*, if I don't use BATCH, then I cannot do a silent installation. So how do I get around this problem? Can I create the option file manually? How would I do that?


----------

