From 0b2bee9a672e5884f17ef231daf12daa89c26126 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Initial version of diskzip --- .hgignore | 2 + Makefile.in | 2 +- configure.ac | 3 +- diskzip/.depend | 2 + diskzip/Makefile.in | 89 ++++++++++++++++ diskzip/README | 2 + diskzip/diskzip.1 | 211 ++++++++++++++++++++++++++++++++++++++ diskzip/diskzip.ml | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++ diskzip/diskzip.pod | 97 ++++++++++++++++++ diskzip/diskzip.txt | 71 +++++++++++++ lib/Makefile.in | 2 +- 11 files changed, 765 insertions(+), 3 deletions(-) create mode 100644 diskzip/.depend create mode 100644 diskzip/Makefile.in create mode 100644 diskzip/README create mode 100644 diskzip/diskzip.1 create mode 100644 diskzip/diskzip.ml create mode 100644 diskzip/diskzip.pod create mode 100644 diskzip/diskzip.txt diff --git a/.hgignore b/.hgignore index 0fb9d1b..d688cb3 100644 --- a/.hgignore +++ b/.hgignore @@ -25,9 +25,11 @@ core.* *.dll *.exe *~ +diskzip/diskzip virt-df/virt-df wininstaller.nsis *.orig +diskzip/diskzip_gettext.ml virt-df/virt_df_gettext.ml po/*.mo po/*.po.bak diff --git a/Makefile.in b/Makefile.in index 1efa3fb..127a260 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,7 +23,7 @@ INSTALL = @INSTALL@ OCAMLDOC = @OCAMLDOC@ OCAMLDOCFLAGS := -html -sort -SUBDIRS = lib virt-df +SUBDIRS = lib virt-df diskzip all opt depend install: for d in $(SUBDIRS); do \ diff --git a/configure.ac b/configure.ac index 33cd4c6..df4cf8c 100644 --- a/configure.ac +++ b/configure.ac @@ -77,7 +77,7 @@ AC_CHECK_PROG(OCAML_GETTEXT,ocaml-gettext,ocaml-gettext) dnl Write gettext modules for the programs. dnl http://www.le-gall.net/sylvain+violaine/documentation/ocaml-gettext/html/reference-manual/ch03s04.html -for d in virt-df; do +for d in diskzip virt-df; do f=`echo $d | tr - _`_gettext.ml AC_MSG_NOTICE([creating $d/$f]) rm -f $d/$f @@ -120,6 +120,7 @@ dnl Produce output files. AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile Make.rules + diskzip/Makefile lib/Makefile po/Makefile virt-df/Makefile diff --git a/diskzip/.depend b/diskzip/.depend new file mode 100644 index 0000000..b225123 --- /dev/null +++ b/diskzip/.depend @@ -0,0 +1,2 @@ +diskzip.cmo: diskzip_gettext.cmo ../lib/diskimage.cmi +diskzip.cmx: diskzip_gettext.cmx ../lib/diskimage.cmx diff --git a/diskzip/Makefile.in b/diskzip/Makefile.in new file mode 100644 index 0000000..27f5ede --- /dev/null +++ b/diskzip/Makefile.in @@ -0,0 +1,89 @@ +# diskzip +# Copyright (C) 2007-2008 Red Hat Inc., Richard W.M. Jones +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +PACKAGE := @PACKAGE_NAME@ +VERSION := @PACKAGE_VERSION@ + +INSTALL := @INSTALL@ +HAVE_PERLDOC := @HAVE_PERLDOC@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ + +pkg_gettext = @pkg_gettext@ + +#OCAMLCPACKAGES := -package unix,extlib,bitmatch -I ../lib +OCAMLCPACKAGES := -package unix,extlib -I +bitmatch -I ../lib + +ifneq ($(pkg_gettext),no) +OCAMLCPACKAGES += -package gettext-stub +endif + +OBJS := diskzip_gettext.cmo diskzip.cmo +XOBJS := $(OBJS:.cmo=.cmx) + +SYNTAX := -pp "camlp4o -I`ocamlc -where`/bitmatch pa_bitmatch.cmo" + +OCAMLCFLAGS := -g -w s $(SYNTAX) +#OCAMLCLIBS := -linkpkg diskimage.cma +OCAMLCLIBS := -linkpkg bitmatch.cma diskimage.cma + +OCAMLOPTPACKAGES := $(OCAMLCPACKAGES) +OCAMLOPTFLAGS := -w s $(SYNTAX) +#OCAMLOPTLIBS := -linkpkg diskimage.cmxa +OCAMLOPTLIBS := -linkpkg bitmatch.cmxa diskimage.cmxa + +OCAMLDEPFLAGS := $(SYNTAX) + +BYTE_TARGETS := diskzip +OPT_TARGETS := diskzip.opt + +ifeq ($(HAVE_PERLDOC),perldoc) +BYTE_TARGETS += diskzip.1 diskzip.txt +endif + +all: $(BYTE_TARGETS) + +opt: $(OPT_TARGETS) + +diskzip: $(OBJS) + ocamlfind ocamlc $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \ + -o $@ $^ + +diskzip.opt: $(XOBJS) + ocamlfind ocamlopt \ + $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ + -o $@ $^ + +# Manual page. +ifeq ($(HAVE_PERLDOC),perldoc) +diskzip.1: diskzip.pod + pod2man -c "Disk images" --release "$(PACKAGE)-$(VERSION)" \ + $< > $@ + +diskzip.txt: diskzip.pod + pod2text $< > $@ +endif + +install: + if [ -x diskzip.opt ]; then \ + mkdir -p $(DESTDIR)$(bindir); \ + $(INSTALL) -m 0755 diskzip.opt $(DESTDIR)$(bindir)/diskzip; \ + fi + +include ../Make.rules diff --git a/diskzip/README b/diskzip/README new file mode 100644 index 0000000..d9fb2ea --- /dev/null +++ b/diskzip/README @@ -0,0 +1,2 @@ +This is the diskzip program. It uses the diskimage library (in +../lib) for parsing the contents of the filesystem. \ No newline at end of file diff --git a/diskzip/diskzip.1 b/diskzip/diskzip.1 new file mode 100644 index 0000000..6d29862 --- /dev/null +++ b/diskzip/diskzip.1 @@ -0,0 +1,211 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "DISKZIP 1" +.TH DISKZIP 1 "2008-04-28" "virt-df-2.0.1" "Disk images" +.SH "NAME" +diskzip \- +.SH "SUMMARY" +.IX Header "SUMMARY" +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Display version and exit. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIgzip\fR\|(1), \fIbzip2\fR\|(1), +, +, +, + +.SH "AUTHORS" +.IX Header "AUTHORS" +Richard W.M. Jones +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +(C) Copyright 2007\-2008 Red Hat Inc., Richard W.M. Jones +http://libvirt.org/ +.PP +This program is free software; you can redistribute it and/or modify +it under the terms of the \s-1GNU\s0 General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +.PP +This program is distributed in the hope that it will be useful, +but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of +\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the +\&\s-1GNU\s0 General Public License for more details. +.PP +You should have received a copy of the \s-1GNU\s0 General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, \s-1MA\s0 02139, \s-1USA\s0. +.SH "REPORTING BUGS" +.IX Header "REPORTING BUGS" +Bugs can be viewed on the Red Hat Bugzilla page: +. +.PP +If you find a bug in diskzip, please follow these steps to report it: +.IP "1. Check for existing bug reports" 4 +.IX Item "1. Check for existing bug reports" +Go to and search for similar bugs. +Someone may already have reported the same bug, and they may even +have fixed it. +.IP "2. Capture debug and error messages" 4 +.IX Item "2. Capture debug and error messages" +Run +.Sp +.Vb 1 +\& diskzip --debug > diskzip.log 2>&1 +.Ve +.Sp +and keep \fIdiskzip.log\fR. It contains error messages which you should +submit with your bug report. +.IP "3. Get version of diskzip." 4 +.IX Item "3. Get version of diskzip." +Run +.Sp +.Vb 1 +\& diskzip --version +.Ve +.IP "4. Submit a bug report." 4 +.IX Item "4. Submit a bug report." +Go to and enter a new bug. +Please describe the problem in as much detail as possible. +.Sp +Remember to include the version numbers (step 3) and the debug +messages file (step 2). +.IP "5. Assign the bug to rjones @ redhat.com" 4 +.IX Item "5. Assign the bug to rjones @ redhat.com" +Assign or reassign the bug to \fBrjones @ redhat.com\fR (without the +spaces). You can also send me an email with the bug number if you +want a faster response. diff --git a/diskzip/diskzip.ml b/diskzip/diskzip.ml new file mode 100644 index 0000000..d857681 --- /dev/null +++ b/diskzip/diskzip.ml @@ -0,0 +1,287 @@ +(* 'diskzip' command for intelligently compressing disk images. + (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. + http://libvirt.org/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *) + +open Unix +open Printf + +open Diskzip_gettext.Gettext + +type output = File of string | Dir of string +type extcompress = BZip2 | GZip | External of string + +let rec main () = + (* Program name changes behaviour. *) + let compressing = + let name = Sys.argv.(0) in + let name = Filename.basename name in (* just the executable name *) + let name = Filename.chop_extension name in (* remove .opt or .exe *) + let name = String.lowercase name in + match name with + | "diskzcat" -> false + | "diskzip" -> true + | name -> + eprintf + (f_"diskzip: unknown executable name '%s', assuming 'diskzip'\n") + name in + let compressing = ref compressing in + + (* Command line argument parsing. *) + let version () = + printf "diskzip\n"; (* XXX version XXX *) + exit 0 + in + + let output = ref None in + let set_output path = + if !output <> None then ( + prerr_endline (s_"diskzip: '-o' option cannot appear more than once"); + exit 2 + ); + try + let statbuf = stat path in + if statbuf.st_kind = S_DIR then + output := Some (Dir path) + else + output := Some (File path) + with + (* No such file or directory, assume it's a file output. *) + | Unix_error (ENOENT, _, _) -> output := Some (File path) + in + + (* By default we don't use any external compression program. *) + let extcompress = ref None in + let set_extcompress t () = + if !extcompress <> None then ( + prerr_endline (s_"diskzip: '-z' or '-j' cannot appear more than once"); + exit 2 + ); + extcompress := Some t + in + + let force = ref false in + + let argspec = Arg.align [ + "-d", Arg.Clear compressing, + " " ^ s_ "Uncompress (default: depends on executable name)"; + "--debug", Arg.Set Diskimage.debug, + " " ^ s_ "Debug mode (default: false)"; + "-f", Arg.Set force, + " " ^ s_"Force compress even if stdout looks like a tty"; + "-j", Arg.Unit (set_extcompress BZip2), + " " ^ s_"Pipe the output/input through bzip2"; + "-o", Arg.String set_output, + "path" ^ s_"Set the output filename or directory name"; + "-p", Arg.String (fun prog -> set_extcompress (External prog) ()), + "prog" ^ s_"Pipe the output/input through external program"; + "--version", Arg.Unit version, + " " ^ s_"Display version and exit"; + "-z", Arg.Unit (set_extcompress GZip), + " " ^ s_"Pipe the output/input through gzip"; + ] in + + let args = ref [] in + let anon_fun str = args := str :: !args in + let usage_msg = s_"diskzip: Intelligently compress disk images + +SUMMARY + diskzip [-options] disk.img [disk.img ...] > output.dz + diskzcat [-options] output.dz > disk.img + +OPTIONS" in + + Arg.parse argspec anon_fun usage_msg; + + (* Turn refs back into normal values. *) + let compressing = !compressing in + let extcompress = !extcompress in + let output = !output in + let force = !force in + let args = !args in + + (* Check the arguments make sense. *) + if compressing && output <> None then ( + prerr_endline (s_"diskzip: '-o' option cannot be used when compressing"); + exit 2 + ); + if compressing && args = [] then ( + prerr_endline (s_"diskzip: no input"); + exit 2 + ); + if compressing && not force && isatty stdout then ( + prerr_endline (s_"diskzip: compressed data not written to a terminal, use '-f' to force"); + exit 2 + ); + + (* Run the compression or decompression functions. *) + if compressing then + go_compress extcompress args + else + go_decompress ?output extcompress args + +and go_decompress ?output extcompress args = + (* Read the input, which may be a single named file, or a series of + * files (we just concatenate them). We may have to feed the input + * through an external program. + *) + let () = + match args with + | [] -> () (* Reading from stdin. *) + | [file] -> (* Read the named file. *) + let fd = openfile file [O_RDONLY] 0 in + dup2 fd stdin; + close fd + | files -> (* Concatenate files. *) + let rfd, wfd = pipe () in + let pid = fork () in + if pid = 0 then ( (* child *) + close rfd; + dup2 wfd stdout; + close wfd; + execvp "cat" (Array.of_list ("cat" :: "--" :: files)) + ) else ( (* parent *) + close wfd; + dup2 rfd stdin; + close rfd + ) + in + (match extcompress with + | None -> () + | Some prog -> + let prog, progargs = + match prog with + | BZip2 -> "bzip2", [|"bzip2"; "-cd"|] + | GZip -> "gzip", [|"gzip"; "-cd"|] + | External prog -> "sh", [|"sh"; "-c"; prog |] in + let rfd, wfd = pipe () in + let pid = fork () in + if pid = 0 then ( (* child *) + close rfd; + dup2 wfd stdout; + close wfd; + execvp prog progargs + ) else ( (* parent *) + close wfd; + dup2 rfd stdin; + close rfd + ) + ) + +(* + let header = read_header () in + XXX + +*) + + + + + + + + +(* Do compression. *) +and go_compress extcompress images = + (* Create a Diskimage machine description from the requested images. This + * also checks that everything we need is readable. + *) + let machine = + Diskimage.open_machine "diskzip" (List.map (fun n -> (n,n)) images) in + + (* Scan the images for filesystems. *) + let machine = Diskimage.scan_machine machine in + + (* Redirect output through external pipe if asked. *) + (match extcompress with + | None -> () + | Some prog -> + let prog, progargs = + match prog with + | BZip2 -> "bzip2", [|"bzip2"; "-c"|] + | GZip -> "gzip", [|"gzip"; "-c"|] + | External prog -> "sh", [|"sh"; "-c"; prog |] in + let rfd, wfd = pipe () in + let pid = fork () in + if pid = 0 then ( (* child *) + close wfd; + dup2 rfd stdin; + close rfd; + execvp prog progargs + ) else ( (* parent *) + close rfd; + dup2 wfd stdout; + close wfd + ) + ) + + + + + + + + +(* +(* Since we have the wonderful pa_bitmatch, might as well use it to + * define a robust binary format for the compressed files. + *) +and write_header ... = + let bs = BITSTRING { + 0xD152 : 16; 0x01 : 8; 0x00 : 8; (* file magic, version 1.0 *) + nr_disks : 8; (* number of disks being packed *) + + + + + } in + +and read_header () = + (* Diskzip headers are limited to overall max size of 1024 bytes. *) + let bs = Bitmatch.bitstring_of_file_descr_max stdin 1024 in + + bitmatch bs with + | { 0xD152 : 16; (* file magic *) + 0x01 : 8; (_ as minor) : 8; (* major, minor versions *) + } -> + + (* Is this a later version (major != 1)? *) + | { 0xD152 : 16; (* file magic *) + (_ as major) : 8; (_ as minor) : 8 } when major <> 1 -> + eprintf (f_"diskzip: archive version %d.%d, this program only understands version 1.x") + major minor; + exit 1 + + (* If it looks like gzip or bzip2, exit with an informative error. *) + | { 0o37 : 8; 0o213 : 8 } -> (* gzip *) + prerr_endline (s_"diskzip: This looks like a gzip archive. Did you mean to pass the '-z' option?"); + exit 1 + | { "BZh" : 24 : string } -> (* bzip2 *) + prerr_endline (s_"diskzip: This looks like a bzip2 archive. Did you mean to pass the '-j' option?"); + exit 1 + + (* If it looks like a disk image (MBR), give an error. *) + | { _ : 4080 : bitstring; 0x55 : 8; 0xAA : 8 } -> + prerr_endline (s_"diskzip: This looks like a disk image. Did you mean to compress it?"); + exit 1 + + | { _ } -> + prerr_endline (s_"diskzip: Not a diskzip archive."); + exit 1 +*) + +let () = main () diff --git a/diskzip/diskzip.pod b/diskzip/diskzip.pod new file mode 100644 index 0000000..8f50803 --- /dev/null +++ b/diskzip/diskzip.pod @@ -0,0 +1,97 @@ +=head1 NAME + +diskzip - + +=head1 SUMMARY + + + +=head1 DESCRIPTION + + +=head1 OPTIONS + +=over 4 + +=item B<--version> + +Display version and exit. + +=back + +=head1 SEE ALSO + +L, L, +L, +L, +L, +L + +=head1 AUTHORS + +Richard W.M. Jones + +=head1 COPYRIGHT + +(C) Copyright 2007-2008 Red Hat Inc., Richard W.M. Jones +http://libvirt.org/ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +=head1 REPORTING BUGS + +Bugs can be viewed on the Red Hat Bugzilla page: +L. + +If you find a bug in diskzip, please follow these steps to report it: + +=over 4 + +=item 1. Check for existing bug reports + +Go to L and search for similar bugs. +Someone may already have reported the same bug, and they may even +have fixed it. + +=item 2. Capture debug and error messages + +Run + + diskzip --debug > diskzip.log 2>&1 + +and keep I. It contains error messages which you should +submit with your bug report. + +=item 3. Get version of diskzip. + +Run + + diskzip --version + +=item 4. Submit a bug report. + +Go to L and enter a new bug. +Please describe the problem in as much detail as possible. + +Remember to include the version numbers (step 3) and the debug +messages file (step 2). + +=item 5. Assign the bug to rjones @ redhat.com + +Assign or reassign the bug to B (without the +spaces). You can also send me an email with the bug number if you +want a faster response. + +=back diff --git a/diskzip/diskzip.txt b/diskzip/diskzip.txt new file mode 100644 index 0000000..f843cb1 --- /dev/null +++ b/diskzip/diskzip.txt @@ -0,0 +1,71 @@ +NAME + diskzip - + +SUMMARY +DESCRIPTION +OPTIONS + --version + Display version and exit. + +SEE ALSO + gzip(1), bzip2(1), , + , , + + +AUTHORS + Richard W.M. Jones + +COPYRIGHT + (C) Copyright 2007-2008 Red Hat Inc., Richard W.M. Jones + http://libvirt.org/ + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 675 Mass Ave, Cambridge, MA 02139, USA. + +REPORTING BUGS + Bugs can be viewed on the Red Hat Bugzilla page: + . + + If you find a bug in diskzip, please follow these steps to report it: + + 1. Check for existing bug reports + Go to and search for similar bugs. + Someone may already have reported the same bug, and they may even + have fixed it. + + 2. Capture debug and error messages + Run + + diskzip --debug > diskzip.log 2>&1 + + and keep *diskzip.log*. It contains error messages which you should + submit with your bug report. + + 3. Get version of diskzip. + Run + + diskzip --version + + 4. Submit a bug report. + Go to and enter a new bug. Please + describe the problem in as much detail as possible. + + Remember to include the version numbers (step 3) and the debug + messages file (step 2). + + 5. Assign the bug to rjones @ redhat.com + Assign or reassign the bug to rjones @ redhat.com (without the + spaces). You can also send me an email with the bug number if you + want a faster response. + diff --git a/lib/Makefile.in b/lib/Makefile.in index f303c9a..9dae7b9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -74,7 +74,7 @@ diskimage.cma: $(OBJS) diskimage.cmxa: $(XOBJS) ocamlfind ocamlopt \ - $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ + $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) \ -a -o $@ $^ # 'make depend' doesn't catch these dependencies because the .mli file -- 1.8.3.1