commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r10034 - in trunk/gnue-common: . doc etc packaging/fink packaging


From: reinhard
Subject: [gnue] r10034 - in trunk/gnue-common: . doc etc packaging/fink packaging/win32 src/apps src/base utils
Date: Mon, 2 Nov 2009 10:59:56 -0600 (CST)

Author: reinhard
Date: 2009-11-02 10:59:56 -0600 (Mon, 02 Nov 2009)
New Revision: 10034

Added:
   trunk/gnue-common/etc/backends.conf
   trunk/gnue-common/etc/gnue.conf
Removed:
   trunk/gnue-common/etc/sample.connections.conf
   trunk/gnue-common/etc/sample.gnue.conf
   trunk/gnue-common/etc/sample.log.conf
Modified:
   trunk/gnue-common/INSTALL
   trunk/gnue-common/MANIFEST.in
   trunk/gnue-common/doc/configuration.txt
   trunk/gnue-common/packaging/fink/gnue-common-py.info
   trunk/gnue-common/packaging/fink/install-mac-os-x.txt
   trunk/gnue-common/packaging/win32/gnue-common.iss.dist_template
   trunk/gnue-common/setup-svn.py
   trunk/gnue-common/setup.py
   trunk/gnue-common/setup.svn
   trunk/gnue-common/src/apps/GConfig.py
   trunk/gnue-common/src/base/setup.py
   trunk/gnue-common/utils/generate-gnue-config.py
   trunk/gnue-common/utils/release
Log:
Reworked installation of configuration files.


Modified: trunk/gnue-common/INSTALL
===================================================================
--- trunk/gnue-common/INSTALL   2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/INSTALL   2009-11-02 16:59:56 UTC (rev 10034)
@@ -1,64 +1,51 @@
-Installation Instructions for GNUe Common
-=========================================
+Installation instructions for GNUe Common Library
+=================================================
 
+
 Requirements
 ------------
 
-* Python 2.3+
+To install gnue-common, you need at least the following prerequisites
+installed on your system [Debian packages in brackets]:
 
+* Python 2.3 or greater [python python-dev]
 
-General Information
--------------------
+* optionally, one of the following database interfaces, depending on the
+  database you want to use:
+  - psycopg (preferred for PostgreSQL) [python-psycopg]
+  - pyPgSQL (also possible for PostgreSQL) [python-pgsql]
+  - pygresql (also possible for PostgreSQL) [python-pygresql]
+  - python-mysqldb (for MySQL) [python-mysqldb]
+  - KInterbasDB (for Interbase/Firebird) [python-kinterbasdb]
+  - MaxDB (for MaxDB) [python-maxdb]
+  - PySQLite (for SQLite2) [python-sqlite]
+  - PySQLite2 (for SQLite3) [python-pysqlite2]
+  You can find more information about possible database backends on the web
+  page http://www.gnuenterprise.org/tools/common/databases/.
 
-On Apple Mac OS X (using Fink)
-  
-  Use the document at doc/install-mac-os-x.txt
+You also need a running database server (one of those supported by GNUe) on the
+local or on a remote machine, and you need the corresponding database client
+installed on the local machine.  We very much recommend that you make sure that
+you can access the database with the databases's normal client tools before you
+try to install gnue-common.
 
-On all other systems
 
-  for standard system-wide install
-  ./setup.py install
-    (if you don't do this as root, you have to set
-     PYTHONPATH=/usr/local/gnue/lib/python to make gnue work)
+Installation
+------------
 
-  for install in home-directory (POSIX only)
-  ./setup.py install --home=~/gnue --install-scripts=~/bin
-    (you have to add "PYTHONPATH=~/gnue/lib/python" to your .profile)
+* Make sure that you have write permission in the directory /usr/local and its
+  subdirectories.
 
-  for packagers we recommend (POSIX only)
-  ./setup.py install --prefix=/usr --root=...
+* From the shell prompt, change into the directory containing the file
+  "setup.py" and type "./setup.py install --prefix=/usr/local".  If you have
+  all prerequisites installed, the installation process should run without
+  errors.  If any error occures although you have fulfilled all dependencies
+  described above, this is probably a bug, either in the installation program
+  or in the documentation.  Please report it.
 
-  for help:
-  ./setup.py install --help
 
-  If you don't have write access to Python's standard directory for
-  site-specific packages (/usr/lib/pythonx.y/site-packages on Posix systems),
-  you will get a message that you have to set the PYTHONPATH variable. Do it.
+Configuration
+-------------
 
-
-On *nix based machine
-  Switch to  the etc directory under your install directory.
-  On my system that is
-
-  /usr/local/gnue/etc
-
-  Rename the sample.gnue.conf to gnue.conf.  Make any optional changes you like
-  to this file.
-
-
-On Windows machine
-
-  Switch to the etc directory under your python install dir.
-  On my system that is
-
-  C:\python23\etc
-
-  Rename the sample-windows.gnue.conf to gnue.conf.  Make any optional changes
-  you like to this file.
-
-On all systems
-
-  You should also rename sample.connections.conf to connections.conf and edit
-  it to reflect the databases you wish to access frequently.
-
-  See doc/configuration.txt for more information
+Please refer to the file "configuration.txt" in the "doc" directory for a
+explanation of the necessary configuration steps.

Modified: trunk/gnue-common/MANIFEST.in
===================================================================
--- trunk/gnue-common/MANIFEST.in       2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/MANIFEST.in       2009-11-02 16:59:56 UTC (rev 10034)
@@ -6,13 +6,12 @@
 include NEWS
 include README
 include THANKS
-include setup.cfg.in
 
 include doc/*
 include doc/man/*
 include doc/technotes/*
 
-include etc/sample.*
+include etc/*
 
 include images/*
 

Modified: trunk/gnue-common/doc/configuration.txt
===================================================================
--- trunk/gnue-common/doc/configuration.txt     2009-11-02 08:55:21 UTC (rev 
10033)
+++ trunk/gnue-common/doc/configuration.txt     2009-11-02 16:59:56 UTC (rev 
10034)
@@ -19,23 +19,21 @@
 Note that you do not yet create the actual database on the database server.
 
 
-2. Set up your connections.conf
--------------------------------
+2. Set up your backends.conf
+----------------------------
 
-The most important configuration file for GNU Enterprise is "connections.conf".
+The most important configuration file for GNU Enterprise is "backends.conf".
 On Posix compatible systems (like GNU/Linux) you will find this file in the
-"/etc/gnue" directory (for prepackaged versions) or in the 
"/usr/local/gnue/etc"
-directory (if you installed from the source packages).  Alternatively, all GNU
-Enterprise tools accept a "--connections" paramter that overrides the location
-of the connections.conf file.
+"/etc/gnue" directory (for prepackaged versions) or in the "/usr/local/etc"
+directory (if you installed from the source packages).
 
 On the machine running GNU Enterprise, you must have an entry in the
-connections.conf pointing to your database. In three tier configurations using
+backends.conf pointing to your database. In three tier configurations using
 GNUe AppServer, the machine running the user interface must have an entry
 pointing to the running appserver, while the machine on which GNUe AppServer
 runs must have an entry pointing to the backend database.
 
-Example for a correct connections.conf entry pointing to a PostgreSQL database:
+Example for a correct backends.conf entry pointing to a PostgreSQL database:
 
   [gnue]
   comment = My Database
@@ -46,7 +44,7 @@
   password = secret
 
 [gnue]: the name of the database connection.  You can define several
-  connections to different databases in the same connections.conf file.  Please
+  connections to different databases in the same backends.conf file.  Please
   refer to the documentation of each GNUe tool to find out more about how to
   define which connection should be used.
 

Copied: trunk/gnue-common/etc/backends.conf (from rev 10027, 
trunk/gnue-common/etc/sample.connections.conf)
===================================================================
--- trunk/gnue-common/etc/backends.conf                         (rev 0)
+++ trunk/gnue-common/etc/backends.conf 2009-11-02 16:59:56 UTC (rev 10034)
@@ -0,0 +1,38 @@
+# Database Backends Configuration for GNU Enterprise
+
+# See http://www.gnuenterprise.org/tools/common/databases/ for a complete list
+# of supported databases.
+
+# -----------------------------------------------------------------------------
+# Examples:
+
+# SQLite3
+;[my-sqlite3-database]
+;provider = sqlite3
+;dbname = /home/gnue/database.db
+
+# MySQL
+;[my-mysql-database]
+;provider = mysql
+;host = localhost
+;dbname = gnue
+
+# Firebird
+;[my-firebird-database]
+;provider = interbase
+;host = localhost
+;dbname = gnue
+
+# PostgreSQL
+;[my-postgres-database]
+;provider = postgresql
+;host = localhost
+;dbname = gnue
+
+# GNU Enterprise Application Server
+;[appserver]
+;provider = appserver
+;rpctype = xmlrpc
+;host = localhost
+;port = 8765
+;transport = http

Copied: trunk/gnue-common/etc/gnue.conf (from rev 10027, 
trunk/gnue-common/etc/sample.gnue.conf)
===================================================================
--- trunk/gnue-common/etc/gnue.conf                             (rev 0)
+++ trunk/gnue-common/etc/gnue.conf     2009-11-02 16:59:56 UTC (rev 10034)
@@ -0,0 +1,316 @@
+
+# Options for GNUe
+#
+# Copyright 2001-2006 Free Software Foundation
+#
+# This file is part of GNU Enterprise
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 3, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# Note: pointers to files and dirs are relative to the installation
+#       location of GNUe.
+
+
+##############################################################################
+# Common Configuration Options for GNUe                                      #
+##############################################################################
+[common]
+# Encoding for XML headers and for fonts in forms. Like iso8859-1, iso8859-13.
+;textEncoding = ANSI_X3.4-1968
+
+# A comma-separated list of directories to be added to the python search 
+# path to add custom functionality.
+;ImportPath = 
+
+# If set to true, then store trigger definitions in <![CDATA[ .. ]]> blocks, 
+# instead of encoding with &lt; etc.
+;StoreTriggersAsCDATA = True
+
+
+
+##############################################################################
+# Configuration Options for GNUe Forms Client                                #
+##############################################################################
+[forms]
+# The default user interface driver to use if not specified on the command 
+# line.
+# Valid options / examples:
+#   curses
+#   wx26
+#   gtk2
+#   qt3
+#   html
+#   win32
+;DefaultUI = wx26
+
+# The default value stored in the database for True values (usual values are 
+# 1 or Y).
+;checkboxTrue = Y
+
+# The default value stored in the database for false values (usual values 
+# are 0 or N).
+;checkboxFalse = N
+
+# Set to "True" if you want <ENTER> to insert newlines in multirow entries.
+# Even if set to false, Shift+Enter will insert a newline.
+;EnterIsNewLine = True
+
+# Enable caching of detail data.
+# If set to True (default), then always cache detail data in a master/detail 
+# set. The benefits of this method is performance. The downsize to this 
+# method is that records are cached so any changes made elsewhere are not 
+# reflected in the cached records.
+# If set to false, then only cache detail data if it has unposted changes. 
+# The benefits of this method are that if another user modifies data and 
+# saves, then it will be available to your form much quicker.
+;CacheDetailRecords = True
+
+# Mask for viewing date fields (without quotes).
+;DateMask = %x
+
+# Mask for editing date fields (without quotes).
+;DateEditMask = %x
+
+# Mask for viewing time fields (without quotes).
+;DateMask_Time = %X
+
+# Mask for editing time fields (without quotes).
+;DateEditMask_Time = %X
+
+# Mask for viewing timestamp fields (without quotes).
+;DateMask_Timestamp = %x %X
+
+# Mask for editing timestamp fields (without quotes).
+;DateEditMask_Timestamp = %x %X
+
+# Grouping pattern used for thousands separating and definition of the 
+# decimal point. Format: <thousand separator><number of digits><decimal 
+# separator>.  The pair <thousand separator><number of ditigs> can be 
+# repeated multiple times. Example: ,3.
+;numeric_grouping = 
+
+# Location of startup graphic (PNG format)
+;SplashScreenPNG = gnue-splash.png
+
+# Disable the startup splashscreen.
+;DisableSplash = False
+
+# Location of GNUe login logo (PNG format).
+;loginPNG = gnue.png
+
+# Location of GNUe login logo (BMP format). The win32 uidriver accepts only 
+# BMP format.
+;loginBMP = gnue.bmp
+
+# The default height of widgets for widgets that don't specify height in .
+# gfd file.
+;widgetHeight = 1
+
+# The default width of widgets for widgets that don't specify width in .gfd 
+# file.
+;widgetWidth = 10
+
+# The next 3 options are only used by the wxPython and theWin32 clients.
+# Normally, default font style and size is used, according to the active 
+# theme.
+# Set to true if wxWidgets or Win32 clients should use a fixed width font.
+;fixedWidthFont = False
+
+# If fixedWidthFont is set to true, then this is the point size used for 
+# fonts.
+;pointSize = 0
+
+# If fixedWidthFont is set to true, then this is the face name used for fonts.
+;faceName = 
+
+# The color of a highlighted (ie focused) widget. Leave empty if you don't 
+# want highlight. Format is: "RRGGBB", each digit being hexadecimal.
+;focusColor = 
+
+# The color of even rows in a grid widget. Format is either "RRGGBB", each 
+# digit being hexadecimal or a color name as specified in wx.lib.colourdb.
+;grid_color_even = PALE TURQUOISE
+
+# The color of odd rows in a grid widget. Format is either "RRGGBB", each 
+# digit being hexadecimal or a color name as specified in wx.lib.colourdb.
+;grid_color_odd = LIGHT STEEL BLUE
+
+# Text used to concatenation dropdown descriptions (when multiple 
+# description fields are used)
+;DropdownSeparator = , 
+
+# The default icon set.
+;IconSet = auto
+
+# Use asterisk (*) for wildcards in addition to percent (%)
+;AsteriskWildcard = True
+
+# Change all non-ASCII-characters in a query into a "_"
+;fake_ascii_query = False
+
+# Set path for include files for HTML UI driver for GNUe Forms
+;htmlui_include_path = Z:X:
+
+
+
+##############################################################################
+# Configuration Options for GNUe Reports                                     #
+##############################################################################
+[reports]
+# The default location for filter files.
+;FiltersDir = filters
+
+# The default location for grd files.
+;filters = report-filters.conf
+
+# The default destination type if none specified on command line.
+;DefaultDestinationType = file
+
+# The default destination if none specified on command line.
+;DefaultDestination = -
+
+# The default filter if none specified on command line.
+;DefaultFilter = raw
+
+# The default adapter for -D file.
+;FileAdapter = text
+
+# The default adapter for -D email.
+;EmailAdapter = sendmail
+
+# The default adapter for -D printer.
+;PrinterAdapter = bsd
+
+# The default adapter for -D fax.
+;FaxAdapter = hylafax
+
+# The sendmail binary name.
+;SendmailBin = sendmail
+
+# The email address to put in the "From" line of generated email
+;SendmailFrom = GNUe Reports <address@hidden>
+
+# The text to put in the Subject line of generated email.
+;SendmailSubject = Your Requested Report
+
+# The commandline to be run when sending report output to a fax.
+;HylafaxCommand = sendfax -d %s
+
+# The commandline to be run when sending report output to a printer.
+#  (%s will be replaced with the printer name.)
+# Valid options / examples:
+#   LprCommand = /usr/bin/lpr -P%s
+#   LprCommand = print /d:%s #Windows
+;LprCommand = /usr/bin/lpr -h -P%s
+
+
+
+##############################################################################
+# Configuration Options for GNUe Navigator                                   #
+##############################################################################
+[navigator]
+# Command to execute on .gfd files.
+;RunFormCommand = gnue-forms
+
+# Command to execute on .grd files.
+;RunReportCommand = gnue-reports
+
+# Directory to search for .gfd files.
+;FormDir = forms
+
+# Directory to search for .grd files.
+;ReportDir = reports
+
+# Directory to search for .gpd files.
+;ProcessDir = navigator
+
+# Do not open separate window to display a GNUe Form.
+;embedForms = True
+
+# The number of seconds to display the hourglass when launching a program.
+;hourglassDelay = 5
+
+
+
+##############################################################################
+# Configuration Options for GNUe Application Server                          #
+##############################################################################
+[appserver]
+# Depreciated: Name of the database connection appserver is using. Use 
+# connection instead.
+;database = 
+
+# Name of the database connection appserver is using
+;connection = gnue
+
+# RPC Interface Type appserver is providing
+;rpctype = xmlrpc
+
+# Port (if needed) for RPC Interface
+;rpcport = 8765
+
+# Hosts which are allowed to access appserver
+;allowed_hosts = 
+
+# Hostname of the interface to bind services to
+;bindto = 
+
+# Null values appear first in ascending sort
+;null_first_asc = True
+
+# Null values appear first in descending sort
+;null_first_dsc = True
+
+# Semicolon-separated list of paths to load modules from
+;modulepath = /home/reinhard/gnue/share/gnue/appserver
+
+# Type of UUID to use. Can be 'time' or 'random'
+;uuidtype = time
+
+# Directory for webfrontend http documents
+;httpdir = /this_dir_shouldn't exist.
+
+# Type of the HTTP server to use. Can be 'threading' or 'forking'
+;servertype = forking
+
+
+
+##############################################################################
+# Configuration Options for GNUe Designer                                    #
+##############################################################################
+[designer]
+# Automatically log in to needed connections to do schema.
+;AutoConnect = True
+
+# Use syntax highlighting in the trigger editor.
+;ColorizeCode = True
+
+# Use the basic editor for triggers.
+;ForceSimpleEditor = False
+
+# Fudge factor for altering widget size
+;BorderPercentage = 100.0
+
+# Fudge factor for altering text size
+;TextPercentage = 100.0
+
+# Location of "Insert" toolbar icon (PNG format)
+;tb_insert = /tb_new.png
+
+# Location of "Delete" toolbar icon (PNG format)
+;tb_delete = tb_trash.png
+

Deleted: trunk/gnue-common/etc/sample.connections.conf
===================================================================
--- trunk/gnue-common/etc/sample.connections.conf       2009-11-02 08:55:21 UTC 
(rev 10033)
+++ trunk/gnue-common/etc/sample.connections.conf       2009-11-02 16:59:56 UTC 
(rev 10034)
@@ -1,41 +0,0 @@
-
-# This connection uses the PostgreSQL "psycopg" driver
-# and also creates two aliases, dcl and test, for itself.
-# We will be connecting to the postgresql server on
-# "localhost" to a database called "gnue".
-[gnue]
-comment = GNUe Test Database
-aliases = dcl test
-provider = psycopg
-host = localhost
-dbname = gnue
-# encoding = iso8859-1
-
-# An example MySQL connection
-[devel]
-comment = XYZ Development Database
-provider = mysql
-host = gnue
-dbname = developer
-
-
-# An Oracle connection using DCOracle2.
-# myTNSconn is a TNS connection that
-# is defined in your tnsnames.ora file.
-[prod]
-comment = XYZ Production Database
-provider = oracle
-service = myTNSconn
-
-# a connection to a GNUe Application Server running on localhost
-# and using xmlrpc as protocol
-# valid protocoll settings are: xmlrpc, xmlrpc.py_xmlrpc, xmlrpc.pw_xmlrpc, 
pyro
-# for more information about RPC have a look in RPC-Status.txt
-[appserver]
-comment = Connection to the GNUe Application Server
-provider = appserver
-rpctype = xmlrpc
-host = localhost
-port = 8765
-transport = http
-authentication = yes

Deleted: trunk/gnue-common/etc/sample.gnue.conf
===================================================================
--- trunk/gnue-common/etc/sample.gnue.conf      2009-11-02 08:55:21 UTC (rev 
10033)
+++ trunk/gnue-common/etc/sample.gnue.conf      2009-11-02 16:59:56 UTC (rev 
10034)
@@ -1,316 +0,0 @@
-
-# Options for GNUe
-#
-# Copyright 2001-2006 Free Software Foundation
-#
-# This file is part of GNU Enterprise
-#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 3, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with program; see the file COPYING. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-# Note: pointers to files and dirs are relative to the installation
-#       location of GNUe.
-
-
-##############################################################################
-# Common Configuration Options for GNUe                                      #
-##############################################################################
-[common]
-# Encoding for XML headers and for fonts in forms. Like iso8859-1, iso8859-13.
-;textEncoding = ANSI_X3.4-1968
-
-# A comma-separated list of directories to be added to the python search 
-# path to add custom functionality.
-;ImportPath = 
-
-# If set to true, then store trigger definitions in <![CDATA[ .. ]]> blocks, 
-# instead of encoding with &lt; etc.
-;StoreTriggersAsCDATA = True
-
-
-
-##############################################################################
-# Configuration Options for GNUe Forms Client                                #
-##############################################################################
-[forms]
-# The default user interface driver to use if not specified on the command 
-# line.
-# Valid options / examples:
-#   curses
-#   wx26
-#   gtk2
-#   qt3
-#   html
-#   win32
-;DefaultUI = wx26
-
-# The default value stored in the database for True values (usual values are 
-# 1 or Y).
-;checkboxTrue = Y
-
-# The default value stored in the database for false values (usual values 
-# are 0 or N).
-;checkboxFalse = N
-
-# Set to "True" if you want <ENTER> to insert newlines in multirow entries.
-# Even if set to false, Shift+Enter will insert a newline.
-;EnterIsNewLine = True
-
-# Enable caching of detail data.
-# If set to True (default), then always cache detail data in a master/detail 
-# set. The benefits of this method is performance. The downsize to this 
-# method is that records are cached so any changes made elsewhere are not 
-# reflected in the cached records.
-# If set to false, then only cache detail data if it has unposted changes. 
-# The benefits of this method are that if another user modifies data and 
-# saves, then it will be available to your form much quicker.
-;CacheDetailRecords = True
-
-# Mask for viewing date fields (without quotes).
-;DateMask = %x
-
-# Mask for editing date fields (without quotes).
-;DateEditMask = %x
-
-# Mask for viewing time fields (without quotes).
-;DateMask_Time = %X
-
-# Mask for editing time fields (without quotes).
-;DateEditMask_Time = %X
-
-# Mask for viewing timestamp fields (without quotes).
-;DateMask_Timestamp = %x %X
-
-# Mask for editing timestamp fields (without quotes).
-;DateEditMask_Timestamp = %x %X
-
-# Grouping pattern used for thousands separating and definition of the 
-# decimal point. Format: <thousand separator><number of digits><decimal 
-# separator>.  The pair <thousand separator><number of ditigs> can be 
-# repeated multiple times. Example: ,3.
-;numeric_grouping = 
-
-# Location of startup graphic (PNG format)
-;SplashScreenPNG = gnue-splash.png
-
-# Disable the startup splashscreen.
-;DisableSplash = False
-
-# Location of GNUe login logo (PNG format).
-;loginPNG = gnue.png
-
-# Location of GNUe login logo (BMP format). The win32 uidriver accepts only 
-# BMP format.
-;loginBMP = gnue.bmp
-
-# The default height of widgets for widgets that don't specify height in .
-# gfd file.
-;widgetHeight = 1
-
-# The default width of widgets for widgets that don't specify width in .gfd 
-# file.
-;widgetWidth = 10
-
-# The next 3 options are only used by the wxPython and theWin32 clients.
-# Normally, default font style and size is used, according to the active 
-# theme.
-# Set to true if wxWidgets or Win32 clients should use a fixed width font.
-;fixedWidthFont = False
-
-# If fixedWidthFont is set to true, then this is the point size used for 
-# fonts.
-;pointSize = 0
-
-# If fixedWidthFont is set to true, then this is the face name used for fonts.
-;faceName = 
-
-# The color of a highlighted (ie focused) widget. Leave empty if you don't 
-# want highlight. Format is: "RRGGBB", each digit being hexadecimal.
-;focusColor = 
-
-# The color of even rows in a grid widget. Format is either "RRGGBB", each 
-# digit being hexadecimal or a color name as specified in wx.lib.colourdb.
-;grid_color_even = PALE TURQUOISE
-
-# The color of odd rows in a grid widget. Format is either "RRGGBB", each 
-# digit being hexadecimal or a color name as specified in wx.lib.colourdb.
-;grid_color_odd = LIGHT STEEL BLUE
-
-# Text used to concatenation dropdown descriptions (when multiple 
-# description fields are used)
-;DropdownSeparator = , 
-
-# The default icon set.
-;IconSet = auto
-
-# Use asterisk (*) for wildcards in addition to percent (%)
-;AsteriskWildcard = True
-
-# Change all non-ASCII-characters in a query into a "_"
-;fake_ascii_query = False
-
-# Set path for include files for HTML UI driver for GNUe Forms
-;htmlui_include_path = Z:X:
-
-
-
-##############################################################################
-# Configuration Options for GNUe Reports                                     #
-##############################################################################
-[reports]
-# The default location for filter files.
-;FiltersDir = filters
-
-# The default location for grd files.
-;filters = report-filters.conf
-
-# The default destination type if none specified on command line.
-;DefaultDestinationType = file
-
-# The default destination if none specified on command line.
-;DefaultDestination = -
-
-# The default filter if none specified on command line.
-;DefaultFilter = raw
-
-# The default adapter for -D file.
-;FileAdapter = text
-
-# The default adapter for -D email.
-;EmailAdapter = sendmail
-
-# The default adapter for -D printer.
-;PrinterAdapter = bsd
-
-# The default adapter for -D fax.
-;FaxAdapter = hylafax
-
-# The sendmail binary name.
-;SendmailBin = sendmail
-
-# The email address to put in the "From" line of generated email
-;SendmailFrom = GNUe Reports <address@hidden>
-
-# The text to put in the Subject line of generated email.
-;SendmailSubject = Your Requested Report
-
-# The commandline to be run when sending report output to a fax.
-;HylafaxCommand = sendfax -d %s
-
-# The commandline to be run when sending report output to a printer.
-#  (%s will be replaced with the printer name.)
-# Valid options / examples:
-#   LprCommand = /usr/bin/lpr -P%s
-#   LprCommand = print /d:%s #Windows
-;LprCommand = /usr/bin/lpr -h -P%s
-
-
-
-##############################################################################
-# Configuration Options for GNUe Navigator                                   #
-##############################################################################
-[navigator]
-# Command to execute on .gfd files.
-;RunFormCommand = gnue-forms
-
-# Command to execute on .grd files.
-;RunReportCommand = gnue-reports
-
-# Directory to search for .gfd files.
-;FormDir = forms
-
-# Directory to search for .grd files.
-;ReportDir = reports
-
-# Directory to search for .gpd files.
-;ProcessDir = navigator
-
-# Do not open separate window to display a GNUe Form.
-;embedForms = True
-
-# The number of seconds to display the hourglass when launching a program.
-;hourglassDelay = 5
-
-
-
-##############################################################################
-# Configuration Options for GNUe Application Server                          #
-##############################################################################
-[appserver]
-# Depreciated: Name of the database connection appserver is using. Use 
-# connection instead.
-;database = 
-
-# Name of the database connection appserver is using
-;connection = gnue
-
-# RPC Interface Type appserver is providing
-;rpctype = xmlrpc
-
-# Port (if needed) for RPC Interface
-;rpcport = 8765
-
-# Hosts which are allowed to access appserver
-;allowed_hosts = 
-
-# Hostname of the interface to bind services to
-;bindto = 
-
-# Null values appear first in ascending sort
-;null_first_asc = True
-
-# Null values appear first in descending sort
-;null_first_dsc = True
-
-# Semicolon-separated list of paths to load modules from
-;modulepath = /home/reinhard/gnue/share/gnue/appserver
-
-# Type of UUID to use. Can be 'time' or 'random'
-;uuidtype = time
-
-# Directory for webfrontend http documents
-;httpdir = /this_dir_shouldn't exist.
-
-# Type of the HTTP server to use. Can be 'threading' or 'forking'
-;servertype = forking
-
-
-
-##############################################################################
-# Configuration Options for GNUe Designer                                    #
-##############################################################################
-[designer]
-# Automatically log in to needed connections to do schema.
-;AutoConnect = True
-
-# Use syntax highlighting in the trigger editor.
-;ColorizeCode = True
-
-# Use the basic editor for triggers.
-;ForceSimpleEditor = False
-
-# Fudge factor for altering widget size
-;BorderPercentage = 100.0
-
-# Fudge factor for altering text size
-;TextPercentage = 100.0
-
-# Location of "Insert" toolbar icon (PNG format)
-;tb_insert = /tb_new.png
-
-# Location of "Delete" toolbar icon (PNG format)
-;tb_delete = tb_trash.png
-

Deleted: trunk/gnue-common/etc/sample.log.conf
===================================================================
--- trunk/gnue-common/etc/sample.log.conf       2009-11-02 08:55:21 UTC (rev 
10033)
+++ trunk/gnue-common/etc/sample.log.conf       2009-11-02 16:59:56 UTC (rev 
10034)
@@ -1,80 +0,0 @@
-# Configuration file for GNU Enterprise logging facilities
-#
-
-# Define which loggers are specified in this configuration file
-[loggers]
-keys=root,search,apperror,appforms
-
-# Define which handlers are specified in this configuration file
-[handlers]
-keys=default,searchhd,apperr,appforms
-
-# Define which formatters are specified in this configuration file
-[formatters]
-keys=default,appforms
-
-[logger_root]
-level=ERROR
-handlers=default
-
-[handler_default]
-class=StreamHandler
-level=NOTSET
-formatter=default
-args=(sys.stdout,)
-
-# Example: Logger which only logs messages of gnue.common.apps.GBaseApp
-[logger_search]
-level=DEBUG
-handlers=searchhd
-qualname=gnue.common.apps.GBaseApp
-# Set propaget to 1 to propagate this message to the loggers higher up the
-# hierarchy.
-propagate=0
-
-# This handler logs messages into the file search.log
-[handler_searchhd]
-class=FileHandler
-level=NOTSET
-formatter=default
-args=('search.log', 'w')
-
-[formatter_default]
-format=%(asctime)s %(levelname)s %(message)s
-
-# The following examples show how to log some exceptions
-# Exceptions are logged as 'exception.<group>.<exceptionclass>' where '<group>'
-# is one of 'system', 'admin', 'application', 'user' and '<exceptionclass>' is
-# the full class name of the exception occured
-
-# Example: Logger which only logs application errors
-[logger_apperror]
-level=ERROR
-handlers=apperr
-qualname=exception.application
-propagate=0
-
-# This handler logs it's records into a file named 'app-error.log' which will
-# be extended if already it exists
-[handler_apperr]
-class=FileHandler
-formatter=default
-args=('app-error.log', 'a')
-
-# This logger only logs ERROR level messages from the exception
-# gnue.forms.GFObjects.GFField.MinimumLengthNotAllowedError
-# It uses the handler 'appforms'
-[logger_appforms]
-level=ERROR
-handlers=appforms
-qualname=exception.application.gnue.forms.GFObjects.GFField.MinimumLengthNotAllowedError
-
-# This handler logs all records to the file 'app-forms.log' which will be
-# extend if it already exists
-[handler_appforms]
-class=FileHandler
-formatter=appforms
-args=('app-forms.log', 'a')
-
-[formatter_appforms]
-format=[FORMS] %(asctime)s %(levelname)s %(name)s: %(message)s

Modified: trunk/gnue-common/packaging/fink/gnue-common-py.info
===================================================================
--- trunk/gnue-common/packaging/fink/gnue-common-py.info        2009-11-02 
08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/packaging/fink/gnue-common-py.info        2009-11-02 
16:59:56 UTC (rev 10034)
@@ -55,10 +55,6 @@
 
 Installs %p/bin/gnue-schema.  Which should already be in your path.
 
-First time users be sure to copy and edit the following files:
-    %p/etc/sample.gnue.conf        to %p/etc/gnue.conf
-    %p/etc/sample.connections.conf to %p/etc/connections.conf
-    
 See the folder %p/share/doc/gnue-common/ for documentation.
 
 Note that most of the documentation refers to debian file locations.

Modified: trunk/gnue-common/packaging/fink/install-mac-os-x.txt
===================================================================
--- trunk/gnue-common/packaging/fink/install-mac-os-x.txt       2009-11-02 
08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/packaging/fink/install-mac-os-x.txt       2009-11-02 
16:59:56 UTC (rev 10034)
@@ -87,14 +87,10 @@
 
 createlang plpgsql template1
 
-sudo cp /sw/etc/sample.connections.conf /sw/etc/connections.conf
-
 # edit /sw/etc/connections.conf
 
 bbedit /sw/etc/connections.conf
 
-sudo cp /sw/etc/sample.gnue.conf /sw/etc/gnue.conf
-
 # edit /sw/etc/gnue.conf
 
 bbedit /sw/etc/gnue.conf

Modified: trunk/gnue-common/packaging/win32/gnue-common.iss.dist_template
===================================================================
--- trunk/gnue-common/packaging/win32/gnue-common.iss.dist_template     
2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/packaging/win32/gnue-common.iss.dist_template     
2009-11-02 16:59:56 UTC (rev 10034)
@@ -31,8 +31,6 @@
 Source: c:\gnue\bin\gnue-schema.exe; DestDir: {app}\bin; Components: main; 
Flags: ignoreversion
 Source: c:\gnue\bin\gnue\*.*; DestDir: {app}\bin\gnue; Components: main; 
Flags: ignoreversion
 Source: c:\gnue\bin\gnue\common\*.*; DestDir: {app}\bin\gnue\common; Flags: 
recursesubdirs ignoreversion; Components: main
-Source: C:\gnue\etc\sample.gnue.conf; DestDir: {app}\etc; Components: main; 
Flags: ignoreversion
-Source: C:\gnue\etc\sample.connections.conf; DestDir: {app}\etc; Components: 
main; Flags: ignoreversion
 Source: C:\gnue\etc\gnue.conf; DestDir: {app}\etc; Components: main; Flags: 
onlyifdoesntexist
 Source: C:\gnue\etc\connections.conf; DestDir: {app}\etc; Components: main; 
Flags: onlyifdoesntexist
 Source: c:\gnue\share\locale\gnue-common.mo; DestDir: {app}\share\locale\; 
Flags: recursesubdirs createallsubdirs; Components: translations

Modified: trunk/gnue-common/setup-svn.py
===================================================================
--- trunk/gnue-common/setup-svn.py      2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/setup-svn.py      2009-11-02 16:59:56 UTC (rev 10034)
@@ -567,10 +567,10 @@
     willCreateConf = 1
 
 
-if os.path.isfile('/usr/local/gnue/etc/connections.conf') and \
-   CONFDIR != '/usr/local/gnue' and not 
os.path.isfile(CONFDIR+'/etc/connections.conf'):
-  if getYesNo('Do you wish to use the current system-wide connections.conf 
file? (Yes,No,All,neVer)','Y','conf'):
-    rootCommands.append("ln -s /usr/local/gnue/etc/connections.conf 
%(CONFDIR)s/etc/connections.conf" % globals())
+if os.path.isfile('/usr/local/gnue/etc/backends.conf') and \
+   CONFDIR != '/usr/local/gnue' and not 
os.path.isfile(CONFDIR+'/etc/backends.conf'):
+  if getYesNo('Do you wish to use the current system-wide backends.conf file? 
(Yes,No,All,neVer)','Y','conf'):
+    rootCommands.append("ln -s /usr/local/gnue/etc/backends.conf 
%(CONFDIR)s/etc/backends.conf" % globals())
     willCreateConn = 1
 
 
@@ -580,54 +580,34 @@
     rootCommands.append("ln -s /usr/local/gnue/etc/report-filters.conf 
%(CONFDIR)s/etc/report-filters.conf" % globals())
     willCreateFilt = 1
 
+
 if not willCreateConf and not os.path.isfile("%s/etc/gnue.conf"%CONFDIR):
-  if not auto:
-    print ""
-    print "You do not currently have a gnue.conf tools configuration file."
-  if getYesNo("Do you want to create a gnue.conf based on the supplied 
examples? (Yes,No,All,neVer)",'Y','autoconf'):
-    if not auto and not WIN:
-      print "Since the gnue.conf file format may change from time to time in 
SVN,"
-      print "we can create a symlinked gnue.conf file that always mirrors SVN. 
This"
-      print "will not allow you to customize gnue.conf, however."
-    
-    if WIN or getYesNo ("Do you want to use a symlinked gnue.conf file?",'N',):
-      createLink("%s/gnue-common/etc/sample.gnue.conf" % SVNDIR, 
"%s/etc/gnue.conf" % CONFDIR)
-    else:
-      command = "cp %(SVNDIR)s/gnue-common/etc/sample.gnue.conf 
%(CONFDIR)s/etc/gnue.conf" % globals()
-      rootCommands.append(command)
+  if WIN:
+    createLink("%s/gnue-common/etc/gnue.conf" % SVNDIR, "%s/etc/gnue.conf" % 
CONFDIR)
+  else:
+    rootCommands.append("cp %(SVNDIR)s/gnue-common/etc/gnue.conf 
%(CONFDIR)s/etc/gnue.conf" % globals())
 
 
-if not willCreateConn and not 
os.path.isfile("%s/etc/connections.conf"%CONFDIR):
-  if not auto:
-    print ""
-    print "You do not currently have a connections.conf configuration file."
-  if getYesNo("Do you want to create a connections.conf based on the supplied 
examples? (Yes,No,All,neVer)",'Y','autoconf'):
-    if WIN:
-      createLink("%s/gnue-common/etc/sample.connections.conf" % SVNDIR, 
"%s/etc/connections.conf" % CONFDIR)
-    else:
-      rootCommands.append("cp 
%(SVNDIR)s/gnue-common/etc/sample.connections.conf 
%(CONFDIR)s/etc/connections.conf" % globals())
+if not willCreateConn and not os.path.isfile("%s/etc/backends.conf"%CONFDIR):
+  if WIN:
+    createLink("%s/gnue-common/etc/backends.conf" % SVNDIR, 
"%s/etc/backends.conf" % CONFDIR)
+  else:
+    rootCommands.append("cp %(SVNDIR)s/gnue-common/etc/backends.conf 
%(CONFDIR)s/etc/backends.conf" % globals())
 
 if not auto:
     print
-    print "NOTE: Your connections.conf file will need to"
+    print "NOTE: Your backends.conf file will need to"
     print "      be edited to reflect your local setup."
     print
 
-if not willCreateConf and not 
os.path.isfile("%s/etc/report-filters.conf"%CONFDIR):
-  if not auto:
-    print ""
-    print "You do not currently have a report-filters.conf configuration file."
-  if getYesNo("Do you want to create a report-filters.conf based on the 
supplied examples? (Yes,No,All,neVer)",'Y','autoconf'):
-    if not auto and not WIN:
-      print "Since the report-filters.conf file format may change from time to 
time in SVN,"
-      print "we can create a symlinked report-filters.conf file that always 
mirrors SVN. This"
-      print "will not allow you to customize report-filters.conf, however."
-    if WIN or getYesNo ("Do you want to use a symlinked report-filters.conf 
file? (Yes,No,All,neVer)",'N', 'symconf'):
-      createLink("%s/gnue-reports/etc/sample.report-filters.conf" % SVNDIR, 
"%s/etc/report-filters.conf" % CONFDIR)
-    else:
-      command = "cp %(SVNDIR)s/gnue-reports/etc/sample.report-filters.conf 
%(CONFDIR)s/etc/report-filters.conf" % globals()    
-      rootCommands.append(command)
 
+if not willCreateFilt and not 
os.path.isfile("%s/etc/report-filters.conf"%CONFDIR):
+  if WIN or getYesNo ("Do you want to use a symlinked report-filters.conf 
file? (Yes,No,All,neVer)",'N', 'symconf'):
+    createLink("%s/gnue-reports/etc/sample.report-filters.conf" % SVNDIR, 
"%s/etc/report-filters.conf" % CONFDIR)
+  else:
+    rootCommands.append("cp 
%(SVNDIR)s/gnue-reports/etc/sample.report-filters.conf 
%(CONFDIR)s/etc/report-filters.conf" % globals())
+
+
 if WIN:
   print "Setup completed!"
 

Modified: trunk/gnue-common/setup.py
===================================================================
--- trunk/gnue-common/setup.py  2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/setup.py  2009-11-02 16:59:56 UTC (rev 10034)
@@ -87,12 +87,17 @@
     params["scripts"] = ["scripts/gnue-schema"]
 
     params["data_files"] = [ \
-            ("share/gnue/images", allfiles('images', '.png')),
-            ("share/gnue/images", allfiles('images', '.bmp')),
-            ("share/man/man1", allfiles('doc/man', '.1')),
-            ("share/doc/gnue-common", allfiles('doc') + allfiles('etc'))]
+            ("share/gnue/images",     allfiles('images', '.png')),
+            ("share/gnue/images",     allfiles('images', '.bmp')),
+            ("share/man/man1",        allfiles('doc/man', '.1')),
+            ("share/doc/gnue-common", allfiles('doc'))]
 
+    params["config_files"] = [
+            ("",           allfiles("etc")),
+            ("backends.d", []),
+            ("log.d",      [])]
 
+
 # -----------------------------------------------------------------------------
 # Build the svnrev.py file.
 # Gets called on sdist (always) and on build/install (only when run from SVN).
@@ -120,6 +125,7 @@
     # seems like we have really none :-)
     pass
 
+
 # =============================================================================
 # No changes should be required below this line
 # =============================================================================
@@ -129,11 +135,12 @@
 import distutils.command.sdist
 import distutils.command.build
 import distutils.command.install
+import distutils.command.install_data
 
 from distutils import log
 from distutils.core import setup
 from distutils.filelist import FileList
-from distutils.util import change_root
+from distutils.util import convert_path, change_root
 from distutils.sysconfig import get_python_lib
 
 
@@ -161,6 +168,15 @@
 
 
 # =============================================================================
+# Distribution: Add config_files option
+# =============================================================================
+
+class Distribution(distutils.dist.Distribution):
+
+    config_files = None
+
+
+# =============================================================================
 # sdist: build files to be distributed first
 # =============================================================================
 
@@ -260,6 +276,7 @@
         distutils.command.install.install.initialize_options(self)
         self.install_config = None
 
+
     # -------------------------------------------------------------------------
     # Finalize options (i.e. provide default if not set by user)
     # -------------------------------------------------------------------------
@@ -269,25 +286,40 @@
 
         # try to set a reasonable default for --install-config
         if self.install_config is None:
-            if self.home == "/usr" or self.prefix == "/usr":
-                self.install_config = "/etc/gnue"
-                if self.root:
-                    self.install_config = change_root(self.root,
-                            self.install_config)
-            elif self.home == "/usr/local" or self.prefix == "/usr/local":
-                self.install_config = "/usr/local/etc/gnue"
-                if self.root:
-                    self.install_config = change_root(self.root,
-                            self.install_config)
-            elif self.home == "/opt/gnue" or self.prefix == "/opt/gnue":
-                self.install_config = "/etc/opt/gnue"
-                if self.root:
-                    self.install_config = change_root(self.root,
-                            self.install_config)
+            if os.name == 'posix':
+                if self.home == "/usr" or self.prefix == "/usr":
+                    self.install_config = "/etc/gnue"
+                    if self.root:
+                        self.install_config = change_root(self.root,
+                                self.install_config)
+                elif self.home == "/usr/local" or self.prefix == "/usr/local":
+                    self.install_config = "/usr/local/etc/gnue"
+                    if self.root:
+                        self.install_config = change_root(self.root,
+                                self.install_config)
+                elif self.home == "/opt/gnue" or self.prefix == "/opt/gnue":
+                    self.install_config = "/etc/opt/gnue"
+                    if self.root:
+                        self.install_config = change_root(self.root,
+                                self.install_config)
+                else:
+                    self.install_config = os.path.join(self.install_data, 
"etc")
             else:
-                self.install_config = os.path.join(self.install_data, "etc")
+                self.install_config = os.path.join(self.install_data, "Config")
 
+        self.sub_commands.append(('install_config', install.has_config))
+
+
     # -------------------------------------------------------------------------
+    # Check if the distribution has config files
+    # -------------------------------------------------------------------------
+
+    def has_config(self):
+
+        return self.distribution.config_files is not None
+
+
+    # -------------------------------------------------------------------------
     # Quote a path: remove --root and duplicate backslashes
     # -------------------------------------------------------------------------
 
@@ -305,6 +337,7 @@
             p = p[:-1]
         return p
 
+
     # -------------------------------------------------------------------------
     # Create gnue.pth
     # -------------------------------------------------------------------------
@@ -432,6 +465,70 @@
         return distutils.command.install.install.get_outputs(self) \
                + self.__outputs
 
+
+# =============================================================================
+# install_config: New command, based on install_data
+# =============================================================================
+
+class install_config(distutils.command.install_data.install_data):
+
+    description = "install configuration files"
+
+    # -------------------------------------------------------------------------
+    # Initialize options
+    # -------------------------------------------------------------------------
+
+    def initialize_options(self):
+        distutils.command.install_data.install_data.initialize_options(self)
+        self.data_files = self.distribution.config_files
+
+
+    # -------------------------------------------------------------------------
+    # Finalize options
+    # -------------------------------------------------------------------------
+
+    def finalize_options (self):
+        self.set_undefined_options('install',
+                ('install_config', 'install_dir'),
+                ('root', 'root'),
+                ('force', 'force'))
+
+
+    # -------------------------------------------------------------------------
+    # Run installation
+    # -------------------------------------------------------------------------
+
+    def run(self):
+        self.mkpath(self.install_dir)
+        for f in self.data_files:
+            dir = convert_path(f[0])
+            if not dir:
+                dir = self.install_dir
+            elif not os.path.isabs(dir):
+                dir = os.path.join(self.install_dir, dir)
+            elif self.root:
+                dir = change_root(self.root, dir)
+            self.mkpath(dir)
+
+            if f[1] == []:
+                # If there are no files listed, the user must be
+                # trying to create an empty directory, so add the
+                # directory to the list of output files.
+                self.outfiles.append(dir)
+            else:
+                # Copy files, adding them to the list of output files.
+                for data in f[1]:
+                    data = convert_path(data)
+                    if os.path.isdir(dir):
+                        target = os.path.join(dir, os.path.basename(data))
+                    else:
+                        target = dir
+                    if os.path.exists(target):
+                        log.info("not copying %s (output exists)", data)
+                        continue
+                    self.outfiles.append(self.copy_file(data, dir)[0])
+
+
 # -----------------------------------------------------------------------------
 # Get all packages in a directory
 # -----------------------------------------------------------------------------
@@ -447,6 +544,7 @@
                 result = result + get_packages(fullname, package + "." + name)
     return result
 
+
 # -----------------------------------------------------------------------------
 # Call the actual setup routine
 # -----------------------------------------------------------------------------
@@ -473,8 +571,11 @@
       package_dir      = setup_params["package_dir"],
       scripts          = setup_params["scripts"],
       data_files       = setup_params["data_files"],
+      config_files     = setup_params["config_files"],
 
-      # Override certain command classes with our own ones
+      # Override certain classes with our own ones
+      distclass = Distribution,
       cmdclass = {"sdist": sdist,
                   "build": build,
-                  "install": install})
+                  "install": install,
+                  "install_config": install_config})

Modified: trunk/gnue-common/setup.svn
===================================================================
--- trunk/gnue-common/setup.svn 2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/setup.svn 2009-11-02 16:59:56 UTC (rev 10034)
@@ -30,5 +30,3 @@
 createShell ('gcvs','')
 
 createLink ('images/*.*', '%s/share/gnue/images/' % CONFDIR)
-createLink ('etc/sample.gnue.conf', '%s/etc/sample.gnue.conf' % CONFDIR)
-createLink ('etc/sample.connections.conf', '%s/etc/sample.connections.conf' % 
CONFDIR)

Modified: trunk/gnue-common/src/apps/GConfig.py
===================================================================
--- trunk/gnue-common/src/apps/GConfig.py       2009-11-02 08:55:21 UTC (rev 
10033)
+++ trunk/gnue-common/src/apps/GConfig.py       2009-11-02 16:59:56 UTC (rev 
10034)
@@ -122,11 +122,9 @@
 
             # Build valid file list
             file_locations = []
-            etc_base = getInstalledBase('%s_etc' % section, 'common_etc')
 
             # system config file
-            if etc_base:
-                file_locations.append(os.path.join(etc_base, configFilename))
+            file_locations.append(os.path.join(paths.config, configFilename))
 
             # user config file
             try:
@@ -136,9 +134,8 @@
                 pass
 
             # system fixed config file
-            if etc_base:
-                file_locations.append(os.path.join(etc_base,
-                    configFilename + '.fixed'))
+            file_locations.append(os.path.join(paths.config,
+                configFilename + '.fixed'))
 
             # Load the values from the files specified
             try:
@@ -396,9 +393,9 @@
 
 def getInstalledBase(*parameters):
     """
-    Returns the first matching item of the arguments in the _site_config
-    dictionary.
+    DEPRECATED: Use gnue.paths instead.
     """
+    # TODO: Deprecate with 0.8, remove with 0.9.
     for param in parameters:
         if param in _site_config:
             return _site_config[param]
@@ -478,6 +475,7 @@
 # highest priority: site_config.cfg (depreciated -- will be removed)
 
 if os.environ.has_key('GNUE_INSTALLED_SITE_CFG'):
+    log.deprecated("Using deprecated GNUE_INSTALLED_SITE_CFG")
     fhd = open(os.environ['GNUE_INSTALLED_SITE_CFG'], 'r')
     text = fhd.read()
     fhd.close()
@@ -490,7 +488,7 @@
 # removed)
 
 elif os.environ.has_key('INSTALL_PREFIX'):
-
+    log.deprecated("Using deprecated GNUE_INSTALLED_SITE_CFG")
     install_prefix = os.environ['INSTALL_PREFIX']
     _site_config = {
         'install_prefix': install_prefix,

Modified: trunk/gnue-common/src/base/setup.py
===================================================================
--- trunk/gnue-common/src/base/setup.py 2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/src/base/setup.py 2009-11-02 16:59:56 UTC (rev 10034)
@@ -31,6 +31,13 @@
 distribution. The script is based on distutils, but it uses this module to add
 some additional features.
 
+Configuration file installation
+-------------------------------
+
+There is a new option C{config_files} which may list configuration files to
+install. Configuration files are only installed if they do not yet exist in the
+target directory.
+
 Automatic target directory determination
 ----------------------------------------
 
@@ -111,10 +118,12 @@
 from distutils import log
 from distutils.core import setup
 from distutils.filelist import FileList
+from distutils.util import convert_path, change_root
 
 import distutils.command.sdist
 import distutils.command.build
 import distutils.command.install
+import distutils.command.install_data
 
 import gnue.paths
 
@@ -122,6 +131,7 @@
 
 __all__ = ['Setup']
 
+
 # -----------------------------------------------------------------------------
 # Import the package root module
 # -----------------------------------------------------------------------------
@@ -136,6 +146,7 @@
     package_info.TITLE = ""
     package_info.VERSION = ""
 
+
 # -----------------------------------------------------------------------------
 # Check Python version
 # -----------------------------------------------------------------------------
@@ -159,13 +170,24 @@
     print "-" * 70
     sys.exit(1)
 
+
 # -----------------------------------------------------------------------------
 # Global Setup instance
 # -----------------------------------------------------------------------------
 
 SETUP = None
 
+
 # =============================================================================
+# Distribution: Add config_files option
+# =============================================================================
+
+class Distribution(distutils.dist.Distribution):
+
+    config_files = None
+
+
+# =============================================================================
 # Create a source distribution
 # =============================================================================
 
@@ -390,8 +412,22 @@
 
         distutils.command.install.install.finalize_options(self)
 
+        if self.root:
+            self.install_config = change_root(self.root, self.install_config)
 
+        self.sub_commands.append(('install_config', Install.has_config))
+
+
     # -------------------------------------------------------------------------
+    # Check if the distribution has config files
+    # -------------------------------------------------------------------------
+
+    def has_config(self):
+
+        return bool(self.distribution.config_files)
+
+
+    # -------------------------------------------------------------------------
     # Run the install command
     # -------------------------------------------------------------------------
 
@@ -434,6 +470,69 @@
 
 
 # =============================================================================
+# Install configuration files
+# =============================================================================
+
+class InstallConfig(distutils.command.install_data.install_data):
+
+    description = "install configuration files"
+
+    # -------------------------------------------------------------------------
+    # Initialize options
+    # -------------------------------------------------------------------------
+
+    def initialize_options(self):
+        distutils.command.install_data.install_data.initialize_options(self)
+        self.data_files = self.distribution.config_files
+
+
+    # -------------------------------------------------------------------------
+    # Finalize options
+    # -------------------------------------------------------------------------
+
+    def finalize_options (self):
+        self.set_undefined_options('install',
+                ('install_config', 'install_dir'),
+                ('root', 'root'),
+                ('force', 'force'))
+
+
+    # -------------------------------------------------------------------------
+    # Run installation
+    # -------------------------------------------------------------------------
+
+    def run(self):
+        self.mkpath(self.install_dir)
+        for f in self.data_files:
+            dir = convert_path(f[0])
+            if not dir:
+                dir = self.install_dir
+            elif not os.path.isabs(dir):
+                dir = os.path.join(self.install_dir, dir)
+            elif self.root:
+                dir = change_root(self.root, dir)
+            self.mkpath(dir)
+
+            if f[1] == []:
+                # If there are no files listed, the user must be
+                # trying to create an empty directory, so add the
+                # directory to the list of output files.
+                self.outfiles.append(dir)
+            else:
+                # Copy files, adding them to the list of output files.
+                for data in f[1]:
+                    data = convert_path(data)
+                    if os.path.isdir(dir):
+                        target = os.path.join(dir, os.path.basename(data))
+                    else:
+                        target = dir
+                    if os.path.exists(target):
+                        log.info("not copying %s (output exists)", data)
+                        continue
+                    self.outfiles.append(self.copy_file(data, dir)[0])
+
+
+# =============================================================================
 # Basic class for setup scripts of GNUe packages
 # =============================================================================
 
@@ -469,6 +568,9 @@
     @cvar data_files: List of data files to install, where each list item is a
         tuple with the target directory and the list of files to install there.
         Defaults to an empty list.
+    @cvar config_files: List of configuration files to install, where each list
+        item is a tuple with the target directory and the list of files to
+        install there.  Defaults to an empty list.
     """
 
     name             = package_info.PACKAGE.lower()
@@ -483,6 +585,7 @@
     package_dir      = {}
     scripts          = []
     data_files       = []
+    config_files     = []
 
     # -------------------------------------------------------------------------
     # Build list of file
@@ -591,7 +694,7 @@
             self.set_params(setup_params)
             for key in ['name', 'version', 'description', 'long_description',
                     'author', 'author_email', 'url', 'license', 'packages',
-                    'package_dir', 'scripts', 'data_files']:
+                    'package_dir', 'scripts', 'data_files', 'config_files']:
                 if setup_params.has_key(key):
                     self.__dict__[key] = setup_params[key]
 
@@ -625,8 +728,11 @@
               package_dir      = self.package_dir,
               scripts          = self.scripts,
               data_files       = self.data_files,
+              config_files     = self.config_files,
 
-              # Override certain command classes with our own ones
-              cmdclass = {"sdist":   SDist,
-                          "build":   Build,
-                          "install": Install})
+              # Override certain classes with our own ones
+              distclass = Distribution,
+              cmdclass = {"sdist":          SDist,
+                          "build":          Build,
+                          "install":        Install,
+                          "install_config": InstallConfig})

Modified: trunk/gnue-common/utils/generate-gnue-config.py
===================================================================
--- trunk/gnue-common/utils/generate-gnue-config.py     2009-11-02 08:55:21 UTC 
(rev 10033)
+++ trunk/gnue-common/utils/generate-gnue-config.py     2009-11-02 16:59:56 UTC 
(rev 10034)
@@ -23,7 +23,7 @@
 # $Id$
 
 """
-Generates a file named sample.gnue.conf in the current directory
+Generates a file named gnue.conf in the current directory
 for all GNUe Tools it can find.
 In the file there is a description for each valid configuration setting
 and a setting = default_value line (commented out).
@@ -42,8 +42,7 @@
         ('designer',    'base.Config', 'Configuration Options for GNUe 
Designer')
         ]
 
-licenseString = '''
-# Options for GNUe
+licenseString = '''# Options for GNUe
 #
 # Copyright 2001-2009 Free Software Foundation
 #
@@ -71,7 +70,7 @@
 
 class GenerateConf:
     def __init__(self):
-        self._file = open('sample.gnue.conf', 'w')
+        self._file = open('gnue.conf', 'w')
         
     def printFileHeader(self):
         self._file.write(licenseString)

Modified: trunk/gnue-common/utils/release
===================================================================
--- trunk/gnue-common/utils/release     2009-11-02 08:55:21 UTC (rev 10033)
+++ trunk/gnue-common/utils/release     2009-11-02 16:59:56 UTC (rev 10034)
@@ -31,7 +31,7 @@
 echo "$(date --iso-8601=seconds) Updating documentation"
 (cd ..; gnue-common/utils/update-tool-docs $package)
 
-# Rebuild sample.gnue.conf if we're building common
+# Rebuild gnue.conf if we're building common
 if [ "$package" == "common" ]; then
   echo "$(date --iso-8601=seconds) Updating sample configuration file"
   (cd etc; LANG=C gcvs ../utils/generate-gnue-config.py)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]