From Fedora Project Wiki
m (Fixed templates)
Line 28: Line 28:


<pre>
<pre>
export CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/fedora
export CVSROOT=:pserver:anonymous@cvs.fedoraproject.org:/cvs/fedora
</pre>
</pre>



Revision as of 15:26, 15 December 2009

Fedora Websites CVS

Like much of the rest of the Fedora Project, the Fedora websites are available in their raw form. fedoraproject.org is a wiki, and so has no CVS repository. You can download fedora.redhat.com through anonymous CVS.

fedoraproject.org/wiki/

Being primarily a wiki, fedoraproject.org is not contained as a whole in public CVS. However, the theme 'kindofblue' is contained.

export CVSROOT=:ext:<username>@cvs.fedoraproject.org:/cvs/fedora
cvs co kindofblue

For information on editing the wiki, see the WikiEditing page.

fedoraproject.org static pages

You can request write access by applying for membership in the cvsfedora group in the Fedora Account System . Furthermore, you must be approved and added to the appropriate ACLs. Normally, write access is granted only to those who are known and have established a prior need to commit to one of the modules in this repository. As a measure to prove yourself, you can always send us patches created using anonymous read-only access. You can file bugs and submit patches against Fedora Websites using Bugzilla . More information can be found in the Bugs section of the Websites page.

Warning.png
If you use write access, you must check your changes in a sandbox before committing
Follow the instructions in the sandbox section to configure your sandbox.

CVS Checkout Instructions

To get access to a CVS tree for anonymous read-only access, you will need to do the following:

  • Set your CVSROOT environment variable:
export CVSROOT=:pserver:anonymous@cvs.fedoraproject.org:/cvs/fedora
Warning.png
If you have used Fedora Infrastructure CVS before, be aware that the CVS root has changed! The old location, cvs.devel.redhat.com, is no longer correct.
  • Log into the CVS server using an empty password:
cvs login

~-Just press 'Enter' when asked for a password.-~

  • Checkout the 'web' module.
cvs co web

Following these steps will check out the code for fedora.redhat.com into a directory named 'web' in the current directory.

Creating Patches

If you do not have write access, you will have to submit patches to get your changes applied. You can create your patches using cvs diff:

cvs diff -u <filename> > <filename>-<name>.patch

~-Where <filename> should be replaced with the name of the file you have changed and <name> should be replaced with your name or an appropriate name for the patch.-~

You can file bugs and submit patches against Fedora Websites using Bugzilla . More information can be found in the Bugs section of the Websites page.

Using Write Access

Do you have write access? If so, you can follow the directions above to checkout the source, but make the following changes:

  • Tell CVS to use SSH tunneling:
export CVS_RSH=ssh
Idea.png
You can add this to your ~/.bashrc file to avoid having to re-enter it every time.
  • Use your account over SSH rather than 'anonymous' with 'pserver' for the CVS root:
export CVSROOT=:ext:<youraccountname>@cvs.fedoraproject.org:/cvs/fedora

Where '<youraccountname>' is replace with the name of your account in the Fedora Account System .

Stop (medium size).png
If you have already completed an anonymous checkout, you cannot simply use this method on that checkout to begin writing changes. You should create a fresh checkout using your account. The working directories track the CVSROOT used, and those records override the environment variable.

You can then commit your changes back to the CVS repository, assuming you have the necessary access.

After you are satisfied with the changes you have made and have used cvs commit to store them in the repository, you must tag the changed files as 'LIVE' in order for them to be published in the next update cycle:

cvs tag -F LIVE <filename>

Where '<filename>' is replaced by the names of the files that you have changed or added.

Note.png
Updates take place at 15 and 45 minutes past the hour, every hour.
Stop (medium size).png
The PHP pages are rendered in the backend and stored prior to requests. This means that the dynamic features of PHP are not available. For example, a live redirect using the header() function is not possible.

Generating Pages from DocBook HTML Source

If you are modifying any files that are generated from DocBook source:

1. Make your changes to the original DocBook XML files

1. Generate the HTML from the DocBook XML files in the docs module using the make html command.

1. Copy the generated HTML files to the appropriate directory in web/html/docs/. For example:

cp docs/documentation-guide/documentation-guide-en/*.html web/html/docs/documentation-guide/

Make sure the top level file you copy over is 'index.html' in order to generate a properly linked index.php. Change the top level file name to index.html, if you need to.

1. Copy any images and stylesheet images over in the appropriate paths.

1. Run the docbookhtml2php.py script to convert the generated HTML files to PHP. It is located in the web module under the scripts/ directory.

../../../scripts/docbookhtml2php.py *html
index.html converted to index.php
ln-legalnotice.html converted to ln-legalnotice.php
rv-revhistory.html converted to rv-revhistory.php
sn-foo.html converted to sn-accounts.php
sn-bar.html converted to sn-bar.php
sn-baz.html converted to sn-baz.php

1. Clean-up and make sure that all new files are added to CVS:

rm *html
cvs add *php

1. Commit the changes and tag them LIVE. (See the Using Write Access section.)

cvs ci -m "Example log."
...
cvs tag -F LIVE ./
...
Stop (medium size).png
Don't forget to add any newly generated files or images to the repository using cvs add before commiting.

ViewCVS

A web interface for browsing this repository is available:

http://cvs.fedora.redhat.com/viewcvs/web/?root=fedora

CVS commits mailing list

All commits to the fedora.redhat.com CVS module are sent to the fedora-websites-list@redhat.com mailing list.

Setting Up a Sandbox

Warning.png
WARNING
Do not attempt to set up a sandbox following these instructions on a system that already runs a website!

In order to preview your CVS working directory in a live form, you will need to set up a local sandbox. These instructions assume you are working on a Fedora system with Apache (in the 'httpd' package) and PHP (in the 'php' package) installed and that you are working with root privileges.

  • In your working directory, you will find 'config/httpd.conf' and 'config/php.ini'. Copy 'httpd.conf' to '/etc/httpd/conf/httpd.conf' and 'php.ini' to '/etc/php.ini', overwriting the original files.
  • Create a symlink from '/var/www/fedora.redhat.com/' to the 'html' directory of your working directory:
cd /var/www
ln -s /path/to/web/html/ fedora.redhat.com
  • Create a symlink from '/var/www/include/' to the 'include' directory of your working directory:
ln -s /path/to/web/include .
  • Start (or restart) the httpd service and you should be able to connect to http://localhost in your Internet browser:
service httpd start
  • If you get a permission denied error, make sure the user 'apache' has read access to your working directory, and try again:
chmod -R o+r /path/to/web
  • To report bugs, refer to the Websites page.