6.2 SMT Configuration Files

The SMT has a main configuration file: /etc/smt.conf. Most of the options in this file can be set using YaST SMT module (see Section 2.0, Configuring SMT Using YaST). Another important configuration file is /etc/smt.d/smt-cron.conf, which contains parameters for commands launched as SMT scheduled jobs.

6.2.1 /etc/smt.conf

The /etc/smt.conf file has several sections. The [NU] section contains the NU credentials and URL. The [DB] section contains the configuration of the MySQL database SMT uses. The [LOCAL] section includes other configuration data. The [REPORT] section contains the configuration of SMT reports. In the YOU9-* sections, the configuration for the smt-mirror-sle9 command can be found.

WARNING: The /etc/smt.conf contains passwords in clear text and its default permissions (640, root, wwwrun) make its content easily accessible with scripts running on the Apache server. Be careful with running other software on the SMT Apache server. The best policy is to use this server only for SMT.

[NU] Section of /etc/smt.conf

The following options are available in the [NU] section:

NUUrl

URL of the NU service. In most cases, it should contain the https://nu.novell.com/ URL.

NUUser

NUUser should contain the username for NU service. For information about getting mirroring credentials, see Section 3.1, Getting Mirror Credentials. This value can be set using YaST SMT Configuration module.

NUPass

NUPass is the password for the user defined in NUUser. For information about getting mirroring credentials, see Section 3.1, Getting Mirror Credentials This value can be set using the YaST SMT Configuration module.

[DB] Section of /etc/smt.conf

The three options defined in the [DB] section are used for configuring the database SMT uses. Currently, only MySQL is supported by SMT.

config

The first parameter of the DBI->connect Perl method used for connection to the MySQL database. The value should be in the form

dbi:mysql:database=smt;host=localhost

where smt is the name of the database and localhost the hostname of the database server.

user

The user for the database. The default value is smt.

pass

The password for the database user. The password can be set using the YaST SMT Configuration module.

[LOCAL] Section of /etc/smt.conf

The following options are available in the [LOCAL] section:

url

The base URL of the SMT server which is used to construct URLs of the catalogs available on the server. This value should be set by YaST automatically during installation. The format of this option should be: https://server.domain.tld/.

The URL can be changed manually for various reasons. For example, the administrator may choose to use the http:// scheme instead of https:// for performance reasons. Another reason may be using an alias (configured using CNAME in DNS) instead of the hostname of the server, for example http://smt.domain.tld/ instead of http://server1.domain.tld/.

nccEmail

E-mail address used for registration at the Novell Customer Center. This value can be set using the YaST SMT Configuration module.

MirrorTo

Determines the path to mirror to.

MirrorAll

If the MirrorAll option is set to true, the smt-ncc-sync script will set all catalogs that can be mirrored to be mirrored (DOMIRROR flag).

MirrorSRC

If the MirrorSRC option is set to false, no source RPM packages are mirrored.

forwardRegistration

Determines whether the clients registered at SMT should be registered at Novell Customer Center, too. If the forwardRegistration option is set to true, client registrations will be forwarded to Novell Customer Center. If the forwardRegistration option is set to false, no client registrations will be sent to Novell Customer Center.

rndRegister

Specifies a delay in seconds before registration of clients at Novell Customer Center. The value is a random number between 0 and 450, generated by the YaST SMT Configuration module. The purpose of this random delay is to prevent a high load on the Novell Customer Center server that would occur if all smt-register cronjobs connected at the same time.

HTTPProxy

If you do not want to use global proxy settings, specify the proxy to be used for HTTP connection here. Use the following form: http://proxy.example.com:3128.

If the proxy settings are not configured in /etc/smt.conf, the global proxy settings configured in /etc/syconfig/proxy are used. The global proxy settings can be configured using the YaST Proxy module.

The HTTPProxy also applies to the smt-mirror-sle9 script.

HTTPSProxy

If you do not want to use global proxy settings, specify the proxy to be used for HTTPS connection here. Use the form: http://proxy.example.com:3128.

If the proxy settings are not configured in /etc/smt.conf, the global proxy settings configured in /etc/syconfig/proxy are used. The global proxy settings can be configured using the YaST Proxy module.

The HTTPSProxy also applies to the smt-mirror-sle9 script.

ProxyUser

If your proxy requires authentication, specify a username and password here, using the username:password format.

If the proxy settings are not configured in /etc/smt.conf, the global proxy settings configured in /etc/syconfig/proxy are used. The global proxy settings can be configured using the YaST Proxy module.

Neither the ProxyUser value nor the global proxy authentication settings apply to the smt-mirror-sle9 script. For user authentication in smt-mirror-sle9 write the following in the /root/.wgetrc file: proxy_user=username proxy_password=password.

[REPORT] Section of /etc/smt.conf

The following options are available in the [REPORT] section:

reportEmail

A comma separated list of e-mail addresses to send SMT status reports to. This list can be set using YaST SMT Configuration Module.

reportEmailFrom

From field of report e-mails. If not set, the default root@hostname.domainname will be used.

mailServer

Relay mail server. If empty, e-mails are sent directly.

mailServerPort

Port of the relay mail server set in mailServer.

mailServerUser

User name for authentication to the mail server set in mailServer.

mailServerPassword

Password for authentication to the mail server set in mailServer.

smt-mirror-sle9 Sections of /etc/smt.conf

Each product to be mirrored by the smt-mirror-sle9 command has a separate predefined YOU9-* section in the /etc/smt.conf configuration file. /etc/smt.conf is not configured via the SMT database like the smt-mirror command, all configuration is contained in /etc/smt.conf.

mirror_prod

A product to be mirrored, for example Novell-Linux-Desktop.

mirror_archs

Comma separated list of architectures to be mirrored, for example i386,x86_64. Remove any architectures that do not need to be mirrored.

mirror_version

The version of the product to be mirrored, for example 9.

mirror

If you want to mirror this product, set mirror to true.

credentials

If you want to mirror this product, provide credentials in the user:password format.

Example /etc/smt.conf

Example 6-1 config/smt.conf

[NU]
NUUrl = https://nu.novell.com/
NUUser = exampleuser
NUPass = examplepassword

[DB]
config = dbi:mysql:database=smt;host=localhost
user = smt
pass = examplepassword

[LOCAL]
# Default should be http://server.domain.top/
url = http://smt.example.com/
# This e-mail address is used for registration at NCC 
nccEmail = exampleuser@example.com
MirrorTo = /srv/www/htdocs
MirrorAll = false
MirrorSRC = true
forwardRegistration = true
rndRegister = 91
# specify proxy settings here, if you do not want to use the global proxy settings
# 
# specify which proxy you want to use for HTTP connection
# in the form http://proxy.example.com:3128
HTTPProxy=
# specify which proxy you want to use for HTTPS connection
# in the form http://proxy.example.com:3128
HTTPSProxy=
# specify username and password if your proxy requires authentication
# in the form username:password
ProxyUser=

[REPORT]
# comma separated list of e-mail addresses where the status reports will be sent to
reportEmail = 
# from field of report mails - if empty it defaults to "root@<hostname>.<domainname>"
reportEmailFrom = 
# relay mail server - leave emtpy if mail should be sent directly
mailServer = 
mailServerPort = 
# mail server authentication - leave empty if not required
mailServerUser = 
mailServerPassword = 

[YOU9-Novell-Linux-Desktop]
mirror_prod = Novell-Linux-Desktop
mirror_archs = i386,x86_64
mirror_version = 9
mirror = false
credentials = 

[YOU9-Novell-Linux-Desktop-SDK]
mirror_prod = Novell-Linux-Desktop-SDK
mirror_archs = i386,x86_64
mirror_version = 9
mirror = false
credentials = 

[YOU9-Novell-Linux-POS]
mirror_prod = Novell-Linux-POS
mirror_archs = i386
mirror_version = 9
mirror = false
credentials = 

[YOU9-Open-Enterprise-Server]
mirror_prod = Open-Enterprise-Server
mirror_archs = i386
mirror_version = 9
mirror = false
credentials = 

[YOU9-SLES-SDK]
mirror_prod = SLES-SDK
mirror_archs = i386,ia64,ppc,s390,s390x,x86_64
mirror_version = 9
mirror = false
credentials = 

[YOU9-SUSE-CORE]
mirror_prod = SUSE-CORE
mirror_archs = i386,ia64,ppc,s390,s390x,x86_64
mirror_version = 9
mirror = false
credentials = 

[YOU9-SUSE-SLES]
mirror_prod = SUSE-SLES
mirror_archs = i386,ia64,ppc,s390,s390x,x86_64
mirror_version = 9
mirror = false
credentials =

6.2.2 /etc/smt.d/smt-cron.conf

The /etc/smt.d/smt-cron.conf configuration file contains options of the SMT commands launched as SMT scheduled jobs set using YaST (see Section 2.5, Setting the SMT Job Schedule with YaST). Cron is used to launch these scheduled jobs. The crontable is located in the /etc/cron.d/novell.com-smt file.

NCC_SYNC_PARAMS

Contains parameters of the smt ncc-sync command, if called as a part of an SMT scheduled job via cron. The default value is "-L /var/log/smt-ncc-sync.log".

MIRROR_PARAMS

Contains parameters of the smt mirror command, if called as a part of an SMT scheduled job via cron. The default value is "-L /var/log/smt-mirror.log".

REGISTER_PARAMS

Contains parameters of the smt register command, if called as a part of an SMT scheduled job via cron. The default value is "-r -L /var/log/smt-register.log".

REPORT_PARAMS

Contains parameters of the smt report command, if called as a part of an SMT scheduled job via cron. The default value is "--mail --attach -L /var/log/smt-report.log".