Skip to content

Commit

Permalink
Merge branch 'branch_2.7.x' into no_last_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrusb committed Dec 8, 2024
2 parents 2b669b5 + fd3ea00 commit 6af52f2
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 28 deletions.
4 changes: 4 additions & 0 deletions THANKS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
version 2.7.16
--------------
Thanks to Viorel at Sourceforge for feedback about the Gentoo patch.

version 2.7.15
--------------
Thanks to James Pedersen for feedback, thanks to Rolf Gebhardt for
Expand Down
12 changes: 12 additions & 0 deletions doc/Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2842,6 +2842,18 @@ <h4>Cross reference matrix</h4>
<td>1.3.0</td>
<td>1.2.2</td>
</tr>
<tr>
<td>December 9th, 2024</td>
<th>2.7.16</th>
<td>11.3</td>
<td>06</td>
<td>6.8.0</td>
<td>1.7.0</td>
<td>1.6.0</td>
<td>1.9.0</td>
<td>1.3.0</td>
<td>1.2.2</td>
</tr>
</table>
</div>

Expand Down
6 changes: 3 additions & 3 deletions man/dar.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH DAR 1 "June 6th, 2024"
.TH DAR 1 "December 8th, 2024"
.UC 8
.SH NAME
dar \- creates, tests, lists, extracts, compares, merges, isolates, repairs dar archives
Expand Down Expand Up @@ -157,7 +157,7 @@ create a subset archive from one or two existing archives (the resulting archive
create a "repaired" archive based on the archive given with -A option. The repairing only concerns the case where an archive has been interrupted and dar could not cleanly end the archive creation process (lack of disk space, power outage, and so on). This operation consists in reading the tape marks in sequential reading mode to gather the content of the archive and once its end is reached, to recreate the missing table of content (aka catalogue) located at the end of the archive. Note that the damaged archive is not modified but a repaired copy is built beside it. Why not just appending the catalogue to the archive? Because first it was simpler to implement allowing to reuse routines of the merging operation, second by precaution for dar to not mess an existing archive due to a bug and last, it would not be compatible with archive signing and gpg encryption under certain conditions (several recipients or the archive is signed and you are not the one who signed it).
.P
.RS
During the repairing operation, the repaired archive may have a different slicing (-s and -S options), a different encryption (-K and associated options, including gpg encryption and signing), a different repository slices permissions and ownership (--slice-mode option), user comment (--user-comment), generated hash (--hash) and min digits in slice number (--min-digits), but compression cannot be changed and tape marks cannot be removed (you can do it once reparation has completed using the merging operation). Last, file filtering is not allowed during archive repairing.
During the repairing operation, the repaired archive may have a different slicing (-s and -S options), a different encryption (-K and associated options, including gpg encryption and signing), a different repository slices permissions and ownership (--slice-mode option), user comment (--user-comment), generated hash (--hash) and min digits in slice number (--min-digits), but compression cannot be changed and tape marks cannot be removed (you can do it once repair has completed using the merging operation). Last, file filtering is not allowed during archive repairing.
.RE
.TP 20
-h, --help
Expand Down Expand Up @@ -1150,7 +1150,7 @@ option.
Since release 2.6.0 a new entry status ("inode-only") has been added. Dar can now re-save only metadata when the inode change does not concern the data. To know whether the data has changed or not, by default (no --modified-data-detection option given) dar looks at mtime and at file's size only. Specifying --modified-data-detection=mtime-and-size (which is the default behavior) can be used to revert the action of --modified-data-detection=any-inode-change for example when playing with included files (DCF files): the latest met takes precedence.
.TP 20
-T, --kdf-param <integer>[:<hash algo>]
At the difference of the listing context (see below), in the context of archive creation, merging, isolation and reparation, -T option let you define the iteration count used to derive the archive key from the passphrase you provided (archive encryption context) and the hash algorithm used for that derivation. -T has another older meaning when doing archive listing, but due to the lack of free character to create a new CLI option, there was no other choice than recycling an existing option not used in the context of archive creation/merging/isolation. The consequence is that the -T option must appear after the -+/-c/-C/-y options for the operational context to be known at the time the -T option is met and its --kdf-param meaning to be taken into account. As --kdf-param is an alias to -T, this long form of this option must also be found after the use of either -c, -C or -+ option.
At the difference of the listing context (see below), in the context of archive creation, merging, isolation and repair, -T option let you define the iteration count used to derive the archive key from the passphrase you provided (archive encryption context) and the hash algorithm used for that derivation. -T has another older meaning when doing archive listing, but due to the lack of free character to create a new CLI option, there was no other choice than recycling an existing option not used in the context of archive creation/merging/isolation. The consequence is that the -T option must appear after the -+/-c/-C/-y options for the operational context to be known at the time the -T option is met and its --kdf-param meaning to be taken into account. As --kdf-param is an alias to -T, this long form of this option must also be found after the use of either -c, -C or -+ option.
.P
.RS
Without --kdf-param the KDF fonction uses 200,000 iterations for md5, sha1 and sha512 (PBKDF2 from PKCS#5 v2) but only 10,000 for argon2. If libargon2 is present, this is the default hash algorithm, else sha1 is used with PBKDF2. Valid parameters are "sha1", "sha512", "md5" and "argon2" for the hash algorithms and a value greater than 1 for the iteration count. However it is advise to use a value equal or greater to the default values mentionned previously. The suffixes described for -s option are also available here (k, M, G, T, P, ...) however pay attention to the -aSI/-abinary mode which default to binary, in which case "-T 1k" is equivalent to "-T 1024". Example of use: --kdf-param 20k:argon2
Expand Down
29 changes: 16 additions & 13 deletions src/build/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@ from 2.7.x to 2.8.0
from 2.7.15 to 2.7.16
- fixed mask building of path exclusion (dar's -P option) when used with
regular expression (problem met while testing or merging a backup)
- adding support for progressive report to reparing operation at API level
- adding support for progressive report to repairing operation at API level
- warning before processing to the backup if gnupg signatories are provided
without any gnupg recipient.
- fixing bug reporting the following message:
"Subtracting an "infinint" greater than the first, "infinint" cannot be negative
which was due to duplicated counter decrement while merging two archives and
overwriting policy drives entry to be removed from the resulting archive adding
to that, the very specific/rare condition where the number of removals exceeds
more than the half of kept entries...
- adding kdf support for repairing operation instead of using the values of the
archive/backup under reparation.
- fixing bug in thread_cancellation class that led a cancelled thread kept
being recorded as cancelled forever, leading libdar to abort immediately when
run in a new thread having the the same tid.
- fixing bug in libdar leading an API call to return zero instead of the total
size of the backup/archive (not use in dar CLI).
/Subtracting an "infinint" greater than the first, "infinint" cannot be
negative/. This was due to duplicated counter decrement while merging two
archives and overwriting policy drives entry to be removed from the
resulting archive adding to that, the very specific/rare condition where
the number of removals exceeds more than the half of kept entries...
- adding kdf support for repairing operation instead of using the values of
the archive/backup under reparation.
- fixing bug in thread_cancellation class that led a canceled thread kept
being recorded as canceled forever, leading libdar to abort immediately
when run in a new thread having the the same tid.
- fixing bug in libdar leading an API call to return zero instead of the
total size of the backup/archive (not use in dar CLI).
- applying patch from Gentoo about the "which" command replacement in
scripts
- fixing some non-initialized variables as reported by cppcheck tool.

from 2.7.14 to 2.7.15
- updating libdar about CURLINFO_CONTENT_LENGTH_DOWNLOAD symbol which is
Expand Down
4 changes: 2 additions & 2 deletions src/build/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.69)
AC_INIT([DAR], [2.7.15_no_last_slice], [[https://github.com/Edrusb/DAR/issues]])
AC_INIT([DAR], [2.7.16_no_last_slice], [[https://github.com/Edrusb/DAR/issues]])
AC_CONFIG_HEADERS([config.h])
AC_LANG([C++])
AC_CONFIG_SRCDIR([src/libdar/catalogue.cpp])
Expand Down Expand Up @@ -1844,7 +1844,7 @@ AS_IF( [ test "x$enable_threadar" != "xyes" ],
[
# for libthreadar before release 1.5.1;
AC_CHECK_LIB(threadar, [for_autoconf], [], [])
# ofr libthreadar since release 1.5.1:
# for libthreadar since release 1.5.1:
AC_CHECK_LIB(threadar, [libthreadar_for_autoconf], [], [])
])
CPPFLAGS__cache="$CPPFLAGS"
Expand Down
2 changes: 1 addition & 1 deletion src/check/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ compressible_file: bnonzero
./bnonzero compressible_file 1 2048

uncompressible_file:
bzip2 -c9 < `which sh` > uncompressible_file
bzip2 -c9 < $(SHELL) > uncompressible_file
4 changes: 1 addition & 3 deletions src/check/build_tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ mkdir "$1"
cd "$1"

echo "this is the content of a plain file" > plain_file.txt
if [ -x `which chattr` ] ; then
chattr +cdS plain_file.txt
fi
chattr +cdS plain_file.txt 2> /dev/null || true
setfattr -n user.coucou -v hello plain_file.txt

mkdir "$SUB1"
Expand Down
2 changes: 1 addition & 1 deletion src/libdar/archive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace libdar
const std::string & filename,
const std::string & extension,
const archive_options_merge & options,
statistics * progressive_report);
statistics* progressive_report);

/// this constructor create a new archive from a damaged one [this is the "repair" constructor]

Expand Down
4 changes: 2 additions & 2 deletions src/libdar/libdar5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ namespace libdar5
/// libdar Major version defined at compilation time
const U_I LIBDAR_COMPILE_TIME_MAJOR = 5;
/// libdar Medium version defined at compilation time
const U_I LIBDAR_COMPILE_TIME_MEDIUM = 201;
const U_I LIBDAR_COMPILE_TIME_MEDIUM = 202;
/// libdar Minor version defined at compilation time
const U_I LIBDAR_COMPILE_TIME_MINOR = 7;
const U_I LIBDAR_COMPILE_TIME_MINOR = 0;

////////////////////////////////////////////////////////////////////////
// LIBDAR INITIALIZATION METHODS //
Expand Down
2 changes: 1 addition & 1 deletion src/libdar/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ namespace libdar
const map<char, string> & corres)
{
string ret = "";
string::iterator it = const_cast<string &>(hook).begin();
string::const_iterator it = hook.begin();

while(it != hook.end())
{
Expand Down
4 changes: 2 additions & 2 deletions src/libdar/zapette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ namespace libdar
infinint zapette::get_first_slice_header_size() const
{
infinint ret;
S_I tmp;
S_I tmp = 0;

if(is_terminated())
throw SRC_BUG;
Expand Down Expand Up @@ -251,7 +251,7 @@ namespace libdar
{
infinint not_used;
U_16 pas;
S_I ret;
S_I ret = 0;

do
{
Expand Down

0 comments on commit 6af52f2

Please sign in to comment.