2024-01-14  Sergey Poznyakoff  <gray@gnu.org>

	Version 2.15

	Upgrade gnulib

	Upgrade copyright years

2023-05-23  Sergey Poznyakoff  <gray@gnu.org>

	Version 2.14.90

2023-05-18  Sergey Poznyakoff  <gray@gnu.org>

	Fix operation of --no-absolute-filenames --make-directories

	* src/copyin.c (symlink_placeholder): Try to create leading
	directories if unable to create placeholder.

2023-05-18  Sergey Poznyakoff  <gray@gnu.org>

	Upgrade paxutils

2023-05-17  Sergey Poznyakoff  <gray@gnu.org>

	Restore access and modification times of symlinks in copy-in
	and copy-pass modes.

	* gnulib.modules: Replace utimens with fdutimensat.
	* paxutils: Upgrade.
	* src/copyin.c: Update calls to set_file_times.
	(copyin_link,replace_symlink_placeholders): Call set_file_times
	if needed.
	* src/copyout.c: Update calls to set_file_times.
	* src/copypass.c (process_copy_pass): Update calls to
	set_file_times.
	Call set_file_times to restore times of extracted symlinks.
	* src/extern.h (set_file_times): Take additional argument.
	* src/util.c
	(set_file_times): Take additional argument.  Use fdutimensat to
	do the
	job.
	* tests/linktime.at: New file.
	* tests/linktime01.at: New file.
	* tests/Makefile.am: Add new files.
	* tests/testsuite.at: Include new tests.

2023-05-11  Sergey Poznyakoff  <gray@gnu.org>

	configure: Include needed header for major/minor macros

	This helps in avoiding the warning about implicit function
	declaration
	which is elevated as error with newer compilers e.g. clang 16

2023-05-01  Sergey Poznyakoff  <gray@gnu.org>

	Version 2.14

2023-04-29  Sergey Poznyakoff  <gray@gnu.org>

	Update NEWS

2023-04-28  Paul Eggert  <eggert@cs.ucla.edu>

	Use GNU ls algorithm for deciding timestamp format

	Problem reported by Dan Jacobson (Bug#50694).

	* gnulib.modules: Add gettime, timespec.
	* src/copyin.c: Include timespec.h.
	(current_time): Now struct timespec, not time_t.  All uses
	changed.
	(long_format): When formatting a timestamp, use the same
	algorithm that
	GNU ls does to decide whether a file is recent.

2023-04-28  Paul Eggert  <eggert@cs.ucla.edu>

	Fix integer overflows in timestamp output

	* src/copyin.c (long_format): Fix some unlikely integer overflow
	bugs.
	Work even if (current_time - when) overflows, which is
	possible if time_t is unsigned.
	Do not assume that system integer types fit into unsigned long.
	Simplify by using %ju.	No need for local tbuf array.

2023-04-28  Sergey Poznyakoff  <gray@gnu.org>

	Whitespace cleanup

	Update version of gnulib

2023-04-28  Sergey Poznyakoff  <gray@gnu.org>

	Fix appending to archives bigger than 2G

	* src/extern.h (last_header_start): Change type to off_t.
	* src/global.c: Likewise.
	* src/util.c (prepare_append): Use off_t for file offsets.

2023-04-28  Sergey Poznyakoff  <gray@gnu.org>

	Fix combination of --create, --append, --directory

	In copy-out mode, when appending, change_dir() would be called
	twice,
	because process_copy_in() calls change_dir().  If --directory=DIR
	was
	used with a relative path, this would result in incorrectly
	trying to
	change to DIR/DIR.  To fix this, change_dir() is only called
	explicitly when not appending.

	Patch by Alyssa Ross <hi@alyssa.is>

	* src/copyout.c (process_copy_out): Don't call change_dir if
	append_flag is set: it is going to be called by process_copy_in.

2023-04-28  Sergey Poznyakoff  <gray@gnu.org>

	New option --ignore-dirnlink

	Thus option is valid in copy-out mode.	It instructs cpio
	to always
	assume link count for directories to be 2.  It is implied by
	--reproducible.

	* NEWS: Document changes.
	* doc/cpio.1: Likewise.
	* doc/cpio.texi: Likewise.
	* src/copyout.c (process_copy_out): If ignore_dirnlink_option
	is set,
	assume c_nlink is 2.
	* src/extern.h (ignore_dirnlink_option): New extern.
	* src/global.c (ignore_dirnlink_option): New global.
	* src/main.c: New option --ignore-dirnlink.
	The option --reproducible implies --ignore-dirnlink.

2023-04-28  Sergey Poznyakoff  <gray@gnu.org>

	Fix 45b0ee2b407913c533f7ded8d6f8cbeec16ff6ca.

	The commit in question brought in more problems than solutions.
	To
	properly fix the issue, use symlink placeholders, modelled after
	delayed symlinks in tar.

	* src/copyin.c (symlink_placeholder)
	(replace_symlink_placeholders): New functions.
	(copyin_link): Create symlink placeholder if
	--no-absolute-filenames
	was given.
	(process_copy_in): Replace placeholders after extraction.
	* tests/CVE-2015-1197.at: Update. Don't use /tmp.

2023-04-27  Sergey Poznyakoff  <gray@gnu.org>

	Require automake 1.16.5

2023-04-27  Sergey Poznyakoff  <gray@gnu.org>

	Update for newer autotools

	* am/pack.m4: Don't use obsolete macros.
	* configure.ac: Likewise.
	Require autoconf 2.71
	* paxutils: Upgrade.
	* src/extern.h (STRINGIFY_BIGINT, UINTMAX_STRSIZE_BOUND):
	New definitions.
	(parse_user_spec): Change signature.
	* src/main.c: Update call to parse_user_spec.
	* src/idcache.c: Include extern.h
	* src/userspec.c: Likewise.

2023-04-07  Sergey Poznyakoff  <gray@gnu.org>

	Fix calculation of CRC in copy-out mode.

	* src/copyout.c (read_for_checksum): Fix type of the file_size
	argument.
	Rewrite the reading loop.

	Original patch by Stefano Babic <sbabic@denx.de>

2023-01-22  Sergey Poznyakoff  <gray@gnu.org>

	Upgrade gnulib

	Update copyright years

2022-02-13  Sergey Poznyakoff  <gray@gnu.org>

	Fix wording in the manpage

2022-01-02  Sergey Poznyakoff  <gray@gnu.org>

	Update copyright years

2021-09-03  Shreenidhi Shedi  <sshedi@vmware.com>

	Remove redundant condition check

	* src/util.c (tape_empty_output_buffer): Fix condition.

2021-09-03  Sergey Poznyakoff  <gray@gnu.org>

	Use inttostr to represent integer values as strings

	* gnulib.modules: Request inttostr
	* src/idcache.c (getuser,getgroup): Use umaxtostr instead
	of sprintf.
	* src/userspec.c (parse_user_spec): Likewise.

2021-08-18  Sergey Poznyakoff  <gray@gnu.org>

	Fix dynamic string reallocations

	* src/dstring.c (ds_resize): Take additional argument: number of
	bytes to leave available after ds_idx.	All uses changed.

2021-08-11  Sergey Poznyakoff  <gray@gnu.org>

	Fix previous commit

	* src/dstring.c (ds_reset,ds_concat): Don't call ds_resize in a
	loop.

2021-08-07  Sergey Poznyakoff  <gray@gnu.org>

	Rewrite dynamic string support.

	* src/dstring.c (ds_init): Take a single argument.
	(ds_free): New function.
	(ds_resize): Take a single argument.  Use x2nrealloc to expand
	the storage.
	(ds_reset,ds_append,ds_concat,ds_endswith): New function.
	(ds_fgetstr): Rewrite.	In particular, this fixes integer
	overflow.
	* src/dstring.h (dynamic_string): Keep both the allocated length
	(ds_size) and index of the next free byte in the string (ds_idx).
	(ds_init,ds_resize): Change signature.
	(ds_len): New macro.
	(ds_free,ds_reset,ds_append,ds_concat,ds_endswith): New protos.
	* src/copyin.c: Use new ds_ functions.
	* src/copyout.c: Likewise.
	* src/copypass.c: Likewise.
	* src/util.c: Likewise.

2021-03-24  Sergey Poznyakoff  <gray@gnu.org>

	Improve online version of the documentation.

2021-01-08  Sergey Poznyakoff  <gray@gnu.org>

	Update gnulib

	* NEWS: Raise version number.
	* configure.ac: Raise version number to 2.13.90.
	Raise autoconf and automake requirements.
	* gnulib: Pull v0.1-4336-gbdae9a5
	* gnulib.modules: Remove getopt
	* src/copyin.c (long_format): Cast rdev numbers to unsigned long

2021-01-06  Sergey Poznyakoff  <gray@gnu.org>

	Update copyright years

2020-09-18  Sergey Poznyakoff  <gray@gnu.org>

	Formatting changes in the documentation.

	* doc/cpio.1: Fix typos.
	* doc/cpio.texi: Consistently use proper Texinfo markup fo
	commands,
	files, and sample text fragments.

2020-02-08  Sergey Poznyakoff  <gray@gnu.org>

	Update copyright years

2020-01-20  Sergey Poznyakoff  <gray@gnu.org>

	Minor fix * src/global.c: Remove superfluous declaration of
	program_name

2019-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix handling of device numbers (part 2)

	Previously the members of cpio_file_stat that hold device
	major and
	minor numbers were signed (long).  This caused issues when
	the device
	number was cast to unsigned value (uintmax_t) during a call to
	to_ascii or derived function.  In particular, on *BSD systems
	minor
	numbers are negative ints.  When such numbers are passed to
	to_ascii,
	the resulting unsigned representation does not fit into the target
	field width.  For details, see

	  https://lists.gnu.org/archive/html/bug-cpio/2019-11/msg00012.html

	To fix this, the return types are autodetected by configure.
	The types
	of the c_dev_maj, c_dev_min, c_rdev_maj, and c_rdev_min members of
	struct cpio_file_stat are changed to unsigned versions of the
	corresponding detected types.  This ensures that the value
	returned from
	major (or minor) will not undergo sign extension during assignment
	to the
	struct member and can be correctly promoted to a wider unsigned
	data
	type.

	* am/ax_compile_check_rettype.m4: New macro
	AC_COMPILE_CHECK_RETTYPE
	* configure.ac: Detect return types of major(3) and minor(3).
	* src/cpiohdr.h (cpio_file_stat): Change types of c_dev_maj,
	c_dev_min,
	c_rdev_maj, c_rdev_min.

2019-11-14  Sergey Poznyakoff  <gray@gnu.org>

	Fix handling of device numbers on copy out.

	Device minor and major numbers are meaningful only for devices.
	Don't attempt to store them for other files.  Instead fill the
	corresponding fields with zeros.

	* src/util.c (stat_to_cpio): Initialize c_rdev_maj  and c_rdev_min
	from struct stat only if the file is a device, otherwise set them
	to zero.

2019-11-08  Sergey Poznyakoff  <gray@gnu.org>

	Improve 684b7ac5

	* src/copyin.c (read_name_from_file): Handle len == 0.

2019-11-08  Sergey Poznyakoff  <gray@gnu.org>

	Fix cpio header verification.

	* src/copyin.c (read_name_from_file): Print error message and
	skip file if its name is not nul-terminated.

2019-11-06  Sergey Poznyakoff  <gray@gnu.org>

	Version 2.13

	* NEWS: Describe new version.
	* configure.ac: version 2.13
	* src/copyin.c: Fix strict aliasing violation.
	* tests/CVE-2019-14866.at: New file.
	* tests/Makefile.am: Add new test.
	* tests/testsuite.at: Add new test,

2019-11-04  Sergey Poznyakoff  <gray@gnu.org>

	Various fixes

	* doc/cpio.texi: Document URLs of the mailing list archive and
	subscription interface.
	* src/copyin.c (try_existing_file): Change type of the last
	argument.
	(copyin_file): Initialize existing_dir.
	* src/dstring.c: Include xalloc.h
	* src/filemode.c (mode_string): mode is unsigned int.

2019-11-04  Sergey Poznyakoff  <gray@gnu.org>

	Get rid of the unnecessary workaround.

2019-11-04  Sergey Poznyakoff  <gray@gnu.org>

	Don't repeat the help reference message.

	* src/main.c (process_args): Don't specify the "Try cpio --help"
	message explicitly. It is added automatically by the USAGE_ERROR
	macro.

2019-11-04  Sergey Poznyakoff  <gray@gnu.org>

	Fix CVE-2019-14866

	* src/copyout.c (to_ascii): Additional argument nul controls
	whether
	to add the terminating nul character.
	(field_width_error): Improve diagnostics: print the actual and the
	maximum allowed field value.
	* src/extern.h (to_ascii, field_width_error): New prototypes.
	* src/tar.c (to_oct): Remove.
	(to_oct_or_error): New function.
	(TO_OCT): New macro.
	(write_out_tar_header): Use TO_OCT and to_ascii. Return 0 on
	success, 1 on error.

2019-11-03  Sergey Poznyakoff  <gray@gnu.org>

	Fix CVE-2015-1197

	* src/copyin.c (copyin_link): Force safer name suffix for
	symbolic links.
	* tests/CVE-2015-1197.at: New file.
	* tests/Makefile.am: Add new test case.
	* tests/testsuite.at: Likewise.

2019-11-03  Sergey Poznyakoff  <gray@gnu.org>

	Provide functions for struct cpio_file_stat management.

	* src/copyin.c (long_format): Mark unchangeable argument as const.
	(read_name_from_file): Use cpio_realloc_c_name.
	(process_copy_in): Use CPIO_FILE_STAT_INITIALIZER.
	Call cpio_file_stat_free before return.
	* src/copyout.c (process_copy_out): Likewise.
	* src/copypass.c (link_to_name): Mark unchangeable argument
	as const.
	* src/cpiohdr.h (cpio_file_stat) <c_name_buflen>: New member,
	<c_tar_linkname>: Mark as const.
	(CPIO_FILE_STAT_INITIALIZER): New define.
	(cpio_file_stat_init,cpio_file_stat_free)
	(cpio_realloc_c_name): New protos.
	* src/extern.h: Fix prototypes.
	* src/makepath.c (make_path): Mark unchangeable argument as const.
	* src/util.c (create_all_directories): Mark unchangeable argument
	as const.
	(cpio_realloc_c_name): New function.
	(cpio_set_c_name): Use cpio_realloc_c_name.
	(cpio_file_stat_init,cpio_file_stat_free): New functions.

2019-11-03  Sergey Poznyakoff  <gray@gnu.org>

	Remove HPUX CDF support

2019-01-15  Sergey Poznyakoff  <gray@gnu.org>

	Minor fix in the testsuite

	* tests/symlink-long.at: Use m4 to create dirname, instead of
	using bash-specific syntax.

2018-12-01  Sergey Poznyakoff  <gray@gnu.org>

	Minor fixes

	* src/copyin.c: Remove unused variable.
	* src/util.c: Cast arguments to printf.

2018-12-01  Sergey Poznyakoff  <gray@gnu.org>

	Fix sigfault when appending to archive

	Bug reported by Ross Burton. See
	<http://lists.gnu.org/archive/html/bug-cpio/2018-11/msg00000.html>

	* src/util.c: Keep static copy of the buffer pointer; always
	assign it to file_hdr->c_name. Use x2realloc for memory
	management.

2018-06-21  Sergey Poznyakoff  <gray@gnu.org>

	Fix man markup

2017-04-14  Pavel Raiskup  <praiskup@redhat.com>

	CVE-2016-2037 - 1 byte out-of-bounds write

	Ensure that cpio_safer_name_suffix always works with dynamically
	allocated buffer, and that it has size of at least 32 bytes.
	Then, any call to cpio_safer_name_suffix is safe (it requires at
	least 2 bytes in the buffer).

	Also ensure that c_namesize is always correctly initialized (by
	cpio_set_c_name) to avoid undefined behavior when reading
	file_hdr.c_namesize (previously happened for tar archives).

	References:
	http://www.mail-archive.com/bug-cpio@gnu.org/msg00545.html

	* src/copyin.c (query_rename): Drop the hack, as we now work with
	dynamically allocated buffer.  Use cpio_set_c_name.
	(create_defered_links_to_skipped): Use cpio_set_c_name rather than
	manual assignment.
	(read_name_from_file): New function to avoid C&P.
	(read_in_old_ascii, read_in_new_ascii, read_in_binary): Use
	read_name_from_file.
	(process_copy_in): Initialize file_hdr.c_namesize.
	* src/copyout.c (process_copy_out): Use cpio_set_c_name.
	* src/cpiohdr.h (cpio_set_c_name): New prototype.
	* src/tar.c (read_in_tar_header): Use cpio_set_c_name.
	* src/util.c (cpio_set_c_name): New function to set
	file_hdr->c_name and c_namesize from arbitrary string.
	(cpio_safer_name_suffix): Some docs fixes.
	* tests/inout.at: Also test copy-in, and try various formats.

2017-02-06  Pavel Raiskup  <praiskup@redhat.com>

	build: lint warnings in --device-independent

	Complements: 3945f9db44c935608caa5f0

	* src/util.c (find_inode_val): Drop unused variable.
	(get_inode_and_dev): Function doesn't return any value, drop the
	return value in definition.

2017-01-02  Sergey Poznyakoff  <gray@gnu.org>

	Update copyright years

2016-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix the output of UTF8 file names in verbose mode.

	* am/quoting.m4: New file.
	* configure.ac: Set default quoting style.
	* src/copyin.c (long_format): Use quotearg.
	(print_name_with_quoting): Remove.
	* src/extern.h (print_name_with_quoting): Remove proto.

2016-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update docs

	* doc/cpio.texi: Prominently mention, that --absolute-file-names
	is
	the default.
	* doc/cpio.1: Likewise.

2016-11-10  Mike Frysinger  <vapier@gentoo.org>

	fix enable_mt configure logic

	In the default case, the build_mt flag is not set.  This leads
	to an
	error at configure time like:
	./configure: line 26866: test: =: unary operator expected

	Change to use the variable name autoconf creates for us and
	quote it
	so we never get weird expansion errors.

2016-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update the THANKS file.

2016-11-10  grajagandev  <dmoorefo@gmail.com>

	Fix signed integer overflow - big block sizes

	Add test for signed integer overflow

2016-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix out-of-bounds read

	* src/copyin.c (process_copy_in): Skip records with zero filename
	length.

2016-06-16  Pavel Raiskup  <praiskup@redhat.com>

	bootstrap: fix bootstrap after clean clone

	* bootstrap.conf: Reintroduce changes added by
	c7e60954dc7945635194 and removed by cleanup in
	0396591026410f9.
	* lib/Makefile.am: Honor the ^pax prefix.
	* po/POTFILES.in: Likewise.

2015-09-12  Sergey Poznyakoff  <gray@gnu.org>

	Version 2.12

	Update docs, use gettext 0.19.6

2015-09-01  Sergey Poznyakoff  <gray@gnu.org>

	Fix generation of manual directory

	* doc/Makefile.am: Change 'manual' goal.
	* doc/gendocs.sh: New file.
	* doc/gendocs_template: ps output is not built.

2015-09-01  Sergey Poznyakoff  <gray@gnu.org>

	Remove not used files

	* headers/Makefile.am: Remove.
	* headers/fnmatch.h: Remove.
	* Makefile.am: Update.
	* configure.ac: Update.

2015-09-01  Sergey Poznyakoff  <gray@gnu.org>

	Include gnulib and paxutils as submodules.

	* gnulib: New submodule.
	* paxutils: New submodule.
	* .gitignore: Updage
	* .gitmodules: Update
	* README-hacking: Update.
	* bootstrap: Install slightly modified version from the gnulib
	repo.
	* bootstrap.conf: Add paxutils-related stuff.
	* po/.gitignore: Update.
	* tests/symlink-bad-length.at: Fix expected output.
	* src/copyin.c: Tiny change.
	* src/util.c: Likewise.

2014-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix symlink-bad-length test for 64-bit architectures.

	* src/util.c: Return non-zero exit code if EOF is hit prematurely.
	* tests/symlink-bad-length.at: Revert to original archive: there's
	no use testing for recovery, because that depends on the host
	architecture.  Don't test for exit code as well (same reason).
	Account for eventual warning messages.

2014-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix error recovery in copy-in mode

	* src/copyin.c (copyin_link): Fix null dereference.
	(read_in_header): Fix error recovery (bug introduced by
	27e0ae55).
	* tests/symlink-bad-length.at: Test error recovery.
	Catch various architecture-dependent error messages (suggested
	by Pavel Raiskup).

2014-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix typo

2014-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix

	* src/copyin.c (get_link_name): Fix range checking.
	* tests/symlink-bad-length.at: Change expected error message.

2014-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix memory overrun on reading improperly created link records.

	See
	http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html

	* src/copyin.c (get_link_name): New function.
	(list_file, copyin_link): use get_link_name

	* tests/symlink-bad-length.at: New file.
	* tests/symlink-long.at: New file.
	* tests/Makefile.am: Add new files.
	* tests/testsuite.at: Likewise.

2014-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	New options to create device and inode-independent archives.

	* src/util.c (inode_val): New member trans_inode
	(find_inode_val): New function.
	(find_inode_file): Rewrite using the above.
	(add_inode): Initialize the trans_inode member
	depending on the value of renumber_inodes_option.
	(get_inode_and_dev): New function.
	(stat_to_cpio): Use get_inode_and_dev.
	(arf_stores_inode_p): New function.
	* src/extern.h (renumber_inodes_option)
	(ignore_devno_option): New externs.
	* src/global.c (renumber_inodes_option)
	(ignore_devno_option): New variables.
	* src/main.c: Add new options.

	* NEWS: Document changes.
	* doc/cpio.1: Document new options.
	* doc/cpio.texi: Likewise.

2014-01-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix package name recognition in bootstrap.

	The script logic failed if AC_INIT was split among two lines.
	Reported
	by Pavel.

	* bootstrap (extract_package_name): Rewrite as m4 script to allow
	for multiline AC_INIT.

2014-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update copyright years.

2014-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Treat UID/GID as numeric if prefixed by + (-R option)

	The IDs supplied with the -R option are treated as numeric
	(without
	looking them up in the system database), when prefixed with +.
	This
	allows to force using numeric value if a user (group) with
	a numeric
	name exists in the database.

	Reported by Joshua Briefman <sirgatez@gmail.com>.

	* src/userspec.c (parse_user_spec): Use + as an indicator of
	a numeric UID/GID.
	* doc/cpio.1: Document changes.
	* doc/cpio.texi: Likewise.

2014-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Use exit codes consistenly.

2014-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve documentation.

	* .gitignore: Update.
	* NEWS: Update.
	* doc/cpio.1: Rewrite.
	* doc/cpio.texi: Major revamp.
	* src/main.c (options): Fix sectioning of the help output.
	(parse_opt):
	* src/util.c: Use PAXEXIT_FAILURE to indicate an error.

2014-01-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Distribute rmt.8; update build system

	* NEWS: Update.
	* bootstrap (gnulib_extra_files): Remove "missing"
	* configure.ac: Do not distribute shar archive.
	Define CPIO_MT_COND
	* doc/Makefile.am: Always install manpages (mt.1 and rmt.8 --
	depending on whether the corresponding programs are built).
	* doc/cpio.1: Update.
	* doc/mt.1: Update.
	* lib/Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
	* src/Makefile.am: Likewise.
	* tests/Makefile.am: Likewise.

2012-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>

	Always use 32 bit CRC

	* src/cpiohdr.h (cpio_file_stat) <c_chksum>: Change type to
	uint32_t.
	* src/extern.h (crc): Change type to uint32_t.
	* src/global.c: Likewise.
	* src/copyout.c (read_for_checksum): Return uint32_t.
	* src/copyin.c: Fix printf formats.

2011-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix error handling in disk_empty_output_buffer and sparse_write

	* src/extern.h (delayed_seek_count): Remove.
	(disk_empty_output_buffer): Change signature.
	* src/util.c (disk_empty_output_buffer): Take two arguments.
	Correctly handle partial writes (errno is not meaningful).
	(delayed_seek_count): Remove variable.
	(sparse_write): Change return type and signature.  Rewrite.
	Return number actual number of bytes written or -1 on error.
	Check returns from lseek and write.
	* src/copyin.c (copyin_regular_file): Call
	disk_empty_output_buffer
	with flush=true before closing the file.
	* src/copypass.c (process_copy_pass): Likewise.

2011-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes.

	* configure.ac: Use gettext 0.18
	* doc/.gitignore: Add parse-datetime.texi.
	* lib/Makefile.am (libpax_a_SOURCES): Add exit-status.c
	* src/copyin.c (read_pattern_file): Use open_fatal if opening
	pattern file failed.
	* src/util.c (set_file_times): Use fdutimens.

2010-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.

	* gnulib.modules: Add getline, required by rmt.
	* src/mt.c (fatal_exit): Change exit code to
	MT_EXIT_FAILURE.

2010-07-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix setstat testcases to work on Darwin.

	* tests/setstat01.at: Set write permission on the directory
	before attempting to rename it.
	* tests/setstat02.at: Likewise.

2010-07-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Housekeeping.

	* .gitignore: Sort.
	* src/cpiohdr.h: Fix indentation of preprocessor statements.
	* src/filetypes.h: Likewise.

2010-07-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve handling of -D in copy-pass mode.

	* gnulib.modules: Add xgetcwd.
	* src/copypass.c (process_copy_pass): Convert directory_name
	to absolute if -D option was given.

2010-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix bootstrapping.

	* bootstrap (symlink_to_dir): Fix symlink calculation.

2010-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fix.

	* src/filetypes.h: Remove declarations of stat and lstat.

2010-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes.

	* src/copyout.c (count_defered_links_to_dev_ino): Return size_t.
	(last_link): Do not use superfluous local variable.
	* src/util.c (copy_files_disk_to_tape)
	(copy_files_disk_to_disk): Shut down gcc warnings.

2010-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes

	* .gitignore: Update.
	* am/.gitignore: New file.
	* src/.gitignore: Add .gdbinit.
	* tests/symlink-to-stdout.at: Fix keywords.

2010-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Provide a tar-like --directory (-D) option.

	* src/copyin.c (process_copy_in): Call change_dir.
	* src/copyout.c (process_copy_out): Likewise.
	* src/copypass.c (process_copy_pass): Likewise.
	* src/extern.h (change_directory_option): New extern.
	(change_dir): New proto.
	* src/global.c (change_directory_option): New global.
	* src/main.c (options): New option --directory.
	(parse_opt): Handle the --directory option.
	* src/util.c (change_dir): New proto.

	* doc/cpio.texi: Document the --directory option.

2010-07-22  Dmitry V. Levin  <ldv@altlinux.org>

	Fix --to-stdout option support

	* src/copyin.c (copyin_link): Skip an appropriate number of bytes
	when to_stdout_option flag is set.
	* tests/symlink-to-stdout.at: New test case.
	* tests/Makefile.am (TESTSUITE_AT): Add symlink-to-stdout.at.
	* tests/testsuite.at: Include symlink-to-stdout.at.

2010-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Version 2.11

	* configure.ac, NEWS: Raise version number.

2010-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.

	* src/main.c (cpio_options): Remove unused options.
	* src/util.c (cpio_create_dir): Fix conditional.
	* NEWS: Update.

2010-02-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Use same code when creating directories in copy-in and copy-pass
	modes.

	* src/copyin.c (copyin_mkdir): Remove.
	(copyin_directory): Remove.
	(copyin_file): Use cpio_create_dir instead
	of copyin_directory.
	* src/copypass.c (process_copy_pass): Use cpio_create_dir
	to create directories.
	* src/extern.h (delay_cpio_set_stat): New proto.
	* src/util.c (delay_cpio_set_stat): New function.
	(delay_set_stat): Rewrite as a wrapper to the above.
	(cpio_create_dir): New function.
	* tests/setstat01.at: Fix testcase.
	* tests/setstat02.at: Likewise.
	* tests/setstat03.at: New testcase.
	* tests/setstat04.at: New testcase.
	* tests/setstat05.at: New testcase.
	* tests/Makefile.am: Add new testcases.
	* tests/testsuite.at: Likewise.

2010-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix inode number typing.

	* src/copyin.c (create_defered_links): Use ino_t for
	inode numbers.
	(create_defered_links_to_skipped): Likewise.
	(process_copy_in): Add typecast to inode fprintf argument.
	* src/copyout.c (count_defered_links_to_dev_ino)
	(writeout_other_defers): Use ino_t for inode numbers.
	* src/copypass.c (link_to_maj_min_ino): Likewise.
	* src/util.c (struct inode_val): Likewise.
	(find_inode_file, add_inode): Likewise.
	* src/extern.h (link_to_maj_min_ino)
	(find_inode_file, add_inode): Change signature.

2010-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve configuration suite.

	* configure.ac: Raise version number to 2.10.91.
	Require autotools 2.63/1.11.1.
	Create shar archive.
	Enable silent rules by default.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove.
	* lib/Makefile.am (rmt-command.h): Silent rule.
	* NEWS: Update.

2010-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update copyright years.

2009-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Delay setting directory attributes until end of run, if they do
	not permit writing. Fix debian bug #458079.

	* src/copyin.c (copyin_mkdir): New function.
	(copyin_directory): Use copyin_mkdir to create directory.
	Call set_perms only when safe, otherwise use
	repair_delayed_set_stat.
	* src/extern.h (cpio_to_stat): New prototype.
	(repair_delayed_set_stat): Change prototype.
	* src/util.c (cpio_to_stat): New function.
	(repair_delayed_set_stat): New function.
	* tests/setstat01.at: New test case.
	* tests/setstat02.at: New test case.
	* tests/Makefile.am (TESTSUITE_AT): Add setstat01.at and
	setstat02.at
	* tests/testsuite.at: Include setstat01.at and setstat02.at.

	* NEWS: Update.

2009-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor compatibility fix

	* src/cpiohdr.h (struct old_cpio_header): c_dev and c_rdev
	are unsigned short.

2009-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Raise version number to 2.10.90

2009-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix mt and make sure it is always build during distcheck. Minor
	fixes in cpio.

	* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): New variable.
	Ensure that distcheck builds mt.
	* bootstrap: Patch Makefile.in to honor
	AM_DISTCHECK_CONFIGURE_FLAGS.
	* gnulib.modules: add argp-version-etc and progname.
	* src/Makefile.am: Remove useless dependency.
	* src/copyin.c (long_format): Fix printf arguments.
	* src/copyout.c (read_for_checksum): Return unsigned long.
	(process_copy_out): Remove unused variable.
	* src/extern.h (crc): Change type to unsigned long.
	(program_name): Remove.
	* src/global.c: Likewise.
	* src/main.c: Include argp-version-etc.h and progname.h
	(argp_program_version): Remove.
	(program_authors): New global.
	(options): Remove the 'Informative options' group. These are
	handled automatically by argp.
	(parse_opt): Likewise.
	(licence): Remove. This info is output by --version.
	(process_args): Remove useless test.
[--snip--]
