[PATCH] Add pythonsitelib fact and use it for fas and fedoracommunity
by Todd Zullinger
There are other uses of hard-coded python sitelib paths in various
config files. These should be reviewed and converted to use the
pythonsitelib fact to help ensure the move from RHEL5 to RHEL6 goes
smoothly.
---
Mike McGrath wrote:
> commit 2c0c1c94c856adb644560427ed4cd8bbf972105f
> Author: Mike McGrath <mmcgrath(a)redhat.com>
> Date: Wed Aug 18 15:32:38 2010 -0500
>
> updating for RHEL6 python paths
>
> modules/fas/files/fas.wsgi | 2 +-
> modules/fas/manifests/init.pp | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
> ---
> - # TODO: python2.4 should not be hardcoded, make a fact?
> - file { "/usr/lib/python2.4/site-packages/fas/fas.wsgi":
> + # TODO: python2.6 should not be hardcoded, make a fact?
> + file { "/usr/lib/python2.6/site-packages/fas/fas.wsgi":
Like this perhaps? I've used this pythonsitelib at home and work and
found it useful.
modules/custom/lib/facter/pythonsitelib.rb | 5 +++++
modules/fas/manifests/init.pp | 9 ++++-----
.../fas-app.conf => templates/fas-app.conf.erb} | 4 ++--
.../fas/{files/fas.wsgi => templates/fas.wsgi.erb} | 2 +-
.../templates/fedoracommunity-prod.ini.erb | 2 +-
5 files changed, 13 insertions(+), 9 deletions(-)
create mode 100644 modules/custom/lib/facter/pythonsitelib.rb
rename modules/fas/{files/fas-app.conf => templates/fas-app.conf.erb} (85%)
rename modules/fas/{files/fas.wsgi => templates/fas.wsgi.erb} (95%)
diff --git a/modules/custom/lib/facter/pythonsitelib.rb b/modules/custom/lib/facter/pythonsitelib.rb
new file mode 100644
index 0000000..b40a095
--- /dev/null
+++ b/modules/custom/lib/facter/pythonsitelib.rb
@@ -0,0 +1,5 @@
+Facter.add(:pythonsitelib) do
+ setcode do
+ Facter::Util::Resolution.exec('python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"')
+ end
+end
diff --git a/modules/fas/manifests/init.pp b/modules/fas/manifests/init.pp
index db428c3..ae7306a 100644
--- a/modules/fas/manifests/init.pp
+++ b/modules/fas/manifests/init.pp
@@ -124,12 +124,11 @@ class fas::app {
value => on,
}
- # TODO: python2.4 should not be hardcoded, make a fact?
- file { "/usr/lib/python2.4/site-packages/fas/fas.wsgi":
+ file { "$pythonsitelib/fas/fas.wsgi":
owner => "root",
group => "root",
mode => 0755,
- source => "puppet:///fas/fas.wsgi",
+ content => template("fas/fas.wsgi"),
require => Package["fas"],
notify => Service["httpd"],
}
@@ -171,7 +170,7 @@ class fas::app {
owner => "root",
group => "root",
mode => 0644,
- source => "puppet:///fas/fas-app.conf",
+ content => template("fas/fas-app.conf.erb"),
require => Package["httpd"],
notify => Service["httpd"],
}
@@ -224,7 +223,7 @@ class fas::app {
require => Package["fas"],
}
- file { "/usr/lib/python2.4/site-packages/fas/config/log.cfg":
+ file { "$pythonsitelib/fas/config/log.cfg":
source => "puppet:///fas/fas-log.cfg",
owner => "root",
group => "root",
diff --git a/modules/fas/files/fas-app.conf b/modules/fas/templates/fas-app.conf.erb
similarity index 85%
rename from modules/fas/files/fas-app.conf
rename to modules/fas/templates/fas-app.conf.erb
index e271a07..8747138 100644
--- a/modules/fas/files/fas-app.conf
+++ b/modules/fas/templates/fas-app.conf.erb
@@ -19,9 +19,9 @@ WSGIRestrictSignal Off
WSGIDaemonProcess fas processes=32 threads=1 maximum-requests=1000 user=fas group=fas display-name=fas inactivity-timeout=300 shutdown-timeout=10
WSGIPythonOptimize 1
-WSGIScriptAlias /accounts /usr/lib/python2.4/site-packages/fas/fas.wsgi/accounts
+WSGIScriptAlias /accounts <%= pythonsitelib %>/fas/fas.wsgi/accounts
-<Directory /usr/lib/python2.4/site-packages/fas/>
+<Directory <%= pythonsitelib %>/fas/>
WSGIProcessGroup fas
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
diff --git a/modules/fas/files/fas.wsgi b/modules/fas/templates/fas.wsgi.erb
similarity index 95%
rename from modules/fas/files/fas.wsgi
rename to modules/fas/templates/fas.wsgi.erb
index 569d5ac..8f3aa4a 100644
--- a/modules/fas/files/fas.wsgi
+++ b/modules/fas/templates/fas.wsgi.erb
@@ -1,6 +1,6 @@
#!/usr/bin/python
import sys
-sys.path.append('/usr/lib/python2.4/site-packages/fas/')
+sys.path.append('<%= pythonsitelib %>/fas/')
sys.stdout = sys.stderr
import pkg_resources
diff --git a/modules/fedoracommunity/templates/fedoracommunity-prod.ini.erb b/modules/fedoracommunity/templates/fedoracommunity-prod.ini.erb
index c30af26..4054912 100644
--- a/modules/fedoracommunity/templates/fedoracommunity-prod.ini.erb
+++ b/modules/fedoracommunity/templates/fedoracommunity-prod.ini.erb
@@ -28,7 +28,7 @@ fedoracommunity.mainnav.apps = (MokshaApp('Overview', 'fedoracommunity.overviewr
# The overview application default dashboard layout
fedoracommunity.overview.layout.default = (MokshaApp('Login', 'fedoracommunity.login'))
-fedoracommunity.extensions_dir = /usr/lib/python2.4/site-packages/fedoracommunity/plugins/extensions
+fedoracommunity.extensions_dir = <%= pythonsitelib %>/fedoracommunity/plugins/extensions
fedoracommunity.connector.kojihub.baseurl = http://koji.fedoraproject.org/kojihub
fedoracommunity.connector.bugzilla.baseurl = https://bugzilla.redhat.com/xmlrpc.cgi
--
1.7.2.1
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Life is a gamble at terrible odds -- if it was a bet, you wouldn't
take it.
-- Tom Stoppard, Rosencrantz and Guildenstern Are Dead
13 years, 7 months
[PATCH] Create SRPM repository entry in new_repo
by Stephen Gallagher
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
When creating new fedorapeople yum repos, we should also include a link
to the SRPM repo.
- --
Stephen Gallagher
RHCE 804006346421761
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkxsJO8ACgkQeiVVYja6o6PvWACfSx3DllXDVPWhOV3QVfzIdCjt
6W0AoIorHe3BnpH5qGZYXc3T3ysAROVb
=1w6l
-----END PGP SIGNATURE-----
13 years, 7 months
[PATCH] pkgs01 uses 'git' not 'git-server' to enable git
by Mike McGrath
can I get 2 +1's
---
modules/rkhunter/templates/rkhunter.conf.erb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/rkhunter/templates/rkhunter.conf.erb b/modules/rkhunter/templates/rkhunter.conf.erb
index 6699230..8d31b1e 100644
--- a/modules/rkhunter/templates/rkhunter.conf.erb
+++ b/modules/rkhunter/templates/rkhunter.conf.erb
@@ -399,6 +399,7 @@ XINETD_ALLOWED_SVC=/etc/xinetd.d/rsync
XINETD_ALLOWED_SVC=/etc/xinetd.d/cvspserver
XINETD_ALLOWED_SVC=/etc/xinetd.d/tftp
XINETD_ALLOWED_SVC=/etc/xinetd.d/git-server
+XINETD_ALLOWED_SVC=/etc/xinetd.d/git
XINETD_ALLOWED_SVC=/etc/xinetd.d/bzr-server
#
--
1.7.2.1
13 years, 7 months
Change Request: Have fedoracommunity.org work with genshi
by Sijis Aviles
Hi,
I'm requesting this change so that we can start putting the mocked up
site[1] together with genshi on the fedora-web repo.
====
diff --git a/modules/fedora-web/files/syncStatic.sh
b/modules/fedora-web/files/syncStatic.sh
index 9f1d8a6..f5f2005 100644
--- a/modules/fedora-web/files/syncStatic.sh
+++ b/modules/fedora-web/files/syncStatic.sh
@@ -58,5 +58,6 @@ rsync -qa --delete-after --delay-updates .
/srv/web/mirrors.fedoraproject.org/
popd > /dev/null
pushd fedoracommunity.org > /dev/null
-rsync -qa --delete-after --delay-updates . /srv/web/fedoracommunity.org/
+make > /dev/null 2>&1
+rsync -qa --delete-after --delay-updates out/ /srv/web/fedoracommunity.org/
popd > /dev/null
diff --git a/modules/fedora-web/manifests/init.pp
b/modules/fedora-web/manifests/init.pp
index 5f39a7d..ba7a98b 100644
--- a/modules/fedora-web/manifests/init.pp
+++ b/modules/fedora-web/manifests/init.pp
@@ -288,4 +288,15 @@ define fedora-web::fedoracommunity-org::proxy($website) {
notify => Service["httpd"],
require => Httpd::Website[$website],
}
+
+ file { "/etc/httpd/conf.d/$website/languages.conf":
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ source => "puppet:///fedora-web/fedoracommunity.org-languages.conf",
+ notify => Service["httpd"],
+ require => Httpd::Website[$website],
+ }
+
+
}
====
I'm also attaching the "fedoracommunity.org-languages.conf" file.
I would also make necessary changes in fedora-web.git for this to work
correctly.
Could I get the approvals (2 +1's) needed to do this?
Thanks,
Sijis
[1] - http://duffy.fedorapeople.org/webdesign/fedoracommunity.org/html/16Aug2010/
13 years, 7 months
question about FAS and irc
by Tajidin Abd
Is there a wiki page in regards to using the Fedora system inside of IRC. i
mean for example to pull the FAS information in irc i know the command
.fasinfo <username>. anyone have a list of commands that can be used thank
you.
13 years, 7 months
Upcoming Fedora 14 Tasks
by John Poelstra
Start End Name
Tue 03-Aug Tue 24-Aug Alpha Infrastructure Change Freeze
Tue 24-Aug Tue 24-Aug Alpha Public Availability
This schedule reflects the delay of the Fedora 14 Alpha Release by one
week and extension of the remaining dates on the schedule. Please let
me know if any of the dates look wrong or do not reflect the wishes of
your team.
13 years, 7 months
Fwd: PROBLEM: serverbeach01.vpn.fedoraproject.org/Disk Space /srv is CRITICAL
by Stephen John Smoogen
Disk space pressure is from several trees but I think I can clean it
up with a removal of the 11 updates and some earlier staging from
earlier this year. I need someone to agree/disagree with this (eg +1
or -1)
Thanks
882056 alt/stage/rawhide-20100128
882644 alt/stage/branched-20100315
884176 alt/stage/rawhide-20100204
976336 alt/stage/rawhide-20100711
977272 alt/stage/rawhide-20100715
984312 alt/stage/rawhide-20100722
5589688 alt/stage/14-Alpha.RC3.1.live
5590708 alt/stage/14-Alpha.RC4.live
14839064 alt/stage/14-Alpha.RC1
14970420 alt/stage/14.TC1
14997864 alt/stage/14.TC2
15002900 alt/stage/14-Alpha.RC2
15002932 alt/stage/14-Alpha.RC3
15002952 alt/stage/14-Alpha.RC4
21608440 fedora/linux/updates/13
27650012 fedora/linux/updates/12
30630792 fedora/linux/updates/11
46843080 fedora/linux/releases/12
48769752 fedora/linux/releases/11
51930976 fedora/linux/releases/13
---------- Forwarded message ----------
From: Nagios Monitoring User <nagios(a)fedoraproject.org>
Date: Sun, Aug 15, 2010 at 17:23
Subject: PROBLEM: serverbeach01.vpn.fedoraproject.org/Disk Space /srv
is CRITICAL
To: smooge+mobile(a)gmail.com
Service: Disk Space /srv
Host: serverbeach01
Info: DISK CRITICAL - free space: /srv 35631 MB (9% inode=99%):
Source: noc01
Date: Sun Aug 15 23:23:41 UTC 2010
--
Stephen J Smoogen.
“The core skill of innovators is error recovery, not failure avoidance.”
Randy Nelson, President of Pixar University.
"We have a strategic plan. It's called doing things.""
— Herb Kelleher, founder Southwest Airlines
13 years, 7 months
[PATCH] neuter viewvc on cvs.fedoraproject.org
by Bill Nottingham
Clean out repositories that aren't canonical from the viewvc configuration,
and set the default repo to something that at least is still in use.
diff --git a/modules/viewvc/files/viewvc/viewvc.conf b/modules/viewvc/files/viewvc/viewvc.conf
index e3cc59b..6a1ab31 100644
--- a/modules/viewvc/files/viewvc/viewvc.conf
+++ b/modules/viewvc/files/viewvc/viewvc.conf
@@ -93,7 +93,7 @@
## cvs_roots = cvsroot: /opt/cvs/repos1,
## anotherroot: /usr/local/cvs/repos2
##
-cvs_roots = pkgs: /cvs/pkgs, core: /cvs/dist, extras: /cvs/extras, fedora: /cvs/fedora, docs: /cvs/docs, dirsec: /cvs/dirsec, legacy: /cvs/legacy, l10n: /cvs/l10n, elvis: /cvs/elvis
+cvs_roots = fedora: /cvs/fedora, dirsec: /cvs/dirsec
## svn_roots: Specifies each of the Subversion roots (repositories) on
## your system and assigns names to them. Each root should be given by
@@ -141,7 +141,7 @@ cvs_roots = pkgs: /cvs/pkgs, core: /cvs/dist, extras: /cvs/extras, fedora: /cvs/
## Example:
## default_root = cvsroot
##
-default_root = pkgs
+default_root = fedora
## mime_types_files: This is a list of pathnames to a set of MIME type
## mapping files to help ViewVC guess the correct MIME type of a
13 years, 7 months