captive-0.9.4
[www.jankratochvil.net.git] / project / captive / Index.html.pl
index d98fe1c..8ded6ed 100755 (executable)
@@ -27,8 +27,8 @@ use warnings;
 
 BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
 use My::Web;
-use My::Project;
-use project::captive::ListItem;
+Wuse 'My::Project';
+Wuse 'project::captive::ListItem';
 
 
 my $W=My::Project->init_project(
@@ -42,7 +42,7 @@ my $W=My::Project->init_project(
                );
 
 
-print vskip("10ex")."<h1 align=\"center\">!!! DO NOT DISCLOSE - **************** !!!</h1>\n".vskip("10ex");
+print vskip("10ex")."<h1 align=\"center\">!!! DO NOT DISCLOSE !!!</h1>\n".vskip("10ex");
 
 print <<"HERE";
 <h1>The First Read/Write NTFS for Free Operating Systems</h1>
@@ -52,7 +52,7 @@ HERE
 my @stuff=(
                "A lot of people claim themselves as Windows Programmers.\n"
                                ." Now I can finally join them - I also wrote my own Microsoft Windows.",
-               "Why do they need <a href=\"http://www.winsupersite.com/reviews/winserver2k3_gold2.asp\">5000 developers</a>"
+               "Why do they need ".a_href('http://www.winsupersite.com/reviews/winserver2k3_gold2.asp','5000 developers')
                                ." to write Microsoft Windows when it is just One Man Show task?",
 
 
@@ -61,14 +61,27 @@ my @stuff=(
                                ." <span class=\"quote\">hal.dll</span>.",
                );
 
-print "<p class=\"stuff\">$_</p>\n" for ($stuff[int rand @stuff]);
-print vskip "3ex";
 
+print <<"HERE";
+
+
+<table border="0" width="100%">
+       <col width="1*" />
+       <col width="0*" />
+       <tr>
+               <td align="left">
+                       @{[ map("<p class=\"stuff\">$_</p>\n",($stuff[int rand @stuff])) ]}
+               </td>
+               <td align="right">@{[ a_href My::Web::img_src('captive-install-acquire'),
+                               img('captive-install-acquire-small','[ Captive Microsoft Windows Drivers Acquire Illustration ]') ]}</td>
+       </tr>
+</table>
+
+@{[ vskip "3ex" ]}
 
-print <<'HERE';
 <table border="1" align="center" style="text-align: center;"><tr><th>Distribution</th>
                <th>Installation Case #1<br />Filesystem and installer<br />(recommended)</th>
-               <th>Installation Case #2<br />Manual installation<br />(filesystem available)</th>
+               <th>Installation Case #2<br />Manual installation<br />(filesystem, expert user)</th>
                <th>Installation Case #3<br />Command-line client<br />(no filesystem access)</th></tr>
 HERE
 my %pkg=(
@@ -82,11 +95,11 @@ my %reqpkg=(
                3=>[qw(glib2 gnome-vfs2 ORBit2 libxml2 openssl popt readline)],
                );
 my %version=(
-               map(($_=>["0.9","0"]),qw(captive captive-lufs captive-install)),
-               "lufs"=>["0.9.6","1captive1"],
+               map(($_=>["0.9.4","0"]),qw(captive captive-lufs captive-install)),
+               "lufs"=>["0.9.6","1captive3"],
                "gnome-vfs-httpcaptive"=>["2.3.8captive2","0"],
                "ntfsprogs"=>["200309071734","1captive1"],
-               "ntfsprogs-gnomevfs"=>["1.0","0"],
+               "ntfsprogs-gnomevfs"=>["1.0.1","0"],
                );
 my %has_rh8=(map(($_=>1),qw(
                gnome-vfs-httpcaptive
@@ -108,15 +121,25 @@ my %pkg_nosrc=(map(($_=>1),qw(
                captive-lufs
                captive-install
                )));
+
+my $case;
+my $a_href_arch=sub ($$%)
+{
+my($file_base,$text,%args)=@_;
+
+       $text=~s/[._]\D.*$// if $case!=1 && $text!~/^[.]/;
+       return a_href $file_base,$text,"size"=>($case==1),%args;
+};
+
 my @dist=(
                {
                        "name"=>"Red Hat 9<br />Shrike i386",
                        "out"=>sub {
                                my($pkg,$version_base,$version_ext)=@_;
                                        my $file="$pkg-$version_base-$version_ext.i386.rpm";
-                                       my $r=a_href "dist/$file",$file;
+                                       my $r=&$a_href_arch("dist/$file",$file);
                                        (my $filedev=$file)=~s/^\Q$pkg\E-/${pkg}-devel-/;
-                                       $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
+                                       $r.="<br />".&$a_href_arch("dist/$filedev",$filedev) if $has_devel{$pkg};
                                        return $r;
                                },
                        },
@@ -125,12 +148,12 @@ my @dist=(
                        "out"=>sub {
                                my($pkg,$version_base,$version_ext)=@_;
                                        my $file="$pkg-$version_base-$version_ext".(!$has_rh8{$pkg} ? "" : "rh8").".i386.rpm";
-                                       my $r=a_href "dist/$file",$file;
+                                       my $r=&$a_href_arch("dist/$file",$file);
                                        (my $filedev=$file)=~s/^\Q$pkg\E-/${pkg}-devel-/;
-                                       $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
+                                       $r.="<br />".&$a_href_arch("dist/$filedev",$filedev) if $has_devel{$pkg};
                                        if ($pkg eq "captive-install") {
-                                               for (qw(libxml2-2.5.4-1.i386.rpm libxml2-python-2.5.4-1.i386.rpm)) {
-                                                       $r.="<br />".a_href('ftp://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/'.$_,$_)." of Red Hat 9";
+                                               for (qw(libxml2-2.5.4-1.i386.rpm libxml2-python-2.5.4-1.i386.rpm libxml2-devel-2.5.4-1.i386.rpm)) {
+                                                       $r.="<br />".&$a_href_arch('ftp://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/'.$_,$_)." of Red Hat 9";
                                                        }
                                                }
                                        return $r;
@@ -141,52 +164,40 @@ my @dist=(
                        "out"=>sub {
                                my($pkg,$version_base,$version_ext)=@_;
                                        my $file="$pkg-$version_base-$version_ext".(!$has_mdk91{$pkg} ? ".i386.rpm" : "mdk91.i586.rpm");
-                                       my $r=a_href "dist/$file",$file;
+                                       my $r=&$a_href_arch("dist/$file",$file);
                                        (my $filedev=$file)=~s/^\Q$pkg\E-/${pkg}-devel-/;
-                                       $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
+                                       $r.="<br />".&$a_href_arch("dist/$filedev",$filedev) if $has_devel{$pkg};
                                        return $r;
                                },
                        },
                {
-                       "name"=>"Red Hat .src.rpm<br />(of 9 - Shrike)",
-                       "out"=>sub {
-                               my($pkg,$version_base,$version_ext)=@_;
-                                       return () if $pkg_nosrc{$pkg};
-                                       my $file="$pkg-$version_base-$version_ext.src.rpm";
-                                       return $file,$file;
-                               },
-                       },
-               {
                        "name"=>"Debian GNU/Linux<br />'unstable' i386",
                        "out"=>sub {
                                my($pkg,$version_base,$version_ext)=@_;
                                        $version_ext=~s/^\d+//;
                                        my $file="${pkg}_$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext)."_i386.deb";
-                                       my $r=a_href "dist/$file",$file;
+                                       my $r=&$a_href_arch("dist/$file",$file);
                                        (my $filedev=$file)=~s/^\Q$pkg\E_/${pkg}-dev_/;
-                                       $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
+                                       $r.="<br />".&$a_href_arch("dist/$filedev",$filedev) if $has_devel{$pkg};
                                        return $r;
                                },
                        },
                {
-                       "name"=>"Debian GNU/Linux<br />sources",
+                       "name"=>"Sources (.tar.gz)",
                        "out"=>sub {
                                my($pkg,$version_base,$version_ext)=@_;
                                        return () if $pkg_nosrc{$pkg};
                                        $version_ext=~s/^\d+//;
-                                       my $file="${pkg}_$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext);
-                                       return CGI::escapeHTML($file).":"
-                                                       .' '     .a_href("dist/$file.dsc",".dsc","size"=>0)
-                                                       .'&nbsp;'.a_href("dist/$file.tar.gz",".tar.gz");
+                                       my $file="$pkg-$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext).".tar.gz";
+                                       return $file,$file;
                                },
                        },
                {
-                       "name"=>"Sources (.tar.gz)",
+                       "name"=>"Sources (.src.rpm)<br />(Red Hat 9 - Shrike)",
                        "out"=>sub {
                                my($pkg,$version_base,$version_ext)=@_;
                                        return () if $pkg_nosrc{$pkg};
-                                       $version_ext=~s/^\d+//;
-                                       my $file="$pkg-$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext).".tar.gz";
+                                       my $file="$pkg-$version_base-$version_ext.src.rpm";
                                        return $file,$file;
                                },
                        },
@@ -195,11 +206,12 @@ my @dist=(
 for my $dist (@dist) {
        print "<tr>";
                print "<td>".$dist->{"name"}."</td>";
-               for my $case (1,2,3) {
+               for my $casel (1,2,3) {
+                       $case=$casel;
                        print "<td>";
                        print join("<br />",map({ my $pkg=$_;
                                my($file,$text)=&{$dist->{"out"}}($pkg,@{$version{$pkg}});
-                               (!defined $text ? ($file) || () : (a_href("dist/$file",$text)));
+                               (!defined $text ? ($file) || () : (&$a_href_arch("dist/$file",$text)));
                                } @{$pkg{$case}}));
                        print "</td>";
                        }
@@ -218,25 +230,42 @@ print <<"HERE";
 available Microsoft Windows drivers versions. Now you can execute:</p>
 
 <blockquote>
-<p class="quote"># mount -t captive-ntfs /dev/hda1 /mnt/dosc</p>
+       <p class="quote">
+               # mkdir /mnt/dosc<br />
+               # mount -t captive-ntfs /dev/hda1 /mnt/dosc
+       </p>
 </blockquote>
 
+
+<h2>Overview</h2>
+
+<p>'<b>captive</b>' is the base package. It contains debugging '<b>captive-cmdline</b>' client.<br />
+'<b>captive-lufs</b>' permits mounting NTFS as regular filesystem. It needs '<b>lufs</b>'.<br />
+'<b>lufs</b>' is a daemon to enable userland process to provide filesystem functions.</p>
+
+<p>Any errors from '<b>captive-lufs</b>' are written to '<b>/var/log/messages</b>'.</p>
+
+<p>Needed drivers (at least ntoskrnl.exe+ntfs.sys) must be in '<b>/var/lib/captive</b>'.</p>
+
+<p>'<b>captive</b>' package creates '<b>captive</b>' user and '<b>captive</b>' group on your system.</p>
+
+
 <h2>Package version conflicts</h2>
 
 <dl>
 
-<dt><a href="http://lufs.sourceforge.net/lufs/">lufs</a></dt>
+<dt>@{[ a_href 'http://lufs.sourceforge.net/lufs/','lufs' ]}</dt>
 <dd><p><b>'captive' version required</b>: Although you may already have the
 original package installed you must replace it by the local 'captive'-marked
 version containing some 'captive'-essential fixes and extensions.</p></dd>
 
-<dt><a href="http://linux-ntfs.sourceforge.net/">ntfsprogs</a></dt>
+<dt>@{[ a_href 'http://linux-ntfs.sourceforge.net/','ntfsprogs' ]}</dt>
 <dd><p><b>Original version >=200309071734 sufficient</b>:
 The package downloadable here has no code patches - you can freely use the
 original version instead.  Unfortunately the last public release is
 <b>1.7.1</b> while this project requires at least
-<a href="http://linux-ntfs.sourceforge.net/snapshots/">snapshot</a> version
-<b><a href="http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200309071734.tar.bz2">200309071734</a></b>
+@{[ a_href 'http://linux-ntfs.sourceforge.net/snapshots/','snapshot' ]} version
+<b>@{[ a_href 'http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200309071734.tar.bz2','200309071734' ]}</b>
 which is not packaged (.rpm/.deb) yet. Packaged versions are provided here for
 your convenience.</p></dd>
 
@@ -245,7 +274,7 @@ your convenience.</p></dd>
 
 <h2>LUFS kernel driver module</h2>
 
-<p><a href="http://lufs.sourceforge.net/lufs/">LUFS</a> (Linux Userland File
+<p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} (Linux Userland File
 System) needs Linux kernel module driver (<i>lufs.o</i>) compatible with your
 running Linux kernel. Binary driver is supplied already precompiled for many
 Linux kernel versions in the binary packages above (<b>.i386.rpm</b> and
@@ -260,120 +289,73 @@ Linux kernel version (<b>rpm&nbsp;-q&nbsp;kernel</b>) and re-run <span
 class="quote">/usr/share/lufs/prepmod</span>.</p>
 
 
-<h2>The First Free Microsoft Windows Kernel API Emulation</h2>
-
-<p>Compatibility with existing binary Microsoft Windows file system drivers was
-reached. Microsoft Windows kernel system components required by these drivers
-were analyzed and successfuly emulated in the GNU/Linux operating system.
-Project brings Microsoft Windows kernel emulation framework to support even
-other types Microsoft Windows drivers in the future.</p>
-
-<dl>
-       <dt>Emulation principle equivalent</dt>
-       <dd>
-               <p>@{[ a_href('http://www.winehq.com/','Wine Project') ]}</p>
-               <p>No code could be shared - Wine emulates only Microsoft Windows userland.
-               Filesystem drivers completely belong to Microsoft Windows kernelland.</p>
-       </dd>
-
-       <dt>Closed-source read-only-crippled @{[ '$0' ]} equivalent for Microsoft Windows</dt>
-       <dd>
-               <p>@{[ a_href('http://www.sysinternals.com/ntw2k/freeware/ntfswin98.shtml',
-                               'NTFS for Windows 98') ]}</p>
-               <p>There is a @{[ a_href('http://www.sysinternals.com/images/screenshots/ntfs98ap.gif',
-                               'diagram') ]} showing exactly the principle of Captive NTFS project.
-               There is apparently disabled read/write functionality in <i>NTFS for
-               Windows 98</i> as the same company also sells the following product sharing
-               the same codebase:</p>
-       </dd>
-
-       <dt>Closed-source read/write @{[ '$299' ]} equivalent for MS-DOS</dt>
-       <dd>
-               <p>@{[ a_href('http://www.winternals.com/products/repairandrecovery/ntfsdospro.asp',
-                               'NTFSDOS Professional') ]}</p>
-               <p>This product is the most close equivalent to Captive NTFS but it is
-               a commercial product, closed-source and it has filesystem interface only
-               for MS-DOS.</p>
-       </dd>
-
-       <dt>The only real competition: Closed-source read/write @{[ '$299' ]} equivalent</dt>
-       <dd>
-               <p>@{[ a_href('http://www.vmware.com/download/workstation.html',
-                               'VMware Workstation') ]}</p>
-               <p>Original Microsoft Windows operating system can be run inside a virtual
-               machine running under GNU/Linux and share the read-write NTFS disk by using
-               a network file sharing through a&nbsp;VMware virtual network card.</p>
-               <p>You need @{[ '$299' ]} for this product and you need to
-               give up your system security by running un<a href="#sandbox">sandbox</a>ed
-               closed-source program in your GNU/Linux.</p>
-       </dd>
-</dl>
-
+<table border="0" width="100%">
+       <col width="1*" />
+       <col width="0*" />
+       <tr>
+               <td align="left">
+                       <h2>The First Free Microsoft Windows Kernel API Emulation</h2>
+
+                       <p>Compatibility with existing binary Microsoft Windows file system drivers was
+                       reached. Microsoft Windows kernel system components required by these drivers
+                       were analyzed and successfuly emulated in the GNU/Linux operating system.
+                       Project brings Microsoft Windows kernel emulation framework to support even
+                       other types Microsoft Windows drivers in the future.
+                       <span class="productname">@{[ a_href 'http://www.reactos.com/','ReactOS' ]}</span>
+                       code base made a big asset for this functionality.</p>
+               </td>
+               <td align="right">@{[ a_href 'http://www.reactos.com/',img('reactos','ReactOS') ]}</td>
+       </tr>
+</table>
 
-<h2>Security</h2>
-
-<p><b>Re: <a href="http://linux-ntfs.sourceforge.net/info/ntfs.html#7.7">7.7
-               Can't we write a wrapper for Windows' driver?</a></<b></p>
-
-<p class="re">&gt; It sounds like a great idea, to start with, but there are numerous
-problems.</p>
-
-<p><span class="re">&gt; The largest technical problem is joining the Windows
-system DLL to the Linux VFS. It could be done, but it wouldn't be pretty.</span><br />
-Yep. :-)</p>
-
-<p><span class="re">&gt; It would have to run as part of the kernel which would mean
-that if it went wrong it could crash the machine. With no source, we might not
-be able to work around the problem.</span><br />
-<a name="sandbox">Nope</a>,
-@{[ a_href('http://lufs.sourceforge.net/lufs/','Linux Userland File System (LUFS)') ]}
-moves the filesystem implementation to UNIX userland where the Microsoft
-Windows filesystem is completely unarmed by Captive jail of chroot(2),
-setuid(2) and setrlimit(2). There only remains one narrow connection to the rest of
-system (by CORBA/ORBit). The filesystem's life environment gets kill(2)ed when
-UNIX is no longer satisfied with it. Safety similiar to
-@{[ a_href('http://www.vmware.com/solutions/security.html','VMware sandbox') ]}.</p>
-
-<p><span class="re">&gt; The next major problem is compati<!--orig. text typo-->bility.
-Which version of the Windows system file would we use? Picking one would limit
-its use, making the wrapper versatile for all of them would be a programming
-nightmare.</span><br />
-Microsoft Windows NTFS filesystem driver is capable of accessing older formats
-of the filesystem. This project currently runs Microsoft Windows XP version,
-porting to Microsoft Windows 2003 Server expected. (Microsoft Windows upgrades
-NTFS disk filesystem to its own version during complete CD-ROM Microsoft
-Windows system installation - such operation is not threat this project use.)</p>
-
-<p><span class="re">&gt; And it gets worse. The legal implications of
-distributing Windows systems files would cause problems.</span><br />
-User must be careful to obey all licensing restrictions according to his
-local country laws.<br />
-<span class="re">&gt; Also the proprietary nature of the driver would mean that
-the other kernel coders would not investigate any problems if someone had used
-the NTFS wrapper.</span><br />
-It does not apply to this project due to the implemented
-<a href="#sandbox">filesystem separation</a>.</p>
 
 @{[ vskip "3ex" ]}
 
 <h1>See also</h1>
 <ul>
-       <li>@{[ a_href('Preview.html.pl','Technology Preview') ]}</li>
-       <li>@{[ a_href('doc/','Developer Documentation') ]}</li>
-       <li>@{[ a_href('apiref/','API Reference Manual') ]} (fragment)</li>
-       <li>
-               @{[ a_href('http://cvs.jankratochvil.net/viewcvs/priv/captive/','CVS repository ViewCVS') ]}
-               (@{[ a_href('http://cvs.jankratochvil.net/viewcvs/priv/reactos/?only_with_tag=captive','ReactOS branch part') ]})
-               </li>
-       <li>@{[ a_href('Thanks.html.pl','Thanks') ]}</li>
-       <li>@{[ a_href('Resources.html.pl','Related Pages') ]}</li>
+       <li>@{[ a_href 'Preview.html.pl','Technology Preview' ]}</li>
+       <li>@{[ a_href 'doc/','Developer Documentation' ]}; highlights:<ul>
+               <li>@{[ a_href 'doc/About.html.pl#versions','Microsoft Windows Versions Compatibility' ]}</li>
+               <li>@{[ a_href 'doc/Architecture.html.pl#law','Laws and Licensing Conditions' ]}</li>
+               <li>@{[ a_href 'doc/Details.html.pl#sandbox','Sandboxing of W32 filesystem' ]}</li>
+               <li>@{[ a_href 'doc/TODO.html.pl#todo_fsck','TODO: Fsck of NTFS' ]}</li>
+               <li>@{[ a_href 'doc/TODO.html.pl#todo_surprise','TODO: NTFS Support for Partition Surprise' ]}</li>
+               <li>@{[ a_href 'doc/Related.html.pl#LinuxNTFScompet','Related Projects - Linux NTFS' ]}</li>
+               <li>@{[ a_href 'doc/Related.html.pl#vmware','Related Projects - VMware Workstation' ]}</li>
+               <li>@{[ a_href 'doc/LinuxNTFS.html.pl',"Re: 7.7 Can't we write a wrapper for Windows' driver?" ]}</li>
+               </ul></li>
+       <li>@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/*checkout*/priv/captive/TODO?rev=HEAD','Known Bugs' ]}</li>
+       <li>Man pages<ul>
+               @{[
+                       do {
+                               my @mans=(
+                                               'captive'=>[7,'Microsoft Windows NT kernel emulation for NTFS disk access'],
+                                               'mount.captive'=>[8,'mount(8) interface for NTFS disk access'],
+                                               'lufs-captivefs'=>[7,'Linux Userland File System module for NTFS as filesystem'],
+                                               'captive-cmdline'=>[1,'Command-line client for captive(7) NTFS disk access'],
+###                                            'captive-sandbox-server'=>[1,'Security+safety wrapper for NTFS disk access'],
+                                               'captive-install-acquire'=>[1,'Find MS Windows XP driver files for NTFS'],
+###                                            'captive-install-fstab'=>[1,'Manage captive-ntfs /etc/fstab entries'],
+                                               );
+                               my @r;
+                               while (@mans) {
+                                       my $file=shift @mans;
+                                       my($section,$name)=@{shift @mans};
+                                       push @r,"<li>".a_href("man/$file.pod.html",$file)."($section) - $name</li>\n";
+                                       }
+                               @r;
+                               }
+                       ]}
+               </ul></li>
+       <li>@{[ a_href 'Resources.html.pl','Related Pages' ]}</li>
+       <li>@{[ a_href 'Thanks.html.pl','Thanks' ]}</li>
 </ul>
 
 @{[ vskip "3ex" ]}
 
 <p class="stuff">
        Why did I install Microsoft Windows and wrote such disgusting piece of code?<br />
-       I expect @{[ a_href($W->{"top_dir"}."/CV.html.pl","yet another challenging task") ]}, !
+       Expecting @{[ a_href top_dir()."/CV.html.pl","yet another challenging task" ]}, !
 </p>
 HERE