Spec fixes, require a python setup.py build to generate app.cfg.

This commit is contained in:
Ricky Zhou (周家杰) 2008-03-15 16:01:17 -04:00
parent 8155fb8b9a
commit 682fc6d81d
6 changed files with 18 additions and 183 deletions

1
fas/.gitignore vendored
View file

@ -1,5 +1,4 @@
*~ *~
*.mo
random_seed random_seed
pubring.gpg pubring.gpg
secring.gpg secring.gpg

View file

@ -67,7 +67,7 @@ It's presently part of the fedora-infrastructure git repo::
Once you are inside you're fresh checkout, you need to regenerate some files Once you are inside you're fresh checkout, you need to regenerate some files
that are created by the build script, setup.py:: that are created by the build script, setup.py::
python setup.py egg_info python setup.py build
This will create the fas.egg-info directory which has metadata about the This will create the fas.egg-info directory which has metadata about the
program. It allows things like the identity provider to work. program. It allows things like the identity provider to work.

View file

@ -22,6 +22,7 @@ Requires: python-fedora-infrastructure >= 0.2.99.2
Requires: babel Requires: babel
Requires: pygpgme Requires: pygpgme
Requires: python-babel Requires: python-babel
Requires: python-genshi
Requires: pytz Requires: pytz
%description %description
@ -48,24 +49,25 @@ Additional scripts that work as clients to the accounts system.
%build %build
%{__python} setup.py build --install-data='%{_datadir}/fas' %{__python} setup.py build --install-data='%{_datadir}/fas'
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --install-data='%{_datadir}/fas' --root $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --install-data='%{_datadir}/fas' --root %{buildroot}
mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p %{buildroot}%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}
mv $RPM_BUILD_ROOT%{_bindir}/start-fas $RPM_BUILD_ROOT%{_sbindir} mv %{buildroot}%{_bindir}/start-fas %{buildroot}%{_sbindir}
# Unreadable by others because it's going to contain a database password. # Unreadable by others because it's going to contain a database password.
install fas.cfg $RPM_BUILD_ROOT%{_sysconfdir} install -m 640 fas.cfg %{buildroot}%{_sysconfdir}
install client/fas.conf $RPM_BUILD_ROOT%{_sysconfdir} install -m 600 client/fas.conf %{buildroot}%{_sysconfdir}
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%pre %pre
/usr/sbin/groupadd -r fas &>/dev/null || : /usr/sbin/useradd -c 'Fedora Acocunt System user' -s /sbin/nologin \
/usr/sbin/useradd -r -s /sbin/nologin -d /usr/share/fas -M \ -r -M -d /usr/share/fas fas &> /dev/null || :
-c 'Fedora Acocunt System user' -g fas fas &>/dev/null || :
%files %files
@ -74,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/* %{python_sitelib}/*
%{_datadir}/fas/ %{_datadir}/fas/
%{_sbindir}/start-fas %{_sbindir}/start-fas
%attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/fas.cfg %attr(-,root,fas) %config(noreplace) %{_sysconfdir}/fas.cfg
%files clients %files clients
%{_bindir}/* %{_bindir}/*

1
fas/fas/config/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
app.cfg

View file

@ -1,167 +0,0 @@
[global]
# The settings in this file should not vary depending on the deployment
# environment. dev.cfg and prod.cfg are the locations for
# the different deployment settings. Settings in this file will
# be overridden by settings in those other files.
# The commented out values below are the defaults
# Database values
sqlalchemy.convert_unicode=True
# VIEW
# which view (template engine) to use if one is not specified in the
# template name
# tg.defaultview = "kid"
tg.defaultview = "genshi"
# The following kid settings determine the settings used by the kid serializer.
# One of (html|html-strict|xhtml|xhtml-strict|xml|json)
# kid.outputformat="html"
genshi.outputformat = "xhtml"
# When @#%*( TG supports this....
#genshi.outputformat = "html"
#genshi.default_doctype = "html-strict"
# kid.encoding="utf-8"
genshi.encoding="utf-8"
# The sitetemplate is used for overall styling of a site that
# includes multiple TurboGears applications
# tg.sitetemplate="<packagename.templates.templatename>"
# Allow every exposed function to be called as json,
# tg.allow_json = False
# Suppress the inclusion of the shipped MochiKit version, which is rather outdated.
# Attention: setting this to True and listing 'turbogears.mochikit' in 'tg.include_widgets'
# is a contradiction. This option will overrule the default-inclusion to prevent version
# mismatch bugs.
# tg.mochikit_suppress = True
# List of Widgets to include on every page.
# for example ['turbogears.mochikit']
# tg.include_widgets = []
# Set to True if the scheduler should be started
# tg.scheduler = False
# Set to True to allow paginate decorator redirects when page number gets
# out of bound. Useful for getting the real page id in the url
# paginate.redirect_on_out_of_range = True
# Set to True to allow paginate decorator redirects when last page is requested.
# This is useful for getting the real last page id in the url
# paginate.redirect_on_last_page = True
# i18n
session_filter.on = True
i18n.run_template_filter = True
i18n.domain = 'fas'
# VISIT TRACKING
# Each visit to your application will be assigned a unique visit ID tracked via
# a cookie sent to the visitor's browser.
# --------------
# Enable Visit tracking
visit.on=True
# Number of minutes a visit may be idle before it expires.
visit.timeout=20
# The name of the cookie to transmit to the visitor's browser.
# visit.cookie.name="tg-visit"
# Domain name to specify when setting the cookie (must begin with . according to
# RFC 2109). The default (None) should work for most cases and will default to
# the machine to which the request was made. NOTE: localhost is NEVER a valid
# value and will NOT WORK.
# visit.cookie.domain=None
# Specific path for the cookie
# visit.cookie.path="/"
# The name of the VisitManager plugin to use for visitor tracking.
visit.manager="sqlalchemy"
#visit.manager="sqlobject"
# Database class to use for visit tracking
visit.saprovider.model = "fas.model.Visit"
identity.saprovider.model.visit = "fas.model.VisitIdentity"
#visit.saprovider.model = "fedora.accounts.tgfas.visit_identity_table"
#visit.soprovider.model = "fas.model.Visit"
#identity.saprovider.model.visit="fedora.accounts.tgfas.VisitIdentity"
#identity.saprovider.model=
#sqlalchemy.dburi='sqlite://'
# IDENTITY
# General configuration of the TurboGears Identity management module
# --------
# Switch to turn on or off the Identity management module
identity.on=True
# [REQUIRED] URL to which CherryPy will internally redirect when an access
# control check fails. If Identity management is turned on, a value for this
# option must be specified.
identity.failure_url="/login"
identity.provider='safas3'
# identity.provider='sqlobject'
# The names of the fields on the login form containing the visitor's user ID
# and password. In addition, the submit button is specified simply so its
# existence may be stripped out prior to passing the form data to the target
# controller.
# identity.form.user_name="user_name"
# identity.form.password="password"
# identity.form.submit="login"
# What sources should the identity provider consider when determining the
# identity associated with a request? Comma separated list of identity sources.
# Valid sources: form, visit, http_auth
# identity.source="form,http_auth,visit"
# SqlAlchemyIdentityProvider
# Configuration options for the default IdentityProvider
# -------------------------
# The classes you wish to use for your Identity model. Remember to not use reserved
# SQL keywords for class names (at least unless you specify a different table
# name using sqlmeta).
identity.saprovider.model.user="fas.model.People"
identity.saprovider.model.group="fas.model.Groups"
#identity.saprovider.model.permission="fas.model.Visit"
# The password encryption algorithm used when comparing passwords against what's
# stored in the database. Valid values are 'md5' or 'sha1'. If you do not
# specify an encryption algorithm, passwords are expected to be clear text.
# The SqlAlchemyProvider *will* encrypt passwords supplied as part of your login
# form. If you set the password through the password property, like:
# my_user.password = 'secret'
# the password will be encrypted in the database, provided identity is up and
# running, or you have loaded the configuration specifying what encryption to
# use (in situations where identity may not yet be running, like tests).
# identity.saprovider.encryption_algorithm=None
# compress the data sends to the web browser
# [/]
# gzip_filter.on = TrueNote: in the SVG XML, change the 'interviewee-name' text to be the name of whichever in
# gzip_filter.mime_types = ["application/x-javascript", "text/javascript", "text/html", "text/css", "text/plain"]
[/robots.txt]
static_filter.on = True
static_filter.dir = "%(top_level_dir)s/static/robots.txt"
[/static]
static_filter.on = True
static_filter.dir = "%(top_level_dir)s/static"
[/favicon.ico]
static_filter.on = True
static_filter.file = "%(top_level_dir)s/static/images/favicon.ico"

View file

@ -61,7 +61,7 @@ genshi.encoding="utf-8"
session_filter.on = True session_filter.on = True
i18n.run_template_filter = True i18n.run_template_filter = True
i18n.domain = 'fas' i18n.domain = 'fas'
i18n.locale_dir = 'po' i18n.locale_dir = '@DATADIR@/locales'
# VISIT TRACKING # VISIT TRACKING
# Each visit to your application will be assigned a unique visit ID tracked via # Each visit to your application will be assigned a unique visit ID tracked via