<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/infrastructure/dev-webspace.xml,v 1.14 2010/10/25 17:02:25 betelgeuse Exp $ -->

<guide>
<title>Web Space Configuration for dev.gentoo.org</title>

<author title="Author">
  <mail link="jforman@gentoo.org">Jeffrey Forman</mail>
</author>
<author title="Author">
  <mail link="curtis119@gentoo.org">Curtis Napier</mail>
</author>

<abstract>
This guide documents how a Gentoo developer can configure their personal
webspace on our dev cluster.
</abstract>

<version>1.6</version>
<date>2010-04-28</date>

<chapter>
<title>Developer Web Space</title>
<section>
<title>Use and Policy</title>
<body>

<p>
Within your devspace on woodpecker (dev.gentoo.org) you may create a
<path>public_html</path> directory accessible at:
<path>http://dev.gentoo.org/~username</path>. You may store any Gentoo related
files in this space such as project documentation, ebuilds/packages you are
testing, etc... Please note that you should not store distfiles for public
distribution in this space only for distribution to other developers/testers.
Packages for public distribution should be put on the distfiles mirror.
</p>

<p>
Your dev space is for Gentoo related files. You may not host files for your
company/home business, pornography or any file that is considered illegal in
the United States (woodpecker is located in the USA). Pages in your public_html
folder are viewable by the world and their contents should follow the same
rules. You may not use your dev space to make money in any way. This includes
banner swapping, auctions (or hosting images for your auctions) or google ads.
As usual, common sense should apply.
</p>

<p>
If any files in your space are found to be harmful towards other developers or
users on the box or pose a risk to the Gentoo project (such as illegal
torrents, pornography, etc...), Gentoo Infrastructure will suspend your account
which will only be unlocked after investigation from Gentoo Developer Relations.
In most cases, your developership will be suspended if such files are found. If
you are unsure of the impact a file may have on another developer or Gentoo in
general please ask your Mentor or someone else appropriate to review it for you.
</p>

</body>
</section>
<section>
<title>Uploading Files</title>
<body>

<p>
If your recruiter didn't set up the <path>public_html</path> directory for you
go ahead and do it yourself like this:
</p>

<pre caption="Create public_html">
username@homebox ~$ <i>ssh $USERNAME@dev.gentoo.org</i>
Enter passphrase for key '/home/username/.ssh/id_rsa':<comment>(Enter your passphrase)</comment>

username@woodpecker home$ <i>cd ~/$USERNAME</i>
username@woodpecker ~$ <i>mkdir public_html</i>
username@woodpecker ~$ <i>chmod -R 755 public_html</i>
username@woodpecker ~$ <i>echo "Options Indexes" > public_html/.htaccess</i><comment>(to enable dir indexing if desired)</comment>
</pre>

<p>
The Infrastructure Project does not make backups of developer files. You are
responsible for making backups of any and all files contained in your developer
space. I suggest creating a mirror on your local box: <path>~/devspace</path>.
</p>

<p>
Now copy your files using <c>scp</c> or <c>rsync</c>.
</p>

<pre caption="Secure Copy with scp">
username@homebox devspace$ <i>scp index.htm $USERNAME@dev.gentoo.org:~/public_html</i>
Enter passphrase for key '/home/$USERNAME/.ssh/id_rsa': <comment>(Enter yoru passphrase)</comment>
</pre>

<pre caption="Secure Copy with rsync">
$ <i>rsync -ruav -e ssh ~/devspace $USER@dev.gentoo.org:~/</i>
Enter passphrase for key '/home/$USERNAME/.ssh/id_rsa': <comment>(Enter your passphrase)</comment>
</pre>

</body>
</section>
<section>
<title>Supported Languages</title>
<body>

<p>
dev.gentoo.org has HTML, SHTML, XML and PHP available for you to write your web
pages.
</p>

<p>
XML uses the same XSL and <uri link="/proj/en/gdp/doc/gorg.xml">gorg</uri> from
www.gentoo.org. This allows you to write your documentation in the official <uri
link="/doc/en/xml-guide.xml">guideXML specification</uri> for inclusion on the
www.gentoo.org website. All documents on the official website are in this
format.
</p>

<note>
To remove <c>gorg</c> as the <path>.xml</path> handler add the following to your
<path>.htaccess</path> file in your <path>public_html</path> directory:
<c>RemoveHandler .xml</c>
</note>

</body>
</section>
<section>
<title>Resources</title>
<body>

<ul>
  <li><uri>http://www.openssh.com</uri></li>
  <li><uri>http://samba.anu.edu.au/rsync/</uri></li>
  <li><uri>http://www.gentoo.org/proj/en/gdp/doc/gorg.xml</uri></li>
  <li><uri>http://www.gentoo.org/doc/en/xml-guide.xml</uri></li>
  <li><uri>http://httpd.apache.org/docs/2.0/howto/htaccess.html</uri></li>
</ul>

</body>
</section>
</chapter>
</guide>
