2012-08-26 08:39:24 +00:00
|
|
|
Copyright (c) 2012 Moinak Ghosh
|
|
|
|
|
2013-01-24 18:40:12 +00:00
|
|
|
Prerequisites
|
|
|
|
=============
|
|
|
|
64-bit System.
|
|
|
|
GCC 4.4 (with mpfr, ppl and cloog support packages for loop
|
|
|
|
vectorization).
|
2013-08-10 04:55:41 +00:00
|
|
|
libz (zlib) and development packages.
|
2013-01-24 18:40:12 +00:00
|
|
|
Libbz2 and development packages.
|
|
|
|
OpenSSL version 0.9.8 or greater.
|
2014-01-12 16:22:27 +00:00
|
|
|
Libarchive and its development packages.
|
2013-01-24 18:40:12 +00:00
|
|
|
|
2012-08-26 08:39:24 +00:00
|
|
|
Basic Installation
|
|
|
|
==================
|
|
|
|
The simplest process to build and install this utility is:
|
|
|
|
|
|
|
|
./config
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
2013-01-22 10:24:42 +00:00
|
|
|
The current makefiles and config scripts assume Gcc compiler is
|
|
|
|
in the PATH. Please update PATH before running config if that is
|
|
|
|
not the case.
|
|
|
|
|
2012-09-01 09:10:15 +00:00
|
|
|
In order to remove all binaries:
|
|
|
|
make clean
|
|
|
|
|
|
|
|
Remove all binaries and the generated Makefile:
|
|
|
|
make distclean
|
|
|
|
|
2012-08-26 08:39:24 +00:00
|
|
|
Strictly speaking the 'make install' step is not required to
|
|
|
|
run the utility as it is a single stand alone program for now.
|
|
|
|
|
|
|
|
The config script controls various compile time parameters and
|
|
|
|
generates the actual Makefile. You can get a short description
|
|
|
|
of all the options by running:
|
|
|
|
|
|
|
|
./config --help
|
|
|
|
|
2012-08-27 16:21:55 +00:00
|
|
|
NOTE: Basic Installation does not enable support for Libbsc, a
|
|
|
|
new block-sorting compressor (similar to but better than
|
|
|
|
Bzip2). See below for details.
|
|
|
|
|
2012-11-09 16:12:56 +00:00
|
|
|
Testing
|
|
|
|
=======
|
|
|
|
|
|
|
|
After running make as given above you can run:
|
|
|
|
make test
|
|
|
|
|
|
|
|
This will generate some data files from /usr/bin /usr/share and
|
|
|
|
/usr/include directories and then run a whole lot of tests. These
|
|
|
|
execute pcompress with a wide variety of combinations of options.
|
|
|
|
For every test both compression and decompression are performed
|
|
|
|
and after every decompression the decompressed file is verified
|
|
|
|
byte for byte with the original using the diff utility.
|
|
|
|
|
2012-12-17 14:53:30 +00:00
|
|
|
It takes a long time to run all the tests. The complete test log
|
|
|
|
is stored in the file test.log. Test failures are indicated by the
|
|
|
|
error message starting with the word "FATAL". All other error
|
|
|
|
messages visible in the log are a result of negative testing where
|
|
|
|
the utility is expected to exit with an error.
|
2012-11-09 16:12:56 +00:00
|
|
|
|
2012-12-17 15:29:27 +00:00
|
|
|
The files test/t1.tst, test/t2.tst and so on are individual test
|
|
|
|
suites. It is possible to run a single test suite. For example to
|
|
|
|
run test/t4.tst the following command can be used:
|
|
|
|
make test TESTSUITE=4
|
|
|
|
|
2012-08-27 16:21:55 +00:00
|
|
|
Custom Installation
|
|
|
|
===================
|
2012-12-17 14:53:30 +00:00
|
|
|
The options to the config script are detailed below. Note that this
|
|
|
|
is not the usual GNU Autoconf script.
|
2012-08-26 08:39:24 +00:00
|
|
|
|
|
|
|
./config [<options>]
|
|
|
|
|
|
|
|
<options> can be one of the following:
|
|
|
|
|
|
|
|
--prefix=<val> The installation prefix.
|
|
|
|
This is set to /usr by default. However alternate
|
|
|
|
prefix needs to eb used during packaging.
|
|
|
|
|
|
|
|
--enable-debug Enable debug mode compilation.
|
2012-08-27 16:21:55 +00:00
|
|
|
This reduces the compiler optimization level to
|
|
|
|
basic and taks out all the loop optimization flags.
|
|
|
|
This is primarily to aid debugging.
|
2012-08-26 08:39:24 +00:00
|
|
|
|
|
|
|
--disable-allocator Disable use of internal memory allocator mechanism.
|
2012-08-27 16:21:55 +00:00
|
|
|
The internal allocator can be totally disabled by
|
|
|
|
setting this build time flag. It is also possible
|
|
|
|
to dynamically disable the allocator by setting the
|
|
|
|
following env variable:
|
2012-08-26 08:39:24 +00:00
|
|
|
ALLOCATOR_BYPASS=1
|
|
|
|
|
|
|
|
--enable-debug-stats Enable printing of some verbose debug info.
|
|
|
|
This at present shows some info related to Dedupe
|
|
|
|
efficiency.
|
|
|
|
|
2012-12-16 17:47:04 +00:00
|
|
|
--with-zlib=<path to zlib installation tree> (Default: System)
|
|
|
|
Enable building against an alternate Zlib installation.
|
|
|
|
|
|
|
|
--with-bzlib=<path to Bzip2 library installation tree> (Default: System)
|
|
|
|
Enable building against an alternate Bzip2 and library
|
|
|
|
installation.
|
|
|
|
|
2014-01-12 16:22:27 +00:00
|
|
|
--with-libarchive=<path to libarchive installation tree> (Default: System)
|
|
|
|
Enable building against an alternate libarchive installation.
|
|
|
|
|
|
|
|
NOTE:
|
|
|
|
Pcompress only uses basic Libarchive functionality of
|
|
|
|
creating PAX archives. No other functionality or filter
|
|
|
|
support is used. So a local static libarchive build with
|
|
|
|
most features disabled can be used with this option.
|
|
|
|
|
2013-01-24 18:40:12 +00:00
|
|
|
--no-sse-detect Do not try to detect the CPU's SSE capability. This
|
|
|
|
mode will simply use SSE2 as the fallback default.
|
|
|
|
Using SSE4 and later improves performance significantly.
|
|
|
|
|
2014-01-12 16:22:27 +00:00
|
|
|
--no-1.3-archive-compat Disable compatibility with compressed archives created with Pcompress
|
|
|
|
version 1.3 (default: retain compatibility). Hash formats changed from
|
|
|
|
version 1.3 to 1.4 so this option is required if files created using
|
|
|
|
1.3 need to be decompressed by version 1.4 onwards.
|
|
|
|
|
2013-01-24 18:40:12 +00:00
|
|
|
--use-key256 Use 256-bit encryption keys. Default key length is
|
|
|
|
128-bit.
|
|
|
|
|
2012-08-26 08:39:24 +00:00
|
|
|
--help Display the help message.
|
|
|
|
|
2014-01-12 16:22:27 +00:00
|
|
|
|
2013-11-30 17:13:31 +00:00
|
|
|
Additional compilation flags can be passed to make like this:
|
2012-12-16 17:47:04 +00:00
|
|
|
make EXTRA_CPPFLAGS=<...> EXTRA_LDFLAGS=<...>
|
|
|
|
|