1b6f9528efc38e98b6b5c55abf1e56d7e149de7f
[www.jankratochvil.net.git] / project / captive / CVS.pm
1 # $Id$
2 # CVS page of 'My::Project::captive'
3 # Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 package project::captive::CVS;
20 require 5.6.0;  # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
22 our $CVS_ID=q$Id$;
23 use strict;
24 use warnings;
25
26 use My::Web;
27 Wuse 'project::Lib';
28 Wuse 'project::captive::Index';
29
30
31 sub handler
32 {
33 my $W=project::Lib->init(
34                 "project_name"=>"captive",
35                 "before_project_data"=>
36                                 '<h2>'.a_href('./','Captive Main Page').'</h2>'."\n",
37                 );
38
39
40 print <<"HERE";
41 <h2>CVS Checkout Instructions</h2>
42 <pre>
43 cvs -d :pserver:pserver@{[ '@' ]}cvs.jankratochvil.net:/cvs login
44         Just hit ENTER (empty password)
45 cvs -d :pserver:pserver@{[ '@' ]}cvs.jankratochvil.net:/cvs -z3 checkout captive
46 cd captive
47 cvs -d :pserver:pserver@{[ '@' ]}cvs.jankratochvil.net:/cvs -z3 checkout -r captive -kk reactos
48 ./autogen.pl
49 make
50 ./src/client/cmdline/captive-cmdline --load-module=/var/lib/captive/ntoskrnl.exe --filesystem=/var/lib/captive/ntfs.sys --disk --blind /dev/hda1
51 </pre>
52
53 @{[ vskip "3ex" ]}
54
55 <h2>Download</h2>
56
57 <table border="0" width="100%"><tr><td align="center">
58         <table border="1"><tr><th>Distribution</th>
59                 <th>Installation Case #1<br />Filesystem and installer<br />(recommended)</th>
60                 <th>Installation Case #2<br />Manual installation<br />(filesystem, expert user)</th>
61                 <th>Installation Case #3<br />Command-line client<br />(no filesystem access)</th></tr>
62 HERE
63 my %pkg=(
64                 1=>[qw(captive captive-lufs captive-install lufs gnome-vfs-httpcaptive ntfsprogs ntfsprogs-gnomevfs)],
65                 2=>[qw(captive captive-lufs                 lufs)],
66                 3=>[qw(captive)],
67                 );
68 my %version=(
69                 map(($_=>["1.1.5","0"]),qw(captive captive-lufs captive-install)),
70                 "lufs"=>["0.9.7","1captive8"],
71                 "gnome-vfs-httpcaptive"=>["2.3.8captive2","0"],
72                 "ntfsprogs"=>["200309071734","1captive1"],
73                 "ntfsprogs-gnomevfs"=>["1.0.2","0"],
74                 "build-captive-static"=>"2003-12-14-00",
75                 );
76 my %has_devel=(map(($_=>1),qw(
77                 ntfsprogs
78                 )));
79 my %pkg_nosrc=(map(($_=>1),qw(
80                 captive-lufs
81                 captive-install
82                 ntfsprogs
83                 ntfsprogs-gnomevfs
84                 )));
85
86 my $case;
87 my $a_href_arch=sub ($$%)
88 {
89 my($file_base,$text,%args)=@_;
90
91         $text=~s/[._]\D.*$// if $case!=1 && $text!~/^[.]/;
92         return a_href $file_base,$text,"size"=>($case==1),%args;
93 };
94
95 my $ntfsprogs_after=sub ($) {
96         my($format)=@_;
97                 return if $case!=1;
98                 return '<table width="100%" border="0"><tr><td align="center"><table width="80%" border="0"><tr><td>'
99                                                 .'<hr />requirement: '
100                                                 .a_href('http://linux-ntfs.sourceforge.net/downloads.html#downloads','ntfsprogs')
101                                                 .' '.$format.' &ge; 1.8.0'
102                                         .'</td></tr></table>'
103                                 .'</td></tr></table>';
104         };
105
106 my @dist=(
107                 {
108                         "name"=>"Sources (.tar.gz)",
109                         "id"=>"source",
110                         "out"=>sub {
111                                 my($pkg,$version_base,$version_ext)=@_;
112                                         return () if $pkg_nosrc{$pkg};
113                                         $version_ext=~s/^\d+//;
114                                         my $file="$pkg-$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext).".tar.gz";
115                                         return $file,$file;
116                                 },
117                         "after"=>sub { return &{$ntfsprogs_after}(".tar.gz"); },
118                         },
119                 );
120
121 for my $dist (@dist) {
122         print '<tr id="'.$dist->{"id"}.'">';
123                 print "<td>".$dist->{"name"}."</td>";
124                 for my $casel (1,2,3) {
125                         $case=$casel;
126                         print "<td>";
127                         print join("<br />",map({ my $pkg=$_;
128                                 my($file,$text)=&{$dist->{"out"}}($pkg,@{$version{$pkg}});
129                                 (!defined $text ? ($file) || () : (&$a_href_arch("dist/$file",$text)));
130                                 } @{$pkg{$case}}),map({ (!$_ ? () : (&{$_}())); } $dist->{"after"}));
131                         print "</td>";
132                         }
133         print "</tr>\n";
134         }
135 print <<"HERE";
136                 <tr>
137                         <td>'captive-static' build<br />system patches for Red Hat 9 Shrike<br />(never needed for a&nbsp;regular build)</td>
138                         <td colspan="3">
139 HERE
140 my $build_static_basename=(map("$_-".$version{$_}.".tar.gz","build-captive-static"))[0];
141 print a_href "dist/$build_static_basename",$build_static_basename;
142 print <<"HERE";
143                         </td>
144                 </tr>
145         </table>
146 </td></tr></table>
147
148 @{[ vskip "3ex" ]}
149
150
151 <h2>Pending Integrations</h2>
152
153 <dl>
154         <dt>
155                 @{[ a_href $W->{"project_viewcvs"}.'/lufs/','lufs-captive' ]}
156                 [@{[ a_href $W->{"project_viewcvs"}.'/*checkout*/lufs/NEWS.captive?rev=1.1.2.11','NEWS' ]}]
157         </dt>
158         <dd>
159                 <p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} still has not yet integrated
160                                 the Captive-developed patches. No integration schedule is currently known.</p>
161                 <ul>
162                         <li>Linux kernel module has implemented support for statfs(2)/df(1)</li>
163                         <li>Many fixes of the userland lufsd(8) daemon</li>
164                         <li>Scripts for unattended Linux kernel module prebuilds/compilation/installation</li>
165                 </ul>
166                 <p>The recommended way is to port Captive project to maintained
167                 @{[ a_href 'http://fuse.sourceforge.net/','FUSE' ]}.</p>
168         </dd>
169 </dl>
170
171
172 <h1>@{[ a_href './','Back to Captive Main Page' ]}</h1>
173
174 HERE
175
176
177 My::Web->footer();
178 }
179 1;