Sergey Poznyakoff
6f6864df13
(try_purge_directory): Ensure that arguments to T and R are safe.
2007-10-03 20:18:32 +00:00
Sergey Poznyakoff
1ef212d0fb
(obstack_code_rename): Apply safer_name_suffix to name arguments before storing them in T and R records. Reported by Nicholas Cole.
2007-09-29 00:47:59 +00:00
Sergey Poznyakoff
63e835f5c0
New option --exclude-vcs
...
(exclude_vcs_files): New function
2007-09-26 22:08:36 +00:00
Sergey Poznyakoff
efe6609cd9
(struct directory): New member tagfile
...
(make_directory): Initialize tagfile to NULL
(procdir): New argument: entry
Hanlde exclusion tags.
(makedumpdir): Take into account directory->tagfile.
(scan_directory): Hanlde exclusion tags.
2007-09-26 22:08:13 +00:00
Sergey Poznyakoff
b0d5935cb0
(exclusion_tag_warning, check_exclusion_tags): Remove static qualifier.
...
(check_exclusion_tags): account for dirname without terminating
slash.
(dump_dir0): exclusion_tag_all is handled elsewhere.
2007-09-26 22:07:44 +00:00
Sergey Poznyakoff
a1b1b7cc8a
(exclusion_tag_warning, check_exclusion_tags): New prototypes
2007-09-26 22:06:43 +00:00
Sergey Poznyakoff
c485b7984d
(apply_nonancestor_delayed_set_stat): Rename st->sb to avoid shadowing another local.
2007-08-26 09:01:38 +00:00
Sergey Poznyakoff
d769b724f4
(diff_dumpdir): Rename stat->stat_data to avoid shadowing the syscall.
2007-08-26 09:01:08 +00:00
Sergey Poznyakoff
a0eb52da3f
(check_exclusion_tags): Remove declaration of unused local, "ret".
2007-08-26 08:59:28 +00:00
Sergey Poznyakoff
87ac3207fb
Don't include <getline.h>. No longer needed.
2007-08-26 08:59:08 +00:00
Sergey Poznyakoff
7c0b81cbb9
(check_compressed_archive): Detect files smaller than 512 bytes.
2007-08-24 12:07:32 +00:00
Sergey Poznyakoff
e2b8c8fa9f
(contains_dot_dot): Fix double-dot recognition in case of duplicate /. Patch by Dmitry V. Levin.
2007-08-12 08:25:00 +00:00
Sergey Poznyakoff
a0fb51e136
Relicense under GPLv3
2007-06-27 13:30:12 +00:00
Sergey Poznyakoff
fe576585e6
(decode_xform): Exempt symbolic links from component
...
stripping and name suffix normalization.
2007-06-01 21:24:30 +00:00
Sergey Poznyakoff
080a6b2ac5
Update calls to transform_member_name
2007-06-01 21:24:08 +00:00
Sergey Poznyakoff
f236f33643
(xform_type): New data type
...
(transform_member_name): Last argument is of xform_type type
All callers updated
2007-06-01 21:23:53 +00:00
Sergey Poznyakoff
967fcb9318
(decx): Unknown pax keywords produce a warning,not error.
2007-05-30 19:15:17 +00:00
Paul Eggert
12b3a5d5b1
* src/misc.c (set_file_atime): Use gl_futimens, not futimens,
...
due to gnulib change.
SCALAR(0x828a248)
SCALAR(0x828a404)
2007-05-29 16:48:23 +00:00
Sergey Poznyakoff
250db35f17
Global extended_header removed, use new xheader calls instead.
2007-05-19 17:03:28 +00:00
Sergey Poznyakoff
6f929b2c89
(buffer_write_global_xheader): New function
...
Update to use new xheader calls.
2007-05-19 17:03:01 +00:00
Sergey Poznyakoff
64cddf2fbc
(xheader_init): New function
...
(xheader_decode_global,xheader_store,xheader_read)
(xheader_write_global,xheader_write,xheader_string_begin)
(xheader_string_add,xheader_string_end): Take xhdr as first
argument.
2007-05-19 17:02:46 +00:00
Sergey Poznyakoff
ccdbafb276
(struct xheader): New definition
...
(struct tar_stat_info): New member xhdr (extended header).
2007-05-19 17:02:29 +00:00
Sergey Poznyakoff
bd222d606a
(buffer_write_global_xheader): New function
...
(struct xheader): Move definition to tar.h
(extended_header): Remove global
(xheader_init): New function
(xheader_decode_global,xheader_store,xheader_read)
(xheader_write_global,xheader_write,xheader_string_begin)
(xheader_string_add,xheader_string_end): Take xhdr as first
argument.
2007-05-19 17:02:13 +00:00
Sergey Poznyakoff
17ef61b2fd
(dump_file0): Original ctime cannot be used as a directory change indicator if --remove-files is given.
2007-05-18 08:22:21 +00:00
Paul Eggert
f32828d577
Adjust to latest Gnulib.
...
* lib/.cvsignore: Add dirfd.c, dirfd.h, float+.h, mbscasecmp.c,
stdio.h, stdio_.h, stdlib.h, stdlib_.h, time.h, time_.h, unistd.h.
Remove exit.h, getcwd.h, mempcpy.h, memrchr.h, mkdtemp.h, stpcpy.h,
strcase.h, strchrnul.h, strdup.h, strndup.h, strnlen.h, time_r.h,
vsnprintf.h.
* m4/.cvsignore: Remove localedir.h. Sort.
2007-04-13 00:51:07 +00:00
Sergey Poznyakoff
ca856c2585
(main): Don't call closeopen.
2007-04-03 21:52:42 +00:00
Sergey Poznyakoff
18641602c1
Don't include <sys/time.h>, <sys/resource.h>; no longer needed.
2007-04-03 21:52:20 +00:00
Sergey Poznyakoff
8bdbc08a89
(closeopen): Remove decl.
2007-04-03 21:52:01 +00:00
Sergey Poznyakoff
5d4f057e31
(sys_exec_info_script): Store the inter-communication fd in the environment variable TAR_FD
2007-04-03 21:38:00 +00:00
Sergey Poznyakoff
d989864712
(main): Move closeopen after decode_options to allow shell process substitution to work.
2007-04-03 12:18:40 +00:00
Sergey Poznyakoff
983d328ff2
Restore accidentally deleted lines
2007-03-30 19:28:22 +00:00
Sergey Poznyakoff
586c684815
(transform_name_fp): Change signature. All callers updated.
2007-03-30 19:20:52 +00:00
Sergey Poznyakoff
bbf7dec45e
Fix indentation
2007-03-30 19:19:56 +00:00
Sergey Poznyakoff
ebc522d521
(all_names_found): Remove check for matching_flags.
2007-03-30 19:18:35 +00:00
Sergey Poznyakoff
ad85f632c6
(transform_member_name): New function
...
(decode_header): Use transform_member_name
2007-03-30 19:18:24 +00:00
Sergey Poznyakoff
062b37115f
(extract_link, extract_symlink): Use
...
transform_member_name instead of safer_name_suffix so that
--transform and --strip-components affect links as well.
2007-03-30 19:18:10 +00:00
Sergey Poznyakoff
6261c58ae8
(transform_name_fp): Change signature
...
(transform_member_name): New function
2007-03-30 19:17:44 +00:00
Sergey Poznyakoff
1d26fff0f3
Do not include mkdtemp.h
2007-03-30 08:50:08 +00:00
Paul Eggert
5c890a6003
Adjust to recent gnulib changes.
...
* lib/.cvsignore: Add fchownat.c, rmt-command.h, strerror.c, string.h,
string_.h, sys, sys_time_.h, unistd_.h, wchar_.h, wctype_.h.
Remove localedir.h, size_max.h, xsize.h.
* src/xheader.c: Don't include stpcpy.h; no longer needed, now that
gnulib string.h defines stpcpy on all platforms.
2007-01-26 23:02:40 +00:00
Sergey Poznyakoff
66e9b9cd6c
New options --exclude-caches-all, --exclude-caches-under, --exclude-tag-all, --exclude-tag-under
2007-01-23 10:25:21 +00:00
Sergey Poznyakoff
b9588c4722
(struct exclude_tag): rename to exclusion_tag
...
(check_exclusion_tags): New function
(cachedir_file_p): New function (from check_cache_directory)
(dump_dir0,dump_file0): Use check_exclusion_tags
2007-01-23 10:25:06 +00:00
Sergey Poznyakoff
9a41b3b3db
(exclude_caches_option): Remove
...
(enum exclusion_tag_type): New data type
(add_exclude_tag): Rename to add_exclusion_tag
(cachedir_file_p): New prototype
2007-01-23 10:24:43 +00:00
Sergey Poznyakoff
99527fa17b
(sparse_skip_file,pax_dump_header_1)
...
(pax_decode_header): Keep track of the number of bytes written.
2007-01-19 15:42:26 +00:00
Sergey Poznyakoff
1a1cfaafa6
(list_dumpdir): Minor fixes.
2007-01-04 20:05:32 +00:00
Sergey Poznyakoff
445d95be07
(diff_dumpdir): Compare directory contents using
...
dumpdir_cmp. Do not free dumpdir_buffer, it will leave the
incremental directory table in the inconsistent state and trigger
full dump.
(read_and_process): Process dumpdirs no matter what the archive
format.
2007-01-04 20:05:05 +00:00
Sergey Poznyakoff
e24d8574a8
(read_and_process): Fix type of "size"
2007-01-04 16:15:10 +00:00
Paul Eggert
8e3f3adf98
Port to Forte Developer 7 C 5.4 and C99.
...
* src/common.h (add_exclude_tag): Add decl; C99 requires this
and Forte warns about it.
* src/incremen.c: Include <mkdtemp.h> for mkdtemp prototype,
for same reason.
* src/misc.c (get_max_open_files): Rewrite to avoid code that
Forte C complains about as being unreachable.
* src/xheader.c (mtime_code): Rewrite to avoid Forte error
reported by Trond Hasle Amundsen.
* src/incremen.c (compare_dirnames): Rewrite to avoid casts.
* src/utf8.c (string_ascii_p): Likewise.
* src/xheader.c (mtime_coder, volume_size_coder, volume_offset_coder):
Likewise.
SCALAR(0x8283218)
2006-12-12 23:56:24 +00:00
Sergey Poznyakoff
cdb77dcd7b
(extract_file): Call skip_member if open fails.
...
Patch proposed by Jan-Benedict Glaw <jbglaw@lug-owl.de >
2006-12-07 14:33:54 +00:00
Sergey Poznyakoff
9bf87b195e
(dump_dir0): Move checks for exclude tags to
...
dump_file0.
(dump_dir): Move calls to ensure_slash to dump_file0
2006-12-07 14:33:42 +00:00
Paul Eggert
908d78d208
* NEWS: Fix some race conditions with tar -x --same-owner.
...
* src/extract.c (ARCHIVED_PERMSTATS): Add a comment saying that
S_IRWXG | S_IRWXO might be masked out.
(set_mode): Set the mode if some bits were masked out originally.
(set_stat): Don't chmod before chown, as that might temporarily
grant permissions that we don't want to grant. The chmod was
there only to work around broken hosts, so add a comment advising
users not to use those broken hosts instead.
(repair_delayed_set_stat, extract_dir):
Remember to mask out current umask before inverting permissions.
(extract_dir): If the owner might change, or if the mode has
special bits, create the directory 700 at first, but restore it later.
(open_output_file): New arg mode; all uses changed.
(extract_file, extract_node, extract_fifo): If the owner might
change, omit group and other bits at first, but restore them after
changing the owner.
2006-12-04 21:35:56 +00:00