Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to LibreSSL/OpenSSL EVP hash API #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PORTING
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ $DragonFly: src/bin/cpdup/PORTING,v 1.2 2008/04/11 17:33:11 dillon Exp $
cd cpdup
rm -f md5.c
rm -f *.o
cc -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOMD5 *.c -c
cc -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOMD5 *.o -o ~/bin/cpdup
cc -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOCHECKSUM *.c -c
cc -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOCHECKSUM *.o -o ~/bin/cpdup

BACKUP SCRIPT MODIFICATIONS - you will almost certainly have to adjust
the do_cleanup script to extract the proper field(s) from the df output.
Expand Down
43 changes: 29 additions & 14 deletions cpdup.1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
.Nm
.Op Fl C
.Op Fl v Ns Op Cm v Ns Op Cm v
.Op Fl c
.Op Fl d
.Op Fl n
.Op Fl u
Expand Down Expand Up @@ -73,6 +74,27 @@ modifications made to the destination.
.Fl vvv
will cause all files and directories to be reported whether or not
modifications are made.
.It Fl c Ar digest
Generate and maintain a checksum file using the specified message
.Ar digest
called
.Pa \&.DIGEST.CHECKSUMS
in each directory on the source where
.Pa DIGEST
is replaced by the upperscale name of the message digest used.
An alternate file name may be specified with the
.Fl M Ar file
option. Supported are all localy available OpenSSL
.Xr EVP 7
message digests, e.g. md5, rmd160, sha1, sha256 or sha512.
A checksum check is done on each file of the destination when the destination
appears to be the same as the source. If the check fails,
the source is recopied to the destination. When you specify a destination
directory, the checksum file is only updated as needed and may not be updated
even if modifications are made to a source file. If you do not specify a
destination directory the
.Nm
command forcefully regenerates the checksum for every file in the source.
.It Fl d
Print directories as they are being traversed.
Useful to watch the progress;
Expand Down Expand Up @@ -120,21 +142,14 @@ Quiet operation.
.It Fl o
Do not remove any files, just overwrite/add.
.It Fl m
Generate and maintain a MD5 checkfile called
.Pa \&.MD5.CHECKSUMS
in each directory on the source
and do an MD5 check on each file of the destination when the destination
appears to be the same as the source. If the check fails,
the source is recopied to the destination. When you specify a destination
directory, the MD5 checkfile is only updated as needed and may not be updated
even if modifications are made to a source file. If you do not specify a
destination directory the
.Nm
command forcefully regenerates the MD5 checkfile for every file in the source.
.It Fl M Ar file
Works the same as
.Fl m
but allows you to specify the name of the MD5 checkfile.
.Fl c Ar md5
for compatibility purposes
.It Fl M Ar file
allows you to specify the name of the checksum file generated by options
.Fl c
or
.Fl m.
.It Fl H Ar path
.Nm
will create a hardlink from a file found under
Expand Down
Loading