--- par2cmdline-0.4.orig/aclocal.m4 +++ par2cmdline-0.4/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.8.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,55 +11,32 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# 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, 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., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.8.3])]) - -# AM_AUX_DIR_EXPAND + [AM_AUTOMAKE_VERSION([1.9.6])]) -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. +# AM_AUX_DIR_EXPAND -*- Autoconf -*- -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -106,26 +83,16 @@ am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +# AM_CONDITIONAL -*- Autoconf -*- -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 6 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -145,30 +112,19 @@ fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) fi])]) -# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -177,7 +133,6 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -266,9 +221,14 @@ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi @@ -312,26 +272,16 @@ AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - -# 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, or (at your option) -# any later version. +# Generate code to set up dependency tracking. -*- Autoconf -*- -# 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -350,27 +300,21 @@ else continue fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue @@ -396,54 +340,31 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) -# Do all the work for Automake. -*- Autoconf -*- +# Do all the work for Automake. -*- Autoconf -*- -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# serial 12 -# serial 11 +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -501,7 +422,6 @@ AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl @@ -510,7 +430,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl - +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], @@ -544,51 +466,27 @@ done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -603,26 +501,15 @@ rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Check to see how 'make' treats includes. -*- Autoconf -*- -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -666,27 +553,16 @@ rm -f confinc confmf ]) -# -*- Autoconf -*- - - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -712,27 +588,16 @@ fi ]) +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -753,13 +618,21 @@ # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as @@ -778,26 +651,15 @@ fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Helper functions for option handling. -*- Autoconf -*- -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -822,28 +684,16 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# 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, or (at your option) -# any later version. +# Check to make sure that the build environment is sane. -*- Autoconf -*- -# 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_SANITY_CHECK # --------------- @@ -886,25 +736,14 @@ fi AC_MSG_RESULT(yes)]) -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# AM_PROG_INSTALL_STRIP +# --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -925,3 +764,99 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + --- par2cmdline-0.4.orig/debian/par2verify.1 +++ par2cmdline-0.4/debian/par2verify.1 @@ -0,0 +1,284 @@ +.\" +.\" par2(1) +.\" +.\" Copyright (C) 2004 Andres Salomon +.TH par2 1 "May 2004" +.SH NAME +par2 \- PAR 2.0 compatible file verification and repair tool. +.SH SYNOPSIS +.B par2 +c(reate) [options] [files] +.br +.B par2 +v(erify) [options] [files] +.br +.B par2 +r(epair) [options] [files] +.br + +.br + Or: +.br + +.br +.B par2create +[options] [files] +.br +.B par2verify +[options] [files] +.br +.B par2repair +[options] [files] +.SH DESCRIPTION +par2 is a program for creating and using PAR2 files to detect +damage in data files and repair them if necessary. It can be used with +any kind of file. +.SH OPTIONS +.TP +.B -b +Set the Block-Count +.TP +.B -s +Set the Block-Size (Don't use both -b and -s) +.TP +.B -r +Level of Redundancy (%) +.TP +.B -c +Recovery block count (don't use both -r and -c) +.TP +.B -f +First Recovery-Block-Number +.TP +.B -u +Uniform recovery file sizes +.TP +.B -l +Limit size of recovery files (Don't use both -u and -l) +.TP +.B -n +Number of recovery files (Don't use both -n and -l) +.TP +.B -m +Memory (in MB) to use +.TP +.B -v [-v] +Be more verbose +.TP +.B -q [-q] +Be more quiet (-qq gives silence) +.TP +.B -- +Treat all remaining CommandLine as filenames +.TP +.BR +.SH EXAMPLES + +With PAR 2.0 you can create PAR2 recovery files for as few as 1 or as many as +32768 files. If you wanted to create PAR1 recovery files for a single file +you are forced to split the file into muliple parts and RAR is frequently +used for this purpose. You do NOT need to split files with PAR 2.0. + +To create PAR 2 recovery files for a single data file (e.g. one called +test.mpg), you can use the following command: + + par2 create test.mpg + +If test.mpg is an 800 MB file, then this will create a total of 8 PAR2 files +with the following filenames (taking roughly 6 minutes on a PC with a +1500MHz CPU): + + test.mpg.par2 - This is an index file for verification only + test.mpg.vol00+01.par2 - Recovery file with 1 recovery block + test.mpg.vol01+02.par2 - Recovery file with 2 recovery blocks + test.mpg.vol03+04.par2 - Recovery file with 4 recovery blocks + test.mpg.vol07+08.par2 - Recovery file with 8 recovery blocks + test.mpg.vol15+16.par2 - Recovery file with 16 recovery blocks + test.mpg.vol31+32.par2 - Recovery file with 32 recovery blocks + test.mpg.vol63+37.par2 - Recovery file with 37 recovery blocks + +The test.mpg.par2 file is 39 KB in size and the other files vary in size from +443 KB to 15 MB. + +These par2 files will enable the recovery of up to 100 errors totalling 40 MB +of lost or damaged data from the original test.mpg file when it and the par2 +files are posted on UseNet. + +When posting on UseNet it is recommended that you use the "-s" option to set +a blocksize that is equal to the Article size that you will use to post the +data file. If you wanted to post the test.mpg file using an article size +of 300 KB then the command you would type is: + + par2 create -s307200 test.mpg + +This will create 9 PAR2 files instead of 8, and they will be capable of +correcting up to 134 errors totalling 40 MB. It will take roughly 8 minutes +to create the recovery files this time. + +In both of these two examples, the total quantity of recovery data created +was 40 MB (which is 5% of 800 MB). If you wish to create a greater or lesser +quantity of recovery data, you can use the "-r" option. + +To create 10% recovery data instead of the default of 5% and also to use a +block size of 300 KB, you would use the following command: + + par2 create -s307200 -r10 test.mpg + +This would also create 9 PAR2 files, but they would be able to correct up to +269 errors totalling 80 MB. Since twice as much recovery data is created, it +will take about 16 minutes to do so with a 1500MHz CPU. + +The "-u" and "-n" options can be used to control exactly how many recovery +files are created and how the recovery blocks are distributed amoungst them. +They do not affect the total quantity of recovery data created. + +The "-f" option is used when you create additional recovery data. + +e.g. If you have already created 10% and want another 5% then you migh use +the following command: + + par2 create -s307200 -r5 -f300 test.mpg + +This specifies the same block size (which is a requirement for additional +recovery files), 5% recovery data, and a first block number of 300. + +The "-m" option controls how much memory par2 uses. It defaults to +16 MB unless you override it. + +CREATING PAR2 FILES FOR MULTIPLE DATA FILES + +When creating PAR2 recovery files form multiple data files, you must specify +the base filename to use for the par2 files and the names of all of the data +files. + +If test.mpg had been split into multiple RAR files, then you could use: + + par2 create test.mpg.rar.par2 test.mpg.part*.rar + +The files filename "test.mpg.rar.par2" says what you want the par2 files to +be called and "test.mpg.part*.rar" should select all of the RAR files. + +VERIFYING AND REPAIRING + +When using par2 recovery files to verify or repair the data files from +which they were created, you only need to specify the filename of one +of the par2 files to par2. + +e.g.: + + par2 verify test.mpg.par2 + +This tells par2 to use the information in test.mpg.par2 to verify the +data files. + +par2 will automatically search for the other par2 files that were +created and use the information they contain to determine the filenames +of the original data files and then to verify them. + +If all of the data files are ok, then par2 will report that repair +will not be required. + +If any of the data files are missing or damaged, par2 will report +the details of what it has found. If the recovery files contain enough +recovery blocks to repair the damage, you will be told that repair is +possible. Otherwise you will be told exactly how many recovery blocks +will be required in order to repair. + +To carry out a repair use the following command: + + par2 repair test.mpg.par2 + +This tells par2 to verify and if possible repair any damaged or +missing files. If a repair is carried out, then each file which is +repaired will be re-verified to confirm that the repair was successful. + +MISSNAMED AND INCOMPLETE DATA FILES + +If any of the recovery files or data files have the wrong filename, then +par2 will not automatically find and scan them. + +To have par2 scan such files, you must include them on the command +line when attempting to verify or repair. + +e.g.: + + par2 r test.mpg.par2 other.mpg + +This tells par2 to scan the file called other.mpg to see if it +contains any data belonging to the original data files. + +If one of the extra files specified in this way is an exact match +for a data file, then the repair process will rename the file so that +it has the correct filename. + +Because par2 is designed to be able to find good data within a +damaged file, it can do the same with incomplete files downloaded from +UseNet. If some of the articles for a file are missing, you should still +download the file and save it to disk for par2 to scan. If you +do this then you may find that you can carry out a repair in a situation +where you would not otherwise have sufficient recovery data. + +You can have par2 scan all files that are in the current directory +using a command such as: + + par2 r test.mpg.par2 * + +WHAT TO DO WHEN YOU ARE TOLD YOU NEED MORE RECOVERY BLOCKS + +If par2 determines that any of the data files are damaged or +missing and finds that there is insufficient recovery data to effect +a repair, you will be told that you need a certain number of recovery +blocks. You can obtain these by downloading additional recovery files. + +In order to make things easy, par2 files have filenames that tell you +exactly how many recovery blocks each one contains. + +Assuming that the following command was used to create recovery data: + + par2 c -b1000 -r5 test.mpg + +Then the recovery files that are created would be called: + + test.mpg.par2 + test.mpg.vol00+01.par2 + test.mpg.vol01+02.par2 + test.mpg.vol03+04.par2 + test.mpg.vol07+08.par2 + test.mpg.vol15+16.par2 + test.mpg.vol31+19.par2 + +The first file in this list does not contain any recovery data, it only +contains information sufficient to verify the data files. + +Each of the other files contains a different number of recovery blocks. +The number after the '+' sign is the number of recovery blocks and the +number preceding the '+' sign is the block number of the first recovery +block in that file. + +If par2 told you that you needed 10 recovery blocks, then you would +need "test.mpg.vol01+02.par2" and "test.mpg.vol07+08.par". You might of course +choose to fetch "test.mpg.vol15+16.par2" instead (in which case you would have +an extra 6 recovery blocks which would not be used for the repair). + +.SH NOTES + +This version of par2 does not support recording path information for +files. Whilst you can create recovery files for files from multiple locations, +it will expect all files to be in the current directory when verifying and +repairing. This limitation will be corrected in an update. + +.SH REED SOLOMON CODING + +PAR2 uses Reed Solomon Coding to perform its calculations. For details of this +coding technique try the following link: + +``A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems'' + + +.SH AUTHOR +.br +.B par2 +was written by Peter Brian Clements . + +This man page was contributed by Andres Salomon +for the Debian GNU/Linux system (but may be used by others). --- par2cmdline-0.4.orig/debian/par2create.1 +++ par2cmdline-0.4/debian/par2create.1 @@ -0,0 +1,284 @@ +.\" +.\" par2(1) +.\" +.\" Copyright (C) 2004 Andres Salomon +.TH par2 1 "May 2004" +.SH NAME +par2 \- PAR 2.0 compatible file verification and repair tool. +.SH SYNOPSIS +.B par2 +c(reate) [options] [files] +.br +.B par2 +v(erify) [options] [files] +.br +.B par2 +r(epair) [options] [files] +.br + +.br + Or: +.br + +.br +.B par2create +[options] [files] +.br +.B par2verify +[options] [files] +.br +.B par2repair +[options] [files] +.SH DESCRIPTION +par2 is a program for creating and using PAR2 files to detect +damage in data files and repair them if necessary. It can be used with +any kind of file. +.SH OPTIONS +.TP +.B -b +Set the Block-Count +.TP +.B -s +Set the Block-Size (Don't use both -b and -s) +.TP +.B -r +Level of Redundancy (%) +.TP +.B -c +Recovery block count (don't use both -r and -c) +.TP +.B -f +First Recovery-Block-Number +.TP +.B -u +Uniform recovery file sizes +.TP +.B -l +Limit size of recovery files (Don't use both -u and -l) +.TP +.B -n +Number of recovery files (Don't use both -n and -l) +.TP +.B -m +Memory (in MB) to use +.TP +.B -v [-v] +Be more verbose +.TP +.B -q [-q] +Be more quiet (-qq gives silence) +.TP +.B -- +Treat all remaining CommandLine as filenames +.TP +.BR +.SH EXAMPLES + +With PAR 2.0 you can create PAR2 recovery files for as few as 1 or as many as +32768 files. If you wanted to create PAR1 recovery files for a single file +you are forced to split the file into muliple parts and RAR is frequently +used for this purpose. You do NOT need to split files with PAR 2.0. + +To create PAR 2 recovery files for a single data file (e.g. one called +test.mpg), you can use the following command: + + par2 create test.mpg + +If test.mpg is an 800 MB file, then this will create a total of 8 PAR2 files +with the following filenames (taking roughly 6 minutes on a PC with a +1500MHz CPU): + + test.mpg.par2 - This is an index file for verification only + test.mpg.vol00+01.par2 - Recovery file with 1 recovery block + test.mpg.vol01+02.par2 - Recovery file with 2 recovery blocks + test.mpg.vol03+04.par2 - Recovery file with 4 recovery blocks + test.mpg.vol07+08.par2 - Recovery file with 8 recovery blocks + test.mpg.vol15+16.par2 - Recovery file with 16 recovery blocks + test.mpg.vol31+32.par2 - Recovery file with 32 recovery blocks + test.mpg.vol63+37.par2 - Recovery file with 37 recovery blocks + +The test.mpg.par2 file is 39 KB in size and the other files vary in size from +443 KB to 15 MB. + +These par2 files will enable the recovery of up to 100 errors totalling 40 MB +of lost or damaged data from the original test.mpg file when it and the par2 +files are posted on UseNet. + +When posting on UseNet it is recommended that you use the "-s" option to set +a blocksize that is equal to the Article size that you will use to post the +data file. If you wanted to post the test.mpg file using an article size +of 300 KB then the command you would type is: + + par2 create -s307200 test.mpg + +This will create 9 PAR2 files instead of 8, and they will be capable of +correcting up to 134 errors totalling 40 MB. It will take roughly 8 minutes +to create the recovery files this time. + +In both of these two examples, the total quantity of recovery data created +was 40 MB (which is 5% of 800 MB). If you wish to create a greater or lesser +quantity of recovery data, you can use the "-r" option. + +To create 10% recovery data instead of the default of 5% and also to use a +block size of 300 KB, you would use the following command: + + par2 create -s307200 -r10 test.mpg + +This would also create 9 PAR2 files, but they would be able to correct up to +269 errors totalling 80 MB. Since twice as much recovery data is created, it +will take about 16 minutes to do so with a 1500MHz CPU. + +The "-u" and "-n" options can be used to control exactly how many recovery +files are created and how the recovery blocks are distributed amoungst them. +They do not affect the total quantity of recovery data created. + +The "-f" option is used when you create additional recovery data. + +e.g. If you have already created 10% and want another 5% then you migh use +the following command: + + par2 create -s307200 -r5 -f300 test.mpg + +This specifies the same block size (which is a requirement for additional +recovery files), 5% recovery data, and a first block number of 300. + +The "-m" option controls how much memory par2 uses. It defaults to +16 MB unless you override it. + +CREATING PAR2 FILES FOR MULTIPLE DATA FILES + +When creating PAR2 recovery files form multiple data files, you must specify +the base filename to use for the par2 files and the names of all of the data +files. + +If test.mpg had been split into multiple RAR files, then you could use: + + par2 create test.mpg.rar.par2 test.mpg.part*.rar + +The files filename "test.mpg.rar.par2" says what you want the par2 files to +be called and "test.mpg.part*.rar" should select all of the RAR files. + +VERIFYING AND REPAIRING + +When using par2 recovery files to verify or repair the data files from +which they were created, you only need to specify the filename of one +of the par2 files to par2. + +e.g.: + + par2 verify test.mpg.par2 + +This tells par2 to use the information in test.mpg.par2 to verify the +data files. + +par2 will automatically search for the other par2 files that were +created and use the information they contain to determine the filenames +of the original data files and then to verify them. + +If all of the data files are ok, then par2 will report that repair +will not be required. + +If any of the data files are missing or damaged, par2 will report +the details of what it has found. If the recovery files contain enough +recovery blocks to repair the damage, you will be told that repair is +possible. Otherwise you will be told exactly how many recovery blocks +will be required in order to repair. + +To carry out a repair use the following command: + + par2 repair test.mpg.par2 + +This tells par2 to verify and if possible repair any damaged or +missing files. If a repair is carried out, then each file which is +repaired will be re-verified to confirm that the repair was successful. + +MISSNAMED AND INCOMPLETE DATA FILES + +If any of the recovery files or data files have the wrong filename, then +par2 will not automatically find and scan them. + +To have par2 scan such files, you must include them on the command +line when attempting to verify or repair. + +e.g.: + + par2 r test.mpg.par2 other.mpg + +This tells par2 to scan the file called other.mpg to see if it +contains any data belonging to the original data files. + +If one of the extra files specified in this way is an exact match +for a data file, then the repair process will rename the file so that +it has the correct filename. + +Because par2 is designed to be able to find good data within a +damaged file, it can do the same with incomplete files downloaded from +UseNet. If some of the articles for a file are missing, you should still +download the file and save it to disk for par2 to scan. If you +do this then you may find that you can carry out a repair in a situation +where you would not otherwise have sufficient recovery data. + +You can have par2 scan all files that are in the current directory +using a command such as: + + par2 r test.mpg.par2 * + +WHAT TO DO WHEN YOU ARE TOLD YOU NEED MORE RECOVERY BLOCKS + +If par2 determines that any of the data files are damaged or +missing and finds that there is insufficient recovery data to effect +a repair, you will be told that you need a certain number of recovery +blocks. You can obtain these by downloading additional recovery files. + +In order to make things easy, par2 files have filenames that tell you +exactly how many recovery blocks each one contains. + +Assuming that the following command was used to create recovery data: + + par2 c -b1000 -r5 test.mpg + +Then the recovery files that are created would be called: + + test.mpg.par2 + test.mpg.vol00+01.par2 + test.mpg.vol01+02.par2 + test.mpg.vol03+04.par2 + test.mpg.vol07+08.par2 + test.mpg.vol15+16.par2 + test.mpg.vol31+19.par2 + +The first file in this list does not contain any recovery data, it only +contains information sufficient to verify the data files. + +Each of the other files contains a different number of recovery blocks. +The number after the '+' sign is the number of recovery blocks and the +number preceding the '+' sign is the block number of the first recovery +block in that file. + +If par2 told you that you needed 10 recovery blocks, then you would +need "test.mpg.vol01+02.par2" and "test.mpg.vol07+08.par". You might of course +choose to fetch "test.mpg.vol15+16.par2" instead (in which case you would have +an extra 6 recovery blocks which would not be used for the repair). + +.SH NOTES + +This version of par2 does not support recording path information for +files. Whilst you can create recovery files for files from multiple locations, +it will expect all files to be in the current directory when verifying and +repairing. This limitation will be corrected in an update. + +.SH REED SOLOMON CODING + +PAR2 uses Reed Solomon Coding to perform its calculations. For details of this +coding technique try the following link: + +``A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems'' + + +.SH AUTHOR +.br +.B par2 +was written by Peter Brian Clements . + +This man page was contributed by Andres Salomon +for the Debian GNU/Linux system (but may be used by others). --- par2cmdline-0.4.orig/debian/copyright +++ par2cmdline-0.4/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Andres Salomon on +Wed, 14 Jan 2004 23:01:46 -0500. + +It was downloaded from http://parchive.sourceforge.net/ + +Upstream Author: Peter Brian Clements + +Copyright (c) 2003 Peter Brian Clements + +License: + +par2cmdline 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. + +par2cmdline 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems, the full text of the GPL can be found in +/usr/share/common-licenses/GPL + +The Debian packaging is +Copyright (C) 2004-2005, Andres Salomon +Copyright (C) 2005-2006, Wesley J. Landaker +Copyright (C) 2007, Bart Martens +and is licensed under the GPL, see above. --- par2cmdline-0.4.orig/debian/compat +++ par2cmdline-0.4/debian/compat @@ -0,0 +1 @@ +5 --- par2cmdline-0.4.orig/debian/control +++ par2cmdline-0.4/debian/control @@ -0,0 +1,19 @@ +Source: par2cmdline +Section: utils +Priority: extra +Maintainer: Bart Martens +Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9 +Standards-Version: 3.8.3 +Homepage: http://parchive.sourceforge.net/ + +Package: par2 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Parity Archive Volume Set, for checking and repair of files + A command line implementation of the PAR v2.0 specification. This + specification is used for parity checking and repair of a file set. + If the files in the recovery set ever get damaged (e.g. when they are + transmitted or stored on a faulty disk) the client can read the damaged + input files, read the (possibly damaged) PAR files, and regenerate the + original input files. Of course, not all damages can be repaired, but + many can. --- par2cmdline-0.4.orig/debian/watch +++ par2cmdline-0.4/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/-(x86|sparc|ppc|alpha|amd64).*//" \ +http://sf.net/parchive/par2cmdline-(.*)\.tar\.gz --- par2cmdline-0.4.orig/debian/par2repair.1 +++ par2cmdline-0.4/debian/par2repair.1 @@ -0,0 +1,284 @@ +.\" +.\" par2(1) +.\" +.\" Copyright (C) 2004 Andres Salomon +.TH par2 1 "May 2004" +.SH NAME +par2 \- PAR 2.0 compatible file verification and repair tool. +.SH SYNOPSIS +.B par2 +c(reate) [options] [files] +.br +.B par2 +v(erify) [options] [files] +.br +.B par2 +r(epair) [options] [files] +.br + +.br + Or: +.br + +.br +.B par2create +[options] [files] +.br +.B par2verify +[options] [files] +.br +.B par2repair +[options] [files] +.SH DESCRIPTION +par2 is a program for creating and using PAR2 files to detect +damage in data files and repair them if necessary. It can be used with +any kind of file. +.SH OPTIONS +.TP +.B -b +Set the Block-Count +.TP +.B -s +Set the Block-Size (Don't use both -b and -s) +.TP +.B -r +Level of Redundancy (%) +.TP +.B -c +Recovery block count (don't use both -r and -c) +.TP +.B -f +First Recovery-Block-Number +.TP +.B -u +Uniform recovery file sizes +.TP +.B -l +Limit size of recovery files (Don't use both -u and -l) +.TP +.B -n +Number of recovery files (Don't use both -n and -l) +.TP +.B -m +Memory (in MB) to use +.TP +.B -v [-v] +Be more verbose +.TP +.B -q [-q] +Be more quiet (-qq gives silence) +.TP +.B -- +Treat all remaining CommandLine as filenames +.TP +.BR +.SH EXAMPLES + +With PAR 2.0 you can create PAR2 recovery files for as few as 1 or as many as +32768 files. If you wanted to create PAR1 recovery files for a single file +you are forced to split the file into muliple parts and RAR is frequently +used for this purpose. You do NOT need to split files with PAR 2.0. + +To create PAR 2 recovery files for a single data file (e.g. one called +test.mpg), you can use the following command: + + par2 create test.mpg + +If test.mpg is an 800 MB file, then this will create a total of 8 PAR2 files +with the following filenames (taking roughly 6 minutes on a PC with a +1500MHz CPU): + + test.mpg.par2 - This is an index file for verification only + test.mpg.vol00+01.par2 - Recovery file with 1 recovery block + test.mpg.vol01+02.par2 - Recovery file with 2 recovery blocks + test.mpg.vol03+04.par2 - Recovery file with 4 recovery blocks + test.mpg.vol07+08.par2 - Recovery file with 8 recovery blocks + test.mpg.vol15+16.par2 - Recovery file with 16 recovery blocks + test.mpg.vol31+32.par2 - Recovery file with 32 recovery blocks + test.mpg.vol63+37.par2 - Recovery file with 37 recovery blocks + +The test.mpg.par2 file is 39 KB in size and the other files vary in size from +443 KB to 15 MB. + +These par2 files will enable the recovery of up to 100 errors totalling 40 MB +of lost or damaged data from the original test.mpg file when it and the par2 +files are posted on UseNet. + +When posting on UseNet it is recommended that you use the "-s" option to set +a blocksize that is equal to the Article size that you will use to post the +data file. If you wanted to post the test.mpg file using an article size +of 300 KB then the command you would type is: + + par2 create -s307200 test.mpg + +This will create 9 PAR2 files instead of 8, and they will be capable of +correcting up to 134 errors totalling 40 MB. It will take roughly 8 minutes +to create the recovery files this time. + +In both of these two examples, the total quantity of recovery data created +was 40 MB (which is 5% of 800 MB). If you wish to create a greater or lesser +quantity of recovery data, you can use the "-r" option. + +To create 10% recovery data instead of the default of 5% and also to use a +block size of 300 KB, you would use the following command: + + par2 create -s307200 -r10 test.mpg + +This would also create 9 PAR2 files, but they would be able to correct up to +269 errors totalling 80 MB. Since twice as much recovery data is created, it +will take about 16 minutes to do so with a 1500MHz CPU. + +The "-u" and "-n" options can be used to control exactly how many recovery +files are created and how the recovery blocks are distributed amoungst them. +They do not affect the total quantity of recovery data created. + +The "-f" option is used when you create additional recovery data. + +e.g. If you have already created 10% and want another 5% then you migh use +the following command: + + par2 create -s307200 -r5 -f300 test.mpg + +This specifies the same block size (which is a requirement for additional +recovery files), 5% recovery data, and a first block number of 300. + +The "-m" option controls how much memory par2 uses. It defaults to +16 MB unless you override it. + +CREATING PAR2 FILES FOR MULTIPLE DATA FILES + +When creating PAR2 recovery files form multiple data files, you must specify +the base filename to use for the par2 files and the names of all of the data +files. + +If test.mpg had been split into multiple RAR files, then you could use: + + par2 create test.mpg.rar.par2 test.mpg.part*.rar + +The files filename "test.mpg.rar.par2" says what you want the par2 files to +be called and "test.mpg.part*.rar" should select all of the RAR files. + +VERIFYING AND REPAIRING + +When using par2 recovery files to verify or repair the data files from +which they were created, you only need to specify the filename of one +of the par2 files to par2. + +e.g.: + + par2 verify test.mpg.par2 + +This tells par2 to use the information in test.mpg.par2 to verify the +data files. + +par2 will automatically search for the other par2 files that were +created and use the information they contain to determine the filenames +of the original data files and then to verify them. + +If all of the data files are ok, then par2 will report that repair +will not be required. + +If any of the data files are missing or damaged, par2 will report +the details of what it has found. If the recovery files contain enough +recovery blocks to repair the damage, you will be told that repair is +possible. Otherwise you will be told exactly how many recovery blocks +will be required in order to repair. + +To carry out a repair use the following command: + + par2 repair test.mpg.par2 + +This tells par2 to verify and if possible repair any damaged or +missing files. If a repair is carried out, then each file which is +repaired will be re-verified to confirm that the repair was successful. + +MISSNAMED AND INCOMPLETE DATA FILES + +If any of the recovery files or data files have the wrong filename, then +par2 will not automatically find and scan them. + +To have par2 scan such files, you must include them on the command +line when attempting to verify or repair. + +e.g.: + + par2 r test.mpg.par2 other.mpg + +This tells par2 to scan the file called other.mpg to see if it +contains any data belonging to the original data files. + +If one of the extra files specified in this way is an exact match +for a data file, then the repair process will rename the file so that +it has the correct filename. + +Because par2 is designed to be able to find good data within a +damaged file, it can do the same with incomplete files downloaded from +UseNet. If some of the articles for a file are missing, you should still +download the file and save it to disk for par2 to scan. If you +do this then you may find that you can carry out a repair in a situation +where you would not otherwise have sufficient recovery data. + +You can have par2 scan all files that are in the current directory +using a command such as: + + par2 r test.mpg.par2 * + +WHAT TO DO WHEN YOU ARE TOLD YOU NEED MORE RECOVERY BLOCKS + +If par2 determines that any of the data files are damaged or +missing and finds that there is insufficient recovery data to effect +a repair, you will be told that you need a certain number of recovery +blocks. You can obtain these by downloading additional recovery files. + +In order to make things easy, par2 files have filenames that tell you +exactly how many recovery blocks each one contains. + +Assuming that the following command was used to create recovery data: + + par2 c -b1000 -r5 test.mpg + +Then the recovery files that are created would be called: + + test.mpg.par2 + test.mpg.vol00+01.par2 + test.mpg.vol01+02.par2 + test.mpg.vol03+04.par2 + test.mpg.vol07+08.par2 + test.mpg.vol15+16.par2 + test.mpg.vol31+19.par2 + +The first file in this list does not contain any recovery data, it only +contains information sufficient to verify the data files. + +Each of the other files contains a different number of recovery blocks. +The number after the '+' sign is the number of recovery blocks and the +number preceding the '+' sign is the block number of the first recovery +block in that file. + +If par2 told you that you needed 10 recovery blocks, then you would +need "test.mpg.vol01+02.par2" and "test.mpg.vol07+08.par". You might of course +choose to fetch "test.mpg.vol15+16.par2" instead (in which case you would have +an extra 6 recovery blocks which would not be used for the repair). + +.SH NOTES + +This version of par2 does not support recording path information for +files. Whilst you can create recovery files for files from multiple locations, +it will expect all files to be in the current directory when verifying and +repairing. This limitation will be corrected in an update. + +.SH REED SOLOMON CODING + +PAR2 uses Reed Solomon Coding to perform its calculations. For details of this +coding technique try the following link: + +``A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems'' + + +.SH AUTHOR +.br +.B par2 +was written by Peter Brian Clements . + +This man page was contributed by Andres Salomon +for the Debian GNU/Linux system (but may be used by others). --- par2cmdline-0.4.orig/debian/changelog +++ par2cmdline-0.4/debian/changelog @@ -0,0 +1,97 @@ +par2cmdline (0.4-11build1) precise; urgency=low + + * No-change rebuild to drop spurious libsfgcc1 dependency on armhf. + + -- Adam Conrad Fri, 02 Dec 2011 21:04:01 -0700 + +par2cmdline (0.4-11) unstable; urgency=low + + * debian/rules: Preserve updated aclocal.m4. Fixes FTBFS. Closes: #544645. + + -- Bart Martens Wed, 02 Sep 2009 12:59:45 +0200 + +par2cmdline (0.4-10) unstable; urgency=low + + * debian/control, debian/rules: No longer use automake1.8. Closes: #473346. + Thanks to Eric Dorland . + + -- Bart Martens Sun, 30 Mar 2008 07:13:58 +0200 + +par2cmdline (0.4-9) unstable; urgency=low + + * New maintainer. Closes: #396621. + * debian/compat, debian/control: Use debhelper 5. + * debian/copyright: Updated. + * debian/patches/000_unidentified.diff: Moved various existing changes to + this patch file. + * debian/rules: Updated to keep generated changes out of the .diff.gz. + * debian/watch: Updated. + * debian/patches/004_kfreebsd.diff: Added. Closes: #415106. Patch by Cyril + Brulebois , thanks. + + -- Bart Martens Sat, 24 Mar 2007 13:08:11 +0100 + +par2cmdline (0.4-8) unstable; urgency=low + + * Allow operation on block devices (closes: #362558) + - (Thanks to Peter Cordes ) + * Now using Standards-Version 3.7.2.0 (no changes necessary) + + -- Wesley J. Landaker Sun, 4 Jun 2006 13:10:27 -0600 + +par2cmdline (0.4-7) unstable; urgency=low + + * Patch to fix G++ 4.1 issue (closes: #356767) + - (Thanks to Ben Hutchings ) + + -- Wesley J. Landaker Sat, 25 Mar 2006 18:57:18 -0700 + +par2cmdline (0.4-6) unstable; urgency=low + + * Applied patch to fix crash in quiet modes (closes: #299658) + - (Thanks to Stelios Bounanos ) + * Added a few more relevant files to debian/docs + * Added debian/watch to scan for upstream versions + + -- Wesley J. Landaker Thu, 29 Sep 2005 07:51:05 -0600 + +par2cmdline (0.4-5) unstable; urgency=low + + * Whoops, *actually* updated mainter info this time. =) + * Added debian/svn-deblayout (for use with svn-buildpackage) + + -- Wesley J. Landaker Sun, 18 Sep 2005 17:24:55 -0600 + +par2cmdline (0.4-4) unstable; urgency=low + + * Adopting package, new maintainer (closes: #321457) + * Updated to Standards-Version 3.6.2.0 + + -- Wesley J. Landaker Sun, 18 Sep 2005 16:45:25 -0600 + +par2cmdline (0.4-3) unstable; urgency=low + + * Update my email address. + + -- Andres Salomon Fri, 05 Aug 2005 12:13:25 -0400 + +par2cmdline (0.4-2) unstable; urgency=low + + * Fix gcc-4.0 build failures; thanks to Andreas Jochens (closes: #287904). + + -- Andres Salomon Thu, 30 Dec 2004 21:21:01 -0500 + +par2cmdline (0.4-1) unstable; urgency=low + + * New upstream release. + * Update package to use automake1.8 instead of 1.7. + * Add manpages for par2 and symlinks (closes: #246130). + + -- Andres Salomon Thu, 27 May 2004 14:19:30 -0400 + +par2cmdline (0.3-1) unstable; urgency=low + + * Initial Release. (Closes: #201125) + + -- Andres Salomon Wed, 14 Jan 2004 22:47:56 -0500 + --- par2cmdline-0.4.orig/debian/rules +++ par2cmdline-0.4/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/class/autotools.mk + +DEB_AUTO_UPDATE_AUTOMAKE := 1.9 + +CRUFT = Makefile.in configure config.h.in + +update-config:: + for f in $(CRUFT); do [ -e $$f.debian-rules-orig ] || cp -p $$f $$f.debian-rules-orig; done + +clean:: + rm -rf autom4te.cache/ + for f in $(CRUFT); do [ ! -e $$f.debian-rules-orig ] || mv $$f.debian-rules-orig $$f; done --- par2cmdline-0.4.orig/debian/svn-deblayout +++ par2cmdline-0.4/debian/svn-deblayout @@ -0,0 +1,7 @@ +buildArea=../build-area +origDir=../tarballs +tagsUrl=svn://tonberry/debian/par2cmdline/tag +trunkDir=. +trunkUrl=svn://tonberry/debian/par2cmdline/trunk +upsCurrentUrl=svn://tonberry/debian/par2cmdline/branch/upstream/current +upsTagUrl=svn://tonberry/debian/par2cmdline/branch/upstream --- par2cmdline-0.4.orig/debian/docs +++ par2cmdline-0.4/debian/docs @@ -0,0 +1,2 @@ +PORTING +ROADMAP --- par2cmdline-0.4.orig/debian/par2.1 +++ par2cmdline-0.4/debian/par2.1 @@ -0,0 +1,284 @@ +.\" +.\" par2(1) +.\" +.\" Copyright (C) 2004 Andres Salomon +.TH par2 1 "May 2004" +.SH NAME +par2 \- PAR 2.0 compatible file verification and repair tool. +.SH SYNOPSIS +.B par2 +c(reate) [options] [files] +.br +.B par2 +v(erify) [options] [files] +.br +.B par2 +r(epair) [options] [files] +.br + +.br + Or: +.br + +.br +.B par2create +[options] [files] +.br +.B par2verify +[options] [files] +.br +.B par2repair +[options] [files] +.SH DESCRIPTION +par2 is a program for creating and using PAR2 files to detect +damage in data files and repair them if necessary. It can be used with +any kind of file. +.SH OPTIONS +.TP +.B -b +Set the Block-Count +.TP +.B -s +Set the Block-Size (Don't use both -b and -s) +.TP +.B -r +Level of Redundancy (%) +.TP +.B -c +Recovery block count (don't use both -r and -c) +.TP +.B -f +First Recovery-Block-Number +.TP +.B -u +Uniform recovery file sizes +.TP +.B -l +Limit size of recovery files (Don't use both -u and -l) +.TP +.B -n +Number of recovery files (Don't use both -n and -l) +.TP +.B -m +Memory (in MB) to use +.TP +.B -v [-v] +Be more verbose +.TP +.B -q [-q] +Be more quiet (-qq gives silence) +.TP +.B -- +Treat all remaining CommandLine as filenames +.TP +.BR +.SH EXAMPLES + +With PAR 2.0 you can create PAR2 recovery files for as few as 1 or as many as +32768 files. If you wanted to create PAR1 recovery files for a single file +you are forced to split the file into muliple parts and RAR is frequently +used for this purpose. You do NOT need to split files with PAR 2.0. + +To create PAR 2 recovery files for a single data file (e.g. one called +test.mpg), you can use the following command: + + par2 create test.mpg + +If test.mpg is an 800 MB file, then this will create a total of 8 PAR2 files +with the following filenames (taking roughly 6 minutes on a PC with a +1500MHz CPU): + + test.mpg.par2 - This is an index file for verification only + test.mpg.vol00+01.par2 - Recovery file with 1 recovery block + test.mpg.vol01+02.par2 - Recovery file with 2 recovery blocks + test.mpg.vol03+04.par2 - Recovery file with 4 recovery blocks + test.mpg.vol07+08.par2 - Recovery file with 8 recovery blocks + test.mpg.vol15+16.par2 - Recovery file with 16 recovery blocks + test.mpg.vol31+32.par2 - Recovery file with 32 recovery blocks + test.mpg.vol63+37.par2 - Recovery file with 37 recovery blocks + +The test.mpg.par2 file is 39 KB in size and the other files vary in size from +443 KB to 15 MB. + +These par2 files will enable the recovery of up to 100 errors totalling 40 MB +of lost or damaged data from the original test.mpg file when it and the par2 +files are posted on UseNet. + +When posting on UseNet it is recommended that you use the "-s" option to set +a blocksize that is equal to the Article size that you will use to post the +data file. If you wanted to post the test.mpg file using an article size +of 300 KB then the command you would type is: + + par2 create -s307200 test.mpg + +This will create 9 PAR2 files instead of 8, and they will be capable of +correcting up to 134 errors totalling 40 MB. It will take roughly 8 minutes +to create the recovery files this time. + +In both of these two examples, the total quantity of recovery data created +was 40 MB (which is 5% of 800 MB). If you wish to create a greater or lesser +quantity of recovery data, you can use the "-r" option. + +To create 10% recovery data instead of the default of 5% and also to use a +block size of 300 KB, you would use the following command: + + par2 create -s307200 -r10 test.mpg + +This would also create 9 PAR2 files, but they would be able to correct up to +269 errors totalling 80 MB. Since twice as much recovery data is created, it +will take about 16 minutes to do so with a 1500MHz CPU. + +The "-u" and "-n" options can be used to control exactly how many recovery +files are created and how the recovery blocks are distributed amoungst them. +They do not affect the total quantity of recovery data created. + +The "-f" option is used when you create additional recovery data. + +e.g. If you have already created 10% and want another 5% then you migh use +the following command: + + par2 create -s307200 -r5 -f300 test.mpg + +This specifies the same block size (which is a requirement for additional +recovery files), 5% recovery data, and a first block number of 300. + +The "-m" option controls how much memory par2 uses. It defaults to +16 MB unless you override it. + +CREATING PAR2 FILES FOR MULTIPLE DATA FILES + +When creating PAR2 recovery files form multiple data files, you must specify +the base filename to use for the par2 files and the names of all of the data +files. + +If test.mpg had been split into multiple RAR files, then you could use: + + par2 create test.mpg.rar.par2 test.mpg.part*.rar + +The files filename "test.mpg.rar.par2" says what you want the par2 files to +be called and "test.mpg.part*.rar" should select all of the RAR files. + +VERIFYING AND REPAIRING + +When using par2 recovery files to verify or repair the data files from +which they were created, you only need to specify the filename of one +of the par2 files to par2. + +e.g.: + + par2 verify test.mpg.par2 + +This tells par2 to use the information in test.mpg.par2 to verify the +data files. + +par2 will automatically search for the other par2 files that were +created and use the information they contain to determine the filenames +of the original data files and then to verify them. + +If all of the data files are ok, then par2 will report that repair +will not be required. + +If any of the data files are missing or damaged, par2 will report +the details of what it has found. If the recovery files contain enough +recovery blocks to repair the damage, you will be told that repair is +possible. Otherwise you will be told exactly how many recovery blocks +will be required in order to repair. + +To carry out a repair use the following command: + + par2 repair test.mpg.par2 + +This tells par2 to verify and if possible repair any damaged or +missing files. If a repair is carried out, then each file which is +repaired will be re-verified to confirm that the repair was successful. + +MISSNAMED AND INCOMPLETE DATA FILES + +If any of the recovery files or data files have the wrong filename, then +par2 will not automatically find and scan them. + +To have par2 scan such files, you must include them on the command +line when attempting to verify or repair. + +e.g.: + + par2 r test.mpg.par2 other.mpg + +This tells par2 to scan the file called other.mpg to see if it +contains any data belonging to the original data files. + +If one of the extra files specified in this way is an exact match +for a data file, then the repair process will rename the file so that +it has the correct filename. + +Because par2 is designed to be able to find good data within a +damaged file, it can do the same with incomplete files downloaded from +UseNet. If some of the articles for a file are missing, you should still +download the file and save it to disk for par2 to scan. If you +do this then you may find that you can carry out a repair in a situation +where you would not otherwise have sufficient recovery data. + +You can have par2 scan all files that are in the current directory +using a command such as: + + par2 r test.mpg.par2 * + +WHAT TO DO WHEN YOU ARE TOLD YOU NEED MORE RECOVERY BLOCKS + +If par2 determines that any of the data files are damaged or +missing and finds that there is insufficient recovery data to effect +a repair, you will be told that you need a certain number of recovery +blocks. You can obtain these by downloading additional recovery files. + +In order to make things easy, par2 files have filenames that tell you +exactly how many recovery blocks each one contains. + +Assuming that the following command was used to create recovery data: + + par2 c -b1000 -r5 test.mpg + +Then the recovery files that are created would be called: + + test.mpg.par2 + test.mpg.vol00+01.par2 + test.mpg.vol01+02.par2 + test.mpg.vol03+04.par2 + test.mpg.vol07+08.par2 + test.mpg.vol15+16.par2 + test.mpg.vol31+19.par2 + +The first file in this list does not contain any recovery data, it only +contains information sufficient to verify the data files. + +Each of the other files contains a different number of recovery blocks. +The number after the '+' sign is the number of recovery blocks and the +number preceding the '+' sign is the block number of the first recovery +block in that file. + +If par2 told you that you needed 10 recovery blocks, then you would +need "test.mpg.vol01+02.par2" and "test.mpg.vol07+08.par". You might of course +choose to fetch "test.mpg.vol15+16.par2" instead (in which case you would have +an extra 6 recovery blocks which would not be used for the repair). + +.SH NOTES + +This version of par2 does not support recording path information for +files. Whilst you can create recovery files for files from multiple locations, +it will expect all files to be in the current directory when verifying and +repairing. This limitation will be corrected in an update. + +.SH REED SOLOMON CODING + +PAR2 uses Reed Solomon Coding to perform its calculations. For details of this +coding technique try the following link: + +``A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems'' + + +.SH AUTHOR +.br +.B par2 +was written by Peter Brian Clements . + +This man page was contributed by Andres Salomon +for the Debian GNU/Linux system (but may be used by others). --- par2cmdline-0.4.orig/debian/manpages +++ par2cmdline-0.4/debian/manpages @@ -0,0 +1 @@ +debian/par2*.1 --- par2cmdline-0.4.orig/debian/patches/000_unidentified.diff +++ par2cmdline-0.4/debian/patches/000_unidentified.diff @@ -0,0 +1,290 @@ +These are a few changes that were not bundled in debian/patches/ at the time I +adopted the package. TODO: study and identify these changes. + + +diff -x '*.unf' -x '*.jpg' -x '*_archive' -x '*.png' -x '*.wav' -x '*.ogg' -ruN ../orig/par2cmdline-0.4/diskfile.cpp ./diskfile.cpp +--- ../orig/par2cmdline-0.4/diskfile.cpp 2004-04-12 13:25:37.000000000 +0200 ++++ ./diskfile.cpp 2007-03-24 13:25:43.000000000 +0100 +@@ -799,20 +799,33 @@ + bool DiskFile::FileExists(string filename) + { + struct stat st; +- return ((0 == stat(filename.c_str(), &st)) && (0 != (st.st_mode & S_IFREG))); ++ return ((0 == stat(filename.c_str(), &st)) && ++ (st.st_mode & (S_IFREG|S_IFBLK)) ); + } + + u64 DiskFile::GetFileSize(string filename) + { + struct stat st; +- if ((0 == stat(filename.c_str(), &st)) && (0 != (st.st_mode & S_IFREG))) ++ if (0 == stat(filename.c_str(), &st)) + { +- return st.st_size; +- } +- else +- { +- return 0; ++ if (st.st_mode & S_IFREG) ++ { ++ return st.st_size; ++ } ++ else if (st.st_mode & S_IFBLK) ++ { ++ FILE *fp; ++ u64 size = 0; ++ if ( NULL != (fp = fopen(filename.c_str(), "rb")) ) ++ { ++ ioctl(fileno(fp), BLKGETSIZE64, &size); ++ fclose(fp); ++ } ++ return size; ++ } + } ++ ++ return 0; + } + + +diff -x '*.unf' -x '*.jpg' -x '*_archive' -x '*.png' -x '*.wav' -x '*.ogg' -ruN ../orig/par2cmdline-0.4/letype.h ./letype.h +--- ../orig/par2cmdline-0.4/letype.h 2003-05-26 20:01:17.000000000 +0200 ++++ ./letype.h 2007-03-24 13:25:43.000000000 +0100 +@@ -28,44 +28,15 @@ + + #else + +-class leu16 ++struct leu16 + { +-public: +- leu16(void); +- +- leu16(const leu16 &other); +- leu16& operator=(const leu16 &other); +- +- leu16(const u16 &other); + leu16& operator=(const u16 &other); + + operator u16(void) const; + +-protected: + u16 value; + }; + +-inline leu16::leu16(void) +-{ +-} +- +-inline leu16::leu16(const leu16 &other) +-: value(other.value) +-{ +-} +- +-inline leu16& leu16::operator =(const leu16 &other) +-{ +- value = other.value; +- return *this; +-} +- +-inline leu16::leu16(const u16 &other) +-{ +- ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff); +- ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff); +-} +- + inline leu16& leu16::operator=(const u16 &other) + { + ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff); +@@ -81,46 +52,15 @@ + } + + +-class leu32 ++struct leu32 + { +-public: +- leu32(void); +- +- leu32(const leu32 &other); +- leu32& operator=(const leu32 &other); +- +- leu32(const u32 &other); + leu32& operator=(const u32 &other); + + operator u32(void) const; + +-protected: + u32 value; + }; + +-inline leu32::leu32(void) +-{ +-} +- +-inline leu32::leu32(const leu32 &other) +-: value(other.value) +-{ +-} +- +-inline leu32& leu32::operator =(const leu32 &other) +-{ +- value = other.value; +- return *this; +-} +- +-inline leu32::leu32(const u32 &other) +-{ +- ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff); +- ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff); +- ((unsigned char*)&value)[2] = (unsigned char)((other >> 16) & 0xff); +- ((unsigned char*)&value)[3] = (unsigned char)((other >> 24) & 0xff); +-} +- + inline leu32& leu32::operator=(const u32 &other) + { + ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff); +@@ -140,50 +80,15 @@ + } + + +-class leu64 ++struct leu64 + { +-public: +- leu64(void); +- +- leu64(const leu64 &other); +- leu64& operator=(const leu64 &other); +- +- leu64(const u64 &other); + leu64& operator=(const u64 &other); + + operator u64(void) const; + +-protected: + u64 value; + }; + +-inline leu64::leu64(void) +-{ +-} +- +-inline leu64::leu64(const leu64 &other) +-: value(other.value) +-{ +-} +- +-inline leu64& leu64::operator =(const leu64 &other) +-{ +- value = other.value; +- return *this; +-} +- +-inline leu64::leu64(const u64 &other) +-{ +- ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff); +- ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff); +- ((unsigned char*)&value)[2] = (unsigned char)((other >> 16) & 0xff); +- ((unsigned char*)&value)[3] = (unsigned char)((other >> 24) & 0xff); +- ((unsigned char*)&value)[4] = (unsigned char)((other >> 32) & 0xff); +- ((unsigned char*)&value)[5] = (unsigned char)((other >> 40) & 0xff); +- ((unsigned char*)&value)[6] = (unsigned char)((other >> 48) & 0xff); +- ((unsigned char*)&value)[7] = (unsigned char)((other >> 56) & 0xff); +-} +- + inline leu64& leu64::operator=(const u64 &other) + { + ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff); +diff -x '*.unf' -x '*.jpg' -x '*_archive' -x '*.png' -x '*.wav' -x '*.ogg' -ruN ../orig/par2cmdline-0.4/md5.h ./md5.h +--- ../orig/par2cmdline-0.4/md5.h 2003-08-02 01:41:04.000000000 +0200 ++++ ./md5.h 2007-03-24 13:25:43.000000000 +0100 +@@ -20,6 +20,13 @@ + #ifndef __MD5_H__ + #define __MD5_H__ + ++#ifdef WIN32 ++#pragma pack(push, 1) ++#define PACKED ++#else ++#define PACKED __attribute__ ((packed)) ++#endif ++ + // This file defines the MD5Hash and MD5Context objects which are used + // to compute and manipulate the MD5 Hash values for a block of data. + +@@ -35,12 +42,11 @@ + + // MD5 Hash value + +-class MD5Hash +-{ +-public: +- // Constructor does not initialise the value +- MD5Hash(void) {}; ++struct MD5Hash; ++ostream& operator<<(ostream &s, const MD5Hash &hash); + ++struct MD5Hash ++{ + // Comparison operators + bool operator==(const MD5Hash &other) const; + bool operator!=(const MD5Hash &other) const; +@@ -54,13 +60,8 @@ + friend ostream& operator<<(ostream &s, const MD5Hash &hash); + string print(void) const; + +- // Copy and assignment +- MD5Hash(const MD5Hash &other); +- MD5Hash& operator=(const MD5Hash &other); +- +-public: + u8 hash[16]; // 16 byte MD5 Hash value +-}; ++} PACKED; + + // Intermediate computation state + +@@ -144,16 +145,9 @@ + return !other.operator<(*this); + } + +-inline MD5Hash::MD5Hash(const MD5Hash &other) +-{ +- memcpy(&hash, &other.hash, sizeof(hash)); +-} +- +-inline MD5Hash& MD5Hash::operator=(const MD5Hash &other) +-{ +- memcpy(&hash, &other.hash, sizeof(hash)); +- +- return *this; +-} ++#ifdef WIN32 ++#pragma pack(pop) ++#endif ++#undef PACKED + + #endif // __MD5_H__ +diff -x '*.unf' -x '*.jpg' -x '*_archive' -x '*.png' -x '*.wav' -x '*.ogg' -ruN ../orig/par2cmdline-0.4/par2cmdline.h ./par2cmdline.h +--- ../orig/par2cmdline-0.4/par2cmdline.h 2004-04-15 15:30:02.000000000 +0200 ++++ ./par2cmdline.h 2007-03-24 13:25:43.000000000 +0100 +@@ -132,6 +132,10 @@ + typedef unsigned long long u64; + #endif + ++// FIXME: this is not done right w/ autoconf ++#include ++#include ++ + #if HAVE_SYS_STAT_H + # include + #endif +@@ -179,6 +183,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + --- par2cmdline-0.4.orig/debian/patches/002-gcc_40_fixes.patch +++ par2cmdline-0.4/debian/patches/002-gcc_40_fixes.patch @@ -0,0 +1,92 @@ +Package: par2cmdline +Severity: normal +Tags: patch + +When building 'par2cmdline' on amd64 with gcc-4.0, +I get the following error: + +reedsolomon.cpp:83: error: explicit specialization of 'bool ReedSolomon::SetInput(u32)' must be introduced by 'template <>' +reedsolomon.cpp:83: error: template-id 'SetInput<>' for 'bool ReedSolomon::SetInput(u32)' does not match any template declaration +reedsolomon.cpp:83: error: invalid function declaration +reedsolomon.cpp:104: error: explicit specialization of 'bool ReedSolomon::Process(size_t, u32, const void*, u32, void*)' must be introduced by 'template <>' +reedsolomon.cpp:104: error: template-id 'Process<>' for 'bool ReedSolomon::Process(size_t, u32, const void*, u32, void*)' does not match any template declaration +reedsolomon.cpp:104: error: invalid function declaration +reedsolomon.cpp:192: error: explicit specialization of 'bool ReedSolomon::SetInput(const std::vector >&)' must be introduced by 'template <>' +reedsolomon.cpp:192: error: template-id 'SetInput<>' for 'bool ReedSolomon::SetInput(const std::vector >&)' does not match any template declaration +reedsolomon.cpp:192: error: invalid function declaration +reedsolomon.cpp:236: error: explicit specialization of 'bool ReedSolomon::SetInput(u32)' must be introduced by 'template <>' +reedsolomon.cpp:236: error: template-id 'SetInput<>' for 'bool ReedSolomon::SetInput(u32)' does not match any template declaration +reedsolomon.cpp:236: error: invalid function declaration +reedsolomon.cpp:270: error: explicit specialization of 'bool ReedSolomon::Process(size_t, u32, const void*, u32, void*)' must be introduced by 'template <>' +reedsolomon.cpp:270: error: template-id 'Process<>' for 'bool ReedSolomon::Process(size_t, u32, const void*, u32, void*)' does not match any template declaration +reedsolomon.cpp:270: error: invalid function declaration +make[2]: *** [reedsolomon.o] Error 1 +make[2]: Leaving directory `/par2cmdline-0.4' +make[1]: *** [all] Error 2 +make[1]: Leaving directory `/par2cmdline-0.4' +make: *** [debian/stamp-makefile-build] Error 2 + +With the attached patch 'par2cmdline' can be compiled +on amd64 using gcc-4.0. + +Regards +Andreas Jochens + +diff -urN orig/reedsolomon.cpp mod/reedsolomon.cpp +--- orig/reedsolomon.cpp 2003-05-26 20:01:31.000000000 +0200 ++++ mod/reedsolomon.cpp 2004-12-30 21:15:57.906327496 +0100 +@@ -51,7 +51,7 @@ + } + } + +-bool ReedSolomon::SetInput(const vector &present) ++template <> bool ReedSolomon::SetInput(const vector &present) + { + inputcount = (u32)present.size(); + +@@ -80,7 +80,7 @@ + return true; + } + +-bool ReedSolomon::SetInput(u32 count) ++template <> bool ReedSolomon::SetInput(u32 count) + { + inputcount = count; + +@@ -101,7 +101,7 @@ + return true; + } + +-bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) ++template <> bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) + { + // Look up the appropriate element in the RS matrix + Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex]; +@@ -189,7 +189,7 @@ + + // Set which of the source files are present and which are missing + // and compute the base values to use for the vandermonde matrix. +-bool ReedSolomon::SetInput(const vector &present) ++template <> bool ReedSolomon::SetInput(const vector &present) + { + inputcount = (u32)present.size(); + +@@ -233,7 +233,7 @@ + + // Record that the specified number of source files are all present + // and compute the base values to use for the vandermonde matrix. +-bool ReedSolomon::SetInput(u32 count) ++template <> bool ReedSolomon::SetInput(u32 count) + { + inputcount = count; + +@@ -267,7 +267,7 @@ + return true; + } + +-bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) ++template <> bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) + { + // Look up the appropriate element in the RS matrix + + --- par2cmdline-0.4.orig/debian/patches/004_kfreebsd.diff +++ par2cmdline-0.4/debian/patches/004_kfreebsd.diff @@ -0,0 +1,19 @@ +Patch by Cyril Brulebois +fixes an FTBFS on GNU/kFreeBSD +see bug 415106. + + +--- par2cmdline-0.4/diskfile.cpp 2007-03-16 06:56:17.225694000 +0100 ++++ par2cmdline-0.4/diskfile.cpp 2007-03-16 06:58:10.000000000 +0100 +@@ -27,6 +27,11 @@ + #endif + #endif + ++#if defined(__FreeBSD_kernel__) ++#include ++#define BLKGETSIZE64 DIOCGMEDIASIZE ++#endif ++ + + #ifdef WIN32 + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// --- par2cmdline-0.4.orig/debian/patches/001_hardlinks.patch +++ par2cmdline-0.4/debian/patches/001_hardlinks.patch @@ -0,0 +1,36 @@ +Revision: par2cmdline--mainline--0--patch-1 +Archive: dilinger@voxel.net--2004 +Creator: Andres Salomon +Date: Wed Jan 14 23:21:45 EST 2004 +Standard-date: 2004-01-15 04:21:45 GMT +Modified-files: Makefile.am +New-patches: dilinger@voxel.net--2004/par2cmdline--mainline--0--patch-1 +Summary: hardlinks? +Keywords: + +Don't create hard links when installing; use symlinks instead. Seriously, wtf? + +* added files + + {arch}/par2cmdline/par2cmdline--mainline/par2cmdline--mainline--0/dilinger@voxel.net--2004/patch-log/patch-1 + +* modified files + +--- orig/Makefile.am ++++ mod/Makefile.am +@@ -55,9 +55,9 @@ + TESTS = pretest test1 test2 test3 test4 test5 test6 posttest + + install-exec-hook : +- ln -f $(DESTDIR)$(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2create$(EXEEXT) +- ln -f $(DESTDIR)$(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2verify$(EXEEXT) +- ln -f $(DESTDIR)$(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2repair$(EXEEXT) ++ ln -sf $(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2create$(EXEEXT) ++ ln -sf $(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2verify$(EXEEXT) ++ ln -sf $(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2repair$(EXEEXT) + + uninstall-hook : + rm -f $(DESTDIR)$(bindir)/par2create$(EXEEXT) + + + --- par2cmdline-0.4.orig/debian/patches/003_fix_crash_in_quiet_mode.patch +++ par2cmdline-0.4/debian/patches/003_fix_crash_in_quiet_mode.patch @@ -0,0 +1,18 @@ +Index: par2creatorsourcefile.cpp +=================================================================== +--- par2creatorsourcefile.cpp (revision 398) ++++ par2creatorsourcefile.cpp (working copy) +@@ -213,11 +213,12 @@ + } + } + ++ offset += want; ++ + if (noiselevel > CommandLine::nlQuiet) + { + // Display progress + u32 oldfraction = (u32)(1000 * offset / filesize); +- offset += want; + u32 newfraction = (u32)(1000 * offset / filesize); + if (oldfraction != newfraction) + {