Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK)) by mollari.NetBSD.org (Postfix) with ESMTPS id 4E2B87A2D6 for ; Mon, 5 Dec 2016 22:21:43 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 9393C855B3; Mon, 5 Dec 2016 22:21:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 246B885581 for ; Mon, 5 Dec 2016 22:21:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id dOAB2k9KYt1a for ; Mon, 5 Dec 2016 22:21:41 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 5875785574 for ; Mon, 5 Dec 2016 22:21:41 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 5315EFBA6; Mon, 5 Dec 2016 22:21:41 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1480976501270880" MIME-Version: 1.0 Date: Mon, 5 Dec 2016 22:21:41 +0000 From: "Blue Rats" Subject: CVS commit: pkgsrc/devel/py-trytond/files To: pkgsrc-changes@NetBSD.org Reply-To: rodent@netbsd.org X-Mailer: log_accum Message-Id: <20161205222141.5315EFBA6@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk This is a multi-part message in MIME format. --_----------=_1480976501270880 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rodent Date: Mon Dec 5 22:21:41 UTC 2016 Added Files: pkgsrc/devel/py-trytond/files: logging.conf.example trytond.conf.example trytond.sh Log Message: Add example RCD file and sample configuration files. Forgot this yesterday. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-trytond/files/logging.conf.example \ pkgsrc/devel/py-trytond/files/trytond.conf.example \ pkgsrc/devel/py-trytond/files/trytond.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1480976501270880 Content-Disposition: inline Content-Length: 5352 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/devel/py-trytond/files/logging.conf.example diff -u /dev/null pkgsrc/devel/py-trytond/files/logging.conf.example:1.1 --- /dev/null Mon Dec 5 22:21:41 2016 +++ pkgsrc/devel/py-trytond/files/logging.conf.example Mon Dec 5 22:21:41 2016 @@ -0,0 +1,26 @@ +[formatters] +keys: simple + +[handlers] +keys: rotate, console + +[loggers] +keys: root + +[formatter_simple] +format: %(asctime)s] %(levelname)s:%(name)s:%(message)s +datefmt: %a %b %d %H:%M:%S %Y + +[handler_rotate] +class: handlers.TimedRotatingFileHandler +args: ('@VARBASE@/@PKGBASE@/trytond.log', 'D', 1, 30) +formatter: simple + +[handler_console] +class: StreamHandler +formatter: simple +args: (sys.stdout,) + +[logger_root] +level: INFO +handlers: rotate, console Index: pkgsrc/devel/py-trytond/files/trytond.conf.example diff -u /dev/null pkgsrc/devel/py-trytond/files/trytond.conf.example:1.1 --- /dev/null Mon Dec 5 22:21:41 2016 +++ pkgsrc/devel/py-trytond/files/trytond.conf.example Mon Dec 5 22:21:41 2016 @@ -0,0 +1,150 @@ +# Stock trytond.conf file based on doc/topics/configuration.rst. +# The defaults are listed as per the documentation. + +# ============================= +# Configuration file for Tryton +# ============================= + + +# The configuration file controls some aspects of the behavior of Tryton. +# The file uses a simple ini-file format. It consists of sections, led by a +# '[section]' header and followed by 'name = value' entries. + + +# Defines the behavior of the web interface. + +[web] + +# Defines the couple of host (or IP address) and port number separated by a +# colon to listen on. + +listen = localhost:8000 + +# Defines the hostname. + +#hostname = + +# Defines the root path served by `GET` requests. + +#root = /var/www/localhost/tryton + + +# Defines how the database is managed. + +[database] + +# Contains the URI to connect to the SQL database. The URI follows the RFC-3986. +# The typical form is: database://username:password@host:port/ + +# The available databases are: + +# PostgreSQL +# pyscopg2 supports two type of connections: +# - TCP/IP connection: `postgresql://user:password@localhost:5432/` +# - Unix domain connection: `postgresql://username:password@/` + +# SQLite +# The only possible URI is: `sqlite://` + +# MySQL +# Same as for PostgreSQL. + +#uri = sqlite:// + +# The directory where Tryton stores files and so the user running trytond +# must have write access on this directory. + +#path = /var/lib/trytond/ + +# A boolean value to list available databases. + +list = True + +# The number of retries when a database operational error occurs during a +# request. + +retry = 5 + +# The main language of the database that will be used for storage in the main +# table for translations. + +language = en_US + + +# Defines size of various cache. + +[cache] + +# The number of different models kept in the cache per transaction. + +model = 200 + +# The number of records loaded kept in the cache of the list. + +record = 2000 + +# The number of field to load with an `eager` :attr:`Field.loading`. + +field = 100 + + +# This section allows to override the default generated table name for a +# :class:`ModelSQL`. The main goal is to bypass limitation on the name length of +# the database backend. +# For example:: + +# [table] +# account.invoice.line = acc_inv_line +# account.invoice.tax = acc_inv_tax + +#[table] + + +# Activates SSL_ on all network protocols. + +#[ssl] + +# The path to the private key. + +#privatekey = + +# The path to the certificate. + +#certificate = + + +[email] + +# The SMTP-URL to connect to the SMTP server which is extended to support SSL +# and STARTTLS. The available protocols are: +# - smtp: simple SMTP +# - smtp+tls: SMTP with STARTTLS +# - smtps: SMTP with SSL + +uri = smtp://localhost:25 + +# Defines the default `From` address for emails sent by Tryton. + +#from = + + +[session] + +# The time in seconds until a session expires. + +timeout = 600 + + +# The server password used to authenticate from the client for database +# management tasks. It is encrypted using using the Unix crypt(3) routine. +# A password can be generated using this command line: +# python -c 'import getpass,crypt,random,string; print crypt.crypt(getpass.getpass(), "".join(random.sample(string.ascii_letters + string.digits, 8)))' + +#super_pwd = + + +[report] + +# The parameters for `unoconv`. + +unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext Index: pkgsrc/devel/py-trytond/files/trytond.sh diff -u /dev/null pkgsrc/devel/py-trytond/files/trytond.sh:1.1 --- /dev/null Mon Dec 5 22:21:41 2016 +++ pkgsrc/devel/py-trytond/files/trytond.sh Mon Dec 5 22:21:41 2016 @@ -0,0 +1,32 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: trytond.sh,v 1.1 2016/12/05 22:21:41 rodent Exp $ +# +# PROVIDE: trytond +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="trytond" +rcvar=${name} +command="@PREFIX@/bin/${name}@PYVERSSUFFIX@" +required_files="@PKG_SYSCONFDIR@/tryton/${name}.conf" +pidfile="@VARBASE@/run/${name}.pid" + +command_args="-c ${required_files} --pidfile ${pidfile} 2>&1 &" + +stop_cmd="trytond_stop" + +trytond_stop() +{ + if [ -e $pidfile ]; then + echo "Stopping trytond..." + kill -KILL `cat $pidfile` + else + echo "$pidfile not found. Server running?" + exit 7 + fi +} + +load_rc_config $name +run_rc_command "$1" --_----------=_1480976501270880--