tazwok rev 235

Add functionnality: webserver
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Feb 10 15:36:26 2011 +0100 (2011-02-10)
parents a618127f3ce2
children ff1479df1f17
files tazwok web/conf.php web/index.php web/log.php web/slitaz.css
line diff
     1.1 --- a/tazwok	Wed Feb 09 23:19:01 2011 +0100
     1.2 +++ b/tazwok	Thu Feb 10 15:36:26 2011 +0100
     1.3 @@ -92,7 +92,18 @@
     1.4  	else
     1.5  		LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION
     1.6  	fi
     1.7 -
     1.8 +	
     1.9 +	if ! [ "$save_dir" ]; then
    1.10 +		if [ -f $LOCAL_REPOSITORY/tazwok.conf ] || [ -f $LOCAL_REPOSITORY/slitaz.conf ]; then
    1.11 +			save_dir=$LOCAL_REPOSITORY
    1.12 +			[ -f $LOCAL_REPOSITORY/slitaz.conf ] && source $LOCAL_REPOSITORY/slitaz.conf
    1.13 +			cd $save_dir
    1.14 +			get_tazwok_config
    1.15 +			unset save_dir
    1.16 +			return
    1.17 +		fi
    1.18 +	fi
    1.19 +	
    1.20  	# The path to the most important files/dir used by Tazwok.
    1.21  	PACKAGES_REPOSITORY=$LOCAL_REPOSITORY/packages
    1.22  	WOK=$LOCAL_REPOSITORY/wok
    1.23 @@ -116,7 +127,7 @@
    1.24  		check_dir $INCOMING_REPOSITORY
    1.25  		check_dir $LOCAL_REPOSITORY/log
    1.26  	fi
    1.27 -	
    1.28 +
    1.29  	# Some files are needed by tazwok in PACKAGES_REPOSITORY. Create
    1.30  	# them if they are missing.
    1.31  	for file in broken blocked commit incoming cooklist; do
    1.32 @@ -2750,6 +2761,91 @@
    1.33  			exit 1
    1.34  		fi
    1.35  	;;
    1.36 +	webserver)
    1.37 +		check_root
    1.38 +		get_tazwok_config
    1.39 +		if [ "$ARG" = on ]; then
    1.40 +			if [ "$WEBSERVER" ] && [ -f "$WEBSERVER/repositories.list" ] && \
    1.41 +				grep -q ^"${undigest:-$SLITAZ_VERSION}"$ $WEBSERVER/repositories.list; then
    1.42 +				echo "Webserver is already enabled at $WEBSERVER for ${undigest:-$SLITAZ_VERSION}." >&2
    1.43 +				exit 1
    1.44 +			fi
    1.45 +			if ! [ -f $LOCAL_REPOSITORY/tazchroot.conf ]; then
    1.46 +				tazwok configure-chroot ${undigest:+--undigest=$undigest} --SLITAZ_VERSION=$SLITAZ_VERSION --SLITAZ_DIR=$SLITAZ_DIR
    1.47 +			fi
    1.48 +			for pkg in php lighttpd; do
    1.49 +				[ -d $INSTALLED/$pkg ] || missing="$missing $pkg"
    1.50 +			done
    1.51 +			if [ "$missing" ]; then
    1.52 +				echo "You need to install those packages to start webserver: $missing." >&2
    1.53 +				exit 1
    1.54 +			fi
    1.55 +			if [ ! -f "$LOCAL_REPOSITORY/tazwok.conf" ]; then
    1.56 +				echo "Copying /etc/slitaz/tazwok.conf to $LOCAL_REPOSITORY/tazwok.conf: webserver is configured repository-by-repository."
    1.57 +				cp /etc/slitaz/tazwok.conf $LOCAL_REPOSITORY
    1.58 +			fi
    1.59 +			if ! [ "$WEBSERVER" ]; then
    1.60 +				echo -n "Where to store php pages (default: /var/www/vhosts/bb)? "
    1.61 +				read WEBSERVER
    1.62 +				[ "$WEBSERVER" ] || WEBSERVER="/var/www/vhosts/bb"
    1.63 +			fi
    1.64 +			if [ -f "$WEBSERVER/repositories.list" ] && \
    1.65 +				grep -q ^"${undigest:-$SLITAZ_VERSION}"$ $WEBSERVER/repositories.list; then
    1.66 +				echo "Webserver is already enabled at $WEBSERVER for ${undigest:-$SLITAZ_VERSION}." >&2
    1.67 +				exit 1
    1.68 +			fi
    1.69 +			mkdir -p $WEBSERVER
    1.70 +			echo "${undigest:-$SLITAZ_VERSION}" >> $WEBSERVER/repositories.list
    1.71 +			for file in index.php log.php; do
    1.72 +				[ -f "$WEBSERVER/$file" ] || ln -s /usr/share/slitaz/web-bb/$file $WEBSERVER
    1.73 +			done
    1.74 +			source $LOCAL_REPOSITORY/tazchroot.conf	
    1.75 +			echo "<?php
    1.76 +
    1.77 +// Web interface configuration
    1.78 +
    1.79 +\$version=\"${undigest:-$SLITAZ_VERSION}\";
    1.80 +\$chroot=\"$chroot_dir\";
    1.81 +\$lockfile=\"\$chroot/proc/1\";
    1.82 +\$db_dir=\"$PACKAGES_REPOSITORY\";
    1.83 +\$log_dir=\"$LOCAL_REPOSITORY/log\";
    1.84 +\$packages=\"$PACKAGES_REPOSITORY\";
    1.85 +\$incoming=\"$INCOMING_REPOSITORY\";
    1.86 +
    1.87 +?>" > $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php
    1.88 +			[ -L "$WEBSERVER/web" ] || ln -s /usr/share/slitaz/web $WEBSERVER
    1.89 +			echo "WEBSERVER=\"$WEBSERVER\"" >> $LOCAL_REPOSITORY/tazwok.conf
    1.90 +			if [ -L "$WEBSERVER/conf.php" ]; then
    1.91 +				echo "Do yo want to make ${undigest:-$SLITAZ_VERSION} the default page (y/N) ? "
    1.92 +				read answer
    1.93 +				if [ "$answer" = y ]; then
    1.94 +					rm $WEBSERVER/conf.php
    1.95 +					ln -s $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php $WEBSERVER/conf.php
    1.96 +				fi
    1.97 +			else
    1.98 +				ln -s $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php $WEBSERVER/conf.php
    1.99 +			fi
   1.100 +		elif [ "$ARG" = off ]; then
   1.101 +			if ! [ "$WEBSERVER" ]; then
   1.102 +				echo "No webserver running for ${undigest:-$SLITAZ_VERSION}" >&2
   1.103 +				exit 1
   1.104 +			fi
   1.105 +			sed '/^WEBSERVER/d' -i $LOCAL_REPOSITORY/tazwok.conf
   1.106 +			sed "/^${undigest:-$SLITAZ_VERSION}$/d" -i $WEBSERVER/repositories.list
   1.107 +			rm $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php	
   1.108 +			if ! [ -s "$WEBSERVER/repositories.list" ]; then
   1.109 +				echo "$WEBSERVER/repositories.list is empty; tazwok doesn't remove the server automatically in case you have important stuff in it. If it's not the case, you can remove it using: rm -r $WEBSERVER"
   1.110 +				rm $WEBSERVER/conf.php	
   1.111 +			elif [ "$(readlink $WEBSERVER/conf.php)" = "$WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php" ]; then
   1.112 +				echo "${undigest:-$SLITAZ_VERSION} was the default version to use; switched to : $(sed 1!d $WEBSERVER/repositories.list)"
   1.113 +				rm $WEBSERVER/conf.php
   1.114 +				ln -s $WEBSERVER/conf-$(sed 1!d $WEBSERVER/repositories.list).php $WEBSERVER/conf.php
   1.115 +			fi
   1.116 +		else
   1.117 +			echo "Usage: tazwok webserver on/off" >&2
   1.118 +			exit 1
   1.119 +		fi
   1.120 +	;;
   1.121  	usage|*)
   1.122  		# Print usage also for all unknown commands.
   1.123  		#
     2.1 --- a/web/conf.php	Wed Feb 09 23:19:01 2011 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,12 +0,0 @@
     2.4 -<?php
     2.5 -
     2.6 -// Tazwok web interface configuration
     2.7 -
     2.8 -$chroot     = "/home/slitaz/$version/chroot";
     2.9 -$lockfile   = "$chroot/home/slitaz/$version/packages/lock";
    2.10 -$db_dir     = "$chroot/home/slitaz/$version/packages";
    2.11 -$log_dir    = "$chroot/home/slitaz/$version/log";
    2.12 -$packages   = "$chroot/home/slitaz/$version/packages";
    2.13 -$hgurl      = "http://hg.slitaz.org/$wok";
    2.14 -
    2.15 -?>
     3.1 --- a/web/index.php	Wed Feb 09 23:19:01 2011 +0100
     3.2 +++ b/web/index.php	Thu Feb 10 15:36:26 2011 +0100
     3.3 @@ -1,13 +1,15 @@
     3.4 +
     3.5 +
     3.6  <?php
     3.7 -$version='cooking';
     3.8 -$notversion='stable';
     3.9 -$wok='wok';
    3.10 -if (isset($_GET['stable'])) {
    3.11 -	$version='stable';
    3.12 -	$notversion='cooking';
    3.13 -	$wok='wok-stable';
    3.14 +$version=$_GET["version"];
    3.15 +if (file_exists("conf-$version.php")) {
    3.16 +	include("conf-$version.php");
    3.17  }
    3.18 -include("conf.php");
    3.19 +else {
    3.20 +	if (file_exists("conf.php")) {
    3.21 +		include("conf.php");
    3.22 +	}
    3.23 +}
    3.24  ?>
    3.25  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    3.26      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3.27 @@ -17,101 +19,98 @@
    3.28      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    3.29      <meta name="description" content="Tazbb web interface" />
    3.30      <meta name="robots" content="index nofollow" />
    3.31 -    <link rel="shortcut icon" href="favicon.ico" />
    3.32 -    <link rel="stylesheet" type="text/css" href="slitaz.css" />
    3.33 +    <link rel="shortcut icon" href="web/favicon.ico" />
    3.34 +    <link rel="stylesheet" type="text/css" href="web/slitaz.css" />
    3.35  </head>
    3.36 +<body>
    3.37  
    3.38 -<body bgcolor="#ffffff">
    3.39  <!-- Header -->
    3.40  <div id="header">
    3.41 -    <a name="top"></a>
    3.42 -<!-- Access -->                                                                 
    3.43 -<div id="access">
    3.44 -    <a href="/<?php if ($version != 'stable')
    3.45 -echo "?stable"; ?>" title="Slitaz <?php
    3.46 -echo $notversion ?> packages"><?php echo $notversion ?></a>                          
    3.47 -</div>                                                                         
    3.48 +	<!-- Access -->
    3.49 +	<div id="access">
    3.50 +	    <?php
    3.51 +			$versions_list = fopen('repositories.list', 'r');
    3.52 +				if($versions_list)
    3.53 +				{
    3.54 +					$otherversion   = '';
    3.55 +					while(!feof($versions_list))
    3.56 +					{
    3.57 +						$otherversion = fgets($versions_list);
    3.58 +						echo "<a href=\"?version=$otherversion\">$otherversion</a>";
    3.59 +					}
    3.60 +				fclose($versions_list);
    3.61 +				}
    3.62 +		?>
    3.63 +	</div>
    3.64      <a href="http://bb.slitaz.org/"><img id="logo"
    3.65 -    src="pics/website/logo.png" title="bb.slitaz.org" alt="bb.slitaz.org"
    3.66 -    style="border: 0px solid ; width: 200px; height: 74px;" /></a>
    3.67 -    <p id="titre">#!/bb/packages/<?php echo $version; ?></p>
    3.68 -</div>
    3.69 -
    3.70 -<!-- Navigation menu -->
    3.71 -<div id="nav">
    3.72 -
    3.73 -<div class="nav_box">
    3.74 -<h4>SliTaz Network</h4>
    3.75 -<ul>
    3.76 -	<li><a href="http://www.slitaz.org/">Main Website</a></li>
    3.77 -	<li><a href="http://doc.slitaz.org/">Documentation</a></li>
    3.78 -	<li><a href="http://forum.slitaz.org/">Community Forum</a></li>
    3.79 -	<li><a href="http://labs.slitaz.org/">SliTaz Labs</a></li>
    3.80 -	<li><a href="http://pkgs.slitaz.org/">Packages Database</a></li>
    3.81 -	<li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
    3.82 -	<li><a href="http://www.distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
    3.83 -</ul>
    3.84 -</div>
    3.85 -
    3.86 -<div class="nav_box">
    3.87 -<h4>SliTaz Developers</h4>
    3.88 -<ul>
    3.89 -	<li><a href="http://hg.slitaz.org/">Hg Repositories</a></li>
    3.90 -	<li><a href="http://tank.slitaz.org/">Tank Server</a></li>
    3.91 -	<li><a href="http://people.slitaz.org/">People Stuff</a></li>
    3.92 -	<li><a href="http://labs.slitaz.org/wiki/distro">Distro Wiki</a></li>
    3.93 -	
    3.94 -</ul>
    3.95 -</div>
    3.96 -
    3.97 -<!-- End navigation menu -->
    3.98 -</div>
    3.99 -
   3.100 -<!-- Content top. -->
   3.101 -<div id="content_top">
   3.102 -<div class="top_left"></div>
   3.103 -<div class="top_right"></div>
   3.104 +		src="web/logo.png"
   3.105 +		title="bb.slitaz.org" alt="bb.slitaz.org" /></a>
   3.106 +    <p id="titre">#!/Build/Bot/<?php echo $version; ?></p>
   3.107  </div>
   3.108  
   3.109  <!-- Content -->
   3.110 -<div id="content">
   3.111 +<div id="content-full">
   3.112  
   3.113 -<h1><font color="#3E1220">Build Bot</font></h1>
   3.114 -<h2><font color="#DF8F06">/usr/bin/tazbb</font></h2>
   3.115 +<!-- Block begin -->
   3.116 +<div class="block">
   3.117 +	<!-- Nav block begin -->
   3.118 +	<div id="block_nav">
   3.119 +		<h3><img src="pics/website/development.png" alt="" />Developers</h3>
   3.120 +		<ul>
   3.121 +			<li><a href="http://www.slitaz.org/en/devel/">Website/devel</a></li>
   3.122 +			<li><a href="http://labs.slitaz.org/">Laboratories</a></li>
   3.123 +			<li><a href="http://hg.slitaz.org/">Mercurial Repos</a></li>
   3.124 +			<li><a href="http://people.slitaz.org/">People Stuff</a></li>
   3.125 +			<li><a href="http://scn.slitaz.org/">Community Network</a></li>
   3.126 +		</ul>
   3.127 +	<!-- Nav block end -->
   3.128 +	</div>
   3.129 +	<!-- Top block begin -->
   3.130 +	<div id="block_top">
   3.131 +		<h1>Build Bot</h1>
   3.132 +		<p>
   3.133 +			Tazwok-experimental is a <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
   3.134 +			Build Bot, it automatically cooks and tests packages commited in
   3.135 +			the wok. SliTaz <a href="http://pkgs.slitaz.org/">packages</a> are
   3.136 +			cooked on the project main server: code name 
   3.137 +			<a href="http://tank.slitaz.org">Tank</a>. This web interface gives
   3.138 +			the current status of the build bot and the last report
   3.139 +			about any packages modified by the SliTaz contributors in 
   3.140 +			the Mercurial repositories, aka 
   3.141 +			<a href="http://hg.slitaz.org/">Hg repos</a>.
   3.142 +		</p>
   3.143 +	<!-- Top block end -->
   3.144 +	</div>
   3.145 +<!-- Block end -->
   3.146 +</div>
   3.147 +
   3.148 +<h2>Cooklog</h2>
   3.149  
   3.150  <p>
   3.151 -Tazwok is the <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a> Build Bot,
   3.152 -it automatically cooks and tests packages commited in the wok. SliTaz
   3.153 -<a href="http://pkgs.slitaz.org/">packages</a> are cooked on the project
   3.154 -main server: code name <a href="http://tank.slitaz.org">Tank</a>. This
   3.155 -web interface gives the current status of the build bot and the last report
   3.156 -about any packages modified by the SliTaz contributors in the Mercurial
   3.157 -repositories, aka <a href="http://hg.slitaz.org/">Hg repos</a>.
   3.158 +	<form action="log.php" method="get">
   3.159 +		<input type="hidden" name="version" value="<?php
   3.160 +echo "$version";
   3.161 +?>
   3.162 +" />
   3.163 +		Show pkg log:<br />
   3.164 +		 <input type="text" name="package" />
   3.165 +		<!-- <input type="submit" value="Show" /> -->
   3.166 +	</form><br />
   3.167 +Note:<br />
   3.168 +Flavors/Iso build log are named iso-?flavor <br />
   3.169 +Temporary toolchain log are named tmp-toolchain-?package <br />
   3.170  </p>
   3.171  
   3.172 -<form action="log.php" method="get">
   3.173 +<pre>
   3.174  <?php
   3.175 -	if ($version == 'stable')
   3.176 -		echo '<input type="hidden" name="stable" value="1" />';
   3.177 -?>	Show cooklog: <input type="text" name="package" />
   3.178 -	<!-- <input type="submit" value="Show" /> -->
   3.179 -</form>
   3.180 -
   3.181 -<h3>Summary</h3>
   3.182 -<pre class="package">
   3.183 -<?php
   3.184 -
   3.185  // Check curent status (update in real time) and display summary.
   3.186 -
   3.187  if (file_exists($lockfile)) {
   3.188 -	echo "Status   : Running ";
   3.189 -	include("$db_dir/running");
   3.190 +	echo "Status   : Chroot is mounted\n";
   3.191  }
   3.192  else {
   3.193 -	echo "Status   : Not currently running\n";
   3.194 +	echo "Status   : Chroot is not mounted\n";
   3.195  }
   3.196  include("$db_dir/summary");
   3.197 -
   3.198  ?>
   3.199  </pre>
   3.200  
   3.201 @@ -122,13 +121,6 @@
   3.202  ?>
   3.203  </pre>
   3.204  
   3.205 -<h3>Genpkglist</h3>
   3.206 -<pre class="package">
   3.207 -<?php
   3.208 -include("$db_dir/genpkglist");
   3.209 -?>
   3.210 -</pre>
   3.211 -
   3.212  <h3>Cooklist</h3>
   3.213  <pre class="package">
   3.214  <?php
   3.215 @@ -153,8 +145,8 @@
   3.216  <h3>Last cooked packages</h3>
   3.217  <pre class="package">
   3.218  <?php
   3.219 -system("cd $packages && ls -1t *.tazpkg | head -20 | \
   3.220 -	while read file; do echo -n \$(stat -c '%y' $packages/\$file | \
   3.221 +system("cd $incoming && ls -1t *.tazpkg | head -20 | \
   3.222 +	while read file; do echo -n \$(stat -c '%y' $incoming/\$file | \
   3.223  	cut -d. -f1); echo '   '\$file; done"); ?>
   3.224  </pre>
   3.225  
   3.226 @@ -173,26 +165,35 @@
   3.227  	cut -d. -f1); echo '   '\$file; done"); ?>
   3.228  </pre>
   3.229  
   3.230 -<!-- End of content with round corner -->
   3.231 +<!-- End of content -->
   3.232  </div>
   3.233  
   3.234 -<!-- Start of footer and copy notice -->
   3.235 -<div id="copy">
   3.236 -<p>
   3.237 -Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
   3.238 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   3.239 -</p>
   3.240 -<!-- End of copy -->
   3.241 -</div>
   3.242 -
   3.243 -<!-- Bottom and logo's -->
   3.244 -<div id="bottom">
   3.245 -<p>
   3.246 -<a href="http://validator.w3.org/check?uri=referer"><img
   3.247 -   src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   3.248 -   title="Code validé XHTML 1.0"
   3.249 -   style="width: 80px; height: 15px;" /></a>
   3.250 -</p>
   3.251 +<!-- Footer -->
   3.252 +<div id="footer">
   3.253 +	<div class="right_box">
   3.254 +	<h4>SliTaz Network</h4>
   3.255 +		<ul>
   3.256 +			<li><a href="http://www.slitaz.org/">Main Website</a></li>
   3.257 +			<li><a href="http://doc.slitaz.org/">Documentation</a></li>
   3.258 +			<li><a href="http://forum.slitaz.org/">Support Forum</a></li>
   3.259 +			<li><a href="http://scn.slitaz.org/">Community Network</a></li>
   3.260 +			<li><a href="http://labs.slitaz.org/">Laboratories</a></li>
   3.261 +			<li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
   3.262 +		</ul>
   3.263 +	</div>
   3.264 +	<h4>SliTaz Website</h4>
   3.265 +	<ul>
   3.266 +		<li><a href="#header">Top of the page</a></li>
   3.267 +		<li>Copyright &copy; <span class="year"></span>
   3.268 +			<a href="http://www.slitaz.org/">SliTaz</a></li>
   3.269 +		<li><a href="http://www.slitaz.org/en/about/">About the project</a></li>
   3.270 +		<li><a href="http://www.slitaz.org/netmap.php">Network Map</a></li>
   3.271 +		<li>Page modified the <?php echo (date( "d M Y", getlastmod())); ?></li>
   3.272 +		<li><a href="http://validator.w3.org/check?uri=referer"><img
   3.273 +		src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   3.274 +		title="Code validé XHTML 1.0"
   3.275 +		style="width: 80px; height: 15px; vertical-align: middle;" /></a></li>
   3.276 +	</ul>
   3.277  </div>
   3.278  
   3.279  </body>
     4.1 --- a/web/log.php	Wed Feb 09 23:19:01 2011 +0100
     4.2 +++ b/web/log.php	Thu Feb 10 15:36:26 2011 +0100
     4.3 @@ -1,118 +1,23 @@
     4.4  <?php
     4.5 -$version='cooking';
     4.6 -$wok='wok';
     4.7 -if (isset($_GET['stable'])) {
     4.8 -	$version='stable';
     4.9 -	$wok='wok-stable';
    4.10 +$version=$_GET["version"];
    4.11 +if (file_exists("conf-$version.php")) {
    4.12 +	include("conf-$version.php");
    4.13  }
    4.14 -include("conf.php");
    4.15 -?>
    4.16 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    4.17 -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    4.18 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    4.19 -<head>
    4.20 -    <title>Tazbb cooklog <?php echo $_GET['package']; ?></title>
    4.21 -    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    4.22 -    <meta name="description" content="Tazbb web interface cooklog" />
    4.23 -    <meta name="robots" content="index nofollow" />
    4.24 -    <link rel="shortcut icon" href="favicon.ico" />
    4.25 -    <link rel="stylesheet" type="text/css" href="slitaz.css" />
    4.26 -</head>
    4.27 -
    4.28 -<body bgcolor="#ffffff">
    4.29 -<!-- Header -->
    4.30 -<div id="header">
    4.31 -    <a name="top"></a>
    4.32 -    <a href="http://bb.slitaz.org/"><img id="logo"
    4.33 -    src="pics/website/logo.png" title="bb.slitaz.org" alt="bb.slitaz.org"
    4.34 -    style="border: 0px solid ; width: 200px; height: 74px;" /></a>
    4.35 -    <p id="titre">#!/bb/packages<?php if ($version == 'stable') echo '/stable'; ?></p>
    4.36 -</div>
    4.37 -
    4.38 -<!-- Navigation menu -->
    4.39 -<div id="nav">
    4.40 -
    4.41 -<div class="nav_box">
    4.42 -<h4>SliTaz Network</h4>
    4.43 -<ul>
    4.44 -	<li><a href="http://www.slitaz.org/">Main Website</a></li>
    4.45 -	<li><a href="http://doc.slitaz.org/">Documentation</a></li>
    4.46 -	<li><a href="http://forum.slitaz.org/">Community Forum</a></li>
    4.47 -	<li><a href="http://labs.slitaz.org/">SliTaz Labs</a></li>
    4.48 -	<li><a href="http://pkgs.slitaz.org/">Packages Database</a></li>
    4.49 -	<li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
    4.50 -	<li><a href="http://www.distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
    4.51 -</ul>
    4.52 -</div>
    4.53 -
    4.54 -<div class="nav_box">
    4.55 -<h4>SliTaz Developers</h4>
    4.56 -<ul>
    4.57 -	<li><a href="http://hg.slitaz.org/">Hg Repositories</a></li>
    4.58 -	<li><a href="http://tank.slitaz.org/">Tank Server</a></li>
    4.59 -	<li><a href="http://people.slitaz.org/">People Stuff</a></li>
    4.60 -	<li><a href="http://labs.slitaz.org/wiki/distro">Distro Wiki</a></li>
    4.61 -</ul>
    4.62 -</div>
    4.63 -
    4.64 -<!-- End navigation menu -->
    4.65 -</div>
    4.66 -
    4.67 -<!-- Content -->
    4.68 -<div id="content">
    4.69 -
    4.70 -<h1><font color="#3E1220">Build Bot</font></h1>
    4.71 -<h2><font color="#DF8F06">Cooklog</font></h2>
    4.72 -
    4.73 -<p>
    4.74 -<form action="log.php" method="get">
    4.75 -	Show cooklog: <input type="text" name="package" />
    4.76 -	<!-- <input type="submit" value="Show" /> -->
    4.77 -<?php
    4.78 -
    4.79 -if ($_GET['package']) {
    4.80 -	$pkg = $_GET["package"];
    4.81 -	if (file_exists("$log_dir/$pkg.log")) {
    4.82 -		echo " Package $pkg: ";
    4.83 -		echo '<a href="' . "log/$pkg.log" . '">Raw log</a> ' . "\n";
    4.84 -		echo '</form></p>';
    4.85 -		echo '<pre class="log">' . "\n";
    4.86 -		echo date ("F d Y H:i:s", filemtime("log/$pkg.log"))."\n";
    4.87 -		include("$log_dir/$pkg.log");
    4.88 -		echo '</pre>';
    4.89 +else {
    4.90 +	if (file_exists("conf.php")) {
    4.91 +		include("conf.php");
    4.92  	}
    4.93 +}
    4.94 +$package=$_GET["package"];
    4.95 +if ("$package") {
    4.96 +	if (file_exists("$log_dir/$package.html")) {
    4.97 +		include ("$log_dir/$package.html");
    4.98 +	}	
    4.99  	else {
   4.100 -		echo " No log file found for: $pkg";
   4.101 -		echo '</form></p>';
   4.102 +		echo "No log available for $package.";
   4.103  	}
   4.104  }
   4.105  else {
   4.106 -	echo '</form></p>';
   4.107 +	echo "Strange things happens...";
   4.108  }
   4.109 -
   4.110  ?>
   4.111 -
   4.112 -<!-- End of content with round corner -->
   4.113 -</div>
   4.114 -
   4.115 -<!-- Start of footer and copy notice -->
   4.116 -<div id="copy">
   4.117 -<p>
   4.118 -Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
   4.119 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   4.120 -</p>
   4.121 -<!-- End of copy -->
   4.122 -</div>
   4.123 -
   4.124 -<!-- Bottom and logo's -->
   4.125 -<div id="bottom">
   4.126 -<p>
   4.127 -<a href="http://validator.w3.org/check?uri=referer"><img
   4.128 -   src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   4.129 -   title="Code validé XHTML 1.0"
   4.130 -   style="width: 80px; height: 15px;" /></a>
   4.131 -</p>
   4.132 -</div>
   4.133 -
   4.134 -</body>
   4.135 -</html>
     5.1 --- a/web/slitaz.css	Wed Feb 09 23:19:01 2011 +0100
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,366 +0,0 @@
     5.4 -/*
     5.5 -	CSS style for SliTaz GNU/Linux website
     5.6 -	www.slitaz.org - (c) 2007 Pankso
     5.7 -*/
     5.8 -
     5.9 -html {
    5.10 -	height:  102%;
    5.11 -}
    5.12 -
    5.13 -body {
    5.14 -	background: #ffffff;
    5.15 -	color: black;
    5.16 -	font: 13px sans-serif, vernada, arial;
    5.17 -	margin: 0;
    5.18 -}
    5.19 -
    5.20 -/* Accessibility */
    5.21 -
    5.22 -#access {
    5.23 -	position: absolute;
    5.24 -	top: 4px;
    5.25 -	right: 4px;
    5.26 -	text-align: right;
    5.27 -	width: 100%;
    5.28 -	margin: 0;
    5.29 -	font-size: 11px;
    5.30 -	font-weight: bold;
    5.31 -}
    5.32 -
    5.33 -#access a {
    5.34 -	background: inherit;
    5.35 -	color: white;
    5.36 -	text-decoration: none;
    5.37 -}
    5.38 -
    5.39 -#access a:hover {
    5.40 -	background: inherit;
    5.41 -	color: #222222;
    5.42 -}
    5.43 -
    5.44 -/* Header and title */
    5.45 -
    5.46 -#header{
    5.47 -	background: #f0ba08 url(pics/website/header.png) repeat-x top;
    5.48 -	color: black;
    5.49 -	width: 100%;
    5.50 -	height: 50px;
    5.51 -	border-top: 1px solid black;
    5.52 -	border-bottom: 1px solid black;
    5.53 -	margin-bottom: 30px;
    5.54 -}
    5.55 -
    5.56 -#titre {
    5.57 -	position: absolute;
    5.58 -	font-size: 16px;
    5.59 -	font-weight: bolder ;
    5.60 -	margin-left: 200px;
    5.61 -	margin-top: 28px;
    5.62 -}
    5.63 -
    5.64 -#logo {
    5.65 -	position: absolute;
    5.66 -	float: left;
    5.67 -	margin-left: 16px;
    5.68 -	margin-top: 0px;
    5.69 -}
    5.70 -
    5.71 -/* Navigation */
    5.72 -
    5.73 -#nav {
    5.74 -	position: absolute;
    5.75 -	top: 76px;
    5.76 -	right: 80px;
    5.77 -	color: #555555;
    5.78 -	float: right;
    5.79 -	width: 250px;
    5.80 -	line-height: 1.5em;
    5.81 -	text-align: left;
    5.82 -	font-size: 12px;
    5.83 -}
    5.84 -
    5.85 -#nav ul {
    5.86 -	-moz-border-radius: 8px;
    5.87 -	-webkit-border-radius: 8px;
    5.88 -	list-style-type: none;
    5.89 -	margin: 10px 0;
    5.90 -	padding: 10px 24px 10px 24px;
    5.91 -	background-color: #eaeaea;
    5.92 -}
    5.93 -
    5.94 -#nav .nav_box ul {
    5.95 -	list-style-type: none;
    5.96 -	margin: 0;
    5.97 -	padding: 10px 24px 10px 0px;
    5.98 -}
    5.99 -
   5.100 -#nav li {
   5.101 -	display: inline;
   5.102 -}
   5.103 -
   5.104 -#nav h4 {
   5.105 -	font-size: 110%;
   5.106 -	color: #666666;
   5.107 -	font-weight: bold;
   5.108 -	margin: 0;
   5.109 -	padding: 0 0 1px 0;
   5.110 -	border-bottom: 1px solid #cecece;
   5.111 -}
   5.112 -
   5.113 -#nav a {
   5.114 -	color: #0F314E;
   5.115 -	background: inherit;
   5.116 -	display: block;
   5.117 -	text-decoration: none;
   5.118 -	font-weight: bold;
   5.119 -}
   5.120 -
   5.121 -#nav a:hover {
   5.122 -	color: #DF8F06;
   5.123 -	text-decoration: none;
   5.124 -	display: block;
   5.125 -}
   5.126 -
   5.127 -#nav hr {
   5.128 -	margin: 2px 0px 1px 0px;
   5.129 -	border: 0px;
   5.130 -	border-top: 1px solid #BDBDBD;
   5.131 -
   5.132 -}
   5.133 -
   5.134 -.nav_box {
   5.135 -	-moz-border-radius: 8px;
   5.136 -	-webkit-border-radius: 8px;
   5.137 -	margin: 10px 0;
   5.138 -	padding: 10px 24px 10px 24px;
   5.139 -	background-color: #eaeaea;
   5.140 -	text-align: justify;
   5.141 -}
   5.142 -
   5.143 -#nav .nav_box p {
   5.144 -	line-height: 1.3em;
   5.145 -}
   5.146 -
   5.147 -#nav .nav_box p a {
   5.148 -	display: inline;
   5.149 -	font-weight: normal;
   5.150 -	text-decoration: underline;
   5.151 -}
   5.152 -
   5.153 -#nav .nav_box p a:hover {
   5.154 -	text-decoration: none;
   5.155 -	color: blue;
   5.156 -	background: inherit;
   5.157 -}
   5.158 -
   5.159 -#nav hr {
   5.160 -	height: 0px;
   5.161 -	border: 0px solid #eaeaea;
   5.162 -}
   5.163 -
   5.164 -/* Page content */
   5.165 -
   5.166 -#content, #content_bottom, #content_top {
   5.167 -	background: white;
   5.168 -	color: black;
   5.169 -	text-align: justify;
   5.170 -}
   5.171 -
   5.172 -#content {
   5.173 -	height: auto;
   5.174 -	margin: 6px 320px 0px 0px;
   5.175 -	padding: 0px 40px 60px 80px;
   5.176 -}
   5.177 -
   5.178 -#content li {
   5.179 -	line-height: 1.5em;
   5.180 -	text-align: left;
   5.181 -}
   5.182 -
   5.183 -/* Legal informations */
   5.184 -
   5.185 -#copy {
   5.186 -	font-size: 11px ;
   5.187 -	text-align: left ;
   5.188 -	background: transparent;
   5.189 -	color: #a8a8a8;
   5.190 -	padding-top: 10px;
   5.191 -	margin: 0 0 0 80px;
   5.192 -}
   5.193 -
   5.194 -#copy a {
   5.195 -	background: inherit;
   5.196 -	color: #a8a8a8;
   5.197 -}
   5.198 -
   5.199 -#copy a:hover {
   5.200 -	background: inherit;
   5.201 -	color: #666666;
   5.202 -}
   5.203 -
   5.204 -/* Footer */
   5.205 -
   5.206 -#bottom {
   5.207 -	float: none;
   5.208 -	background: inherit;
   5.209 -	color: black;
   5.210 -	width: auto;
   5.211 -	clear: both;
   5.212 -	padding: 0;
   5.213 -	margin: 0 0 0 80px;
   5.214 -	text-align: left;
   5.215 -	vertical-align: middle;
   5.216 -}
   5.217 -
   5.218 -#news li {
   5.219 -	list-style-type: square;
   5.220 -	border-bottom: 1px dotted #BEBEBE;
   5.221 -	margin-left: -25px;
   5.222 -	padding: 4px 0px 4px 0px;
   5.223 -}
   5.224 -
   5.225 -#gallery {
   5.226 -	text-align: center;
   5.227 -}
   5.228 -
   5.229 -#gallery table {
   5.230 -	margin: 30px 0px 30px 0px;
   5.231 -}
   5.232 -
   5.233 -/* Clouds */
   5.234 -
   5.235 -#cloud {
   5.236 -	padding: 20px 0px 20px 0px;
   5.237 -	line-height: 3em;
   5.238 -	text-align: center;
   5.239 -}
   5.240 -#cloud a { padding: 4px; color: #956411; }
   5.241 -#cloud a.tag1 { font-size: 0.7em; font-weight: 100; }
   5.242 -#cloud a.tag2 { font-size: 0.8em; font-weight: 200; }
   5.243 -#cloud a.tag3 { font-size: 0.9em; font-weight: 300; }
   5.244 -#cloud a.tag4 { font-size: 1.0em; font-weight: 400; }
   5.245 -#cloud a.tag5 { font-size: 1.2em; font-weight: 500; }
   5.246 -#cloud a.tag6 { font-size: 1.4em; font-weight: 600; }
   5.247 -#cloud a.tag7 { font-size: 1.6em; font-weight: 700; }
   5.248 -#cloud a.tag8 { font-size: 1.8em; font-weight: 800; }
   5.249 -#cloud a.tag9 { font-size: 2.2em; font-weight: 900; }
   5.250 -#cloud a.tag10 { font-size: 2.5em; font-weight: 900; }
   5.251 -
   5.252 -/* CSS class. */
   5.253 -
   5.254 -.infobox {
   5.255 -	margin: 10px;
   5.256 -	padding: 12px;
   5.257 -	background: #f2f2f2;
   5.258 -	border: 1px solid #eaeaea;
   5.259 -	-moz-border-radius: 8px;
   5.260 -	-webkit-border-radius: 8px;
   5.261 -}
   5.262 -
   5.263 -/* HTML styles */
   5.264 -
   5.265 -h1 {
   5.266 -	color: blue;
   5.267 -	background: inherit;
   5.268 -	text-align: left;
   5.269 -	margin: 0px 0px 10px 0px;
   5.270 -	font-size: 140%;
   5.271 -	font-weight: bold;
   5.272 -}
   5.273 -
   5.274 -h2 {
   5.275 -	color: #DF8F06;
   5.276 -	/* border-top: 1px solid #f3f3f3; */
   5.277 -	border-left: 8px solid #f3f3f3;
   5.278 -	padding: 4px 0px 4px 4px;
   5.279 -	margin: 0;
   5.280 -	font-size: 140%;
   5.281 -	font-weight: bold;
   5.282 -}
   5.283 -
   5.284 -h3 {
   5.285 -	font-weight: bold;
   5.286 -	color: #6c0023;
   5.287 -	background: inherit;
   5.288 -}
   5.289 -
   5.290 -a {
   5.291 -	text-decoration: underline;
   5.292 -	color: #0F314E;
   5.293 -	background: inherit;
   5.294 -}
   5.295 -
   5.296 -a:hover {
   5.297 -	text-decoration: none;
   5.298 -	color: blue;
   5.299 -	background: inherit;
   5.300 -}
   5.301 -
   5.302 -code {
   5.303 -	font-size: 12px;
   5.304 -	color: #669900;
   5.305 -	background: inherit;
   5.306 -}
   5.307 -
   5.308 -tt {
   5.309 -	color: #15EE15;
   5.310 -	background: inherit;
   5.311 -}
   5.312 -
   5.313 -img {
   5.314 -	border: 0pt none;
   5.315 -}
   5.316 -
   5.317 -fieldset {
   5.318 -	background: #E2ECf6;
   5.319 -	color: black;
   5.320 -	margin-top: 25px;
   5.321 -	border: 1px solid black;
   5.322 -}
   5.323 -
   5.324 -legend {
   5.325 -	border: 1px solid black;
   5.326 -	color: #6c0023;
   5.327 -	background: #eaeaea;
   5.328 -	font-weight: bold;
   5.329 -}
   5.330 -
   5.331 -pre {
   5.332 -	padding: 5px;
   5.333 -	color: black;
   5.334 -	background: #E1E0B0;
   5.335 -}
   5.336 -
   5.337 -pre.script, pre.log {
   5.338 -	padding: 10px;
   5.339 -	color: black;
   5.340 -	background: #E8E8E8;
   5.341 -	border: 1px inset #606060;
   5.342 -}
   5.343 -
   5.344 -textarea {
   5.345 -	background: #E5E5E5;
   5.346 -	margin-top: 12px;
   5.347 -}
   5.348 -
   5.349 -/* Packages pages */
   5.350 -
   5.351 -.pkg_nav {
   5.352 -	border-top: 1px solid black;
   5.353 -	margin-top: 10px;
   5.354 -	padding-top: 10px;
   5.355 -}
   5.356 -
   5.357 -pre.package {
   5.358 -	padding: 0px;
   5.359 -	color: black;
   5.360 -	background: white;
   5.361 -}
   5.362 -
   5.363 -p.get {
   5.364 -	text-align: center;
   5.365 -	padding: 10px;
   5.366 -	color: black;
   5.367 -	background: #F3F3F3;
   5.368 -	border: 1px solid #DEDEDE;
   5.369 -}